⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 whilestmt.java

📁 JDK1.4编译器前端
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
    if(!getCondition().isDAafterFalse(v))      return false;    for(Iterator iter = targetBreaks().iterator(); iter.hasNext(); ) {      BreakStmt stmt = (BreakStmt)iter.next();      if(!stmt.isDAafterReachedFinallyBlocks(v))        return false;    }    return true;  }    protected java.util.Map isDUafter_Variable_visited;    // Declared in DefiniteAssignment.jrag at line 1036 @SuppressWarnings({"unchecked", "cast"})     public boolean isDUafter(Variable v) {        Object _parameters = v;if(isDUafter_Variable_visited == null) isDUafter_Variable_visited = new java.util.HashMap(4);if(isDUafter_Variable_values == null) isDUafter_Variable_values = new java.util.HashMap(4);        if(isDUafter_Variable_values.containsKey(_parameters))            return ((Boolean)isDUafter_Variable_values.get(_parameters)).booleanValue();        if(new Integer(boundariesCrossed).equals(isDUafter_Variable_visited.get(_parameters)))            throw new RuntimeException("Circular definition of attr: isDUafter in class: ");        isDUafter_Variable_visited.put(_parameters, new Integer(boundariesCrossed));        int num = boundariesCrossed;        boolean isFinal = this.is$Final();        boolean isDUafter_Variable_value = isDUafter_compute(v);        if(isFinal && num == boundariesCrossed)            isDUafter_Variable_values.put(_parameters, Boolean.valueOf(isDUafter_Variable_value));        isDUafter_Variable_visited.remove(_parameters);        return isDUafter_Variable_value;    }    private boolean isDUafter_compute(Variable v) {    if(!isDUbeforeCondition(v)) // start a circular evaluation here      return false;    if(!getCondition().isDUafterFalse(v))      return false;    for(Iterator iter = targetBreaks().iterator(); iter.hasNext(); ) {      BreakStmt stmt = (BreakStmt)iter.next();      if(!stmt.isDUafterReachedFinallyBlocks(v))        return false;    }    return true;  }    protected java.util.Map isDUbeforeCondition_Variable_visited;    protected java.util.Set isDUbeforeCondition_Variable_computed = new java.util.HashSet(4);    protected java.util.Set isDUbeforeCondition_Variable_initialized = new java.util.HashSet(4);    protected java.util.Map isDUbeforeCondition_Variable_values = new java.util.HashMap(4); @SuppressWarnings({"unchecked", "cast"})     public boolean isDUbeforeCondition(Variable v) {        Object _parameters = v;if(isDUbeforeCondition_Variable_visited == null) isDUbeforeCondition_Variable_visited = new java.util.HashMap(4);if(isDUbeforeCondition_Variable_values == null) isDUbeforeCondition_Variable_values = new java.util.HashMap(4);        if(isDUbeforeCondition_Variable_computed.contains(_parameters))            return ((Boolean)isDUbeforeCondition_Variable_values.get(_parameters)).booleanValue();        if (!isDUbeforeCondition_Variable_initialized.contains(_parameters)) {            isDUbeforeCondition_Variable_initialized.add(_parameters);            isDUbeforeCondition_Variable_values.put(_parameters, Boolean.valueOf(true));        }        if (!IN_CIRCLE) {            IN_CIRCLE = true;            int num = boundariesCrossed;        boolean isFinal = this.is$Final();            CIRCLE_INDEX = 1;            boolean new_isDUbeforeCondition_Variable_value;            do {                isDUbeforeCondition_Variable_visited.put(_parameters, new Integer(CIRCLE_INDEX));                CHANGE = false;        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");                new_isDUbeforeCondition_Variable_value = isDUbeforeCondition_compute(v);                if (new_isDUbeforeCondition_Variable_value!=((Boolean)isDUbeforeCondition_Variable_values.get(_parameters)).booleanValue())                    CHANGE = true;                isDUbeforeCondition_Variable_values.put(_parameters, Boolean.valueOf(new_isDUbeforeCondition_Variable_value));                CIRCLE_INDEX++;if(CIRCLE_INDEX > 100) throw new java.lang.RuntimeException("Iteration limit 100 exceeded");            } while (CHANGE);            if(isFinal && num == boundariesCrossed){            isDUbeforeCondition_Variable_computed.add(_parameters);            LAST_CYCLE = true;        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");            isDUbeforeCondition_compute(v);            LAST_CYCLE = false;            }            else {            RESET_CYCLE = true;        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");            isDUbeforeCondition_compute(v);            RESET_CYCLE = false;            isDUbeforeCondition_Variable_computed.remove(_parameters);            isDUbeforeCondition_Variable_initialized.remove(_parameters);            }            IN_CIRCLE = false;             return new_isDUbeforeCondition_Variable_value;        }        if(!new Integer(CIRCLE_INDEX).equals(isDUbeforeCondition_Variable_visited.get(_parameters))) {            isDUbeforeCondition_Variable_visited.put(_parameters, new Integer(CIRCLE_INDEX));            if (LAST_CYCLE) {                isDUbeforeCondition_Variable_computed.add(_parameters);        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");                return isDUbeforeCondition_compute(v);            }            if (RESET_CYCLE) {                isDUbeforeCondition_Variable_computed.remove(_parameters);                isDUbeforeCondition_Variable_initialized.remove(_parameters);                return ((Boolean)isDUbeforeCondition_Variable_values.get(_parameters)).booleanValue();            }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");            boolean new_isDUbeforeCondition_Variable_value = isDUbeforeCondition_compute(v);            if (new_isDUbeforeCondition_Variable_value!=((Boolean)isDUbeforeCondition_Variable_values.get(_parameters)).booleanValue())                CHANGE = true;            isDUbeforeCondition_Variable_values.put(_parameters, Boolean.valueOf(new_isDUbeforeCondition_Variable_value));            return new_isDUbeforeCondition_Variable_value;        }        return ((Boolean)isDUbeforeCondition_Variable_values.get(_parameters)).booleanValue();    }    private boolean isDUbeforeCondition_compute(Variable v) {    // 1st    if(!isDUbefore(v))      return false;    else if(!getStmt().isDUafter(v))      return false;    else {      for(Iterator iter = targetContinues().iterator(); iter.hasNext(); ) {        ContinueStmt stmt = (ContinueStmt)iter.next();        if(!stmt.isDUafterReachedFinallyBlocks(v))          return false;      }    }    return true;  }    protected int continueLabel_visited = -1;    // Declared in NameCheck.jrag at line 398 @SuppressWarnings({"unchecked", "cast"})     public boolean continueLabel() {        if(continueLabel_visited == boundariesCrossed)            throw new RuntimeException("Circular definition of attr: continueLabel in class: ");        continueLabel_visited = boundariesCrossed;        boolean continueLabel_value = continueLabel_compute();        continueLabel_visited = -1;        return continueLabel_value;    }    private boolean continueLabel_compute() {  return true;  }    protected int canCompleteNormally_visited = -1;    // Declared in UnreachableStatements.jrag at line 85 @SuppressWarnings({"unchecked", "cast"})     public boolean canCompleteNormally() {        if(canCompleteNormally_computed)            return canCompleteNormally_value;        if(canCompleteNormally_visited == boundariesCrossed)            throw new RuntimeException("Circular definition of attr: canCompleteNormally in class: ");        canCompleteNormally_visited = boundariesCrossed;        int num = boundariesCrossed;        boolean isFinal = this.is$Final();        canCompleteNormally_value = canCompleteNormally_compute();        if(isFinal && num == boundariesCrossed)            canCompleteNormally_computed = true;        canCompleteNormally_visited = -1;        return canCompleteNormally_value;    }    private boolean canCompleteNormally_compute() {  return reachable() && (!getCondition().isConstant() || !getCondition().isTrue()) || reachableBreak();  }    // Declared in NameCheck.jrag at line 366    public boolean Define_boolean_insideLoop(ASTNode caller, ASTNode child) {        if(caller == getStmtNoTransform()) {            return true;        }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_boolean_insideLoop(this, caller);    }    // Declared in UnreachableStatements.jrag at line 151    public boolean Define_boolean_reportUnreachable(ASTNode caller, ASTNode child) {        if(caller == getStmtNoTransform()) {            return reachable();        }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_boolean_reportUnreachable(this, caller);    }    // Declared in UnreachableStatements.jrag at line 86    public boolean Define_boolean_reachable(ASTNode caller, ASTNode child) {        if(caller == getStmtNoTransform()) {            return reachable() && !getCondition().isFalse();        }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_boolean_reachable(this, caller);    }    // Declared in DefiniteAssignment.jrag at line 588    public boolean Define_boolean_isDAbefore(ASTNode caller, ASTNode child, Variable v) {        if(caller == getStmtNoTransform()) {            return getCondition().isDAafterTrue(v);        }        if(caller == getConditionNoTransform()) {            return isDAbefore(v);        }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_boolean_isDAbefore(this, caller, v);    }    // Declared in DefiniteAssignment.jrag at line 1070    public boolean Define_boolean_isDUbefore(ASTNode caller, ASTNode child, Variable v) {        if(caller == getStmtNoTransform()) {            return getCondition().isDUafterTrue(v);        }        if(caller == getConditionNoTransform()) {            return isDUbeforeCondition(v);        }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_boolean_isDUbefore(this, caller, v);    }public ASTNode rewriteTo() {    return super.rewriteTo();}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -