com.google.javascript.jscomp.JSChunkGraph.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!
???? 7S
java/util/Arrays asList %([Ljava/lang/Object;)Ljava/util/List;
)com/google/javascript/jscomp/JSChunkGraph (Ljava/util/List;)V
java/lang/Object ()V 7com/google/javascript/jscomp/base/LinkedIdentityHashMap
dependencyMap 9Lcom/google/javascript/jscomp/base/LinkedIdentityHashMap; java/util/List isEmpty ()Z
! " # $ $com/google/common/base/Preconditions
checkState (Z)V
& ' (
makeWeakChunk "(Ljava/util/List;)Ljava/util/List; * + , size ()I . $com/google/javascript/jscomp/JSChunk 0 1 2 chunks '[Lcom/google/javascript/jscomp/JSChunk; 4 5 6 get (I)Ljava/lang/Object;
- 8 9 , getIndex ; Chunk index already set: %s
= # > ((ZLjava/lang/String;Ljava/lang/Object;)V
- @ A B setIndex (I)V
D E F initChunksByDepth ()Ljava/util/List; H I J
chunksByDepth Ljava/util/List;
L M N initTransitiveDepsBitSets ()[Ljava/util/BitSet; P Q R selfPlusTransitiveDeps [Ljava/util/BitSet;
T U V initSubtreeSize ()[I X Y Z subtreeSize [I \ $weak$
^ _ ` getChunkByName :(Ljava/lang/String;)Lcom/google/javascript/jscomp/JSChunk;
b c d getAllInputs ()Ljava/lang/Iterable;
f g h moveMarkedWeakSources =(Lcom/google/javascript/jscomp/JSChunk;Ljava/lang/Iterable;)V j java/util/ArrayList
i
- m n , getDepth p Chunk depth already set: %s
- r s t getDependencies +()Lcom/google/common/collect/ImmutableList;
v w x y z 'com/google/common/collect/ImmutableList iterator 2()Lcom/google/common/collect/UnmodifiableIterator; | } ~ java/util/Iterator hasNext | ? ? ? next ()Ljava/lang/Object; ? Bcom/google/javascript/jscomp/JSChunkGraph$ChunkDependenceException ? .Chunks not in dependency order: %s preceded %s
- ? ? ? getName ()Ljava/lang/String;
? ? ? ? ? 5com/google/javascript/jscomp/base/format/SimpleFormat format 9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
? ? ? a(Ljava/lang/String;Lcom/google/javascript/jscomp/JSChunk;Lcom/google/javascript/jscomp/JSChunk;)V
? ? ? ? ? java/lang/Math max (II)I
- ? ? B setDepth ? ? ? add (Ljava/lang/Object;)Z ? y ? ()Ljava/util/Iterator;
? ? ? ? ? java/lang/String equals ? java/util/LinkedHashSet
? ? ? (Ljava/util/Collection;)V ? ? ? ? ?
java/util/Set remove
- ? ? ? getAllDependencies ()Ljava/util/Set; ? ? ? ? containsAll (Ljava/util/Collection;)Z ? HA weak chunk already exists but it does not depend on every other chunk.
? # ? (ZLjava/lang/Object;)V ? * ? .The weak chunk cannot have extra dependencies.
- ? ? t getInputs ? *com/google/javascript/jscomp/CompilerInput
? ? ? ?
getSourceFile +()Lcom/google/javascript/jscomp/SourceFile;
? ? ? ? 'com/google/javascript/jscomp/SourceFile isWeak
? ? ? ? ? makeConcatWithConstants 8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; ? java/lang/StringBuilder ? 3A weak chunk exists but some sources are misplaced.
? ? ? (Ljava/lang/String;)V ? 1
Found these strong sources in the weak chunk:
? ? ? ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; ?
? ? ? ? ? com/google/common/base/Joiner on 3(Ljava/lang/String;)Lcom/google/common/base/Joiner;
? ? ? ? join ((Ljava/lang/Iterable;)Ljava/lang/String; ? -
Found these weak sources in other chunks:
? java/lang/IllegalStateException
? ? ? ? toString
? ?
- ?
- ? ? ?
addDependency )(Lcom/google/javascript/jscomp/JSChunk;)V
i ? ? java/util/BitSet
? B
? B set
? or (Ljava/util/BitSet;)V
?
previousSetBit (I)I apply #()Lcom/google/common/base/Function;
#com/google/common/collect/Iterables transform K(Ljava/lang/Iterable;Lcom/google/common/base/Function;)Ljava/lang/Iterable;
concat *(Ljava/lang/Iterable;)Ljava/lang/Iterable;
- ,
getInputCount java/util/LinkedHashMap
"#$%&
java/util/Map put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;( java/lang/Iterable
*+, getOnlyElement ((Ljava/lang/Iterable;)Ljava/lang/Object;. com/google/gson/JsonArray
-
12 d getAllChunks' ?5 com/google/gson/JsonObject
4 8 name: com/google/gson/JsonPrimitive
9 ?
4= ?> 2(Ljava/lang/String;Lcom/google/gson/JsonElement;)V@ dependencies
-B ?C (Lcom/google/gson/JsonElement;)VE transitive-dependencies
GHI getTransitiveDepsDeepestFirst 8(Lcom/google/javascript/jscomp/JSChunk;)Ljava/util/List;K inputs
?M 5N (I)Z
?
?QR (IIZ)V
?TU
nextSetBit
?WX ? min
?Z[ and] !No common dependency found for %s
?_` andNot
bcd dependsOn O(Lcom/google/javascript/jscomp/JSChunk;Lcom/google/javascript/jscomp/JSChunk;)Z
fgh getDeepestCommonDependency t(Lcom/google/javascript/jscomp/JSChunk;Lcom/google/javascript/jscomp/JSChunk;)Lcom/google/javascript/jscomp/JSChunk;j ?k java/util/Collection
mnh #getDeepestCommonDependencyInclusive pqrst @com/google/javascript/jscomp/JSChunkGraph$InverseDepthComparator INSTANCE BLcom/google/javascript/jscomp/JSChunkGraph$InverseDepthComparator;
vwx getTransitiveDeps 7(Lcom/google/javascript/jscomp/JSChunk;)Ljava/util/Set;
pz{|
sortedCopy &(Ljava/lang/Iterable;)Ljava/util/List; ~ ()Ljava/util/function/Function;
??? computeIfAbsent C(Ljava/lang/Object;Ljava/util/function/Function;)Ljava/lang/Object;
??? checkNotNull &(Ljava/lang/Object;)Ljava/lang/Object;
v??? copyOf ?(Ljava/lang/Iterable;)Lcom/google/common/collect/ImmutableList;
???? getChunk (()Lcom/google/javascript/jscomp/JSChunk;
-? ?? /(Lcom/google/javascript/jscomp/CompilerInput;)V
-? ??? 4com/google/javascript/jscomp/deps/SortedDependencies
?
??? createEntryPointInputs ?(Lcom/google/javascript/jscomp/AbstractCompiler;Lcom/google/javascript/jscomp/DependencyOptions;Ljava/lang/Iterable;Lcom/google/javascript/jscomp/deps/SortedDependencies;)Ljava/util/Set;
???? getKnownProvides 1()Lcom/google/common/collect/ImmutableCollection;
? w? -com/google/common/collect/ImmutableCollection ~
?
? 5? ? ?
???? getPath =()Lcom/google/javascript/jscomp/deps/ModuleLoader$ModulePath;
???? ? 9com/google/javascript/jscomp/deps/ModuleLoader$ModulePath toModuleName ~
??? t getDynamicRequires
?? ? containsKey ??? ? addAll
??? t getRequireDynamicImports
???? .com/google/javascript/jscomp/DependencyOptions
shouldSort
???? getStrongDependenciesOf <(Ljava/util/List;Z)Lcom/google/common/collect/ImmutableList;
????? ,com/google/common/collect/LinkedListMultimap create 0()Lcom/google/common/collect/LinkedListMultimap; ? ????%? &com/google/common/collect/ListMultimap '(Ljava/lang/Object;Ljava/lang/Object;)Z
-?? removeAll
?
??? shouldPrune?? 5? $(Ljava/lang/Object;)Ljava/util/List;
??? getDepthFirstDependenciesOf \(Lcom/google/javascript/jscomp/CompilerInput;Ljava/util/Set;Ljava/util/Map;)Ljava/util/List; ? ??? ? contains ??? *WEAK_FILE_REACHABLE_FROM_ENTRY_POINT_ERROR -Lcom/google/javascript/jscomp/DiagnosticType;
????? $com/google/javascript/jscomp/JSError make h(Lcom/google/javascript/jscomp/DiagnosticType;[Ljava/lang/String;)Lcom/google/javascript/jscomp/JSError;
????? -com/google/javascript/jscomp/AbstractCompiler report )(Lcom/google/javascript/jscomp/JSError;)V
??? ? setChunk?
???? getSortedWeakDependenciesOf ;(Ljava/util/List;)Lcom/google/common/collect/ImmutableList; ?? 7com/google/javascript/rhino/StaticSourceFile$SourceKind WEAK 9Lcom/google/javascript/rhino/StaticSourceFile$SourceKind;
? setKind <(Lcom/google/javascript/rhino/StaticSourceFile$SourceKind;)V
? ?
-
getByName @(Ljava/lang/String;)Lcom/google/javascript/jscomp/CompilerInput;
v
builder 3()Lcom/google/common/collect/ImmutableList$Builder;
? /com/google/common/collect/ImmutableList$Builder G(Ljava/lang/Iterable;)Lcom/google/common/collect/ImmutableList$Builder;
t build
? t getRequiredSymbols"?"?
getChunksByName ()Ljava/util/Map;" goog
?$%& maybeGetInputProviding F(Ljava/lang/String;)Lcom/google/javascript/jscomp/deps/DependencyInfo;
?() shouldDropMoochers
?+, t getInputsWithoutProvides ./? IMPLICIT_WEAK_ENTRY_POINT_ERROR
?12 t getEntryPoints4 -com/google/javascript/jscomp/ModuleIdentifier
367 ? getClosureNamespace
39: ?
getModuleName
3 ?
?=>& getInputProviding@ ?com/google/javascript/jscomp/JSChunkGraph$MissingChunkException
? ?
?CD ? overrideModuleF Lcom/google/javascript/jscomp/deps/SortedDependencies$MissingProvideException
EH I *(Ljava/lang/String;Ljava/lang/Exception;)V KL? EXPLICIT_WEAK_ENTRY_POINT_ERROR
N?O -(Ljava/util/Collection;Ljava/lang/Iterable;)Z
QRS?T 6com/google/javascript/jscomp/graph/LinkedDirectedGraph :()Lcom/google/javascript/jscomp/graph/LinkedDirectedGraph;
QVWX
createNode ^(Ljava/lang/Object;)Lcom/google/javascript/jscomp/graph/LinkedDirectedGraph$LinkedDiGraphNode;Z ->
Q\]^ connect 9(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V
?`ab compareTo (Ljava/lang/String;)Id .JSC_WEAK_FILE_REACHABLE_FROM_ENTRY_POINT_ERRORf AFile strongly reachable from an entry point must not be weak: {0}
hijkl +com/google/javascript/jscomp/DiagnosticType error S(Ljava/lang/String;Ljava/lang/String;)Lcom/google/javascript/jscomp/DiagnosticType;n #JSC_EXPLICIT_WEAK_ENTRY_POINT_ERRORp 0Explicit entry point input must not be weak: {0}r #JSC_IMPLICIT_WEAK_ENTRY_POINT_ERRORt 2Implicit entry point input should not be weak: {0}
hvwl warningy java/io/Serializable Signature JLjava/util/List;>; ?Lcom/google/javascript/jscomp/base/LinkedIdentityHashMap;>; *([Lcom/google/javascript/jscomp/JSChunk;)V Code LineNumberTable LocalVariableTable this +Lcom/google/javascript/jscomp/JSChunkGraph; chunksInDepOrder MethodParameters chunk &Lcom/google/javascript/jscomp/JSChunk;
chunkIndex I LocalVariableTypeTable 8Ljava/util/List;
StackMapTable ;(Ljava/util/List;)V depDepth dep depth tmpChunksByDepth L()Ljava/util/List;>; allOtherChunks Ljava/util/Set; input ,Lcom/google/javascript/jscomp/CompilerInput; isWeakChunk Z sb Ljava/lang/StringBuilder; misplacedWeakFiles misplacedStrongFiles weakChunk hasWeakChunk 7Ljava/util/Set; $Ljava/util/List; r(Ljava/util/List;)Ljava/util/List; Ljava/util/BitSet; array R
requiredIndex dependentIndex Z D()Ljava/lang/Iterable; count 2 >()Ljava/lang/Iterable; m Ljava/lang/String; RuntimeVisibleTypeAnnotations #Lorg/jspecify/annotations/Nullable; result Ljava/util/Map; ILjava/util/Map; K()Ljava/util/Map;
getChunkCount getRootChunk toJson ()Lcom/google/gson/JsonArray; node Lcom/google/gson/JsonObject; deps Lcom/google/gson/JsonArray; transitiveDeps RuntimeInvisibleAnnotations /Lcom/google/common/annotations/GwtIncompatible; value com.google.gson src getSmallestCoveringSubtree `(Lcom/google/javascript/jscomp/JSChunk;Ljava/util/BitSet;)Lcom/google/javascript/jscomp/JSChunk; candidatePlusTransitiveDeps candidateIndex
parentTree dependentChunks minDependentChunkIndex
candidates parentTreeIndex bestCandidateIndex i
chunksAtDepth m1 m2 m1Depth m2Depth >(Ljava/util/Collection;)Lcom/google/javascript/jscomp/JSChunk; Ljava/util/Collection; iter Ljava/util/Iterator; >Ljava/util/Collection; ; f(Ljava/util/Collection;)Lcom/google/javascript/jscomp/JSChunk; `(Lcom/google/javascript/jscomp/JSChunk;)Ljava/util/List; 1Lcom/google/common/annotations/VisibleForTesting; _(Lcom/google/javascript/jscomp/JSChunk;)Ljava/util/Set;
existingChunk Ljava/lang/Iterable; allInputs )Lcom/google/common/collect/ImmutableList; BLjava/lang/Iterable; WLcom/google/common/collect/ImmutableList; k(Lcom/google/javascript/jscomp/JSChunk;Ljava/lang/Iterable;)V manageDependencies ?(Lcom/google/javascript/jscomp/AbstractCompiler;Lcom/google/javascript/jscomp/DependencyOptions;)Lcom/google/common/collect/ImmutableList; provide chunkName require
entryPoint orderedInput inputsNotYetReached transitiveClosure oldChunk
weakInputs compiler /Lcom/google/javascript/jscomp/AbstractCompiler; dependencyOptions 0Lcom/google/javascript/jscomp/DependencyOptions; originalInputs sorter 6Lcom/google/javascript/jscomp/deps/SortedDependencies; entryPointInputs inputsByProvide Ljava/util/LinkedHashMap;
absoluteOrder entryPointInputsPerChunk (Lcom/google/common/collect/ListMultimap;
orderedInputs
reachedInputs 1Lcom/google/common/collect/ImmutableList$Builder; =Ljava/util/Set; >Ljava/util/List; dLcom/google/javascript/jscomp/deps/SortedDependencies; jLjava/util/LinkedHashMap;>; |Lcom/google/common/collect/ListMultimap; _Lcom/google/common/collect/ImmutableList$Builder;
Exceptions ?(Lcom/google/javascript/jscomp/AbstractCompiler;Lcom/google/javascript/jscomp/DependencyOptions;)Lcom/google/common/collect/ImmutableList; importedNamespace rootInput unreachedInputs `Ljava/util/Map;>; (Lcom/google/javascript/jscomp/CompilerInput;Ljava/util/Set;Ljava/util/Map;>;)Ljava/util/List; entryPointInput e NLcom/google/javascript/jscomp/deps/SortedDependencies$MissingProvideException; /Lcom/google/javascript/jscomp/ModuleIdentifier; baseJs chunksByNameD(Lcom/google/javascript/jscomp/AbstractCompiler;Lcom/google/javascript/jscomp/DependencyOptions;Ljava/lang/Iterable;Lcom/google/javascript/jscomp/deps/SortedDependencies;)Ljava/util/Set; toGraphvizGraph graphViz 8Lcom/google/javascript/jscomp/graph/LinkedDirectedGraph; rLcom/google/javascript/jscomp/graph/LinkedDirectedGraph; t()Lcom/google/javascript/jscomp/graph/LinkedDirectedGraph; depthCompare O(Lcom/google/javascript/jscomp/JSChunk;Lcom/google/javascript/jscomp/JSChunk;)I d1 d2 lambda$manageDependencies$1 #(Ljava/lang/String;)Ljava/util/Set; k lambda$manageDependencies$0
SourceFile JSChunkGraph.java NestMembers BootstrapMethods$
%&' ?( $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;* (in chunk ),
-./01 "java/lang/invoke/LambdaMetafactory metafactory ?(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;? ?5 Q(Lcom/google/javascript/jscomp/JSChunk;)Lcom/google/common/collect/ImmutableList; ?x9
:=
> InnerClasses ChunkDependenceException InverseDepthComparatorC .com/google/javascript/jscomp/deps/ModuleLoader
ModulePathF ,com/google/javascript/rhino/StaticSourceFile
SourceKind Builder MissingChunkException MissingProvideExceptionL Hcom/google/javascript/jscomp/graph/LinkedDirectedGraph$LinkedDiGraphNode LinkedDiGraphNodeO %java/lang/invoke/MethodHandles$LookupQ java/lang/invoke/MethodHandles Lookup 1 x ?? L? /? 1 2 Q R Y Z I J z { z | } ~ A *+? ? ?
l m? ?? ? 2 ? ? ~ P ?*?
*? Y? ? +? ? ? ? *+? %L*+? ) ? -? /=*? /?? 3+? 3 ? -N-? 7? ? :-? <-? ?*? /-S????**? C? G**? K? O**? S? W*[? ]*? a? e? B p g q r &