Class ConstantFoldingRewriter
java.lang.Object
com.ibm.wala.cast.tree.rewrite.CAstRewriter<CAstBasicRewriter.NonCopyingContext, CAstBasicRewriter.NoKey>
com.ibm.wala.cast.tree.rewrite.CAstBasicRewriter<CAstBasicRewriter.NonCopyingContext>
com.ibm.wala.cast.ir.translator.ConstantFoldingRewriter
- Direct Known Subclasses:
JSConstantFoldingRewriter
public abstract class ConstantFoldingRewriter
extends CAstBasicRewriter<CAstBasicRewriter.NonCopyingContext>
-
Nested Class Summary
Nested classes/interfaces inherited from class CAstBasicRewriter
CAstBasicRewriter.NoKey, CAstBasicRewriter.NonCopyingContextNested classes/interfaces inherited from class CAstRewriter
CAstRewriter.CopyKey<Self>, CAstRewriter.Rewrite, CAstRewriter.RewriteContext<K> -
Field Summary
Fields inherited from class CAstRewriter
Ast, DEBUG, recursive, rootContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CAstNodecopyNodes(CAstNode root, CAstControlFlowMap cfg, CAstBasicRewriter.NonCopyingContext context, Map<Pair<CAstNode, CAstBasicRewriter.NoKey>, CAstNode> nodeMap) rewrite the CAst rooted at root under some context, returning the node at the root of the rewritten tree.protected abstract Objecteval(CAstOperator op, Object lhs, Object rhs) Methods inherited from class CAstRewriter
copyChildren, copyChildrenArray, copyChildrenArrayAndTargets, copyFlow, copySource, copySubtreesIntoNewNode, copySubtreesIntoNewNode, copyTypes, flowOutTo, rewrite, rewrite
-
Constructor Details
-
ConstantFoldingRewriter
-
-
Method Details
-
eval
-
copyNodes
protected CAstNode copyNodes(CAstNode root, CAstControlFlowMap cfg, CAstBasicRewriter.NonCopyingContext context, Map<Pair<CAstNode, CAstBasicRewriter.NoKey>, CAstNode> nodeMap) Description copied from class:CAstRewriterrewrite the CAst rooted at root under some context, returning the node at the root of the rewritten tree. mutate nodeMap in the process, indicating how (original node, copy key) pairs are mapped to nodes in the rewritten tree.- Specified by:
copyNodesin classCAstBasicRewriter<CAstBasicRewriter.NonCopyingContext>
-