|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.wala.cast.tree.visit.CAstVisitor
com.ibm.wala.cast.ir.translator.AstTranslator
public abstract class AstTranslator
Common code to translate CAst to IR. Must be specialized by each language to handle semantics appropriately.
| Nested Class Summary | |
|---|---|
protected static class |
AstTranslator.AstCFG
data structure for the final CFG for a method, based on the information in an AstTranslator.IncipientCFG |
static class |
AstTranslator.AstLexicalInformation
lexical access information for some entity scope. |
class |
AstTranslator.DefaultContext
|
protected class |
AstTranslator.FinalCAstSymbol
|
class |
AstTranslator.IncipientCFG
holds the control-flow graph as it is being constructed. |
static class |
AstTranslator.InternalCAstSymbol
|
protected static class |
AstTranslator.PreBasicBlock
basic block implementation used in the CFGs constructed during the IR-generating AST traversal |
static interface |
AstTranslator.Scope
a scope in the symbol table built during AST traversal |
static class |
AstTranslator.ScopeType
|
protected static interface |
AstTranslator.Symbol
interface for name information stored in a symbol table. |
protected class |
AstTranslator.UnwindState
|
static interface |
AstTranslator.WalkContext
|
| Nested classes/interfaces inherited from class com.ibm.wala.cast.tree.visit.CAstVisitor |
|---|
CAstVisitor.Context |
| Field Summary | |
|---|---|
static boolean |
DEBUG_ALL
|
static boolean |
DEBUG_CFG
|
static boolean |
DEBUG_LEXICAL
|
static boolean |
DEBUG_NAMES
|
static boolean |
DEBUG_TOP
|
protected SSAInstructionFactory |
insts
|
protected IClassLoader |
loader
|
protected java.util.Map |
namedEntityResolver
for handling languages that let you include other source files named statically (e.g., ABAP) |
| Constructor Summary | |
|---|---|
protected |
AstTranslator(IClassLoader loader)
|
protected |
AstTranslator(IClassLoader loader,
java.util.Map namedEntityResolver)
|
| Method Summary | |
|---|---|
protected void |
assignValue(CAstNode n,
AstTranslator.WalkContext context,
AstTranslator.Symbol ls,
java.lang.String nm,
int rval)
assign rval to nm as appropriate, depending on the scope of ls |
void |
closeFunctionEntity(CAstEntity n,
AstTranslator.WalkContext parentContext,
AstTranslator.WalkContext functionContext)
|
protected abstract java.lang.String |
composeEntityName(AstTranslator.WalkContext parent,
CAstEntity f)
create the language-appropriate name for f |
protected abstract void |
declareFunction(CAstEntity N,
AstTranslator.WalkContext context)
declare a new function, represented by N |
protected abstract TypeReference |
defaultCatchType()
for a block that catches all exceptions, what is the root exception type that it can catch? E.g., for Java, java.lang.Throwable |
protected abstract void |
defineField(CAstEntity topEntity,
AstTranslator.WalkContext context,
CAstEntity fieldEntity)
define a new field fieldEntity within topEntity |
protected abstract void |
defineFunction(CAstEntity N,
AstTranslator.WalkContext definingContext,
AbstractCFG cfg,
SymbolTable symtab,
boolean hasCatchBlock,
TypeReference[][] caughtTypes,
boolean hasMonitorOp,
AstTranslator.AstLexicalInformation lexicalInfo,
AstMethod.DebuggingInformation debugInfo)
fully define a function. |
protected abstract boolean |
defineType(CAstEntity type,
AstTranslator.WalkContext wc)
define a new (presumably nested) type. |
abstract void |
doArrayRead(AstTranslator.WalkContext context,
int result,
int arrayValue,
CAstNode arrayRef,
int[] dimValues)
generate IR for a CAst array read, updating context.cfg() |
abstract void |
doArrayWrite(AstTranslator.WalkContext context,
int arrayValue,
CAstNode arrayRef,
int[] dimValues,
int rval)
generate IR for a CAst array write, updating context.cfg() |
protected abstract void |
doCall(AstTranslator.WalkContext context,
CAstNode call,
int result,
int exception,
CAstNode name,
int receiver,
int[] arguments)
generate IR for a CAst method call expression, updating context.cfg() |
protected abstract void |
doFieldRead(AstTranslator.WalkContext context,
int result,
int receiver,
CAstNode elt,
CAstNode parent)
generate IR for a CAst field read, updating context.cfg() |
protected abstract void |
doFieldWrite(AstTranslator.WalkContext context,
int receiver,
CAstNode elt,
CAstNode parent,
int rval)
generate IR for a CAst field write, updating context.cfg() |
protected int |
doGlobalRead(CAstNode node,
AstTranslator.WalkContext context,
java.lang.String name)
generate instructions for a read of a global |
protected void |
doGlobalWrite(AstTranslator.WalkContext context,
java.lang.String name,
int rval)
generate instructions for a write of a global |
protected void |
doIsFieldDefined(AstTranslator.WalkContext context,
int result,
int ref,
CAstNode field)
generate instructions to check if ref has field, storing answer in result |
protected int |
doLexicallyScopedRead(CAstNode node,
AstTranslator.WalkContext context,
java.lang.String name)
Note that the caller is responsible for ensuring that name is defined in a lexical scope. |
protected void |
doLexicallyScopedWrite(AstTranslator.WalkContext context,
java.lang.String name,
int rval)
Note that the caller is responsible for ensuring that name is defined in a lexical scope. |
protected int |
doLocalRead(AstTranslator.WalkContext context,
java.lang.String name)
get the value number for a name defined locally (i.e., within the current method) by looking up the name in context.currentScope(). |
protected void |
doLocalWrite(AstTranslator.WalkContext context,
java.lang.String nm,
int rval)
add an AssignInstruction to context.cfg() that copies rval to the
value number of local nm. |
protected abstract void |
doMaterializeFunction(CAstNode node,
AstTranslator.WalkContext context,
int result,
int exception,
CAstEntity fn)
generate IR for a CAst function expression, updating context.cfg() |
protected abstract void |
doNewObject(AstTranslator.WalkContext context,
CAstNode newNode,
int result,
java.lang.Object type,
int[] arguments)
generate IR for a CAst new expression, updating context.cfg() |
protected abstract void |
doPrimitive(int resultVal,
AstTranslator.WalkContext context,
CAstNode primitiveCall)
generate IR for call modeling creation of primitive value, updating context.cfg() |
protected void |
doPrologue(AstTranslator.WalkContext context)
generate prologue code for each function body |
protected abstract void |
doThrow(AstTranslator.WalkContext context,
int exception)
generate IR for a CAst throw expression, updating context.cfg() |
protected boolean |
enterEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor visitor)
Enter the entity visitor. |
protected boolean |
enterNode(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Enter the node visitor. |
protected AstTranslator.Scope |
getGlobalScope()
|
CAstEntity |
getIncludedEntity(CAstNode n)
|
protected CAstType |
getTypeForNode(AstTranslator.WalkContext context,
CAstNode node)
|
int |
getValue(CAstNode n)
|
protected void |
handleUnspecifiedLiteralKey(AstTranslator.WalkContext context,
CAstNode objectLiteralNode,
int unspecifiedLiteralIndex,
CAstVisitor visitor)
some languages let you omit initialization of certain fields when writing an object literal (e.g., PHP). |
protected boolean |
hasImplicitGlobals()
If this returns true, new global declarations get created for any attempt to access a non-existent variable (believe it or not, JavaScript actually does this!) |
protected boolean |
hasSpecialUndeclaredVariables()
If this returns true, then attempts to lookup non-existent names return `null' rather than tripping an assertion. |
protected boolean |
hasValue(CAstNode n)
|
void |
initFunctionEntity(CAstEntity n,
AstTranslator.WalkContext parentContext,
AstTranslator.WalkContext functionContext)
|
protected boolean |
isExceptionLabel(java.lang.Object label)
|
protected void |
leaveArrayLength(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave an ArrayLength node. |
protected void |
leaveArrayLiteral(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave a ArrayLiteral node. |
protected void |
leaveArrayLiteralInitElement(CAstNode n,
int i,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an ArrayLiteral node after processing the {i}th element initializer. |
protected void |
leaveArrayLiteralObject(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an ArrayLiteral node after processing the array object. |
protected void |
leaveArrayRef(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave an ArrayRef node. |
protected void |
leaveArrayRefAssign(CAstNode n,
CAstNode v,
CAstNode a,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an ArrayRef Assignment node after visiting the LHS. |
protected void |
leaveArrayRefAssignOp(CAstNode n,
CAstNode v,
CAstNode a,
boolean pre,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an ArrayRef Op/Assignment node after visiting the LHS. |
protected void |
leaveAssert(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave an InstanceOf node. |
void |
leaveAssign(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave an Assign node. |
protected void |
leaveBinaryExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave a BinaryExpr node. |
protected void |
leaveBlockExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave a BlockExpr node. |
protected void |
leaveBlockExprAssign(CAstNode n,
CAstNode v,
CAstNode a,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a BlockExpr Assignment node after visiting the LHS. |
protected void |
leaveBlockExprAssignOp(CAstNode n,
CAstNode v,
CAstNode a,
boolean pre,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a BlockExpr Op/Assignment node after visiting the LHS. |
protected void |
leaveBlockStmt(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave a BlockStmt node. |
protected void |
leaveCall(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave a Call node. |
protected void |
leaveCatch(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave a Catch node. |
protected void |
leaveConstant(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave a Constant node. |
protected void |
leaveDeclStmt(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave a DeclStmt node. |
protected void |
leaveEachElementGet(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave an FOR_EACH_ELEMENT_GET node. |
protected void |
leaveEachElementHasNext(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave an InstanceOf node. |
protected void |
leaveEcho(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave an ECHO node. |
protected void |
leaveEmpty(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave an Empty node. |
protected void |
leaveFieldEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor visitor)
Leave a Field entity. |
protected void |
leaveFileEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor.Context fileContext,
CAstVisitor visitor)
Leave a File entity. |
protected void |
leaveFunctionEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor.Context codeContext,
CAstVisitor visitor)
Leave a Function entity. |
protected void |
leaveFunctionExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave a FunctionExpr node. |
protected void |
leaveFunctionStmt(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave a FunctionStmt node. |
protected void |
leaveGetCaughtException(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave a GetCaughtException node. |
protected void |
leaveGlobalEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor visitor)
Leave a Field entity. |
protected void |
leaveGoto(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave a Goto node. |
protected void |
leaveIfExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave an IfExpr node. |
protected void |
leaveIfExprCondition(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an IfExpr node after processing the condition. |
protected void |
leaveIfExprTrueClause(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an IfExpr node after processing the true clause. |
protected void |
leaveIfgoto(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave an Ifgoto node. |
protected void |
leaveIfStmt(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave an IfStmt node. |
protected void |
leaveIfStmtCondition(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an IfStmt node after processing the condition. |
protected void |
leaveIfStmtTrueClause(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an IfStmt node after processing the true clause. |
protected void |
leaveInclude(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave an INCLUDE node. |
protected void |
leaveIsDefinedExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave an IS_DEFINED_EXPR node. |
protected void |
leaveLabelStmt(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave a LabelStmt node. |
protected void |
leaveLocalScope(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave a LocalScope node. |
protected void |
leaveLoop(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave a Loop node. |
protected void |
leaveLoopHeader(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a Loop node after processing the loop header. |
protected void |
leaveNew(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave a New node. |
protected void |
leaveObjectLiteral(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave an ObjectLiteral node. |
protected void |
leaveObjectLiteralFieldInit(CAstNode n,
int i,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an ObjectLiteral node after processing the {i}th field initializer. |
protected void |
leaveObjectRef(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave an ObjectRef node. |
protected void |
leaveObjectRefAssign(CAstNode n,
CAstNode v,
CAstNode a,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an ObjectRef Assignment node after visiting the LHS. |
protected void |
leaveObjectRefAssignOp(CAstNode n,
CAstNode v,
CAstNode a,
boolean pre,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an ObjectRef Op/Assignment node after visiting the LHS. |
protected void |
leavePrimitive(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave a Primitive node. |
protected void |
leaveReturn(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave a Return node. |
protected void |
leaveScriptEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor.Context codeContext,
CAstVisitor visitor)
Leave a Script entity. |
protected void |
leaveSuper(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave a Super node. |
protected void |
leaveSwitch(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave a Switch node. |
protected void |
leaveSwitchValue(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a Switch node after processing the switch value. |
protected void |
leaveThis(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave a This node. |
protected void |
leaveThrow(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave a Throw node. |
protected void |
leaveTry(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave a Try node. |
protected void |
leaveTryBlock(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a Try node after processing the try block. |
protected void |
leaveTypeEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor.Context typeContext,
CAstVisitor visitor)
Leave a Type entity. |
protected void |
leaveTypeLiteralExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave an TYPE_LITERAL_EXPR node. |
protected void |
leaveUnaryExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave a UnaryExpr node. |
protected void |
leaveUnwind(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave an Unwind node. |
protected void |
leaveVar(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave a Var node. |
protected void |
leaveVarAssign(CAstNode n,
CAstNode v,
CAstNode a,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a Var Assignment node after visiting the LHS. |
protected void |
leaveVarAssignOp(CAstNode n,
CAstNode v,
CAstNode a,
boolean pre,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a Var Op/Assignment node after visiting the LHS. |
protected void |
leaveVoid(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Leave a Void node. |
protected CAstVisitor.Context |
makeCodeContext(CAstVisitor.Context c,
CAstEntity n)
Construct a context for a Code entity. |
protected CAstVisitor.Context |
makeFileContext(CAstVisitor.Context c,
CAstEntity n)
Construct a context for a File entity. |
protected FieldReference |
makeGlobalRef(java.lang.String globalName)
creates a reference to a global named globalName. |
protected CAstVisitor.Context |
makeLocalContext(CAstVisitor.Context context,
CAstNode n)
Construct a context for a LocalScope node. |
protected abstract TypeReference |
makeType(CAstType type)
|
protected CAstVisitor.Context |
makeTypeContext(CAstVisitor.Context c,
CAstEntity n)
Construct a context for a Type entity. |
protected AstTranslator.Scope |
makeTypeScope(CAstEntity type,
AstTranslator.Scope parent)
|
protected CAstVisitor.Context |
makeUnwindContext(CAstVisitor.Context context,
CAstNode n,
CAstVisitor visitor)
Construct a context for an Unwind node. |
protected void |
postProcessNode(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Post-process a node after visiting it. |
protected int |
processAssignOp(CAstNode n,
CAstNode v,
CAstNode a,
int temp,
boolean post,
CAstVisitor.Context c)
|
protected int |
processFunctionExpr(CAstNode n,
CAstVisitor.Context c)
|
protected void |
processIf(CAstNode n,
boolean isExpr,
CAstVisitor.Context c,
CAstVisitor visitor)
|
protected void |
processObjectRefAssignOp(CAstNode n,
CAstNode v,
CAstNode a,
CAstVisitor.Context c)
|
void |
setArrayOpHandler(ArrayOpHandler arrayOpHandler)
|
int |
setValue(CAstNode n,
int v)
|
protected boolean |
topLevelFunctionsInGlobalScope()
|
void |
translate(CAstEntity N,
ModuleEntry module)
translate module, represented by CAstEntity N |
protected IBinaryOpInstruction.IOperator |
translateBinaryOpcode(CAstNode op)
|
protected IConditionalBranchInstruction.IOperator |
translateConditionOpcode(CAstNode op)
|
protected IUnaryOpInstruction.IOperator |
translateUnaryOpcode(CAstNode op)
|
protected abstract boolean |
treatGlobalsAsLexicallyScoped()
can lexical reads / writes access globals? |
protected abstract boolean |
useDefaultInitValues()
does the language care about using type-appropriate default values? For Java, the answer is yes (ints should get a default value of 0, null for pointers, etc.). |
protected abstract boolean |
useLocalValuesForLexicalVars()
given accesses in a method to variables defined in an enclosing lexical scope, is it legal to read the variable into a local l once at the beginning of the method, operate on l through the method body (rather than performing separate lexical read / write operations), and write back the value in l (if necessary) at the end of the method? |
protected boolean |
visitArrayLength(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an ArrayLength node. |
protected boolean |
visitArrayLiteral(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an ArrayLiteral node. |
protected boolean |
visitArrayRef(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an ArrayRef node. |
protected boolean |
visitArrayRefAssign(CAstNode n,
CAstNode v,
CAstNode a,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an ArrayRef Assignment node after visiting the RHS. |
protected boolean |
visitArrayRefAssignOp(CAstNode n,
CAstNode v,
CAstNode a,
boolean pre,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an ArrayRef Op/Assignment node after visiting the RHS. |
protected boolean |
visitAssert(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an InstanceOf node. |
boolean |
visitAssign(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an Assign node. |
protected boolean |
visitBinaryExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a BinaryExpr node. |
protected boolean |
visitBlockExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a BlockExpr node. |
protected boolean |
visitBlockExprAssign(CAstNode n,
CAstNode v,
CAstNode a,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a BlockExpr Assignment node after visiting the RHS. |
protected boolean |
visitBlockExprAssignOp(CAstNode n,
CAstNode v,
CAstNode a,
boolean pre,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a BlockExpr Op/Assignment node after visiting the RHS. |
protected boolean |
visitBlockStmt(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a BlockStmt node. |
protected boolean |
visitCall(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a Call node. |
protected boolean |
visitCatch(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a Catch node. |
protected boolean |
visitConstant(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a Constant node. |
protected boolean |
visitDeclStmt(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a DeclStmt node. |
protected boolean |
visitEachElementGet(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an InstanceOf node. |
protected boolean |
visitEachElementHasNext(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an InstanceOf node. |
protected boolean |
visitEcho(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
|
protected boolean |
visitEmpty(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an Empty node. |
protected boolean |
visitFieldEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor visitor)
Visit a Field entity. |
protected boolean |
visitFileEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor.Context fileContext,
CAstVisitor visitor)
Visit a File entity. |
protected boolean |
visitFunctionEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor.Context codeContext,
CAstVisitor visitor)
Visit a Function entity. |
protected boolean |
visitFunctionExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a FunctionExpr node. |
protected boolean |
visitFunctionStmt(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a FunctionStmt node. |
protected boolean |
visitGetCaughtException(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a GetCaughtException node. |
protected boolean |
visitGlobalEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor visitor)
Visit a Field entity. |
protected boolean |
visitGoto(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a Goto node. |
protected boolean |
visitIfExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an IfExpr node. |
protected boolean |
visitIfgoto(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an Ifgoto node. |
protected boolean |
visitIfStmt(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an IfStmt node. |
protected boolean |
visitIsDefinedExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
|
protected boolean |
visitLabelStmt(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a LabelStmt node. |
protected boolean |
visitLocalScope(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a LocalScope node. |
protected boolean |
visitLoop(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a Loop node. |
protected boolean |
visitMacroEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor.Context codeContext,
CAstVisitor visitor)
Visit a Macro entity. |
protected boolean |
visitNew(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a New node. |
protected boolean |
visitObjectLiteral(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an ObjectLiteral node. |
protected boolean |
visitObjectRef(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an ObjectRef node. |
protected boolean |
visitObjectRefAssign(CAstNode n,
CAstNode v,
CAstNode a,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an ObjectRef Assignment node after visiting the RHS. |
protected boolean |
visitObjectRefAssignOp(CAstNode n,
CAstNode v,
CAstNode a,
boolean pre,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an ObjectRef Op/Assignment node after visiting the RHS. |
protected boolean |
visitPrimitive(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a Primitive node. |
protected boolean |
visitReturn(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a Return node. |
protected boolean |
visitScriptEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor.Context codeContext,
CAstVisitor visitor)
Visit a Script entity. |
protected boolean |
visitSuper(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a Super node. |
protected boolean |
visitSwitch(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a Switch node. |
protected boolean |
visitThis(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a This node. |
protected boolean |
visitThrow(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a Throw node. |
protected boolean |
visitTry(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a Try node. |
protected boolean |
visitTypeEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor.Context typeContext,
CAstVisitor visitor)
Visit a Type entity. |
protected boolean |
visitTypeLiteralExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an TYPE_LITERAL_EXPR node. |
protected boolean |
visitUnaryExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a UnaryExpr node. |
protected boolean |
visitUnwind(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit an Unwind node. |
protected boolean |
visitVar(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a Var node. |
protected boolean |
visitVarAssign(CAstNode n,
CAstNode v,
CAstNode a,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a Var Assignment node after visiting the RHS. |
protected boolean |
visitVarAssignOp(CAstNode n,
CAstNode v,
CAstNode a,
boolean pre,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a Var Op/Assignment node after visiting the RHS. |
protected boolean |
visitVoid(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
Visit a Void node. |
protected void |
walkEntities(CAstEntity N,
CAstVisitor.Context c)
|
| Methods inherited from class com.ibm.wala.cast.tree.visit.CAstVisitor |
|---|
doVisit, doVisitArrayRefNode, doVisitAssignNodes, doVisitEntity, getParent, leaveCast, leaveEntity, leaveInstanceOf, leaveMacroEntity, leaveMacroVar, leaveNode, postProcessEntity, setParent, visit, visitAllChildren, visitAssignNodes, visitCast, visitChildren, visitEntities, visitEntity, visitInclude, visitInstanceOf, visitMacroVar, visitNode, visitScopedEntities, visitScopedEntities |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final IClassLoader loader
protected final java.util.Map namedEntityResolver
protected final SSAInstructionFactory insts
public static final boolean DEBUG_ALL
public static final boolean DEBUG_TOP
public static final boolean DEBUG_CFG
public static final boolean DEBUG_NAMES
public static final boolean DEBUG_LEXICAL
| Constructor Detail |
|---|
protected AstTranslator(IClassLoader loader,
java.util.Map namedEntityResolver)
protected AstTranslator(IClassLoader loader)
| Method Detail |
|---|
protected abstract boolean useDefaultInitValues()
protected abstract boolean treatGlobalsAsLexicallyScoped()
protected abstract boolean useLocalValuesForLexicalVars()
protected boolean topLevelFunctionsInGlobalScope()
protected abstract TypeReference defaultCatchType()
protected abstract TypeReference makeType(CAstType type)
protected abstract boolean defineType(CAstEntity type,
AstTranslator.WalkContext wc)
protected abstract void declareFunction(CAstEntity N,
AstTranslator.WalkContext context)
protected abstract void defineFunction(CAstEntity N,
AstTranslator.WalkContext definingContext,
AbstractCFG cfg,
SymbolTable symtab,
boolean hasCatchBlock,
TypeReference[][] caughtTypes,
boolean hasMonitorOp,
AstTranslator.AstLexicalInformation lexicalInfo,
AstMethod.DebuggingInformation debugInfo)
protected abstract void defineField(CAstEntity topEntity,
AstTranslator.WalkContext context,
CAstEntity fieldEntity)
protected abstract java.lang.String composeEntityName(AstTranslator.WalkContext parent,
CAstEntity f)
protected abstract void doThrow(AstTranslator.WalkContext context,
int exception)
public abstract void doArrayRead(AstTranslator.WalkContext context,
int result,
int arrayValue,
CAstNode arrayRef,
int[] dimValues)
doArrayRead in interface ArrayOpHandler
public abstract void doArrayWrite(AstTranslator.WalkContext context,
int arrayValue,
CAstNode arrayRef,
int[] dimValues,
int rval)
doArrayWrite in interface ArrayOpHandler
protected abstract void doFieldRead(AstTranslator.WalkContext context,
int result,
int receiver,
CAstNode elt,
CAstNode parent)
protected abstract void doFieldWrite(AstTranslator.WalkContext context,
int receiver,
CAstNode elt,
CAstNode parent,
int rval)
protected abstract void doMaterializeFunction(CAstNode node,
AstTranslator.WalkContext context,
int result,
int exception,
CAstEntity fn)
protected abstract void doNewObject(AstTranslator.WalkContext context,
CAstNode newNode,
int result,
java.lang.Object type,
int[] arguments)
protected abstract void doCall(AstTranslator.WalkContext context,
CAstNode call,
int result,
int exception,
CAstNode name,
int receiver,
int[] arguments)
protected boolean isExceptionLabel(java.lang.Object label)
protected boolean hasImplicitGlobals()
protected boolean hasSpecialUndeclaredVariables()
protected void handleUnspecifiedLiteralKey(AstTranslator.WalkContext context,
CAstNode objectLiteralNode,
int unspecifiedLiteralIndex,
CAstVisitor visitor)
protected void doPrologue(AstTranslator.WalkContext context)
protected abstract void doPrimitive(int resultVal,
AstTranslator.WalkContext context,
CAstNode primitiveCall)
protected int doLocalRead(AstTranslator.WalkContext context,
java.lang.String name)
protected void doLocalWrite(AstTranslator.WalkContext context,
java.lang.String nm,
int rval)
AssignInstruction to context.cfg() that copies rval to the
value number of local nm. Note that the caller is responsible for ensuring
that nm is defined in the local scope.
protected int doLexicallyScopedRead(CAstNode node,
AstTranslator.WalkContext context,
java.lang.String name)
node - the AST node representing the readcontext - name -
protected void doLexicallyScopedWrite(AstTranslator.WalkContext context,
java.lang.String name,
int rval)
protected int doGlobalRead(CAstNode node,
AstTranslator.WalkContext context,
java.lang.String name)
protected void doGlobalWrite(AstTranslator.WalkContext context,
java.lang.String name,
int rval)
protected void doIsFieldDefined(AstTranslator.WalkContext context,
int result,
int ref,
CAstNode field)
protected FieldReference makeGlobalRef(java.lang.String globalName)
public void setArrayOpHandler(ArrayOpHandler arrayOpHandler)
protected AstTranslator.Scope makeTypeScope(CAstEntity type,
AstTranslator.Scope parent)
protected boolean hasValue(CAstNode n)
public final int setValue(CAstNode n,
int v)
public final int getValue(CAstNode n)
protected IUnaryOpInstruction.IOperator translateUnaryOpcode(CAstNode op)
protected IBinaryOpInstruction.IOperator translateBinaryOpcode(CAstNode op)
protected IConditionalBranchInstruction.IOperator translateConditionOpcode(CAstNode op)
protected final CAstType getTypeForNode(AstTranslator.WalkContext context,
CAstNode node)
protected CAstVisitor.Context makeFileContext(CAstVisitor.Context c,
CAstEntity n)
CAstVisitor
makeFileContext in class CAstVisitorc - a visitor-specific context in which this file was visitedn - the file entity
protected CAstVisitor.Context makeTypeContext(CAstVisitor.Context c,
CAstEntity n)
CAstVisitor
makeTypeContext in class CAstVisitorc - a visitor-specific context in which this type was visitedn - the type entity
protected CAstVisitor.Context makeCodeContext(CAstVisitor.Context c,
CAstEntity n)
CAstVisitor
makeCodeContext in class CAstVisitorc - a visitor-specific context in which the code was visitedn - the code entity
protected boolean enterEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor visitor)
CAstVisitor
enterEntity in class CAstVisitorn - the entity to processcontext - a visitor-specific context
protected boolean visitFileEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor.Context fileContext,
CAstVisitor visitor)
CAstVisitor
visitFileEntity in class CAstVisitorn - the entity to processcontext - a visitor-specific contextfileContext - a visitor-specific context for this file
protected void leaveFileEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor.Context fileContext,
CAstVisitor visitor)
CAstVisitor
leaveFileEntity in class CAstVisitorn - the entity to processcontext - a visitor-specific contextfileContext - a visitor-specific context for this file
protected boolean visitFieldEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor visitor)
CAstVisitor
visitFieldEntity in class CAstVisitorn - the entity to processcontext - a visitor-specific context
protected void leaveFieldEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor visitor)
CAstVisitor
leaveFieldEntity in class CAstVisitorn - the entity to processcontext - a visitor-specific context
protected boolean visitGlobalEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor visitor)
CAstVisitor
visitGlobalEntity in class CAstVisitorn - the entity to processcontext - a visitor-specific context
protected void leaveGlobalEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor visitor)
CAstVisitor
leaveGlobalEntity in class CAstVisitorn - the entity to processcontext - a visitor-specific context
protected boolean visitTypeEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor.Context typeContext,
CAstVisitor visitor)
CAstVisitor
visitTypeEntity in class CAstVisitorn - the entity to processcontext - a visitor-specific contexttypeContext - a visitor-specific context for this type
protected void leaveTypeEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor.Context typeContext,
CAstVisitor visitor)
CAstVisitor
leaveTypeEntity in class CAstVisitorn - the entity to processcontext - a visitor-specific contexttypeContext - a visitor-specific context for this type
protected boolean visitFunctionEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor.Context codeContext,
CAstVisitor visitor)
CAstVisitor
visitFunctionEntity in class CAstVisitorn - the entity to processcontext - a visitor-specific contextcodeContext - a visitor-specific context for this function
protected void leaveFunctionEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor.Context codeContext,
CAstVisitor visitor)
CAstVisitor
leaveFunctionEntity in class CAstVisitorn - the entity to processcontext - a visitor-specific contextcodeContext - a visitor-specific context for this function
protected boolean visitMacroEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor.Context codeContext,
CAstVisitor visitor)
CAstVisitor
visitMacroEntity in class CAstVisitorn - the entity to processcontext - a visitor-specific contextcodeContext - a visitor-specific context for this macro
protected boolean visitScriptEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor.Context codeContext,
CAstVisitor visitor)
CAstVisitor
visitScriptEntity in class CAstVisitorn - the entity to processcontext - a visitor-specific contextcodeContext - a visitor-specific context for this script
protected void leaveScriptEntity(CAstEntity n,
CAstVisitor.Context context,
CAstVisitor.Context codeContext,
CAstVisitor visitor)
CAstVisitor
leaveScriptEntity in class CAstVisitorn - the entity to processcontext - a visitor-specific contextcodeContext - a visitor-specific context for this script
public void initFunctionEntity(CAstEntity n,
AstTranslator.WalkContext parentContext,
AstTranslator.WalkContext functionContext)
public void closeFunctionEntity(CAstEntity n,
AstTranslator.WalkContext parentContext,
AstTranslator.WalkContext functionContext)
protected CAstVisitor.Context makeLocalContext(CAstVisitor.Context context,
CAstNode n)
CAstVisitor
makeLocalContext in class CAstVisitorcontext - a visitor-specific context in which the local scope was visitedn - the local scope node
protected CAstVisitor.Context makeUnwindContext(CAstVisitor.Context context,
CAstNode n,
CAstVisitor visitor)
CAstVisitor
makeUnwindContext in class CAstVisitorcontext - a visitor-specific context in which the unwind was visitedn - the unwind node
protected boolean enterNode(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
enterNode in class CAstVisitorn - the node to processc - a visitor-specific context
protected void postProcessNode(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
postProcessNode in class CAstVisitorn - the node to processc - a visitor-specific context
protected int processFunctionExpr(CAstNode n,
CAstVisitor.Context c)
protected boolean visitFunctionExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitFunctionExpr in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveFunctionExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveFunctionExpr in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitFunctionStmt(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitFunctionStmt in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveFunctionStmt(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveFunctionStmt in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitLocalScope(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitLocalScope in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveLocalScope(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveLocalScope in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitBlockExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitBlockExpr in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveBlockExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveBlockExpr in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitBlockStmt(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitBlockStmt in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveBlockStmt(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveBlockStmt in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitLoop(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitLoop in class CAstVisitorn - the node to processc - a visitor-specific context
protected final void leaveLoopHeader(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveLoopHeader in class CAstVisitorn - the node to processc - a visitor-specific context
protected final void leaveLoop(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveLoop in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitGetCaughtException(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitGetCaughtException in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveGetCaughtException(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveGetCaughtException in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitThis(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitThis in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveThis(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveThis in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitSuper(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitSuper in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveSuper(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveSuper in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitCall(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitCall in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveCall(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveCall in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitVar(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitVar in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveVar(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveVar in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitConstant(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitConstant in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveConstant(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveConstant in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitBinaryExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitBinaryExpr in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveBinaryExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveBinaryExpr in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitUnaryExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitUnaryExpr in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveUnaryExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveUnaryExpr in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitArrayLength(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitArrayLength in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveArrayLength(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveArrayLength in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitArrayRef(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitArrayRef in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveArrayRef(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveArrayRef in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitDeclStmt(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitDeclStmt in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveDeclStmt(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveDeclStmt in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitReturn(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitReturn in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveReturn(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveReturn in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitIfgoto(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitIfgoto in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveIfgoto(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveIfgoto in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitGoto(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitGoto in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveGoto(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveGoto in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitLabelStmt(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitLabelStmt in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveLabelStmt(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveLabelStmt in class CAstVisitorn - the node to processc - a visitor-specific context
protected void processIf(CAstNode n,
boolean isExpr,
CAstVisitor.Context c,
CAstVisitor visitor)
protected final void leaveIfStmtCondition(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveIfStmtCondition in class CAstVisitorn - the node to processc - a visitor-specific context
protected final void leaveIfStmtTrueClause(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveIfStmtTrueClause in class CAstVisitorn - the node to processc - a visitor-specific context
protected final void leaveIfStmt(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveIfStmt in class CAstVisitorn - the node to processc - a visitor-specific context
protected final void leaveIfExprCondition(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveIfExprCondition in class CAstVisitorn - the node to processc - a visitor-specific context
protected final void leaveIfExprTrueClause(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveIfExprTrueClause in class CAstVisitorn - the node to processc - a visitor-specific context
protected final void leaveIfExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveIfExpr in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitIfStmt(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitIfStmt in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitIfExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitIfExpr in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitNew(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitNew in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveNew(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveNew in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitObjectLiteral(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitObjectLiteral in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveObjectLiteralFieldInit(CAstNode n,
int i,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveObjectLiteralFieldInit in class CAstVisitorn - the node to processi - the field position that was initializedc - a visitor-specific context
protected void leaveObjectLiteral(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveObjectLiteral in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitArrayLiteral(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitArrayLiteral in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveArrayLiteralObject(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveArrayLiteralObject in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveArrayLiteralInitElement(CAstNode n,
int i,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveArrayLiteralInitElement in class CAstVisitorn - the node to processi - the index that was initializedc - a visitor-specific context
protected void leaveArrayLiteral(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveArrayLiteral in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitObjectRef(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitObjectRef in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveObjectRef(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveObjectRef in class CAstVisitorn - the node to processc - a visitor-specific context
public boolean visitAssign(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitAssign in class CAstVisitorn - the node to processc - a visitor-specific context
public void leaveAssign(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveAssign in class CAstVisitorn - the node to processc - a visitor-specific context
protected int processAssignOp(CAstNode n,
CAstNode v,
CAstNode a,
int temp,
boolean post,
CAstVisitor.Context c)
protected boolean visitArrayRefAssign(CAstNode n,
CAstNode v,
CAstNode a,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitArrayRefAssign in class CAstVisitorn - the LHS node to processv - the RHS node to processa - the assignment node to processc - a visitor-specific context
protected void leaveArrayRefAssign(CAstNode n,
CAstNode v,
CAstNode a,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveArrayRefAssign in class CAstVisitorn - the LHS node to processv - the RHS node to processa - the assignment node to processc - a visitor-specific context
protected boolean visitArrayRefAssignOp(CAstNode n,
CAstNode v,
CAstNode a,
boolean pre,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitArrayRefAssignOp in class CAstVisitorn - the LHS node to processv - the RHS node to processa - the assignment node to processpre - whether the value before the operation should be usedc - a visitor-specific context
protected void leaveArrayRefAssignOp(CAstNode n,
CAstNode v,
CAstNode a,
boolean pre,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveArrayRefAssignOp in class CAstVisitorn - the LHS node to processv - the RHS node to processa - the assignment node to processpre - whether the value before the operation should be usedc - a visitor-specific context
protected boolean visitObjectRefAssign(CAstNode n,
CAstNode v,
CAstNode a,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitObjectRefAssign in class CAstVisitorn - the LHS node to processv - the RHS node to processa - the assignment node to processc - a visitor-specific context
protected void leaveObjectRefAssign(CAstNode n,
CAstNode v,
CAstNode a,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveObjectRefAssign in class CAstVisitorn - the LHS node to processv - the RHS node to processa - the assignment node to processc - a visitor-specific context
protected void processObjectRefAssignOp(CAstNode n,
CAstNode v,
CAstNode a,
CAstVisitor.Context c)
protected boolean visitObjectRefAssignOp(CAstNode n,
CAstNode v,
CAstNode a,
boolean pre,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitObjectRefAssignOp in class CAstVisitorn - the LHS node to processv - the RHS node to processa - the assignment node to processpre - whether the value before the operation should be usedc - a visitor-specific context
protected void leaveObjectRefAssignOp(CAstNode n,
CAstNode v,
CAstNode a,
boolean pre,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveObjectRefAssignOp in class CAstVisitorn - the LHS node to processv - the RHS node to processa - the assignment node to processpre - whether the value before the operation should be usedc - a visitor-specific context
protected boolean visitBlockExprAssign(CAstNode n,
CAstNode v,
CAstNode a,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitBlockExprAssign in class CAstVisitorn - the LHS node to processv - the RHS node to processa - the assignment node to processc - a visitor-specific context
protected void leaveBlockExprAssign(CAstNode n,
CAstNode v,
CAstNode a,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveBlockExprAssign in class CAstVisitorn - the LHS node to processv - the RHS node to processa - the assignment node to processc - a visitor-specific context
protected boolean visitBlockExprAssignOp(CAstNode n,
CAstNode v,
CAstNode a,
boolean pre,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitBlockExprAssignOp in class CAstVisitorn - the LHS node to processv - the RHS node to processa - the assignment node to processpre - whether the value before the operation should be usedc - a visitor-specific context
protected void leaveBlockExprAssignOp(CAstNode n,
CAstNode v,
CAstNode a,
boolean pre,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveBlockExprAssignOp in class CAstVisitorn - the LHS node to processv - the RHS node to processa - the assignment node to processpre - whether the value before the operation should be usedc - a visitor-specific context
protected boolean visitVarAssign(CAstNode n,
CAstNode v,
CAstNode a,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitVarAssign in class CAstVisitorn - the LHS node to processv - the RHS node to processa - the assignment node to processc - a visitor-specific context
protected void assignValue(CAstNode n,
AstTranslator.WalkContext context,
AstTranslator.Symbol ls,
java.lang.String nm,
int rval)
protected void leaveVarAssign(CAstNode n,
CAstNode v,
CAstNode a,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveVarAssign in class CAstVisitorn - the LHS node to processv - the RHS node to processa - the assignment node to processc - a visitor-specific context
protected boolean visitVarAssignOp(CAstNode n,
CAstNode v,
CAstNode a,
boolean pre,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitVarAssignOp in class CAstVisitorn - the LHS node to processv - the RHS node to processa - the assignment node to processpre - whether the value before the operation should be usedc - a visitor-specific context
protected void leaveVarAssignOp(CAstNode n,
CAstNode v,
CAstNode a,
boolean pre,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveVarAssignOp in class CAstVisitorn - the LHS node to processv - the RHS node to processa - the assignment node to processpre - whether the value before the operation should be usedc - a visitor-specific context
protected boolean visitSwitch(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitSwitch in class CAstVisitorn - the node to processc - a visitor-specific context
protected final void leaveSwitchValue(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveSwitchValue in class CAstVisitorn - the node to processc - a visitor-specific context
protected final void leaveSwitch(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveSwitch in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitThrow(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitThrow in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveThrow(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveThrow in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitCatch(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitCatch in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveCatch(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveCatch in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitUnwind(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitUnwind in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveUnwind(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveUnwind in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitTry(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitTry in class CAstVisitorn - the node to processc - a visitor-specific context
protected final void leaveTryBlock(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveTryBlock in class CAstVisitorn - the node to processc - a visitor-specific context
protected final void leaveTry(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveTry in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitEmpty(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitEmpty in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveEmpty(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveEmpty in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitPrimitive(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitPrimitive in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leavePrimitive(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leavePrimitive in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitVoid(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitVoid in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveVoid(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveVoid in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitAssert(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitAssert in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveAssert(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveAssert in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitEachElementGet(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitEachElementGet in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveEachElementGet(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveEachElementGet in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitEachElementHasNext(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitEachElementHasNext in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveEachElementHasNext(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveEachElementHasNext in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitTypeLiteralExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
visitTypeLiteralExpr in class CAstVisitorn - the node to processc - a visitor-specific context
protected void leaveTypeLiteralExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveTypeLiteralExpr in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitIsDefinedExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
visitIsDefinedExpr in class CAstVisitor
protected void leaveIsDefinedExpr(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveIsDefinedExpr in class CAstVisitorn - the node to processc - a visitor-specific context
protected boolean visitEcho(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
visitEcho in class CAstVisitor
protected void leaveEcho(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveEcho in class CAstVisitorn - the node to processc - a visitor-specific contextpublic CAstEntity getIncludedEntity(CAstNode n)
protected void leaveInclude(CAstNode n,
CAstVisitor.Context c,
CAstVisitor visitor)
CAstVisitor
leaveInclude in class CAstVisitorn - the node to processc - a visitor-specific context
protected final void walkEntities(CAstEntity N,
CAstVisitor.Context c)
public void translate(CAstEntity N,
ModuleEntry module)
CAstEntity N
translate in interface TranslatorToIRprotected AstTranslator.Scope getGlobalScope()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||