All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.javascript.jscomp.ProcessDefines.class Maven / Gradle / Ivy

Go to download

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()Vjava/util/LinkedHashSet
	
+com/google/javascript/jscomp/ProcessDefinesknownDefineJsdocsLjava/util/LinkedHashSet;	knownGoogDefineCallsjava/util/LinkedHashMap
	defineByDefineNameLjava/util/LinkedHashMap;	#replacementValuesFromClosureDefines	validDefineValueExpressions	!"#$%3com/google/javascript/jscomp/ProcessDefines$Buildermode2Lcom/google/javascript/jscomp/ProcessDefines$Mode;	"	!()*compiler/Lcom/google/javascript/jscomp/AbstractCompiler;	(	-./010com/google/javascript/jscomp/ProcessDefines$ModecheckZ
34567-com/google/javascript/jscomp/AbstractCompilergetTypeRegistry5()Lcom/google/javascript/rhino/jstype/JSTypeRegistry;	9:;registry3Lcom/google/javascript/rhino/jstype/JSTypeRegistry;	!=>?replacementValuesLjava/util/Map;
ABCDE&com/google/common/collect/ImmutableMapcopyOf9(Ljava/util/Map;)Lcom/google/common/collect/ImmutableMap;	GHIreplacementValuesFromFlags(Lcom/google/common/collect/ImmutableMap;	!KLMnamespaceSupplierLjava/util/function/Supplier;	K	!PQ1recognizeClosureDefines	P
TUV
initNamespaceG(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)V
XYZcollectDefines%(Lcom/google/javascript/rhino/Node;)V
\]ZreportInvalidDefineLocations
_`"collectValidDefineValueExpressions
bcvalidateDefineDeclarations
efoverrideDefines
hijkeySet()Ljava/util/Set;
lmnDo&com/google/common/collect/ImmutableSet@(Ljava/util/Collection;)Lcom/google/common/collect/ImmutableSet;qrstujava/util/function/Supplierget()Ljava/lang/Object;w,com/google/javascript/jscomp/GlobalNamespace	yz{	namespace.Lcom/google/javascript/jscomp/GlobalNamespace;
v}~v(Lcom/google/javascript/jscomp/AbstractCompiler;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)V	-??1optimize
???values()Ljava/util/Collection;?????java/util/Collectioniterator()Ljava/util/Iterator;?????java/util/IteratorhasNext()Z???unext?2com/google/javascript/jscomp/ProcessDefines$Define	????valueParent"Lcom/google/javascript/rhino/Node;
???getReplacementForDefineX(Lcom/google/javascript/jscomp/ProcessDefines$Define;)Lcom/google/javascript/rhino/Node;	????value
????? com/google/javascript/rhino/NodegetToken%()Lcom/google/javascript/rhino/Token;
????isEquivalentTo%(Lcom/google/javascript/rhino/Node;)Z
????	cloneTree$()Lcom/google/javascript/rhino/Node;
???ZaddChildToBack
???ZreplaceWith
3??ZreportChangeToEnclosingScope
A?i?*()Lcom/google/common/collect/ImmutableSet;
?????com/google/common/collect/SetsunionH(Ljava/util/Set;Ljava/util/Set;)Lcom/google/common/collect/Sets$SetView;	???
KNOWN_DEFINES(Lcom/google/common/collect/ImmutableSet;
????
difference???
java/util/Set?java/lang/String	???UNKNOWN_DEFINE_WARNING-Lcom/google/javascript/jscomp/DiagnosticType;
?????$com/google/javascript/jscomp/JSErrormakeh(Lcom/google/javascript/jscomp/DiagnosticType;[Ljava/lang/String;)Lcom/google/javascript/jscomp/JSError;
3???report)(Lcom/google/javascript/jscomp/JSError;)V	????
defineNameLjava/lang/String;
A?t?&(Ljava/lang/Object;)Ljava/lang/Object;
?
???isGoogDefineCall
????
getChildCount()I
????getChildAtIndex%(I)Lcom/google/javascript/rhino/Node;
?????1com/google/javascript/rhino/jstype/JSTypeRegistry#evaluateTypeExpressionInGlobalScope[(Lcom/google/javascript/rhino/JSTypeExpression;)Lcom/google/javascript/rhino/jstype/JSType;
?????)com/google/javascript/rhino/jstype/JSType
isUnknownType	?????/com/google/javascript/rhino/jstype/JSTypeNativeNUMBER_STRING_BOOLEAN1Lcom/google/javascript/rhino/jstype/JSTypeNative;
?
getNativeType^(Lcom/google/javascript/rhino/jstype/JSTypeNative;)Lcom/google/javascript/rhino/jstype/JSType;
?isSubtypeOf.(Lcom/google/javascript/rhino/jstype/JSType;)Z
	

*com/google/javascript/jscomp/NodeTraversalbuilder6()Lcom/google/javascript/jscomp/NodeTraversal$Builder;
2com/google/javascript/jscomp/NodeTraversal$BuildersetCompilere(Lcom/google/javascript/jscomp/AbstractCompiler;)Lcom/google/javascript/jscomp/NodeTraversal$Builder;Ccom/google/javascript/jscomp/ProcessDefines$ClosureDefinesCollector
0(Lcom/google/javascript/jscomp/ProcessDefines;)V
setCallbackk(Lcom/google/javascript/jscomp/NodeTraversal$Callback;)Lcom/google/javascript/jscomp/NodeTraversal$Builder;
Ztraverse
v!"?
getAllSymbols$1com/google/javascript/jscomp/GlobalNamespace$Name
&'(selectDefineDeclarationg(Lcom/google/javascript/jscomp/GlobalNamespace$Name;)Lcom/google/javascript/jscomp/GlobalNamespace$Ref;
#*+?getTotalSets
-./getValueParentForDefineV(Lcom/google/javascript/jscomp/GlobalNamespace$Ref;)Lcom/google/javascript/rhino/Node;
?12?getLastChild
45?verifyGoogDefine
?78?getSecondChild
?:;<	getString()Ljava/lang/String;
#>?<getFullName
?AB?(Ljava/lang/String;Lcom/google/javascript/jscomp/GlobalNamespace$Name;Lcom/google/javascript/jscomp/GlobalNamespace$Ref;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)V
DEFputIfAbsent8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;	?HIJdeclaration2Lcom/google/javascript/jscomp/GlobalNamespace$Ref;	?LMNname3Lcom/google/javascript/jscomp/GlobalNamespace$Name;
#PQ?getRefsS0com/google/javascript/jscomp/GlobalNamespace$Ref
RUV?isSet
XYZequals(Ljava/lang/Object;)Z
R\]?getNode	_`?NON_CONST_DEFINE
?bc<getLocation
?e?f?(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/DiagnosticType;[Ljava/lang/String;)Lcom/google/javascript/jscomp/JSError;
Rhi?isSetFromGlobal
?kl?isQualifiedName
nopqr%com/google/javascript/jscomp/NodeUtilgetBestJSDocInfoK(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/JSDocInfo;
tuvw?%com/google/javascript/rhino/JSDocInfoisDefine
yzZadd
?|}?	getParent
???isVar
????isConst
????isName
?????$com/google/common/base/Preconditions
checkState(ZLjava/lang/Object;)V
????isAssign
????isFirstChildOf????stream()Ljava/util/stream/Stream;???test ()Ljava/util/function/Predicate;?????java/util/stream/Streamfilter9(Ljava/util/function/Predicate;)Ljava/util/stream/Stream;?t?()Ljava/util/function/Supplier;
?????java/util/stream/CollectorstoCollection;(Ljava/util/function/Supplier;)Ljava/util/stream/Collector;????collect0(Ljava/util/stream/Collector;)Ljava/lang/Object;
??Zremove????apply()Ljava/util/function/Function;????map8(Ljava/util/function/Function;)Ljava/util/stream/Stream;
?????java/util/ObjectsrequireNonNull???accept8(Ljava/util/LinkedHashSet;)Ljava/util/function/Consumer;????forEachOrdered (Ljava/util/function/Consumer;)V
?
#???getDeclaration4()Lcom/google/javascript/jscomp/GlobalNamespace$Ref;
???getConstantDeclValueF(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node;	?????-com/google/javascript/jscomp/ProcessDefines$10$SwitchMap$com$google$javascript$jscomp$base$Tri[I
???isValidDefineValueK(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/jscomp/base/Tri;
?????%com/google/javascript/jscomp/base/Triordinal
???size
???
hasValidValue7(Lcom/google/javascript/jscomp/ProcessDefines$Define;)Z
????F"com/google/common/base/MoreObjectsfirstNonNull	???INVALID_DEFINE_VALUE
t???getType0()Lcom/google/javascript/rhino/JSTypeExpression;
???isValidDefineType1(Lcom/google/javascript/rhino/JSTypeExpression;)Z	???INVALID_DEFINE_TYPE???visit~(Lcom/google/javascript/jscomp/ProcessDefines;)Lcom/google/javascript/jscomp/NodeTraversal$AbstractPostOrderCallbackInterface;
???(Lcom/google/javascript/jscomp/NodeTraversal$AbstractPostOrderCallbackInterface;)Lcom/google/javascript/jscomp/NodeTraversal$Builder;
??isStringKey
??isStringLit
?isValidClosureDefinesValue

ZcontainsKey	
?CLOSURE_DEFINES_MULTIPLE
Fput	?CLOSURE_DEFINES_ERROR	??,$SwitchMap$com$google$javascript$rhino$Token
?!com/google/javascript/rhino/Token
??
getFirstChild
? ?isNumber
?"#?
isFromExterns
?%&'	toBoolean(Z)Z	?)*+FALSE'Lcom/google/javascript/jscomp/base/Tri;	?-.+TRUE
?012andP(Lcom/google/javascript/jscomp/base/Tri;)Lcom/google/javascript/jscomp/base/Tri;
45Zcontains	?78+UNKNOWN
?:;<hasXChildren(I)Z
t>??
isConstant
?AB?	isGetProp
?DE?getNext
?GH?isCall	JK?GOOG_DEFINE
?MN?matchesQualifiedName
nPQ?getEnclosingFunction	STUV?3com/google/javascript/jscomp/ClosurePrimitiveErrors INVALID_CLOSURE_CALL_SCOPE_ERROR
?XY?isExprResult
n[\?isNameDeclaration	^_?DEFINE_CALL_WITHOUT_ASSIGNMENT
abc
verifyNotNullG(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)Z	efg	STRINGLIT#Lcom/google/javascript/rhino/Token;
ijkverifyOfTypej(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Token;)Z
mncverifyIsLast
3pqr
getOptions0()Lcom/google/javascript/jscomp/CompilerOptions;
tuvwx,com/google/javascript/jscomp/CompilerOptions
getLanguageIn=()Lcom/google/javascript/jscomp/CompilerOptions$LanguageMode;
z{|}~9com/google/javascript/jscomp/CompilerOptions$LanguageModetoFeatureSet:()Lcom/google/javascript/jscomp/parsing/parser/FeatureSet;
n???isValidQualifiedNameM(Lcom/google/javascript/jscomp/parsing/parser/FeatureSet;Ljava/lang/String;)Z	???INVALID_DEFINE_NAME_ERROR
????getJSDocInfo)()Lcom/google/javascript/rhino/JSDocInfo;	???MISSING_DEFINE_ANNOTATION	S???NULL_ARGUMENT_ERROR
???<getQualifiedName	S???TOO_MANY_ARGUMENTS_ERROR	S???INVALID_ARGUMENT_ERROR	???INVALID_DEFINE_LOCATION?CLOSURE_DEFINES
????matchesName(Ljava/lang/String;)Z
????	isGetElem
n???getEnclosingScopeRoot
????isRoot	??? NON_GLOBAL_CLOSURE_DEFINES_ERROR?COMPILED?
goog.DEBUG?$jscomp.ASSUME_ES5?$jscomp.ISOLATE_POLYFILLS? $jscomp.INSTRUMENT_ASYNC_CONTEXT
l???of?(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet;?goog
???M?com/google/javascript/rhino/IR6(Ljava/lang/String;)Lcom/google/javascript/rhino/Node;?define
????getpropX(Lcom/google/javascript/rhino/Node;Ljava/lang/String;)Lcom/google/javascript/rhino/Node;?JSC_UNKNOWN_DEFINE_WARNING?unknown @define variable {0}
?????+com/google/javascript/jscomp/DiagnosticTypewarningS(Ljava/lang/String;Ljava/lang/String;)Lcom/google/javascript/jscomp/DiagnosticType;?JSC_INVALID_DEFINE_NAME_ERROR?'"{0}" is not a valid JS identifier name
????error?%JSC_INVALID_MISSING_DEFINE_ANNOTATION?Missing @define annotation?JSC_INVALID_DEFINE_TYPE?(@define tag only permits primitive types?JSC_INVALID_DEFINE_VALUE?,invalid initialization value for @define {0}?JSC_INVALID_DEFINE_LOCATION?O@define must be initalized on a static qualified name in global or module scope?JSC_NON_CONST_DEFINE?(@define {0} has already been set at {1}.?JSC_CLOSURE_DEFINES_ERROR?"Invalid CLOSURE_DEFINES definition?JSC_CLOSURE_DEFINES_MULTIPLE?CMultiple CLOSURE_DEFINES definitions for {0}. First occurrence: {1}?$JSC_NON_GLOBAL_CLOSURE_DEFINES_ERROR?;RuntimeVisibleTypeAnnotations#Lorg/jspecify/annotations/Nullable;^Lcom/google/common/collect/ImmutableMap;MLjava/util/function/Supplier;BLjava/util/LinkedHashSet;=Ljava/util/LinkedHashSet;aLjava/util/LinkedHashMap;OLjava/util/LinkedHashMap;8(Lcom/google/javascript/jscomp/ProcessDefines$Builder;)VCodeLineNumberTableLocalVariableTablethis-Lcom/google/javascript/jscomp/ProcessDefines;5Lcom/google/javascript/jscomp/ProcessDefines$Builder;
StackMapTableMethodParametersprocessexternsrootcollectDefineNamesn(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)Lcom/google/common/collect/ImmutableSet;?(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)Lcom/google/common/collect/ImmutableSet;
inputValuechanged4Lcom/google/javascript/jscomp/ProcessDefines$Define;
unknownDefineunusedReplacementsLjava/util/Set;LocalVariableTypeTable#Ljava/util/Set;replacementFromFlagsreplacementFromClosureDefines
expression.Lcom/google/javascript/rhino/JSTypeExpression;type+Lcom/google/javascript/rhino/jstype/JSType;nameNoderef	totalSetsIexistingDefinerefNodejsdoc'Lcom/google/javascript/rhino/JSDocInfo;declarationNodedeclarationParent	declValuenamesToCheckAgainnamesToCheckNLjava/util/LinkedHashSet;handleClosureDefinesValuei(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)Vkey
stringNode	valueNode	errorNodeval
isGlobalConst6(Lcom/google/javascript/jscomp/GlobalNamespace$Name;)ZparentnodecallNode
methodNameargsarginfodesiredType%lambda$reportInvalidDefineLocations$1s(Lcom/google/javascript/jscomp/NodeTraversal;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)Vt,Lcom/google/javascript/jscomp/NodeTraversal;n+lambda$collectValidDefineValueExpressions$05(Lcom/google/javascript/jscomp/GlobalNamespace$Ref;)Zr
SourceFileProcessDefines.javaNestMembersBootstrapMethodsT
UVWXY"java/lang/invoke/LambdaMetafactorymetafactory?(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;Z\
]<==u	b()Ljava/util/LinkedHashSet;d
eKLL?[/k(Ljava/lang/Object;)Vm
nyojava/util/HashSetZGs
tFGInnerClassesBuilderModeDefinez&com/google/common/collect/Sets$SetViewSetViewClosureDefinesCollector~3com/google/javascript/jscomp/NodeTraversal$CallbackCallbackNameRef?Mcom/google/javascript/jscomp/NodeTraversal$AbstractPostOrderCallbackInterface"AbstractPostOrderCallbackInterfaceLanguageMode?%java/lang/invoke/MethodHandles$Lookup?java/lang/invoke/MethodHandlesLookup ???K?)*:;HI$%LMQ1	z{????????????`?????_?
?*?*?Y?	?
*?Y?	?*?Y??*?Y??*?Y?	?*+? ?&*+?'?+**?&?,?
*?+?2??8*+?:f?p01*v????2?2 /??????@?
?
??2???*???K*?F+?ܶ???M,?,?*?+?ܶ???N-?-?*+????+?????+?????*
$(*"@$I&
*KK?<!?$'"????????y'*?8+??M,???,*?8???????
+	,
 ''#$	%&
?%?@#YZ?	2*?R??*?+??Y*??+?*?x? ??M,????,???#N*-?%:????-?)6?,:??0?:*??*?3??6:		?9:?	-?=:*???Y-?@?C??:		?	?G:	?K?)`6?_-?O??:

???J
???R:?T?3?W?)*?+?[?^??YSY?[?aS?d?ا???????!12345 7@8G9L:O=U>\?lB~C?D?E?F?H?I?L?M?N?V?W?XY[^%Z(Y+`.b1c
z?'?	????8(JG?IJU?)*\???l????????{+	@?MN22?K ???!#R??@??$????6????M????'(]+?O??M,???K,???RN-?g????-?[:?j?????m:????s????*?
?xW-??2fh$i'l-m5n8q?rLsOvYw[z
4-.,??-.>(J]]MN'?
??R???t?#M
./?5*?[L+?{M,?~?
,???
+??+??+?,???
+,???,??"??
?? ?"?1?3?
 5IJ0/?
+0?
???	I`V2*?x? ?????????????L*?????M,???L,????N+-?K??W-?K?O??????????*?Y??W????????Y?	M+??N-????-???#:?ȶ[??:??*?ֶ?.?ZP?O??:??????R:*??[?xW??ݧ
,?xW???x,??+?ߠ?,L??X?n????'?G?P?a?k?u?????????????????????)?,?.?1?
HG<??
(J?g1??tMN??22'3??24'344?4??Q???H#????%?	?
?c5?*?&?,??*?????L+???v+????M,?G?[N*,??0*?+,??,??-????????????Y,??S?d??-?m:?*???*?+-???̸d?ا???:?
??+?3?;?H?b?e?h?n??????
*3^/?n#-.+f?????O???t??]Zx#*?&?,???*?+?*????+???
?????"?
##?56{+??
+??S,??L+?9:*??	?,*?+-???YSY*??????aS?d??*?,?W?*?&?,?*?+-??̸d?ر2 !"'#@(J$M#P*[+h,z.
4@7?{{8?{9?{:?
?A??

89:
?y8?*???.?+!!!!#?*????4,9.;6=
8;?,;??p"+????+???!??*+?????$?BC	DEG
""?	?
<=`*?)?*???*?ȶg???L	MNL
MN@M???.+??(??+???.?#????????????????????????????????????,?*+???*+?0?ֶ/?*+???*+?6?ֶ/*+?0?ֶ/?*+??ְ+?j?:*?+?3?	?,??6?*+???(?+?9??,?*+??ְ?(?JWX[?`?{?~????~?????????? ?*?
..;???B?	;	
??i*?{L+??*???1+???*??+?~??*?mM,?,?=?
*???*?@?#+???*?mM,?,?=?
*?C???:??	?????%?'?,?@?N?S?g?
*,-.S-.iM?d>?$	???t@???$t@??M??p!*?R??+?
+?F??+??I?L???	???
!!??	
?5?I/*?+?xW+?{M+?N+?6:+?O?*?+-?{?R?̸d???,???,?{?W?,?{M?3,???,?{?Z?,?{M?*?+-?{?]?̸d???:*-?`?*-?d?h???C:?!?*-?`?
*-?l???9:*?+?o?s?y??*?+????YS?d???,?W?
,??,??:??s?*?+,???̸d????~?	???? ?5?7?H?P?a?i?~???????	?
?
??????+-
R//@?!>?A?B???C??fM?#D.,
?7?????"?5?
@??t@bc?!,?*?++????Y+??S?d???? !%"!&(
 !!A?!C?	ACnc?$,?C?*?++????Y+??S?d????/0410 5"7
 $$A?$C?"	ACjk?%,??-?*?++????Y+??S?d????>?C@?!D#F
*%%A?%C?%Eg#
ACEFG?,??:?)?s?!*?
?x?*?+,???̸d??*,??*?,?x?	*,?3W,????7-?Z?-???)-?{???,?????*?+,???̸d?ر.???1?D?J?U?\?m?v???
4??HI?J??>??-.?1t!
KLB
*?T????

MJ@N%?????????????øųI?˸ͳ??ո׳??ܸ׳???׳???׳???׳???׳^??׳???׳???׳????׳]?j9:A$V*W0[6\<_B`HbNcTeZf`ifjlnroxq~r?t?u?y?z?~??~OPQ??!-R>SZ[^S_`aSZcfSghiSjlpSqrquj
!v-w@?xy?{		v|}		#v?Rv???	?	zt?@???




© 2015 - 2024 Weber Informatics LLC | Privacy Policy