com.google.javascript.jscomp.CheckSuper.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"
java/lang/Object ()V java/util/ArrayDeque
'com/google/javascript/jscomp/CheckSuper contextStack Ljava/util/ArrayDeque; compiler /Lcom/google/javascript/jscomp/AbstractCompiler;
*com/google/javascript/jscomp/NodeTraversal traverse ?(Lcom/google/javascript/jscomp/AbstractCompiler;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/NodeTraversal$Callback;)V
isEmpty ()Z
! " # 'com/google/common/collect/ImmutableList of =(Ljava/lang/Object;)Lcom/google/common/collect/ImmutableList;
% & ' ( ) $com/google/common/base/Preconditions
checkState (ZLjava/lang/Object;)V + , - . / )com/google/javascript/jscomp/CheckSuper$1 ,$SwitchMap$com$google$javascript$rhino$Token [I
1 2 3 4 5 com/google/javascript/rhino/Node getToken %()Lcom/google/javascript/rhino/Token;
7 8 9 : ; !com/google/javascript/rhino/Token ordinal ()I
% = ( > (Z)V @ >com/google/javascript/jscomp/CheckSuper$SuperNotAllowedContext
? B C %(Lcom/google/javascript/rhino/Node;)V
E F G push (Ljava/lang/Object;)V
I J K peek ()Ljava/lang/Object; M /com/google/javascript/jscomp/CheckSuper$Context
O P Q getContextForFunctionNode ?(Lcom/google/javascript/jscomp/CheckSuper$Context;Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/jscomp/CheckSuper$Context;
S T U createMemberFieldDefContext U(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/jscomp/CheckSuper$Context;
W X Y Z [ %com/google/javascript/jscomp/NodeUtil isClassStaticBlock %(Lcom/google/javascript/rhino/Node;)Z
] ^ U createStaticBlockContext
W ` a [ isMethodDeclaration
W c d [ isEs6Constructor f :com/google/javascript/jscomp/CheckSuper$ConstructorContext
e B i 5com/google/javascript/jscomp/CheckSuper$MethodContext
h B
1 l m isArrowFunction
L o p U getContextForArrowFunctionNode
% r s t checkNotNull &(Ljava/lang/Object;)Ljava/lang/Object;
v w [ isSuperConstructorCall
y z [ isSuperPropertyAccess
L | } ~ visitSuperPropertyAccess Q(Lcom/google/javascript/jscomp/NodeTraversal;Lcom/google/javascript/rhino/Node;)V ? ? ? INVALID_SUPER_USAGE -Lcom/google/javascript/jscomp/DiagnosticType; ? java/lang/String
? ? ? report e(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/DiagnosticType;[Ljava/lang/String;)V
1 ? ? ?
getFirstChild $()Lcom/google/javascript/rhino/Node;
1 ? ? isSuper
L ? ? ~ visitSuperConstructorCall
L ? ? ~ visitThis
L ? ? ~ visitReturn
? ? ; size
L ? ? ? getContextNode
L ? ? ? visitContextNode /(Lcom/google/javascript/jscomp/NodeTraversal;)V
? ? K pop
1 ? ? ? getParent
1 ? ? isCall
1 ? ? [ isFirstChildOf
W ? ? [ isNormalGet ? Icom/google/javascript/jscomp/CheckSuper$SuperPropertyAccessAllowedContext
? B ? JSC_MISSING_CALL_TO_SUPER ? (constructor is missing a call to super()
? ? ? ? ? +com/google/javascript/jscomp/DiagnosticType error S(Ljava/lang/String;Ljava/lang/String;)Lcom/google/javascript/jscomp/DiagnosticType; ? ? ? MISSING_CALL_TO_SUPER ? JSC_THIS_BEFORE_SUPER ? )cannot access this before calling super() ? ? ? THIS_BEFORE_SUPER ? )JSC_SUPER_ACCESS_BEFORE_SUPER_CONSTRUCTOR ? 5cannot access super properties before calling super() ? ? ? %SUPER_ACCESS_BEFORE_SUPER_CONSTRUCTOR ? JSC_INVALID_SUPER_CALL ? ;super() not allowed except in the constructor of a subclass ? ? ? INVALID_SUPER_CALL ? JSC_SUPER_CALL_IN_ARROW ? Eclosure-compiler does not allow calls to `super()` in arrow functions ? ? ? SUPER_CALL_IN_ARROW ? JSC_INVALID_SUPER_USAGE ? 7''super'' may only be used in a call or property access ? JSC_INVALID_SUPER_ACCESS ? .''super'' may only be accessed within a method ? ? ? INVALID_SUPER_ACCESS ? &JSC_INVALID_SUPER_CALL_WITH_SUGGESTION ? 1super() not allowed here. Did you mean super.{0}? ? ? ? "INVALID_SUPER_CALL_WITH_SUGGESTION ? )com/google/javascript/jscomp/CompilerPass ? 3com/google/javascript/jscomp/NodeTraversal$Callback Signature ILjava/util/ArrayDeque; 2(Lcom/google/javascript/jscomp/AbstractCompiler;)V Code LineNumberTable LocalVariableTable this )Lcom/google/javascript/jscomp/CheckSuper; MethodParameters process G(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)V externs "Lcom/google/javascript/rhino/Node; root shouldTraverse s(Lcom/google/javascript/jscomp/NodeTraversal;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)Z currentContext 1Lcom/google/javascript/jscomp/CheckSuper$Context;
newContext fieldContext t ,Lcom/google/javascript/jscomp/NodeTraversal; n parent
StackMapTable fn visit s(Lcom/google/javascript/jscomp/NodeTraversal;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)V callee superNode fieldNode staticBlock
SourceFile CheckSuper.java NestMembers ?com/google/javascript/jscomp/CheckSuper$ConstructorArrowContext InnerClasses Callback SuperNotAllowedContext Context ConstructorContext
MethodContext !SuperPropertyAccessAllowedContext ConstructorArrowContext 0 ? ?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
? ? U *? *? Y? ?
*+? ? ? T _ U V ? ? ? ? ? ? ? a *? ,*? *?
? *?
? ? $? ? [ \ ] ? ? ? ? ? ? ? ] ?? *,? 0? 6.? ? ! = e x ?*?
? ? <*?
? ?Y,? A? D? X*?
? H? L:*,? N:? *?
? D? 0*,? R:*?
? D? ,? V? *,? \:*?
? D? ? ? F c , e 6 f E g H k T l ] m d n m q p s w t ? u ? w ? x ? y ? z ? ? ? R T ] w ? ? ? ? ? ?
? ,$ ?
P Q ? ? 8,? _? ,? b? ? eY,? g?? hY,? j?,? k? +,? n? ? ?Y,? A? ? " ? ? ? ? ? ' ? / ? 7 ? ? 8 ? ? 8 8
G L ?
? ? ?*?
? H? L? q? L:? *,? 0? 6.? ? ? ? ? ? ? 3 _ x ?*,? u? ? g*,? x?
+,? {? U+,? ? ?? ?? F,? ?:? ?? 8+? ?? -+,? ?? #+,? ?? *?
? ?? ? ?