com.google.javascript.jscomp.J2clEqualitySameRewriterPass.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
9com/google/javascript/jscomp/AbstractPeepholeOptimization ()V
9com/google/javascript/jscomp/J2clEqualitySameRewriterPass useTypes Z
beginTraversal 2(Lcom/google/javascript/jscomp/AbstractCompiler;)V
2com/google/javascript/jscomp/J2clSourceFileChecker shouldRunJ2clPasses 2(Lcom/google/javascript/jscomp/AbstractCompiler;)Z
com/google/javascript/rhino/Node hasXChildren (I)Z
! " isStringEqualsMethod %(Lcom/google/javascript/rhino/Node;)Z
$ % & trySubstituteStringEquals F(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node;
( ) " isEqualitySameCall
+ , & trySubstituteEqualitySame
. / & srcrefIfMissing
1 2 3 replaceWith %(Lcom/google/javascript/rhino/Node;)V
5 6 3 reportChangeToEnclosingScope
8 9 : getSecondChild $()Lcom/google/javascript/rhino/Node;
< = > getKnownLiteralValue i(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/jscomp/J2clEqualitySameRewriterPass$NodeValue; @ A B C D Ccom/google/javascript/jscomp/J2clEqualitySameRewriterPass$NodeValue UNKNOWN ELcom/google/javascript/jscomp/J2clEqualitySameRewriterPass$NodeValue; @ F G D NULL_OR_UNDEFINED
I J : getLastChild
L M N rewriteNullCheck h(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node; @ P Q D NON_NULL
S T N rewriteAsStrictEq @ V W D NUMBER
Y Z [ \ ] $com/google/common/base/Preconditions
checkState (Z)V
_ ` N rewriteNumberCheck
b c : detach
e f " canOnlyBeObject
h i j k & com/google/javascript/rhino/IR not
h m n N eq
p q r getColor -()Lcom/google/javascript/jscomp/colors/Color;
t u v w x )com/google/javascript/jscomp/colors/Color isUnion ()Z
t z { r subtractNullOrVoid
t } ~ x isPrimitive ? ? ? C ? 2com/google/javascript/jscomp/colors/StandardColors +Lcom/google/javascript/jscomp/colors/Color;
? ? ? ? ? java/lang/Object equals (Ljava/lang/Object;)Z
h ? ? N sheq
? ? ? ? ? %com/google/javascript/jscomp/NodeUtil getNumberValue 6(Lcom/google/javascript/rhino/Node;)Ljava/lang/Double;
? ? ? java/lang/Double
? ? ? ? booleanNode %(Z)Lcom/google/javascript/rhino/Node;
? ? ? isSafeNumber (Ljava/lang/Double;)Z
? ? ? ? doubleValue ()D
? ? ? x isNaN ? ? ? ? ? ;com/google/javascript/jscomp/J2clEqualitySameRewriterPass$1 :$SwitchMap$com$google$javascript$jscomp$NodeUtil$ValueType [I
? ? ? ? getKnownValueType U(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/jscomp/NodeUtil$ValueType;
? ? ? ? ? /com/google/javascript/jscomp/NodeUtil$ValueType ordinal ()I
? ? ? " canBeSideEffected ? java/lang/AssertionError ? Unknown ValueType
? ? ? (Ljava/lang/Object;)V
? ? x isCall
? ? :
getFirstChild ? Equality ? $same
? ? ? hasName I(Lcom/google/javascript/rhino/Node;Ljava/lang/String;Ljava/lang/String;)Z ? String ? 5m_equals__java_lang_String__java_lang_Object__boolean
? ? x isQualifiedName
? ? ? getOriginalQualifiedName ()Ljava/lang/String;
? ? ? ? ? java/lang/String endsWith (Ljava/lang/String;)Z
? ? ? ? contains (Ljava/lang/CharSequence;)Z Code LineNumberTable LocalVariableTable this ;Lcom/google/javascript/jscomp/J2clEqualitySameRewriterPass; MethodParameters compiler /Lcom/google/javascript/jscomp/AbstractCompiler; optimizeSubtree node "Lcom/google/javascript/rhino/Node; replacement
StackMapTable callNode firstExprValue RuntimeVisibleTypeAnnotations #Lorg/jspecify/annotations/Nullable; firstExpr
secondExpr secondExprValue expr nullExpression n color
firstValue Ljava/lang/Double; secondValue d fnName className Ljava/lang/String;
methodName
originalQname
SourceFile !J2clEqualitySameRewriterPass.java NestMembers InnerClasses NodeValue ValueType ! ] ? F
*? *? ? ? ! " ?
? ?
? ? J *+?
*+? ? ? ? &