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

com.google.javascript.jscomp.FunctionInjector.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()V
	
&com/google/common/collect/ImmutableSetof*()Lcom/google/common/collect/ImmutableSet;	-com/google/javascript/jscomp/FunctionInjectorknownConstantFunctions(Lcom/google/common/collect/ImmutableSet;/com/google/javascript/jscomp/FunctionInjector$1
2(Lcom/google/javascript/jscomp/FunctionInjector;)V	throwawayNameSupplierLjava/util/function/Supplier;java/util/LinkedHashMap
	 !"referencesEvalCacheLjava/util/LinkedHashMap;	$%"innerFunctionCache	'()*+5com/google/javascript/jscomp/FunctionInjector$Buildercompiler/Lcom/google/javascript/jscomp/AbstractCompiler;
-./01$com/google/common/base/PreconditionscheckNotNull&(Ljava/lang/Object;)Ljava/lang/Object;3-com/google/javascript/jscomp/AbstractCompiler	(	'67safeNameIdSupplier9java/util/function/Supplier	6	'<=>assumeStrictThisZ	<	'AB>assumeMinimumCapture	A	'EF>allowDecomposition	E	'IJKfunctionArgumentInjector7Lcom/google/javascript/jscomp/FunctionArgumentInjector;M5com/google/javascript/jscomp/FunctionArgumentInjector	I
PQRST%com/google/javascript/jscomp/NodeUtilgetFunctionBodyF(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node;
VWXYZ com/google/javascript/rhino/Node
getFirstChild$()Lcom/google/javascript/rhino/Node;
V\]^	getString()Ljava/lang/String;
-`ab
checkState(Z)Vd	arguments	Pfgh%MATCH_ANYTHING_BUT_NON_ARROW_FUNCTION"Lcom/google/common/base/Predicate;
PjklisNameReferencedY(Lcom/google/javascript/rhino/Node;Ljava/lang/String;Lcom/google/common/base/Predicate;)ZnopapplyH(Ljava/lang/String;Ljava/lang/String;)Lcom/google/common/base/Predicate;
rstuv!com/google/common/base/Predicates
alwaysTrue$()Lcom/google/common/base/Predicate;
Pxyzhasi(Lcom/google/javascript/rhino/Node;Lcom/google/common/base/Predicate;Lcom/google/common/base/Predicate;)Z	|}~?7com/google/javascript/jscomp/FunctionInjector$ReferencecallNode"Lcom/google/javascript/rhino/Node;
???isSupportedCallType%(Lcom/google/javascript/rhino/Node;)Z	?????=com/google/javascript/jscomp/FunctionInjector$CanInlineResultNO?Lcom/google/javascript/jscomp/FunctionInjector$CanInlineResult;
???hasSpreadCallArgument	|???scope$Lcom/google/javascript/jscomp/Scope;
?????"com/google/javascript/jscomp/ScopeisGlobal()Z
P???isWithinLoop
P???isFunctionObjectCall	|???mode??isVar
VAB?hasOneChild	+DE/VAR_DECL_SIMPLE_ASSIGNMENT
GHI
getDecomposerY(Lcom/google/javascript/jscomp/Scope;)Lcom/google/javascript/jscomp/ExpressionDecomposer;	KLMNO/com/google/javascript/jscomp/FunctionInjector$2N$SwitchMap$com$google$javascript$jscomp$ExpressionDecomposer$DecompositionType[I
QRSTU1com/google/javascript/jscomp/ExpressionDecomposercanExposeExpressioni(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/jscomp/ExpressionDecomposer$DecompositionType;
WXYZ[Ccom/google/javascript/jscomp/ExpressionDecomposer$DecompositionTypeordinal()I	+]^/
EXPRESSION	+`a/DECOMPOSABLE_EXPRESSION	+cd/UNSUPPORTED
2fghcreateExpressionDecomposer?(Ljava/util/function/Supplier;Lcom/google/common/collect/ImmutableSet;Lcom/google/javascript/jscomp/Scope;)Lcom/google/javascript/jscomp/ExpressionDecomposer;
jklclassifyCallSitew(Lcom/google/javascript/jscomp/FunctionInjector$Reference;)Lcom/google/javascript/jscomp/FunctionInjector$CallSiteType;
+noppreparek(Lcom/google/javascript/jscomp/FunctionInjector;Lcom/google/javascript/jscomp/FunctionInjector$Reference;)V	KrsOE$SwitchMap$com$google$javascript$jscomp$FunctionInjector$CallSiteType
+X
vwxremoveConstantVarAnnotation9(Lcom/google/javascript/jscomp/Scope;Ljava/lang/String;)Vzjava/lang/IllegalStateException|2Movable expressions must be moved before inlining.
y~(Ljava/lang/String;)V?(Ljava/lang/String;)Lcom/google/javascript/jscomp/AbstractVar;? com/google/javascript/jscomp/Var
???ZgetNameNode
V???isDeclaredConstantVar
V??bsetDeclaredConstantVar
V??ZgetFirstFirstChild
???"callMeetsBlockInliningRequirements?(Lcom/google/javascript/jscomp/FunctionInjector$Reference;Lcom/google/javascript/rhino/Node;Lcom/google/common/collect/ImmutableSet;)Z	????AFTER_PREPARATION	????YES
V???
isFunction
??1get?java/lang/Boolean
????booleanValue?ov?o?F(Lcom/google/javascript/rhino/Node;)Lcom/google/common/base/Predicate;
????valueOf(Z)Ljava/lang/Boolean;
???put8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;?java/util/ArrayList
????visith(Lcom/google/javascript/rhino/Node;Ljava/util/ArrayList;)Lcom/google/javascript/jscomp/NodeUtil$Visitor;
P???
visitPreOrderT(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/NodeUtil$Visitor;)V
???[size	???NO_FUNCTIONS
????(I)Ljava/lang/Object;	???MULTIPLE_FUNCTIONS?6com/google/javascript/jscomp/NodeUtil$MatchDeclaration
??;com/google/javascript/jscomp/NodeUtil$MatchShallowStatement
?
????getClosestHoistScope.()Lcom/google/javascript/jscomp/AbstractScope;
???ZgetRootNode
???referencesEval
??TinnerFunctionOf
???equals(Ljava/lang/Object;)Z
?????&com/google/common/collect/ImmutableMapisEmpty?java/util/LinkedHashSet
???(Ljava/util/Collection;)V
2getCodingConvention1()Lcom/google/javascript/jscomp/CodingConvention;
LmaybeAddTempsForCallArguments?(Lcom/google/javascript/jscomp/AbstractCompiler;Lcom/google/javascript/rhino/Node;Lcom/google/common/collect/ImmutableMap;Ljava/util/Set;Lcom/google/javascript/jscomp/CodingConvention;)V?	
java/util/Set
?#isDirectCallNodeReplacementPossible?java/util/Collection
2
getChunkGraph-()Lcom/google/javascript/jscomp/JSChunkGraph;iterator()Ljava/util/Iterator;?java/util/IteratorhasNext next()Ljava/lang/Object;	?"#?BLOCK	|%&'chunk&Lcom/google/javascript/jscomp/JSChunk;
)*+,-)com/google/javascript/jscomp/JSChunkGraph	dependsOnO(Lcom/google/javascript/jscomp/JSChunk;Lcom/google/javascript/jscomp/JSChunk;)Z
/01estimateCallCost&(Lcom/google/javascript/rhino/Node;Z)I
345inlineCostDeltap(Lcom/google/javascript/rhino/Node;Ljava/util/Set;Lcom/google/javascript/jscomp/FunctionInjector$InliningMode;)I
789
doesLowerCost+(Lcom/google/javascript/rhino/Node;IIIIIZ)Z
;<=>?0com/google/javascript/jscomp/InlineCostEstimatorgetCost&(Lcom/google/javascript/rhino/Node;I)I
PABTgetFunctionParameters
VDE[
getChildCount	GHINAME_COST_ESTIMATEI	;KLIESTIMATED_IDENTIFIER_COST?	OPQRS!com/google/javascript/rhino/TokenRETURN#Lcom/google/javascript/rhino/Token;
PUVWgetNodeTypeReferenceCountj(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Token;Lcom/google/common/base/Predicate;)I
?
?Z[?add]eval
_?`java/lang/String
_?
Vcd?isSuper	OfgSFUNCTION
Vij&(Lcom/google/javascript/rhino/Token;)V	Signature;1Ljava/util/function/Supplier;PLjava/util/LinkedHashMap;_Ljava/util/LinkedHashMap;
COMMA_COST
ConstantValue
PAREN_COST:(Lcom/google/javascript/jscomp/FunctionInjector$Builder;)VCodeLineNumberTableLocalVariableTablethis/Lcom/google/javascript/jscomp/FunctionInjector;builder7Lcom/google/javascript/jscomp/FunctionInjector$Builder;MethodParameters#doesFunctionMeetMinimumRequirements7(Ljava/lang/String;Lcom/google/javascript/rhino/Node;)ZfnNameLjava/lang/String;fnNodeblockfnRecursionNamereferencesArgumentsblocksInjectionLocalVariableTypeTableFLcom/google/common/base/Predicate;
StackMapTable? com/google/common/base/PredicatecanInlineReferenceToFunction?(Lcom/google/javascript/jscomp/FunctionInjector$Reference;Lcom/google/javascript/rhino/Node;Lcom/google/common/collect/ImmutableSet;ZZ)Lcom/google/javascript/jscomp/FunctionInjector$CanInlineResult;ref9Lcom/google/javascript/jscomp/FunctionInjector$Reference;needAliasesreferencesThiscontainsFunctions?(Lcom/google/javascript/jscomp/FunctionInjector$Reference;Lcom/google/javascript/rhino/Node;Lcom/google/common/collect/ImmutableSet;ZZ)Lcom/google/javascript/jscomp/FunctionInjector$CanInlineResult;	thisValuearginlineunsafeInlineresultsrcLocation
newExpression
returnNodesafeReturnNodeinlineResultargMap(Lcom/google/common/collect/ImmutableMap;typeBeforeCast+Lcom/google/javascript/rhino/jstype/JSType;^Lcom/google/common/collect/ImmutableMap;?)com/google/javascript/rhino/jstype/JSType
decomposer3Lcom/google/javascript/jscomp/ExpressionDecomposer;parentgrandParentmaybePrepareCall<(Lcom/google/javascript/jscomp/FunctionInjector$Reference;)VcallSiteType
firstChild
resultNameneedsDefaultReturnResultmutator5Lcom/google/javascript/jscomp/FunctionToBlockMutator;isCallInLoopnewBlocknamevar"Lcom/google/javascript/jscomp/Var;nameNodenamesToAlias?(Lcom/google/javascript/jscomp/FunctionInjector$Reference;Lcom/google/javascript/rhino/Node;Lcom/google/common/collect/ImmutableSet;)Lcom/google/javascript/jscomp/FunctionInjector$CanInlineResult;fncachedLjava/lang/Boolean;RuntimeVisibleTypeAnnotations#Lorg/jspecify/annotations/Nullable;containerFninnerFnsLjava/util/ArrayList;9Ljava/util/ArrayList;innerFncalleeIsOnlyInnerFncallerFnallNamesToAliasLjava/util/Set;argshasArgscallRefcalleeFncalleeContainsVarsforbidTemps#Ljava/util/Set;?(Lcom/google/javascript/jscomp/FunctionInjector$Reference;Lcom/google/javascript/rhino/Node;Lcom/google/common/collect/ImmutableSet;)ZcArg?(Lcom/google/javascript/jscomp/FunctionInjector$Reference;Lcom/google/javascript/rhino/Node;Ljava/util/Set;)Lcom/google/javascript/jscomp/FunctionInjector$CanInlineResult;inliningLowersCostr(Lcom/google/javascript/jscomp/JSChunk;Lcom/google/javascript/rhino/Node;Ljava/util/Collection;Ljava/util/Set;ZZ)ZfnChunkrefsLjava/util/Collection;isRemovablereferenceCountreferencesUsingBlockInliningcheckModules
chunkGraph+Lcom/google/javascript/jscomp/JSChunkGraph;referencesUsingDirectInliningcallCostoverallCallCostcostDeltaDirectcostDeltaBlockRLjava/util/Collection<+Lcom/google/javascript/jscomp/FunctionInjector$Reference;>;?(Lcom/google/javascript/jscomp/JSChunk;Lcom/google/javascript/rhino/Node;Ljava/util/Collection<+Lcom/google/javascript/jscomp/FunctionInjector$Reference;>;Ljava/util/Set;ZZ)Z
directInlinesblockInlines	removablefnInstanceCount	costDelta	thresholdargsNodenumArgs
aliasCountinlineBlockOverheadperReturnOverheadperReturnResultOverheadperAliasOverheadreturnCountresultCountbaseOverheadoverhead
paramCount
commaCountcostDeltaFunctionOverhead?(Lcom/google/javascript/rhino/Node;Ljava/util/Set;Lcom/google/javascript/jscomp/FunctionInjector$InliningMode;)IsetKnownConstantFunctions+(Lcom/google/common/collect/ImmutableSet;)V?(Lcom/google/common/collect/ImmutableSet;)Vlambda$innerFunctionOf$3\(Lcom/google/javascript/rhino/Node;Ljava/util/ArrayList;Lcom/google/javascript/rhino/Node;)Vnlambda$referencesEval$2lambda$referencesEval$1,lambda$doesFunctionMeetMinimumRequirements$0I(Ljava/lang/String;Ljava/lang/String;Lcom/google/javascript/rhino/Node;)Z
SourceFileFunctionInjector.javaNestMemberskl=>B>7kmkmJK!"kn%"koHIpIqrsIqtuv?p*?*??
*?Y*??*?Y??*?Y??#*+?&?,?2?4*+?5?,?8?:*+?;??*+?@?C*+?D?G*+?H?,?L?N?w2J59E"H-K;LIMQNYOaPoQxpyzp{|}{~v?G,?ON,?U?[:???_-c?e?i6+?m:?-?q?w???w????!?&?0?xHGyzG??G??B??9??&!?>0?h?0????V_@?,?@}	????v3p+?{:*?????????????$*?C?+?????????????????????+?????*+,-???*+,-???w>	
$59AER V#`$h&xHpyzp??p??p?p?>p?>j??p?l?
?V}?????k???v?8+?U???/+???*???!+??M,?
,?????+?????w*
1
2345(6*8-94:6>x 
??8yz8??
?(V?}
??v~$*??*??*??L+?+?™?+??L????wBCDEC"Hx
??$???
V?}??va*?4?ȶ̸_*+,-?Ѱw
M
Nx*yz??????}
?????vP*+,-?ѰwWx*yz??????}
?????v?*+?????*+-??:?*+-,??:*?4???w\
]_a'bx>??*yz*??*??*?????	?V}
?????v0
?+?{N,??:*?N,-*?:??:??:??:?I?U:??????:*?N??:		??????:*?4??-?:??-?	?W-??-??-??W?-?-*?4?!?wfjkrsw"x&y-z0{7|AH?W?f?m?v?|?????????????????x?
&??-??7???H.??W??	?yz??????????????mS??|D???????V?0VV??1
|VVV?VVV@?|VVV?V??}	??klvl?+?{M,?$N-?$:-?'??*??0?#,-?3?-?U???-?U?7??:?-???-?7??=??@??C?*+???F:?J,?P?V.?$ $?\??_??b?wR??
????%?,?6??CKS[a
eo
???x>o1???yz?????
????????VVV'!?2Q?}?HIvE*?4*?:*?
+?e?wxyz??}???vS
*+?iM,*+?m?w$%&x 
yz
???/}???vr+?{:?$:?$:*+?i:?b????:6	?q?t.?j"8KT_?U?[:+???u?@?[:+???u?-:6	?$?yY{?}??yY??}??yY??}???Y*?4*?:??:
??6
-,	??:*?4???q?t.?zD_??:

*?4?!????_???D???_?*?4?!?)???_?*?4?!??yY??}??w?)-.
/34+9.:1;\=f>o?rByC?D?G?H?I?L?O?S?V?X?Y?Z?\?adef$h+i.n6o=pFqIuQvXwaxd{o~x?#??
ryzr??r??r??l?
e??^??W?/.D??1A?>	????
???>?????H?'|V_VVV+@?3_


?T?V?V@?
}
???
wxv?(*+????M,??,??N-??-???-???w?	????"?'?x*(??(??	???????CV?V}	???v?**?OL+???+?@?+?U??+?????w?????&?(?x*??%???	?V}???v?T*+?i:?b????*?G??_??\????*+,-???????_??\???????w*
????*?.?8?<?L?P?x4TyzT??T??T?M?/?T?l?
?+
}
???k???v?;+???_*?+????M,?,???+??+???w>*?+????W?w"?????(?,?9?x*;yz;??(??,?>????@(?}??Tv*o+???_*?#+???VM,?,???Y??N++-????-?ҫ/#??M?-???VM???M*?#+,??W,?w:?????!?,?LPS\_cmx*oyzo??\??!N???!N????V?2??@\?}???v7	?,?O??Y???Y??w66+?????????Z+????????$:*??	6?9*?C?2*??:?ն?,???6??6?
???V*?N,+?{*?:??:????6?0??Y-??:*?N*?4,*?4???????wj"$#()**<.E/K0R1Z2u3?7?8?=?>???A?B?D?E?F?E?G?H?MxzZ'??u?><E???#???A???2?>?yz??????????>??>? ?#???A????l?(?KV?"V@?
@??"?@?3}
???k???v?	?,?
????+?{:??:?U???6????????????:??????_*?N,*???:????6?2??Y-??:*?N*?4,*?4???????????wV]^bch#i+k8l<nFqVuavfxuyz{?|?}?|?~???x\	?%???yz??????????????fG??u8?>? ?%?????fG???
?,VV	@??@?5}
???k???v:?-?
6??6?+??6	*?4?:
-?:??J??|:???!??	?(?$? ?$+?
?$+?(?	66	???d6????,?.6h6
,???26,?!?26,
?6?wZ??
???"?+?I?T?W?d?{?~???????????????????x?I8???yz??'???????????>??>??I??I"??>	+???
?I?I?.?I?'?I
??I??I????????&??@?)?#|?)??}??????k?
89v
O`??d6?????thth`6`l6	*	`?:	???w???&?3?<?xf
O??O?IO?IO?IO?IO?IO?>>?I3?I<?I	?%M?V?@?&@}???????
01v?/*?@M,?C>?F`6??Fhdh``6??
?w"??
???%?)?,?x4/??/?>*??
%?I?I??%V}	??
45v??*?@?C>?	d?6`?Jh`6*??:??t?,???
`t?+?M666	6
6?N??Y??T6?
d?6
??6h`
h`h`6d?wN#)1
5
<CKNQT W$c%h'w(?*?0x?KQ?INN?IQK?I	TH?I
WE?Ih4?Iw%?I
??I??I???????????I??I#y?I)s???????5?@? V
?0
V?V@?
@}
???k???v^*?
?X?_*+?
?w8
9:xyz?l}k?
??vo,*???,???	+,?YW?w??	???x ???????	
?6vU+???+*????w?x?????@
??vO*???*?[\?^???w?x???@
v?I,???:,?[\?^?'*?a?,?[*?^?+?a?,?[+?^???,?b???w"???'?=?>?E?G?x I??I??I???	&@vA!?VY?e?h?ջVY?e?h?۲J?F?w.
1?
K?+
|?'*"%&%)?'*|+?,@?-@?2.@+/D
KWQ0@1P3	?P4?P5@@
@@@@68:




© 2015 - 2024 Weber Informatics LLC | Privacy Policy