Skip to content

Commit

Permalink
Fix for Mantis bug 1990
Browse files Browse the repository at this point in the history
  • Loading branch information
ganelson committed Apr 10, 2022
1 parent 2a5197c commit 58f64b1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 19 deletions.
4 changes: 2 additions & 2 deletions inform7/Figures/memory-diagnostics.txt
@@ -1,4 +1,4 @@
Total memory consumption was 126307K = 123 MB
Total memory consumption was 126308K = 123 MB

---- was used for 2008021 objects, in 360796 frames in 0 x 800K = 0K = 0 MB:

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

100.0% was used for memory not allocated for objects:

59.2% text stream storage 76625748 bytes in 452194 claims
59.2% text stream storage 76626172 bytes in 452197 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 Down
14 changes: 7 additions & 7 deletions inform7/Figures/timings-diagnostics.txt
@@ -1,8 +1,8 @@
100.0% in inform7 run
68.3% in compilation to Inter
47.9% in //Sequence::undertake_queued_tasks//
4.6% in //MajorNodes::pre_pass//
3.3% in //MajorNodes::pass_1//
4.5% in //MajorNodes::pre_pass//
3.2% in //MajorNodes::pass_1//
2.3% in //RTPhrasebook::compile_entries//
1.8% in //ImperativeDefinitions::assess_all//
1.5% in //RTKindConstructors::compile//
Expand All @@ -18,20 +18,20 @@
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.2% not specifically accounted for
29.0% in running Inter pipeline
10.1% in step 14/15: generate inform6 -> auto.inf
10.2% in step 14/15: generate inform6 -> auto.inf
7.6% in step 5/15: load-binary-kits
6.6% in step 6/15: make-synoptic-module
6.5% in step 6/15: make-synoptic-module
1.5% in step 9/15: make-identifiers-unique
0.5% in step 4/15: compile-splats
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 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
0.5% not specifically accounted for
2.2% in supervisor
0.4% not specifically accounted for
12 changes: 4 additions & 8 deletions inform7/Internal/Inter/CommandParserKit/Sections/Parser.i6t
Expand Up @@ -589,7 +589,7 @@ Get the input, do OOPS and AGAIN.
! Re-tokenise:
VM_Tokenise(buffer,parse);

num_words = WordCount(); players_command = 100 + num_words;
num_words = WordCount(); players_command = 100 + num_words; token_filter = 0;

k=0;
#Ifdef DEBUG;
Expand Down Expand Up @@ -636,10 +636,8 @@ Get the input, do OOPS and AGAIN.
! Begin from what we currently think is the verb word

.BeginCommand;

wn = verb_wordnum;
verb_word = NextWordStopped();

! If there's no input here, we must have something like "person,".

if (verb_word == -1) {
Expand Down Expand Up @@ -719,7 +717,6 @@ Is the command a direction name, and so an implicit GO? If so, go to (K).
! or the name of someone to talk to

if (verb_word == 0 || ((verb_word->#dict_par1) & 1) == 0) {

! So is the first word an object contained in the special object "compass"
! (i.e., a direction)? This needs use of NounDomain, a routine which
! does the object matching, returning the object number, or 0 if none found,
Expand Down Expand Up @@ -767,15 +764,14 @@ Is anyone being addressed?
! advanced past a comma. (A comma is a word all on its own in the table.)

.Conversation;

j = wn - 1;

! Use NounDomain (in the context of "animate creature") to see if the
! words make sense as the name of someone held or nearby

wn = 1; lookahead = HELD_TOKEN;
scope_reason = TALKING_REASON;
l = NounDomain(player,actors_location,6);
l = NounDomain(player, actors_location, CREATURE_TOKEN);
scope_reason = PARSING_REASON;
if (l == REPARSE_CODE) jump ReParse;
if (l == 0) {
Expand Down Expand Up @@ -2120,7 +2116,8 @@ because we want to allow duplicates).
first_word i j k l answer_words marker;
#Ifdef DEBUG;
if (parser_trace >= 4) {
print " [NounDomain called at word ", wn, "^";
print " [NounDomain called at word ", wn,
" (domain1 ", (name) domain1, ", domain2 ", (name) domain2, ")^";
print " ";
if (indef_mode) {
print "seeking indefinite object: ";
Expand Down Expand Up @@ -3505,7 +3502,6 @@ cases, we pass the job down to |TryGivenObject|.
=
[ MatchTextAgainstObject item i;
if (token_filter ~= 0 && ConsultNounFilterToken(item) == 0) return;

if (match_from <= num_words) { ! If there's any text to match, that is
wn = match_from;
i = NounWord();
Expand Down
4 changes: 2 additions & 2 deletions inform7/Tests/Test Cases/_Results_Ideal/UnsetPronouns.txt
Expand Up @@ -53,7 +53,7 @@
[line 0 token 1 word 2 : noun]
[Object list from word 2]
[Calling NounDomain on location and actor]
[NounDomain called at word 3
[NounDomain called at word 3 (domain1 Home, domain2 yourself)
seeking indefinite object:
number wanted: 0
most likely GNAs of names: 4095
Expand All @@ -62,7 +62,7 @@
[ND made 1 matches]
[ND returned yourself]
[Calling NounDomain on location and actor]
[NounDomain called at word 2
[NounDomain called at word 2 (domain1 Home, domain2 yourself)
seeking definite object
Trying the north at word 2
Parse_name called
Expand Down

0 comments on commit 58f64b1

Please sign in to comment.