com.google.javascript.jscomp.ProcessClosureProvidesAndRequires.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?
java/lang/Object ()V java/util/LinkedHashMap
>com/google/javascript/jscomp/ProcessClosureProvidesAndRequires
providedNames Ljava/util/Map; java/util/ArrayList
requiresToBeRemoved Ljava/util/List; hasRewritingOccurred Z java/util/LinkedHashSet
! forwardDeclaresToRemove Ljava/util/Set; # $ % compiler /Lcom/google/javascript/jscomp/AbstractCompiler;
' ( ) * + -com/google/javascript/jscomp/AbstractCompiler
getChunkGraph -()Lcom/google/javascript/jscomp/JSChunkGraph; - . /
chunkGraph +Lcom/google/javascript/jscomp/JSChunkGraph; 1 2 preserveGoogProvidesAndRequires
' 4 5 6 createAstFactory +()Lcom/google/javascript/jscomp/AstFactory; 8 9 :
astFactory )Lcom/google/javascript/jscomp/AstFactory;
< = > rewriteProvidesAndRequires G(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)V @ A B C D
java/util/Map isEmpty ()Z F goog H Rcom/google/javascript/jscomp/ProcessClosureProvidesAndRequires$ProvidedNameBuilder
G J K C(Lcom/google/javascript/jscomp/ProcessClosureProvidesAndRequires;)V
G M N O setNamespace h(Ljava/lang/String;)Lcom/google/javascript/jscomp/ProcessClosureProvidesAndRequires$ProvidedNameBuilder;
G Q R S setNode x(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/jscomp/ProcessClosureProvidesAndRequires$ProvidedNameBuilder;
G U V W setChunk |(Lcom/google/javascript/jscomp/JSChunk;)Lcom/google/javascript/jscomp/ProcessClosureProvidesAndRequires$ProvidedNameBuilder;
G Y Z [ build O()Lcom/google/javascript/jscomp/ProcessClosureProvidesAndRequires$ProvidedName; @ ] ^ _ put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; a Qcom/google/javascript/jscomp/ProcessClosureProvidesAndRequires$CollectDefinitions
` J
d e f g h *com/google/javascript/jscomp/NodeTraversal
traverseRoots ?(Lcom/google/javascript/jscomp/AbstractCompiler;Lcom/google/javascript/jscomp/NodeTraversal$Callback;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)V j 9Cannot call rewriteProvidesAndRequires twice per instance
l m n o p $com/google/common/base/Preconditions
checkState (ZLjava/lang/Object;)V
r s t collectProvidedNames U(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)Ljava/util/Map; @ v w x values ()Ljava/util/Collection; z { | } ~ java/util/Collection iterator ()Ljava/util/Iterator; ? ? ? ? D java/util/Iterator hasNext ? ? ? ? next ()Ljava/lang/Object; ? Kcom/google/javascript/jscomp/ProcessClosureProvidesAndRequires$ProvidedName
? ? ? ? replace (ZLjava/util/Map;)V ? { ? java/util/List ? com/google/javascript/rhino/Node
' ? ? ? reportChangeToEnclosingScope %(Lcom/google/javascript/rhino/Node;)V
? ? ? ? detach $()Lcom/google/javascript/rhino/Node; ? { ?
java/util/Set
? ? ? ? ? %com/google/javascript/jscomp/NodeUtil
deleteNode T(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/AbstractCompiler;)V
' ? ? ?
getOptions 0()Lcom/google/javascript/jscomp/CompilerOptions;
? ? ? ? D ,com/google/javascript/jscomp/CompilerOptions shouldPreserveGoogModule
d ? ? D inGlobalHoistScope
? ? ? ? getParent
? ? ? D isExprResult
? ? ? verifyOnlyArgumentIsString %(Lcom/google/javascript/rhino/Node;)Z ? ? ? ? add (Ljava/lang/Object;)Z
? ? ? registerAnyProvidedPrefixes ](Ljava/lang/String;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/JSChunk;)V
G ? ? ? setExplicit W(Z)Lcom/google/javascript/jscomp/ProcessClosureProvidesAndRequires$ProvidedNameBuilder;
G ? ? ? setFromLegacyModule
? ? ? D isCall
l ? o ? (Z)V
? ? ? ?
getFirstChild
? ? ? ? getNext
? ? ? ? getString ()Ljava/lang/String;
? ? ? ? getBestJSDocInfo K(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/JSDocInfo;
? ? ? ? D %com/google/javascript/rhino/JSDocInfo isProvideAlreadyProvided @ ? ? ? containsKey @ ? ? ? get &(Ljava/lang/Object;)Ljava/lang/Object;
? ? ? D isExplicitlyProvided
d ? ? ? getChunk (()Lcom/google/javascript/jscomp/JSChunk;
? ? ? ?
addProvide w(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/JSChunk;ZLcom/google/javascript/jscomp/JSChunkGraph;)V
G ? ? ? setHasImplicitInitialization
? ? ? D
isFromExterns
? ? ? isTypedefStubDeclaration
? ? ? D isQualifiedName
? ? getQualifiedName
?
addDefinition v(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/JSChunk;Lcom/google/javascript/jscomp/JSChunkGraph;)V
? checkNestedTypedefProvide .
java/lang/String contains (Ljava/lang/CharSequence;)Z
lastIndexOf (Ljava/lang/String;)I
substring (II)Ljava/lang/String;
? ? getCandidateDefinition
? getStaticSourceFile 0()Lcom/google/javascript/rhino/StaticSourceFile;
"# ? equals %&' TYPEDEF_CHILD_OF_PROVIDE -Lcom/google/javascript/jscomp/DiagnosticType;
)*+,- $com/google/javascript/jscomp/JSError make ?(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/DiagnosticType;[Ljava/lang/String;)Lcom/google/javascript/jscomp/JSError;
'/01 report )(Lcom/google/javascript/jscomp/JSError;)V
?34 D hasTypedefType 6789: @com/google/javascript/jscomp/ProcessClosureProvidesAndRequires$1 ,$SwitchMap$com$google$javascript$rhino$Token [I
?<=> getToken %()Lcom/google/javascript/rhino/Token;
@ABCD !com/google/javascript/rhino/Token ordinal ()I
dFG D
inGlobalScope
?IJ D isAssign
'LMN getCodingConvention 1()Lcom/google/javascript/jscomp/CodingConvention;PQRST -com/google/javascript/jscomp/CodingConvention identifyTypeDeclarationCall 4(Lcom/google/javascript/rhino/Node;)Ljava/util/List; ?VWD size ? ?
?Z[ ? getSecondChild
?]^ D isStringLit
`ab indexOf (I)I
dae (II)I ?ghi IS_NAMESPACE 'Lcom/google/javascript/rhino/Node$Prop;
?klm getBooleanProp *(Lcom/google/javascript/rhino/Node$Prop;)Z
?op ? getLastChild
?rs D isVar
?uv D isCast
?xy ? getOnlyChild
?{| D isObjectLit
?~ D hasChildren? JSC_TYPEDEF_CHILD_OF_PROVIDE? hinvalid @typedef goog.provide {0}
Parent namespace {1} is goog.provided and initialized in the same file
????? +com/google/javascript/jscomp/DiagnosticType error S(Ljava/lang/String;Ljava/lang/String;)Lcom/google/javascript/jscomp/DiagnosticType;? )com/google/javascript/jscomp/CompilerPass GOOG Ljava/lang/String;
ConstantValue Signature pLjava/util/Map; 4Ljava/util/List; 3Ljava/util/Set; 3(Lcom/google/javascript/jscomp/AbstractCompiler;Z)V Code LineNumberTable LocalVariableTable this @Lcom/google/javascript/jscomp/ProcessClosureProvidesAndRequires; MethodParameters process externs "Lcom/google/javascript/rhino/Node; root
StackMapTable ?(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)Ljava/util/Map; pn MLcom/google/javascript/jscomp/ProcessClosureProvidesAndRequires$ProvidedName; closureRequire forwardDeclare isValidPrimitiveCall Q(Lcom/google/javascript/jscomp/NodeTraversal;Lcom/google/javascript/rhino/Node;)Z t ,Lcom/google/javascript/jscomp/NodeTraversal; n processRequireCall call parent processLegacyModuleCall namespace googModuleCall chunk &Lcom/google/javascript/jscomp/JSChunk; processProvideCall s(Lcom/google/javascript/jscomp/NodeTraversal;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)V previouslyProvided left arg ns info 'Lcom/google/javascript/rhino/JSDocInfo; isImplicitlyInitialized handleStubDefinition Q(Lcom/google/javascript/jscomp/NodeTraversal;Lcom/google/javascript/rhino/Node;)V name
exprResult isExternStub
isTypedefStub isValidTypedefStubDefinition
parentName parentDefinition statement handleCandidateProvideDefinition processForwardDeclare toRemove
convention /Lcom/google/javascript/jscomp/CodingConvention; typeDeclarations LocalVariableTypeTable $Ljava/util/List; prefixNs node pos I isNamespacePlaceholder assign value
SourceFile &ProcessClosureProvidesAndRequires.java NestMembers InnerClasses ProvidedNameBuilder ProvidedName CollectDefinitions? 3com/google/javascript/jscomp/NodeTraversal$Callback Callback? %com/google/javascript/rhino/Node$Prop Prop ?
&' ?? ? E $ % . / ? ? 2 ? ? ! ? ? 9 : ? ? ? E*? *? Y? ?
*? Y? ? *? *? Y? ? *+? "*+? &? ,*? 0*+? 3? 7? ? *
L @ D F G * M / N 7 O <