com.google.javascript.jscomp.ReferenceCollector.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of closure-compiler-unshaded Show documentation
Show all versions of closure-compiler-unshaded Show documentation
Closure Compiler is a JavaScript optimizing compiler. It parses your
JavaScript, analyzes it, removes dead code and rewrites and minimizes
what's left. It also checks syntax, variable references, and types, and
warns about common JavaScript pitfalls. It is used in many of Google's
JavaScript apps, including Gmail, Google Web Search, Google Maps, and
Google Docs.
The newest version!
???? 7r
!com/google/common/base/Predicates
alwaysTrue $()Lcom/google/common/base/Predicate;
/com/google/javascript/jscomp/ReferenceCollector ?(Lcom/google/javascript/jscomp/AbstractCompiler;Lcom/google/javascript/jscomp/ReferenceCollector$Behavior;Lcom/google/javascript/jscomp/ScopeCreator;Lcom/google/common/base/Predicate;)V
java/lang/Object ()V java/util/LinkedHashMap
referenceMap Ljava/util/Map; java/util/ArrayDeque
blockStack Ljava/util/ArrayDeque; ! Acom/google/javascript/jscomp/ReferenceCollector$CollectorCallback
# $ 4(Lcom/google/javascript/jscomp/ReferenceCollector;)V & ' ( callback CLcom/google/javascript/jscomp/ReferenceCollector$CollectorCallback; * java/util/LinkedHashSet
) - . / collectedHoistedFunctions Ljava/util/LinkedHashSet; 1 2 3 compiler /Lcom/google/javascript/jscomp/AbstractCompiler; 5 6 7 behavior :Lcom/google/javascript/jscomp/ReferenceCollector$Behavior; 9 : ; scopeCreator +Lcom/google/javascript/jscomp/ScopeCreator; = > ? varFilter "Lcom/google/common/base/Predicate;
A B C createTraversalBuilder 6()Lcom/google/javascript/jscomp/NodeTraversal$Builder;
E F G H I 2com/google/javascript/jscomp/NodeTraversal$Builder
traverseRoots G(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)V
E K L M traverse %(Lcom/google/javascript/rhino/Node;)V
O P Q R S "com/google/javascript/jscomp/Scope isHoistScope ()Z U V W narrowScope $Lcom/google/javascript/jscomp/Scope;
O Y Z [ getRootNode $()Lcom/google/javascript/rhino/Node;
] ^ M pushNewBlock
E ` a b traverseAtScope /(Lcom/google/javascript/jscomp/AbstractScope;)V
d e M popLastBlock
g h i j C *com/google/javascript/jscomp/NodeTraversal builder
E l m n setCompiler e(Lcom/google/javascript/jscomp/AbstractCompiler;)Lcom/google/javascript/jscomp/NodeTraversal$Builder;
E p q r setCallback k(Lcom/google/javascript/jscomp/NodeTraversal$Callback;)Lcom/google/javascript/jscomp/NodeTraversal$Builder;
E t u v setScopeCreator a(Lcom/google/javascript/jscomp/ScopeCreator;)Lcom/google/javascript/jscomp/NodeTraversal$Builder;
E x y z 1setObeyDestructuringAndDefaultValueExecutionOrder 7(Z)Lcom/google/javascript/jscomp/NodeTraversal$Builder; | } ~ ?
java/util/Map keySet ()Ljava/util/Set;
? ? ? ? ? com/google/javascript/jscomp/Var getScope .()Lcom/google/javascript/jscomp/AbstractScope; | ? ? ? get &(Ljava/lang/Object;)Ljava/lang/Object; ? 0com/google/javascript/jscomp/ReferenceCollection
? ? ? [
getParentNode
? ? ? ? ? %com/google/javascript/jscomp/NodeUtil isHoistedFunctionDeclaration %(Lcom/google/javascript/rhino/Node;)Z
O ? ? ? getDepth ()I
) ? ? ? contains (Ljava/lang/Object;)Z
O ? ? S isGlobal
? ? ? getFirst ()Ljava/lang/Object; ? 'com/google/javascript/jscomp/BasicBlock
? ? ? addLast (Ljava/lang/Object;)V
? ? ? iterator ()Ljava/util/Iterator; ? ? ? ? S java/util/Iterator hasNext ? ? ? ? next
? ? ? [ getRoot
? ? ? ? [ com/google/javascript/rhino/Node
getFirstChild
? ? ? addReference s(Lcom/google/javascript/jscomp/Var;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/NodeTraversal;)V ? ? ? ? ? )com/google/javascript/jscomp/ScopeCreator createScope |(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/AbstractScope;)Lcom/google/javascript/jscomp/AbstractScope;
? ? ? peekLast
? ? ? N(Lcom/google/javascript/jscomp/BasicBlock;Lcom/google/javascript/rhino/Node;)V
? ? ?
removeLast
? ? ? ? ? /com/google/javascript/jscomp/base/JSCompObjects identical '(Ljava/lang/Object;Ljava/lang/Object;)Z
? ? ? ? ? $com/google/common/base/Preconditions
checkState (ZLjava/lang/Object;)V ? ? ? ? ? 1com/google/javascript/jscomp/ReferenceCollector$2 ,$SwitchMap$com$google$javascript$rhino$Token [I
? ? ? ? getToken %()Lcom/google/javascript/rhino/Token;
? ? ? ? ? !com/google/javascript/rhino/Token ordinal
? ? ? S isCase ? ? ? ? ? com/google/common/base/Predicate apply ? ? ? ()Ljava/util/function/Function; | ? ? ? computeIfAbsent C(Ljava/lang/Object;Ljava/util/function/Function;)Ljava/lang/Object; ? &com/google/javascript/jscomp/Reference
? ? getLast
? z(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/NodeTraversal;Lcom/google/javascript/jscomp/BasicBlock;)V
? add +(Lcom/google/javascript/jscomp/Reference;)V
?
H(Lcom/google/javascript/jscomp/Var;)Lcom/google/javascript/jscomp/Scope;
getReferences V(Lcom/google/javascript/jscomp/Var;)Lcom/google/javascript/jscomp/ReferenceCollection;
? 1com/google/javascript/jscomp/ReferenceCollector$1
7 DO_NOTHING_BEHAVIOR )com/google/javascript/jscomp/CompilerPass -com/google/javascript/rhino/StaticSymbolTable Signature eLjava/util/Map; ALjava/util/ArrayDeque; FLcom/google/common/base/Predicate; =Ljava/util/LinkedHashSet; RuntimeVisibleTypeAnnotations #Lorg/jspecify/annotations/Nullable; ?(Lcom/google/javascript/jscomp/AbstractCompiler;Lcom/google/javascript/jscomp/ReferenceCollector$Behavior;Lcom/google/javascript/jscomp/ScopeCreator;)V Code LineNumberTable LocalVariableTable this 1Lcom/google/javascript/jscomp/ReferenceCollector; creator MethodParameters LocalVariableTypeTable ?(Lcom/google/javascript/jscomp/AbstractCompiler;Lcom/google/javascript/jscomp/ReferenceCollector$Behavior;Lcom/google/javascript/jscomp/ScopeCreator;Lcom/google/common/base/Predicate;)V process externs "Lcom/google/javascript/rhino/Node; root processScope '(Lcom/google/javascript/jscomp/Scope;)V scope shouldAddToBlockStack Z
StackMapTable
getAllSymbols ()Ljava/lang/Iterable; :()Ljava/lang/Iterable; var "Lcom/google/javascript/jscomp/Var; v maybeJumpToHoistedFunction Q(Lcom/google/javascript/jscomp/Var;Lcom/google/javascript/jscomp/NodeTraversal;)V b )Lcom/google/javascript/jscomp/BasicBlock; t ,Lcom/google/javascript/jscomp/NodeTraversal; fnNode varScope
oldBlockStack last isBlockBoundary G(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)Z n parent
collection 2Lcom/google/javascript/jscomp/ReferenceCollection; S(Lcom/google/javascript/rhino/StaticSlot;)Lcom/google/javascript/rhino/StaticScope; >(Lcom/google/javascript/rhino/StaticSlot;)Ljava/lang/Iterable; lambda$addReference$0 k ?Ljava/lang/Object;Lcom/google/javascript/jscomp/CompilerPass;Lcom/google/javascript/rhino/StaticSymbolTable;
SourceFile ReferenceCollector.java NestMembersU 8com/google/javascript/jscomp/ReferenceCollector$BehaviorW Ccom/google/javascript/jscomp/ReferenceCollector$ReferenceMapWrapper BootstrapMethodsZ
[\]^_ "java/lang/invoke/LambdaMetafactory metafactory ?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; ?b
cM InnerClasses Behavior CollectorCallback Builderj 3com/google/javascript/jscomp/NodeTraversal$Callback Callback ReferenceMapWrappern %java/lang/invoke/MethodHandles$Lookupp java/lang/invoke/MethodHandles Lookup 1
6 7 : ; 2 3 > ? ' ( . / V W 7 ! " W *+,-? ? ? #
M
N$ * %&