mirror of
https://github.com/corda/corda.git
synced 2025-05-02 16:53:22 +00:00
freeze index site in BoundsCheckEvent::compile
This ensures we don't use it as a temporary register when generating the comparison.
This commit is contained in:
parent
110f41b7a0
commit
70fcbc2788
@ -4885,10 +4885,14 @@ class BoundsCheckEvent: public Event {
|
|||||||
lengthOffset, NoRegister, 1);
|
lengthOffset, NoRegister, 1);
|
||||||
length.acquired = true;
|
length.acquired = true;
|
||||||
|
|
||||||
|
index->source->freeze(c, index);
|
||||||
|
|
||||||
ConstantSite next(nextPromise);
|
ConstantSite next(nextPromise);
|
||||||
apply(c, JumpIfGreater, 4, index->source, index->source, 4, &length,
|
apply(c, JumpIfGreater, 4, index->source, index->source, 4, &length,
|
||||||
&length, BytesPerWord, &next, &next);
|
&length, BytesPerWord, &next, &next);
|
||||||
|
|
||||||
|
index->source->thaw(c, index);
|
||||||
|
|
||||||
if (constant == 0) {
|
if (constant == 0) {
|
||||||
outOfBoundsPromise->offset = a->offset();
|
outOfBoundsPromise->offset = a->offset();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user