public abstract class ConstantFoldingRewriter extends CAstBasicRewriter
CAstBasicRewriter.NoKey, CAstBasicRewriter.NonCopyingContext
CAstRewriter.CopyKey<Self extends CAstRewriter.CopyKey>, CAstRewriter.Rewrite, CAstRewriter.RewriteContext<K extends CAstRewriter.CopyKey>
Ast, DEBUG, recursive, rootContext
Modifier | Constructor and Description |
---|---|
protected |
ConstantFoldingRewriter(CAst Ast) |
Modifier and Type | Method and Description |
---|---|
protected CAstNode |
copyNodes(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 Object |
eval(CAstOperator op,
Object lhs,
Object rhs) |
copyChildren, copyFlow, copySource, copyTypes, flowOutTo, rewrite, rewrite
protected ConstantFoldingRewriter(CAst Ast)
protected abstract Object eval(CAstOperator op, Object lhs, Object rhs)
protected CAstNode copyNodes(CAstNode root, CAstControlFlowMap cfg, CAstBasicRewriter.NonCopyingContext context, Map<Pair<CAstNode,CAstBasicRewriter.NoKey>,CAstNode> nodeMap)
CAstRewriter
copyNodes
in class CAstBasicRewriter