com.google.javascript.jscomp
Class CheckEventfulObjectDisposal

java.lang.Object
  extended by com.google.javascript.jscomp.CheckEventfulObjectDisposal
All Implemented Interfaces:
CompilerPass

public class CheckEventfulObjectDisposal
extends Object
implements CompilerPass

Check to ensure there exists a path to dispose of each eventful object created. This compiler pass uses the inferred types and hence either type checking or type inference needs to be enabled. The set of eventful objects is initialized to {goog.events.Eventful} and, if the "aggressive" mode is set, expanded to a larger class using the eventize relationship (see http://research.google.com/pubs/pub40738.html). This pass is heuristic based and should not be used for any check of pass/fail testing. This check is performed interprocedurally but in a flow and path insensitive manner.


Nested Class Summary
static class CheckEventfulObjectDisposal.DisposalCheckingPolicy
          Policies to determine the disposal checking level.
 
Field Summary
static int DISPOSE_ALL
           
 
Constructor Summary
CheckEventfulObjectDisposal(AbstractCompiler compiler, CheckEventfulObjectDisposal.DisposalCheckingPolicy checkingPolicy)
           
 
Method Summary
 void process(Node externs, Node root)
          Process the JS with root node root.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DISPOSE_ALL

public static final int DISPOSE_ALL
See Also:
Constant Field Values
Constructor Detail

CheckEventfulObjectDisposal

public CheckEventfulObjectDisposal(AbstractCompiler compiler,
                                   CheckEventfulObjectDisposal.DisposalCheckingPolicy checkingPolicy)
Method Detail

process

public void process(Node externs,
                    Node root)
Description copied from interface: CompilerPass
Process the JS with root node root. Can modify the contents of each Node tree

Specified by:
process in interface CompilerPass
Parameters:
externs - Top of external JS tree
root - Top of JS tree