com.google.javascript.jscomp.OptimizeParameters$UnusedParameterOptimizer.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 Hcom/google/javascript/jscomp/OptimizeParameters$UnusedParameterOptimizer this$0 1Lcom/google/javascript/jscomp/OptimizeParameters;
java/lang/Object ()V java/util/ArrayList
toRemove Ljava/util/List; toReplaceWithZero
7com/google/javascript/jscomp/OptimizeCalls$ReferenceMap getFunctionNodes C(Ljava/util/List;)Lcom/google/common/collect/ImmutableListMultimap;
! " /com/google/common/collect/ImmutableListMultimap isEmpty ()Z
$ % & ' ( $com/google/common/base/Preconditions
checkState (Z)V * java/lang/Integer??? - java/util/BitSet
,
0 1 2 values 1()Lcom/google/common/collect/ImmutableCollection;
4 5 6 7 8 -com/google/common/collect/ImmutableCollection iterator 2()Lcom/google/common/collect/UnmodifiableIterator; : ; < = " java/util/Iterator hasNext : ? @ A next ()Ljava/lang/Object; C com/google/javascript/rhino/Node
E F G H I %com/google/javascript/jscomp/NodeUtil getFunctionParameters F(Lcom/google/javascript/rhino/Node;)Lcom/google/javascript/rhino/Node;
B K L M
getFirstChild $()Lcom/google/javascript/rhino/Node;
B O P " isUnusedParameter
, R S T set (I)V
B V W " isRest
Y Z [ \ ] java/lang/Math min (II)I
B _ ` M getNext
Y b c ] max
, e S f (II)V
, h i A clone
, k l f flip
, n o p cardinality ()I
r 7 s ()Ljava/util/Iterator;
u v w !isNormalOrOptChainCallOrNewTarget %(Lcom/google/javascript/rhino/Node;)Z
y z I %getFirstArgumentForCallOrNewOrDotCall
B | } " isSpread
, ? ? get (I)Z ? ? ? ? ? /com/google/javascript/jscomp/OptimizeParameters astAnalyzer *Lcom/google/javascript/jscomp/AstAnalyzer;
? ? ? ? w (com/google/javascript/jscomp/AstAnalyzer mayHaveSideEffects
? ? ? w alreadyRemoved
? ? ? recordRemovalCallArguments L(IILjava/util/BitSet;Ljava/util/BitSet;Lcom/google/javascript/rhino/Node;I)Z
? ? ? removeUnusedFunctionParameters 8(Ljava/util/BitSet;Lcom/google/javascript/rhino/Node;I)V
? ? w removeArgAndFollowing
E ? ? w isUndefined ? ? ? ? ? java/util/List add (Ljava/lang/Object;)Z
? ? ? recordReplaceWithZero %(Lcom/google/javascript/rhino/Node;)V
? ? ? removeFromCommaIfNoSideEffects
B ? ? " isComma
B ? ? M getSecondChild
B ? ? " isNumber
B ? ? ? getDouble ()D
B ? ? " isName ? ? ? ? compiler /Lcom/google/javascript/jscomp/AbstractCompiler;
? ? ? ? ? -com/google/javascript/jscomp/AbstractCompiler reportChangeToEnclosingScope
B ? ? M detach ? r
E ? ? ? markFunctionsDeleted T(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/AbstractCompiler;)V
? ? ? ? ? com/google/javascript/rhino/IR number %(D)Lcom/google/javascript/rhino/Node;
B ? ? I srcref
B ? ? ? replaceWith Signature 4Ljava/util/List; 4(Lcom/google/javascript/jscomp/OptimizeParameters;)V Code LineNumberTable LocalVariableTable this JLcom/google/javascript/jscomp/OptimizeParameters$UnusedParameterOptimizer; MethodParameters tryEliminateUnusedArgs (Ljava/util/ArrayList;)V c "Lcom/google/javascript/rhino/Node; paramList index I fn param
paramIndex n arg refs Ljava/util/ArrayList; fns 1Lcom/google/common/collect/ImmutableListMultimap; maxFormalsCount lowestUsedRest used Ljava/util/BitSet; unused unremovable lowestSpread removeAllAfterIndex LocalVariableTypeTable 9Ljava/util/ArrayList; wLcom/google/common/collect/ImmutableListMultimap;
StackMapTable <(Ljava/util/ArrayList;)V hasSideEffects Z isRemovableTrailingUndefined firstRestIndex removedAllTrailing secondChild
removedAll applyChanges
SourceFile OptimizeParameters.java NestHost InnerClasses UnusedParameterOptimizer *com/google/javascript/jscomp/OptimizeCalls ReferenceMap ? ? ? ? ? ? \ *+? *? *?
Y? ? *?
Y? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?+? M,? ? ? ? #>+6? ,Y? .:,? /? 3:? 9 ? d? > ? B:? D:6 ? J:
? 6?
? N? ! ? Q
? U? ? X6? ?
? ^:
??? `? a>???? ? d? g? ,:? j? ? m? ?? g? ,:+6+? q: ? 9 ? s ? > ? B:
? t? \
? x:6? M? ? D? {? ? X6? 0? ~? *? ? ?? ??
? Q? ^:???????? ? d+6 +? d6 +? q:
? 9 ? 9
? > ? B:? t? "? ?? ? x:* ? ?W???,? /? 3:
? 9 ? )
? > ? B:? D:? J:
*
? ???ӱ ? ? : ? ? ? ? ? # ? B ? I ? L ? X ? [ ? c ? j ? r ? { ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #<C
JPSYaelq??? ?#?%?&?'?(?)?* ? ? S 8 ? ?
I K ? ? L H ? ? B R ? ? ? R ? ? O ? ? ? a ? ?
? ? ? ? ' ? ? ? ? ? ? ? ?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? #? ? ? ?B ? ? ?" ? ? ? ? ? e ? ? ? ? ? ? ? ? ? ? ? ? ? @?
, : ? &