mirror of
https://github.com/ganelson/inform.git
synced 2024-07-05 16:44:21 +03:00
Rehoused still more constants
This commit is contained in:
parent
70db838d64
commit
56644ba1b7
|
@ -300,7 +300,7 @@ plural:verbs
|
||||||
|
|
||||||
instance-of:WORD_VALUE_TY
|
instance-of:WORD_VALUE_TY
|
||||||
instance-of:SAYABLE_VALUE_TY
|
instance-of:SAYABLE_VALUE_TY
|
||||||
default-value:ConjugateVerb_0
|
default-value:0
|
||||||
|
|
||||||
loop-domain-schema:for (*2=0, *1=TableOfVerbs-->*2: *1: *2++, *1=TableOfVerbs-->*2)
|
loop-domain-schema:for (*2=0, *1=TableOfVerbs-->*2: *1: *2++, *1=TableOfVerbs-->*2)
|
||||||
i6-printing-routine:PrintVerbAsValue
|
i6-printing-routine:PrintVerbAsValue
|
||||||
|
|
|
@ -89,7 +89,12 @@ particular order.
|
||||||
|
|
||||||
=
|
=
|
||||||
int Kinds::Knowledge::emit_all(void) {
|
int Kinds::Knowledge::emit_all(void) {
|
||||||
Emit::named_numeric_constant(InterNames::iname(MAX_WEAK_ID_INAME), (inter_t) next_free_data_type_ID);
|
package_request *PR = Packaging::request_resource(NULL, BASICS_SUBPACKAGE);
|
||||||
|
inter_name *iname = InterNames::iname(MAX_WEAK_ID_INAME);
|
||||||
|
Packaging::house(iname, PR);
|
||||||
|
packaging_state save = Packaging::enter_home_of(iname);
|
||||||
|
Emit::named_numeric_constant(iname, (inter_t) next_free_data_type_ID);
|
||||||
|
Packaging::exit(save);
|
||||||
Kinds::Knowledge::emit_recursive(Kinds::Knowledge::as_subject(K_object));
|
Kinds::Knowledge::emit_recursive(Kinds::Knowledge::as_subject(K_object));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -185,7 +185,9 @@ void Plugins::Manage::start(void) {
|
||||||
|
|
||||||
CREATE_PLUGIN(files_plugin, PL::Files::start, FALSE, GLULX_EXTERNAL_FILES_PLUGIN_NAME, MULTIMEDIA_PLUGIN_NAME);
|
CREATE_PLUGIN(files_plugin, PL::Files::start, FALSE, GLULX_EXTERNAL_FILES_PLUGIN_NAME, MULTIMEDIA_PLUGIN_NAME);
|
||||||
files_plugin->has_template_file = "Files";
|
files_plugin->has_template_file = "Files";
|
||||||
|
package_request *PR = Packaging::request_resource(NULL, BASICS_SUBPACKAGE);
|
||||||
files_plugin->IFDEF_iname = InterNames::iname(PLUGIN_FILES_INAME);
|
files_plugin->IFDEF_iname = InterNames::iname(PLUGIN_FILES_INAME);
|
||||||
|
Packaging::house(files_plugin->IFDEF_iname, PR);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MULTIMEDIA_MODULE
|
#ifndef MULTIMEDIA_MODULE
|
||||||
|
@ -316,8 +318,11 @@ void Plugins::Manage::show(OUTPUT_STREAM, char *label, int state) {
|
||||||
void Plugins::Manage::define_IFDEF_symbols(void) {
|
void Plugins::Manage::define_IFDEF_symbols(void) {
|
||||||
plugin *P;
|
plugin *P;
|
||||||
LOOP_OVER(P, plugin)
|
LOOP_OVER(P, plugin)
|
||||||
if ((P->now_plugged_in) && (P->IFDEF_iname))
|
if ((P->now_plugged_in) && (P->IFDEF_iname)) {
|
||||||
|
packaging_state save = Packaging::enter_home_of(P->IFDEF_iname);
|
||||||
Emit::named_numeric_constant(P->IFDEF_iname, 0);
|
Emit::named_numeric_constant(P->IFDEF_iname, 0);
|
||||||
|
Packaging::exit(save);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ =
|
@ =
|
||||||
|
|
|
@ -237,8 +237,12 @@ void PL::Parsing::TestScripts::new_test_text(parse_node *PN) {
|
||||||
test->no_possessions = 0;
|
test->no_possessions = 0;
|
||||||
test->text_of_script = Str::new();
|
test->text_of_script = Str::new();
|
||||||
|
|
||||||
test->text_iname = InterNames::new(TEST_TEXTS_INAMEF);
|
package_request *PR = Packaging::request_resource(Modules::find(current_sentence), GRAMMAR_SUBPACKAGE);
|
||||||
test->req_iname = InterNames::new(TEST_REQS_INAMEF);
|
package_request *PR2 = Packaging::request(Packaging::supply_iname(PR, TEST_PR_COUNTER), PR, test_ptype);
|
||||||
|
test->text_iname = InterNames::one_off(I"script", PR2);
|
||||||
|
test->req_iname = InterNames::one_off(I"requirements", PR2);
|
||||||
|
Inter::Symbols::set_flag(InterNames::to_symbol(test->text_iname), MAKE_NAME_UNIQUE);
|
||||||
|
Inter::Symbols::set_flag(InterNames::to_symbol(test->req_iname), MAKE_NAME_UNIQUE);
|
||||||
|
|
||||||
ts_being_parsed = test;
|
ts_being_parsed = test;
|
||||||
<test-sentence-object>(ParseTree::get_text(PN->next->next));
|
<test-sentence-object>(ParseTree::get_text(PN->next->next));
|
||||||
|
@ -267,6 +271,7 @@ void PL::Parsing::TestScripts::check_test_command(text_stream *p) {
|
||||||
void PL::Parsing::TestScripts::write_text(void) {
|
void PL::Parsing::TestScripts::write_text(void) {
|
||||||
test_scenario *test;
|
test_scenario *test;
|
||||||
LOOP_OVER(test, test_scenario) {
|
LOOP_OVER(test, test_scenario) {
|
||||||
|
packaging_state save = Packaging::enter_home_of(test->text_iname);
|
||||||
Emit::named_byte_array_begin(test->text_iname, K_text);
|
Emit::named_byte_array_begin(test->text_iname, K_text);
|
||||||
TEMPORARY_TEXT(tttext);
|
TEMPORARY_TEXT(tttext);
|
||||||
CompiledText::from_stream(tttext, test->text_of_script,
|
CompiledText::from_stream(tttext, test->text_of_script,
|
||||||
|
@ -285,12 +290,19 @@ void PL::Parsing::TestScripts::write_text(void) {
|
||||||
}
|
}
|
||||||
Emit::array_numeric_entry(0);
|
Emit::array_numeric_entry(0);
|
||||||
Emit::array_end();
|
Emit::array_end();
|
||||||
|
Packaging::exit(save);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PL::Parsing::TestScripts::NO_TEST_SCENARIOS_constant(void) {
|
void PL::Parsing::TestScripts::NO_TEST_SCENARIOS_constant(void) {
|
||||||
if (NUMBER_CREATED(test_scenario) > 0)
|
if (NUMBER_CREATED(test_scenario) > 0) {
|
||||||
Emit::named_numeric_constant(InterNames::iname(NO_TEST_SCENARIOS_INAME), (inter_t) NUMBER_CREATED(test_scenario));
|
package_request *PR = Packaging::request_resource(NULL, BASICS_SUBPACKAGE);
|
||||||
|
inter_name *iname = InterNames::iname(NO_TEST_SCENARIOS_INAME);
|
||||||
|
Packaging::house(iname, PR);
|
||||||
|
packaging_state save = Packaging::enter_home_of(iname);
|
||||||
|
Emit::named_numeric_constant(iname, (inter_t) NUMBER_CREATED(test_scenario));
|
||||||
|
Packaging::exit(save);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PL::Parsing::TestScripts::TestScriptSub_routine(void) {
|
void PL::Parsing::TestScripts::TestScriptSub_routine(void) {
|
||||||
|
|
|
@ -196,41 +196,43 @@ inter_name *VirtualMachines::emit_unchecked_hex_fundamental_constant(int id, int
|
||||||
inter_name *VirtualMachines::emit_fundamental_constants(void) {
|
inter_name *VirtualMachines::emit_fundamental_constants(void) {
|
||||||
if (target_VM == -1) internal_error("target VM not set yet");
|
if (target_VM == -1) internal_error("target VM not set yet");
|
||||||
|
|
||||||
|
package_request *basics = Packaging::request_resource(NULL, BASICS_SUBPACKAGE);
|
||||||
|
|
||||||
if ((this_is_a_release_compile == FALSE) || (this_is_a_debug_compile))
|
if ((this_is_a_release_compile == FALSE) || (this_is_a_debug_compile))
|
||||||
Emit::named_numeric_constant(InterNames::iname(DEBUG_INAME), 1);
|
VirtualMachines::emit_fundamental_constant(DEBUG_INAME, 1, basics);
|
||||||
|
|
||||||
if (table_of_VM_data[target_VM].VM_code == Z_VM) {
|
if (table_of_VM_data[target_VM].VM_code == Z_VM) {
|
||||||
Emit::named_numeric_constant(InterNames::iname(TARGET_ZCODE_INAME), 1);
|
VirtualMachines::emit_fundamental_constant(TARGET_ZCODE_INAME, 1, basics);
|
||||||
Emit::named_numeric_constant(InterNames::iname(DICT_WORD_SIZE_INAME), 6);
|
VirtualMachines::emit_fundamental_constant(DICT_WORD_SIZE_INAME, 6, basics);
|
||||||
} else if (table_of_VM_data[target_VM].VM_code == GLULX_VM) {
|
} else if (table_of_VM_data[target_VM].VM_code == GLULX_VM) {
|
||||||
Emit::named_numeric_constant(InterNames::iname(TARGET_GLULX_INAME), 1);
|
VirtualMachines::emit_fundamental_constant(TARGET_GLULX_INAME, 1, basics);
|
||||||
Emit::named_numeric_constant(InterNames::iname(DICT_WORD_SIZE_INAME), 9);
|
VirtualMachines::emit_fundamental_constant(DICT_WORD_SIZE_INAME, 9, basics);
|
||||||
}
|
}
|
||||||
|
|
||||||
inter_name *NULL_iname = NULL;
|
inter_name *NULL_iname = NULL;
|
||||||
|
|
||||||
if (table_of_VM_data[target_VM].VM_is_32_bit) {
|
if (table_of_VM_data[target_VM].VM_is_32_bit) {
|
||||||
VirtualMachines::emit_fundamental_constant(WORDSIZE_INAME, 4, Packaging::request_resource(NULL, BASICS_SUBPACKAGE));
|
VirtualMachines::emit_fundamental_constant(WORDSIZE_INAME, 4, basics);
|
||||||
NULL_iname = VirtualMachines::emit_unchecked_hex_fundamental_constant(NULL_INAME, 0xffffffff, Packaging::request_resource(NULL, BASICS_SUBPACKAGE));
|
NULL_iname = VirtualMachines::emit_unchecked_hex_fundamental_constant(NULL_INAME, 0xffffffff, basics);
|
||||||
VirtualMachines::emit_hex_fundamental_constant(WORD_HIGHBIT_INAME, 0x80000000, Packaging::request_resource(NULL, BASICS_SUBPACKAGE));
|
VirtualMachines::emit_hex_fundamental_constant(WORD_HIGHBIT_INAME, 0x80000000, basics);
|
||||||
VirtualMachines::emit_hex_fundamental_constant(WORD_NEXTTOHIGHBIT_INAME, 0x40000000, Packaging::request_resource(NULL, BASICS_SUBPACKAGE));
|
VirtualMachines::emit_hex_fundamental_constant(WORD_NEXTTOHIGHBIT_INAME, 0x40000000, basics);
|
||||||
VirtualMachines::emit_hex_fundamental_constant(IMPROBABLE_VALUE_INAME, 0xdeadce11, Packaging::request_resource(NULL, BASICS_SUBPACKAGE));
|
VirtualMachines::emit_hex_fundamental_constant(IMPROBABLE_VALUE_INAME, 0xdeadce11, basics);
|
||||||
VirtualMachines::emit_hex_fundamental_constant(REPARSE_CODE_INAME, 0x40000000, Packaging::request_resource(NULL, BASICS_SUBPACKAGE));
|
VirtualMachines::emit_hex_fundamental_constant(REPARSE_CODE_INAME, 0x40000000, basics);
|
||||||
MPN_iname = VirtualMachines::emit_fundamental_constant(MAX_POSITIVE_NUMBER_INAME, 2147483647, Packaging::request_resource(NULL, BASICS_SUBPACKAGE));
|
MPN_iname = VirtualMachines::emit_fundamental_constant(MAX_POSITIVE_NUMBER_INAME, 2147483647, basics);
|
||||||
VirtualMachines::emit_signed_fundamental_constant(MIN_NEGATIVE_NUMBER_INAME, -2147483648, Packaging::request_resource(NULL, BASICS_SUBPACKAGE));
|
VirtualMachines::emit_signed_fundamental_constant(MIN_NEGATIVE_NUMBER_INAME, -2147483648, basics);
|
||||||
InterNames::cache(InterNames::iname(MAX_POSITIVE_NUMBER_INAME));
|
InterNames::cache(InterNames::iname(MAX_POSITIVE_NUMBER_INAME));
|
||||||
InterNames::cache(InterNames::iname(MIN_NEGATIVE_NUMBER_INAME));
|
InterNames::cache(InterNames::iname(MIN_NEGATIVE_NUMBER_INAME));
|
||||||
InterNames::to_symbol(InterNames::iname(MAX_POSITIVE_NUMBER_INAME));
|
InterNames::to_symbol(InterNames::iname(MAX_POSITIVE_NUMBER_INAME));
|
||||||
InterNames::to_symbol(InterNames::iname(MIN_NEGATIVE_NUMBER_INAME));
|
InterNames::to_symbol(InterNames::iname(MIN_NEGATIVE_NUMBER_INAME));
|
||||||
} else {
|
} else {
|
||||||
VirtualMachines::emit_fundamental_constant(WORDSIZE_INAME, 2, Packaging::request_resource(NULL, BASICS_SUBPACKAGE));
|
VirtualMachines::emit_fundamental_constant(WORDSIZE_INAME, 2, basics);
|
||||||
NULL_iname = VirtualMachines::emit_unchecked_hex_fundamental_constant(NULL_INAME, 0xffff, Packaging::request_resource(NULL, BASICS_SUBPACKAGE));
|
NULL_iname = VirtualMachines::emit_unchecked_hex_fundamental_constant(NULL_INAME, 0xffff, basics);
|
||||||
VirtualMachines::emit_hex_fundamental_constant(WORD_HIGHBIT_INAME, 0x8000, Packaging::request_resource(NULL, BASICS_SUBPACKAGE));
|
VirtualMachines::emit_hex_fundamental_constant(WORD_HIGHBIT_INAME, 0x8000, basics);
|
||||||
VirtualMachines::emit_hex_fundamental_constant(WORD_NEXTTOHIGHBIT_INAME, 0x4000, Packaging::request_resource(NULL, BASICS_SUBPACKAGE));
|
VirtualMachines::emit_hex_fundamental_constant(WORD_NEXTTOHIGHBIT_INAME, 0x4000, basics);
|
||||||
VirtualMachines::emit_hex_fundamental_constant(IMPROBABLE_VALUE_INAME, 0x7fe3, Packaging::request_resource(NULL, BASICS_SUBPACKAGE));
|
VirtualMachines::emit_hex_fundamental_constant(IMPROBABLE_VALUE_INAME, 0x7fe3, basics);
|
||||||
VirtualMachines::emit_hex_fundamental_constant(REPARSE_CODE_INAME, 10000, Packaging::request_resource(NULL, BASICS_SUBPACKAGE));
|
VirtualMachines::emit_hex_fundamental_constant(REPARSE_CODE_INAME, 10000, basics);
|
||||||
MPN_iname = VirtualMachines::emit_fundamental_constant(MAX_POSITIVE_NUMBER_INAME, 32767, Packaging::request_resource(NULL, BASICS_SUBPACKAGE));
|
MPN_iname = VirtualMachines::emit_fundamental_constant(MAX_POSITIVE_NUMBER_INAME, 32767, basics);
|
||||||
VirtualMachines::emit_signed_fundamental_constant(MIN_NEGATIVE_NUMBER_INAME, -32768, Packaging::request_resource(NULL, BASICS_SUBPACKAGE));
|
VirtualMachines::emit_signed_fundamental_constant(MIN_NEGATIVE_NUMBER_INAME, -32768, basics);
|
||||||
InterNames::cache(InterNames::iname(MAX_POSITIVE_NUMBER_INAME));
|
InterNames::cache(InterNames::iname(MAX_POSITIVE_NUMBER_INAME));
|
||||||
InterNames::cache(InterNames::iname(MIN_NEGATIVE_NUMBER_INAME));
|
InterNames::cache(InterNames::iname(MIN_NEGATIVE_NUMBER_INAME));
|
||||||
InterNames::to_symbol(InterNames::iname(MAX_POSITIVE_NUMBER_INAME));
|
InterNames::to_symbol(InterNames::iname(MAX_POSITIVE_NUMBER_INAME));
|
||||||
|
|
|
@ -25,6 +25,7 @@ inter_symbol *rulebook_ptype = NULL;
|
||||||
inter_symbol *table_ptype = NULL;
|
inter_symbol *table_ptype = NULL;
|
||||||
inter_symbol *table_column_ptype = NULL;
|
inter_symbol *table_column_ptype = NULL;
|
||||||
inter_symbol *relation_ptype = NULL;
|
inter_symbol *relation_ptype = NULL;
|
||||||
|
inter_symbol *test_ptype = NULL;
|
||||||
inter_symbol *data_ptype = NULL;
|
inter_symbol *data_ptype = NULL;
|
||||||
|
|
||||||
@ =
|
@ =
|
||||||
|
@ -73,6 +74,8 @@ void Packaging::emit_types(void) {
|
||||||
Emit::guard(Inter::PackageType::new_packagetype(Emit::IRS(), table_column_ptype, Emit::baseline(Emit::IRS()), NULL));
|
Emit::guard(Inter::PackageType::new_packagetype(Emit::IRS(), table_column_ptype, Emit::baseline(Emit::IRS()), NULL));
|
||||||
relation_ptype = Emit::new_symbol(Inter::get_global_symbols(Emit::repository()), I"_relation");
|
relation_ptype = Emit::new_symbol(Inter::get_global_symbols(Emit::repository()), I"_relation");
|
||||||
Emit::guard(Inter::PackageType::new_packagetype(Emit::IRS(), relation_ptype, Emit::baseline(Emit::IRS()), NULL));
|
Emit::guard(Inter::PackageType::new_packagetype(Emit::IRS(), relation_ptype, Emit::baseline(Emit::IRS()), NULL));
|
||||||
|
test_ptype = Emit::new_symbol(Inter::get_global_symbols(Emit::repository()), I"_test");
|
||||||
|
Emit::guard(Inter::PackageType::new_packagetype(Emit::IRS(), test_ptype, Emit::baseline(Emit::IRS()), NULL));
|
||||||
data_ptype = Emit::new_symbol(Inter::get_global_symbols(Emit::repository()), I"_data");
|
data_ptype = Emit::new_symbol(Inter::get_global_symbols(Emit::repository()), I"_data");
|
||||||
Emit::guard(Inter::PackageType::new_packagetype(Emit::IRS(), data_ptype, Emit::baseline(Emit::IRS()), NULL));
|
Emit::guard(Inter::PackageType::new_packagetype(Emit::IRS(), data_ptype, Emit::baseline(Emit::IRS()), NULL));
|
||||||
}
|
}
|
||||||
|
@ -108,6 +111,7 @@ void Packaging::emit_types(void) {
|
||||||
@e SUBSTITUTIONF_PR_COUNTER
|
@e SUBSTITUTIONF_PR_COUNTER
|
||||||
@e MISC_PR_COUNTER
|
@e MISC_PR_COUNTER
|
||||||
@e DATA_PR_COUNTER
|
@e DATA_PR_COUNTER
|
||||||
|
@e TEST_PR_COUNTER
|
||||||
|
|
||||||
@e MAX_PR_COUNTER
|
@e MAX_PR_COUNTER
|
||||||
|
|
||||||
|
@ -207,6 +211,7 @@ packaging_state Packaging::enter(package_request *R) {
|
||||||
(S->eventual_type == table_ptype) ||
|
(S->eventual_type == table_ptype) ||
|
||||||
(S->eventual_type == table_column_ptype) ||
|
(S->eventual_type == table_column_ptype) ||
|
||||||
(S->eventual_type == data_ptype) ||
|
(S->eventual_type == data_ptype) ||
|
||||||
|
(S->eventual_type == test_ptype) ||
|
||||||
(S->parent_request == NULL)) {
|
(S->parent_request == NULL)) {
|
||||||
current_enclosure = S;
|
current_enclosure = S;
|
||||||
break;
|
break;
|
||||||
|
@ -426,6 +431,7 @@ inter_name *Packaging::supply_iname(package_request *R, int what_for) {
|
||||||
case SUBSTITUTION_PR_COUNTER: WRITE_TO(P, "ts"); break;
|
case SUBSTITUTION_PR_COUNTER: WRITE_TO(P, "ts"); break;
|
||||||
case SUBSTITUTIONF_PR_COUNTER: WRITE_TO(P, "ts_fn"); break;
|
case SUBSTITUTIONF_PR_COUNTER: WRITE_TO(P, "ts_fn"); break;
|
||||||
case MISC_PR_COUNTER: WRITE_TO(P, "misc_const"); break;
|
case MISC_PR_COUNTER: WRITE_TO(P, "misc_const"); break;
|
||||||
|
case TEST_PR_COUNTER: WRITE_TO(P, "test"); break;
|
||||||
case DATA_PR_COUNTER: WRITE_TO(P, "data"); break;
|
case DATA_PR_COUNTER: WRITE_TO(P, "data"); break;
|
||||||
default: internal_error("unimplemented");
|
default: internal_error("unimplemented");
|
||||||
}
|
}
|
||||||
|
|
|
@ -278,7 +278,12 @@ actually means it's rarely needed.)
|
||||||
if (P_cap_short_name == NULL) {
|
if (P_cap_short_name == NULL) {
|
||||||
P_cap_short_name = Properties::Valued::new_nameless(
|
P_cap_short_name = Properties::Valued::new_nameless(
|
||||||
I"cap_short_name", K_text);
|
I"cap_short_name", K_text);
|
||||||
Emit::named_numeric_constant(InterNames::iname(CAP_SHORT_NAME_EXISTS_INAME), 1);
|
package_request *PR = Packaging::request_resource(NULL, BASICS_SUBPACKAGE);
|
||||||
|
inter_name *iname = InterNames::iname(CAP_SHORT_NAME_EXISTS_INAME);
|
||||||
|
Packaging::house(iname, PR);
|
||||||
|
packaging_state save = Packaging::enter_home_of(iname);
|
||||||
|
Emit::named_numeric_constant(iname, 1);
|
||||||
|
Packaging::exit(save);
|
||||||
}
|
}
|
||||||
if (faux)
|
if (faux)
|
||||||
Properties::Valued::assert(P_cap_short_name, subj,
|
Properties::Valued::assert(P_cap_short_name, subj,
|
||||||
|
|
|
@ -51,11 +51,16 @@ void PL::Score::compile_max_score(void) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
package_request *PR = Packaging::synoptic_resource(IF_SUBPACKAGE);
|
||||||
|
inter_name *iname = InterNames::iname(INITIAL_MAX_SCORE_INAME);
|
||||||
|
Packaging::house(iname, PR);
|
||||||
|
packaging_state save = Packaging::enter_home_of(iname);
|
||||||
if (NonlocalVariables::has_initial_value_set(max_score_VAR)) {
|
if (NonlocalVariables::has_initial_value_set(max_score_VAR)) {
|
||||||
inter_t v1 = 0, v2 = 0;
|
inter_t v1 = 0, v2 = 0;
|
||||||
NonlocalVariables::seek_initial_value(&v1, &v2, max_score_VAR);
|
NonlocalVariables::seek_initial_value(&v1, &v2, max_score_VAR);
|
||||||
Emit::named_generic_constant(InterNames::iname(INITIAL_MAX_SCORE_INAME), v1, v2);
|
Emit::named_generic_constant(iname, v1, v2);
|
||||||
} else {
|
} else {
|
||||||
Emit::named_numeric_constant(InterNames::iname(INITIAL_MAX_SCORE_INAME), 0);
|
Emit::named_numeric_constant(iname, 0);
|
||||||
}
|
}
|
||||||
|
Packaging::exit(save);
|
||||||
}
|
}
|
||||||
|
|
|
@ -987,6 +987,7 @@ int PL::Actions::can_be_compiled_in_past_tense(action_name *an) {
|
||||||
inter_name *PL::Actions::compile_action_bitmap_property(instance *I) {
|
inter_name *PL::Actions::compile_action_bitmap_property(instance *I) {
|
||||||
package_request *R = Packaging::request_main();
|
package_request *R = Packaging::request_main();
|
||||||
if (I) R = Instances::package(I);
|
if (I) R = Instances::package(I);
|
||||||
|
else R = Kinds::Behaviour::package(K_object);
|
||||||
packaging_state save = Packaging::enter(R);
|
packaging_state save = Packaging::enter(R);
|
||||||
inter_name *N = Packaging::supply_iname(R, INLINE_PR_COUNTER);
|
inter_name *N = Packaging::supply_iname(R, INLINE_PR_COUNTER);
|
||||||
Emit::named_array_begin(N, K_number);
|
Emit::named_array_begin(N, K_number);
|
||||||
|
|
|
@ -448,9 +448,13 @@ void PL::Parsing::Lines::MistakeActionSub_routine(void) {
|
||||||
Emit::up();
|
Emit::up();
|
||||||
|
|
||||||
Routines::end(save);
|
Routines::end(save);
|
||||||
|
package_request *PR = Packaging::request_resource(NULL, ACTIONS_SUBPACKAGE);
|
||||||
MistakeAction_iname = InterNames::iname(MistakeAction_INAME);
|
MistakeAction_iname = InterNames::iname(MistakeAction_INAME);
|
||||||
|
Packaging::house(MistakeAction_iname, PR);
|
||||||
|
save = Packaging::enter_home_of(MistakeAction_iname);
|
||||||
Emit::named_pseudo_numeric_constant(MistakeAction_iname, K_action_name, 10000);
|
Emit::named_pseudo_numeric_constant(MistakeAction_iname, K_action_name, 10000);
|
||||||
InterNames::annotate_i(MistakeAction_iname, ACTION_IANN, 1);
|
InterNames::annotate_i(MistakeAction_iname, ACTION_IANN, 1);
|
||||||
|
Packaging::exit(save);
|
||||||
}
|
}
|
||||||
|
|
||||||
@h Single word optimisation.
|
@h Single word optimisation.
|
||||||
|
|
Loading…
Reference in a new issue