From 7af87e52067d35dfcc101b541db9913ac8d2fce8 Mon Sep 17 00:00:00 2001
From: Graham Nelson
This is also where the originals (not the released copies) of the Figures -and Sounds, if any, live: in their own subfolders. -
-filename *Task::large_cover_art_file(int JPEG) { if (inform7_task == NULL) internal_error("there is no current task"); @@ -483,21 +479,28 @@ and Sounds, if any, live: in their own subfolders. if (inform7_task == NULL) internal_error("there is no current task"); return Filenames::in(inform7_task->materials, I"Inform Map.eps"); } ++
§17. This is also where the originals (not the released copies) of the Figures +and Sounds, if any, live: in their own subfolders, or "departments". +
-pathname *Task::figures_path(void) { ++pathname *Task::resources_path(void) { if (inform7_task == NULL) internal_error("there is no current task"); - return Pathnames::down(inform7_task->materials, I"Figures"); + return inform7_task->materials; } -pathname *Task::sounds_path(void) { - if (inform7_task == NULL) internal_error("there is no current task"); - return Pathnames::down(inform7_task->materials, I"Sounds"); + +text_stream *Task::figures_department(void) { + return I"Figures"; } -pathname *Task::data_path(void) { - if (inform7_task == NULL) internal_error("there is no current task"); - return Pathnames::down(inform7_task->materials, I"Data"); +text_stream *Task::sounds_department(void) { + return I"Sounds"; +} +text_stream *Task::data_department(void) { + return I"Data"; }-
§17. On a release run, Inblorb will populate the Release subfolder of Materials; +
§18. On a release run, Inblorb will populate the Release subfolder of Materials; figures and sounds will be copied into the relevant subfolders. The principle is that everything in Release can always be thrown away without loss, because it can all be generated again. @@ -509,16 +512,16 @@ it can all be generated again. return Pathnames::down(inform7_task->materials, I"Release"); } pathname *Task::released_figures_path(void) { - return Pathnames::down(Task::release_path(), I"Figures"); + return Pathnames::down(Task::release_path(), I"Figures"); } pathname *Task::released_sounds_path(void) { - return Pathnames::down(Task::release_path(), I"Sounds"); + return Pathnames::down(Task::release_path(), I"Sounds"); } pathname *Task::released_interpreter_path(void) { - return Pathnames::down(Task::release_path(), I"interpreter"); + return Pathnames::down(Task::release_path(), I"interpreter"); } -
§18. EPS-format files are vector art, rather than raster art, and are produced +
§19. EPS-format files are vector art, rather than raster art, and are produced with the intention that authors can tidy them up afterwards using programs like Adobe Illustrator. By default they aren't produced, so that the following flag stays FALSE: @@ -544,7 +547,7 @@ flag stays FALSE return do_not_generate_problems?FALSE:TRUE; } -
§19. And so, finally, the following triggers the indexing process. +
§20. And so, finally, the following triggers the indexing process.
diff --git a/docs/core-module/2-pwst.html b/docs/core-module/2-pwst.html index 409540fe1..da6c2fbd2 100644 --- a/docs/core-module/2-pwst.html +++ b/docs/core-module/2-pwst.html @@ -89,6 +89,16 @@ group. "Specifically, %2."); Problems::issue_problem_end(); break; + case EXT_BAD_DIRNAME_CE: + Problems::quote_work(1, CE->copy->found_by->work); + Problems::quote_stream(2, CE->details); + StandardProblems::handmade_problem(Task::syntax_tree(), _p_(Untestable)); + Problems::issue_problem_segment( + "The extension %1, which your source text makes use of, is stored " + "in a directory (which is fine), but does not follow the rules for " + "what that directory is called (which is not fine). Specifically, %2."); + Problems::issue_problem_end(); + break; case METADATA_MALFORMED_CE: if (CE->copy->found_by) { Problems::quote_work(1, CE->copy->found_by->work); diff --git a/docs/index-module/3-fe.html b/docs/index-module/3-fe.html index 8b731f943..58258e178 100644 --- a/docs/index-module/3-fe.html +++ b/docs/index-module/3-fe.html @@ -324,15 +324,15 @@ to match this width, preserving the aspect ratio. WRITE_TO(description, "<br>"); TEMPORARY_TEXT(sample) WRITE_TO(sample, "%d.%01dkHz", pSampleRate/1000, (pSampleRate%1000)/100); - Localisation::roman_t(OUT, LD, I"Index.Elements.Fi.Sampled", sample); + Localisation::roman_t(description, LD, I"Index.Elements.Fi.Sampled", sample); DISCARD_TEXT(sample) WRITE_TO(description, " "); if (pChannels == 1) Localisation::roman(OUT, LD, I"Index.Elements.Fi.Mono"); - else Localisation::roman(OUT, LD, I"Index.Elements.Fi.Stereo"); + else Localisation::roman(description, LD, I"Index.Elements.Fi.Stereo"); WRITE_TO(description, " ("); TEMPORARY_TEXT(bitrate) WRITE_TO(bitrate, "%d.%01d", pBitsPerSecond/1000, (pSampleRate%1000)/100); - Localisation::roman_t(OUT, LD, I"Index.Elements.Fi.BitRate", bitrate); + Localisation::roman_t(description, LD, I"Index.Elements.Fi.BitRate", bitrate); DISCARD_TEXT(bitrate) WRITE_TO(description, ")");diff --git a/docs/inform7/1-mn.html b/docs/inform7/1-mn.html index 4853fb389..9f008b1d6 100644 --- a/docs/inform7/1-mn.html +++ b/docs/inform7/1-mn.html @@ -175,14 +175,14 @@ isn't set up to allow more, so this error is not easy to generate. } if ((proj) && (proj->stand_alone)) { if (index_explicitly_set == FALSE) - Task::disable_or_enable_index(TRUE); disable it + Task::disable_or_enable_index(TRUE); disable it if (problems_explicitly_set == FALSE) - Task::disable_or_enable_problems(TRUE); disable it + Task::disable_or_enable_problems(TRUE); disable it ProgressBar::enable_or_disable(FALSE); disable it if (Log::get_debug_log_filename() == NULL) Log::set_aspect_from_command_line(I"nothing", TRUE); } - if (silence_is_golden) Task::disable_or_enable_problems(TRUE); disable it + if (silence_is_golden) Task::disable_or_enable_problems(TRUE); disable it
§2.3. supervisor supplies us with a folder in which to write the debugging log
@@ -212,7 +212,7 @@ but we won't assume that. Remember, CommandLine::play_back_log();
}
if (proj) {
- if (Task::problems_enabled()) {
+ if (Task::problems_enabled()) {
pathname *build_folder = Projects::build_path(proj);
filename *PF = Filenames::in(build_folder, I"Problems.html");
StandardProblems::start_problems_report(PF);
@@ -412,6 +412,7 @@ compiler via Delia scripts in enum SIGILS_CLSW
enum TEST_OUTPUT_CLSW
enum SILENCE_CLSW
+enum CHECK_RESOURCES_CLSW
§4.2. Register command-line arguments4.2 =
§3. Memory consumption. The following gives some idea of which classes of object have the most
instances, and also of how Inform's memory tends to be used in practice.
@@ -109,53 +109,53 @@ represent less than 1/1000th of the total.
§4. Preform grammar. The full annotated description of the Preform grammar (see About Preform (in words)),
with optimisation details and hit/miss statistics added, is also long: it's
@@ -419,7 +419,7 @@ sample, showing the nonterminal used to parse literals in Inform 7 source text:
100.0% in inform7 run
- 71.2% in compilation to Inter
- 50.4% in Sequence::undertake_queued_tasks
- 4.8% in MajorNodes::pre_pass
- 3.4% in MajorNodes::pass_1
- 2.0% in RTPhrasebook::compile_entries
- 1.8% in ImperativeDefinitions::assess_all
- 1.4% in RTKindConstructors::compile
- 1.0% in Sequence::lint_inter
- 0.6% in MajorNodes::pass_2
- 0.6% in World::stage_V
- 0.4% in ImperativeDefinitions::compile_first_block
- 0.4% in Sequence::undertake_queued_tasks
- 0.4% in Sequence::undertake_queued_tasks
- 0.2% in CompletionModule::compile
- 0.2% in InferenceSubjects::emit_all
- 0.2% in RTKindConstructors::compile_permissions
- 0.2% in Task::make_built_in_kind_constructors
- 3.2% not specifically accounted for
+ 70.9% in compilation to Inter
+ 50.3% in Sequence::undertake_queued_tasks
+ 4.9% in MajorNodes::pre_pass
+ 3.3% in MajorNodes::pass_1
+ 1.7% in ImperativeDefinitions::assess_all
+ 1.3% in RTKindConstructors::compile
+ 1.3% in RTPhrasebook::compile_entries
+ 1.1% in Sequence::lint_inter
+ 0.5% in MajorNodes::pass_2
+ 0.5% in Sequence::undertake_queued_tasks
+ 0.5% in Sequence::undertake_queued_tasks
+ 0.5% in World::stage_V
+ 0.3% in ImperativeDefinitions::compile_first_block
+ 0.1% in CompletionModule::compile
+ 0.1% in InferenceSubjects::emit_all
+ 0.1% in RTKindConstructors::compile_permissions
+ 0.1% in Task::make_built_in_kind_constructors
+ 2.8% not specifically accounted for
25.8% in running Inter pipeline
- 10.2% in step 14/15: generate inform6 -> auto.inf
- 5.6% in step 5/15: load-binary-kits
- 5.2% in step 6/15: make-synoptic-module
- 1.8% in step 9/15: make-identifiers-unique
- 0.4% in step 12/15: eliminate-redundant-operations
- 0.4% in step 4/15: compile-splats
- 0.4% in step 7/15: shorten-wiring
- 0.4% in step 8/15: detect-indirect-calls
- 0.2% in step 11/15: eliminate-redundant-labels
- 1.2% not specifically accounted for
- 2.6% in supervisor
- 0.4% not specifically accounted for
+ 10.1% in step 14/15: generate inform6 -> auto.inf
+ 5.7% in step 5/15: load-binary-kits
+ 5.3% in step 6/15: make-synoptic-module
+ 1.7% in step 9/15: make-identifiers-unique
+ 0.3% in step 12/15: eliminate-redundant-operations
+ 0.3% in step 4/15: compile-splats
+ 0.3% in step 7/15: shorten-wiring
+ 0.3% in step 8/15: detect-indirect-calls
+ 0.1% in step 11/15: eliminate-redundant-labels
+ 0.9% not specifically accounted for
+ 2.5% in supervisor
+ 0.6% not specifically accounted for
-Total memory consumption was 123441K = 121 MB
+Total memory consumption was 121434K = 119 MB
- ---- was used for 2056836 objects, in 366558 frames in 0 x 800K = 0K = 0 MB:
+ ---- was used for 2058109 objects, in 366643 frames in 0 x 800K = 0K = 0 MB:
- 33.0% inter_tree_node_array 58 x 8192 = 475136 objects, 41813824 bytes
- 20.6% text_stream_array 4639 x 100 = 463900 objects, 26126848 bytes
- 19.5% linked_list 44089 objects, 24689840 bytes
- 11.2% inter_symbol_array 133 x 1024 = 136192 objects, 14168224 bytes
- 10.5% inter_error_stash_array 102 x 1024 = 104448 objects, 13372608 bytes
- 8.2% parse_node 130351 objects, 10428080 bytes
- 6.0% verb_conjugation 164 objects, 7610912 bytes
+ 33.6% inter_tree_node_array 58 x 8192 = 475136 objects, 41813824 bytes
+ 21.0% text_stream_array 4649 x 100 = 464900 objects, 26183168 bytes
+ 19.8% linked_list 44171 objects, 24735760 bytes
+ 11.3% inter_symbol_array 133 x 1024 = 136192 objects, 14168224 bytes
+ 10.7% inter_error_stash_array 102 x 1024 = 104448 objects, 13372608 bytes
+ 8.3% parse_node 130355 objects, 10428400 bytes
+ 6.1% verb_conjugation 164 objects, 7610912 bytes
4.4% parse_node_annotation_array 348 x 500 = 174000 objects, 5579136 bytes
- 2.6% pcalc_prop_array 25 x 1000 = 25000 objects, 3400800 bytes
+ 2.7% pcalc_prop_array 25 x 1000 = 25000 objects, 3400800 bytes
2.5% inter_name_array 67 x 1000 = 67000 objects, 3218144 bytes
2.1% kind_array 67 x 1000 = 67000 objects, 2682144 bytes
- 1.7% scan_directory 528 objects, 2179584 bytes
+ 1.8% scan_directory 548 objects, 2262144 bytes
1.6% inter_name_generator_array 51 x 1000 = 51000 objects, 2041632 bytes
- 1.6% inter_schema_token 14131 objects, 2034864 bytes
+ 1.6% inter_schema_token 14043 objects, 2022192 bytes
1.4% package_request 21191 objects, 1864808 bytes
1.4% vocabulary_entry_array 164 x 100 = 16400 objects, 1842048 bytes
- 1.2% dict_entry_array 475 x 100 = 47500 objects, 1535200 bytes
- 1.1% match_trie_array 11 x 1000 = 11000 objects, 1496352 bytes
- 1.1% inter_symbols_table 26612 objects, 1490272 bytes
- 1.0% i6_schema_array 23 x 100 = 2300 objects, 1380736 bytes
- 1.0% inter_package 26612 objects, 1277376 bytes
- 0.8% map_data 677 objects, 1137360 bytes
+ 1.2% dict_entry_array 477 x 100 = 47700 objects, 1541664 bytes
+ 1.2% match_trie_array 11 x 1000 = 11000 objects, 1496352 bytes
+ 1.1% inter_symbols_table 26637 objects, 1491672 bytes
+ 1.1% i6_schema_array 23 x 100 = 2300 objects, 1380736 bytes
+ 1.0% inter_package 26637 objects, 1278576 bytes
+ 0.9% map_data 677 objects, 1137360 bytes
0.8% id_body 947 objects, 1083368 bytes
- 0.7% adjective_meaning 202 objects, 1000304 bytes
+ 0.8% adjective_meaning 202 objects, 1000304 bytes
0.7% excerpt_meaning 3122 objects, 974064 bytes
- 0.7% production 3956 objects, 917792 bytes
- 0.7% ptoken 8587 objects, 893048 bytes
- 0.6% grammatical_usage 3641 objects, 873840 bytes
- 0.6% inter_schema_node 9056 objects, 869376 bytes
+ 0.7% production 3957 objects, 918024 bytes
+ 0.7% ptoken 8588 objects, 893152 bytes
+ 0.7% grammatical_usage 3641 objects, 873840 bytes
0.6% individual_form 2571 objects, 863856 bytes
+ 0.6% inter_schema_node 8968 objects, 860928 bytes
0.5% unary_predicate_array 16 x 1000 = 16000 objects, 640512 bytes
0.3% local_variable_array 47 x 100 = 4700 objects, 452704 bytes
0.3% verb_usage 1148 objects, 394912 bytes
0.2% rule 470 objects, 368480 bytes
- 0.2% dictionary 7622 objects, 365856 bytes
+ 0.2% dictionary 7661 objects, 367728 bytes
0.2% verb_form 388 objects, 350752 bytes
0.2% noun 2389 objects, 286680 bytes
0.2% compilation_subtask 3367 objects, 269360 bytes
0.2% inference_subject 672 objects, 263424 bytes
0.2% inter_annotation_array 2 x 8192 = 16384 objects, 262208 bytes
- 0.1% vanilla_function 3706 objects, 237184 bytes
+ 0.1% vanilla_function 3716 objects, 237824 bytes
0.1% binary_predicate 326 objects, 172128 bytes
- 0.1% hierarchy_location 1172 objects, 168768 bytes
+ 0.1% hierarchy_location 1178 objects, 169632 bytes
0.1% linguistic_stock_item 3329 objects, 159792 bytes
0.1% rule_family_data 401 objects, 147568 bytes
0.1% nonterminal 773 objects, 142232 bytes
@@ -192,8 +192,8 @@ represent less than 1/1000th of the total.
---- heading 204 objects, 45696 bytes
---- text_substitution 437 objects, 41952 bytes
---- to_family_data 502 objects, 40160 bytes
- ---- activity_list_array 1 x 1000 objects, 40032 bytes
---- anl_clause_array 1 x 1000 objects, 40032 bytes
+ ---- activity_list_array 1 x 1000 objects, 40032 bytes
---- shared_variable_access_list_array 12 x 100 = 1200 objects, 38784 bytes
---- parsing_data 677 objects, 37912 bytes
---- production_list 630 objects, 35280 bytes
@@ -212,17 +212,17 @@ represent less than 1/1000th of the total.
---- action_name 90 objects, 20160 bytes
---- filename 489 objects, 19560 bytes
---- timed_rules_rfd_data 401 objects, 19248 bytes
- ---- method 384 objects, 18432 bytes
+ ---- method 390 objects, 18720 bytes
---- pcalc_prop_deferral 86 objects, 17888 bytes
---- instance 167 objects, 17368 bytes
- ---- JSON_value 194 objects, 17072 bytes
+ ---- JSON_value 195 objects, 17160 bytes
---- to_phrase_request 62 objects, 16864 bytes
---- build_vertex 138 objects, 16560 bytes
+ ---- pathname 403 objects, 16120 bytes
---- understanding_reference_array 2 x 100 = 200 objects, 16064 bytes
- ---- match_avinue_array 1 x 1000 objects, 16032 bytes
---- action_name_list_array 1 x 1000 objects, 16032 bytes
+ ---- match_avinue_array 1 x 1000 objects, 16032 bytes
---- adjective 137 objects, 15344 bytes
- ---- pathname 383 objects, 15320 bytes
---- parse_node_tree 17 objects, 14824 bytes
---- booking_list 407 objects, 13024 bytes
---- adjective_iname_holder 320 objects, 12800 bytes
@@ -247,37 +247,37 @@ represent less than 1/1000th of the total.
---- value_property_data 84 objects, 4704 bytes
---- parsing_pp_data 96 objects, 4608 bytes
---- build_script 138 objects, 4416 bytes
- ---- command_line_switch 49 objects, 3920 bytes
+ ---- command_line_switch 51 objects, 4080 bytes
---- compatibility_specification 80 objects, 3840 bytes
---- parse_node_annotation_type 119 objects, 3808 bytes
---- submodule_request 85 objects, 3400 bytes
+ ---- method_set 106 objects, 3392 bytes
---- property_setting_bp_data 84 objects, 3360 bytes
- ---- method_set 105 objects, 3360 bytes
---- kind_constructor_comparison_schema_array 1 x 100 objects, 3232 bytes
---- semver_range 31 objects, 3224 bytes
+ ---- inform_extension 16 objects, 3200 bytes
---- definition 44 objects, 3168 bytes
---- either_or_property_data 62 objects, 2976 bytes
---- target_vm 20 objects, 2880 bytes
- ---- inform_extension 16 objects, 2688 bytes
---- use_option 29 objects, 2552 bytes
- ---- parentage_inference_data 79 objects, 2528 bytes
---- part_of_inference_data 79 objects, 2528 bytes
- ---- kind_constructor_instance_array 1 x 100 objects, 2432 bytes
+ ---- parentage_inference_data 79 objects, 2528 bytes
---- kind_constructor_casting_rule_array 1 x 100 objects, 2432 bytes
+ ---- kind_constructor_instance_array 1 x 100 objects, 2432 bytes
---- equation_symbol 30 objects, 2400 bytes
---- scene 1 object, 2352 bytes
---- JSON_type 31 objects, 2232 bytes
---- JSON_single_requirement 43 objects, 2064 bytes
---- build_step 28 objects, 2016 bytes
- ---- compiler_feature 30 objects, 1680 bytes
---- pronoun_usage 42 objects, 1680 bytes
+ ---- compiler_feature 30 objects, 1680 bytes
---- table_contribution_array 1 x 100 objects, 1632 bytes
---- inform_pipeline 24 objects, 1536 bytes
---- noun_filter_token 22 objects, 1408 bytes
---- inter_node_array 35 objects, 1400 bytes
---- special_meaning_holder 35 objects, 1400 bytes
- ---- table_column 16 objects, 1280 bytes
---- constant_phrase 20 objects, 1280 bytes
+ ---- table_column 16 objects, 1280 bytes
---- invocation_options_array 1 x 100 objects, 1224 bytes
---- direction_inference_data 30 objects, 1200 bytes
---- JSON_requirement 36 objects, 1152 bytes
@@ -286,8 +286,8 @@ represent less than 1/1000th of the total.
---- submodule_identity 33 objects, 1056 bytes
---- runtime_kind_structure 13 objects, 1040 bytes
---- quantifier 16 objects, 1024 bytes
- ---- pipeline_stage 20 objects, 960 bytes
---- named_rulebook_outcome 15 objects, 960 bytes
+ ---- pipeline_stage 20 objects, 960 bytes
---- control_structure_phrase 12 objects, 864 bytes
---- web_md 6 objects, 864 bytes
---- cached_understanding 21 objects, 840 bytes
@@ -300,20 +300,20 @@ represent less than 1/1000th of the total.
---- implication 13 objects, 624 bytes
---- code_generation 1 object, 576 bytes
---- generated_segment 14 objects, 560 bytes
- ---- inter_annotation_form 14 objects, 560 bytes
---- inter_warehouse_room 10 objects, 560 bytes
+ ---- inter_annotation_form 14 objects, 560 bytes
---- rulebook_outcome 17 objects, 544 bytes
- ---- small_word_set 11 objects, 528 bytes
---- chapter_md 6 objects, 528 bytes
- ---- module 6 objects, 480 bytes
- ---- equation 4 objects, 480 bytes
+ ---- small_word_set 11 objects, 528 bytes
---- inform_language 6 objects, 480 bytes
- ---- bp_family 14 objects, 448 bytes
+ ---- equation 4 objects, 480 bytes
+ ---- module 6 objects, 480 bytes
---- i6_memory_setting 14 objects, 448 bytes
+ ---- bp_family 14 objects, 448 bytes
---- inference_family 11 objects, 440 bytes
---- article_usage 8 objects, 384 bytes
+ ---- inbuild_genre 8 objects, 384 bytes
---- source_file 5 objects, 360 bytes
- ---- inbuild_genre 7 objects, 336 bytes
---- tree_inventory 1 object, 320 bytes
---- grammatical_category 8 objects, 320 bytes
---- pronoun 8 objects, 320 bytes
@@ -323,52 +323,52 @@ represent less than 1/1000th of the total.
---- inter_pipeline 1 object, 312 bytes
---- up_family 9 objects, 288 bytes
---- compilation_unit 5 objects, 280 bytes
- ---- contents_entry 7 objects, 280 bytes
---- explicit_bp_data 5 objects, 280 bytes
+ ---- contents_entry 7 objects, 280 bytes
---- door_to_notice 5 objects, 280 bytes
+ ---- inbuild_nest 7 objects, 280 bytes
---- verb_usage_tier 5 objects, 240 bytes
- ---- inform_project 1 object, 224 bytes
---- adjective_meaning_family 7 objects, 224 bytes
+ ---- inform_project 1 object, 224 bytes
---- test_scenario 1 object, 216 bytes
---- release_instructions 1 object, 208 bytes
- ---- code_generator 5 objects, 200 bytes
---- build_skill 5 objects, 200 bytes
+ ---- code_generator 5 objects, 200 bytes
---- plural_dictionary_entry 4 objects, 192 bytes
---- kit_dependency 4 objects, 192 bytes
+ ---- element_activation 6 objects, 192 bytes
---- imperative_defn_family 4 objects, 160 bytes
---- inter_architecture 4 objects, 160 bytes
- ---- element_activation 5 objects, 160 bytes
---- attachment_instruction 4 objects, 160 bytes
---- inference_subject_family 5 objects, 160 bytes
- ---- inbuild_nest 3 objects, 120 bytes
---- local_block_value 2 objects, 112 bytes
---- inform_kit_ittt 2 objects, 96 bytes
---- article 2 objects, 80 bytes
- ---- group_together_function 2 objects, 80 bytes
---- compile_task_data 1 object, 80 bytes
+ ---- group_together_function 2 objects, 80 bytes
+ ---- figures_data 1 object, 56 bytes
---- inter_warehouse 1 object, 56 bytes
---- build_methodology 1 object, 56 bytes
- ---- figures_data 1 object, 56 bytes
- ---- HTML_file_state 1 object, 48 bytes
---- star_invention 1 object, 48 bytes
+ ---- HTML_file_state 1 object, 48 bytes
+ ---- kind_template_definition 1 object, 40 bytes
---- by_function_bp_data 1 object, 40 bytes
---- I6_generation_data 1 object, 40 bytes
---- loop_over_scope 1 object, 40 bytes
- ---- kind_template_definition 1 object, 40 bytes
100.0% was used for memory not allocated for objects:
- 57.6% text stream storage 72845148 bytes in 481444 claims
- 4.2% dictionary storage 5313536 bytes in 7622 claims
- ---- sorting 1568 bytes in 159 claims
- 5.6% source text 7200000 bytes in 3 claims
- 8.5% source text details 10800000 bytes in 2 claims
+ 56.9% text stream storage 70764524 bytes in 482127 claims
+ 4.2% dictionary storage 5335040 bytes in 7661 claims
+ ---- sorting 1696 bytes in 183 claims
+ 5.7% source text 7200000 bytes in 3 claims
+ 8.6% source text details 10800000 bytes in 2 claims
0.2% documentation fragments 262144 bytes in 1 claim
---- linguistic stock array 81920 bytes in 2 claims
---- small word set array 105600 bytes in 22 claims
- 3.6% inter symbols storage 4558048 bytes in 27977 claims
- 13.2% inter bytecode storage 16767448 bytes in 14 claims
- 4.9% inter links storage 6222976 bytes in 11 claims
+ 3.6% inter symbols storage 4562240 bytes in 28004 claims
+ 13.4% inter bytecode storage 16767540 bytes in 14 claims
+ 5.0% inter links storage 6222976 bytes in 11 claims
0.1% inter tree location list storage 191232 bytes in 32 claims
1.3% instance-of-kind counting 1731856 bytes in 1 claim
---- compilation workspace for objects 22136 bytes in 25 claims
@@ -376,7 +376,7 @@ represent less than 1/1000th of the total.
---- code generation workspace for objects 3480 bytes in 19 claims
0.2% emitter array storage 280544 bytes in 2001 claims
--147.-8% was overhead - -186919368 bytes = -182538K = -178 MB
+-150.-4% was overhead - -187098264 bytes = -182713K = -178 MB
enum OPEN_FAILED_CE from 1 enum METADATA_MALFORMED_CE enum EXT_MISWORDED_CE +enum EXT_BAD_DIRNAME_CE enum EXT_TITLE_TOO_LONG_CE enum EXT_AUTHOR_TOO_LONG_CE enum LEXER_CE an error generated by the words module @@ -121,7 +122,7 @@ fields are blank. return CE; } -copy_error *CopyErrors::new_T(int cat, int subcat, text_stream *NB) { +copy_error *CopyErrors::new_T(int cat, int subcat, text_stream *NB) { copy_error *CE = CopyErrors::new(cat, subcat); CE->details = Str::duplicate(NB); return CE; @@ -191,6 +192,7 @@ output. switch (CE->error_category) { case OPEN_FAILED_CE: WRITE("unable to open file %f", CE->details_file); break; case EXT_MISWORDED_CE: WRITE("extension misworded: %S", CE->details); break; + case EXT_BAD_DIRNAME_CE: WRITE("extension directory name wrong: %S", CE->details); break; case METADATA_MALFORMED_CE: WRITE("%S has incorrect metadata: %S", CE->copy->edition->work->genre->genre_name, CE->details); break; case EXT_TITLE_TOO_LONG_CE: WRITE("title too long: %d characters (max is %d)", diff --git a/docs/supervisor-module/2-cps.html b/docs/supervisor-module/2-cps.html index 9f99415c1..a2fb3684b 100644 --- a/docs/supervisor-module/2-cps.html +++ b/docs/supervisor-module/2-cps.html @@ -147,7 +147,7 @@ for later reporting. These are stored in a list.-void Copies::attach_error(inbuild_copy *C, copy_error *CE) { +void Copies::attach_error(inbuild_copy *C, copy_error *CE) { if (C == NULL) internal_error("no copy to attach to"); CopyErrors::supply_attached_copy(CE, C); ADD_TO_LINKED_LIST(CE, copy_error, C->errors_reading_source_text); diff --git a/docs/supervisor-module/4-ebm.html b/docs/supervisor-module/4-ebm.html index c77a8c3d4..54fbca36d 100644 --- a/docs/supervisor-module/4-ebm.html +++ b/docs/supervisor-module/4-ebm.html @@ -109,7 +109,8 @@ which stores data about extensions used by the Inform compiler. } dictionary *eb_copy_cache = NULL; -inbuild_copy *ExtensionBundleManager::new_copy(text_stream *name, pathname *P, inbuild_nest *N) { +inbuild_copy *ExtensionBundleManager::new_copy(text_stream *name, pathname *P, + inbuild_nest *N, semantic_version_number apparent_V) { if (eb_copy_cache == NULL) eb_copy_cache = Dictionaries::new(16, FALSE); TEMPORARY_TEXT(key) WRITE_TO(key, "%p", P); @@ -118,13 +119,29 @@ which stores data about extensions used by the Inform compiler. C = Dictionaries::read_value(eb_copy_cache, key); if (C == NULL) { inbuild_work *work = Works::new_raw(extension_bundle_genre, - Str::duplicate(Pathnames::directory_name(P)), + Str::duplicate(name), Str::duplicate(Pathnames::directory_name(Pathnames::up(P)))); inbuild_edition *edition = Editions::new(work, VersionNumbers::null()); C = Copies::new_in_path(edition, P, N); Extensions::scan(C); Dictionaries::create(eb_copy_cache, key); Dictionaries::write_value(eb_copy_cache, key, C); + if (VersionNumbers::is_null(apparent_V)) { + TEMPORARY_TEXT(error_text) + WRITE_TO(error_text, + "an extension in directory format must have a directory name ending " + "'-vN', giving the version number: for example, 'Advanced Algebra-v2_3_6'"); + Copies::attach_error(C, CopyErrors::new_T(EXT_BAD_DIRNAME_CE, -1, error_text)); + DISCARD_TEXT(error_text) + } else if (VersionNumbers::ne(apparent_V, C->edition->version)) { + TEMPORARY_TEXT(error_text) + WRITE_TO(error_text, + "the version number '%v' is not the one implied by the directory " + "name '%S', which would be '%v'", + &(C->edition->version), Pathnames::directory_name(P), &apparent_V); + Copies::attach_error(C, CopyErrors::new_T(EXT_BAD_DIRNAME_CE, -1, error_text)); + DISCARD_TEXT(error_text) + } } DISCARD_TEXT(key) return C; @@ -157,7 +174,13 @@ copy name. filename *canary = Filenames::in(P, I"extension_metadata.json"); if (TextFiles::exists(canary)) { text_stream *name = Str::duplicate(Pathnames::directory_name(P)); - return ExtensionBundleManager::new_copy(name, P, N); + semantic_version_number V = VersionNumbers::null(); + match_results mr = Regexp::create_mr(); + if (Regexp::match(&mr, name, L"(%c+)-v([0-9_]+)")) { + name = Str::duplicate(mr.exp[0]); + V = VersionNumbers::from_text(mr.exp[1]); + } + return ExtensionBundleManager::new_copy(name, P, N, V); } return NULL; } diff --git a/docs/supervisor-module/5-es.html b/docs/supervisor-module/5-es.html index 52c2e6244..19cacc267 100644 --- a/docs/supervisor-module/5-es.html +++ b/docs/supervisor-module/5-es.html @@ -543,7 +543,7 @@ are immutable, and need to be for the extensions dictionary to work. pathname *P = C->location_if_path; if (P) { TEMPORARY_TEXT(leaf) - WRITE_TO(leaf, "%S.i7x", Pathnames::directory_name(P)); + WRITE_TO(leaf, "%S.i7x", C->edition->work->title); F = Filenames::in(Pathnames::down(P, I"Source"), leaf); DISCARD_TEXT(leaf) } diff --git a/docs/supervisor-module/5-ps.html b/docs/supervisor-module/5-ps.html index f71aaa72c..c7a147ae7 100644 --- a/docs/supervisor-module/5-ps.html +++ b/docs/supervisor-module/5-ps.html @@ -72,7 +72,7 @@ in the following structure. CLASS_DEFINITION } inform_pipeline;-
§2. This is called as soon as a new copy C of the language genre is created.
diff --git a/docs/supervisor-module/5-ps2.html b/docs/supervisor-module/5-ps2.html index eba6dd648..6f8c12648 100644 --- a/docs/supervisor-module/5-ps2.html +++ b/docs/supervisor-module/5-ps2.html @@ -93,7 +93,7 @@ function togglePopup(material_id) { CLASS_DEFINITION } inform_project; -§2. This is called as soon as a new copy C of the language genre is created. It doesn't actually do any scanning to speak of, in fact: we may eventually learn a lot about the project, but for now we simply initialise to bland diff --git a/docs/supervisor-module/5-ts.html b/docs/supervisor-module/5-ts.html index 04588eb94..4024f50d3 100644 --- a/docs/supervisor-module/5-ts.html +++ b/docs/supervisor-module/5-ts.html @@ -72,7 +72,7 @@ stored in the following structure. CLASS_DEFINITION } inform_template; -
§2. This is called as soon as a new copy C of the language genre is created.
diff --git a/inbuild/supervisor-module/Chapter 2/Copy Errors.w b/inbuild/supervisor-module/Chapter 2/Copy Errors.w index 1762e17b9..2bf899e8c 100644 --- a/inbuild/supervisor-module/Chapter 2/Copy Errors.w +++ b/inbuild/supervisor-module/Chapter 2/Copy Errors.w @@ -15,6 +15,7 @@ fields are blank. @e OPEN_FAILED_CE from 1 @e METADATA_MALFORMED_CE @e EXT_MISWORDED_CE +@e EXT_BAD_DIRNAME_CE @e EXT_TITLE_TOO_LONG_CE @e EXT_AUTHOR_TOO_LONG_CE @e LEXER_CE /* an error generated by the |words| module */ @@ -127,6 +128,7 @@ void CopyErrors::write(OUTPUT_STREAM, copy_error *CE) { switch (CE->error_category) { case OPEN_FAILED_CE: WRITE("unable to open file %f", CE->details_file); break; case EXT_MISWORDED_CE: WRITE("extension misworded: %S", CE->details); break; + case EXT_BAD_DIRNAME_CE: WRITE("extension directory name wrong: %S", CE->details); break; case METADATA_MALFORMED_CE: WRITE("%S has incorrect metadata: %S", CE->copy->edition->work->genre->genre_name, CE->details); break; case EXT_TITLE_TOO_LONG_CE: WRITE("title too long: %d characters (max is %d)", diff --git a/inbuild/supervisor-module/Chapter 4/Extension Bundle Manager.w b/inbuild/supervisor-module/Chapter 4/Extension Bundle Manager.w index 861b74711..362ac8399 100644 --- a/inbuild/supervisor-module/Chapter 4/Extension Bundle Manager.w +++ b/inbuild/supervisor-module/Chapter 4/Extension Bundle Manager.w @@ -49,7 +49,8 @@ inform_extension *ExtensionBundleManager::from_copy(inbuild_copy *C) { } dictionary *eb_copy_cache = NULL; -inbuild_copy *ExtensionBundleManager::new_copy(text_stream *name, pathname *P, inbuild_nest *N) { +inbuild_copy *ExtensionBundleManager::new_copy(text_stream *name, pathname *P, + inbuild_nest *N, semantic_version_number apparent_V) { if (eb_copy_cache == NULL) eb_copy_cache = Dictionaries::new(16, FALSE); TEMPORARY_TEXT(key) WRITE_TO(key, "%p", P); @@ -58,13 +59,29 @@ inbuild_copy *ExtensionBundleManager::new_copy(text_stream *name, pathname *P, i C = Dictionaries::read_value(eb_copy_cache, key); if (C == NULL) { inbuild_work *work = Works::new_raw(extension_bundle_genre, - Str::duplicate(Pathnames::directory_name(P)), + Str::duplicate(name), Str::duplicate(Pathnames::directory_name(Pathnames::up(P)))); inbuild_edition *edition = Editions::new(work, VersionNumbers::null()); C = Copies::new_in_path(edition, P, N); Extensions::scan(C); Dictionaries::create(eb_copy_cache, key); Dictionaries::write_value(eb_copy_cache, key, C); + if (VersionNumbers::is_null(apparent_V)) { + TEMPORARY_TEXT(error_text) + WRITE_TO(error_text, + "an extension in directory format must have a directory name ending " + "'-vN', giving the version number: for example, 'Advanced Algebra-v2_3_6'"); + Copies::attach_error(C, CopyErrors::new_T(EXT_BAD_DIRNAME_CE, -1, error_text)); + DISCARD_TEXT(error_text) + } else if (VersionNumbers::ne(apparent_V, C->edition->version)) { + TEMPORARY_TEXT(error_text) + WRITE_TO(error_text, + "the version number '%v' is not the one implied by the directory " + "name '%S', which would be '%v'", + &(C->edition->version), Pathnames::directory_name(P), &apparent_V); + Copies::attach_error(C, CopyErrors::new_T(EXT_BAD_DIRNAME_CE, -1, error_text)); + DISCARD_TEXT(error_text) + } } DISCARD_TEXT(key) return C; @@ -95,7 +112,13 @@ inbuild_copy *ExtensionBundleManager::claim_folder_as_copy(pathname *P, inbuild_ filename *canary = Filenames::in(P, I"extension_metadata.json"); if (TextFiles::exists(canary)) { text_stream *name = Str::duplicate(Pathnames::directory_name(P)); - return ExtensionBundleManager::new_copy(name, P, N); + semantic_version_number V = VersionNumbers::null(); + match_results mr = Regexp::create_mr(); + if (Regexp::match(&mr, name, L"(%c+)-v([0-9_]+)")) { + name = Str::duplicate(mr.exp[0]); + V = VersionNumbers::from_text(mr.exp[1]); + } + return ExtensionBundleManager::new_copy(name, P, N, V); } return NULL; } diff --git a/inbuild/supervisor-module/Chapter 5/Extension Services.w b/inbuild/supervisor-module/Chapter 5/Extension Services.w index f4ac9b2b3..c916d6052 100644 --- a/inbuild/supervisor-module/Chapter 5/Extension Services.w +++ b/inbuild/supervisor-module/Chapter 5/Extension Services.w @@ -389,7 +389,7 @@ filename *Extensions::main_source_file(inbuild_copy *C) { pathname *P = C->location_if_path; if (P) { TEMPORARY_TEXT(leaf) - WRITE_TO(leaf, "%S.i7x", Pathnames::directory_name(P)); + WRITE_TO(leaf, "%S.i7x", C->edition->work->title); F = Filenames::in(Pathnames::down(P, I"Source"), leaf); DISCARD_TEXT(leaf) } diff --git a/inform7/Chapter 1/Main.w b/inform7/Chapter 1/Main.w index 00ef59ad3..f9c254bad 100755 --- a/inform7/Chapter 1/Main.w +++ b/inform7/Chapter 1/Main.w @@ -307,6 +307,7 @@ compiler via Delia scripts in |intest|. @e SIGILS_CLSW @e TEST_OUTPUT_CLSW @e SILENCE_CLSW +@e CHECK_RESOURCES_CLSW @