📄 arraytypewithsizeaccess.java
字号:
package AST;
import java.util.HashSet;import java.util.LinkedHashSet;import java.io.FileNotFoundException;import java.io.File;import java.util.*;import beaver.*;import java.util.ArrayList;import java.util.zip.*;import java.io.*;public class ArrayTypeWithSizeAccess extends ArrayTypeAccess implements Cloneable {
public void flushCache() { super.flushCache(); isDAafter_Variable_visited = new java.util.HashMap(4); isDUafter_Variable_visited = new java.util.HashMap(4); } @SuppressWarnings({"unchecked", "cast"}) public ArrayTypeWithSizeAccess clone() throws CloneNotSupportedException { ArrayTypeWithSizeAccess node = (ArrayTypeWithSizeAccess)super.clone(); node.isDAafter_Variable_visited = new java.util.HashMap(4); node.isDUafter_Variable_visited = new java.util.HashMap(4); node.in$Circle(false); node.is$Final(false); return node; } @SuppressWarnings({"unchecked", "cast"}) public ArrayTypeWithSizeAccess copy() { try { ArrayTypeWithSizeAccess node = (ArrayTypeWithSizeAccess)clone(); if(children != null) node.children = (ASTNode[])children.clone(); return node; } catch (CloneNotSupportedException e) { } System.err.println("Error: Could not clone node of type " + getClass().getName() + "!"); return null; } @SuppressWarnings({"unchecked", "cast"}) public ArrayTypeWithSizeAccess fullCopy() { ArrayTypeWithSizeAccess res = (ArrayTypeWithSizeAccess)copy(); for(int i = 0; i < getNumChildNoTransform(); i++) { ASTNode node = getChildNoTransform(i); if(node != null) node = node.fullCopy(); res.setChild(node, i); } return res; } // Declared in PrettyPrint.jadd at line 511 public void toString(StringBuffer s) { getAccess().toString(s); s.append("["); getExpr().toString(s); s.append("]"); } // Declared in TypeCheck.jrag at line 555 public void typeCheck() { super.typeCheck(); if(!getExpr().type().unaryNumericPromotion().isInt()) error(getExpr().type().typeName() + " is not int after unary numeric promotion"); } // Declared in java.ast at line 3 // Declared in java.ast line 23
public ArrayTypeWithSizeAccess() { super();
} // Declared in java.ast at line 10
// Declared in java.ast line 23 public ArrayTypeWithSizeAccess(Access p0, Expr p1) { setChild(p0, 0); setChild(p1, 1); } // Declared in java.ast at line 15 protected int numChildren() {
return 2;
} // Declared in java.ast at line 18
public boolean mayHaveRewrite() { return false; } // Declared in java.ast at line 2 // Declared in java.ast line 22 public void setAccess(Access node) { setChild(node, 0); } // Declared in java.ast at line 5 public Access getAccess() { return (Access)getChild(0); } // Declared in java.ast at line 9 public Access getAccessNoTransform() { return (Access)getChildNoTransform(0); } // Declared in java.ast at line 2 // Declared in java.ast line 23 public void setExpr(Expr node) { setChild(node, 1); } // Declared in java.ast at line 5 public Expr getExpr() { return (Expr)getChild(1); } // Declared in java.ast at line 9 public Expr getExprNoTransform() { return (Expr)getChildNoTransform(1); } protected java.util.Map isDAafter_Variable_visited; // Declared in DefiniteAssignment.jrag at line 361 @SuppressWarnings({"unchecked", "cast"}) public boolean isDAafter(Variable v) { Object _parameters = v;if(isDAafter_Variable_visited == null) isDAafter_Variable_visited = new java.util.HashMap(4); if(new Integer(boundariesCrossed).equals(isDAafter_Variable_visited.get(_parameters))) throw new RuntimeException("Circular definition of attr: isDAafter in class: "); isDAafter_Variable_visited.put(_parameters, new Integer(boundariesCrossed)); boolean isDAafter_Variable_value = isDAafter_compute(v); isDAafter_Variable_visited.remove(_parameters); return isDAafter_Variable_value; } private boolean isDAafter_compute(Variable v) { return getExpr().isDAafter(v); } protected java.util.Map isDUafter_Variable_visited; // Declared in DefiniteAssignment.jrag at line 842 @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(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)); boolean isDUafter_Variable_value = isDUafter_compute(v); isDUafter_Variable_visited.remove(_parameters); return isDUafter_Variable_value; } private boolean isDUafter_compute(Variable v) { return getExpr().isDUafter(v); } // Declared in DefiniteAssignment.jrag at line 37 public boolean Define_boolean_isSource(ASTNode caller, ASTNode child) { if(caller == getExprNoTransform()) { return true; } if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree"); return getParent().Define_boolean_isSource(this, caller); } // Declared in LookupVariable.jrag at line 134 public SimpleSet Define_SimpleSet_lookupVariable(ASTNode caller, ASTNode child, String name) { if(caller == getExprNoTransform()) { return unqualifiedScope().lookupVariable(name); } if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree"); return getParent().Define_SimpleSet_lookupVariable(this, caller, name); } // Declared in LookupMethod.jrag at line 31 public Collection Define_Collection_lookupMethod(ASTNode caller, ASTNode child, String name) { if(caller == getExprNoTransform()) { return unqualifiedScope().lookupMethod(name); } if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree"); return getParent().Define_Collection_lookupMethod(this, caller, name); } // Declared in LookupType.jrag at line 91 public boolean Define_boolean_hasPackage(ASTNode caller, ASTNode child, String packageName) { if(caller == getExprNoTransform()) { return unqualifiedScope().hasPackage(packageName); } if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree"); return getParent().Define_boolean_hasPackage(this, caller, packageName); } // Declared in DefiniteAssignment.jrag at line 36 public boolean Define_boolean_isDest(ASTNode caller, ASTNode child) { if(caller == getExprNoTransform()) { return false; } if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree"); return getParent().Define_boolean_isDest(this, caller); } // Declared in SyntacticClassification.jrag at line 123 public NameType Define_NameType_nameType(ASTNode caller, ASTNode child) { if(caller == getExprNoTransform()) { return NameType.EXPRESSION_NAME; } if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree"); return getParent().Define_NameType_nameType(this, caller); } // Declared in DefiniteAssignment.jrag at line 362 public boolean Define_boolean_isDAbefore(ASTNode caller, ASTNode child, Variable v) { if(caller == getExprNoTransform()) { return getAccess().isDAafter(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 LookupType.jrag at line 168 public SimpleSet Define_SimpleSet_lookupType(ASTNode caller, ASTNode child, String name) { if(caller == getExprNoTransform()) { return unqualifiedScope().lookupType(name); } if(getParent() == null) throw new RuntimeException("Trying to evaluate attribute in subtree not attached to main tree"); return getParent().Define_SimpleSet_lookupType(this, caller, name); } // Declared in DefiniteAssignment.jrag at line 843 public boolean Define_boolean_isDUbefore(ASTNode caller, ASTNode child, Variable v) { if(caller == getExprNoTransform()) { return getAccess().isDUafter(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 + -