diff --git a/docs/core-test/1-pc.html b/docs/core-test/1-pc.html index 7a3d7d5ff..550c56a3a 100644 --- a/docs/core-test/1-pc.html +++ b/docs/core-test/1-pc.html @@ -36,7 +36,7 @@ but on others it's compiled into the body of an application. So:
-The function main is used in 2/pt (§52), 2/pl2 (§3.1), 2/pck (§3), 3/rst (§6), 4/am (§26.1), 8/ef (§26), 8/ed2 (§3.2), 10/varc (§14), 19/tb (§27, §27.1, §27.1.3, §29), 21/rl2 (§23), 26/uo (§11.1), 27/hr (§5), 27/cm (§1), 1/ppl (§5), 2/res (§1), 4/fc (§1), 2/hf (§6).
+The function main is used in 2/pt (§52), 2/pl2 (§3.1), 2/pck (§3), 2/cnn (§1), 3/rst (§6), 4/am (§26.1), 8/ef (§26), 8/ed2 (§3.2), 10/varc (§14), 19/tb (§27, §27.1, §27.1.3, §29), 21/rl2 (§23), 26/uo (§11.1), 27/hr (§5), 27/cm (§1), 1/ppl (§5), 2/res (§1), 4/fc (§1), 2/hf (§6).
§3. As a matter of policy, no module is allowed to start or stop the foundation module, not even the mighty core; so we take care of that with one more diff --git a/docs/inform7/1-mn.html b/docs/inform7/1-mn.html index 172a6a260..65a342398 100644 --- a/docs/inform7/1-mn.html +++ b/docs/inform7/1-mn.html @@ -43,7 +43,7 @@ when they want I7 to run.
-The function main is used in 2/pt (§52), 2/pl2 (§3.1), 2/pck (§3), 3/rst (§6), 4/am (§26.1), 8/ef (§26), 8/ed2 (§3.2), 10/varc (§14), 19/tb (§27, §27.1, §27.1.3, §29), 21/rl2 (§23), 26/uo (§11.1), 27/hr (§5), 27/cm (§1), 1/ppl (§5), 2/res (§1), 4/fc (§1), 3/sm (§36, §36.1, §38), 3/em2 (§24), 4/ap (§2), 2/hf (§6).
+The function main is used in 2/pt (§52), 2/pl2 (§3.1), 2/pck (§3), 2/cnn (§1), 3/rst (§6), 4/am (§26.1), 8/ef (§26), 8/ed2 (§3.2), 10/varc (§14), 19/tb (§27, §27.1, §27.1.3, §29), 21/rl2 (§23), 26/uo (§11.1), 27/hr (§5), 27/cm (§1), 1/ppl (§5), 2/res (§1), 4/fc (§1), 3/sm (§36, §36.1, §38), 3/em2 (§24), 4/ap (§2), 2/hf (§6).
§3. Either way, that brings us here. All our modules have to be started up and shut down, so we take care of that with one more intermediary. These modules diff --git a/docs/inter-module/2-bkm.html b/docs/inter-module/2-bkm.html index 137a71d69..debf7f9fe 100644 --- a/docs/inter-module/2-bkm.html +++ b/docs/inter-module/2-bkm.html @@ -193,13 +193,13 @@
The function Inter::Bookmarks::at_start_of_this_repository is used in 3/iibf (§1), 3/iitf (§1).
-The function Inter::Bookmarks::at_end_of_this_package is used in 2/trn (§1.1).
+The function Inter::Bookmarks::at_end_of_this_package is used in 2/cnn (§1), 2/trn (§1.1).
The function Inter::Bookmarks::after_this_node is used in 2/trn (§1.1).
The function Inter::Bookmarks::set_current_package is used in 3/dfn (§4), 4/tpc3 (§2).
-The function Inter::Bookmarks::tree is used in 2/in (§4), 2/st (§8, §9), 2/cnn (§1), 3/dfn (§4), 4/tsc (§1), 4/tpc3 (§2), 4/tkc (§2), 4/tdc (§2), 4/tvc2 (§2), 4/tcc2 (§2), 4/trc (§2), 4/tic (§2), 4/tpc4 (§2), 4/tpc5 (§2), 4/tpc6 (§2), 5/tlc2 (§2), 5/tic (§2), 5/trc (§2), 5/tvc (§2), 5/tcc2 (§2).
+The function Inter::Bookmarks::tree is used in 2/in (§4), 2/st (§8, §9), 3/dfn (§4), 4/tsc (§1), 4/tpc3 (§2), 4/tkc (§2), 4/tdc (§2), 4/tvc2 (§2), 4/tcc2 (§2), 4/trc (§2), 4/tic (§2), 4/tpc4 (§2), 4/tpc5 (§2), 4/tpc6 (§2), 5/tlc2 (§2), 5/tic (§2), 5/trc (§2), 5/tvc (§2), 5/tcc2 (§2).
The function Inter::Bookmarks::warehouse is used in 2/trn (§1.2), 3/dfn (§4), 4/tmc (§2), 4/tpc (§2), 4/tlc (§2), 4/tac (§2), 4/tpc3 (§2), 4/tkc (§2), 4/tcc2 (§2), 4/tic (§2), 4/tpc4 (§2), 4/tpc5 (§2), 4/tpc6 (§2), 5/tsc (§2).
@@ -219,9 +219,9 @@The function Inter::Bookmarks::scope is used in 4/tmc (§2), 4/tsc (§1), 4/tpc (§2), 4/tac (§2), 4/tpc2 (§2), 4/tkc (§2), 4/tdc (§2), 4/tvc2 (§2), 4/tcc2 (§2), 4/trc (§2), 4/tic (§2), 4/tpc4 (§2), 4/tpc5 (§2), 4/tpc6 (§2), 4/tpc7 (§2), 5/tlc2 (§2), 5/tic (§2), 5/trc (§2), 5/tvc (§2), 5/tcc2 (§2).
-The function Inter::Bookmarks::package is used in 2/in (§4), 2/st (§8, §9), 2/cnn (§1), 2/trn (§1.2, §2.1.1), 3/dfn (§4), 4/tnc (§1), 4/tcc (§1), 4/tmc (§2), 4/tsc (§1), 4/tvc (§2), 4/tpc (§2), 4/tlc (§2), 4/tac (§2), 4/tpc2 (§2), 4/tpc3 (§2), 4/tkc (§2), 4/tdc (§2), 4/tvc2 (§2), 4/tcc2 (§2), 4/trc (§2), 4/tic (§2), 4/tpc4 (§2), 4/tpc5 (§2), 4/tpc6 (§2), 4/tpc7 (§2), 5/tlc (§2), 5/tlc2 (§2), 5/tic (§2), 5/trc (§2), 5/tvc (§2), 5/tlc3 (§2), 5/tcc (§2), 5/tec (§2), 5/trc2 (§2), 5/tcc2 (§2), 5/tsc (§2).
+The function Inter::Bookmarks::package is used in 2/in (§4), 2/st (§8, §9), 2/trn (§1.2, §3.1.1), 3/dfn (§4), 4/tnc (§1), 4/tcc (§1), 4/tmc (§2), 4/tsc (§1), 4/tvc (§2), 4/tpc (§2), 4/tlc (§2), 4/tac (§2), 4/tpc2 (§2), 4/tpc3 (§2), 4/tkc (§2), 4/tdc (§2), 4/tvc2 (§2), 4/tcc2 (§2), 4/trc (§2), 4/tic (§2), 4/tpc4 (§2), 4/tpc5 (§2), 4/tpc6 (§2), 4/tpc7 (§2), 5/tlc (§2), 5/tlc2 (§2), 5/tic (§2), 5/trc (§2), 5/tvc (§2), 5/tlc3 (§2), 5/tcc (§2), 5/tec (§2), 5/trc2 (§2), 5/tcc2 (§2), 5/tsc (§2).
-The function Inter::Bookmarks::insert is used in 2/trn (§1.3, §2.1.1), 3/iibf (§1.6), 4/tnc (§1), 4/tcc (§1), 4/tmc (§2), 4/tvc (§2), 4/tpc (§2), 4/tlc (§2), 4/tac (§2), 4/tpc2 (§2), 4/tpc3 (§2), 4/tkc (§2), 4/tdc (§2), 4/tvc2 (§2), 4/tcc2 (§2), 4/trc (§2), 4/tic (§2), 4/tpc4 (§2), 4/tpc5 (§2), 4/tpc6 (§2), 4/tpc7 (§2), 5/tlc (§2), 5/tlc2 (§2), 5/tic (§2), 5/trc (§2), 5/tvc (§2), 5/tlc3 (§2), 5/tcc (§2), 5/tec (§2), 5/trc2 (§2), 5/tcc2 (§2), 5/tsc (§2).
+The function Inter::Bookmarks::insert is used in 2/trn (§1.3, §3.1.1), 3/iibf (§1.6), 4/tnc (§1), 4/tcc (§1), 4/tmc (§2), 4/tvc (§2), 4/tpc (§2), 4/tlc (§2), 4/tac (§2), 4/tpc2 (§2), 4/tpc3 (§2), 4/tkc (§2), 4/tdc (§2), 4/tvc2 (§2), 4/tcc2 (§2), 4/trc (§2), 4/tic (§2), 4/tpc4 (§2), 4/tpc5 (§2), 4/tpc6 (§2), 4/tpc7 (§2), 5/tlc (§2), 5/tlc2 (§2), 5/tic (§2), 5/trc (§2), 5/tvc (§2), 5/tlc3 (§2), 5/tcc (§2), 5/tec (§2), 5/trc2 (§2), 5/tcc2 (§2), 5/tsc (§2).
The structure inter_bookmark is private to this section.
diff --git a/docs/inter-module/2-cnn.html b/docs/inter-module/2-cnn.html index bf89b1bf2..89832b0da 100644 --- a/docs/inter-module/2-cnn.html +++ b/docs/inter-module/2-cnn.html @@ -15,41 +15,47 @@- inter_symbol *Inter::Connectors::plug(inter_bookmark *IBM, text_stream *plug_name, text_stream *wanted, inter_package **package_cache) { - inter_package *connectors = Inter::Connectors::connectors_package(IBM, package_cache); - inter_symbol *plug = Inter::SymbolsTables::create_with_unique_name(Inter::Packages::scope(connectors), plug_name); + inter_symbol *Inter::Connectors::plug(inter_tree *I, text_stream *plug_name, text_stream *wanted) { + inter_package *connectors = Inter::Connectors::connectors_package(I); + inter_symbol *plug = Inter::SymbolsTables::create_with_unique_name( + Inter::Packages::scope(connectors), plug_name); Inter::SymbolsTables::make_plug(plug, wanted); return plug; } - inter_symbol *Inter::Connectors::socket(inter_bookmark *IBM, text_stream *socket_name, inter_symbol *wired_from, inter_package **package_cache) { - inter_package *connectors = Inter::Connectors::connectors_package(IBM, package_cache); - inter_symbol *socket = Inter::SymbolsTables::create_with_unique_name(Inter::Packages::scope(connectors), socket_name); + inter_symbol *Inter::Connectors::socket(inter_tree *I, text_stream *socket_name, inter_symbol *wired_from) { + inter_package *connectors = Inter::Connectors::connectors_package(I); + inter_symbol *socket = Inter::SymbolsTables::create_with_unique_name( + Inter::Packages::scope(connectors), socket_name); Inter::SymbolsTables::make_socket(socket, wired_from); return socket; } - inter_package *Inter::Connectors::connectors_package(inter_bookmark *IBM, inter_package **package_cache) { - inter_package *connectors = NULL; - if (package_cache) connectors = *package_cache; + inter_package *Inter::Connectors::connectors_package(inter_tree *I) { + if (I == NULL) internal_error("no tree for connectors"); + inter_package *connectors = Inter::Tree::connectors_package(I); if (connectors == NULL) { - connectors = Inter::Packages::by_name(Inter::Bookmarks::package(IBM), I"connectors"); + inter_package *main_package = Inter::Tree::main_package(I); + if (main_package == NULL) internal_error("tree without main"); + connectors = Inter::Packages::by_name(main_package, I"connectors"); + if (connectors == NULL) { + inter_symbol *linkage = Inter::SymbolsTables::url_name_to_symbol(I, NULL, I"/_linkage"); + if (linkage == NULL) internal_error("no linkage ptype"); + inter_bookmark IBM = Inter::Bookmarks::at_end_of_this_package(main_package); + Inter::Package::new_package(&IBM, I"connectors", linkage, + (inter_t) Inter::Bookmarks::baseline(&IBM)+1, NULL, &(connectors)); + } + if (connectors == NULL) internal_error("unable to create connector package"); + Inter::Tree::set_connectors_package(I, connectors); + Inter::Packages::make_linklike(connectors); } - if (connectors == NULL) { - inter_symbol *linkage = Inter::SymbolsTables::url_name_to_symbol(Inter::Bookmarks::tree(IBM), NULL, I"/_linkage"); - if (linkage == NULL) internal_error("no linkage ptype"); - Inter::Package::new_package(IBM, I"connectors", linkage, (inter_t) Inter::Bookmarks::baseline(IBM)+1, NULL, &(connectors)); - } - if (connectors == NULL) internal_error("unable to create connector package"); - if (package_cache) *package_cache = connectors; - Inter::Packages::make_linklike(connectors); return connectors; }-
The function Inter::Connectors::plug is used in 2/trn (§2.2.1, §3.1.1).
+The function Inter::Connectors::plug is used in 2/trn (§3.2, §4.1).
The function Inter::Connectors::socket appears nowhere else.
diff --git a/docs/inter-module/2-in.html b/docs/inter-module/2-in.html index 4415c1ae1..fa8609480 100644 --- a/docs/inter-module/2-in.html +++ b/docs/inter-module/2-in.html @@ -268,7 +268,7 @@The function Inter::Node::fill_0 is used in 4/tnc (§1), 4/tcc (§1).
-The function Inter::Node::fill_1 is used in 2/trn (§2.1.1), 4/tvc (§2), 4/tpc2 (§2), 4/tpc7 (§2), 5/tcc (§2), 5/tec (§2), 5/trc2 (§2).
+The function Inter::Node::fill_1 is used in 2/trn (§3.1.1), 4/tvc (§2), 4/tpc2 (§2), 4/tpc7 (§2), 5/tcc (§2), 5/tec (§2), 5/trc2 (§2).
The function Inter::Node::fill_2 is used in 4/tpc (§2), 4/tac (§2), 5/tlc (§2), 5/tlc3 (§2).
@@ -345,7 +345,7 @@ -The function Inter::Node::extend is used in 2/trn (§2.1.1), 4/tkc (§2), 4/tcc2 (§2), 4/tpc7 (§2).
+The function Inter::Node::extend is used in 2/trn (§3.1.1), 4/tkc (§2), 4/tcc2 (§2), 4/tpc7 (§2).
The function Inter::Node::vcount is used in 4/tac (§2), 4/tic (§2), 4/tpc5 (§2), 4/tpc6 (§2).
diff --git a/docs/inter-module/2-it.html b/docs/inter-module/2-it.html index 797564057..2f766fd46 100644 --- a/docs/inter-module/2-it.html +++ b/docs/inter-module/2-it.html @@ -20,6 +20,7 @@ struct inter_tree_node *root_node; struct inter_package *root_package; struct inter_package *main_package; + struct inter_package *connectors_package; MEMORY_MANAGEMENT } inter_tree; @@ -35,6 +36,7 @@ inter_tree *Inter::Tree::new(void) { inter_tree *I = CREATE(inter_tree); I->main_package = NULL; + I->connectors_package = NULL; I->housed = Inter::Warehouse::new(); inter_t N = Inter::Warehouse::create_symbols_table(I->housed); inter_symbols_table *globals = Inter::Warehouse::get_symbols_table(I->housed, N); @@ -59,11 +61,21 @@ return NULL; } + inter_package *Inter::Tree::connectors_package(inter_tree *I) { + if (I) return I->connectors_package; + return NULL; + } + void Inter::Tree::set_main_package(inter_tree *I, inter_package *M) { if (I == NULL) internal_error("no tree"); I->main_package = M; } + void Inter::Tree::set_connectors_package(inter_tree *I, inter_package *M) { + if (I == NULL) internal_error("no tree"); + I->connectors_package = M; + } + inter_warehouse *Inter::Tree::warehouse(inter_tree *I) { return I->housed; } @@ -159,13 +171,17 @@The function Inter::Tree::root_package is used in 3/dfn (§3), 3/iibf (§1.4).
-The function Inter::Tree::main_package is used in §5, 2/st (§4), 2/pck (§3).
+The function Inter::Tree::main_package is used in §5, 2/st (§4), 2/pck (§3), 2/cnn (§1).
+ +The function Inter::Tree::connectors_package is used in 2/cnn (§1).
The function Inter::Tree::set_main_package is used in 2/pck (§3).
+The function Inter::Tree::set_connectors_package is used in 2/cnn (§1).
+The function Inter::Tree::warehouse is used in 2/bkm (§1), 2/in (§4), 2/pck (§3), 2/sym (§4), 3/dfn (§3), 3/iibf (§1, §1.1), 3/idt (§3).
-The function Inter::Tree::global_scope is used in 2/bkm (§1), 2/in (§3), 2/st (§8, §9, §11), 2/trn (§1.5), 3/iibf (§1.4), 4/tpc3 (§2), 5/tic (§2).
+The function Inter::Tree::global_scope is used in 2/bkm (§1), 2/in (§3), 2/st (§8, §9, §11), 2/trn (§3, §3.1, §3.1.1), 3/iibf (§1.4), 4/tpc3 (§2), 5/tic (§2).
The function Inter::Tree::previous is used in §3.1, §3.5.
@@ -433,7 +449,7 @@The function Inter::Tree::traverse_root_only is used in 3/iibf (§1.1.5), 3/iitf (§2).
-The function Inter::Tree::traverse is used in 2/st (§10), 2/trn (§1.5, §1.6), 3/iibf (§1.1.5), 3/iitf (§1, §2).
+The function Inter::Tree::traverse is used in 2/st (§10), 2/trn (§1.4, §1.5), 3/iibf (§1.1.5), 3/iitf (§1, §2).
The function Inter::Tree::traverse_r appears nowhere else.
diff --git a/docs/inter-module/2-pck.html b/docs/inter-module/2-pck.html index 69043caf6..d805b6750 100644 --- a/docs/inter-module/2-pck.html +++ b/docs/inter-module/2-pck.html @@ -67,6 +67,7 @@ inter_tree *Inter::Packages::tree(inter_package *pack) { if (default_ptree) return default_ptree; + if (pack == NULL) return NULL; return pack->package_head->tree; } @@ -316,7 +317,7 @@The function Inter::Packages::definition is used in 2/it (§5), 2/bkm (§1).
-The function Inter::Packages::tree is used in 2/bkm (§1), 2/st (§10), 3/iibf (§1.1.3, §1.1.4).
+The function Inter::Packages::tree is used in 2/bkm (§1), 2/st (§10), 2/trn (§1), 3/iibf (§1.1.3, §1.1.4).
The function Inter::Packages::name is used in 2/st (§11), 2/trn (§1.2), 3/dfn (§4), 4/tpc3 (§2), 4/tcc2 (§2).
@@ -324,7 +325,7 @@The function Inter::Packages::make_codelike is used in 3/iibf (§1.4.3), 4/tpc3 (§2).
-The function Inter::Packages::is_linklike is used in 2/trn (§2, §3), 4/tsc (§1).
+The function Inter::Packages::is_linklike is used in 2/trn (§3, §4), 4/tsc (§1).
The function Inter::Packages::make_linklike is used in 2/cnn (§1), 4/tpc3 (§2).
@@ -332,7 +333,7 @@The function Inter::Packages::make_rootlike is used in 2/it (§2), 3/iibf (§1.4.3).
-The function Inter::Packages::parent is used in 2/st (§11), 2/trn (§1, §1.3, §2, §3), 3/dfn (§4), 3/iibf (§1.1.3.3).
+The function Inter::Packages::parent is used in 2/st (§11), 2/trn (§1, §1.3, §3, §4), 3/dfn (§4), 3/iibf (§1.1.3.3).
The function Inter::Packages::unmark_all appears nowhere else.
@@ -362,7 +363,7 @@The function Inter::Packages::container is used in 3/dfn (§4), 3/vi (§1), 5/tlc (§2), 5/tlc2 (§2), 5/trc (§2), 5/tlc3 (§2).
-The function Inter::Packages::scope is used in 2/it (§2), 2/bkm (§1), 2/st (§4, §7, §8, §9, §10, §11), 2/cnn (§1), 2/trn (§2, §3), 3/vi (§1), 4/tsc (§1), 4/tac (§2), 4/tpc3 (§2), 4/tkc (§2), 4/tcc2 (§2), 4/tic (§2), 4/tpc5 (§2), 4/tpc6 (§2), 5/tlc (§2), 5/tlc2 (§2), 5/trc (§2), 5/tvc (§2), 5/tlc3 (§2).
+The function Inter::Packages::scope is used in 2/it (§2), 2/bkm (§1), 2/st (§4, §7, §8, §9, §10, §11), 2/cnn (§1), 2/trn (§3, §4), 3/vi (§1), 4/tsc (§1), 4/tac (§2), 4/tpc3 (§2), 4/tkc (§2), 4/tcc2 (§2), 4/tic (§2), 4/tpc5 (§2), 4/tpc6 (§2), 5/tlc (§2), 5/tlc2 (§2), 5/trc (§2), 5/tvc (§2), 5/tlc3 (§2).
The function Inter::Packages::scope_of is used in 2/st (§7), 4/tmc (§2), 4/tkc (§2), 4/tdc (§2), 4/tvc2 (§2), 4/tcc2 (§2), 4/trc (§2), 4/tic (§2), 4/tpc5 (§2), 5/tvc (§2), 5/tcc2 (§2).
diff --git a/docs/inter-module/2-st.html b/docs/inter-module/2-st.html index d4c7d4629..1de226a8e 100644 --- a/docs/inter-module/2-st.html +++ b/docs/inter-module/2-st.html @@ -223,11 +223,11 @@ -The function Inter::SymbolsTables::symbol_from_name is used in §5, §11, 2/pck (§3), 2/trn (§2.1), 3/iitf (§1), 3/idt (§3), 4/tpc (§2), 4/tac (§2), 5/tlc (§2), 5/tic (§2), 5/tlc3 (§2).
+The function Inter::SymbolsTables::symbol_from_name is used in §5, §11, 2/pck (§3), 2/trn (§3.1), 3/iitf (§1), 3/idt (§3), 4/tpc (§2), 4/tac (§2), 5/tlc (§2), 5/tic (§2), 5/tlc3 (§2).
The function Inter::SymbolsTables::symbol_from_name_not_equating appears nowhere else.
-The function Inter::SymbolsTables::symbol_from_name_creating is used in §5, 2/trn (§2.1.1), 3/iitf (§1).
+The function Inter::SymbolsTables::symbol_from_name_creating is used in §5, 2/trn (§3.1.1), 3/iitf (§1).
The function Inter::SymbolsTables::symbol_from_name_creating_at_ID is used in 3/iibf (§1.4.2).
@@ -298,7 +298,7 @@ to access this: one following equations, the other not.The function Inter::SymbolsTables::unequated_symbol_from_id is used in 3/vi (§1).
-The function Inter::SymbolsTables::symbol_from_id is used in §7, 2/sym (§4), 2/trn (§2), 3/iibf (§1.5), 3/vi (§1), 3/idt (§2, §3), 4/tac (§2), 4/tkc (§2), 4/tcc2 (§2), 4/tic (§2), 4/tpc5 (§2), 4/tpc6 (§2), 4/tpc7 (§2), 5/trc (§2), 5/tvc (§2).
+The function Inter::SymbolsTables::symbol_from_id is used in §7, 2/sym (§4), 2/trn (§3), 3/iibf (§1.5), 3/vi (§1), 3/idt (§2, §3), 4/tac (§2), 4/tkc (§2), 4/tcc2 (§2), 4/tic (§2), 4/tpc5 (§2), 4/tpc6 (§2), 4/tpc7 (§2), 5/trc (§2), 5/tvc (§2).
§7. It's convenient to have some abbreviations for common ways to access the above.
@@ -433,7 +433,7 @@ a global symbol in any non-global context. -The function Inter::SymbolsTables::id_from_symbol_inner is used in 2/trn (§2.1, §2.1.1).
+The function Inter::SymbolsTables::id_from_symbol_inner is used in 2/trn (§3.1, §3.1.1).
The function Inter::SymbolsTables::id_from_symbol is used in 2/sym (§3), 4/tpc3 (§2), 5/tic (§2).
@@ -571,9 +571,9 @@ a global symbol in any non-global context. -The function Inter::SymbolsTables::url_name_to_symbol is used in §10, 2/cnn (§1), 2/trn (§2.2), 4/tsc (§1).
+The function Inter::SymbolsTables::url_name_to_symbol is used in §10, 2/cnn (§1), 2/trn (§3.2), 4/tsc (§1).
-The function Inter::SymbolsTables::symbol_to_url_name is used in 2/sym (§2, §4), 2/trn (§2.2, §3.1.1).
+The function Inter::SymbolsTables::symbol_to_url_name is used in 2/sym (§2, §4), 2/trn (§3.2, §4.1).
The function Inter::Transmigration::cache is used in §2.1, §2.2, §3.1.
+The function Inter::Transmigration::cache is used in §3.1, §3.2, §4.1.
-The function Inter::Transmigration::cached_equivalent is used in §2.1, §2.2, §3.1.
+The function Inter::Transmigration::cached_equivalent is used in §3.1, §3.2, §4.1.
The function Inter::Transmigration::move appears nowhere else.
@@ -56,7 +58,6 @@ Inter::Bookmarks::after_this_node(migrant->package_head->tree, migrant->package_head); insertion_point = Inter::Bookmarks::at_end_of_this_package(destination); - linkage_point = Inter::Bookmarks::at_end_of_this_package(migrant); inter_tree_node *prims = NULL; LOOP_THROUGH_INTER_CHILDREN(F, destination->package_head->tree->root_node) if (F->W.data[ID_IFLD] == PRIMITIVE_IST) @@ -105,18 +106,16 @@This code is used in §1.
- +typedef struct ipct_state { inter_package *migrant; inter_package *destination; - inter_package *links; - inter_bookmark *linkage_point; inter_bookmark *primitives_point; - inter_symbols_table *origin_globals; - inter_symbols_table *destination_globals; + inter_tree *origin_tree; + inter_tree *destination_tree; } ipct_state;@@ -124,21 +123,32 @@
The structure ipct_state is private to this section.
-§1.5. §.1. This code is used in §1.4, §1.5. §1.4. This code is used in §1. The function Inter::Transmigration::correct_migrant is used in §1.5. The function Inter::Transmigration::correct_migrant is used in §1.4. §2.1. §3.1. This code is used in §2. This code is used in §3. §2.1.1. §3.1.1. This code is used in §2.1. This code is used in §3.1. §2.2. §3.2. This code is used in §2. This code is used in §3. §2.2.1. §1.5. This code is used in §2.2. §1.6. This code is used in §1. The function Inter::Transmigration::correct_origin is used in §1.6. The function Inter::Transmigration::correct_origin is used in §1.5. §3.1. §4.1. This code is used in §3. §3.1.1. This code is used in §3.1. This code is used in §4. The function Inter::Defn::verify_construct is used in 2/trn (§2.1.1), 3/iibf (§1.6), 4/tnc (§1), 4/tcc (§1), 4/tmc (§2), 4/tvc (§2), 4/tpc (§2), 4/tlc (§2), 4/tac (§2), 4/tpc2 (§2), 4/tpc3 (§2), 4/tkc (§2), 4/tdc (§2), 4/tvc2 (§2), 4/tcc2 (§2), 4/trc (§2), 4/tic (§2), 4/tpc4 (§2), 4/tpc5 (§2), 4/tpc6 (§2), 4/tpc7 (§2), 5/tlc (§2), 5/tlc2 (§2), 5/tic (§2), 5/trc (§2), 5/tvc (§2), 5/tlc3 (§2), 5/tcc (§2), 5/tec (§2), 5/trc2 (§2), 5/tcc2 (§2), 5/tsc (§2). The function Inter::Defn::verify_construct is used in 2/trn (§3.1.1), 3/iibf (§1.6), 4/tnc (§1), 4/tcc (§1), 4/tmc (§2), 4/tvc (§2), 4/tpc (§2), 4/tlc (§2), 4/tac (§2), 4/tpc2 (§2), 4/tpc3 (§2), 4/tkc (§2), 4/tdc (§2), 4/tvc2 (§2), 4/tcc2 (§2), 4/trc (§2), 4/tic (§2), 4/tpc4 (§2), 4/tpc5 (§2), 4/tpc6 (§2), 4/tpc7 (§2), 5/tlc (§2), 5/tlc2 (§2), 5/tic (§2), 5/trc (§2), 5/tvc (§2), 5/tlc3 (§2), 5/tcc (§2), 5/tec (§2), 5/trc2 (§2), 5/tcc2 (§2), 5/tsc (§2). The function Inter::Defn::transpose_construct is used in 3/iibf (§1.6). The function Inter::Errors::plain is used in 3/dfn (§3, §4), 3/iibf (§3), 4/tcc (§1), 4/tsc (§1), 4/tvc (§2), 4/tpc (§2), 4/tlc (§2), 4/tac (§2), 4/tpc2 (§2), 4/tkc (§2), 4/tcc2 (§2), 4/trc (§2), 4/tic (§2), 4/tpc5 (§2), 4/tpc6 (§2), 4/tpc7 (§2), 5/tlc (§2), 5/tlc2 (§2), 5/tic (§2), 5/trc (§2), 5/tvc (§2), 5/tlc3 (§2), 5/tcc (§2), 5/tec (§2), 5/trc2 (§2), 5/tcc2 (§2), 5/tsc (§2). The function Inter::Errors::issue is used in 2/st (§10), 2/trn (§2.1.1), 3/iibf (§1.6, §3), 3/iitf (§1, §2). The function Inter::Errors::issue is used in 2/st (§10), 2/trn (§3.1.1), 3/iibf (§1.6, §3), 3/iitf (§1, §2). The function Inter::Errors::issue_to appears nowhere else. The function Inter::Package::which appears nowhere else. The function Inter::Package::defined_by_frame is used in 2/bkm (§1), 2/st (§10), 2/pck (§3), 2/trn (§2, §3). The function Inter::Package::defined_by_frame is used in 2/bkm (§1), 2/st (§10), 2/pck (§3), 2/trn (§3, §4). The function Inter::Package::type is used in 2/pck (§3). The function main is used in 2/pck (§3), 1/ppl (§5), 2/res (§1), 4/fc (§1). The function main is used in 2/pck (§3), 2/cnn (§1), 1/ppl (§5), 2/res (§1), 4/fc (§1).
-<Correct any references from the migrant to the origin 1.5> =
+
+<Initialise the IPCT state .1> =
ipct_cache_count++;
- ipct_state ipct;
ipct.migrant = migrant;
ipct.destination = destination;
- ipct.links = NULL;
- ipct.origin_globals = Inter::Tree::global_scope(migrant->package_head->tree);
- ipct.destination_globals = Inter::Tree::global_scope(destination->package_head->tree);
- ipct.linkage_point = &linkage_point;
+ ipct.origin_tree = origin_tree;
+ ipct.destination_tree = destination_tree;
ipct.primitives_point = &primitives_point;
+
+
+
+
+
+<Correct any references from the migrant to the origin 1.4> =
+
+ ipct_state ipct;
+ <Initialise the IPCT state .1>;
Inter::Tree::traverse(destination->package_head->tree,
Inter::Transmigration::correct_migrant, &ipct, migrant, 0);
@@ -147,7 +157,7 @@
@@ -156,8 +166,8 @@
P->tree = I;
if ((P->W.data[ID_IFLD] == INV_IST) && (P->W.data[METHOD_INV_IFLD] == INVOKED_PRIMITIVE)) {
inter_symbol *primitive =
- Inter::SymbolsTables::symbol_from_id(ipct->origin_globals, P->W.data[INVOKEE_INV_IFLD]);
- if (primitive) <Correct the reference to this primitive 2.1>;
+ Inter::SymbolsTables::symbol_from_id(Inter::Tree::global_scope(ipct->origin_tree), P->W.data[INVOKEE_INV_IFLD]);
+ if (primitive) <Correct the reference to this primitive 3.1>;
}
if (P->W.data[ID_IFLD] == PACKAGE_IST) {
inter_package *pack = Inter::Package::defined_by_frame(P);
@@ -175,7 +185,7 @@
target_package = Inter::Packages::parent(target_package);
}
if (target_package != ipct->migrant)
- <Correct the reference to this symbol 2.2>;
+ <Correct the reference to this symbol 3.2>;
}
}
}
@@ -184,36 +194,36 @@
-
-<Correct the reference to this primitive 2.1> =
+
+<Correct the reference to this primitive 3.1> =
inter_symbol *equivalent_primitive = Inter::Transmigration::cached_equivalent(primitive);
if (equivalent_primitive == NULL) {
- equivalent_primitive = Inter::SymbolsTables::symbol_from_name(ipct->destination_globals, primitive->symbol_name);
- if (equivalent_primitive == NULL) <Duplicate this primitive 2.1.1>;
+ equivalent_primitive = Inter::SymbolsTables::symbol_from_name(Inter::Tree::global_scope(ipct->destination_tree), primitive->symbol_name);
+ if (equivalent_primitive == NULL) <Duplicate this primitive 3.1.1>;
if (equivalent_primitive) Inter::Transmigration::cache(primitive, equivalent_primitive);
}
if (equivalent_primitive)
- P->W.data[INVOKEE_INV_IFLD] = Inter::SymbolsTables::id_from_symbol_inner(ipct->destination_globals, NULL, equivalent_primitive);
+ P->W.data[INVOKEE_INV_IFLD] = Inter::SymbolsTables::id_from_symbol_inner(Inter::Tree::global_scope(ipct->destination_tree), NULL, equivalent_primitive);
-
-<Duplicate this primitive 2.1.1> =
+
+<Duplicate this primitive 3.1.1> =
- equivalent_primitive = Inter::SymbolsTables::symbol_from_name_creating(ipct->destination_globals, primitive->symbol_name);
- inter_tree_node *D = Inter::Node::fill_1(ipct->primitives_point, PRIMITIVE_IST, Inter::SymbolsTables::id_from_symbol_inner(ipct->destination_globals, NULL, equivalent_primitive), NULL, 0);
+ equivalent_primitive = Inter::SymbolsTables::symbol_from_name_creating(Inter::Tree::global_scope(ipct->destination_tree), primitive->symbol_name);
+ inter_tree_node *D = Inter::Node::fill_1(ipct->primitives_point, PRIMITIVE_IST, Inter::SymbolsTables::id_from_symbol_inner(Inter::Tree::global_scope(ipct->destination_tree), NULL, equivalent_primitive), NULL, 0);
inter_tree_node *old_D = primitive->definition;
for (int i=CAT_PRIM_IFLD; i<old_D->W.extent; i++) {
if (Inter::Node::extend(D, (inter_t) 1) == FALSE) internal_error("can't extend");
@@ -230,10 +240,10 @@
-
-<Correct the reference to this symbol 2.2> =
+
+<Correct the reference to this symbol 3.2> =
-<Create a link symbol to represent the unavailability of this symbol 2.2.1> =
+
+<Correct any references from the origin to the migrant 1.5> =
- equivalent = Inter::Connectors::plug(ipct->linkage_point, target->symbol_name, URL, &(ipct->links));
-
-
-
-
-
-<Correct any references from the origin to the migrant 1.6> =
-
- ipct_cache_count++;
ipct_state ipct;
- ipct.migrant = migrant;
- ipct.destination = destination;
- ipct.links = NULL;
- ipct.origin_globals = NULL;
- ipct.destination_globals = NULL;
- ipct.linkage_point = &deletion_point;
- ipct.primitives_point = NULL;
+ <Initialise the IPCT state .1>;
Inter::Tree::traverse(origin->package_head->tree,
Inter::Transmigration::correct_origin, &ipct, NULL, 0);
@@ -291,7 +281,7 @@
@@ -313,7 +303,7 @@
target_package = Inter::Packages::parent(target_package);
}
if (target_package == ipct->migrant)
- <Correct the origin reference to this migrant symbol 3.1>;
+ <Correct the origin reference to this migrant symbol 4.1>;
}
}
}
@@ -322,17 +312,20 @@
-
-<Correct the origin reference to this migrant symbol 3.1> =
+
+<Correct the origin reference to this migrant symbol 4.1> =
inter_symbol *equivalent = Inter::Transmigration::cached_equivalent(target);
if (equivalent == NULL) {
- <Create a link symbol in the origin 3.1.1>;
+ TEMPORARY_TEXT(URL);
+ Inter::SymbolsTables::symbol_to_url_name(URL, target);
+ equivalent = Inter::Connectors::plug(ipct->origin_tree, target->symbol_name, URL);
+ DISCARD_TEXT(URL);
Inter::Transmigration::cache(target, equivalent);
}
symb->equated_to = equivalent;
@@ -340,23 +333,7 @@
-
-<Create a link symbol in the origin 3.1.1> =
-
- TEMPORARY_TEXT(URL);
- Inter::SymbolsTables::symbol_to_url_name(URL, target);
- equivalent = Inter::Connectors::plug(ipct->linkage_point, target->symbol_name, URL, &(ipct->links));
- DISCARD_TEXT(URL);
-
-
-
-
-
diff --git a/docs/inter-module/3-dfn.html b/docs/inter-module/3-dfn.html
index 27c3f6ea8..b0f424d75 100644
--- a/docs/inter-module/3-dfn.html
+++ b/docs/inter-module/3-dfn.html
@@ -376,7 +376,7 @@
-