mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
fix code ordering bug in popNow()
This commit is contained in:
parent
13d6ab023f
commit
482065f91a
@ -1677,6 +1677,10 @@ popNow(Context* c, Stack* stack, unsigned count, bool ignore)
|
||||
unsigned ignored = 0;
|
||||
for (unsigned i = count; i and s;) {
|
||||
if (s->pushed) {
|
||||
removeSite(c, s->value, s->pushSite);
|
||||
s->pushSite = 0;
|
||||
s->pushed = false;
|
||||
|
||||
if (s->value->reads and (not ignore)) {
|
||||
::ignore(c, ignored);
|
||||
|
||||
@ -1697,10 +1701,6 @@ popNow(Context* c, Stack* stack, unsigned count, bool ignore)
|
||||
|
||||
ignored += s->size;
|
||||
}
|
||||
|
||||
removeSite(c, s->value, s->pushSite);
|
||||
s->pushSite = 0;
|
||||
s->pushed = false;
|
||||
} else {
|
||||
if (DebugStack) {
|
||||
fprintf(stderr, "%p not pushed\n", s);
|
||||
@ -1876,9 +1876,7 @@ readSource(Context* c, Stack* stack, Read* r)
|
||||
|
||||
if (target and copyCost) {
|
||||
addSite(c, stack, r->size, r->value, target);
|
||||
if (site) {
|
||||
apply(c, Move, r->size, site, target);
|
||||
}
|
||||
apply(c, Move, r->size, site, target);
|
||||
return target;
|
||||
} else {
|
||||
return site;
|
||||
|
Loading…
Reference in New Issue
Block a user