mirror of
https://github.com/corda/corda.git
synced 2025-01-08 14:03:06 +00:00
freeze BranchEvent operands to ensure they aren't clobbered as temporaries
This commit is contained in:
parent
378f7086b7
commit
314bdae80d
@ -4747,9 +4747,17 @@ class BranchEvent: public Event {
|
||||
apply(c, Jump, BytesPerWord, address->source, address->source);
|
||||
}
|
||||
} else {
|
||||
freezeSource(c, size, first);
|
||||
freezeSource(c, size, second);
|
||||
freezeSource(c, BytesPerWord, address);
|
||||
|
||||
apply(c, type, size, first->source, first->nextWord->source,
|
||||
size, second->source, second->nextWord->source,
|
||||
BytesPerWord, address->source, address->source);
|
||||
|
||||
thawSource(c, BytesPerWord, address);
|
||||
thawSource(c, size, second);
|
||||
thawSource(c, size, first);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4914,13 +4922,13 @@ class BoundsCheckEvent: public Event {
|
||||
CodePromise* nextPromise = codePromise
|
||||
(c, static_cast<Promise*>(0));
|
||||
|
||||
index->source->freeze(c, index);
|
||||
freezeSource(c, BytesPerWord, index);
|
||||
|
||||
ConstantSite next(nextPromise);
|
||||
apply(c, JumpIfGreater, 4, index->source, index->source, 4, &length,
|
||||
&length, BytesPerWord, &next, &next);
|
||||
|
||||
index->source->thaw(c, index);
|
||||
thawSource(c, BytesPerWord, index);
|
||||
|
||||
if (constant == 0) {
|
||||
outOfBoundsPromise->offset = a->offset();
|
||||
|
Loading…
Reference in New Issue
Block a user