§36. The following reserves a label, that is, declares that a given name will be
@@ -707,7 +707,7 @@ that of a label in the function currently being constructed.
-inter_symbol *Produce::reserve_label(inter_tree *I, text_stream *lname) {
+inter_symbol *Produce::reserve_label(inter_tree *I, text_stream *lname) {if (Str::get_first_char(lname) != '.') {TEMPORARY_TEXT(dotted)WRITE_TO(dotted, ".%S", lname);
@@ -726,7 +726,7 @@ that of a label in the function currently being constructed.
@@ -764,14 +764,14 @@ doesn't add the name tp the current stack frame in Produce::guard(Inter::Comment::new(locals_at, Produce::baseline(locals_at) + 1,NULL, ID)); }
-inter_typeit = InterTypes::untyped();
-if ((K) && (K != K_value)) it = InterTypes::from_type_name(Produce::kind_to_symbol(K));
-Produce::guard(Inter::Local::new(locals_at, local_s, it,
+inter_typetype = InterTypes::untyped();
+if ((K) && (K != K_value)) type = InterTypes::from_type_name(Produce::kind_to_symbol(K));
+Produce::guard(Inter::Local::new(locals_at, local_s, type,Produce::baseline(locals_at) + 1, NULL));returnlocal_s;}
-inter_symbol *Produce::local_exists(inter_tree *I, text_stream *lname) {
+inter_symbol *Produce::local_exists(inter_tree *I, text_stream *lname) {returnInterSymbolsTable::symbol_from_name(InterPackage::scope(I->site.sprdata.current_inter_function), lname);}
diff --git a/docs/bytecode-module/2-ann.html b/docs/bytecode-module/2-ann.html
index 145236477..9f698a946 100644
--- a/docs/bytecode-module/2-ann.html
+++ b/docs/bytecode-module/2-ann.html
@@ -463,7 +463,7 @@ if true, because if false then they are indistinguishable from not being there a
-voidSymbolAnnotation::write_annotations(OUTPUT_STREAM, inter_tree_node *F, inter_symbol *S) {
+voidSymbolAnnotation::write_annotations(OUTPUT_STREAM, inter_tree_node *F, inter_symbol *S) {if (S) SymbolAnnotation::write_set(OUT, &(S->annotations), F);}
diff --git a/docs/bytecode-module/2-bkm.html b/docs/bytecode-module/2-bkm.html
index b4b95fe73..487a99235 100644
--- a/docs/bytecode-module/2-bkm.html
+++ b/docs/bytecode-module/2-bkm.html
@@ -200,7 +200,7 @@ equal to P.
@@ -488,7 +488,7 @@ to identify it as occurring at a particular node. We can get one thus:
-inter_error_message *Inode::error(inter_tree_node *F, text_stream *err, text_stream *quote) {
+inter_error_message *Inode::error(inter_tree_node *F, text_stream *err, text_stream *quote) {inter_error_message *iem = CREATE(inter_error_message);inter_error_location *eloc = Inode::get_error_location(F);if (eloc)
diff --git a/docs/bytecode-module/2-np.html b/docs/bytecode-module/2-np.html
index 7f38a945a..fb170805e 100644
--- a/docs/bytecode-module/2-np.html
+++ b/docs/bytecode-module/2-np.html
@@ -307,7 +307,7 @@ way to reach as low as that from
-voidNodePlacement::move_to_moving_bookmark(inter_tree_node *C, inter_bookmark *IBM) {
+voidNodePlacement::move_to_moving_bookmark(inter_tree_node *C, inter_bookmark *IBM) {if (C == NULL) internal_error("no node to insert");if (IBM == NULL) internal_error("nowhere to insert");NodePlacement::move_to(C, NodePlacement::to_position(C, InterBookmark::snapshot(IBM)));
diff --git a/docs/bytecode-module/2-pck.html b/docs/bytecode-module/2-pck.html
index 75ceef70c..70b20f19b 100644
--- a/docs/bytecode-module/2-pck.html
+++ b/docs/bytecode-module/2-pck.html
@@ -230,7 +230,7 @@ extracted from the bytecode of its
-inter_symbols_table *InterPackage::scope(inter_package *pack) {
+inter_symbols_table *InterPackage::scope(inter_package *pack) {if (pack == NULL) returnNULL;returnpack->package_scope;}
@@ -268,7 +268,7 @@ equal to the special root package.
returnpack;}
-inter_symbols_table *InterPackage::scope_of(inter_tree_node *P) {
+inter_symbols_table *InterPackage::scope_of(inter_tree_node *P) {inter_package *pack = InterPackage::container(P);if (pack) returnpack->package_scope;returnInode::globals(P);
diff --git a/docs/bytecode-module/2-st.html b/docs/bytecode-module/2-st.html
index 49eaa59df..46b346295 100644
--- a/docs/bytecode-module/2-st.html
+++ b/docs/bytecode-module/2-st.html
@@ -378,7 +378,7 @@ to access this: one following equations, the other not.
returnT->symbol_array[index];}
-inter_symbol *InterSymbolsTable::symbol_from_ID(inter_symbols_table *T, inter_tiID) {
+inter_symbol *InterSymbolsTable::symbol_from_ID(inter_symbols_table *T, inter_tiID) {inter_symbol *S = InterSymbolsTable::symbol_from_ID_not_following(T, ID);returnWiring::cable_end(S);}
@@ -387,7 +387,7 @@ to access this: one following equations, the other not.
-inter_symbol *InterSymbolsTable::symbol_from_ID_at_node(inter_tree_node *P, intx) {
+inter_symbol *InterSymbolsTable::symbol_from_ID_at_node(inter_tree_node *P, intx) {returnInterSymbolsTable::symbol_from_ID(InterPackage::scope_of(P), P->W.instruction[x]);}
@@ -582,7 +582,7 @@ them on a package-by-package basis, so it is an error to call this function if
-inter_tiInterSymbolsTable::id_from_symbol_at_bookmark(inter_bookmark *IBM,
+inter_tiInterSymbolsTable::id_from_symbol_at_bookmark(inter_bookmark *IBM,inter_symbol *S) {returnInterSymbolsTable::id_from_symbol(InterBookmark::tree(IBM),InterBookmark::package(IBM), S);
diff --git a/docs/bytecode-module/2-sym.html b/docs/bytecode-module/2-sym.html
index a38caa294..6e4a12d9d 100644
--- a/docs/bytecode-module/2-sym.html
+++ b/docs/bytecode-module/2-sym.html
@@ -401,7 +401,7 @@ might be the node holding the instruction:
if (S) InterSymbol::define(S, NULL);}
-inter_tree_node *InterSymbol::definition(inter_symbol *S) {
+inter_tree_node *InterSymbol::definition(inter_symbol *S) {if (S == NULL) internal_error("tried to find definition of null symbol");returnS->definition;}
@@ -467,7 +467,7 @@ in the current package. So:
§19. Identifier name.
-text_stream *InterSymbol::identifier(inter_symbol *S) {
+text_stream *InterSymbol::identifier(inter_symbol *S) {if (S == NULL) returnNULL;returnS->identifier;}
diff --git a/docs/bytecode-module/2-trn.html b/docs/bytecode-module/2-trn.html
index 5c1ed48a7..fb0593e09 100644
--- a/docs/bytecode-module/2-trn.html
+++ b/docs/bytecode-module/2-trn.html
@@ -487,7 +487,7 @@ trees with the same Inter architecture.
inter_symbol *equivalent = Transmigration::known_equivalent(target);if (equivalent == NULL) {equivalent = LargeScale::find_architectural_symbol(det->destination_tree,
-InterSymbol::identifier(target), Produce::kind_to_symbol(NULL));
+InterSymbol::identifier(target));Transmigration::learn_equivalent(target, equivalent); }Wiring::wire_to(S, equivalent);
diff --git a/docs/bytecode-module/2-tw.html b/docs/bytecode-module/2-tw.html
index a6dffadeb..e16969e98 100644
--- a/docs/bytecode-module/2-tw.html
+++ b/docs/bytecode-module/2-tw.html
@@ -295,7 +295,7 @@ pointed to is in the same tree as the bytecode instruction using the resource.
-inter_tiInterWarehouse::create_node_list(inter_warehouse *warehouse, inter_package *owner) {
+inter_tiInterWarehouse::create_node_list(inter_warehouse *warehouse, inter_package *owner) {returnInterWarehouse::create_ref(warehouse,STORE_POINTER_inter_node_list(InterNodeList::new()), owner);}
@@ -405,7 +405,7 @@ in order to cache the results of those two calculations.
intextent;} warehouse_floor_space;
§15. We provide an API of just two functions to handle all this. Firstly,
InterWarehouse::make_floor_space makes room for an instruction of n words.
(This is the frame extent, and does not include the PREFRAME_SIZE.)
diff --git a/docs/bytecode-module/3-ic.html b/docs/bytecode-module/3-ic.html
index e872259fb..eb94e57a1 100644
--- a/docs/bytecode-module/3-ic.html
+++ b/docs/bytecode-module/3-ic.html
@@ -93,7 +93,7 @@ function togglePopup(material_id) {
CLASS_DEFINITION} inter_construct;
-inter_construct *InterConstruct::create_construct(inter_tiID, text_stream *name) {
+inter_construct *InterConstruct::create_construct(inter_tiID, text_stream *name) {inter_construct *IC = CREATE(inter_construct);IC->construct_ID = ID;IC->construct_name = Str::duplicate(name);
@@ -129,7 +129,7 @@ Those must be explicitly granted when a new construct is created.
defineCAN_HAVE_CHILDREN_ICUP8
-inter_error_message *InterConstruct::check_level_in_package(inter_bookmark *IBM,
+inter_error_message *InterConstruct::check_level_in_package(inter_bookmark *IBM,inter_tiID, intlevel, inter_error_location *eloc) {inter_construct *proposed = InterConstruct::get_construct_for_ID(ID);if (proposed == NULL) returnInter::Errors::plain(I"no such construct", eloc);
@@ -277,7 +277,7 @@ but give it no syntax. If so, it will be inexpressible in textual Inter code.
defineMAX_RECOGNITION_REGEXP_LENGTH64
-voidInterConstruct::specify_syntax(inter_construct *IC, text_stream *syntax) {
+voidInterConstruct::specify_syntax(inter_construct *IC, text_stream *syntax) {IC->syntax = syntax;TEMPORARY_TEXT(regexp)for (inti = 0; i < Str::len(syntax); i++) {
@@ -389,7 +389,7 @@ the creation of the constructs: so we poll those sections in turn.
Inter::Pragma::define();Inter::Link::define();Inter::Append::define();
-Inter::Kind::define();
+Inter::Typename::define();Inter::DefaultValue::define();Inter::Constant::define();Inter::Instance::define();
@@ -451,7 +451,7 @@ nodes to that instruction of a kind it expects.
VOID_METHOD_TYPE(CONSTRUCT_VERIFY_CHILDREN_MTID, inter_construct *IC,inter_tree_node *P, inter_error_message **E)
-inter_error_message *InterConstruct::verify_construct(inter_package *owner,
+inter_error_message *InterConstruct::verify_construct(inter_package *owner,inter_tree_node *P) {inter_construct *IC = NULL;inter_error_message *E = InterConstruct::get_construct(P, &IC);
diff --git a/docs/bytecode-module/3-idt.html b/docs/bytecode-module/3-idt.html
index 9cee2ba88..7cf727b38 100644
--- a/docs/bytecode-module/3-idt.html
+++ b/docs/bytecode-module/3-idt.html
@@ -117,7 +117,7 @@ whereas list, f
defineMIN_INTER_TYPE_CONSTRUCTORUNCHECKED_ITCONCdefineMAX_INTER_TYPE_CONSTRUCTORVOID_ITCONC
-intInterTypes::is_valid_constructor_code(inter_ticonstructor) {
+intInterTypes::is_valid_constructor_code(inter_ticonstructor) {if ((constructor < MIN_INTER_TYPE_CONSTRUCTOR) || (constructor > MAX_INTER_TYPE_CONSTRUCTOR)) returnFALSE;returnTRUE;
@@ -141,7 +141,7 @@ valid constructor codes as indexes:
inter_type_constructorinter_type_constructors[MAX_INTER_TYPE_CONSTRUCTOR + 1];
-
The structure inter_type_constructor is accessed in 4/tkc and here.
+
The structure inter_type_constructor is accessed in 4/ttc and here.
§4. That array initially contains undetermined data, of course, so we need to
initialise it:
@@ -184,6 +184,7 @@ initialise it:
IDT->max_value = range_to;IDT->is_enumerated = en;IDT->is_base = base;
+IDT->arity = arity;returnIDT;}
@@ -276,7 +277,7 @@ type name, and so can be stored in an
-inter_typeInterTypes::untyped(void) {
+inter_typeInterTypes::untyped(void) {returnInterTypes::from_constructor_code(UNCHECKED_ITCONC);}
-intInterTypes::is_untyped(inter_typetype) {
+intInterTypes::is_untyped(inter_typetype) {if (InterTypes::constructor_code(type) == UNCHECKED_ITCONC) returnTRUE;returnFALSE;}
@@ -331,22 +332,22 @@ in which all data is unchecke
-inter_typeInterTypes::from_TID(inter_symbols_table *T, inter_tiTID) {
+inter_typeInterTypes::from_TID(inter_symbols_table *T, inter_tiTID) {if (TID >= SYMBOL_BASE_VAL)returnInterTypes::from_type_name(InterSymbolsTable::symbol_from_ID(T, TID));if (InterTypes::is_valid_constructor_code(TID))
@@ -386,7 +387,7 @@ in which all data is unchecke
inter_ti *operand_TIDs;} inter_semisimple_type_description;
-voidInterTypes::initialise_isstd(inter_semisimple_type_description *results) {
+voidInterTypes::initialise_isstd(inter_semisimple_type_description *results) {results->constructor_code = UNCHECKED_ITCONC;results->arity = 0;results->capacity = DEFAULT_SIZE_OF_ISSTD_OPERAND_ARRAY;
@@ -411,11 +412,11 @@ in which all data is unchecke
results->operand_TIDs[(results->arity)++] = TID;}
-
The structure inter_semisimple_type_description is accessed in 4/tkc and here.
+
The structure inter_semisimple_type_description is accessed in 4/ttc and here.
§16.1.
-voidInterTypes::dispose_of_isstd(inter_semisimple_type_description *results) {
+voidInterTypes::dispose_of_isstd(inter_semisimple_type_description *results) {results->constructor_code = UNCHECKED_ITCONC;results->arity = 0;Free operand memory16.2;
@@ -433,7 +434,7 @@ in which all data is unchecke
The structure inter_line_parse is accessed in 3/ic, 4/tcc, 4/tpc, 4/tlc, 4/tac, 4/tpc2, 4/tpc3, 4/tkc, 4/tdc, 4/tvc, 4/tcc2, 4/tic, 4/tpc4, 4/tpc5, 4/tpc6, 4/tpc7, 5/tlc, 5/tlc2, 5/tic, 5/trc, 5/tvc, 5/tlc3, 5/tac, 5/tcc, 5/tec, 5/trc2, 5/tcc2, 5/tsc, 6/tpc, 6/tsc, 6/tvc and here.
+
The structure inter_line_parse is accessed in 3/ic, 4/tcc, 4/tpc, 4/tlc, 4/tac, 4/tpc2, 4/tpc3, 4/ttc, 4/tdc, 4/tvc, 4/tcc2, 4/tic, 4/tpc4, 4/tpc5, 4/tpc6, 4/tpc7, 5/tlc, 5/tlc2, 5/tic, 5/trc, 5/tvc, 5/tlc3, 5/tac, 5/tcc, 5/tec, 5/trc2, 5/tcc2, 5/tsc, 6/tpc, 6/tsc, 6/tvc and here.
§3.1. We are a bit aggressive in requiring the Python-style indentation at the start
of each line to be made of tabs, not spaces. If we intended textual Inter to be
a programming language for humans to use, we might be more accommodating. But it's
@@ -246,7 +246,7 @@ scope; the name must currently be free, or an error is generated.
-inter_symbol *TextualInter::new_symbol(inter_error_location *eloc, inter_symbols_table *T,
+inter_symbol *TextualInter::new_symbol(inter_error_location *eloc, inter_symbols_table *T,text_stream *name, inter_error_message **E) { *E = NULL;inter_symbol *S = InterSymbolsTable::symbol_from_name(T, name);
@@ -265,7 +265,7 @@ enables us to tell if it's, e.g., a variable, defined by <
inter_node_list *FL = InterWarehouse::get_node_list(InterTree::warehouse(I),
-Inter::Kind::permissions_list(kind_s));
+Inter::Typename::permissions_list(kind_s));Work through this node list of permissions4.1.1.1;
@@ -466,7 +466,7 @@ so we use "marks" on those already done.
inter_symbol *inst_s;LOOP_OVER_LINKED_LIST(inst_s, inter_symbol, gen->instances_in_declaration_order) {
-if (Inter::Kind::is_a(Inter::Instance::kind_of(inst_s), kind_s)) {
+if (Inter::Typename::is_a(Inter::Instance::kind_of(inst_s), kind_s)) {inter_node_list *FL = InterWarehouse::get_node_list(InterTree::warehouse(I),Inter::Instance::permissions_list(inst_s));Work through this node list of permissions4.1.1.1;
@@ -543,14 +543,14 @@ number of instances, and is worth it for simplicity and speed.
Generators::array_entry(gen, I"0", TABLE_ARRAY_FORMAT);inter_symbol *inst_s;LOOP_OVER_LINKED_LIST(inst_s, inter_symbol, gen->instances_in_declaration_order) {
-if (Inter::Kind::is_a(Inter::Instance::kind_of(inst_s), kind_s)) {
+if (Inter::Typename::is_a(Inter::Instance::kind_of(inst_s), kind_s)) {intfound = 0;inter_node_list *PVL =Inode::ID_to_frame_list(X,Inter::Instance::properties_list(inst_s));Work through this node list of values4.1.1.1.1.1.1;PVL = Inode::ID_to_frame_list(X,
-Inter::Kind::properties_list(kind_s));
+Inter::Typename::properties_list(kind_s));Work through this node list of values4.1.1.1.1.1.1;if (found == 0) Generators::array_entry(gen, I"0", TABLE_ARRAY_FORMAT); }
@@ -597,7 +597,7 @@ property value, and then Generators::
Generators::declare_kind(gen, kind_s, &saved);VanillaObjects::append(gen, kind_s);inter_node_list *FL = InterWarehouse::get_node_list(InterTree::warehouse(I),
-Inter::Kind::properties_list(kind_s));
+Inter::Typename::properties_list(kind_s));Declare the properties of this kind or instance4.2.1;Generators::end_kind(gen, kind_s, saved); }
@@ -622,11 +622,11 @@ was all taken care of with the sticks of property values already declared.
inter_symbol *inst_kind = InterSymbolsTable::symbol_from_ID_at_node(P, KIND_INST_IFLD);intN = -1;inter_symbol *object_kind = RunningPipelines::get_symbol(gen->from_step, object_kind_RPSYM);
-if ((object_kind == NULL) || (Inter::Kind::is_a(inst_kind, object_kind) == FALSE))
+if ((object_kind == NULL) || (Inter::Typename::is_a(inst_kind, object_kind) == FALSE))N = (int) (P->W.instruction[VAL2_INST_IFLD]);segmentation_possaved;Generators::declare_instance(gen, inst_s, inst_kind, N, &saved);
-if (Inter::Kind::is_a(inst_kind, RunningPipelines::get_symbol(gen->from_step, object_kind_RPSYM))) {
+if (Inter::Typename::is_a(inst_kind, RunningPipelines::get_symbol(gen->from_step, object_kind_RPSYM))) {VanillaObjects::append(gen, inst_s);inter_node_list *FL =Inode::ID_to_frame_list(P,
@@ -702,7 +702,7 @@ news for, say, the C generator.
if (object_kind == NULL) returnFALSE;if (kind_s == object_kind) returnFALSE;if (InterTypes::is_untyped(InterTypes::from_type_name(kind_s))) returnFALSE;
-if (Inter::Kind::is_a(kind_s, object_kind)) returnTRUE;
+if (Inter::Typename::is_a(kind_s, object_kind)) returnTRUE;returnFALSE;}
@@ -714,13 +714,13 @@ news for, say, the C generator.
inter_tree *I = gen->from;if (VanillaObjects::is_kind_of_object(gen, kind_s)) returnFALSE;if (kind_s == RunningPipelines::get_symbol(gen->from_step, object_kind_RPSYM)) returnFALSE;
-if (kind_s == RunningPipelines::get_symbol(gen->from_step, unchecked_kind_RPSYM)) returnFALSE;
+if (InterTypes::is_untyped(InterTypes::from_type_name(kind_s))) returnFALSE;inter_node_list *FL = InterWarehouse::get_node_list(InterTree::warehouse(I),
-Inter::Kind::permissions_list(kind_s));
+Inter::Typename::permissions_list(kind_s));if (InterNodeList::empty(FL) == FALSE) returnTRUE;inter_symbol *inst_s;LOOP_OVER_LINKED_LIST(inst_s, inter_symbol, gen->instances_in_declaration_order) {
-if (Inter::Kind::is_a(Inter::Instance::kind_of(inst_s), kind_s)) {
+if (Inter::Typename::is_a(Inter::Instance::kind_of(inst_s), kind_s)) {inter_node_list *FL = InterWarehouse::get_node_list(InterTree::warehouse(I),Inter::Instance::permissions_list(inst_s));if (InterNodeList::empty(FL) == FALSE) returnTRUE;
diff --git a/docs/final-module/4-i6o.html b/docs/final-module/4-i6o.html
index c88ca4e88..ec786ff51 100644
--- a/docs/final-module/4-i6o.html
+++ b/docs/final-module/4-i6o.html
@@ -394,7 +394,7 @@ them in two:
*saved = CodeGen::select(gen, classes_I7CGS);text_stream *class_name = InterSymbol::trans(kind_s);text_stream *super_class = NULL;
-inter_symbol *super_name = Inter::Kind::super(kind_s);
+inter_symbol *super_name = Inter::Typename::super(kind_s);if (super_name) super_class = InterSymbol::trans(super_name);text_stream *OUT = CodeGen::current(gen);
@@ -460,7 +460,7 @@ to the VPH VM-object.
intis_dir = FALSE;inter_symbol *K_direction =RunningPipelines::get_symbol(gen->from_step, direction_kind_RPSYM);
-if (K_direction) is_dir = Inter::Kind::is_a(kind_s, K_direction);
+if (K_direction) is_dir = Inter::Typename::is_a(kind_s, K_direction);I6TargetObjects::VM_object_header(gen, InterSymbol::trans(kind_s),InterSymbol::trans(inst_s), NULL, c, is_dir, saved);
@@ -658,7 +658,7 @@ each enumerative kind, and is indexed by weak kind ID.
if (VanillaObjects::weak_id(kind_name) == w) {if (VanillaObjects::value_kind_with_properties(gen, kind_name)) {written = TRUE;
-WRITE(" %d", Inter::Kind::instance_count(kind_name));
+WRITE(" %d", Inter::Typename::instance_count(kind_name)); } } }
diff --git a/docs/final-module/5-com.html b/docs/final-module/5-com.html
index 5bfa037f0..9c90592d6 100644
--- a/docs/final-module/5-com.html
+++ b/docs/final-module/5-com.html
@@ -403,7 +403,7 @@ object is declared. Here is (i):
text_stream *printed_name = Metadata::read_optional_textual(InterPackage::container(kind_s->definition), I"^printed_name");text_stream *super_class = NULL;
-inter_symbol *super_name = Inter::Kind::super(kind_s);
+inter_symbol *super_name = Inter::Typename::super(kind_s);if (super_name) super_class = InterSymbol::trans(super_name);if (Str::len(super_class) == 0) super_class = I"Class";CObjectModel::new_runtime_class(gen, class_name, printed_name, super_class);
@@ -489,7 +489,7 @@ IF run, for example, there is one for the kind "scene".
intc = SymbolAnnotation::get_i(inst_s, ARROW_COUNT_IANN);if (c < 0) c = 0;
-intis_dir = Inter::Kind::is_a(kind_s,
+intis_dir = Inter::Typename::is_a(kind_s,RunningPipelines::get_symbol(gen->from_step, direction_kind_RPSYM));C_property_owner *owner = CObjectModel::new_runtime_object(gtr, gen,InterSymbol::trans(kind_s), InterSymbol::trans(inst_s), c, is_dir);
@@ -855,7 +855,7 @@ for an enumerated kind; or just 0 if the kind is not an enumeration.
if (VanillaObjects::value_kind_with_properties(gen, kind_s)) {written = TRUE;TEMPORARY_TEXT(N)
-WRITE_TO(N, "%d", Inter::Kind::instance_count(kind_s));
+WRITE_TO(N, "%d", Inter::Typename::instance_count(kind_s));CMemoryModel::array_entry(NULL, gen, N, WORD_ARRAY_FORMAT);DISCARD_TEXT(N) }
diff --git a/docs/pipeline-module/2-ns.html b/docs/pipeline-module/2-ns.html
index 04c0b4c17..0f826c7d3 100644
--- a/docs/pipeline-module/2-ns.html
+++ b/docs/pipeline-module/2-ns.html
@@ -103,8 +103,7 @@ function togglePopup(material_id) {
Create the boolean kind1.7;Create the string kind1.8;
-LargeScale::make_architectural_definitions(I, PipelineModule::get_architecture(),
-unchecked_kind_symbol);
+LargeScale::make_architectural_definitions(I, PipelineModule::get_architecture());returnTRUE;}
@@ -154,7 +153,7 @@ base data type matches this".
unchecked_kind_symbol =InterSymbolsTable::create_with_unique_name(InterBookmark::scope(&in_generic_kinds), I"K_unchecked");
-Inter::Kind::new(&in_generic_kinds,
+Inter::Typename::new(&in_generic_kinds,InterSymbolsTable::id_from_symbol(I, generic_kinds_p, unchecked_kind_symbol),UNCHECKED_ITCONC, 0, 0, NULL, (inter_ti) InterBookmark::baseline(&in_generic_kinds) + 1, NULL);
@@ -175,7 +174,7 @@ base data type matches this".
inter_symbol *unchecked_function_symbol =InterSymbolsTable::create_with_unique_name(InterBookmark::scope(&in_generic_kinds), I"K_unchecked_function");
-Inter::Kind::new(&in_generic_kinds,
+Inter::Typename::new(&in_generic_kinds,InterSymbolsTable::id_from_symbol(I, generic_kinds_p, unchecked_function_symbol),FUNCTION_ITCONC, 0, 2, operands, (inter_ti) InterBookmark::baseline(&in_generic_kinds) + 1, NULL);
@@ -196,7 +195,7 @@ base data type matches this".
inter_symbol *unchecked_list_symbol =InterSymbolsTable::create_with_unique_name(InterBookmark::scope(&in_generic_kinds), I"K_unchecked_list");
-Inter::Kind::new(&in_generic_kinds,
+Inter::Typename::new(&in_generic_kinds,InterSymbolsTable::id_from_symbol(I, generic_kinds_p, unchecked_list_symbol),LIST_ITCONC, 0, 1, operands, (inter_ti) InterBookmark::baseline(&in_generic_kinds) + 1, NULL);
@@ -214,7 +213,7 @@ end up being basically the same thing.)
inter_symbol *integer_kind_symbol =InterSymbolsTable::create_with_unique_name(InterBookmark::scope(&in_generic_kinds), I"K_int32");
-Inter::Kind::new(&in_generic_kinds,
+Inter::Typename::new(&in_generic_kinds,InterSymbolsTable::id_from_symbol(I, generic_kinds_p, integer_kind_symbol),INT32_ITCONC, 0, 0, NULL, (inter_ti) InterBookmark::baseline(&in_generic_kinds) + 1, NULL);
@@ -227,7 +226,7 @@ end up being basically the same thing.)
inter_symbol *boolean_kind_symbol =InterSymbolsTable::create_with_unique_name(InterBookmark::scope(&in_generic_kinds), I"K_int2");
-Inter::Kind::new(&in_generic_kinds,
+Inter::Typename::new(&in_generic_kinds,InterSymbolsTable::id_from_symbol(I, generic_kinds_p, boolean_kind_symbol),INT2_ITCONC, 0, 0, NULL, (inter_ti) InterBookmark::baseline(&in_generic_kinds) + 1, NULL);
@@ -240,7 +239,7 @@ end up being basically the same thing.)
inter_symbol *string_kind_symbol =InterSymbolsTable::create_with_unique_name(InterBookmark::scope(&in_generic_kinds), I"K_string");
-Inter::Kind::new(&in_generic_kinds,
+Inter::Typename::new(&in_generic_kinds,InterSymbolsTable::id_from_symbol(I, generic_kinds_p, string_kind_symbol),TEXT_ITCONC, 0, 0, NULL, (inter_ti) InterBookmark::baseline(&in_generic_kinds) + 1, NULL);
diff --git a/docs/pipeline-module/2-pe.html b/docs/pipeline-module/2-pe.html
index 02539c270..c5cf6ffba 100644
--- a/docs/pipeline-module/2-pe.html
+++ b/docs/pipeline-module/2-pe.html
@@ -226,7 +226,7 @@ what the red button marked "danger" does.
-voidPipelineErrors::kit_error(char *message, text_stream *quote) {
+voidPipelineErrors::kit_error(char *message, text_stream *quote) { #ifdefPROBLEMS_MODULETEMPORARY_TEXT(M)WRITE_TO(M, message, quote);
diff --git a/docs/pipeline-module/2-rp.html b/docs/pipeline-module/2-rp.html
index 07dd9c9ae..4bf757902 100644
--- a/docs/pipeline-module/2-rp.html
+++ b/docs/pipeline-module/2-rp.html
@@ -315,11 +315,7 @@ of the step, since running a step changes the Inter tree and could conceivably
move, add or remove some of these symbols.
-
enumobject_kind_RPSYMfrom0enumdirection_kind_RPSYMenumverb_directive_reverse_RPSYMenumverb_directive_slash_RPSYM
@@ -346,7 +342,7 @@ move, add or remove some of these symbols.
defineMAX_RPSYM100
-inter_symbol *RunningPipelines::get_symbol(pipeline_step *step, intid) {
+inter_symbol *RunningPipelines::get_symbol(pipeline_step *step, intid) {if ((id < 0) || (id >= MAX_RPSYM)) internal_error("bad ID");if (step == NULL) internal_error("no step");inter_tree *I = step->ephemera.tree;
@@ -378,21 +374,9 @@ move, add or remove some of these symbols.
step->ephemera.cached_symbols[to_phrase_ptype_RPSYM] =LargeScale::package_type(I, I"_to_phrase"); break;
-caseunchecked_kind_RPSYM:
-step->ephemera.cached_symbols[unchecked_kind_RPSYM] =
-LargeScale::find_symbol_in_tree(I, I"K_unchecked"); break;
-caseunchecked_function_RPSYM:
-step->ephemera.cached_symbols[unchecked_function_RPSYM] =
-LargeScale::find_symbol_in_tree(I, I"K_unchecked_function"); break;
-caselist_of_unchecked_kind_RPSYM:
-step->ephemera.cached_symbols[list_of_unchecked_kind_RPSYM] =
-LargeScale::find_symbol_in_tree(I, I"K_unchecked_list"); break;caseobject_kind_RPSYM:step->ephemera.cached_symbols[object_kind_RPSYM] =LargeScale::find_symbol_in_tree(I, I"K_object"); break;
-casetruth_state_kind_RPSYM:
-step->ephemera.cached_symbols[truth_state_kind_RPSYM] =
-LargeScale::find_symbol_in_tree(I, I"K_int2"); break;casedirection_kind_RPSYM:step->ephemera.cached_symbols[direction_kind_RPSYM] =LargeScale::find_symbol_in_tree(I, I"K3_direction"); break;
diff --git a/docs/pipeline-module/3-css.html b/docs/pipeline-module/3-css.html
index ff8c7c15d..8f8c3a421 100644
--- a/docs/pipeline-module/3-css.html
+++ b/docs/pipeline-module/3-css.html
@@ -119,14 +119,6 @@ function definition, that is quite a lot of work.
-voidEmitArrays::end(packaging_statesave) {
+voidEmitArrays::end(packaging_statesave) {EmitArrays::end_inner();Packaging::exit(Emit::tree(), save);}
@@ -225,7 +231,7 @@ We do this with a stack of these objects, one for each such array:
lifo_stack *emission_array_stack = NULL; of nascent_array
-nascent_array *EmitArrays::current(void) {
+nascent_array *EmitArrays::current(void) {if (emission_array_stack)returnTOP_OF_LIFO_STACK(nascent_array, emission_array_stack);returnNULL;
@@ -238,7 +244,7 @@ after each use.
-nascent_array *EmitArrays::push_new(void) {
+nascent_array *EmitArrays::push_new(void) {if (emission_array_stack == NULL)emission_array_stack = NEW_LIFO_STACK(nascent_array);nascent_array *A = CREATE(nascent_array);
@@ -252,7 +258,7 @@ after each use.
returnA;}
-nascent_array *EmitArrays::pull(void) {
+nascent_array *EmitArrays::pull(void) {if (emission_array_stack)returnPULL_FROM_LIFO_STACK(nascent_array, emission_array_stack);internal_error("no array stack");
@@ -263,10 +269,10 @@ after each use.
"Emitting" is the process of generating Inter bytecode, and this section provides a comprehensive API for the runtime and imperative modules to do that.
§1. The emission tree. The bytecode module can maintain multiple independent trees of Inter code
in memory, so that most calls to bytecode or building take an inter_tree
@@ -93,27 +93,27 @@ creates the main
LargeScale::begin_new_tree(main_emission_tree);returnmain_emission_tree;}
-inter_tree *Emit::tree(void) {
+inter_tree *Emit::tree(void) {returnmain_emission_tree;}
-inter_tiEmit::symbol_id(inter_symbol *S) {
+inter_tiEmit::symbol_id(inter_symbol *S) {returnInterSymbolsTable::id_from_symbol_at_bookmark(Emit::at(), S);}
-inter_warehouse *Emit::warehouse(void) {
+inter_warehouse *Emit::warehouse(void) {returnInterTree::warehouse(Emit::tree());}
-inter_bookmark *Emit::at(void) {
+inter_bookmark *Emit::at(void) {returnPackaging::at(Emit::tree());}
-inter_tiEmit::baseline(void) {
+inter_tiEmit::baseline(void) {returnProduce::baseline(Emit::at());}
-inter_package *Emit::package(void) {
+inter_package *Emit::package(void) {returnInterBookmark::package(Emit::at());}
@@ -145,7 +145,7 @@ what package it belongs to, the "context" referred to below:
-voidEmit::symbol_to_value_pair(inter_ti *v1, inter_ti *v2, inter_symbol *S) {
+voidEmit::symbol_to_value_pair(inter_ti *v1, inter_ti *v2, inter_symbol *S) {Emit::stvp_inner(S, v1, v2, InterBookmark::package(Emit::at()));}
@@ -153,7 +153,7 @@ what package it belongs to, the "context" referred to below:
Emit::stvp_inner(InterNames::to_symbol(iname), v1, v2, InterBookmark::package(Emit::at()));}
-voidEmit::to_value_pair_in_context(inter_name *context, inter_ti *v1, inter_ti *v2,
+voidEmit::to_value_pair_in_context(inter_name *context, inter_ti *v1, inter_ti *v2,inter_name *iname) {inter_package *pack = Packaging::incarnate(InterNames::location(context));inter_symbol *S = InterNames::to_symbol(iname);
@@ -169,82 +169,17 @@ what package it belongs to, the "context" referred to below:
*v1 = LITERAL_IVAL; *v2 = 0;}
-
§4. Kinds. Inter has a very simple, and non-binding, system of "kinds" — a much simpler
-one than Inform. We need symbols to refer to some basic Inter kinds, and here
-they are. (See also New Stage (in pipeline), where a matching set is made for
-other Inter business: we want to keep this minimum set matching.)
-
-
-
The way these are created is typical. First we ask Hierarchy for the
-Inter tree position of what we're intending to make. Then call Packaging::enter_home_of
-to move the emission point to the current end of the package in question; then
-we compile what it is we actually want to make; and then call Packaging::exit
-again to return to where we were.
-
§5. This emits a more general Inter kind, and is used by Kind Declarations.
-Here idt is one of the *_IDT constants expressing what actual data is held;
-super is the superkind, if any; the other three arguments are for kind
-constructors.
+
§4. Kinds. Inter has a very simple, and non-binding, system of "typenames" — a much simpler
+system than Inform's hierarchy of kinds. Here we create a typename corresponding
+to each kind whose data we will need to use in Inter. super is the superkind,
+if any; constructor is one of the codes defined in Inter Data Types (in bytecode);
+the other three arguments are for kind constructors.
§7. Default values for kinds are emitted thus. This is inefficient and maybe ought
+
§6. Default values for kinds are emitted thus. This is inefficient and maybe ought
to be replaced by a hash, but the list is short and the function is called
so little that it probably makes little difference.
@@ -285,7 +217,7 @@ so little that it probably makes little difference.
linked_list *default_values_written = NULL;
-voidEmit::ensure_defaultvalue(kind *K) {
+voidEmit::ensure_defaultvalue(kind *K) {if (K == K_value) return;if (default_values_written == NULL) default_values_written = NEW_LINKED_LIST(kind);kind *L;
@@ -297,85 +229,88 @@ so little that it probably makes little difference.
DefaultValues::to_value_pair(&v1, &v2, K);if (v1 != 0) {packaging_statesave = Packaging::enter(RTKindConstructors::kind_package(K));
-inter_symbol *owner_kind = Produce::kind_to_symbol(K);Produce::guard(Inter::DefaultValue::new(Emit::at(),
-Emit::symbol_id(owner_kind), v1, v2, Emit::baseline(), NULL));
+Produce::kind_to_TID(Emit::at(), K), v1, v2,
+Emit::baseline(), NULL));Packaging::exit(Emit::tree(), save); }}
-
§8. Pragmas. The Inter language allows pragmas, or code-generation hints, to be passed
+
§7. Pragmas. The Inter language allows pragmas, or code-generation hints, to be passed
through. These are specific to the target of compilation, and can be ignored
by all other targets. Here we generate only I6-target pragmas, which are commands
in I6's "Inform Control Language".
§9. Constants. These functions make it easy to define a named value in Inter. If the value is
+
§8. Constants. These functions make it easy to define a named value in Inter. If the value is
an unsigned numeric constant, use one of these two functions — the first if
it represents an actual number at run-time, the second if not:
-voidEmit::propertyvalue(property *P, inter_name *owner, inter_tiv1, inter_tiv2) {
+voidEmit::propertyvalue(property *P, inter_name *owner, inter_tiv1, inter_tiv2) {inter_symbol *prop_s = InterNames::to_symbol(RTProperties::iname(P));inter_symbol *owner_s = InterNames::to_symbol(owner);Produce::guard(Inter::PropertyValue::new(Emit::at(),
@@ -514,7 +450,7 @@ of a "variable" and define it as a constant:
Emit::symbol_id(owner_s), v1, v2, Emit::baseline(), NULL));}
-
§19. Private, keep out. The following should be called only by Functions (in imperative), which provides
+
§18. Private, keep out. The following should be called only by Functions (in imperative), which provides
the real API for starting and ending functions.
@@ -522,20 +458,19 @@ the real API for starting and ending functions.
voidEmit::function(inter_name *fn_iname, kind *K, inter_package *block) {if (Emit::at() == NULL) internal_error("no inter repository");inter_symbol *fn_s = InterNames::to_symbol(fn_iname);
-inter_symbol *kind_s = Produce::kind_to_symbol(K);Produce::guard(Inter::Constant::new_function(Emit::at(),
-Emit::symbol_id(fn_s), Emit::symbol_id(kind_s), block,
+Emit::symbol_id(fn_s), Produce::kind_to_TID(Emit::at(), K), block,Emit::baseline(), NULL));}
-
§20. Interventions. These should be used as little as possible, and perhaps it may one day be possible
+
§19. Interventions. These should be used as little as possible, and perhaps it may one day be possible
to abolish them altogether. They insert direct kit material (i.e. paraphrased Inter
code written out as plain text in Inform 6 notation) into bytecode; this is then
assimilating during linking.
§8.5. The "perform" function for an action, typically called something like TakeSub,
diff --git a/docs/runtime-module/5-chr.html b/docs/runtime-module/5-chr.html
index c5e594dc3..7c3716fff 100644
--- a/docs/runtime-module/5-chr.html
+++ b/docs/runtime-module/5-chr.html
@@ -198,7 +198,7 @@ past state to be maintained.
ptc->ptc_package = PR;ptc->ptc_iname = NULL;id_iname = Hierarchy::make_iname_in(PTC_ID_HL, ptc->ptc_package);
-Emit::numeric_constant(id_iname, 0); a placeholder: made unique in linking
+Emit::numeric_constant(id_iname, 0); a placeholder: made unique in linkingtext_stream *desc = Str::new();WRITE_TO(desc, "past tense condition %d", ptc->allocation_id);Sequence::queue(&Chronology::ptc_agent,
@@ -254,7 +254,7 @@ then, that past state is available, and can be accessed with a simple function c
}Functions::end(save);inter_name *md_iname = Hierarchy::make_iname_in(PTC_VALUE_MD_HL, ptc->ptc_package);
-Emit::iname_constant(md_iname, K_value, ptc->ptc_iname);
+Emit::iname_constant(md_iname, K_value, ptc->ptc_iname);}
§4.1. Compile code to set the new state of the condition, as measured in the present4.1 =
@@ -379,7 +379,7 @@ taken something" would be a past tense condition: see above.)
Sequence::queue(&Chronology::ahcr_agent,STORE_POINTER_action_history_condition_record(ahcr), desc);id_iname = Hierarchy::make_iname_in(AHC_ID_HL, ahcr->ahcr_package);
-Emit::numeric_constant(id_iname, 0); a placeholder: made unique in linking
+Emit::numeric_constant(id_iname, 0); a placeholder: made unique in linking
§7.2. The test compiled here relies entirely on a slew of arrays being correctly
@@ -533,7 +533,7 @@ the pattern, and otherwise false.
Functions::end(save);inter_name *md_iname = Hierarchy::make_iname_in(AHC_VALUE_MD_HL, ahcr->ahcr_package);
-Emit::iname_constant(md_iname, K_value, ahcr->ahcr_iname);
+Emit::iname_constant(md_iname, K_value, ahcr->ahcr_iname);}
§7.4. These provide hints to the code-generator, but should possibly be done as
diff --git a/docs/runtime-module/5-rlb.html b/docs/runtime-module/5-rlb.html
index 8ad943a8a..ed2929b1b 100644
--- a/docs/runtime-module/5-rlb.html
+++ b/docs/runtime-module/5-rlb.html
@@ -317,7 +317,7 @@ rulebook:
diff --git a/docs/runtime-module/5-si.html b/docs/runtime-module/5-si.html
index 7ac97a1a3..0ceb98c68 100644
--- a/docs/runtime-module/5-si.html
+++ b/docs/runtime-module/5-si.html
@@ -175,7 +175,7 @@ occurs, and (b) act upon it.
EmitCode::rfalse();Functions::end(save);inter_name *md_iname = Hierarchy::make_iname_in(INSTANCE_SCF_MD_HL, pack);
-Emit::iname_constant(md_iname, K_value, iname);
+Emit::iname_constant(md_iname, K_value, iname);}
§3.1. Recall that ends numbered 1, 2, 3, ... are all ways for the scene to end,
@@ -630,7 +630,7 @@ what handles this for the scene in question.
Functions::end(save);inter_name *md_iname = Hierarchy::make_iname_in(INSTANCE_SSF_MD_HL,RTInstances::package(sc->as_instance));
-Emit::iname_constant(md_iname, K_value, iname);
+Emit::iname_constant(md_iname, K_value, iname);}
@@ -193,8 +193,8 @@ should be able to fake the date-stamp with dates of their own choosing.
intyear_digits = (the_present->tm_year) % 100;WRITE_TO(SN, "%02d%02d%02d",year_digits, (the_present->tm_mon)+1, the_present->tm_mday);
-Emit::text_constant(Hierarchy::find(SERIAL_MD_HL), BibliographicData::read_uuid());
-Emit::serial_number(iname, SN);
+Emit::text_constant(Hierarchy::find(SERIAL_MD_HL), BibliographicData::read_uuid());
+Emit::serial_number(iname, SN);DISCARD_TEXT(SN)Hierarchy::make_available(iname);
@@ -207,38 +207,38 @@ not compile to any data in the object code:
§5. In-table storage. Some kinds of non-object are created by table, with the table columns holding the
diff --git a/docs/runtime-module/6-pv.html b/docs/runtime-module/6-pv.html
index 8216ea750..6bca364dd 100644
--- a/docs/runtime-module/6-pv.html
+++ b/docs/runtime-module/6-pv.html
@@ -174,7 +174,7 @@ value the property will have, and compiles a clause as appropriate.
Properties::compile_inferred_value(&VH, subj, prn);inter_tiv1 = LITERAL_IVAL, v2 = 0;Holsters::unholster_to_pair(&VH, &v1, &v2);
-Emit::propertyvalue(prn, RTPropertyPermissions::owner(subj), v1, v2);
+Emit::propertyvalue(prn, RTPropertyPermissions::owner(subj), v1, v2);Packaging::exit(Emit::tree(), save); }
diff --git a/docs/runtime-module/6-tm.html b/docs/runtime-module/6-tm.html
index 25b8f7406..ca74fcabe 100644
--- a/docs/runtime-module/6-tm.html
+++ b/docs/runtime-module/6-tm.html
@@ -79,7 +79,7 @@ at run-time, so we can't know now how many we will need.