Skip to content

Commit

Permalink
Showing 1 changed file with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -52,8 +52,10 @@ private void popSavedState(IRScope scope, boolean isGEB, boolean requireBinding,
}
if (requireBinding) instrs.add(new PopBindingInstr());
if (scope instanceof IRClosure) {
instrs.add(new RestoreBindingVisibilityInstr(savedViz));
instrs.add(new PopBlockFrameInstr(savedFrame));
if (scope.needsFrame()) {
instrs.add(new RestoreBindingVisibilityInstr(savedViz));
instrs.add(new PopBlockFrameInstr(savedFrame));
}
} else {
if (requireFrame) instrs.add(new PopMethodFrameInstr());
}
@@ -83,18 +85,21 @@ public Object execute(IRScope scope, Object... data) {
savedViz = scope.createTemporaryVariable();
savedFrame = scope.createTemporaryVariable();

{ // FIXME: Hacky...need these to come before other stuff in entryBB so we insert instead of add
int insertIndex = 0;
// FIXME: Hacky...need these to come before other stuff in entryBB so we insert instead of add
int insertIndex = 0;

if (scope.needsFrame()) {
entryBB.insertInstr(insertIndex++, new SaveBindingVisibilityInstr(savedViz));
entryBB.insertInstr(insertIndex++, new PushBlockFrameInstr(savedFrame, scope.getName()));
}

// NOTE: Order of these next two is important, since UBESI resets state PBBI needs.
if (requireBinding) {
entryBB.insertInstr(insertIndex++, new PushBlockBindingInstr());
}
entryBB.insertInstr(insertIndex++, new UpdateBlockExecutionStateInstr(Self.SELF));
// NOTE: Order of these next two is important, since UBESI resets state PBBI needs.
if (requireBinding) {
entryBB.insertInstr(insertIndex++, new PushBlockBindingInstr());
}

entryBB.insertInstr(insertIndex++, new UpdateBlockExecutionStateInstr(Self.SELF));

Signature sig = ((IRClosure)scope).getSignature();

// Add the right kind of arg preparation instruction

0 comments on commit 34f3e0b

Please sign in to comment.