1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-06-26 04:00:43 +03:00

Fix for unrelated issue raised in reopening of Jira bug I7-2083

This commit is contained in:
Graham Nelson 2022-05-15 22:26:11 +01:00
parent 4bd2c0ad86
commit 9bffe2a889
4 changed files with 35 additions and 20 deletions

View file

@ -1,17 +1,17 @@
100.0% in inform7 run
70.9% in compilation to Inter
50.6% in //Sequence::undertake_queued_tasks//
4.6% in //MajorNodes::pre_pass//
3.3% in //MajorNodes::pass_1//
71.1% in compilation to Inter
50.8% in //Sequence::undertake_queued_tasks//
4.8% in //MajorNodes::pre_pass//
3.2% in //MajorNodes::pass_1//
1.9% in //ImperativeDefinitions::assess_all//
1.8% in //RTPhrasebook::compile_entries//
1.4% in //RTKindConstructors::compile//
1.0% in //Sequence::lint_inter//
0.6% in //MajorNodes::pass_2//
0.6% in //Sequence::undertake_queued_tasks//
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 //RTKindConstructors::compile_permissions//
0.1% in //InferenceSubjects::emit_all//
@ -19,11 +19,11 @@
0.1% in //Understand::traverse//
0.1% in //World::stages_II_and_III//
2.3% not specifically accounted for
26.4% in running Inter pipeline
9.8% in step 14/15: generate inform6 -> auto.inf
6.1% in step 6/15: make-synoptic-module
5.7% in step 5/15: load-binary-kits
1.6% in step 9/15: make-identifiers-unique
26.1% in running Inter pipeline
10.0% in step 14/15: generate inform6 -> auto.inf
5.8% in step 5/15: load-binary-kits
5.8% in step 6/15: make-synoptic-module
1.5% 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.3% in step 7/15: shorten-wiring
@ -32,6 +32,6 @@
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.8% not specifically accounted for
2.2% in supervisor
0.6% not specifically accounted for
2.3% in supervisor
0.4% not specifically accounted for

View file

@ -1106,20 +1106,16 @@ the existing pair $(X, Y)$.
];
[ HashCoreLookUp rel kx X hashv i free mask perturb flags;
!print "[HCLU rel=", rel, " kx=", kx, " X=", X, ": ";
! calculate a hash value for the key
hashv = GetHashValue(kx, X);
! look in the first expected slot
mask = BlkValueRead(rel, RRV_STORAGE);
i = hashv & mask;
!print "hv=", hashv, ", trying ", i;
flags = BlkValueRead(rel, RRV_DATA_BASE + 3*i);
if (flags == 0) {
!print " - not found]^";
return ~i;
}
if (HashCoreEntryMatches(rel, i, kx, X)) {
!print " - found]^";
return i;
}
! not here, keep looking in sequence
@ -1130,15 +1126,12 @@ the existing pair $(X, Y)$.
for (::) {
hashv = hashv*5 + perturb + 1;
i = hashv & mask;
!print ", ", i;
flags = BlkValueRead(rel, RRV_DATA_BASE + 3*i);
if (flags == 0) {
!print " - not found]^";
if (free >= 0) return ~free;
return ~i;
}
if (HashCoreEntryMatches(rel, i, kx, X)) {
!print " - found]^";
return i;
}
if ((free < 0) && (flags & RRF_DELETED)) free = i;
@ -1168,7 +1161,7 @@ the existing pair $(X, Y)$.
BlkValueWrite(rel, RRV_DATA_BASE+i, 0);
! copy entries back from temporary space
kov = BlkValueRead(rel, RRV_KIND);
kx = KindBaseTerm(kov, 0);
kx = KindBaseTerm(kov, 1); ! Was 0
for (i=0: i<ext: i++) {
F = BlkValueRead(temp, 3*i, true);
if (F == 0 || (F & RRF_DELETED)) continue;

View file

@ -0,0 +1,11 @@
xyz relates one text to various numbers.
The verb to abc means the xyz relation.
Alphabet is always {"a","b","c","d","e","f","g","h","i","j","k"}.
To begin:
let x be 0;
repeat with i running through alphabet:
say "i: [i] x: [x].";
now i abcs x;
increment x;

View file

@ -0,0 +1,11 @@
i: a x: 0.
i: b x: 1.
i: c x: 2.
i: d x: 3.
i: e x: 4.
i: f x: 5.
i: g x: 6.
i: h x: 7.
i: i x: 8.
i: j x: 9.
i: k x: 10.