fix order-of-operations bug in compile loop

The code was capturing branch snapshots too early - before the call to
populateSources which might perform further moves.
This commit is contained in:
Joel Dice 2009-11-02 21:11:39 -07:00
parent ef00ff80ef
commit ed4206b06d

View File

@ -5182,8 +5182,6 @@ populateSiteTables(Context* c, Event* e, SiteRecordList* frozen)
resolveJunctionSites(c, e, frozen);
resolveBranchSites(c, e, frozen);
captureBranchSnapshots(c, e);
}
void
@ -5452,12 +5450,17 @@ compile(Context* c)
populateSources(c, e);
if (branch and e->successors) {
captureBranchSnapshots(c, e);
}
thaw(c, &frozen);
e->compile(c);
if ((not branch) and e->successors) {
populateSiteTables(c, e, &frozen);
captureBranchSnapshots(c, e);
thaw(c, &frozen);
}