diff --git a/docs/codegen-module/1-stg.html b/docs/codegen-module/1-stg.html index 066ad859d..7d60c6aa2 100644 --- a/docs/codegen-module/1-stg.html +++ b/docs/codegen-module/1-stg.html @@ -118,8 +118,7 @@ the pipeline: } Regexp::dispose_of(&mr); if (pack == NULL) internal_error("not a package"); - - if (trace_bin) WRITE_TO(STDOUT, "Move %S\n", Inter::Packages::name(pack)); + Inter::Transmigration::move(pack, Inter::Tree::main_package(step->repository), TRUE); return TRUE; } diff --git a/docs/codegen-module/2-alm.html b/docs/codegen-module/2-alm.html index f484d53d9..ac3656673 100644 --- a/docs/codegen-module/2-alm.html +++ b/docs/codegen-module/2-alm.html @@ -55,13 +55,13 @@ if (submodule_ptype_symbol) { inter_package *t_p = Inter::Packages::by_name(template_package, name); if (t_p == NULL) { - inter_bookmark IBM = Inter::Bookmarks::after_this_frame(I, P); + inter_bookmark IBM = Inter::Bookmarks::after_this_node(I, P); t_p = CodeGen::Assimilate::new_package_named(&IBM, name, submodule_ptype_symbol); } if (t_p == NULL) internal_error("failed to define"); return Inter::Bookmarks::at_end_of_this_package(t_p); } - return Inter::Bookmarks::after_this_frame(I, P); + return Inter::Bookmarks::after_this_node(I, P); } void CodeGen::Assimilate::visitor1(inter_tree *I, inter_tree_node *P, void *state) { @@ -191,7 +191,7 @@
-            inter_bookmark IBM_d = Inter::Bookmarks::after_this_frame(I, P);
+            inter_bookmark IBM_d = Inter::Bookmarks::after_this_node(I, P);
             inter_bookmark *IBM = &IBM_d;
 
             text_stream *submodule_name = NULL;
@@ -547,7 +547,7 @@
 
             *IBM = outer_save;
 
-            inter_bookmark T_IBM = Inter::Bookmarks::after_this_frame(I, P);
+            inter_bookmark T_IBM = Inter::Bookmarks::after_this_node(I, P);
             inter_symbol *alias_name = Inter::SymbolsTables::create_with_unique_name(Inter::Bookmarks::scope(&T_IBM), identifier);
             Inter::SymbolsTables::equate(alias_name, rsymb);
             Inter::Symbols::set_flag(alias_name, ALIAS_ONLY_BIT);
diff --git a/docs/inter-module/2-ann.html b/docs/inter-module/2-ann.html
index f565eed46..39f050e02 100644
--- a/docs/inter-module/2-ann.html
+++ b/docs/inter-module/2-ann.html
@@ -188,7 +188,7 @@
 

The function Inter::Annotations::to_bytecode appears nowhere else.


-
+
diff --git a/docs/inter-module/2-bkm.html b/docs/inter-module/2-bkm.html index e6cc72fc4..9b8a1a6d3 100644 --- a/docs/inter-module/2-bkm.html +++ b/docs/inter-module/2-bkm.html @@ -44,7 +44,7 @@ return IBM; } - inter_bookmark Inter::Bookmarks::after_this_frame(inter_tree *I, inter_tree_node *D) { + inter_bookmark Inter::Bookmarks::after_this_node(inter_tree *I, inter_tree_node *D) { if (D == NULL) internal_error("invalid frame supplied"); inter_bookmark IBM; IBM.R = D; @@ -193,15 +193,15 @@

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 appears nowhere else.

+

The function Inter::Bookmarks::at_end_of_this_package is used in 2/trn (§1.1).

-

The function Inter::Bookmarks::after_this_frame appears nowhere else.

+

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), 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 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).

+

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).

The function Inter::Bookmarks::get_placement appears nowhere else.

@@ -213,15 +213,15 @@

The function Inter::Bookmarks::snapshot appears nowhere else.

-

The function Inter::Bookmarks::baseline is used in 3/dfn (§4).

+

The function Inter::Bookmarks::baseline is used in 2/trn (§3.1.1), 3/dfn (§4).

The function Inter::Bookmarks::log is used in 1/im (§3.6).

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), 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, §2.1.1, §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 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, §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 structure inter_bookmark is private to this section.

diff --git a/docs/inter-module/2-in.html b/docs/inter-module/2-in.html index fa6fa9579..4415c1ae1 100644 --- a/docs/inter-module/2-in.html +++ b/docs/inter-module/2-in.html @@ -51,7 +51,7 @@

The function Inter::Node::new is used in 2/tw (§3).

-

The structure inter_tree_node is accessed in 2/it, 2/bkm, 2/st, 2/pck, 2/sym, 3/dfn, 3/iibf, 3/iitf, 3/vi, 3/idt, 4/tmc, 4/tvc, 4/tpc, 4/tlc, 4/tac, 4/tpc2, 4/tpc3, 4/tkc, 4/tdc, 4/tvc2, 4/tcc2, 4/trc, 4/tic, 4/tpc4, 4/tpc5, 4/tpc6, 4/tpc7, 5/tlc, 5/tlc2, 5/tic, 5/trc, 5/tvc, 5/tlc3, 5/tcc, 5/tec, 5/trc2, 5/tcc2, 5/tsc and here.

+

The structure inter_tree_node is accessed in 2/it, 2/bkm, 2/st, 2/pck, 2/sym, 2/trn, 3/dfn, 3/iibf, 3/iitf, 3/vi, 3/idt, 4/tmc, 4/tvc, 4/tpc, 4/tlc, 4/tac, 4/tpc2, 4/tpc3, 4/tkc, 4/tdc, 4/tvc2, 4/tcc2, 4/trc, 4/tic, 4/tpc4, 4/tpc5, 4/tpc6, 4/tpc7, 5/tlc, 5/tlc2, 5/tic, 5/trc, 5/tvc, 5/tlc3, 5/tcc, 5/tec, 5/trc2, 5/tcc2, 5/tsc and here.

§2. Chunks.

@@ -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 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 (§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_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 4/tkc (§2), 4/tcc2 (§2), 4/tpc7 (§2).

+

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::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 ea58e23ff..797564057 100644 --- a/docs/inter-module/2-it.html +++ b/docs/inter-module/2-it.html @@ -26,7 +26,7 @@

-

The structure inter_tree is accessed in 2/bkm, 2/st, 2/pck, 3/iibf and here.

+

The structure inter_tree is accessed in 2/bkm, 2/st, 2/pck, 2/trn, 3/iibf and here.

§2.

@@ -165,7 +165,7 @@

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), 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 (§1.5), 3/iibf (§1.4), 4/tpc3 (§2), 5/tic (§2).

The function Inter::Tree::previous is used in §3.1, §3.5.

@@ -433,7 +433,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), 3/iibf (§1.1.5), 3/iitf (§1, §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_r appears nowhere else.

diff --git a/docs/inter-module/2-pck.html b/docs/inter-module/2-pck.html index 5fefabdb7..72e4a1952 100644 --- a/docs/inter-module/2-pck.html +++ b/docs/inter-module/2-pck.html @@ -30,7 +30,7 @@

-

The structure inter_package is accessed in 2/it, 3/iibf, 4/tpc3, 4/tcc2 and here.

+

The structure inter_package is accessed in 2/it, 2/trn, 3/iibf, 4/tpc3, 4/tcc2 and here.

§2.

@@ -132,18 +132,30 @@ } void Inter::Packages::set_name(inter_package *Q, inter_package *P, text_stream *N) { - if (Q == NULL) internal_error("no parent supplied"); if (P == NULL) internal_error("null package"); if (N == NULL) internal_error("null package name"); P->package_name_t = Str::duplicate(N); if ((N) && (Str::eq(P->package_name_t, I"main"))) Inter::Tree::set_main_package(Inter::Packages::tree(P), P); - if (Str::len(N) > 0) { - dict_entry *de = Dictionaries::find(Q->name_lookup, N); - if (de) internal_error("duplicated package name"); - Dictionaries::create(Q->name_lookup, N); - Dictionaries::write_value(Q->name_lookup, N, (void *) P); + if (Str::len(N) > 0) Inter::Packages::add_subpackage_name(Q, P); + } + + void Inter::Packages::add_subpackage_name(inter_package *Q, inter_package *P) { + if (Q == NULL) internal_error("no parent supplied"); + text_stream *N = P->package_name_t; + dict_entry *de = Dictionaries::find(Q->name_lookup, N); + if (de) internal_error("duplicated package name"); + Dictionaries::create(Q->name_lookup, N); + Dictionaries::write_value(Q->name_lookup, N, (void *) P); + } + + void Inter::Packages::remove_subpackage_name(inter_package *Q, inter_package *P) { + if (Q == NULL) internal_error("no parent supplied"); + text_stream *N = P->package_name_t; + dict_entry *de = Dictionaries::find(Q->name_lookup, N); + if (de) { + Dictionaries::write_value(Q->name_lookup, N, NULL); } } @@ -306,21 +318,21 @@

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::name is used in 2/st (§11), 3/dfn (§4), 4/tpc3 (§2), 4/tcc2 (§2).

+

The function Inter::Packages::name is used in 2/st (§11), 2/trn (§1.2), 3/dfn (§4), 4/tpc3 (§2), 4/tcc2 (§2).

The function Inter::Packages::is_codelike is used in 3/dfn (§4), 3/iibf (§1.1.3.3).

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/st (§10), 4/tsc (§1).

+

The function Inter::Packages::is_linklike is used in 2/st (§10), 2/trn (§2, §3), 4/tsc (§1).

-

The function Inter::Packages::make_linklike is used in 4/tpc3 (§2).

+

The function Inter::Packages::make_linklike is used in 2/trn (§2.2.1, §3.1.1), 4/tpc3 (§2).

The function Inter::Packages::is_rootlike is used in 3/dfn (§4), 3/iibf (§1.1.3.3).

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), 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, §2, §3), 3/dfn (§4), 3/iibf (§1.1.3.3).

The function Inter::Packages::unmark_all appears nowhere else.

@@ -328,6 +340,10 @@

The function Inter::Packages::set_name is used in 3/iibf (§1.4.3), 4/tpc3 (§2).

+

The function Inter::Packages::add_subpackage_name is used in 2/trn (§1.3).

+ +

The function Inter::Packages::remove_subpackage_name is used in 2/trn (§1.3).

+

The function Inter::Packages::log is used in 1/im (§3.6).

The function Inter::Packages::basics is used in 2/st (§4).

@@ -346,13 +362,13 @@

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), 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/trn (§2, §2.2.1, §3, §3.1.1), 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).

The function Inter::Packages::type appears nowhere else.

-

The function Inter::Packages::baseline is used in 2/bkm (§1).

+

The function Inter::Packages::baseline is used in 2/bkm (§1), 2/trn (§1.2, §2.2.1).

The function Inter::Packages::read_metadata appears nowhere else.

@@ -364,7 +380,7 @@

The function Inter::Packages::clear_flag appears nowhere else.

-

The function Inter::Packages::by_name is used in 2/st (§11), 4/tpc3 (§2), 4/tcc2 (§2).

+

The function Inter::Packages::by_name is used in 2/st (§11), 2/trn (§2.2.1, §3.1.1), 4/tpc3 (§2), 4/tcc2 (§2).

The function Inter::Packages::by_url appears nowhere else.

diff --git a/docs/inter-module/2-st.html b/docs/inter-module/2-st.html index 07e0dc965..d6a371d8e 100644 --- a/docs/inter-module/2-st.html +++ b/docs/inter-module/2-st.html @@ -30,7 +30,7 @@

-

The structure inter_symbols_table is accessed in 2/in, 2/tw, 2/pck, 2/sym, 3/iibf and here.

+

The structure inter_symbols_table is accessed in 2/in, 2/tw, 2/pck, 2/sym, 2/trn, 3/iibf and here.

§2.

@@ -223,11 +223,11 @@

-

The function Inter::SymbolsTables::symbol_from_name is used in §5, §11, 2/pck (§3), 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 (§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_not_equating appears nowhere else.

-

The function Inter::SymbolsTables::symbol_from_name_creating is used in §5, 3/iitf (§1).

+

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_at_ID is used in 3/iibf (§1.4.2).

@@ -269,7 +269,7 @@

The function Inter::SymbolsTables::render_identifier_unique is used in §9.

-

The function Inter::SymbolsTables::create_with_unique_name appears nowhere else.

+

The function Inter::SymbolsTables::create_with_unique_name is used in 2/trn (§2.2.1, §3.1.1).

§6. From symbol to ID. Symbols are represented in Inter bytecode by their ID numbers, but these only make sense in the context of a symbols table: i.e., the same ID can have @@ -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), 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 (§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).

§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 appears nowhere else.

+

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 is used in 2/sym (§3), 4/tpc3 (§2), 5/tic (§2).

@@ -503,7 +503,7 @@ a global symbol in any non-global context.

The function Inter::SymbolsTables::equate_textual is used in 4/tsc (§1).

-

The function Inter::SymbolsTables::link is used in 4/tsc (§1).

+

The function Inter::SymbolsTables::link is used in 2/trn (§2.2.1, §3.1.1), 4/tsc (§1).

The function Inter::SymbolsTables::resolve_forward_references is used in 3/iitf (§1).

@@ -560,9 +560,9 @@ a global symbol in any non-global context.

-

The function Inter::SymbolsTables::url_name_to_symbol is used in §10, 4/tsc (§1).

+

The function Inter::SymbolsTables::url_name_to_symbol is used in §10, 2/trn (§2.2, §2.2.1, §3.1.1), 4/tsc (§1).

-

The function Inter::SymbolsTables::symbol_to_url_name is used in 2/sym (§2, §4).

+

The function Inter::SymbolsTables::symbol_to_url_name is used in 2/sym (§2, §4), 2/trn (§2.2, §3.1.1).



diff --git a/docs/inter-module/2-sym.html b/docs/inter-module/2-sym.html index e350063ec..ab3d75e3c 100644 --- a/docs/inter-module/2-sym.html +++ b/docs/inter-module/2-sym.html @@ -27,12 +27,14 @@ int symbol_status; struct inter_annotation_set ann_set; struct text_stream *translate_text; + int link_time; + struct inter_symbol *linked_to; } inter_symbol;

-

The structure inter_symbol is accessed in 2/st, 3/iibf, 3/iitf, 3/vi, 3/idt, 4/tmc, 4/tpc, 4/tac, 4/tpc2, 4/tpc3, 4/tkc, 4/tdc, 4/tvc2, 4/tcc2, 4/trc, 4/tic, 4/tpc4, 4/tpc5, 4/tpc6, 4/tpc7, 5/tlc, 5/tlc2, 5/tic, 5/trc, 5/tvc, 5/tlc3, 5/tcc2 and here.

+

The structure inter_symbol is accessed in 2/st, 2/trn, 3/iibf, 3/iitf, 3/vi, 3/idt, 4/tmc, 4/tpc, 4/tac, 4/tpc2, 4/tpc3, 4/tkc, 4/tdc, 4/tvc2, 4/tcc2, 4/trc, 4/tic, 4/tpc4, 4/tpc5, 4/tpc6, 4/tpc7, 5/tlc, 5/tlc2, 5/tic, 5/trc, 5/tvc, 5/tlc3, 5/tcc2 and here.

§2.

@@ -53,6 +55,8 @@ symb->equated_to = NULL; symb->equated_name = NULL; symb->translate_text = NULL; + symb->link_time = 0; + symb->linked_to = NULL; LOGIF(INTER_SYMBOLS, "Created symbol $3 in $4\n", symb, T); return symb; diff --git a/docs/inter-module/2-trn.html b/docs/inter-module/2-trn.html new file mode 100644 index 000000000..0c68009a3 --- /dev/null +++ b/docs/inter-module/2-trn.html @@ -0,0 +1,386 @@ + + + + 2/ann + + + + + + + +

To move packages between repositories.

+ +

§1.

+ + +
+    int ipct_cache_count = 0;
+    void Inter::Transmigration::cache(inter_symbol *S, inter_symbol *V) {
+        S->linked_to = V;
+        S->link_time = ipct_cache_count;
+    }
+
+    inter_symbol *Inter::Transmigration::cached_equivalent(inter_symbol *S) {
+        if (S->link_time == ipct_cache_count) return S->linked_to;
+        return NULL;
+    }
+
+    void Inter::Transmigration::move(inter_package *migrant, inter_package *destination, int tidy_origin) {
+        LOG("Move $5 to $5\n", migrant, destination);
+        inter_package *origin = Inter::Packages::parent(migrant);
+        inter_bookmark deletion_point, insertion_point, linkage_point, primitives_point;
+        <Create these bookmarks 1.1>;
+        <Mark the insertion and deletion points with comments 1.2>;
+        <Physically move the subtree to its new home 1.3>;
+        <Correct any references from the migrant to the origin 1.5>;
+        if (tidy_origin) <Correct any references from the origin to the migrant 1.6>;
+    }
+
+ +

+ +

The function Inter::Transmigration::cache is used in §2.1, §2.2, §3.1.

+ +

The function Inter::Transmigration::cached_equivalent is used in §2.1, §2.2, §3.1.

+ +

The function Inter::Transmigration::move appears nowhere else.

+ +

§1.1. +<Create these bookmarks 1.1> = +

+ + +
+        deletion_point =
+            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)
+                prims = F;
+        if (prims == NULL) internal_error("dest has no prims");
+        primitives_point = Inter::Bookmarks::after_this_node(destination->package_head->tree, prims);
+
+ +

+ +

This code is used in §1.

+ +

§1.2. +<Mark the insertion and deletion points with comments 1.2> = +

+ + +
+        inter_t C1 = Inter::Warehouse::create_text(Inter::Bookmarks::warehouse(&deletion_point), Inter::Bookmarks::package(&deletion_point));
+        WRITE_TO(Inter::Warehouse::get_text(Inter::Bookmarks::warehouse(&deletion_point), C1),
+            "Exported %S here", Inter::Packages::name(migrant));
+        Inter::Comment::new(&deletion_point, (inter_t) Inter::Packages::baseline(migrant), NULL, C1);
+
+        inter_t C2 = Inter::Warehouse::create_text(Inter::Bookmarks::warehouse(&insertion_point), Inter::Bookmarks::package(&insertion_point));
+        WRITE_TO(Inter::Warehouse::get_text(Inter::Bookmarks::warehouse(&insertion_point), C2),
+            "Imported %S here", Inter::Packages::name(migrant));
+        Inter::Comment::new(&insertion_point, (inter_t) Inter::Packages::baseline(destination) + 1, NULL, C2);
+
+ +

+ +

This code is used in §1.

+ +

§1.3. +<Physically move the subtree to its new home 1.3> = +

+ + +
+        Inter::Packages::remove_subpackage_name(Inter::Packages::parent(migrant), migrant);
+        Inter::Packages::add_subpackage_name(destination, migrant);
+        Inter::Bookmarks::insert(&insertion_point, migrant->package_head);
+
+ +

+ +

This code is used in §1.

+ +

§1.4.

+ + +
+    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;
+    } ipct_state;
+
+ +

+ +

The structure ipct_state is private to this section.

+ +

§1.5. +<Correct any references from the migrant to the origin 1.5> = +

+ + +
+        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.primitives_point = &primitives_point;
+        Inter::Tree::traverse(destination->package_head->tree,
+            Inter::Transmigration::correct_migrant, &ipct, migrant, 0);
+
+ +

+ +

This code is used in §1.

+ +

§2.

+ + +
+    void Inter::Transmigration::correct_migrant(inter_tree *I, inter_tree_node *P, void *state) {
+        ipct_state *ipct = (ipct_state *) state;
+        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>;
+        }
+        if (P->W.data[ID_IFLD] == PACKAGE_IST) {
+            inter_package *pack = Inter::Package::defined_by_frame(P);
+            if (pack == NULL) internal_error("no package defined here");
+            if (Inter::Packages::is_linklike(pack)) return;
+            inter_symbols_table *T = Inter::Packages::scope(pack);
+            if (T == NULL) internal_error("package with no symbols");
+            for (int i=0; i<T->size; i++) {
+                inter_symbol *symb = T->symbol_array[i];
+                if ((symb) && (symb->equated_to)) {
+                    inter_symbol *target = symb->equated_to;
+                    while (target->equated_to) target = target->equated_to;
+                    inter_package *target_package = target->owning_table->owning_package;
+                    while ((target_package) && (target_package != ipct->migrant)) {
+                        target_package = Inter::Packages::parent(target_package);
+                    }
+                    if (target_package != ipct->migrant)
+                        <Correct the reference to this symbol 2.2>;
+                }
+            }
+        }
+    }
+
+ +

+ +

The function Inter::Transmigration::correct_migrant is used in §1.5.

+ +

§2.1. +<Correct the reference to this primitive 2.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>;
+            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);
+
+ +

+ +

This code is used in §2.

+ +

§2.1.1. +<Duplicate this primitive 2.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);
+        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");
+            D->W.data[i] = old_D->W.data[i];
+        }
+        inter_error_message *E = Inter::Defn::verify_construct(Inter::Bookmarks::package(ipct->primitives_point), D);
+        if (E) {
+            Inter::Errors::issue(E);
+            equivalent_primitive = NULL;
+        } else {
+            Inter::Bookmarks::insert(ipct->primitives_point, D);
+        }
+
+ +

+ +

This code is used in §2.1.

+ +

§2.2. +<Correct the reference to this symbol 2.2> = +

+ + +
+        inter_symbol *equivalent = Inter::Transmigration::cached_equivalent(target);
+        if (equivalent == NULL) {
+            TEMPORARY_TEXT(URL);
+            Inter::SymbolsTables::symbol_to_url_name(URL, target);
+            equivalent = Inter::SymbolsTables::url_name_to_symbol(ipct->destination->package_head->tree, NULL, URL);
+            if (equivalent == NULL)
+                <Create a link symbol to represent the unavailability of this symbol 2.2.1>;
+            DISCARD_TEXT(URL);
+            Inter::Transmigration::cache(target, equivalent);
+        }
+        symb->equated_to = equivalent;
+
+ +

+ +

This code is used in §2.

+ +

§2.2.1. +<Create a link symbol to represent the unavailability of this symbol 2.2.1> = +

+ + +
+        if (ipct->links == NULL)
+            ipct->links = Inter::Packages::by_name(ipct->migrant, I"links");
+        if (ipct->links == NULL) {
+            inter_symbol *linkage = Inter::SymbolsTables::url_name_to_symbol(I, NULL, I"/_linkage");
+            if (linkage == NULL) internal_error("no linkage ptype");
+            Inter::Package::new_package(ipct->linkage_point, I"links", linkage, (inter_t) Inter::Packages::baseline(ipct->migrant) + 1, NULL, &(ipct->links));
+        }
+        if (ipct->links == NULL) internal_error("couldn't create links");
+        Inter::Packages::make_linklike(ipct->links);
+        equivalent = Inter::SymbolsTables::create_with_unique_name(Inter::Packages::scope(ipct->links), target->symbol_name);
+        Inter::SymbolsTables::link(equivalent, URL);
+
+ +

+ +

This code is used in §2.2.

+ +

§1.6. +<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;
+        Inter::Tree::traverse(origin->package_head->tree,
+            Inter::Transmigration::correct_origin, &ipct, NULL, 0);
+
+ +

+ +

This code is used in §1.

+ +

§3.

+ + +
+    void Inter::Transmigration::correct_origin(inter_tree *I, inter_tree_node *P, void *state) {
+        ipct_state *ipct = (ipct_state *) state;
+        if (P->W.data[ID_IFLD] == PACKAGE_IST) {
+            inter_package *pack = Inter::Package::defined_by_frame(P);
+            if (pack == NULL) internal_error("no package defined here");
+            if (Inter::Packages::is_linklike(pack)) return;
+            inter_symbols_table *T = Inter::Packages::scope(pack);
+            if (T == NULL) internal_error("package with no symbols");
+            for (int i=0; i<T->size; i++) {
+                inter_symbol *symb = T->symbol_array[i];
+                if ((symb) && (symb->equated_to)) {
+                    inter_symbol *target = symb->equated_to;
+                    while (target->equated_to) target = target->equated_to;
+                    inter_package *target_package = target->owning_table->owning_package;
+                    while ((target_package) && (target_package != ipct->migrant)) {
+                        target_package = Inter::Packages::parent(target_package);
+                    }
+                    if (target_package == ipct->migrant)
+                        <Correct the origin reference to this migrant symbol 3.1>;
+                }
+            }
+        }
+    }
+
+ +

+ +

The function Inter::Transmigration::correct_origin is used in §1.6.

+ +

§3.1. +<Correct the origin reference to this migrant symbol 3.1> = +

+ + +
+        inter_symbol *equivalent = Inter::Transmigration::cached_equivalent(target);
+        if (equivalent == NULL) {
+            <Create a link symbol in the origin 3.1.1>;
+            Inter::Transmigration::cache(target, equivalent);
+        }
+        symb->equated_to = equivalent;
+
+ +

+ +

This code is used in §3.

+ +

§3.1.1. +<Create a link symbol in the origin 3.1.1> = +

+ + +
+        if (ipct->links == NULL)
+            ipct->links = Inter::Packages::by_name(Inter::Bookmarks::package(ipct->linkage_point), I"links");
+        if (ipct->links == NULL) {
+            inter_symbol *linkage = Inter::SymbolsTables::url_name_to_symbol(I, NULL, I"/_linkage");
+            if (linkage == NULL) internal_error("no linkage ptype");
+            Inter::Package::new_package(ipct->linkage_point, I"links", linkage, (inter_t) Inter::Bookmarks::baseline(ipct->linkage_point)+1, NULL, &(ipct->links));
+        }
+        if (ipct->links == NULL) internal_error("couldn't create links");
+        Inter::Packages::make_linklike(ipct->links);
+        equivalent = Inter::SymbolsTables::create_with_unique_name(Inter::Packages::scope(ipct->links), target->symbol_name);
+        TEMPORARY_TEXT(URL);
+        Inter::SymbolsTables::symbol_to_url_name(URL, target);
+        Inter::SymbolsTables::link(equivalent, URL);
+        DISCARD_TEXT(URL);
+
+ +

+ +

This code is used in §3.1.

+ +
+
+ + + + diff --git a/docs/inter-module/2-tw.html b/docs/inter-module/2-tw.html index 13c231adc..7e7547879 100644 --- a/docs/inter-module/2-tw.html +++ b/docs/inter-module/2-tw.html @@ -27,7 +27,7 @@

-

The structure inter_warehouse is accessed in 2/in, 2/st, 3/iibf and here.

+

The structure inter_warehouse is accessed in 2/in, 2/st, 2/trn, 3/iibf and here.

§2.

@@ -65,9 +65,9 @@

-

The structure inter_resource_holder is accessed in 2/st, 2/pck, 3/iibf and here.

+

The structure inter_resource_holder is accessed in 2/st, 2/pck, 2/trn, 3/iibf and here.

-

The structure inter_warehouse_room is accessed in 2/in, 2/st, 3/iibf and here.

+

The structure inter_warehouse_room is accessed in 2/in, 2/st, 2/trn, 3/iibf and here.

§3.

@@ -327,9 +327,9 @@

The function Inter::Warehouse::attribute_resource is used in 2/it (§2), 4/tpc3 (§2), 4/tkc (§2), 4/tic (§2), 4/tpc4 (§2).

-

The function Inter::Warehouse::get_text is used in 2/in (§3), 2/pck (§3), 2/sym (§4), 3/dfn (§3, §4), 3/idt (§3), 4/tmc (§2), 4/tpc (§2), 4/tlc (§2), 4/tac (§2), 4/tcc2 (§2), 5/tsc (§2).

+

The function Inter::Warehouse::get_text is used in 2/in (§3), 2/pck (§3), 2/sym (§4), 2/trn (§1.2), 3/dfn (§3, §4), 3/idt (§3), 4/tmc (§2), 4/tpc (§2), 4/tlc (§2), 4/tac (§2), 4/tcc2 (§2), 5/tsc (§2).

-

The function Inter::Warehouse::create_text is used in 2/sym (§4), 3/dfn (§3, §4), 3/idt (§3), 4/tmc (§2), 4/tpc (§2), 4/tlc (§2), 4/tac (§2), 4/tcc2 (§2), 5/tsc (§2).

+

The function Inter::Warehouse::create_text is used in 2/sym (§4), 2/trn (§1.2), 3/dfn (§3, §4), 3/idt (§3), 4/tmc (§2), 4/tpc (§2), 4/tlc (§2), 4/tac (§2), 4/tcc2 (§2), 5/tsc (§2).

The function Inter::Warehouse::get_package is used in 2/it (§2), 2/in (§3), 3/iibf (§1.4.3, §1.6), 4/tpc3 (§2).

@@ -345,7 +345,7 @@

The function Inter::Warehouse::set_ref appears nowhere else.

-

The structure warehouse_floor_space is accessed in 2/it, 2/bkm, 2/in, 2/st, 2/pck, 2/sym, 3/dfn, 3/iibf, 3/iitf, 3/vi, 3/idt, 4/tmc, 4/tvc, 4/tpc, 4/tlc, 4/tac, 4/tpc2, 4/tpc3, 4/tkc, 4/tdc, 4/tvc2, 4/tcc2, 4/trc, 4/tic, 4/tpc4, 4/tpc5, 4/tpc6, 4/tpc7, 5/tlc, 5/tlc2, 5/tic, 5/trc, 5/tvc, 5/tlc3, 5/tcc, 5/tec, 5/trc2, 5/tcc2, 5/tsc and here.

+

The structure warehouse_floor_space is accessed in 2/it, 2/bkm, 2/in, 2/st, 2/pck, 2/sym, 2/trn, 3/dfn, 3/iibf, 3/iitf, 3/vi, 3/idt, 4/tmc, 4/tvc, 4/tpc, 4/tlc, 4/tac, 4/tpc2, 4/tpc3, 4/tkc, 4/tdc, 4/tvc2, 4/tcc2, 4/trc, 4/tic, 4/tpc4, 4/tpc5, 4/tpc6, 4/tpc7, 5/tlc, 5/tlc2, 5/tic, 5/trc, 5/tvc, 5/tlc3, 5/tcc, 5/tec, 5/trc2, 5/tcc2, 5/tsc and here.

The structure inter_error_stash is private to this section.

diff --git a/docs/inter-module/3-ca.html b/docs/inter-module/3-ca.html index 5c97c0387..0c6bdb849 100644 --- a/docs/inter-module/3-ca.html +++ b/docs/inter-module/3-ca.html @@ -1,7 +1,7 @@ - 2/ann + 2/trn diff --git a/docs/inter-module/3-dfn.html b/docs/inter-module/3-dfn.html index 69a6689a6..27c3f6ea8 100644 --- a/docs/inter-module/3-dfn.html +++ b/docs/inter-module/3-dfn.html @@ -376,7 +376,7 @@

-

The function Inter::Defn::verify_construct is used in 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 (§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::transpose_construct is used in 3/iibf (§1.6).

diff --git a/docs/inter-module/3-ie.html b/docs/inter-module/3-ie.html index c11f120b9..6935b03ce 100644 --- a/docs/inter-module/3-ie.html +++ b/docs/inter-module/3-ie.html @@ -107,7 +107,7 @@

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), 3/iibf (§1.6, §3), 3/iitf (§1, §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_to appears nowhere else.

diff --git a/docs/inter-module/4-tcc.html b/docs/inter-module/4-tcc.html index 68df59f4c..21615ed0d 100644 --- a/docs/inter-module/4-tcc.html +++ b/docs/inter-module/4-tcc.html @@ -54,7 +54,7 @@

The function Inter::Comment::read appears nowhere else.

-

The function Inter::Comment::new appears nowhere else.

+

The function Inter::Comment::new is used in 2/trn (§1.2).



diff --git a/docs/inter-module/4-tpc3.html b/docs/inter-module/4-tpc3.html index 59d199985..5ba1efea9 100644 --- a/docs/inter-module/4-tpc3.html +++ b/docs/inter-module/4-tpc3.html @@ -200,7 +200,7 @@

The function Inter::Package::new_package_named appears nowhere else.

-

The function Inter::Package::new_package appears nowhere else.

+

The function Inter::Package::new_package is used in 2/trn (§2.2.1, §3.1.1).

The function Inter::Package::transpose is used in §1.

@@ -214,7 +214,7 @@

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).

+

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::type is used in 2/pck (§3).

diff --git a/docs/inter-module/index.html b/docs/inter-module/index.html index abb5bf9e9..934175f17 100644 --- a/docs/inter-module/index.html +++ b/docs/inter-module/index.html @@ -61,6 +61,10 @@

Annotations - To mark symbols up with metadata.

+
  • +

    Transmigration - + To move packages between repositories.

    +
  • diff --git a/inter/Tests/Duplex/TransposeBinOut.interpipeline b/inter/Tests/Duplex/TransposeBinOut.interpipeline deleted file mode 100644 index 77e25da3b..000000000 --- a/inter/Tests/Duplex/TransposeBinOut.interpipeline +++ /dev/null @@ -1,8 +0,0 @@ -read 0 <- *inA -read 1 <- *inB -generate 0 binary -> *binA -generate 1 binary -> *binB -read 2 <- *binA -read 3 <- *binB -generate 2 text -> *outA -generate 3 text -> *outB diff --git a/inter/Tests/Duplex/_Pairs/TransposeBinOut+A.intert b/inter/Tests/Duplex/_Pairs/TransposeBinOut+A.intert deleted file mode 100644 index 62627c1f4..000000000 --- a/inter/Tests/Duplex/_Pairs/TransposeBinOut+A.intert +++ /dev/null @@ -1,27 +0,0 @@ -packagetype _plain -packagetype _code - -primitive !if val code -> void -primitive !goto lab -> void - -package main _plain - symbol public misc K_number - symbol public misc K_func - kind K_number int32 - kind K_func function K_number -> K_number - package my_fn _plain - symbol public misc R_101 - symbol external misc K_func == /main/K_func - package R_101_B _code - symbol private misc x - symbol private label .begin - symbol external misc K_number == /main/K_number - local x K_number __call_parameter - code - .begin - inv !if - val K_number 1 - code - inv !goto - lab .begin - constant R_101 K_func = R_101_B diff --git a/inter/Tests/Duplex/_Pairs/TransposeInOut+A.intert b/inter/Tests/Duplex/_Pairs/TransposeInOut+A.intert index 62627c1f4..91220ab7c 100644 --- a/inter/Tests/Duplex/_Pairs/TransposeInOut+A.intert +++ b/inter/Tests/Duplex/_Pairs/TransposeInOut+A.intert @@ -1,5 +1,6 @@ packagetype _plain packagetype _code +packagetype _linkage primitive !if val code -> void primitive !goto lab -> void @@ -7,21 +8,30 @@ primitive !goto lab -> void package main _plain symbol public misc K_number symbol public misc K_func + symbol public misc awkward + symbol public misc troublesome + symbol external misc secret == /main/my_fn/secret kind K_number int32 kind K_func function K_number -> K_number package my_fn _plain symbol public misc R_101 + symbol public misc secret symbol external misc K_func == /main/K_func + symbol external misc K_number == /main/K_number package R_101_B _code symbol private misc x symbol private label .begin symbol external misc K_number == /main/K_number + symbol external misc troublesome == /main/troublesome local x K_number __call_parameter code .begin inv !if - val K_number 1 + val K_number troublesome code inv !goto lab .begin constant R_101 K_func = R_101_B + constant secret K_number = 7 + constant awkward K_number = secret + constant troublesome K_number = 12 diff --git a/inter/Tests/Duplex/_Pairs/TransposeInOut+B.intert b/inter/Tests/Duplex/_Pairs/TransposeInOut+B.intert index b95baaa6a..8565a446f 100644 --- a/inter/Tests/Duplex/_Pairs/TransposeInOut+B.intert +++ b/inter/Tests/Duplex/_Pairs/TransposeInOut+B.intert @@ -2,6 +2,7 @@ packagetype _plain packagetype _code +packagetype _linkage version 7 diff --git a/inter/Tests/Duplex/_Results_Ideal/TransposeInOut+A.txt b/inter/Tests/Duplex/_Results_Ideal/TransposeInOut+A.txt new file mode 100644 index 000000000..cb7aa9d7f --- /dev/null +++ b/inter/Tests/Duplex/_Results_Ideal/TransposeInOut+A.txt @@ -0,0 +1,20 @@ +packagetype _plain +packagetype _code +packagetype _linkage + +primitive !if val code -> void +primitive !goto lab -> void + +package main _plain + symbol public misc K_number + symbol public misc K_func + symbol public misc awkward + symbol public misc troublesome + symbol external misc secret == /main/links/secret + kind K_number int32 + kind K_func function K_number -> K_number + # Exported my_fn here + package links _linkage + symbol link misc secret == /main/my_fn/secret + constant awkward K_number = secret + constant troublesome K_number = 12 diff --git a/inter/Tests/Duplex/_Pairs/TransposeBinOut+B.intert b/inter/Tests/Duplex/_Results_Ideal/TransposeInOut+B.txt similarity index 87% rename from inter/Tests/Duplex/_Pairs/TransposeBinOut+B.intert rename to inter/Tests/Duplex/_Results_Ideal/TransposeInOut+B.txt index b95baaa6a..5da41876f 100644 --- a/inter/Tests/Duplex/_Pairs/TransposeBinOut+B.intert +++ b/inter/Tests/Duplex/_Results_Ideal/TransposeInOut+B.txt @@ -2,6 +2,7 @@ packagetype _plain packagetype _code +packagetype _linkage version 7 @@ -11,6 +12,8 @@ primitive !plus val val -> val pragma target_I6 "$MAX_STATIC_DATA=180000" +primitive !if val code -> void +primitive !goto lab -> void package main _plain symbol public misc K_number symbol public misc K_truth_state @@ -162,3 +165,26 @@ package main _plain constant R_102 K_colour____colour = R_102_B constant amount K_number = sum{ 2, C_taxes } response R_101_A R_101 0 = C_taxes + # Imported my_fn here + package my_fn _plain + symbol public misc R_101 + symbol public misc secret + symbol external misc K_func == /main/K_func + symbol external misc K_number == /main/K_number + package R_101_B _code + symbol private misc x + symbol private label .begin + symbol external misc K_number == /main/K_number + symbol external misc troublesome == /main/my_fn/links/troublesome + local x K_number __call_parameter + code + .begin + inv !if + val K_number troublesome + code + inv !goto + lab .begin + constant R_101 K_func = R_101_B + constant secret K_number = 7 + package links _linkage + symbol link misc troublesome == /main/troublesome diff --git a/inter/Tests/inter.intest b/inter/Tests/inter.intest index dc055a253..fa484cca3 100644 --- a/inter/Tests/inter.intest +++ b/inter/Tests/inter.intest @@ -88,7 +88,7 @@ mkdir: $PATH/_Console mkdir: $PATH/_Binaries - step: inter/Tangled/inter -variable '*inA=$OA' -variable '*inB=$OB' -variable '*binA=$BA' -variable '*binB=$BB' -variable '*outA=$AA' -variable '*outB=$AB' -pipeline-file $P + step: inter/Tangled/inter -variable '*inA=$OA' -variable '*inB=$OB' -variable '*binA=$BA' -variable '*binB=$BB' -variable '*outA=$AA' -variable '*outB=$AB' -pipeline-file $P >$T 2>&1 or: 'failed to produce output' $T show: $A diff --git a/inter/codegen-module/Chapter 1/Stages.w b/inter/codegen-module/Chapter 1/Stages.w index 4571c95de..1548058ae 100644 --- a/inter/codegen-module/Chapter 1/Stages.w +++ b/inter/codegen-module/Chapter 1/Stages.w @@ -89,8 +89,7 @@ int CodeGen::Stage::run_move_stage(pipeline_step *step) { } Regexp::dispose_of(&mr); if (pack == NULL) internal_error("not a package"); - - if (trace_bin) WRITE_TO(STDOUT, "Move %S\n", Inter::Packages::name(pack)); + Inter::Transmigration::move(pack, Inter::Tree::main_package(step->repository), TRUE); return TRUE; } diff --git a/inter/codegen-module/Chapter 2/Assimilate.w b/inter/codegen-module/Chapter 2/Assimilate.w index 4345649c2..980f6a8a1 100644 --- a/inter/codegen-module/Chapter 2/Assimilate.w +++ b/inter/codegen-module/Chapter 2/Assimilate.w @@ -35,13 +35,13 @@ inter_bookmark CodeGen::Assimilate::template_submodule(inter_tree *I, text_strea if (submodule_ptype_symbol) { inter_package *t_p = Inter::Packages::by_name(template_package, name); if (t_p == NULL) { - inter_bookmark IBM = Inter::Bookmarks::after_this_frame(I, P); + inter_bookmark IBM = Inter::Bookmarks::after_this_node(I, P); t_p = CodeGen::Assimilate::new_package_named(&IBM, name, submodule_ptype_symbol); } if (t_p == NULL) internal_error("failed to define"); return Inter::Bookmarks::at_end_of_this_package(t_p); } - return Inter::Bookmarks::after_this_frame(I, P); + return Inter::Bookmarks::after_this_node(I, P); } void CodeGen::Assimilate::visitor1(inter_tree *I, inter_tree_node *P, void *state) { @@ -133,7 +133,7 @@ void CodeGen::Assimilate::visitor3(inter_tree *I, inter_tree_node *P, void *stat if (plm == OBJECT_PLM) value = NULL; @ = - inter_bookmark IBM_d = Inter::Bookmarks::after_this_frame(I, P); + inter_bookmark IBM_d = Inter::Bookmarks::after_this_node(I, P); inter_bookmark *IBM = &IBM_d; text_stream *submodule_name = NULL; @@ -439,7 +439,7 @@ void CodeGen::Assimilate::visitor3(inter_tree *I, inter_tree_node *P, void *stat *IBM = outer_save; - inter_bookmark T_IBM = Inter::Bookmarks::after_this_frame(I, P); + inter_bookmark T_IBM = Inter::Bookmarks::after_this_node(I, P); inter_symbol *alias_name = Inter::SymbolsTables::create_with_unique_name(Inter::Bookmarks::scope(&T_IBM), identifier); Inter::SymbolsTables::equate(alias_name, rsymb); Inter::Symbols::set_flag(alias_name, ALIAS_ONLY_BIT); diff --git a/inter/inter-module/Chapter 2/Bookmarks.w b/inter/inter-module/Chapter 2/Bookmarks.w index 2cd707a02..b5c6828e9 100644 --- a/inter/inter-module/Chapter 2/Bookmarks.w +++ b/inter/inter-module/Chapter 2/Bookmarks.w @@ -32,7 +32,7 @@ inter_bookmark Inter::Bookmarks::at_end_of_this_package(inter_package *pack) { return IBM; } -inter_bookmark Inter::Bookmarks::after_this_frame(inter_tree *I, inter_tree_node *D) { +inter_bookmark Inter::Bookmarks::after_this_node(inter_tree *I, inter_tree_node *D) { if (D == NULL) internal_error("invalid frame supplied"); inter_bookmark IBM; IBM.R = D; diff --git a/inter/inter-module/Chapter 2/Packages.w b/inter/inter-module/Chapter 2/Packages.w index 8fc203de8..ce37f4b75 100644 --- a/inter/inter-module/Chapter 2/Packages.w +++ b/inter/inter-module/Chapter 2/Packages.w @@ -110,18 +110,30 @@ void Inter::Packages::set_scope(inter_package *P, inter_symbols_table *T) { } void Inter::Packages::set_name(inter_package *Q, inter_package *P, text_stream *N) { - if (Q == NULL) internal_error("no parent supplied"); if (P == NULL) internal_error("null package"); if (N == NULL) internal_error("null package name"); P->package_name_t = Str::duplicate(N); if ((N) && (Str::eq(P->package_name_t, I"main"))) Inter::Tree::set_main_package(Inter::Packages::tree(P), P); - if (Str::len(N) > 0) { - dict_entry *de = Dictionaries::find(Q->name_lookup, N); - if (de) internal_error("duplicated package name"); - Dictionaries::create(Q->name_lookup, N); - Dictionaries::write_value(Q->name_lookup, N, (void *) P); + if (Str::len(N) > 0) Inter::Packages::add_subpackage_name(Q, P); +} + +void Inter::Packages::add_subpackage_name(inter_package *Q, inter_package *P) { + if (Q == NULL) internal_error("no parent supplied"); + text_stream *N = P->package_name_t; + dict_entry *de = Dictionaries::find(Q->name_lookup, N); + if (de) internal_error("duplicated package name"); + Dictionaries::create(Q->name_lookup, N); + Dictionaries::write_value(Q->name_lookup, N, (void *) P); +} + +void Inter::Packages::remove_subpackage_name(inter_package *Q, inter_package *P) { + if (Q == NULL) internal_error("no parent supplied"); + text_stream *N = P->package_name_t; + dict_entry *de = Dictionaries::find(Q->name_lookup, N); + if (de) { + Dictionaries::write_value(Q->name_lookup, N, NULL); } } diff --git a/inter/inter-module/Chapter 2/Symbols.w b/inter/inter-module/Chapter 2/Symbols.w index 2ebc3a844..6f97ef886 100644 --- a/inter/inter-module/Chapter 2/Symbols.w +++ b/inter/inter-module/Chapter 2/Symbols.w @@ -15,6 +15,8 @@ typedef struct inter_symbol { int symbol_status; struct inter_annotation_set ann_set; struct text_stream *translate_text; + int link_time; + struct inter_symbol *linked_to; } inter_symbol; @ = @@ -33,6 +35,8 @@ inter_symbol *Inter::Symbols::new(text_stream *name, inter_symbols_table *T, int symb->equated_to = NULL; symb->equated_name = NULL; symb->translate_text = NULL; + symb->link_time = 0; + symb->linked_to = NULL; LOGIF(INTER_SYMBOLS, "Created symbol $3 in $4\n", symb, T); return symb; diff --git a/inter/inter-module/Chapter 2/Transmigration.w b/inter/inter-module/Chapter 2/Transmigration.w new file mode 100644 index 000000000..51c443cd1 --- /dev/null +++ b/inter/inter-module/Chapter 2/Transmigration.w @@ -0,0 +1,224 @@ +[Inter::Transmigration::] Transmigration. + +To move packages between repositories. + +@ = +int ipct_cache_count = 0; +void Inter::Transmigration::cache(inter_symbol *S, inter_symbol *V) { + S->linked_to = V; + S->link_time = ipct_cache_count; +} + +inter_symbol *Inter::Transmigration::cached_equivalent(inter_symbol *S) { + if (S->link_time == ipct_cache_count) return S->linked_to; + return NULL; +} + +void Inter::Transmigration::move(inter_package *migrant, inter_package *destination, int tidy_origin) { + LOG("Move $5 to $5\n", migrant, destination); + inter_package *origin = Inter::Packages::parent(migrant); + inter_bookmark deletion_point, insertion_point, linkage_point, primitives_point; + @; + @; + @; + @; + if (tidy_origin) @; +} + +@ = + deletion_point = + 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) + prims = F; + if (prims == NULL) internal_error("dest has no prims"); + primitives_point = Inter::Bookmarks::after_this_node(destination->package_head->tree, prims); + +@ = + inter_t C1 = Inter::Warehouse::create_text(Inter::Bookmarks::warehouse(&deletion_point), Inter::Bookmarks::package(&deletion_point)); + WRITE_TO(Inter::Warehouse::get_text(Inter::Bookmarks::warehouse(&deletion_point), C1), + "Exported %S here", Inter::Packages::name(migrant)); + Inter::Comment::new(&deletion_point, (inter_t) Inter::Packages::baseline(migrant), NULL, C1); + + inter_t C2 = Inter::Warehouse::create_text(Inter::Bookmarks::warehouse(&insertion_point), Inter::Bookmarks::package(&insertion_point)); + WRITE_TO(Inter::Warehouse::get_text(Inter::Bookmarks::warehouse(&insertion_point), C2), + "Imported %S here", Inter::Packages::name(migrant)); + Inter::Comment::new(&insertion_point, (inter_t) Inter::Packages::baseline(destination) + 1, NULL, C2); + +@ = + Inter::Packages::remove_subpackage_name(Inter::Packages::parent(migrant), migrant); + Inter::Packages::add_subpackage_name(destination, migrant); + Inter::Bookmarks::insert(&insertion_point, migrant->package_head); + +@ = +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; +} ipct_state; + +@ = + 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.primitives_point = &primitives_point; + Inter::Tree::traverse(destination->package_head->tree, + Inter::Transmigration::correct_migrant, &ipct, migrant, 0); + +@ = +void Inter::Transmigration::correct_migrant(inter_tree *I, inter_tree_node *P, void *state) { + ipct_state *ipct = (ipct_state *) state; + 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) @; + } + if (P->W.data[ID_IFLD] == PACKAGE_IST) { + inter_package *pack = Inter::Package::defined_by_frame(P); + if (pack == NULL) internal_error("no package defined here"); + if (Inter::Packages::is_linklike(pack)) return; + inter_symbols_table *T = Inter::Packages::scope(pack); + if (T == NULL) internal_error("package with no symbols"); + for (int i=0; isize; i++) { + inter_symbol *symb = T->symbol_array[i]; + if ((symb) && (symb->equated_to)) { + inter_symbol *target = symb->equated_to; + while (target->equated_to) target = target->equated_to; + inter_package *target_package = target->owning_table->owning_package; + while ((target_package) && (target_package != ipct->migrant)) { + target_package = Inter::Packages::parent(target_package); + } + if (target_package != ipct->migrant) + @; + } + } + } +} + +@ = + 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) @; + 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); + +@ = + 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); + inter_tree_node *old_D = primitive->definition; + for (int i=CAT_PRIM_IFLD; iW.extent; i++) { + if (Inter::Node::extend(D, (inter_t) 1) == FALSE) internal_error("can't extend"); + D->W.data[i] = old_D->W.data[i]; + } + inter_error_message *E = Inter::Defn::verify_construct(Inter::Bookmarks::package(ipct->primitives_point), D); + if (E) { + Inter::Errors::issue(E); + equivalent_primitive = NULL; + } else { + Inter::Bookmarks::insert(ipct->primitives_point, D); + } + +@ = + inter_symbol *equivalent = Inter::Transmigration::cached_equivalent(target); + if (equivalent == NULL) { + TEMPORARY_TEXT(URL); + Inter::SymbolsTables::symbol_to_url_name(URL, target); + equivalent = Inter::SymbolsTables::url_name_to_symbol(ipct->destination->package_head->tree, NULL, URL); + if (equivalent == NULL) + @; + DISCARD_TEXT(URL); + Inter::Transmigration::cache(target, equivalent); + } + symb->equated_to = equivalent; + +@ = + if (ipct->links == NULL) + ipct->links = Inter::Packages::by_name(ipct->migrant, I"links"); + if (ipct->links == NULL) { + inter_symbol *linkage = Inter::SymbolsTables::url_name_to_symbol(I, NULL, I"/_linkage"); + if (linkage == NULL) internal_error("no linkage ptype"); + Inter::Package::new_package(ipct->linkage_point, I"links", linkage, (inter_t) Inter::Packages::baseline(ipct->migrant) + 1, NULL, &(ipct->links)); + } + if (ipct->links == NULL) internal_error("couldn't create links"); + Inter::Packages::make_linklike(ipct->links); + equivalent = Inter::SymbolsTables::create_with_unique_name(Inter::Packages::scope(ipct->links), target->symbol_name); + Inter::SymbolsTables::link(equivalent, URL); + +@ = + 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; + Inter::Tree::traverse(origin->package_head->tree, + Inter::Transmigration::correct_origin, &ipct, NULL, 0); + +@ = +void Inter::Transmigration::correct_origin(inter_tree *I, inter_tree_node *P, void *state) { + ipct_state *ipct = (ipct_state *) state; + if (P->W.data[ID_IFLD] == PACKAGE_IST) { + inter_package *pack = Inter::Package::defined_by_frame(P); + if (pack == NULL) internal_error("no package defined here"); + if (Inter::Packages::is_linklike(pack)) return; + inter_symbols_table *T = Inter::Packages::scope(pack); + if (T == NULL) internal_error("package with no symbols"); + for (int i=0; isize; i++) { + inter_symbol *symb = T->symbol_array[i]; + if ((symb) && (symb->equated_to)) { + inter_symbol *target = symb->equated_to; + while (target->equated_to) target = target->equated_to; + inter_package *target_package = target->owning_table->owning_package; + while ((target_package) && (target_package != ipct->migrant)) { + target_package = Inter::Packages::parent(target_package); + } + if (target_package == ipct->migrant) + @; + } + } + } +} + +@ = + inter_symbol *equivalent = Inter::Transmigration::cached_equivalent(target); + if (equivalent == NULL) { + @; + Inter::Transmigration::cache(target, equivalent); + } + symb->equated_to = equivalent; + +@ = + if (ipct->links == NULL) + ipct->links = Inter::Packages::by_name(Inter::Bookmarks::package(ipct->linkage_point), I"links"); + if (ipct->links == NULL) { + inter_symbol *linkage = Inter::SymbolsTables::url_name_to_symbol(I, NULL, I"/_linkage"); + if (linkage == NULL) internal_error("no linkage ptype"); + Inter::Package::new_package(ipct->linkage_point, I"links", linkage, (inter_t) Inter::Bookmarks::baseline(ipct->linkage_point)+1, NULL, &(ipct->links)); + } + if (ipct->links == NULL) internal_error("couldn't create links"); + Inter::Packages::make_linklike(ipct->links); + equivalent = Inter::SymbolsTables::create_with_unique_name(Inter::Packages::scope(ipct->links), target->symbol_name); + TEMPORARY_TEXT(URL); + Inter::SymbolsTables::symbol_to_url_name(URL, target); + Inter::SymbolsTables::link(equivalent, URL); + DISCARD_TEXT(URL); diff --git a/inter/inter-module/Contents.w b/inter/inter-module/Contents.w index 3b06c445c..7dcc8e16d 100644 --- a/inter/inter-module/Contents.w +++ b/inter/inter-module/Contents.w @@ -18,6 +18,7 @@ Chapter 2: Interoperability Packages Symbols Annotations + Transmigration Chapter 3: Language Definition Canonical Annotations