Class PropertyReadExpander


  • public class PropertyReadExpander
    extends com.ibm.wala.cast.tree.rewrite.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 com.ibm.wala.cast.tree.rewrite.CAstRewriter

        com.ibm.wala.cast.tree.rewrite.CAstRewriter.CopyKey<Self extends com.ibm.wala.cast.tree.rewrite.CAstRewriter.CopyKey<Self>>, com.ibm.wala.cast.tree.rewrite.CAstRewriter.Rewrite
    • Field Summary

      • Fields inherited from class com.ibm.wala.cast.tree.rewrite.CAstRewriter

        Ast, DEBUG, recursive, rootContext
    • Constructor Summary

      Constructors 
      Constructor Description
      PropertyReadExpander​(com.ibm.wala.cast.tree.CAst Ast)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected com.ibm.wala.cast.tree.CAstNode copyNodes​(com.ibm.wala.cast.tree.CAstNode root, com.ibm.wala.cast.tree.CAstControlFlowMap cfg, com.ibm.wala.cast.js.translator.PropertyReadExpander.RewriteContext context, java.util.Map<com.ibm.wala.util.collections.Pair<com.ibm.wala.cast.tree.CAstNode,​com.ibm.wala.cast.js.translator.PropertyReadExpander.ExpanderKey>,​com.ibm.wala.cast.tree.CAstNode> nodeMap)  
      • Methods inherited from class com.ibm.wala.cast.tree.rewrite.CAstRewriter

        copyChildren, copyChildrenArray, copyChildrenArrayAndTargets, copyFlow, copySource, copySubtreesIntoNewNode, copySubtreesIntoNewNode, copyTypes, flowOutTo, rewrite, rewrite
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PropertyReadExpander

        public PropertyReadExpander​(com.ibm.wala.cast.tree.CAst Ast)
    • Method Detail

      • copyNodes

        protected com.ibm.wala.cast.tree.CAstNode copyNodes​(com.ibm.wala.cast.tree.CAstNode root,
                                                            com.ibm.wala.cast.tree.CAstControlFlowMap cfg,
                                                            com.ibm.wala.cast.js.translator.PropertyReadExpander.RewriteContext context,
                                                            java.util.Map<com.ibm.wala.util.collections.Pair<com.ibm.wala.cast.tree.CAstNode,​com.ibm.wala.cast.js.translator.PropertyReadExpander.ExpanderKey>,​com.ibm.wala.cast.tree.CAstNode> nodeMap)
        Specified by:
        copyNodes in class com.ibm.wala.cast.tree.rewrite.CAstRewriter<com.ibm.wala.cast.js.translator.PropertyReadExpander.RewriteContext,​com.ibm.wala.cast.js.translator.PropertyReadExpander.ExpanderKey>