mirror of
https://github.com/corda/corda.git
synced 2025-01-24 13:28:07 +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);
|
apply(c, Jump, BytesPerWord, address->source, address->source);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
freezeSource(c, size, first);
|
||||||
|
freezeSource(c, size, second);
|
||||||
|
freezeSource(c, BytesPerWord, address);
|
||||||
|
|
||||||
apply(c, type, size, first->source, first->nextWord->source,
|
apply(c, type, size, first->source, first->nextWord->source,
|
||||||
size, second->source, second->nextWord->source,
|
size, second->source, second->nextWord->source,
|
||||||
BytesPerWord, address->source, address->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
|
CodePromise* nextPromise = codePromise
|
||||||
(c, static_cast<Promise*>(0));
|
(c, static_cast<Promise*>(0));
|
||||||
|
|
||||||
index->source->freeze(c, index);
|
freezeSource(c, BytesPerWord, 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);
|
thawSource(c, BytesPerWord, index);
|
||||||
|
|
||||||
if (constant == 0) {
|
if (constant == 0) {
|
||||||
outOfBoundsPromise->offset = a->offset();
|
outOfBoundsPromise->offset = a->offset();
|
||||||
|
Loading…
Reference in New Issue
Block a user