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

📄 trystmt.java

📁 JDK1.4编译器前端
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");                return isDUbefore_compute(v);            }            if (RESET_CYCLE) {                isDUbefore_Variable_computed.remove(_parameters);                isDUbefore_Variable_initialized.remove(_parameters);                return ((Boolean)isDUbefore_Variable_values.get(_parameters)).booleanValue();            }        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");            boolean new_isDUbefore_Variable_value = isDUbefore_compute(v);            if (new_isDUbefore_Variable_value!=((Boolean)isDUbefore_Variable_values.get(_parameters)).booleanValue())                CHANGE = true;            isDUbefore_Variable_values.put(_parameters, Boolean.valueOf(new_isDUbefore_Variable_value));            return new_isDUbefore_Variable_value;        }        return ((Boolean)isDUbefore_Variable_values.get(_parameters)).booleanValue();    }    private boolean isDUbefore_compute(Variable v) {  return super.isDUbefore(v);  }    protected java.util.Map isDUafter_Variable_visited;    // Declared in DefiniteAssignment.jrag at line 1225 @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) {    // 16.2.14 4th bullet    if(!hasFinally()) {      if(!getBlock().isDUafter(v))        return false;      for(int i = 0; i < getNumCatchClause(); i++)        if(!getCatchClause(i).getBlock().isDUafter(v))          return false;      return true;    }    else      return getFinally().isDUafter(v);  }    protected java.util.Map reachableThrow_CatchClause_visited;    protected java.util.Map reachableThrow_CatchClause_values;    // Declared in ExceptionHandling.jrag at line 193 @SuppressWarnings({"unchecked", "cast"})     public boolean reachableThrow(CatchClause c) {        Object _parameters = c;if(reachableThrow_CatchClause_visited == null) reachableThrow_CatchClause_visited = new java.util.HashMap(4);if(reachableThrow_CatchClause_values == null) reachableThrow_CatchClause_values = new java.util.HashMap(4);        if(reachableThrow_CatchClause_values.containsKey(_parameters))            return ((Boolean)reachableThrow_CatchClause_values.get(_parameters)).booleanValue();        if(new Integer(boundariesCrossed).equals(reachableThrow_CatchClause_visited.get(_parameters)))            throw new RuntimeException("Circular definition of attr: reachableThrow in class: ");        reachableThrow_CatchClause_visited.put(_parameters, new Integer(boundariesCrossed));        int num = boundariesCrossed;        boolean isFinal = this.is$Final();        boolean reachableThrow_CatchClause_value = reachableThrow_compute(c);        if(isFinal && num == boundariesCrossed)            reachableThrow_CatchClause_values.put(_parameters, Boolean.valueOf(reachableThrow_CatchClause_value));        reachableThrow_CatchClause_visited.remove(_parameters);        return reachableThrow_CatchClause_value;    }    private boolean reachableThrow_compute(CatchClause c) {  return getBlock().reachedException(c.getParameter().type());  }    protected int canCompleteNormally_visited = -1;    // Declared in UnreachableStatements.jrag at line 113 @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() {     boolean anyCatchClauseCompleteNormally = false;     for(int i = 0; i < getNumCatchClause() && !anyCatchClauseCompleteNormally; i++)       anyCatchClauseCompleteNormally = getCatchClause(i).getBlock().canCompleteNormally();     return (getBlock().canCompleteNormally() || anyCatchClauseCompleteNormally) &&       (!hasFinally() || getFinally().canCompleteNormally());  }    protected java.util.Map handlesException_TypeDecl_visited;    protected java.util.Map handlesException_TypeDecl_values;    // Declared in ExceptionHandling.jrag at line 35 @SuppressWarnings({"unchecked", "cast"})     public boolean handlesException(TypeDecl exceptionType) {        Object _parameters = exceptionType;if(handlesException_TypeDecl_visited == null) handlesException_TypeDecl_visited = new java.util.HashMap(4);if(handlesException_TypeDecl_values == null) handlesException_TypeDecl_values = new java.util.HashMap(4);        if(handlesException_TypeDecl_values.containsKey(_parameters))            return ((Boolean)handlesException_TypeDecl_values.get(_parameters)).booleanValue();        if(new Integer(boundariesCrossed).equals(handlesException_TypeDecl_visited.get(_parameters)))            throw new RuntimeException("Circular definition of attr: handlesException in class: ");        handlesException_TypeDecl_visited.put(_parameters, new Integer(boundariesCrossed));        int num = boundariesCrossed;        boolean isFinal = this.is$Final();        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        boolean handlesException_TypeDecl_value = getParent().Define_boolean_handlesException(this, null, exceptionType);        if(isFinal && num == boundariesCrossed)            handlesException_TypeDecl_values.put(_parameters, Boolean.valueOf(handlesException_TypeDecl_value));        handlesException_TypeDecl_visited.remove(_parameters);        return handlesException_TypeDecl_value;    }    protected int typeError_visited = -1;    protected boolean typeError_computed = false;    protected TypeDecl typeError_value;    // Declared in UnreachableStatements.jrag at line 136 @SuppressWarnings({"unchecked", "cast"})     public TypeDecl typeError() {        if(typeError_computed)            return typeError_value;        if(typeError_visited == boundariesCrossed)            throw new RuntimeException("Circular definition of attr: typeError in class: ");        typeError_visited = boundariesCrossed;        int num = boundariesCrossed;        boolean isFinal = this.is$Final();        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        typeError_value = getParent().Define_TypeDecl_typeError(this, null);        if(isFinal && num == boundariesCrossed)            typeError_computed = true;        typeError_visited = -1;        return typeError_value;    }    protected int typeRuntimeException_visited = -1;    protected boolean typeRuntimeException_computed = false;    protected TypeDecl typeRuntimeException_value;    // Declared in UnreachableStatements.jrag at line 137 @SuppressWarnings({"unchecked", "cast"})     public TypeDecl typeRuntimeException() {        if(typeRuntimeException_computed)            return typeRuntimeException_value;        if(typeRuntimeException_visited == boundariesCrossed)            throw new RuntimeException("Circular definition of attr: typeRuntimeException in class: ");        typeRuntimeException_visited = boundariesCrossed;        int num = boundariesCrossed;        boolean isFinal = this.is$Final();        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        typeRuntimeException_value = getParent().Define_TypeDecl_typeRuntimeException(this, null);        if(isFinal && num == boundariesCrossed)            typeRuntimeException_computed = true;        typeRuntimeException_visited = -1;        return typeRuntimeException_value;    }    // Declared in ExceptionHandling.jrag at line 179    public boolean Define_boolean_handlesException(ASTNode caller, ASTNode child, TypeDecl exceptionType) {        if(caller == getBlockNoTransform()){    for(int i = 0; i < getNumCatchClause(); i++)      if(getCatchClause(i).handles(exceptionType))        return true;    if(hasFinally() && !getFinally().canCompleteNormally())      return true;    return handlesException(exceptionType);  }        if(caller == getCatchClauseListNoTransform()) {    int childIndex = caller.getIndexOfChild(child);{    if(hasFinally() && !getFinally().canCompleteNormally())      return true;    return handlesException(exceptionType);  }}        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_boolean_handlesException(this, caller, exceptionType);    }    // Declared in UnreachableStatements.jrag at line 154    public boolean Define_boolean_reportUnreachable(ASTNode caller, ASTNode child) {        if(caller == getFinallyOptNoTransform()) {            return reachable();        }        if(caller == getCatchClauseListNoTransform()) {      int childIndex = caller.getIndexOfChild(child);            return reachable();        }        if(caller == getBlockNoTransform()) {            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 121    public boolean Define_boolean_reachable(ASTNode caller, ASTNode child) {        if(caller == getFinallyOptNoTransform()) {            return reachable();        }        if(caller == getBlockNoTransform()) {            return reachable();        }        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 666    public boolean Define_boolean_isDAbefore(ASTNode caller, ASTNode child, Variable v) {        if(caller == getFinallyOptNoTransform()) {            return isDAbefore(v);        }        if(caller == getCatchClauseListNoTransform()) {      int childIndex = caller.getIndexOfChild(child);            return getBlock().isDAbefore(v);        }        if(caller == getBlockNoTransform()) {            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 UnreachableStatements.jrag at line 125    public boolean Define_boolean_reachableCatchClause(ASTNode caller, ASTNode child) {        if(caller == getCatchClauseListNoTransform()) {    int childIndex = caller.getIndexOfChild(child);{    TypeDecl type = getCatchClause(childIndex).getParameter().type();    for(int i = 0; i < childIndex; i++)      if(getCatchClause(i).handles(type))        return false;    if(reachableThrow(getCatchClause(childIndex)))      return true;    if(type.mayCatch(typeError()) || type.mayCatch(typeRuntimeException()))      return true;    return false;  }}        if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree");        return getParent().Define_boolean_reachableCatchClause(this, caller);    }    // Declared in DefiniteAssignment.jrag at line 1216    public boolean Define_boolean_isDUbefore(ASTNode caller, ASTNode child, Variable v) {        if(caller == getFinallyOptNoTransform()){    if(!getBlock().isDUeverywhere(v))      return false;    for(int i = 0; i < getNumCatchClause(); i++)      if(!getCatchClause(i).getBlock().unassignedEverywhere(v, this))        return false;    return true;  }        if(caller == getCatchClauseListNoTransform()) {    int childIndex = caller.getIndexOfChild(child);{    if(!getBlock().isDUafter(v))      return false;    if(!getBlock().isDUeverywhere(v))      return false;    return true;  }}        if(caller == getBlockNoTransform()) {            return isDUbefore(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 + -