From edd07a3a55cdaea3aea44dacbba8670e6fe5153b Mon Sep 17 00:00:00 2001 From: Graham Nelson Date: Wed, 9 Jun 2021 22:20:23 +0100 Subject: [PATCH] Migrated In element --- docs/assertions-module/3-nuor.html | 21 +- docs/assertions-module/3-uor.html | 2 +- docs/codegen-module/3-su.html | 6 +- docs/codegen-module/6-be.html | 2 +- docs/codegen-module/6-ce.html | 2 +- docs/codegen-module/6-ce2.html | 2 +- docs/codegen-module/6-ee.html | 2 +- docs/codegen-module/6-ee2.html | 2 +- docs/codegen-module/6-fe.html | 2 +- docs/codegen-module/6-ie.html | 297 ++++++++++++++++++ docs/codegen-module/6-ifs.html | 31 +- docs/codegen-module/6-ii.html | 2 +- docs/codegen-module/6-ir.html | 2 +- docs/codegen-module/6-re.html | 2 +- docs/codegen-module/6-rfse.html | 2 +- docs/codegen-module/6-se.html | 2 +- docs/codegen-module/6-te.html | 2 +- docs/codegen-module/6-ve.html | 2 +- docs/codegen-module/index.html | 5 + docs/core-module/3-pm.html | 5 +- docs/index-module/2-act.html | 2 +- docs/index-module/2-adj.html | 2 +- docs/index-module/2-ae.html | 2 +- docs/index-module/2-ie.html | 2 +- docs/index-module/2-ie2.html | 264 ---------------- docs/index-module/2-inf.html | 2 +- docs/index-module/2-ins.html | 2 +- docs/index-module/2-ki.html | 2 +- docs/index-module/2-li.html | 2 +- docs/index-module/2-me.html | 2 +- docs/index-module/2-pi.html | 2 +- docs/index-module/2-prp.html | 2 +- docs/index-module/2-rls.html | 2 +- docs/index-module/4-em.html | 2 +- docs/index-module/index.html | 5 - docs/runtime-module/2-cu.html | 41 ++- docs/runtime-module/2-emt.html | 4 +- docs/runtime-module/2-hrr.html | 53 +++- docs/runtime-module/3-cm.html | 95 ++++-- docs/runtime-module/3-uo.html | 19 ++ docs/runtime-module/4-ts.html | 2 +- docs/runtime-module/5-vrb.html | 2 +- docs/supervisor-module/5-ps2.html | 6 +- .../Chapter 5/Project Services.w | 6 +- inform7/Figures/memory-diagnostics.txt | 38 +-- inform7/Figures/timings-diagnostics.txt | 36 +-- .../Chapter 3/New Use Option Requests.w | 16 - .../core-module/Chapter 3/Plugin Manager.w | 5 +- .../index-module/Chapter 2/Innards Element.w | 159 ---------- inform7/index-module/Contents.w | 1 - .../Chapter 2/Compilation Units.w | 20 +- inform7/runtime-module/Chapter 2/Hierarchy.w | 33 +- .../Chapter 3/Completion Module.w | 45 +++ .../runtime-module/Chapter 3/Use Options.w | 19 ++ .../Chapter 6/Index File Services.w | 17 +- .../Chapter 6/Innards Element.w | 187 +++++++++++ inter/codegen-module/Contents.w | 1 + 57 files changed, 866 insertions(+), 627 deletions(-) create mode 100644 docs/codegen-module/6-ie.html delete mode 100644 docs/index-module/2-ie2.html delete mode 100644 inform7/index-module/Chapter 2/Innards Element.w create mode 100644 inter/codegen-module/Chapter 6/Innards Element.w diff --git a/docs/assertions-module/3-nuor.html b/docs/assertions-module/3-nuor.html index bf7b05d15..09aa0c19f 100644 --- a/docs/assertions-module/3-nuor.html +++ b/docs/assertions-module/3-nuor.html @@ -230,24 +230,7 @@ them back that way too: uo->minimum_setting_value, from); } -

§6. And this is what the rest of Inform calls to find out whether a particular -pragma is set: -

- -
-int NewUseOptions::uo_set_from(use_option *uo, int category, inform_extension *E) {
-    source_file *sf = (uo->where_used)?
-        (Lexer::file_of_origin(Wordings::first_wn(Node::get_text(uo->where_used)))):NULL;
-    inform_extension *efo = (sf)?(Extensions::corresponding_to(sf)):NULL;
-    switch (category) {
-        case 1: if ((sf) && (efo == NULL)) return TRUE; break;
-        case 2: if (sf == NULL) return TRUE; break;
-        case 3: if ((sf) && (efo == E)) return TRUE; break;
-    }
-    return FALSE;
-}
-
-

§7. We can also meddle with the I6 memory settings which will be used to finish +

§6. We can also meddle with the I6 memory settings which will be used to finish compiling the story file. We need this because we have no practical way to predict when our code will break I6's limits: the only reasonable way it can work is for the user to hit the limit occasionally, and then raise that limit @@ -262,7 +245,7 @@ by hand with a sentence in the source text. } i6_memory_setting;

-

§8.

+

§7.

 void NewUseOptions::memory_setting(text_stream *identifier, int n) {
diff --git a/docs/assertions-module/3-uor.html b/docs/assertions-module/3-uor.html
index 09793bbf9..5afb8f8ad 100644
--- a/docs/assertions-module/3-uor.html
+++ b/docs/assertions-module/3-uor.html
@@ -185,7 +185,7 @@ since the compiler next down the chain may no longer be I6.
             "that is too long to be an ICL identifier",
             "so can't be the name of any I6 memory setting.");
     }
-    NewUseOptions::memory_setting(icl_identifier, n);
+    NewUseOptions::memory_setting(icl_identifier, n);
     DISCARD_TEXT(icl_identifier)
 
diff --git a/docs/codegen-module/3-su.html b/docs/codegen-module/3-su.html index b7b5afd19..d0abaec8b 100644 --- a/docs/codegen-module/3-su.html +++ b/docs/codegen-module/3-su.html @@ -213,7 +213,7 @@ function togglePopup(material_id) { tree_inventory *cached_inventory = NULL; inter_tree *cache_is_for = NULL; -tree_inventory *Synoptic::inv(inter_tree *I) { +tree_inventory *Synoptic::inv(inter_tree *I) { if (cache_is_for == I) return cached_inventory; cache_is_for = I; cached_inventory = Synoptic::new_inventory(I); @@ -244,11 +244,11 @@ function togglePopup(material_id) { return TRUE; } - +

§2.

-int Synoptic::module_order(const void *ent1, const void *ent2) {
+int Synoptic::module_order(const void *ent1, const void *ent2) {
     itl_entry *E1 = (itl_entry *) ent1;
     itl_entry *E2 = (itl_entry *) ent2;
     if (E1 == E2) return 0;
diff --git a/docs/codegen-module/6-be.html b/docs/codegen-module/6-be.html
index a2dd91734..c242e0325 100644
--- a/docs/codegen-module/6-be.html
+++ b/docs/codegen-module/6-be.html
@@ -115,7 +115,7 @@ function togglePopup(material_id) {
 }
 
diff --git a/docs/codegen-module/6-ce.html b/docs/codegen-module/6-ce.html index ef55e7a9f..886a53166 100644 --- a/docs/codegen-module/6-ce.html +++ b/docs/codegen-module/6-ce.html @@ -256,7 +256,7 @@ giving only minimal entries about them. diff --git a/docs/codegen-module/6-ce2.html b/docs/codegen-module/6-ce2.html index 1d7a811ec..af55b5dd1 100644 --- a/docs/codegen-module/6-ce2.html +++ b/docs/codegen-module/6-ce2.html @@ -150,7 +150,7 @@ simplified form of the iFiction record, without the XML overhead. } diff --git a/docs/codegen-module/6-ee.html b/docs/codegen-module/6-ee.html index 3cc810dc8..f74226a87 100644 --- a/docs/codegen-module/6-ee.html +++ b/docs/codegen-module/6-ee.html @@ -150,7 +150,7 @@ function togglePopup(material_id) { diff --git a/docs/codegen-module/6-ee2.html b/docs/codegen-module/6-ee2.html index c0b52492f..0e2f2abc0 100644 --- a/docs/codegen-module/6-ee2.html +++ b/docs/codegen-module/6-ee2.html @@ -135,7 +135,7 @@ function togglePopup(material_id) { diff --git a/docs/codegen-module/6-fe.html b/docs/codegen-module/6-fe.html index c98687da6..e62ab59db 100644 --- a/docs/codegen-module/6-fe.html +++ b/docs/codegen-module/6-fe.html @@ -353,7 +353,7 @@ to match this width, preserving the aspect ratio. diff --git a/docs/codegen-module/6-ie.html b/docs/codegen-module/6-ie.html new file mode 100644 index 000000000..c2539bcd3 --- /dev/null +++ b/docs/codegen-module/6-ie.html @@ -0,0 +1,297 @@ + + + + Innards Element + + + + + + + + + + + + + + + + + + +
+ + +

To write the Innards element (In) in the index.

+ +

§1. Describing the current VM. +

+ +
+void InnardsElement::render(OUTPUT_STREAM) {
+    inter_tree *I = Index::get_tree();
+    tree_inventory *inv = Synoptic::inv(I);
+    TreeLists::sort(inv->use_option_nodes, Synoptic::module_order);
+
+    Show the virtual machine compiled for1.1;
+    Show the use options1.2;
+
+    HTML_OPEN("p");
+    Index::extra_link(OUT, 3);
+    WRITE("See some technicalities for Inform maintainers only");
+    HTML_CLOSE("p");
+    Index::extra_div_open(OUT, 3, 2, "e0e0e0");
+    HTML_OPEN("p");
+    Index::anchor(OUT, I"CONFIG");
+    Show the language elements used1.3;
+    Add some paste buttons for the debugging log1.4;
+    Index::extra_div_close(OUT, "e0e0e0");
+}
+
+

§1.1. Show the virtual machine compiled for1.1 = +

+ +
+    Index::anchor(OUT, I"STORYFILE");
+    HTML_OPEN("p"); WRITE("Story file format: ");
+    inter_package *pack = Inter::Packages::by_url(I, I"/main/completion/basics");
+    text_stream *VM = Metadata::read_optional_textual(pack, I"^virtual_machine");
+    text_stream *VM_icon = Metadata::read_optional_textual(pack, I"^virtual_machine_icon");
+    if (Str::len(VM_icon) > 0) {
+        HTML_TAG_WITH("img", "border=0 src=inform:/doc_images/%S", VM_icon);
+        WRITE(" ");
+    }
+    if (Str::len(VM) > 0) WRITE("%S", VM);
+    HTML_CLOSE("p");
+
+ +

§1.2. Show the use options1.2 = +

+ +
+    HTML_OPEN("p"); WRITE("The following use options are in force:"); HTML_CLOSE("p");
+    InnardsElement::index_options_in_force_from(OUT, inv, MAIN_TEXT_UO_ORIGIN, NULL);
+    InnardsElement::index_options_in_force_from(OUT, inv, OPTIONS_FILE_UO_ORIGIN, NULL);
+    for (int i=0; i<TreeLists::len(inv->module_nodes); i++) {
+        inter_package *E = Inter::Package::defined_by_frame(inv->module_nodes->list[i].node);
+        InnardsElement::index_options_in_force_from(OUT, inv, EXTENSION_UO_ORIGIN, E);
+    }
+    int c = 0;
+    HTML_OPEN("p"); WRITE("Whereas these are not in force:"); HTML_CLOSE("p");
+    HTML::open_indented_p(OUT, 2, "tight");
+    for (int i=0; i<TreeLists::len(inv->use_option_nodes); i++) {
+        inter_package *pack = Inter::Package::defined_by_frame(inv->use_option_nodes->list[i].node);
+        inter_ti set = Metadata::read_numeric(pack, I"^active");
+        inter_ti sfs = Metadata::read_numeric(pack, I"^source_file_scoped");
+        if ((set == FALSE) && (sfs == FALSE)) {
+            Write in the index line for a use option not taken1.2.1;
+            if (c++ > 0) WRITE(", ");
+        }
+    }
+    if (c == 0) WRITE("None.");  in practice, this will never happen
+    HTML_CLOSE("p");
+
+ +

§1.2.1. Write in the index line for a use option not taken1.2.1 = +

+ +
+    HTML_OPEN_WITH("span", "style=\"white-space:nowrap\";");
+    TEMPORARY_TEXT(TEMP)
+    WRITE_TO(TEMP, "Use %S.", Metadata::read_textual(pack, I"^name"));
+    PasteButtons::paste_text(OUT, TEMP);
+    DISCARD_TEXT(TEMP)
+    WRITE("&nbsp;%S", Metadata::read_textual(pack, I"^name"));
+    HTML_CLOSE("span");
+
+ +

§1.3. Show the language elements used1.3 = +

+ +
+    WRITE("Inform language definition:\n");
+    inter_package *pack = Inter::Packages::by_url(I, I"/main/completion/basics");
+    text_stream *used = Metadata::read_optional_textual(pack, I"^language_elements_used");
+    text_stream *not_used = Metadata::read_optional_textual(pack, I"^language_elements_not_used");
+    if (Str::len(used) > 0) WRITE("Included: %S", used);
+    if (Str::len(not_used) > 0) WRITE("<br>Excluded: %S", not_used);
+    HTML_CLOSE("p");
+
+ +

§1.4. Add some paste buttons for the debugging log1.4 = +

+ +
+    HTML_OPEN("p");
+    WRITE("Debugging log:");
+    HTML_CLOSE("p");
+    HTML_OPEN("p");
+    inter_symbol *wanted = PackageTypes::get(I, I"_debugging_aspect");
+    inter_package *pack = Inter::Packages::by_url(I, I"/main/completion/basics");
+    inter_tree_node *D = Inter::Packages::definition(pack);
+    LOOP_THROUGH_INTER_CHILDREN(C, D) {
+        if (C->W.data[ID_IFLD] == PACKAGE_IST) {
+            inter_package *entry = Inter::Package::defined_by_frame(C);
+            if (Inter::Packages::type(entry) == wanted) {
+                TEMPORARY_TEXT(is)
+                WRITE_TO(is, "Include %S in the debugging log.",
+                    Metadata::read_textual(entry, I"^name"));
+                PasteButtons::paste_text(OUT, is);
+                WRITE("&nbsp;%S&nbsp;", is);
+                DISCARD_TEXT(is)
+                if (Metadata::read_optional_numeric(entry, I"^used")) {
+                    HTML_TAG_WITH("img", "border=0 src=inform:/doc_images/tick.png");
+                } else {
+                    HTML_TAG_WITH("img", "border=0 src=inform:/doc_images/cross.png");
+                }
+                HTML_TAG("br");
+            }
+        }
+    }
+    HTML_CLOSE("p");
+
+ +

§2. Now for indexing, where there's nothing much to see. +

+ +
define MAIN_TEXT_UO_ORIGIN 1
+define OPTIONS_FILE_UO_ORIGIN 2
+define EXTENSION_UO_ORIGIN 3
+
+
+void InnardsElement::index_options_in_force_from(OUTPUT_STREAM, tree_inventory *inv, int category, inter_package *E) {
+    int N = 0;
+    for (int i=0; i<TreeLists::len(inv->use_option_nodes); i++) {
+        inter_package *pack = Inter::Package::defined_by_frame(inv->use_option_nodes->list[i].node);
+        inter_ti set = Metadata::read_numeric(pack, I"^active");
+        inter_ti sfs = Metadata::read_numeric(pack, I"^source_file_scoped");
+        if ((set) && (sfs == FALSE)) {
+            if (InnardsElement::uo_set_from(pack, category, E)) {
+                if (N++ == 0) Write in the use option subheading2.2;
+                Write in the index line for a use option taken2.3;
+            }
+        }
+    }
+}
+
+

§2.1. And this is what the rest of Inform calls to find out whether a particular +pragma is set: +

+ +
+int InnardsElement::uo_set_from(inter_package *pack, int category, inter_package *E) {
+    switch (category) {
+        case MAIN_TEXT_UO_ORIGIN: if (Metadata::read_optional_numeric(pack, I"^used_in_source_text")) return TRUE; break;
+        case OPTIONS_FILE_UO_ORIGIN: if (Metadata::read_optional_numeric(pack, I"^used_in_options")) return TRUE; break;
+        case EXTENSION_UO_ORIGIN: {
+            inter_symbol *id = Metadata::read_optional_symbol(pack, I"^used_in_extension");
+            if (id) {
+                inter_package *used_in_E = Inter::Packages::container(id->definition);
+                if ((used_in_E) && (used_in_E == E)) return TRUE;
+            }
+            break;
+        }
+    }
+    return FALSE;
+}
+
+

§2.2. Write in the use option subheading2.2 = +

+ +
+    HTML::open_indented_p(OUT, 2, "tight");
+    HTML::begin_colour(OUT, I"808080");
+    WRITE("Set from ");
+    switch (category) {
+        case MAIN_TEXT_UO_ORIGIN:
+            WRITE("the source text"); break;
+        case OPTIONS_FILE_UO_ORIGIN:
+            WRITE("the Options.txt configuration file, or automatically");
+            Index::DocReferences::link(OUT, I"OPTIONSFILE"); break;
+        case EXTENSION_UO_ORIGIN:
+            WRITE("%S", Metadata::read_optional_textual(E, I"^credit"));
+            break;
+    }
+    WRITE(":");
+    HTML::end_colour(OUT);
+    HTML_CLOSE("p");
+
+ +

§2.3. Write in the index line for a use option taken2.3 = +

+ +
+    HTML::open_indented_p(OUT, 3, "tight");
+    WRITE("Use %S", Metadata::read_optional_textual(pack, I"^name"));
+    int msv = (int) Metadata::read_optional_numeric(pack, I"^minimum");
+    if (msv > 0) WRITE(" of at least %d", msv);
+    int at = (int) Metadata::read_optional_numeric(pack, I"^used_at");
+    if (at > 0) Index::link(OUT, at);
+    if (msv > 0) {
+        WRITE("&nbsp;");
+        TEMPORARY_TEXT(TEMP)
+        WRITE_TO(TEMP, "Use %S of at least %d.",
+            Metadata::read_optional_textual(pack, I"^name"), 2*msv);
+        PasteButtons::paste_text(OUT, TEMP);
+        DISCARD_TEXT(TEMP)
+        WRITE("&nbsp;<i>Double this</i>");
+    }
+    HTML_CLOSE("p");
+
+ + + +
+ + + diff --git a/docs/codegen-module/6-ifs.html b/docs/codegen-module/6-ifs.html index 19b599c4a..8309c5461 100644 --- a/docs/codegen-module/6-ifs.html +++ b/docs/codegen-module/6-ifs.html @@ -83,7 +83,7 @@ function togglePopup(material_id) { indexing_tree = I; } -inter_tree *Index::get_tree(void) { +inter_tree *Index::get_tree(void) { return indexing_tree; } @@ -857,12 +857,16 @@ to show, hide and colour things: StandardsElement::render(OUT); return; } - - #ifdef CORE_MODULE - if (Str::eq_wide_string(elt, L"In")) { - IXInnards::render(OUT, Supervisor::current_vm()); + if (Str::eq_wide_string(elt, L"C")) { + ContentsElement::render(OUT); return; } + if (Str::eq_wide_string(elt, L"In")) { + InnardsElement::render(OUT); + return; + } + + #ifdef CORE_MODULE if (Str::eq_wide_string(elt, L"Pl")) { IXScenes::render(OUT); return; @@ -875,11 +879,6 @@ to show, hide and colour things: IXPhysicalWorld::render(OUT); return; } - if (Str::eq_wide_string(elt, L"C")) { - ContentsElement::render(OUT); - return; - } - if (Str::eq_wide_string(elt, L"Ph")) { Phrases::Index::index_page_Phrasebook(OUT); @@ -1021,7 +1020,7 @@ the source text in the application.

-void Index::link(OUTPUT_STREAM, int wn) {
+void Index::link(OUTPUT_STREAM, int wn) {
     Index::link_to_location(OUT, Lexer::word_location(wn), TRUE);
 }
 
@@ -1076,7 +1075,7 @@ code.
     HTML_CLOSE("a");
 }
 
-void Index::anchor(OUTPUT_STREAM, text_stream *p) {
+void Index::anchor(OUTPUT_STREAM, text_stream *p) {
     HTML_OPEN_WITH("a", "name=%S", p); HTML_CLOSE("a");
 }
 
@@ -1094,7 +1093,7 @@ code.
 

§17. "Show extra" links, and also a spacer of equivalent width.

-void Index::extra_link(OUTPUT_STREAM, int id) {
+void Index::extra_link(OUTPUT_STREAM, int id) {
     HTML_OPEN_WITH("a", "href=\"#\" onclick=\"showExtra('extra%d', 'plus%d'); return false;\"", id, id);
     HTML_TAG_WITH("img", "border=0 id=\"plus%d\" src=inform:/doc_images/extra.png", id);
     HTML_CLOSE("a");
@@ -1124,13 +1123,13 @@ code.
 

-void Index::extra_div_open(OUTPUT_STREAM, int id, int indent, char *colour) {
+void Index::extra_div_open(OUTPUT_STREAM, int id, int indent, char *colour) {
     HTML_OPEN_WITH("div", "id=\"extra%d\" style=\"display: none;\"", id);
     HTML::open_indented_p(OUT, indent, "");
     HTML::open_coloured_box(OUT, colour, ROUND_BOX_TOP+ROUND_BOX_BOTTOM);
 }
 
-void Index::extra_div_close(OUTPUT_STREAM, char *colour) {
+void Index::extra_div_close(OUTPUT_STREAM, char *colour) {
     HTML::close_coloured_box(OUT, colour, ROUND_BOX_TOP+ROUND_BOX_BOTTOM);
     HTML_CLOSE("p");
     HTML_CLOSE("div");
@@ -1193,7 +1192,7 @@ quotes.
 }
 
diff --git a/docs/codegen-module/6-ii.html b/docs/codegen-module/6-ii.html index b5c82fd03..e61d01384 100644 --- a/docs/codegen-module/6-ii.html +++ b/docs/codegen-module/6-ii.html @@ -288,7 +288,7 @@ time.) {-index:name}
  • This code is used in §3.
diff --git a/docs/codegen-module/6-ir.html b/docs/codegen-module/6-ir.html index 39176baff..8336d6cd4 100644 --- a/docs/codegen-module/6-ir.html +++ b/docs/codegen-module/6-ir.html @@ -698,7 +698,7 @@ text to assert a change:
diff --git a/docs/codegen-module/6-re.html b/docs/codegen-module/6-re.html index 367087a0c..d16576ec7 100644 --- a/docs/codegen-module/6-re.html +++ b/docs/codegen-module/6-re.html @@ -112,7 +112,7 @@ function togglePopup(material_id) { }
diff --git a/docs/codegen-module/6-rfse.html b/docs/codegen-module/6-rfse.html index e8f0e3a9c..733233067 100644 --- a/docs/codegen-module/6-rfse.html +++ b/docs/codegen-module/6-rfse.html @@ -94,7 +94,7 @@ function togglePopup(material_id) { } diff --git a/docs/codegen-module/6-se.html b/docs/codegen-module/6-se.html index 9e1a53d33..19fd91ec7 100644 --- a/docs/codegen-module/6-se.html +++ b/docs/codegen-module/6-se.html @@ -275,7 +275,7 @@ their contents in logical order. } diff --git a/docs/codegen-module/6-te.html b/docs/codegen-module/6-te.html index 7cdb870e3..949a63cce 100644 --- a/docs/codegen-module/6-te.html +++ b/docs/codegen-module/6-te.html @@ -250,7 +250,7 @@ Helvetica-style lower case "x", but life is full of compromises. diff --git a/docs/codegen-module/6-ve.html b/docs/codegen-module/6-ve.html index f1c49774c..11ebf95f6 100644 --- a/docs/codegen-module/6-ve.html +++ b/docs/codegen-module/6-ve.html @@ -168,7 +168,7 @@ function togglePopup(material_id) { diff --git a/docs/codegen-module/index.html b/docs/codegen-module/index.html index 4e8f41347..0c4ccd3cb 100644 --- a/docs/codegen-module/index.html +++ b/docs/codegen-module/index.html @@ -396,6 +396,11 @@ Standards Element - To write the Standards element (St) in the index.

+
  • +

    + Innards Element - + To write the Innards element (In) in the index.

    +
  • diff --git a/docs/core-module/3-pm.html b/docs/core-module/3-pm.html index f98ef9d08..cd6c331f0 100644 --- a/docs/core-module/3-pm.html +++ b/docs/core-module/3-pm.html @@ -122,17 +122,14 @@ the compiler at all. return P->active; } -void PluginManager::list_plugins(OUTPUT_STREAM, char *label, int state) { +void PluginManager::list_plugins(OUTPUT_STREAM, int state) { plugin *P; int c = 0; - WRITE("%s: ", label); LOOP_OVER(P, plugin) if (P->active == state) { if (c > 0) WRITE(", "); WRITE("%S", P->textual_name); c++; } - if (c == 0) WRITE("<i>none</i>"); - WRITE(".\n"); }

    §3. In the code above, plugins are set up as inactive by default — even "core", diff --git a/docs/index-module/2-act.html b/docs/index-module/2-act.html index 146d75e12..f072794ab 100644 --- a/docs/index-module/2-act.html +++ b/docs/index-module/2-act.html @@ -102,7 +102,7 @@ }

    diff --git a/docs/index-module/2-adj.html b/docs/index-module/2-adj.html index 5ee743dd7..d6d25f058 100644 --- a/docs/index-module/2-adj.html +++ b/docs/index-module/2-adj.html @@ -104,7 +104,7 @@ prefaced "(of a rulebook)", "(of an activity)", and so on. diff --git a/docs/index-module/2-ae.html b/docs/index-module/2-ae.html index c0d36415c..64250ad6e 100644 --- a/docs/index-module/2-ae.html +++ b/docs/index-module/2-ae.html @@ -217,7 +217,7 @@ text, sorted into kind order of left and then right operand. diff --git a/docs/index-module/2-ie.html b/docs/index-module/2-ie.html index 00ca7ea78..7b21f4207 100644 --- a/docs/index-module/2-ie.html +++ b/docs/index-module/2-ie.html @@ -299,7 +299,7 @@ dictionary. } diff --git a/docs/index-module/2-ie2.html b/docs/index-module/2-ie2.html deleted file mode 100644 index 517546f0d..000000000 --- a/docs/index-module/2-ie2.html +++ /dev/null @@ -1,264 +0,0 @@ - - - - Innards Element - - - - - - - - - - - - - - - - - - -
    - - -

    To index tables.

    - -
    - -

    §1. Describing the current VM.

    - -
    -void IXInnards::render(OUTPUT_STREAM, target_vm *VM) {
    -    IXInnards::index_VM(OUT, VM);
    -    IXInnards::index_use_options(OUT);
    -    HTML_OPEN("p");
    -    Index::extra_link(OUT, 3);
    -    WRITE("See some technicalities for Inform maintainers only");
    -    HTML_CLOSE("p");
    -    Index::extra_div_open(OUT, 3, 2, "e0e0e0");
    -    IXInnards::show_configuration(OUT);
    -    Add some paste buttons for the debugging log1.1;
    -    Index::extra_div_close(OUT, "e0e0e0");
    -}
    -
    -

    §1.1. The index provides some hidden paste icons for these: -

    - -

    Add some paste buttons for the debugging log1.1 = -

    - -
    -    HTML_OPEN("p");
    -    WRITE("Debugging log:");
    -    HTML_CLOSE("p");
    -    HTML_OPEN("p");
    -    for (int i=0; i<NO_DEFINED_DA_VALUES; i++) {
    -        debugging_aspect *da = &(the_debugging_aspects[i]);
    -        if (Str::len(da->unhyphenated_name) > 0) {
    -            TEMPORARY_TEXT(is)
    -            WRITE_TO(is, "Include %S in the debugging log.", da->unhyphenated_name);
    -            PasteButtons::paste_text(OUT, is);
    -            WRITE("&nbsp;%S", is);
    -            DISCARD_TEXT(is)
    -            HTML_TAG("br");
    -        }
    -    }
    -    HTML_CLOSE("p");
    -
    -
    • This code is used in §1.
    -

    §2.

    - -
    -void IXInnards::index_VM(OUTPUT_STREAM, target_vm *VM) {
    -    if (VM == NULL) internal_error("target VM not set yet");
    -    Index::anchor(OUT, I"STORYFILE");
    -    HTML_OPEN("p"); WRITE("Story file format: ");
    -    ExtensionIndex::plot_icon(OUT, VM);
    -    TargetVMs::write(OUT, VM);
    -    HTML_CLOSE("p");
    -}
    -
    -

    §3.

    - -
    -void IXInnards::show_configuration(OUTPUT_STREAM) {
    -    HTML_OPEN("p");
    -    Index::anchor(OUT, I"CONFIG");
    -    WRITE("Inform language definition:\n");
    -    PluginManager::list_plugins(OUT, "Included", TRUE);
    -    PluginManager::list_plugins(OUT, "Excluded", FALSE);
    -    HTML_CLOSE("p");
    -}
    -
    -

    §4. Now for indexing, where there's nothing much to see. -

    - -
    define MAIN_TEXT_UO_ORIGIN 1
    -define OPTIONS_FILE_UO_ORIGIN 2
    -define EXTENSION_UO_ORIGIN 3
    -
    -
    -void IXInnards::index_use_options(OUTPUT_STREAM) {
    -    HTML_OPEN("p"); WRITE("The following use options are in force:"); HTML_CLOSE("p");
    -    IXInnards::index_options_in_force_from(OUT, MAIN_TEXT_UO_ORIGIN, NULL);
    -    IXInnards::index_options_in_force_from(OUT, OPTIONS_FILE_UO_ORIGIN, NULL);
    -    inform_extension *E;
    -    LOOP_OVER(E, inform_extension)
    -        IXInnards::index_options_in_force_from(OUT, EXTENSION_UO_ORIGIN, E);
    -    int nt = 0;
    -    use_option *uo;
    -    LOOP_OVER(uo, use_option) {
    -        if (uo->source_file_scoped) continue;
    -        if ((uo->option_used == FALSE) && (uo->minimum_setting_value < 0)) nt++;
    -    }
    -    if (nt > 0) {
    -        HTML_OPEN("p"); WRITE("Whereas these are not in force:"); HTML_CLOSE("p");
    -        HTML::open_indented_p(OUT, 2, "tight");
    -        LOOP_OVER(uo, use_option) {
    -            if (uo->source_file_scoped) continue;
    -            if ((uo->option_used == FALSE) && (uo->minimum_setting_value < 0)) {
    -                Write in the index line for a use option not taken4.1;
    -                if (--nt > 0) WRITE(", ");
    -            }
    -        }
    -        HTML_CLOSE("p");
    -    }
    -}
    -
    -

    §4.1. Write in the index line for a use option not taken4.1 = -

    - -
    -    HTML_OPEN_WITH("span", "style=\"white-space:nowrap\";");
    -    TEMPORARY_TEXT(TEMP)
    -    WRITE_TO(TEMP, "Use %+W.", uo->name);
    -    PasteButtons::paste_text(OUT, TEMP);
    -    DISCARD_TEXT(TEMP)
    -    WRITE("&nbsp;%+W", uo->name);
    -    HTML_CLOSE("span");
    -
    -
    • This code is used in §4.
    -

    §5.

    - -
    -void IXInnards::index_options_in_force_from(OUTPUT_STREAM, int category, inform_extension *E) {
    -    int N = 0;
    -    use_option *uo;
    -    LOOP_OVER(uo, use_option) {
    -        if (uo->source_file_scoped) continue;
    -        if ((uo->option_used) && (uo->minimum_setting_value < 0) &&
    -            (NewUseOptions::uo_set_from(uo, category, E))) {
    -            if (N++ == 0) Write in the use option subheading5.1;
    -            Write in the index line for a use option taken5.2;
    -        }
    -    }
    -    LOOP_OVER(uo, use_option) {
    -        if (uo->source_file_scoped) continue;
    -        if (((uo->option_used) && (uo->minimum_setting_value >= 0)) &&
    -            (NewUseOptions::uo_set_from(uo, category, E))) {
    -            if (N++ == 0) Write in the use option subheading5.1;
    -            Write in the index line for a use option taken5.2;
    -        }
    -    }
    -}
    -
    -

    §5.1. Write in the use option subheading5.1 = -

    - -
    -    HTML::open_indented_p(OUT, 2, "tight");
    -    HTML::begin_colour(OUT, I"808080");
    -    WRITE("Set from ");
    -    switch (category) {
    -        case MAIN_TEXT_UO_ORIGIN:
    -            WRITE("the source text"); break;
    -        case OPTIONS_FILE_UO_ORIGIN:
    -            WRITE("the Options.txt configuration file");
    -            Index::DocReferences::link(OUT, I"OPTIONSFILE"); break;
    -        case EXTENSION_UO_ORIGIN:
    -            if (Extensions::is_standard(E)) WRITE("the ");
    -            else WRITE("the extension ");
    -            WRITE("%S", E->as_copy->edition->work->title);
    -            break;
    -    }
    -    WRITE(":");
    -    HTML::end_colour(OUT);
    -    HTML_CLOSE("p");
    -
    -
    • This code is used in §5 (twice).
    -

    §5.2. Write in the index line for a use option taken5.2 = -

    - -
    -    HTML::open_indented_p(OUT, 3, "tight");
    -    WRITE("Use %+W", uo->name);
    -    if (uo->minimum_setting_value >= 0) WRITE(" of at least %d", uo->minimum_setting_value);
    -    if (uo->where_used) Index::link(OUT, Wordings::first_wn(Node::get_text(uo->where_used)));
    -    if (uo->minimum_setting_value >= 0) {
    -        WRITE("&nbsp;");
    -        TEMPORARY_TEXT(TEMP)
    -        WRITE_TO(TEMP, "Use %+W of at least %d.", uo->name, 2*(uo->minimum_setting_value));
    -        PasteButtons::paste_text(OUT, TEMP);
    -        DISCARD_TEXT(TEMP)
    -        WRITE("&nbsp;<i>Double this</i>");
    -    }
    -    HTML_CLOSE("p");
    -
    -
    • This code is used in §5 (twice).
    - - -
    - - - diff --git a/docs/index-module/2-inf.html b/docs/index-module/2-inf.html index 329537de0..283765e0f 100644 --- a/docs/index-module/2-inf.html +++ b/docs/index-module/2-inf.html @@ -194,7 +194,7 @@ state of being boolean, and the given certainty levels: } diff --git a/docs/index-module/2-ins.html b/docs/index-module/2-ins.html index a32e41f6c..f7a824a88 100644 --- a/docs/index-module/2-ins.html +++ b/docs/index-module/2-ins.html @@ -203,7 +203,7 @@ constant value. } diff --git a/docs/index-module/2-ki.html b/docs/index-module/2-ki.html index d029e14ca..c2d8e1eb4 100644 --- a/docs/index-module/2-ki.html +++ b/docs/index-module/2-ki.html @@ -571,7 +571,7 @@ as "0 kg", "0 hectares", or whatever is appropriate. diff --git a/docs/index-module/2-li.html b/docs/index-module/2-li.html index e2d0a6d0d..06e1d6be6 100644 --- a/docs/index-module/2-li.html +++ b/docs/index-module/2-li.html @@ -712,7 +712,7 @@ be able to print out a table of just those verbs created in that extension. } diff --git a/docs/index-module/2-me.html b/docs/index-module/2-me.html index cb2cde704..0aea16db3 100644 --- a/docs/index-module/2-me.html +++ b/docs/index-module/2-me.html @@ -475,7 +475,7 @@ table of Kinds. } diff --git a/docs/index-module/2-pi.html b/docs/index-module/2-pi.html index 0d18097cb..e084ec52e 100644 --- a/docs/index-module/2-pi.html +++ b/docs/index-module/2-pi.html @@ -501,7 +501,7 @@ so we won't list them here. } diff --git a/docs/index-module/2-prp.html b/docs/index-module/2-prp.html index b390e123b..b1f93ad87 100644 --- a/docs/index-module/2-prp.html +++ b/docs/index-module/2-prp.html @@ -143,7 +143,7 @@ function togglePopup(material_id) { } diff --git a/docs/index-module/2-rls.html b/docs/index-module/2-rls.html index 4b37b6be9..bc1119f5a 100644 --- a/docs/index-module/2-rls.html +++ b/docs/index-module/2-rls.html @@ -494,7 +494,7 @@ text to assert a change: } diff --git a/docs/index-module/4-em.html b/docs/index-module/4-em.html index eecc0ced2..ee59ae455 100644 --- a/docs/index-module/4-em.html +++ b/docs/index-module/4-em.html @@ -127,7 +127,7 @@ values inherited by sub-objects. int numeric_value; or numeric value, if appropriate to this type } plotting_parameter; - +

    §3. A set of variables associated with any map object is called a "scope". As implied above, the global scope is special: it contains the default settings passed down to all lower scopes. diff --git a/docs/index-module/index.html b/docs/index-module/index.html index b55a34a3a..a551d44f3 100644 --- a/docs/index-module/index.html +++ b/docs/index-module/index.html @@ -133,11 +133,6 @@ Phrasebook Index - To compile most of the HTML page for the Phrasebook index.

    -
  • -

    - Innards Element - - To index tables.

    -
  • Arithmetic Element - diff --git a/docs/runtime-module/2-cu.html b/docs/runtime-module/2-cu.html index 0786bdba6..14e124450 100644 --- a/docs/runtime-module/2-cu.html +++ b/docs/runtime-module/2-cu.html @@ -72,7 +72,7 @@ function togglePopup(material_id) {

    The source text is divided into compilation units, and the material they lead to is similarly divided up.

    -
    +

    §1. Units. The source text is divided up into "compilation units". Each extension is its own compilation unit, and so is the main source text. This demarcation is also @@ -141,7 +141,7 @@ can find them easily enough. This is done very early in compilation: see C->to_module = M; C->extension = ext; C->extension_id = id_iname; - CompilationUnits::join(p, C); + CompilationUnits::join(p, C);

    • This code is used in §2.

    §2.1.1. Give M a category2.1.1 = @@ -244,11 +244,10 @@ used only for indexing.) else owner = Extensions::corresponding_to( Lexer::file_of_origin(Wordings::first_wn(Node::get_text(inc)))); if (owner) { - compilation_unit *owner_C; - LOOP_OVER(owner_C, compilation_unit) - if (owner_C->extension == owner) - Hierarchy::apply_metadata_from_iname(pack, - EXT_INCLUDED_BY_MD_HL, owner_C->extension_id); + inter_name *owner_id = CompilationUnits::extension_id(owner); + if (owner_id) + Hierarchy::apply_metadata_from_iname(pack, + EXT_INCLUDED_BY_MD_HL, owner_id); } else { if (Lexer::word_location(Wordings::first_wn(Node::get_text(inc))).file_of_origin == NULL) Hierarchy::apply_metadata_from_number(pack, EXT_AUTO_INCLUDED_MD_HL, 1); @@ -260,7 +259,19 @@ used only for indexing.) } } -

    §4. What unit a node belongs to. We are going to need to determine, for any node p, which compilation unit it +

    §4. This is in principle slow, and in practice fast, and anyway little used. +

    + +
    +inter_name *CompilationUnits::extension_id(inform_extension *owner) {
    +    compilation_unit *owner_C;
    +    LOOP_OVER(owner_C, compilation_unit)
    +        if (owner_C->extension == owner)
    +            return owner_C->extension_id;
    +    return NULL;
    +}
    +
    +

    §5. What unit a node belongs to. We are going to need to determine, for any node p, which compilation unit it belongs to. If there were a fast way to go up in the syntax tree, that would be easy — we could simply run upward until we reach a level-0 heading. But the node links all run downwards. Instead, we'll annotate the nodes in a given unit. @@ -268,29 +279,29 @@ The annotations propagates downwards thus:

    -void CompilationUnits::join(parse_node *p, compilation_unit *C) {
    +void CompilationUnits::join(parse_node *p, compilation_unit *C) {
         if (Node::get_unit(p) == NULL) {
             Node::set_unit(p, C);
             for (parse_node *d = p->down; d; d = d->next)
    -            CompilationUnits::join(d, C);
    +            CompilationUnits::join(d, C);
         }
     }
     
    -

    §5. Nodes are sometimes added later, so that it may be necessary to mark them +

    §6. Nodes are sometimes added later, so that it may be necessary to mark them by hand as belonging to the same nodes as their progenitors:

    -void CompilationUnits::assign_to_same_unit(parse_node *to, parse_node *from) {
    -    CompilationUnits::join(to, Node::get_unit(from));
    +void CompilationUnits::assign_to_same_unit(parse_node *to, parse_node *from) {
    +    CompilationUnits::join(to, Node::get_unit(from));
     }
     
    -

    §6. As promised, then, given a parse node, we have to return its compilation unit: +

    §7. As promised, then, given a parse node, we have to return its compilation unit: but that's now easy.

    -compilation_unit *CompilationUnits::find(parse_node *from) {
    +compilation_unit *CompilationUnits::find(parse_node *from) {
         if (from) return Node::get_unit(from);
         return NULL;
     }
    diff --git a/docs/runtime-module/2-emt.html b/docs/runtime-module/2-emt.html
    index 68465e933..9bbbbc5c3 100644
    --- a/docs/runtime-module/2-emt.html
    +++ b/docs/runtime-module/2-emt.html
    @@ -330,7 +330,7 @@ it represents an actual number at run-time, the second if not:
     

    -inter_name *Emit::numeric_constant(inter_name *con_iname, inter_ti val) {
    +inter_name *Emit::numeric_constant(inter_name *con_iname, inter_ti val) {
         return Emit::numeric_constant_inner(con_iname, val, int_interk, INVALID_IANN);
     }
     
    @@ -365,7 +365,7 @@ it represents an actual number at run-time, the second if not:
     

    -void Emit::text_constant(inter_name *con_iname, text_stream *contents) {
    +void Emit::text_constant(inter_name *con_iname, text_stream *contents) {
         packaging_state save = Packaging::enter_home_of(con_iname);
         inter_ti ID = Inter::Warehouse::create_text(Emit::warehouse(),
             Emit::package());
    diff --git a/docs/runtime-module/2-hrr.html b/docs/runtime-module/2-hrr.html
    index 2de8472e0..215830189 100644
    --- a/docs/runtime-module/2-hrr.html
    +++ b/docs/runtime-module/2-hrr.html
    @@ -313,6 +313,10 @@ that the compiler can refer to it.
     enum MIN_NEGATIVE_NUMBER_HL
     enum I7_VERSION_NUMBER_HL
     enum I7_FULL_VERSION_NUMBER_HL
    +enum VM_MD_HL
    +enum VM_ICON_MD_HL
    +enum LANGUAGE_ELEMENTS_USED_MD_HL
    +enum LANGUAGE_ELEMENTS_NOT_USED_MD_HL
     enum MEMORY_ECONOMY_MD_HL
     enum MAX_INDEXED_FIGURES_HL
     enum NO_TEST_SCENARIOS_HL
    @@ -342,6 +346,9 @@ that the compiler can refer to it.
     enum HEADING_WORD_COUNT_MD_HL
     enum HEADING_SUMMARY_MD_HL
     enum HEADING_ID_HL
    +enum DEBUGGING_ASPECTS_HAP
    +enum DEBUGGING_ASPECT_NAME_MD_HL
    +enum DEBUGGING_ASPECT_USED_MD_HL
     

    §8.1.2. Establish basics8.1.2 =

    @@ -368,6 +375,10 @@ that the compiler can refer to it. H_BEGIN(HierarchyLocations::completion_submodule(I, basics)) H_C_T(I7_VERSION_NUMBER_HL, I"I7_VERSION_NUMBER") H_C_T(I7_FULL_VERSION_NUMBER_HL, I"I7_FULL_VERSION_NUMBER") + H_C_T(VM_MD_HL, I"^virtual_machine") + H_C_T(VM_ICON_MD_HL, I"^virtual_machine_icon") + H_C_T(LANGUAGE_ELEMENTS_USED_MD_HL, I"^language_elements_used") + H_C_T(LANGUAGE_ELEMENTS_NOT_USED_MD_HL, I"^language_elements_not_used") H_C_T(MEMORY_ECONOMY_MD_HL, I"^memory_economy") H_C_T(MEMORY_HEAP_SIZE_HL, I"MEMORY_HEAP_SIZE") H_C_T(KIT_CONFIGURATION_BITMAP_HL, I"KIT_CONFIGURATION_BITMAP") @@ -391,6 +402,10 @@ that the compiler can refer to it. H_C_U(HEADING_SUMMARY_MD_HL, I"^summary") H_C_U(HEADING_ID_HL, I"id") H_END + H_BEGIN_AP(DEBUGGING_ASPECTS_HAP, I"debugging_aspect", I"_debugging_aspect") + H_C_U(DEBUGGING_ASPECT_NAME_MD_HL, I"^name") + H_C_U(DEBUGGING_ASPECT_USED_MD_HL, I"^used") + H_END H_END
    • This code is used in §8.1.
    @@ -1575,6 +1590,12 @@ that the compiler can refer to it. enum USE_OPTION_MD_HL enum USE_OPTION_PNAME_MD_HL enum USE_OPTION_ON_MD_HL +enum USE_OPTION_USED_AT_MD_HL +enum SOURCE_FILE_SCOPED_MD_HL +enum USED_IN_SOURCE_TEXT_MD_HL +enum USED_IN_OPTIONS_MD_HL +enum USED_IN_EXTENSION_MD_HL +enum USE_OPTION_MINIMUM_MD_HL enum USE_OPTION_ID_HL

    §8.1.44. Establish use options8.1.44 = @@ -1585,9 +1606,15 @@ that the compiler can refer to it. H_BEGIN(HierarchyLocations::local_submodule(use_options)) H_BEGIN_AP(USE_OPTIONS_HAP, I"use_option", I"_use_option") - H_C_U(USE_OPTION_MD_HL, I"^name") - H_C_U(USE_OPTION_PNAME_MD_HL, I"^printed_name") - H_C_U(USE_OPTION_ON_MD_HL, I"^active") + H_C_U(USE_OPTION_MD_HL, I"^name") + H_C_U(USE_OPTION_USED_AT_MD_HL, I"^at") + H_C_U(USE_OPTION_PNAME_MD_HL, I"^printed_name") + H_C_U(USE_OPTION_ON_MD_HL, I"^active") + H_C_U(SOURCE_FILE_SCOPED_MD_HL, I"^source_file_scoped") + H_C_U(USED_IN_SOURCE_TEXT_MD_HL, I"^used_in_source_text") + H_C_U(USED_IN_OPTIONS_MD_HL, I"^used_in_options") + H_C_U(USED_IN_EXTENSION_MD_HL, I"^used_in_extension") + H_C_U(USE_OPTION_MINIMUM_MD_HL, I"^minimum") H_C_U(USE_OPTION_ID_HL, I"use_option_id") H_END H_END @@ -1844,7 +1871,7 @@ at which this array should be placed, by calling, e.g.,

    -inter_name *Hierarchy::find(int id) {
    +inter_name *Hierarchy::find(int id) {
         return HierarchyLocations::find(Emit::tree(), id);
     }
     
    @@ -1867,7 +1894,7 @@ package holding it. (P

    -inter_name *Hierarchy::make_iname_in(int id, package_request *P) {
    +inter_name *Hierarchy::make_iname_in(int id, package_request *P) {
         return HierarchyLocations::find_in_package(Emit::tree(), id, P, EMPTY_WORDING,
             NULL, -1, NULL);
     }
    @@ -1929,7 +1956,7 @@ available", using the following, which creates a socket. Again, see
     

    -void Hierarchy::make_available(inter_name *iname) {
    +void Hierarchy::make_available(inter_name *iname) {
         text_stream *ma_as = Produce::get_translation(iname);
         if (Str::len(ma_as) == 0) ma_as = InterNames::to_text(iname);
         PackageTypes::get(Emit::tree(), I"_linkage");
    @@ -1975,7 +2002,7 @@ such _kind pack
     
     package_request *Hierarchy::local_package_to(int hap_id, parse_node *at) {
         return HierarchyLocations::attach_new_package(Emit::tree(),
    -        CompilationUnits::find(at), NULL, hap_id);
    +        CompilationUnits::find(at), NULL, hap_id);
     }
     

    §20. There is just one package called synoptic, so there's no issue of what @@ -1987,7 +2014,7 @@ compilation unit is meant: that's why it's "synoptic". return HierarchyLocations::attach_new_package(Emit::tree(), NULL, NULL, hap_id); } -package_request *Hierarchy::completion_package(int hap_id) { +package_request *Hierarchy::completion_package(int hap_id) { return HierarchyLocations::attach_new_package(Emit::tree(), NULL, NULL, hap_id); }

    @@ -2027,17 +2054,17 @@ point system, and for those:

    -void Hierarchy::apply_metadata(package_request *P, int id, text_stream *value) {
    +void Hierarchy::apply_metadata(package_request *P, int id, text_stream *value) {
         inter_name *iname = Hierarchy::make_iname_in(id, P);
         Emit::text_constant(iname, value);
     }
     
    -void Hierarchy::apply_metadata_from_number(package_request *P, int id, inter_ti N) {
    +void Hierarchy::apply_metadata_from_number(package_request *P, int id, inter_ti N) {
         inter_name *iname = Hierarchy::make_iname_in(id, P);
         Emit::numeric_constant(iname, N);
     }
     
    -void Hierarchy::apply_metadata_from_iname(package_request *P, int id, inter_name *val) {
    +void Hierarchy::apply_metadata_from_iname(package_request *P, int id, inter_name *val) {
         inter_name *iname = Hierarchy::make_iname_in(id, P);
         Emit::iname_constant(iname, K_value, val);
     }
    @@ -2049,7 +2076,7 @@ point system, and for those:
         DISCARD_TEXT(ANT)
     }
     
    -void Hierarchy::apply_metadata_from_raw_wording(package_request *P, int id, wording W) {
    +void Hierarchy::apply_metadata_from_raw_wording(package_request *P, int id, wording W) {
         TEMPORARY_TEXT(ANT)
         WRITE_TO(ANT, "%+W", W);
         Hierarchy::apply_metadata(P, id, ANT);
    @@ -2064,7 +2091,7 @@ point system, and for those:
     }
     
     void Hierarchy::apply_metadata_from_heading(package_request *P, int id, heading *h) {
    -    Hierarchy::apply_metadata_from_iname(P, id, CompletionModule::heading_id(h));
    +    Hierarchy::apply_metadata_from_iname(P, id, CompletionModule::heading_id(h));
     }