Class PropertyReadExpander
java.lang.Object
com.ibm.wala.cast.tree.rewrite.CAstRewriter<com.ibm.wala.cast.js.translator.PropertyReadExpander.RewriteContext, com.ibm.wala.cast.js.translator.PropertyReadExpander.ExpanderKey>
com.ibm.wala.cast.js.translator.PropertyReadExpander
public class PropertyReadExpander
extends CAstRewriter<com.ibm.wala.cast.js.translator.PropertyReadExpander.RewriteContext, com.ibm.wala.cast.js.translator.PropertyReadExpander.ExpanderKey>
Transforms property reads to make prototype chain operations explicit. Each read is converted to
a do loop that walks up the prototype chain until the property is found or the chain has ended.
-
Nested Class Summary
Nested classes/interfaces inherited from class CAstRewriter
CAstRewriter.CopyKey<Self>, CAstRewriter.Rewrite -
Field Summary
Fields inherited from class CAstRewriter
Ast, DEBUG, recursive, rootContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CAstNodecopyNodes(CAstNode root, CAstControlFlowMap cfg, com.ibm.wala.cast.js.translator.PropertyReadExpander.RewriteContext context, Map<Pair<CAstNode, com.ibm.wala.cast.js.translator.PropertyReadExpander.ExpanderKey>, CAstNode> nodeMap) rewrite the CAst rooted at root under some context, returning the node at the root of the rewritten tree.Methods inherited from class CAstRewriter
copyChildren, copyChildrenArray, copyChildrenArrayAndTargets, copyFlow, copySource, copySubtreesIntoNewNode, copySubtreesIntoNewNode, copyTypes, flowOutTo, rewrite, rewrite
-
Constructor Details
-
PropertyReadExpander
-
-
Method Details
-
copyNodes
protected CAstNode copyNodes(CAstNode root, CAstControlFlowMap cfg, com.ibm.wala.cast.js.translator.PropertyReadExpander.RewriteContext context, Map<Pair<CAstNode, com.ibm.wala.cast.js.translator.PropertyReadExpander.ExpanderKey>, 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 classCAstRewriter<com.ibm.wala.cast.js.translator.PropertyReadExpander.RewriteContext, com.ibm.wala.cast.js.translator.PropertyReadExpander.ExpanderKey>
-