com.google.javascript.jscomp.PhaseOptimizer.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!
???? 7A
java/lang/Object ()V
+com/google/javascript/jscomp/PhaseOptimizer printAstHashcodes Z compiler /Lcom/google/javascript/jscomp/AbstractCompiler;
-com/google/javascript/jscomp/AbstractCompiler getJsRoot $()Lcom/google/javascript/rhino/Node; jsRoot "Lcom/google/javascript/rhino/Node; tracker 1Lcom/google/javascript/jscomp/PerformanceTracker; java/util/ArrayList
# $ % passes Ljava/util/List; ' ( inLoop * + ,
lastChange I
. / 0
getOptions 0()Lcom/google/javascript/jscomp/CompilerOptions; 2 3 4 5 ,com/google/javascript/jscomp/CompilerOptions &useSizeHeuristicToStopOptimizationLoop 3 2 8 9 , optimizationLoopMaxIterations 8 < 0com/google/javascript/jscomp/PhaseOptimizer$Loop
; > ? 0(Lcom/google/javascript/jscomp/PhaseOptimizer;)V A B C D E java/util/List iterator ()Ljava/util/Iterator; G H I J K java/util/Iterator hasNext ()Z G M N O next ()Ljava/lang/Object; Q (com/google/javascript/jscomp/PassFactory
P S T K isRunInFixedPointLoop
; V W X
addLoopedPass -(Lcom/google/javascript/jscomp/PassFactory;)V
; Z [ K isPopulated A ] ^ _ add (Ljava/lang/Object;)Z
a b X addOneTimePass d 5com/google/javascript/jscomp/PhaseOptimizer$NamedPass
c f g Z(Lcom/google/javascript/jscomp/PhaseOptimizer;Lcom/google/javascript/jscomp/PassFactory;)V i j k
validityCheck *Lcom/google/javascript/jscomp/PassFactory; m +com/google/javascript/jscomp/ChangeVerifier
l o p 2(Lcom/google/javascript/jscomp/AbstractCompiler;)V
l r s t snapshot Q(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/jscomp/ChangeVerifier; v w x changeVerifier -Lcom/google/javascript/jscomp/ChangeVerifier; z )com/google/javascript/jscomp/CompilerPass
| } ~ K %com/google/javascript/jscomp/Platform isThreadInterrupted ? java/lang/RuntimeException ? java/lang/InterruptedException
?
? ? ? (Ljava/lang/Throwable;)V y ? ? ? process G(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)V
? ? K hasHaltingErrors
? ? ? toSource 6(Lcom/google/javascript/rhino/Node;)Ljava/lang/String;
? ? ? ? ? java/lang/String hashCode ()I ? ? ? makeConcatWithConstants '(Ljava/lang/String;I)Ljava/lang/String; ? ? ? logger Ljava/util/logging/Logger;
? ? ? ? ? java/util/logging/Logger info (Ljava/lang/String;)V
P ? ? ? create \(Lcom/google/javascript/jscomp/AbstractCompiler;)Lcom/google/javascript/jscomp/CompilerPass;
l ? ? ? checkRecordedChanges 7(Ljava/lang/String;Lcom/google/javascript/rhino/Node;)V ? java/lang/IllegalStateException ? ? ? &(Ljava/lang/String;)Ljava/lang/String;
? ? ? *(Ljava/lang/String;Ljava/lang/Throwable;)V
? ? ? ? lastRuns Ljava/util/Map; ? ? ? currentPass 7Lcom/google/javascript/jscomp/PhaseOptimizer$NamedPass; ? ? ? ? ?
java/util/Map get &(Ljava/lang/Object;)Ljava/lang/Object; ? java/lang/Integer
? ? ? ? intValue
? ? ? ? ? com/google/javascript/rhino/Node
getChangeTime
? ? ? ? ? java/lang/Class getName ()Ljava/lang/String;
? ? ? ? getLogger .(Ljava/lang/String;)Ljava/util/logging/Logger; ? &com/google/javascript/jscomp/PassNames ? peepholeOptimizations
? ? ? ? ? 'com/google/common/collect/ImmutableList of =(Ljava/lang/Object;)Lcom/google/common/collect/ImmutableList; ? ? ? CODE_REMOVING_PASSES )Lcom/google/common/collect/ImmutableList; Signature =Ljava/util/List; [Ljava/util/Map;
START_TIME
ConstantValue =Lcom/google/common/collect/ImmutableList; MAX_LOOPS d OPTIMIZE_LOOP_ERROR Ljava/lang/String; ? ;Fixed point loop exceeded the maximum number of iterations. c(Lcom/google/javascript/jscomp/AbstractCompiler;Lcom/google/javascript/jscomp/PerformanceTracker;)V Code LineNumberTable LocalVariableTable this -Lcom/google/javascript/jscomp/PhaseOptimizer; comp
maxIterations
StackMapTable ? /com/google/javascript/jscomp/PerformanceTracker MethodParameters consume (Ljava/util/List;)V factory factories currentLoop 2Lcom/google/javascript/jscomp/PhaseOptimizer$Loop; LocalVariableTypeTable ; ?(Ljava/util/List;)V RuntimeInvisibleAnnotations 1Lcom/google/common/annotations/VisibleForTesting; addFixedPointLoop 4()Lcom/google/javascript/jscomp/PhaseOptimizer$Loop; loop setValidityCheck setPrintAstHashcodes (Z)V pass +Lcom/google/javascript/jscomp/CompilerPass; externs root maybePrintAstHashcodes hashCodeMsg passName maybeRunValidityCheck Y(Ljava/lang/String;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;)V e Ljava/lang/RuntimeException; hasScopeChanged %(Lcom/google/javascript/rhino/Node;)Z n
timeOfLastRun
SourceFile PhaseOptimizer.java NestMembers& 9com/google/javascript/jscomp/PhaseOptimizer$ProgressRange( ?com/google/javascript/jscomp/PhaseOptimizer$ScopedChangeHandler* 1com/google/javascript/jscomp/PhaseOptimizer$State BootstrapMethods-
./0 ?1 $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;3 AST hashCode after : 5 "Validity checks failed for pass: InnerClasses Loop NamedPass
ProgressRange ScopedChangeHandler State= %java/lang/invoke/MethodHandles$Lookup? java/lang/invoke/MethodHandles Lookup y ? ? $ % ? ? ( j k ? ? ? ? ? ? + , ? , ? ? 5 w x ? ? ? ? ? , ? ? ? ? ? ? 9 , ? ? ? \*? *? *+?
*+? ? *,? *? Y? !? "*? &*? )*+? -? 1? 6+? -? 7>? d? *? :? *d? :? ? > W * X Y Z [ &