Skip to content

Commit

Permalink
Temporarily disable fix till I can debug this
Browse files Browse the repository at this point in the history
  • Loading branch information
subbuss committed Oct 20, 2016
1 parent fa70c5e commit 4b3cf11
Showing 1 changed file with 7 additions and 8 deletions.
Expand Up @@ -87,6 +87,7 @@ public void applyTransferFunction(Instr i) {

private void identifyUndefinedVarsInClosure(Set<Variable> undefinedVars, IRClosure cl, int minDepth) {
int clBaseDepth = minDepth + (cl.getFlags().contains(IRFlags.REUSE_PARENT_DYNSCOPE) ? 0 : 1);
cl.setUpUseDefLocalVarMaps();
for (LocalVariable lv: cl.getUsedLocalVariables()) {
// This can happen where an outer scope variable
// is not used in this scope but is used in a nested
Expand Down Expand Up @@ -124,21 +125,18 @@ public void identifyInits(Set<Variable> undefinedVars) {
if (!v.isSelf()) {
if (v instanceof LocalVariable) {
lv = (LocalVariable)v;
if (lv.getScopeDepth() >= parentScopeDepth) {
// Variables that belong to outer scopes
// are considered already defined.
tmp.set(problem.getDFVar(v));
}

if (!tmp.get(problem.getDFVar(v))) {
// Variables that belong to outer scopes
// are considered already defined.
if (lv.getScopeDepth() < parentScopeDepth && !tmp.get(problem.getDFVar(v))) {
// We want lv suitable for initializing in this scope
undefinedVars.add(lv.getScopeDepth() == 0 ? lv : lv.cloneForDepth(0));
tmp.set(problem.getDFVar(lv));
}
tmp.set(problem.getDFVar(lv));
}
}
}

/*
if (i instanceof ClosureAcceptingInstr) {
// Find all variables used in the closure and
// figure out if they are defined are not.
Expand All @@ -147,6 +145,7 @@ public void identifyInits(Set<Variable> undefinedVars) {
identifyUndefinedVarsInClosure(undefinedVars, ((WrappedIRClosure)o).getClosure(), 0);
}
}
*/

// v is defined
if (i instanceof ResultInstr) {
Expand Down

0 comments on commit 4b3cf11

Please sign in to comment.