Class JSSSAPropagationCallGraphBuilder

All Implemented Interfaces:
CallGraphBuilder<InstanceKey>, HeapModel, InstanceKeyFactory, PointerKeyFactory
Direct Known Subclasses:
JSCFABuilder

public class JSSSAPropagationCallGraphBuilder extends AstSSAPropagationCallGraphBuilder
Specialized pointer analysis constraint generation for JavaScript.

Global object handling

The global object is represented by a GlobalObjectKey stored in globalObject. AstGlobalRead and AstGlobalWrite instructions are treated as accessing properties of the global object; see JSSSAPropagationCallGraphBuilder.JSConstraintVisitor.visitAstGlobalRead(AstGlobalRead), JSSSAPropagationCallGraphBuilder.JSConstraintVisitor.visitAstGlobalWrite(AstGlobalWrite), and JSSSAPropagationCallGraphBuilder.JSPointerAnalysisImpl.JSImplicitPointsToSetVisitor.visitAstGlobalRead(AstGlobalRead). Finally, we need to represent direct flow of the global object to handle receiver argument semantics (see RhinoToAstTranslator). To do so, we create a reference to a global named GLOBAL_OBJ_VAR_NAME, which is handled specially in JSSSAPropagationCallGraphBuilder.JSConstraintVisitor.visitAstGlobalRead(AstGlobalRead).