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

com.google.javascript.jscomp.PeepholeReplaceKnownMethods.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
9com/google/javascript/jscomp/AbstractPeepholeOptimization()V		
8com/google/javascript/jscomp/PeepholeReplaceKnownMethodslateZ	useTypes
%com/google/javascript/jscomp/NodeUtilisGoogWeakUsageCall%(Lcom/google/javascript/rhino/Node;)Z
 com/google/javascript/rhino/NodegetSecondChild$()Lcom/google/javascript/rhino/Node;
detach
 !"replaceWith%(Lcom/google/javascript/rhino/Node;)V
$%"reportChangeToEnclosingScope
'()isCall()Z
+,-tryFoldKnownMethodsF(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node;
/0123$com/google/common/base/Preconditions
checkArgument(ZLjava/lang/Object;)V
56-tryFoldArrayJoin
89-tryToFoldArrayConcat
/;<3
checkState
>?
getFirstChild
/ABCcheckNotNull&(Ljava/lang/Object;)Ljava/lang/Object;
EF)	isGetProp
HI)isASTNormalized
KL)isQualifiedName
NOPgetQualifiedName()Ljava/lang/String;
RSTUVjava/lang/StringhashCode()IXArray
RZ[\equals(Ljava/lang/Object;)Z^Math`Number
bcdtryFoldKnownArrayMethodsh(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node;
fgdtryFoldKnownMathMethods
ijdtryFoldKnownNumberMethods
lmdtryFoldKnownStringMethods
op)isName
rsdtryFoldKnownNumericMethods
/u2v(Z)V
xyP	getString{of
}~removeFirstChild	?????!com/google/javascript/rhino/TokenARRAYLIT#Lcom/google/javascript/rhino/Token;
??&(Lcom/google/javascript/rhino/Token;)V
??removeChildren
??"addChildrenToBack?parseInt?
parseFloat
??getNext
??)isStringLit
??isNumericLiteral
???tryFoldParseNumberz(Lcom/google/javascript/rhino/Node;Ljava/lang/String;Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node;
???(getSideEffectFreeNumberValueNoConversion6(Lcom/google/javascript/rhino/Node;)Ljava/lang/Double;?isFinite?isNaN?
isSafeInteger
?????java/lang/DoubledoubleValue()D
????(D)Z
???booleanNode%(Z)Lcom/google/javascript/rhino/Node;
????@@J?
?????java/lang/Mathpow(DD)D??
????	longValue()J
???{?'com/google/common/collect/ImmutableList+()Lcom/google/common/collect/ImmutableList;
???getSideEffectFreeNumberValue????)java/util/ListisEmpty?java/util/ArrayList
????\add???Vsize????get(I)Ljava/lang/Object;?abs?ceil?floor?fround?round?sign?trunc?clz32
????(D)D
????valueOf(D)Ljava/lang/Double;
????
????
????
isInfinite
??(D)J
??signum
	
/com/google/javascript/jscomp/base/JSCompDoublesecmascriptToUint32(D)I

java/lang/IntegernumberOfLeadingZeros(I)Imaxminimul????iterator()Ljava/util/Iterator; !"#)java/util/IteratorhasNext %&'next()Ljava/lang/Object;
?)??
?-?
/0ecmascriptToInt32
234
numberNodeG(DLcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node;6split
89:tryFoldStringSplit?(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node;<toLowerCase>toUpperCase@trim
BCdtryFoldStringToLowerCase
EFdtryFoldStringToUpperCase
HIdtryFoldStringTrim
KLisImmutableValueNindexOfPlastIndexOfRsubstrT	substringVsliceXcharAtZ
charCodeAt\replace^
replaceAll
`abtryFoldStringIndexOf?(Lcom/google/javascript/rhino/Node;Ljava/lang/String;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node;
de:tryFoldStringSubstr
gh:tryFoldStringSubstringOrSlice
jk:tryFoldStringCharAt
mn:tryFoldStringCharCodeAt
pq:tryFoldStringReplace
st:tryFoldStringReplaceAll	vwxyz2com/google/javascript/jscomp/colors/StandardColorsSTRING+Lcom/google/javascript/jscomp/colors/Color;
|}~getColor-()Lcom/google/javascript/jscomp/colors/Color;
?Z?java/lang/Object
???hasXChildren(I)Z
???VintValue
??:replaceWithCharAt
??)isNumber
??)isNeg
??getOnlyChild	?????java/util/LocaleROOTLjava/util/Locale;
R?<?&(Ljava/util/Locale;)Ljava/lang/String;
?????com/google/javascript/rhino/IRstring6(Ljava/lang/String;)Lcom/google/javascript/rhino/Node;
R?>??K[ 	
-
\u0085\u00A0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]+???makeConcatWithConstants8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;?
R?^?
?????com/google/common/base/Strings
isNullOrEmpty(Ljava/lang/String;)Z
R??Vlength
R?X?(I)C
R?N
R?T?(II)Ljava/lang/String;
???	getDouble
R???(I)Ljava/lang/String;
???getSideEffectFreeStringValue6(Lcom/google/javascript/rhino/Node;)Ljava/lang/String;
???getStringNumberValue&(Ljava/lang/String;)Ljava/lang/Double;
???trimJsWhiteSpace&(Ljava/lang/String;)Ljava/lang/String;
R??0
????number%(D)Lcom/google/javascript/rhino/Node;?0x
?????com/google/common/base/AsciiequalsIgnoreCase3(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Z
R?T?
??)isEcmaScript5OrGreater

???(Ljava/lang/String;I)I?java/lang/NumberFormatException?-
R???
startsWith?
????parseDouble(Ljava/lang/String;)D
R???(D)Ljava/lang/String;
???normalizeNumericString
R?N?
RP?
)
isArrayLitjoin,
	
?getStringValue
?
java/lang/StringBuilder

append-(Ljava/lang/String;)Ljava/lang/StringBuilder;
?getArrayElementStringValue
?
PtoString
-srcrefIfMissing
 !"0com/google/javascript/jscomp/InlineCostEstimatorgetCost%(Lcom/google/javascript/rhino/Node;)I?$%?remove
'()isSpread
*+detachChildren-	[].join()
/0"addChildToBack
23	getParent
567	setString(Ljava/lang/String;)V9$
R;<=contains(Ljava/lang/CharSequence;)Z
R?N@(Ljava/lang/String;)IB?CJ(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
EF-srcref
RH\ID(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
KLMjsSplitMatch((Ljava/lang/String;ILjava/lang/String;)I?OPQtoArray(([Ljava/lang/Object;)[Ljava/lang/Object;S[Ljava/lang/String;
UV)isNull
?XY(II)I
[\]jsSplit:(Ljava/lang/String;Ljava/lang/String;I)[Ljava/lang/String;
?_`aarraylitG([Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node;
cdecreateConcatFunctionCallForNodeq(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/jscomp/PeepholeReplaceKnownMethods$ConcatFunctionCall;
ghi(tryToRemoveArrayLiteralFromFrontOfConcat?(Lcom/google/javascript/jscomp/PeepholeReplaceKnownMethods$ConcatFunctionCall;)Lcom/google/javascript/jscomp/PeepholeReplaceKnownMethods$ConcatFunctionCall;
klmtryToFoldConcatChainingq(Lcom/google/javascript/jscomp/PeepholeReplaceKnownMethods$ConcatFunctionCall;)Lcom/google/javascript/rhino/Node;	opqrsKcom/google/javascript/jscomp/PeepholeReplaceKnownMethods$ConcatFunctionCallcallNode"Lcom/google/javascript/rhino/Node;	ouvs
calleeNode
xy)hasChildren	o{|sfirstArgumentNode
~containsExactlyArray
??mayHaveSideEffects?concat?:com/google/javascript/jscomp/PeepholeReplaceKnownMethods$1
???i(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)V(ZZ)VCodeLineNumberTableLocalVariableTablethis:Lcom/google/javascript/jscomp/PeepholeReplaceKnownMethods;MethodParametersoptimizeSubtreenamesubtree
StackMapTable
callTargetfirstArg
methodNameLjava/lang/String;onlyArgLjava/lang/Double;	valueNodereplacementdargDresultargsLjava/util/List;LocalVariableTypeTable$Ljava/util/List;IendstartmaybeLengthOrEnd
maybeStart
stringNodeisStringLiteralfunctionNameString
firstArgumentnloweredupped
whitespacetrimmedinput
startIndexendIndextmpRadixnumericNodecheckValnewNodee!Ljava/lang/NumberFormatException;newValnormalizedNewValfunctionName
isParseInt	secondArgradix	stringVallstringNodelstring	isIndexOfsearchValue	fromIndexindexVal
elementStremptyStringNodefoldedStringNodenode
kJoinOverheadright	arrayNode
joinStringarrayFoldedChildrensbLjava/lang/StringBuilder;
foldedSizeprevelemoriginalSize4Ljava/util/List;maybeLengtharg1stringAsStringarg2
resultNodeparentmaybeEndindexlookForPatternreplacementPatternoriginal	newStringstringValue	separator
matchIndexilimitsplitStrings$Ljava/util/List;elementstringArrayarrayOfStringsconcatFunctionCallMLcom/google/javascript/jscomp/PeepholeReplaceKnownMethods$ConcatFunctionCall;arrayLiteralToRemove
currentArgconcatCallNodemaybeFunctionCallpreviousConcatFunctionCallpreviousConcatCallNodeRuntimeVisibleTypeAnnotations#Lorg/jspecify/annotations/Nullable;callee
SourceFile PeepholeReplaceKnownMethods.javaNestMembersBootstrapMethods?
?$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;^|$InnerClassesConcatFunctionCall%java/lang/invoke/MethodHandles$Lookup
java/lang/invoke/MethodHandlesLookup ??Y*?*?*?
??23	45? ???	?-??1+??*??+??M+,?*,?#,?+?&?	*+?*?+??"9;<= >"?)@/B? ?s1??1?s?"??,-???+?&+?.*+?4L+?&??*+?7L+?&+?:+?=?@?M,?D??*?G??,?=?J??,?=?MN6-?Q?M???iA${(2ɂ9#-W?Y?$6?-]?Y?6?-_?Y?6?1#**+,?a?*+,?e?*+,?h?*+,?kL?,?n?
*+,?qL+??BKLNOP#Q.S5TFU?W?Y?[?_?`?a?e? .??s?????s?
?xR?	?
??cd??H+?&?,?D???t,?wz?Y?+?+?|W?Y???N-+????+-?*-?#-??&	jn"o$r)t4u<vAwFx?*H??H?sH?s4`s?@?	??jd??	?+?&?,?D???t,?wN-:6?Q?7?(?i*F?$<??Y?6???Y?6?@,??:????*???*+-???+?:,??:????*??Y:?+?:-:6?Q?P?6~y#??gC?q3??Y?&6? ??Y?6???Y?6?)9??????:?Y??????:?I????????.???????gk???Ċ???????:??+?*?#?+??z|}~x?~?????????????????????<?I?L?Y?\?^?p??????????????????R~!?s?????s??s????????s???s?N@?,RR???!R??0R<@??	??gd?D?+?&?,?D???t??N,??:?9*??:? -?????Y??N-??W?+???:???:,?w:-????-??????9:6	?Q?????{xrK.?[5ݽ???P??$kz????=???Y?x6	?r?Y?h6	?b?Y?X6	?R?Y?H6	?B?Y?86	?2?Y?(6	?"?Y?6	??Y?6		?	/<IV???????:??????:??????:????????
??
??:??????????:?:?y??????
??:?_????:?Q???:?D??????
??:?*????k??:??????:??|:6?Q?j?d)?R:?X\1b?K?Y?96?3?Y?(6?"?Y?6??Y?6?Y??9-?:

??
?$??:???(9?????:??*9-?:

??
?$??:???,9?????:?o-?????:?\-???????.-???????.h???:?2-???(-??????-??????????:????+?1:+?*?#?+??
B???%?-?2?;?C?O?Q?[?^?d?n?}??????????????????????????????
????-?7?J?M?[?^?c??????'?*?149Wcfm	p
z??????!?"?#?$?%?'??-$?? ;?s}??????7??W??97???3s?????s??s???^???d????????0@???"???	?x	??RR
0		
	??9R
? ?$?	? ?$?	)?.?	??md?O+?&?,?D???t,?=N-??6,?w:,??:?"5?Y?*+-?7???:6?Q?Q?1ݖ!?/R?26t"C;?Y?(6?"=?Y?6???Y?6?/!(*+-?A?*+-?D?*+-?G??x?J?p:6?Q??	??)????M???W?v?"V?e?=??????nQ?A?@?B?D?EHJ$M-O6Q?SHUQ[f]o^w_`?a?b?c?dfg&h/m6oDpMy?z??6??
????????	???O??O?sO?s4?s!.?'(??-"?s??&@?2R?1R
??gR2
??XR??R
?R?	??sd??L+?&?t*?G??,?wN,??:?/???*???-??Y?-??Y?*+-??L+??&	~???? ?2?A?J??47??1?sL??L?sL?s??/R??	????^+???+???+?????????????s?@??Cd?? ,?w????N-??:+?*?#????????4 ?? ?s ?s???s?	??Fd?? ,?w????N-??:+?*?#????????4 ?? ?s ?s???s?	??Id??-?N,?w--?????:??:+?*?#???????$?*??>-??-?s-?s)?????s?	??
????n*???*?<*??d=*???*??0?*??.?	????*.???$?*??0?	?????*??.????*?*`????B??	????&?.?4?=?K?Q?[?^?c?e?? n??c??\???
	?!??????
?+?&?t,??Y6-??:6?H?+???????+???9????+??6??
$?+?:*-???V*-??:?
??????:?^????+?1:	???+?1:	+	?*	?#	?*-??:?+???:?+???:?ә+?ԶY???:	?????
?M???"??ڸܙ6??:?%? *????ԶY?+?
66
??6
?:+?
????+?1:	?
?+?1:	?7?:
??9+?1:	????:
?:+???
?Y?+?+	?*	?#	?_hk??????C??????"?$46=GIN	`
bemt???? ?"?#?$?'?(?)?-?.?/?2?3?4?9?;<=>+?/@:A?GVHXK\N_PhSkQmRoTU?W?Y?Z?\?]?^?a?_?`?e?f?j?k?m??=%????s	??s	tL????s	m????s	_5??
??s	????
?s	????/??
?????s?????s????s???eu???????s	???$???/R??
?
?
?'?RR???
RR??? RR?R??RR?R??
???ab???+?&?t-???t-?w:,M?Y6??:*??:?+?????6	???????+????6	?	???	??6

?+?1:+?*?#??Ryz|}~$,?1?3?C?H?X?Z?b?g?s?~????????z?????s?????s??s???y?$r?s,j??CS??	~??
??s?.?3	RRRD?H?????6-?W+?&+?:+?=M,?
,?D?+?,??N-?-???
-?J?+?,?=:??,?w?Y?+?-?!-???-?w?Y?
-?W*+?#-?	?-?:??Y??::6:	?=:

??
?J?
??5??Y?:??W
?:?+??W?F?-	?@W?``6???	???W:
?`6
??W
:	
??:
??k?*	?@W?``6???	???W??d`6+?6???m1???:+?*?#??#?:

?&?
?+?
????)+
?*
?#
?+??????+?,??6`6-?
-??`6?+??)?:???$?:?.???*?#+??"H??
????#?1?3?9?N?P?h?m?r??????????????????????????????????????????%?)?3?8?>?J?_?m?s?????????????????????????????????!&ELO	U
???????s?/?s
E?sU??W??W?s
J?s8?s9?s???????????????????s	???s
s?????????????!	CR?R??
R?
.
+?4???R??R??
 ???e:???+?&?t,???t-???t,?w:*-??:?
??6?+?-??:?)*??:		?
	??6?+????+??
??d6`???
??+?`??:		??:
+?1:+
?*?#
??j ',68!>"C#K$P%Z'\*d,f.i0s7?8?;?<?>???@?A??3??W??K??	\
???????s??s??s8~??sC?? ???'???>x?s???	??s
??s??@?R??R??!??
R???	?	R??		R??
???h:???+?&?t,???t-???t,?w:*-??:?
??6?+?-??:?)*??:		?
	??6?+????+??
??6????????
?+???:		??:
+?1:+
?*?#
??nFGHL N'O,P6R8U>VCWKXPYZ[\^d`fbidpk~l?p?s?t?v?w?x?y??3??W??K??	\
???????s??s??s8???pN?? ???'???>??s???	??s
??s??@?R??R??!??
R???	?	R??	R?$?
????:?j,W?4-???W*-?#+??~???*???s?s?s?
???k:?:h+?&?t,???t,?w:-?-???-???
-???6?+??
???+?`????:+?1:+?*?#??6
????&?0?2?A?C?S?Y?_?e??\	-??h??h?sh?sh?s26??T??S?sY?s?"?0R?R?
???q:???+?&?t,???t-??:????+?-??????+?-?w:?w:8?:?+?,?w:?>6?+?????`??A:		??,?D:
+?1:+
?*?#
??^????!?#?2?4?:?A?L?N?T?]?c?e?j?u????????????z?????s??s??s??s:i??Ab??TO??]F??? ??	??s
??s??!?RR?R?
???t:?V
{+?&?t,???t-??:????+?-??????+??w:8?:?+?,?w:-?w?G:??,?D:+?1:	+?*	?#??F????!?#?2?4?;?F?H?N?[?f?l?r?x??f
{??{?s{?s{?sg?s;@??N-??[ ??f?sl?s	??!?R?
???n:?7e+?&?t,???t,?w:-?-???-???
-???6?+??
???+??????:+?1:+?*?#??6
????&?0?2?A?CPV\b?\	-??e??e?se?se?s23??Q??P?sV?s?"?0R?R?
???
LM??,??`*????*,??>????

?*???????????
???\]??????t+???t??R?,??RY+S???Y??:,?ә06+???!?+`????W???ܧj6+,?JY6?*???+????W,??`6??????(+???+???W????W?R?N?R??V !!&%'.*7.>/P0b/k3n5}6?7?9?<?=?>?@?E?RA'??nd??xZ??????????????7????7????!
@
@???&??3$?
?
???9:?
?*??+?+?&?t,???t:,?w:??`6-?E-???-?w:?-?T?+?-??:?!???????W6?+?+?*?Z:??^::		?6
6
?	2:??,?D?.????+?1:	+?*	?#??rJK	NOQR U)W-X4Y=ZD[F^L_Q`Yafbkcmfol{m?n?o?n?r?s?t?u?zL#?s????????s??s??s??? ???)???{L?S?C?s??s	??	?3RR?&?? RRRR?!?
???9-??4+?&+?.*?G?
*?
?+?+?bM,?+?*,?fM,?@W*,?j??&	y{|~!?#?)?.?? 4??4?s???
?
o??hi??E+?@W+?nM+?tN-??
-?w?+?+?z:?}?+??W-?*,?#,?b??2??
????%?-?/?5?;?@??4E??E??
;rs6?s% ?s?????lm?~?+?@W+?nM+?tN-?&?,?-?b:?,?+?z:?*???,???:????n:+?z:?:??:??.???,??*?#??^??
??????#?%?0?9?;?E?L?R?W?[?b?l?o?x?~??\	+?s[?s??????
w?sr?sc??L5?sR/?s?%??o??	???
de??G*?&*?.*?=?@?L+?D?+?w??Y??+?=M,?}??*?N??Y*,-????&	???'?)?.?5?7?<??*G?s4?s.vs<|s??'?
????
??A*??*???*?&??*?=L+?D?+?w??Y?+?=?}????.???
?????%?2?@??A?s$?s?
?&@?????o????o	
?





© 2015 - 2024 Weber Informatics LLC | Privacy Policy