Skip to content

Commit

Permalink
Fix for Mantis bug 1924
Browse files Browse the repository at this point in the history
  • Loading branch information
ganelson committed Apr 11, 2022
1 parent 19e635c commit e71bd9e
Show file tree
Hide file tree
Showing 5 changed files with 316 additions and 232 deletions.
6 changes: 3 additions & 3 deletions inform7/Figures/memory-diagnostics.txt
@@ -1,4 +1,4 @@
Total memory consumption was 126314K = 123 MB
Total memory consumption was 126319K = 123 MB

---- was used for 2008185 objects, in 360861 frames in 0 x 800K = 0K = 0 MB:

Expand Down Expand Up @@ -237,7 +237,7 @@ Total memory consumption was 126314K = 123 MB

100.0% was used for memory not allocated for objects:

59.2% text stream storage 76632712 bytes in 452254 claims
59.2% text stream storage 76637280 bytes in 452265 claims
3.5% dictionary storage 4544512 bytes in 6619 claims
---- sorting 744 bytes in 3 claims
5.5% source text 7200000 bytes in 3 claims
Expand All @@ -255,5 +255,5 @@ Total memory consumption was 126314K = 123 MB
---- code generation workspace for objects 1336 bytes in 4 claims
0.2% emitter array storage 279776 bytes in 1995 claims

-140.-6% was overhead - -181862792 bytes = -177600K = -173 MB
-140.-5% was overhead - -181862792 bytes = -177600K = -173 MB

20 changes: 10 additions & 10 deletions inform7/Figures/timings-diagnostics.txt
@@ -1,37 +1,37 @@
100.0% in inform7 run
68.2% in compilation to Inter
68.0% in compilation to Inter
47.6% in //Sequence::undertake_queued_tasks//
4.6% in //MajorNodes::pre_pass//
3.3% in //MajorNodes::pass_1//
2.3% in //RTPhrasebook::compile_entries//
2.4% in //RTPhrasebook::compile_entries//
1.8% in //ImperativeDefinitions::assess_all//
1.5% in //RTKindConstructors::compile//
1.0% in //Sequence::lint_inter//
0.5% in //MajorNodes::pass_2//
0.5% in //Sequence::undertake_queued_tasks//
0.5% 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 //RTKindConstructors::compile_permissions//
0.1% in //InferenceSubjects::emit_all//
0.1% in //Task::make_built_in_kind_constructors//
0.1% in //Understand::traverse//
0.1% in //World::stages_II_and_III//
2.1% not specifically accounted for
2.0% not specifically accounted for
29.1% in running Inter pipeline
10.0% in step 14/15: generate inform6 -> auto.inf
7.4% in step 5/15: load-binary-kits
6.9% in step 6/15: make-synoptic-module
1.5% in step 9/15: make-identifiers-unique
10.1% in step 14/15: generate inform6 -> auto.inf
7.5% in step 5/15: load-binary-kits
6.8% in step 6/15: make-synoptic-module
1.6% 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.3% in step 7/15: shorten-wiring
0.3% in step 8/15: detect-indirect-calls
0.2% in step 11/15: eliminate-redundant-labels
0.1% in step 10/15: reconcile-verbs
0.1% in step 2/15: parse-insertions
0.1% in step 3/15: resolve-conditional-compilation
0.7% not specifically accounted for
2.2% in supervisor
0.4% not specifically accounted for
0.5% not specifically accounted for
36 changes: 19 additions & 17 deletions inform7/Internal/Inter/BasicInformExtrasKit/Sections/Miscellany.i6t
Expand Up @@ -247,59 +247,61 @@ Global short_name_case;
The routines accessible from outside this segment.

=
[ IndefArt obj i;
[ IndefArt obj i s;
if (obj == 0) { LIST_WRITER_INTERNAL_RM('Y'); rtrue; }
i = indef_mode; indef_mode = true;
if (obj has proper) { indef_mode = NULL; print (PSN__) obj; indef_mode = i; return; }
i = indef_mode; indef_mode = true; s = self; self = obj;
if (obj has proper) { indef_mode = NULL; print (PSN__) obj; indef_mode = i; self = s; return; }
if ((obj provides article) && (TEXT_TY_Compare(obj.article, EMPTY_TEXT_VALUE) ~= 0)) {
PrintOrRun(obj, article, true); print " ", (PSN__) obj; indef_mode = i;
PrintOrRun(obj, article, true); print " ", (PSN__) obj; indef_mode = i; self = s;
return;
}
PrefaceByArticle(obj, 2); indef_mode = i;
PrefaceByArticle(obj, 2); indef_mode = i; self = s;
];

[ CIndefArt obj i;
[ CIndefArt obj i s;
if (obj == 0) { LIST_WRITER_INTERNAL_RM('X'); rtrue; }
i = indef_mode; indef_mode = true;
i = indef_mode; indef_mode = true; s = self; self = obj;
if (obj has proper) {
indef_mode = NULL;
caps_mode = true;
print (PSN__) obj;
indef_mode = i;
caps_mode = false;
self = s;
return;
}
if ((obj provides article) && (TEXT_TY_Compare(obj.article, EMPTY_TEXT_VALUE) ~= 0)) {
TEXT_TY_Say_Capitalised(obj.article); print " ", (PSN__) obj; indef_mode = i;
TEXT_TY_Say_Capitalised(obj.article); print " ", (PSN__) obj; indef_mode = i; self = s;
return;
}
PrefaceByArticle(obj, 2, 0, 1); indef_mode = i;
PrefaceByArticle(obj, 2, 0, 1); indef_mode = i; self = s;
];

[ DefArt obj i;
i = indef_mode; indef_mode = false;
[ DefArt obj i s;
i = indef_mode; indef_mode = false; s = self; self = obj;
if ((~~obj ofclass Object) || obj has proper) {
indef_mode = NULL; print (PSN__) obj; indef_mode = i;
indef_mode = NULL; print (PSN__) obj; indef_mode = i; self = s;
return;
}
PrefaceByArticle(obj, 1); indef_mode = i;
PrefaceByArticle(obj, 1); indef_mode = i; self = s;
];

[ CDefArt obj i;
i = indef_mode; indef_mode = false;
[ CDefArt obj i s;
i = indef_mode; indef_mode = false; s = self; self = obj;
if ((obj ofclass Object) && (obj has proper)) {
indef_mode = NULL;
caps_mode = true;
print (PSN__) obj;
indef_mode = i;
caps_mode = false;
self = s;
return;
}
if ((~~obj ofclass Object) || obj has proper) {
indef_mode = NULL; print (PSN__) obj; indef_mode = i;
indef_mode = NULL; print (PSN__) obj; indef_mode = i; self = s;
return;
}
PrefaceByArticle(obj, 0); indef_mode = i;
PrefaceByArticle(obj, 0); indef_mode = i; self = s;
];

[ GetGNAOfObject obj case gender;
Expand Down
36 changes: 19 additions & 17 deletions inform7/Internal/Inter/WorldModelKit/Sections/Printing.i6t
Expand Up @@ -353,59 +353,61 @@ Global short_name_case;
The routines accessible from outside this segment.

=
[ IndefArt obj i;
[ IndefArt obj i s;
if (obj == 0) { LIST_WRITER_INTERNAL_RM('Y'); rtrue; }
i = indef_mode; indef_mode = true;
if (obj has proper) { indef_mode = NULL; print (PSN__) obj; indef_mode = i; return; }
i = indef_mode; indef_mode = true; s = self; self = obj;
if (obj has proper) { indef_mode = NULL; print (PSN__) obj; indef_mode = i; self = s; return; }
if ((obj provides article) && (TEXT_TY_Compare(obj.article, EMPTY_TEXT_VALUE) ~= 0)) {
PrintOrRun(obj, article, true); print " ", (PSN__) obj; indef_mode = i;
PrintOrRun(obj, article, true); print " ", (PSN__) obj; indef_mode = i; self = s;
return;
}
PrefaceByArticle(obj, 2); indef_mode = i;
PrefaceByArticle(obj, 2); indef_mode = i; self = s;
];

[ CIndefArt obj i;
[ CIndefArt obj i s;
if (obj == 0) { LIST_WRITER_INTERNAL_RM('X'); rtrue; }
i = indef_mode; indef_mode = true;
i = indef_mode; indef_mode = true; s = self; self = obj;
if (obj has proper) {
indef_mode = NULL;
caps_mode = true;
print (PSN__) obj;
indef_mode = i;
caps_mode = false;
self = s;
return;
}
if ((obj provides article) && (TEXT_TY_Compare(obj.article, EMPTY_TEXT_VALUE) ~= 0)) {
TEXT_TY_Say_Capitalised(obj.article); print " ", (PSN__) obj; indef_mode = i;
TEXT_TY_Say_Capitalised(obj.article); print " ", (PSN__) obj; indef_mode = i; self = s;
return;
}
PrefaceByArticle(obj, 2, 0, 1); indef_mode = i;
PrefaceByArticle(obj, 2, 0, 1); indef_mode = i; self = s;
];

[ DefArt obj i;
i = indef_mode; indef_mode = false;
[ DefArt obj i s;
i = indef_mode; indef_mode = false; s = self; self = obj;
if ((~~obj ofclass Object) || obj has proper) {
indef_mode = NULL; print (PSN__) obj; indef_mode = i;
indef_mode = NULL; print (PSN__) obj; indef_mode = i; self = s;
return;
}
PrefaceByArticle(obj, 1); indef_mode = i;
PrefaceByArticle(obj, 1); indef_mode = i; self = s;
];

[ CDefArt obj i;
i = indef_mode; indef_mode = false;
[ CDefArt obj i s;
i = indef_mode; indef_mode = false; s = self; self = obj;
if ((obj ofclass Object) && (obj has proper || obj == player)) {
indef_mode = NULL;
caps_mode = true;
print (PSN__) obj;
indef_mode = i;
caps_mode = false;
self = s;
return;
}
if ((~~obj ofclass Object) || obj has proper) {
indef_mode = NULL; print (PSN__) obj; indef_mode = i;
indef_mode = NULL; print (PSN__) obj; indef_mode = i; self = s;
return;
}
PrefaceByArticle(obj, 0); indef_mode = i;
PrefaceByArticle(obj, 0); indef_mode = i; self = s;
];

@h Standard Response Issuing Rule.
Expand Down

0 comments on commit e71bd9e

Please sign in to comment.