com.google.javascript.jscomp.ScopedAliases.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/common/collect/ImmutableSet of *()Lcom/google/common/collect/ImmutableSet;
Ccom/google/javascript/jscomp/ScopedAliases$InvalidModuleGetHandling PRESERVE ELcom/google/javascript/jscomp/ScopedAliases$InvalidModuleGetHandling;
*com/google/javascript/jscomp/ScopedAliases (Lcom/google/javascript/jscomp/AbstractCompiler;Lcom/google/javascript/jscomp/PreprocessorSymbolTable;Lcom/google/javascript/jscomp/CompilerOptions$AliasTransformationHandler;Ljava/util/Set;Lcom/google/javascript/jscomp/ScopedAliases$InvalidModuleGetHandling;)V
java/lang/Object ()V
&com/google/common/collect/HashMultiset create *()Lcom/google/common/collect/HashMultiset; ! scopedAliasNames $Lcom/google/common/collect/Multiset; # $ % compiler /Lcom/google/javascript/jscomp/AbstractCompiler; ' ( ) preprocessorSymbolTable 6Lcom/google/javascript/jscomp/PreprocessorSymbolTable; + , - transformationHandler ILcom/google/javascript/jscomp/CompilerOptions$AliasTransformationHandler; / 0 1 closureNamespaces Ljava/util/Set; 3 4 invalidModuleGetHandling 6 2com/google/javascript/jscomp/ScopedAliases$Builder
5 8 9 2(Lcom/google/javascript/jscomp/AbstractCompiler;)V ; 4com/google/javascript/jscomp/ScopedAliases$Traversal
: = > /(Lcom/google/javascript/jscomp/ScopedAliases;)V
@ A B C D *com/google/javascript/jscomp/NodeTraversal traverse ?(Lcom/google/javascript/jscomp/AbstractCompiler;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/NodeTraversal$Callback;)V
: F G H hasErrors ()Z J java/util/ArrayList
: L M N getAliasUsages ()Ljava/util/List;
I P Q (Ljava/util/Collection;)V S T U V H java/util/List isEmpty
I S Y Z [ iterator ()Ljava/util/Iterator; ] ^ _ ` H java/util/Iterator hasNext ] b c d next ()Ljava/lang/Object; f 5com/google/javascript/jscomp/ScopedAliases$AliasUsage : h i 1 deletedAliasVars
e k l m referencesOtherAlias (Ljava/util/Set;)Z S o p q add (Ljava/lang/Object;)Z
e s t 9
applyAlias S v w x size ()I S z { | get (I)Ljava/lang/Object; e ~ ? aliasVar "Lcom/google/javascript/jscomp/Var;
? ? ? ? ? com/google/javascript/jscomp/Var getNode $()Lcom/google/javascript/rhino/Node; ? ? ? GOOG_SCOPE_ALIAS_CYCLE -Lcom/google/javascript/jscomp/DiagnosticType; ? java/lang/String
? ? ? ? getName ()Ljava/lang/String;
? ? ? ? ? $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 report )(Lcom/google/javascript/jscomp/JSError;)V
: ? ? ? getAliasDefinitionsToDelete ()Ljava/util/Collection; ? Y ? java/util/Collection ? com/google/javascript/rhino/Node
? ? ? ? reportChangeToEnclosingScope %(Lcom/google/javascript/rhino/Node;)V
? ? ? ? getParent
? ? ? ? ? %com/google/javascript/jscomp/NodeUtil isNameDeclaration %(Lcom/google/javascript/rhino/Node;)Z
? ? ? H hasOneChild
? ? ? ? detach
: ? ? N
getScopeCalls
? ? ? ? getLastChild
? ? ? ? replaceWith
? ? ? ? markFunctionsDeleted T(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/AbstractCompiler;)V
? ? ? ?
tryMergeBlock &(Lcom/google/javascript/rhino/Node;Z)Z ? ? ? ? ? ,com/google/javascript/jscomp/ScopedAliases$1 ,$SwitchMap$com$google$javascript$rhino$Token [I
? ? ? ? getToken %()Lcom/google/javascript/rhino/Token;
? ? ? ? x !com/google/javascript/rhino/Token ordinal
? ? ? ?
getFirstChild
? ? ? isValidAliasRhs ? ? ? GOOG_MODULE_GET +Lcom/google/javascript/rhino/QualifiedName;
? ? ? ? isCallTo P(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/QualifiedName;)Z
? ? ? H hasChildren
? ? ? getAliasedNamespace 6(Lcom/google/javascript/rhino/Node;)Ljava/lang/String;
? ? ? ? getString ? ? ? makeConcatWithConstants 8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
? ? ? ? ? $com/google/common/base/Preconditions
checkState (ZLjava/lang/Object;)V
? ? ? H hasTwoChildren ? java/lang/RuntimeException ? ?
? (Ljava/lang/String;)V $jscomp$scope$
?
startsWith (Ljava/lang/String;)Z JSC_GOOG_SCOPE_MUST_BE_ALONE ;The call to goog.scope must be alone in a single statement.
+com/google/javascript/jscomp/DiagnosticType error S(Ljava/lang/String;Ljava/lang/String;)Lcom/google/javascript/jscomp/DiagnosticType; ? GOOG_SCOPE_MUST_BE_ALONE &JSC_GOOG_SCOPE_MUST_BE_IN_GLOBAL_SCOPE 3The call to goog.scope must be in the global scope. ? "GOOG_SCOPE_MUST_BE_IN_GLOBAL_SCOPE !JSC_GOOG_SCOPE_HAS_BAD_PARAMETERS" |The call to goog.scope must take only a single parameter. It must be an anonymous function that itself takes no parameters. $% ? GOOG_SCOPE_HAS_BAD_PARAMETERS' JSC_GOOG_SCOPE_REFERENCES_THIS) :The body of a goog.scope function cannot reference 'this'. +, ? GOOG_SCOPE_REFERENCES_THIS. JSC_GOOG_SCOPE_USES_RETURN0 6The body of a goog.scope function cannot use 'return'. 23 ? GOOG_SCOPE_USES_RETURN5 JSC_GOOG_SCOPE_USES_THROW7 5The body of a goog.scope function cannot use 'throw'. 9: ? GOOG_SCOPE_USES_THROW< JSC_GOOG_SCOPE_ALIAS_REDEFINED> 1The alias {0} is assigned a value more than once. @A ? GOOG_SCOPE_ALIAS_REDEFINEDC JSC_GOOG_SCOPE_ALIAS_CYCLEE The aliases {0} has a cycle.G JSC_GOOG_SCOPE_NON_ALIAS_LOCALI >The local variable {0} is in a goog.scope and is not an alias. KL ? GOOG_SCOPE_NON_ALIAS_LOCALN JSC_GOOG_SCOPE_INVALID_VARIABLEP 1The variable {0} cannot be declared in this scope RS ? GOOG_SCOPE_INVALID_VARIABLEU goog.module.get
WXY Z )com/google/javascript/rhino/QualifiedName ?(Ljava/lang/String;)Lcom/google/javascript/rhino/QualifiedName;\ )com/google/javascript/jscomp/CompilerPass SCOPING_METHOD_NAME Ljava/lang/String;
ConstantValuea
goog.scope SCOPED_ALIASES_PREFIX
uniqueIdInput ,Lcom/google/javascript/jscomp/CompilerInput; Signature 8Lcom/google/common/collect/Multiset; #Ljava/util/Set; ?(Lcom/google/javascript/jscomp/AbstractCompiler;Lcom/google/javascript/jscomp/PreprocessorSymbolTable;Lcom/google/javascript/jscomp/CompilerOptions$AliasTransformationHandler;)V Code LineNumberTable LocalVariableTable this ,Lcom/google/javascript/jscomp/ScopedAliases; MethodParameters
Deprecated RuntimeVisibleAnnotations Ljava/lang/Deprecated; RuntimeVisibleTypeAnnotations #Lorg/jspecify/annotations/Nullable; LocalVariableTypeTable(Lcom/google/javascript/jscomp/AbstractCompiler;Lcom/google/javascript/jscomp/PreprocessorSymbolTable;Lcom/google/javascript/jscomp/CompilerOptions$AliasTransformationHandler;Ljava/util/Set;Lcom/google/javascript/jscomp/ScopedAliases$InvalidModuleGetHandling;)V builder e(Lcom/google/javascript/jscomp/AbstractCompiler;)Lcom/google/javascript/jscomp/ScopedAliases$Builder; process G(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)V
aliasUsage 7Lcom/google/javascript/jscomp/ScopedAliases$AliasUsage; cycleVar newQueue Ljava/util/List; aliasDefinition "Lcom/google/javascript/rhino/Node; expressionWithScopeCall scopeClosureBlock scopeCall aliasWorkQueue externs root traversal 6Lcom/google/javascript/jscomp/ScopedAliases$Traversal; ILjava/util/List;
StackMapTable rhs isAliasDefinition nameNode isScopedAliases name
SourceFile ScopedAliases.java NestMembers? 6com/google/javascript/jscomp/ScopedAliases$Traversal$2? 6com/google/javascript/jscomp/ScopedAliases$Traversal$1? :com/google/javascript/jscomp/ScopedAliases$AliasedTypeNode? 6com/google/javascript/jscomp/ScopedAliases$AliasedNode BootstrapMethods?
??? ?? $java/lang/invoke/StringConcatFactory ?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;? .? Invalid alias RHS: InnerClasses InvalidModuleGetHandling? Gcom/google/javascript/jscomp/CompilerOptions$AliasTransformationHandler? ,com/google/javascript/jscomp/CompilerOptions AliasTransformationHandler Builder Traversal? 3com/google/javascript/jscomp/NodeTraversal$Callback Callback
AliasUsage AliasedTypeNode AliasedNode? %java/lang/invoke/MethodHandles$Lookup? java/lang/invoke/MethodHandles Lookup [ ]^ _ ` b^ _ $ % ( ) , - cd ? ? % ? , ? 3 ? : ? A ? ? ? L ? S ? ? ? ! e f 0 1 e g 4 h i b *+,-? ? ?
? j ? ?
?
?k * lm $ % ( ) , - n
$ ( , o p q r s i ? '*? *? ? *+? "*,? &*-? **? .*? 2? j " ? ? ? ? ? ? ? &