com.google.javascript.jscomp.ScopedAliases$Traversal.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!
???? 7% *com/google/javascript/jscomp/ScopedAliases 4com/google/javascript/jscomp/ScopedAliases$Traversal this$0 ,Lcom/google/javascript/jscomp/ScopedAliases;
Dcom/google/javascript/jscomp/NodeTraversal$AbstractPostOrderCallback ()V java/util/ArrayList
aliasDefinitionsToDelete Ljava/util/List;
scopeCalls aliasUsages java/util/LinkedHashMap
! " aliases Ljava/util/Map; $ java/util/LinkedHashSet
# ' ( )
injectedDecls Ljava/util/Set; + , ) deletedAliasVars . $jscomp
0 1 2 3 4 &com/google/common/collect/ImmutableSet of <(Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet;
# 6
7 (Ljava/util/Collection;)V 9 : ) forbiddenLocals < = > hasNamespaceShadows Z @ A > hasErrors C D E transformation BLcom/google/javascript/jscomp/CompilerOptions$AliasTransformation; G H I scopeFunctionBody "Lcom/google/javascript/rhino/Node;
K L M inGoogScopeBody ()Z
O P Q R M com/google/javascript/rhino/Node isCall
O T U V
getFirstChild $()Lcom/google/javascript/rhino/Node; X
goog.scope
O Z [ \ matchesQualifiedName (Ljava/lang/String;)Z
O ^ _ V getGrandparent
a b c isCallToScopeMethod %(Lcom/google/javascript/rhino/Node;)Z
e f g h M *com/google/javascript/jscomp/NodeTraversal inGlobalHoistScope
e j k V getScopeRoot
m n o findScopeMethodCall F(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node; q r s transformationHandler ILcom/google/javascript/jscomp/CompilerOptions$AliasTransformationHandler;
O u v w getSourceFileName ()Ljava/lang/String;
y z { getSourceRegion P(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/SourcePosition; } ~ ? ? Gcom/google/javascript/jscomp/CompilerOptions$AliasTransformationHandler logAliasTransformation ?(Ljava/lang/String;Lcom/google/javascript/rhino/SourcePosition;)Lcom/google/javascript/jscomp/CompilerOptions$AliasTransformation;
e ? ? ? getScope &()Lcom/google/javascript/jscomp/Scope;
? ? ? findAliases '(Lcom/google/javascript/jscomp/Scope;)V
O ? ? V getLastChild
? ? c isGoogScopeFunctionBody
? ? ? renameNamespaceShadows /(Lcom/google/javascript/jscomp/NodeTraversal;)V ? ? ? ?
java/util/Set clear ? ? ?
java/util/Map
? ? ? findNamespaceShadows
? ? ? reportInvalidVariables
e ? ? V getEnclosingFunction
O ? ? M isBlock
O ? ? V getParent
O ? ? M
isFunction
? ? ? ? ? "com/google/javascript/jscomp/Scope getVarIterable ()Ljava/lang/Iterable; ? ? ? ? ? java/lang/Iterable iterator ()Ljava/util/Iterator; ? ? ? ? M java/util/Iterator hasNext ? ? ? ? next ()Ljava/lang/Object; ? com/google/javascript/jscomp/Var
? ? ? V getNameNode
? ? ? ? c %com/google/javascript/jscomp/NodeUtil isFunctionDeclaration
? ? ? V getNode ? ? ? GOOG_SCOPE_INVALID_VARIABLE -Lcom/google/javascript/jscomp/DiagnosticType; ? java/lang/String
? ? ? w getName
? ? ? report e(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/DiagnosticType;[Ljava/lang/String;)V
O ? ? M isScript
O ? ? V getNext ? java/lang/Integer???
O ? ? ? getLineno ()I
O ? ? ? getCharno ? 6com/google/javascript/jscomp/ScopedAliases$Traversal$1
? ?
? 9(Lcom/google/javascript/jscomp/ScopedAliases$Traversal;)V
? ? ? ? ? *com/google/javascript/rhino/SourcePosition setPositionInformation (IIII)V ? ? ? compiler /Lcom/google/javascript/jscomp/AbstractCompiler;
? ? ? $com/google/javascript/jscomp/JSError make ?(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/DiagnosticType;[Ljava/lang/String;)Lcom/google/javascript/jscomp/JSError;
? -com/google/javascript/jscomp/AbstractCompiler )(Lcom/google/javascript/jscomp/JSError;)V
? c isNameDeclaration
c isAliasDefinition
recordAlias %(Lcom/google/javascript/jscomp/Var;)V
? M isBleedingFunction
O M isParamList
? c isClassDeclaration
? c isHoistedFunctionDeclaration
? V getInitialValue
O!"# getJSDocInfo )()Lcom/google/javascript/rhino/JSDocInfo;
%&'() -com/google/javascript/rhino/JSDocInfo$Builder
maybeCopyFrom X(Lcom/google/javascript/rhino/JSDocInfo;)Lcom/google/javascript/rhino/JSDocInfo$Builder;
+,-./ %com/google/javascript/rhino/JSDocInfo getType 0()Lcom/google/javascript/rhino/JSTypeExpression;
%123 recordReturnType 1(Lcom/google/javascript/rhino/JSTypeExpression;)Z
%563
recordType
%89# build
O;<= setJSDocInfo K(Lcom/google/javascript/rhino/JSDocInfo;)Lcom/google/javascript/rhino/Node;
?!
O@A w getString CDE scopedAliasNames $Lcom/google/common/collect/Multiset;GHIJK "com/google/common/collect/Multiset add (Ljava/lang/Object;)Z
MNO getUniqueIdSupplier 1()Lcom/google/javascript/jscomp/UniqueIdSupplier; QRS
uniqueIdInput ,Lcom/google/javascript/jscomp/CompilerInput;
UVWXY -com/google/javascript/jscomp/UniqueIdSupplier getUniqueId @(Lcom/google/javascript/jscomp/CompilerInput;)Ljava/lang/String; [\] makeConcatWithConstants 8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;_
abcde com/google/javascript/rhino/IR name 6(Ljava/lang/String;)Lcom/google/javascript/rhino/Node;
agh V empty
Ojk o srcref
Omno replaceWith %(Lcom/google/javascript/rhino/Node;)V
qro reportChangeToEnclosingScope
atu o var
Owx V detach
?z{|
newVarNode X(Ljava/lang/String;Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node;
O~ o srcrefTreeIfMissing
O??? setOriginalName (Ljava/lang/String;)V
O??o addChildToFront
O??o insertBefore ?H
???? newName ?(Lcom/google/javascript/jscomp/AbstractCompiler;Ljava/lang/String;Lcom/google/javascript/rhino/Node;Ljava/lang/String;)Lcom/google/javascript/rhino/Node; ?? ? GOOG_SCOPE_NON_ALIAS_LOCAL?H? java/util/List ??? invalidModuleGetHandling ELcom/google/javascript/jscomp/ScopedAliases$InvalidModuleGetHandling;
???? M Ccom/google/javascript/jscomp/ScopedAliases$InvalidModuleGetHandling shouldDelete
?? c containsInvalidGoogModuleGet ???? put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
??? getAliasedNamespace 6(Lcom/google/javascript/rhino/Node;)Ljava/lang/String;????? @com/google/javascript/jscomp/CompilerOptions$AliasTransformation addAlias '(Ljava/lang/String;Ljava/lang/String;)V
???? indexOf (I)I
???? substring (II)Ljava/lang/String; ???K containsKey ????? ,com/google/javascript/jscomp/ScopedAliases$1 ,$SwitchMap$com$google$javascript$rhino$Token [I
O??? getToken %()Lcom/google/javascript/rhino/Token;
???? ? !com/google/javascript/rhino/Token ordinal
O?? V getSecondChild ?? ) closureNamespaces ???K contains? java/lang/IllegalStateException ?\?
??
?
??? c isFunctionBlock
????? $com/google/common/base/Preconditions
checkState (ZLjava/lang/Object;)V? Ecom/google/javascript/jscomp/MakeDeclaredNamesUnique$TargettedRenamer? Fcom/google/javascript/jscomp/MakeDeclaredNamesUnique$ContextualRenamer
?
??
? P(Lcom/google/javascript/jscomp/MakeDeclaredNamesUnique$Renamer;Ljava/util/Set;)V ? ??????