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

com.google.javascript.jscomp.ExpressionDecomposer.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!
????7A
java/lang/Object()VJSCompiler_temp	

1com/google/javascript/jscomp/ExpressionDecomposertempNamePrefixLjava/lang/String;JSCompiler_inline_result	
resultNamePrefix
$com/google/common/base/PreconditionscheckNotNull&(Ljava/lang/Object;)Ljava/lang/Object;	
compiler/Lcom/google/javascript/jscomp/AbstractCompiler;
 !"#-com/google/javascript/jscomp/AbstractCompilergetAstAnalyzer,()Lcom/google/javascript/jscomp/AstAnalyzer;	
%&'astAnalyzer*Lcom/google/javascript/jscomp/AstAnalyzer;
)*+createAstFactory+()Lcom/google/javascript/jscomp/AstFactory;	
-./
astFactory)Lcom/google/javascript/jscomp/AstFactory;	
123safeNameIdSupplierLjava/util/function/Supplier;	
567knownConstantFunctions(Lcom/google/common/collect/ImmutableSet;	
9:;scope$Lcom/google/javascript/jscomp/Scope;	
=>?enabledWorkaroundsLjava/util/EnumSet;
ABChasTypeCheckingRun()Z
EFChasOptimizationColors
HIJgetTypeRegistry5()Lcom/google/javascript/rhino/jstype/JSTypeRegistry;	LMNOP/com/google/javascript/rhino/jstype/JSTypeNativeUNKNOWN_TYPE1Lcom/google/javascript/rhino/jstype/JSTypeNative;
RSTUV1com/google/javascript/rhino/jstype/JSTypeRegistry
getNativeType^(Lcom/google/javascript/rhino/jstype/JSTypeNative;)Lcom/google/javascript/rhino/jstype/JSType;	
XYZunknownType+Lcom/google/javascript/rhino/jstype/JSType;	\]^_`Ccom/google/javascript/jscomp/ExpressionDecomposer$DecompositionTypeDECOMPOSABLEELcom/google/javascript/jscomp/ExpressionDecomposer$DecompositionType;

bcdcanExposeExpressioni(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/jscomp/ExpressionDecomposer$DecompositionType;

fghexposeExpression%(Lcom/google/javascript/rhino/Node;)Vjjava/lang/IllegalStateException
lmnop com/google/javascript/rhino/NodetoStringTree()Ljava/lang/String;rstmakeConcatWithConstants&(Ljava/lang/String;)Ljava/lang/String;
ivw(Ljava/lang/String;)V

yzh"rewriteAllContainingOptionalChains

|}~findExpressionRootF(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node;
?????%com/google/javascript/jscomp/NodeUtilisStatement%(Lcom/google/javascript/rhino/Node;)Z
???
checkState(ZLjava/lang/Object;)V

?g?G(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)V

???findNonconditionalParenth(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node;
?????(com/google/javascript/jscomp/AstAnalyzermayHaveSideEffects

??~findInjectionPoint?Dcom/google/javascript/jscomp/ExpressionDecomposer$DecompositionState
?	????sideEffectsZ	????extractBeforeStatement"Lcom/google/javascript/rhino/Node;
l???	getParent$()Lcom/google/javascript/rhino/Node;

???isConditionalOp
l???isFirstChildOf
l??CisAssign

???isSafeAssign&(Lcom/google/javascript/rhino/Node;Z)Z
l???
getFirstChild	?????3com/google/javascript/jscomp/ExpressionDecomposer$1,$SwitchMap$com$google$javascript$rhino$Token[I
l???getToken%()Lcom/google/javascript/rhino/Token;
?????!com/google/javascript/rhino/Tokenordinal()I

???decomposeSubExpressions?(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/ExpressionDecomposer$DecompositionState;)Vr
l??CisCall
????isNormalGet
l???getNext

???isExpressionTreeUnsafe

???rewriteCallExpressionk(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/ExpressionDecomposer$DecompositionState;)V
l??CisExprResult

???extractConditionali(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;Z)Lcom/google/javascript/rhino/Node;
?????2com/google/javascript/jscomp/OptionalChainRewriterbuilderm(Lcom/google/javascript/jscomp/AbstractCompiler;)Lcom/google/javascript/jscomp/OptionalChainRewriter$Builder;???createTmpVarName{(Lcom/google/javascript/jscomp/ExpressionDecomposer;)Lcom/google/javascript/jscomp/OptionalChainRewriter$TmpVarNameCreator;
?????:com/google/javascript/jscomp/OptionalChainRewriter$BuildersetTmpVarNameCreator?(Lcom/google/javascript/jscomp/OptionalChainRewriter$TmpVarNameCreator;)Lcom/google/javascript/jscomp/OptionalChainRewriter$Builder;
????setScopeb(Lcom/google/javascript/jscomp/Scope;)Lcom/google/javascript/jscomp/OptionalChainRewriter$Builder;?java/util/ArrayDeque
?
????isEndOfFullOptChain
???buildX(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/jscomp/OptionalChainRewriter;
?addFirst(Ljava/lang/Object;)V
??
isOptChainGet
?	
iterator()Ljava/util/Iterator;
Cjava/util/IteratorhasNext
next()Ljava/lang/Object;
?rewrite

pgetResultValueName
??isStatementBlock
? (Z)V
"#$%&com/google/javascript/rhino/IRname6(Ljava/lang/String;)Lcom/google/javascript/rhino/Node;
l()~copyTypeFrom
l+,hreplaceWith
?./0
newVarNodeX(Ljava/lang/String;Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node;
l23hinsertBefore
56hreportChangeToEnclosingScope
?89?isOptChainNode
?;<~getEndOfOptChainSegment
?>??mayBeObjectLitKey
lABCisComputedProp
lDE?getSecondChild
lGHCisTemplateLitSub
lJKCisSpread
"MN?mayBeExpression

PQ?extractExpression

STpgetTempValueName
lVW?getLastChild
lYZdetachChildren
\]^_`'com/google/javascript/jscomp/AstFactorycreateBlockG([Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node;
lbc~srcref

efgbuildResultExpressionY(Lcom/google/javascript/rhino/Node;ZLjava/lang/String;)Lcom/google/javascript/rhino/Node;
\ij~
exprResult
llmhaddChildToFront
\op&createSingleVarNameDeclaration
lrs~srcrefTreeIfMissing
\uv?
createNull
\xy?createNe
\{|}typeR(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/jscomp/AstFactory$Type;
\??
createNamed(Ljava/lang/String;Lcom/google/javascript/jscomp/AstFactory$Type;)Lcom/google/javascript/rhino/Node;?s?6(Lcom/google/javascript/rhino/Node;)Ljava/lang/String;
l??ChasChildren
\???createIf?(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node;
\???
l??~srcrefIfMissing
l??hinsertAfter
?? 
checkArgument
"???assign
l??~
srcrefTree
l??CisName
????
isConstantVarI(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/Scope;)Z
l??p	getString
?????&com/google/common/collect/ImmutableSetcontains(Ljava/lang/Object;)Z
????isLogicalAssignmentOp
????isAssignmentOp
l??CisStringLit

???isConstantNameNode

??pgetTempConstantValueName
????getOpFromAssignmentOpG(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Token;
l??&(Lcom/google/javascript/rhino/Token;)V	????ASSIGN#Lcom/google/javascript/rhino/Token;
l???setToken
l??haddChildToBack
l???	cloneTree
l???	cloneNode
\??`createArraylit
l???getOnlyChild
\??`createObjectLitr
l?? setInferredConstantVar
?????"com/google/javascript/jscomp/ScopegetClosestHoistScope.()Lcom/google/javascript/jscomp/AbstractScope;
????declare?(Ljava/lang/String;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/CompilerInput;)Lcom/google/javascript/jscomp/Var;
l??CisVar
???
\??C
isAddingTypes
l???	getJSType-()Lcom/google/javascript/rhino/jstype/JSType;
????C)com/google/javascript/rhino/jstype/JSTypeisFunctionType
????toMaybeFunctionType3()Lcom/google/javascript/rhino/jstype/FunctionType;call
/com/google/javascript/rhino/jstype/FunctionTypegetPropertyType?(Ljava/lang/String;)Lcom/google/javascript/rhino/jstype/JSType;	l	
	FREE_CALL'Lcom/google/javascript/rhino/Node$Prop;
l
getBooleanProp*(Lcom/google/javascript/rhino/Node$Prop;)Z
l?getFirstFirstChild
lCisThis
lCisSuper
\
createThisR(Lcom/google/javascript/jscomp/AstFactory$Type;)Lcom/google/javascript/rhino/Node;
l?removeFirstChild	 !"#$2com/google/javascript/jscomp/colors/StandardColors
TOP_OBJECT+Lcom/google/javascript/jscomp/colors/Color;
\&|'?(Lcom/google/javascript/rhino/jstype/JSType;Lcom/google/javascript/jscomp/colors/Color;)Lcom/google/javascript/jscomp/AstFactory$Type;
\)*+
createGetProp?(Lcom/google/javascript/rhino/Node;Ljava/lang/String;Lcom/google/javascript/jscomp/AstFactory$Type;)Lcom/google/javascript/rhino/Node;
l-./putBooleanProp+(Lcom/google/javascript/rhino/Node$Prop;Z)V1234java/util/function/Supplierget6java/lang/String8s98(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;8r
5=>?
startsWith(Ljava/lang/String;)Z
lABCisLabel
lDEFgetAncestors5()Lcom/google/javascript/rhino/Node$AncestorIterable;
H	I1com/google/javascript/rhino/Node$AncestorIterable
?KL?isAnyForNUnexpected AST structure.

PQRisSubexpressionMovable?(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/jscomp/ExpressionDecomposer$DecompositionType;	\TU`UNDECOMPOSABLE
?WX?isNameDeclaration
lZ[CisTaggedTemplateLit	\]^`MOVABLE

`abgetEvaluationDirectionk(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/jscomp/ExpressionDecomposer$EvaluationDirection;

defgetFirstEvaluatedChild?(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/ExpressionDecomposer$EvaluationDirection;)Lcom/google/javascript/rhino/Node;

hifgetNextEvaluatedSiblingkUnexpected.
lmnCisDestructuringPattern	pqrstEcom/google/javascript/jscomp/ExpressionDecomposer$EvaluationDirectionREVERSEGLcom/google/javascript/jscomp/ExpressionDecomposer$EvaluationDirection;	pvwtFORWARD
lyz?getPrevious

|}?isTempConstantValueName
???isObjectCallMethod7(Lcom/google/javascript/rhino/Node;Ljava/lang/String;)Z
l??C	isGetProp
5???equals
l??pgetQualifiedName	?????Lcom/google/javascript/jscomp/ExpressionDecomposer$Workaround;
???java/util/EnumSet	
???WINDOW_LOCATION_ASSIGN+Lcom/google/javascript/rhino/QualifiedName;
?????)com/google/javascript/rhino/QualifiedNamematches
????canBeSideEffectedX(Lcom/google/javascript/rhino/Node;Ljava/util/Set;Lcom/google/javascript/jscomp/Scope;)Z?window.location.assign
????of?(Ljava/lang/String;)Lcom/google/javascript/rhino/QualifiedName;	Signature1Ljava/util/function/Supplier;;SLjava/util/EnumSet;RuntimeVisibleTypeAnnotations#Lorg/jspecify/annotations/Nullable;MAX_ITERATIONSI
ConstantValue??(Lcom/google/javascript/jscomp/AbstractCompiler;Ljava/util/function/Supplier;Lcom/google/common/collect/ImmutableSet;Lcom/google/javascript/jscomp/Scope;Ljava/util/EnumSet;)VCodeLineNumberTableLocalVariableTablethis3Lcom/google/javascript/jscomp/ExpressionDecomposer;constFunctionNamesLocalVariableTypeTable
StackMapTableMethodParameters(Lcom/google/javascript/jscomp/AbstractCompiler;Ljava/util/function/Supplier;Lcom/google/common/collect/ImmutableSet;Lcom/google/javascript/jscomp/Scope;Ljava/util/EnumSet;)VmaybeExposeExpression
expressioniexpressionRootleftcalleeparent
needResult
subExpressionnodeWithNonconditionalParenthasFollowingSideEffectsexprInjectionPointstateFLcom/google/javascript/jscomp/ExpressionDecomposer$DecompositionState;lastExposedSubexpressionexpressionToExposeexpressionParent
exprParentrewriter4Lcom/google/javascript/jscomp/OptionalChainRewriter;optChainRewriterBuilder;moveExpression
resultNameinjectionPointinjectionPointParentnewExpressionRootchildresultnstopNodetempNameAssigntempVarNodeAssign	assignLhsnullNodeifNodetempVarNodereplacementValueNodeexprtempNamefirstsecondlastcondtrueExpr	falseExpr
extractedNodeopNoderightOperand
tempNameValue
spreadCopyisLhsOfAssignOpfirstExtractedNodecontainingHoistScopefnTypereceiverNodethisVarNode
fnCallType
getVarNodefunctionNameNodegetExprNode
origThisValuesetTempNamePrefixprefixRuntimeInvisibleAnnotations1Lcom/google/common/annotations/VisibleForTesting;setResultNamePrefixcurrent	directionrequiresDecompositionseenSideEffectsnodelhstreefollowingSideEffectsExist
SourceFileExpressionDecomposer.javaNestMembersBootstrapMethods
s$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;(DecomposeExpression depth exceeded on:
6Expected a property access or destructuring pattern: 
"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;p?#Unexpected expression: %Unexpected parent of SPREAD:'
$jscomp$)_const$jscomp$+_const$jscomp$InnerClassesDecompositionTypeDecompositionStateBuilder1Dcom/google/javascript/jscomp/OptionalChainRewriter$TmpVarNameCreatorTmpVarNameCreator4,com/google/javascript/jscomp/AstFactory$TypeType7%com/google/javascript/rhino/Node$PropPropAncestorIterableEvaluationDirection
Workaround=%java/lang/invoke/MethodHandles$Lookup?java/lang/invoke/MethodHandlesLookup 
&'./23??67??:;>???YZ??????
????tk*?*?	*?+?W,?W-?W*+?*+??$*+?(?,*,?0*-?4*?8*?<*+?@?+?D?+?G?K?Q??W??Jc#
$defg$h,i4j9k>lDmJnKoYpfqjr?>k??kk23k?7k:;k>?? k2?k??k>??=?f
1???
?
1???
??2?:>???h??.=?[*+?a?#*+?e????iY+?k?q?u???"??
????!?-?? .??.??,????*??gh?p*+?x+?{M,?W,?,??*,+??????
????? ????
????g??u,+??N*?$-??6-??:??Y??:????:-:??:		+?	???
	????	??	???v*	???????	????	??:
??
????.?0!!?$*
???ǧ?iY
?k???u??g	?̙R	???ϙG	??:

?*
????*
???ՙ
?????*	?ا*	????:	:??:	???-,??"-??:

?ܚ?6*-??W???+?????&?-?0?3?:?@?B?Y?\?d?u?????????????????????????????#?+.;?CMU[jt???N??
?:??
[??
j
??u??u??u??o??e??_??V??0E??3B??:;??	?N?:

llll?lll@?:l??-l?%?l@??	??zh?q?*???*????*?8??M??Y??N+??:??C???-,????$?̙??:??
-,?????:???-?:?????:?????J
# %&&.(6+C,K4R5Z9d'n=?>???@?HR??&H???????????{?? s??? s????&??l ?	?
????h??P*?M+??N-?W-??:?W??+,?!+?'?*,+?-:??+?'W-?1*??4??2MN
OPQR#U/X6Y@ZF\O]?>P??P??K?
F??;??6????
????>*M*N-??:+?#???-???MN-??:???,?7?,?:M,??&	??
??!?$?0?7?<??4,??
&??>??>??<????
lll??	?????{+?+,??*+??,-??+?=?
+?@?+?@?
*+?C,-??+??L?$+?F?+??L?+?I??+?L??*+-???ՙ-??-*+-???O????F?	?
???"?)?3?;?B?J?T?[?\?h?m?z??*{??{??{??{???			?
????	??????+??:*?R:+??:??:+?U:+?X:	*?,?l?[+?a:
*?,?l?[+?a:??+????.?Lm?:	
*?,?d?h?k*?,?d?h?k???d:	
*?,?d?h?k???d:	*?,?d?h?k??*?R:*?,?n+?q:

,?1?d:*?,?t+?a:*?,?w+?a:	
*?,*?,?z?~+?a?d?h?k*?,?d?h?k??iY+???u????*?,	
??:?*?,	
??:+??W?3*?,?n+?q:

,?1
???!+?':+?*??ܸ??*???<??????#?&?7?Hpt????????
????????????$2"?!B EH%S&Y%\'_*m.u/?1?3?5?6?7?8?9?<?=?>?A?B?E???x??i??
Y??L????????
?????????????????????????????&???	7???
H????M???;
?p
lll5llllll.  ?}
?l:?
???
fg?v?,?!*?'*??*?'*???*??VWXYW[? ???????
??????n&+??? +*?8???*?4+????????ab%a?&??&??? @??Q????+????+??+??N-???-???+-????6:?B+?ϙ;+??:?0???*???*,?O:?:??:???*??:?!+?'+?a:?Z+???
+?ϙ?+???lY-????-?'-??:	-?U:
-?ö?
	?*	?k	
??+??:??+?I??+??:		??+	?*??-????.?S	8*?,?lY+S??+?ֶa:?/*?,?lY+S??+?ֶa:??iY-?k???u??+?*+:?-:		???'W	????*?8????:

	????W	,?1?	:?????1noqr2t5|A}L~]f?k?o}y???????????????????????????????????,?D?G?_?b?s?v?|??????????????????????f	??G2???(??	?"??
???D??_???|??	s??????????????2???5???Q??B??Q???H??	?(?;
?e@?"l@?ll'?	?'5l@?C?Al?	
llll5ll??l?El??	?????g+??+??+??N-??-??:*?,??%-??:????????*?W:*-,???O:,??????:+???
+???*??:??????:??
??:	?=??*?,?z??a:	?*,???O:
,
??
????:	+?W+	?k+*?,???%?(+?q?k+??,???!??
???"?(?0?>?D?O?U?_?i?r?s?z???????	???
??????? !??(?Z???	???	???
?????
?????ZO???_???z????|???0??	?.?>l??C???.ll?)ll?l?	??w?>*+?	??
)*???????Tp?@*?	*?0?0?5?7??.???w?>*+???
45???????p?@*?*?0?0?5?7??9????p?H*?	*?0?0?5?:??>A>???}??k +???+??*?	?;?uvw#x???????????????????????*#?????????????
l
??ll	
	?????cd?l+?{M,?
*,+?O??S????	??? ????????l??QR?H
>*?$,??6,?7?,???>,:?C?G:?????l:?V?????S??Y?????S?+??	?[??\???????r>?m*????_?_:*?c:		?*	?? *	?ՙ6>*	?g:	?????:	??̙	?ϙ?[?:??$?iYj?u??~????????Q?U?h?lr??	?
??!?"?#?%?(?+?,?-?$?1?2?389<?f
?,??	?Ut???	????????????????3??l
?+lB\
?pl????	??
ab?z:??*????.?+#&+*???l??o??u??K(O2S6W?:??(
?ef?j,?u?
+???+?U??\]^\? ????t?Cl?	?if?^,?u?
+?ҧ+?x??b? ???t?Cl?	????l+???f+??N??-????.?S5#'!?*-???՚??*-???՚*-?U?՚????&	??8?:?L?Z?i?j??*^?l??l??l???8l@@??	????O?+?I?*+?ֶ{????+??N-??~?
-???C+???+??????
+???+:+-???*?{?*?4??????*?@




© 2015 - 2024 Weber Informatics LLC | Privacy Policy