Skip to content


Browse files Browse the repository at this point in the history
Ask irscope whether ACP has been run. The addInstrs field was not wor…
  • Loading branch information
enebo committed Oct 7, 2014
1 parent 23a3d2f commit 8071211
Showing 1 changed file with 1 addition and 6 deletions.
Expand Up @@ -15,8 +15,6 @@
import java.util.ListIterator;

public class AddCallProtocolInstructions extends CompilerPass {
boolean addedInstrs = false;

public String getLabel() {
return "Add Call Protocol Instructions (push/pop of dyn-scope, frame, impl-class values)";
Expand Down Expand Up @@ -157,9 +155,6 @@ public Object execute(IRScope scope, Object... data) {
// Run on all nested closures.
for (IRClosure c: scope.getClosures()) execute(c);

// Mark as done
addedInstrs = true;

// LVA information is no longer valid after the pass
scope.setDataFlowSolution(LiveVariablesProblem.NAME, null);

Expand All @@ -168,7 +163,7 @@ public Object execute(IRScope scope, Object... data) {

public Object previouslyRun(IRScope scope) {
return addedInstrs ? new Object() : null;
return scope.hasExplicitCallProtocol();

Expand Down

0 comments on commit 8071211

Please sign in to comment.