Skip to content

Commit

Permalink
Deletes unused code.
Browse files Browse the repository at this point in the history
Change-Id: Ibaf4c6b8281f6ddf0b718a3dc7f1b194b093fa60
  • Loading branch information
stalcup committed Jan 9, 2015
1 parent c37e6ec commit 542135d
Show file tree
Hide file tree
Showing 31 changed files with 22 additions and 885 deletions.
Expand Up @@ -23,7 +23,7 @@
import com.google.gwt.dev.cfg.ConfigProps; import com.google.gwt.dev.cfg.ConfigProps;
import com.google.gwt.dev.cfg.ModuleDef; import com.google.gwt.dev.cfg.ModuleDef;
import com.google.gwt.dev.cfg.PropertyPermutations; import com.google.gwt.dev.cfg.PropertyPermutations;
import com.google.gwt.dev.cfg.Rules; import com.google.gwt.dev.cfg.Rule;
import com.google.gwt.dev.javac.CompilationState; import com.google.gwt.dev.javac.CompilationState;
import com.google.gwt.dev.javac.StandardGeneratorContext; import com.google.gwt.dev.javac.StandardGeneratorContext;
import com.google.gwt.dev.jdt.RebindOracle; import com.google.gwt.dev.jdt.RebindOracle;
Expand All @@ -35,6 +35,7 @@
import com.google.gwt.dev.util.log.speedtracer.SpeedTracerLogger; import com.google.gwt.dev.util.log.speedtracer.SpeedTracerLogger;
import com.google.gwt.dev.util.log.speedtracer.SpeedTracerLogger.Event; import com.google.gwt.dev.util.log.speedtracer.SpeedTracerLogger.Event;


import java.util.Deque;
import java.util.Set; import java.util.Set;


/** /**
Expand All @@ -57,7 +58,7 @@ public DistillerRebindPermutationOracle(CompilerContext compilerContext,
compilerContext, compilationState, generatorArtifacts, true); compilerContext, compilationState, generatorArtifacts, true);
BindingProperty[] orderedProps = perms.getOrderedProperties(); BindingProperty[] orderedProps = perms.getOrderedProperties();
ConfigProps config = new ConfigProps(module); ConfigProps config = new ConfigProps(module);
Rules rules = module.getRules(); Deque<Rule> rules = module.getRules();
for (int i = 0; i < rebindOracles.length; ++i) { for (int i = 0; i < rebindOracles.length; ++i) {
BindingProps props = new BindingProps(orderedProps, perms.getOrderedPropertyValues(i), config); BindingProps props = new BindingProps(orderedProps, perms.getOrderedPropertyValues(i), config);
rebindOracles[i] = new StandardRebindOracle(props.toPropertyOracle(), rules, rebindOracles[i] = new StandardRebindOracle(props.toPropertyOracle(), rules,
Expand Down
6 changes: 3 additions & 3 deletions dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java
Expand Up @@ -302,7 +302,7 @@ private static LinkedList<String> createExtendedCopy(LinkedList<String> list,


private boolean resourcesScanned; private boolean resourcesScanned;


private final Rules rules = new Rules(); private final Deque<Rule> rules = Lists.newLinkedList();


private final Scripts scripts = new Scripts(); private final Scripts scripts = new Scripts();


Expand Down Expand Up @@ -411,7 +411,7 @@ public void addRule(Rule rule) {
if (!attributeIsForTargetLibrary()) { if (!attributeIsForTargetLibrary()) {
return; return;
} }
getRules().prepend(rule); getRules().addFirst(rule);
} }


public void addSourcePackage(String sourcePackage, String[] includeList, String[] excludeList, public void addSourcePackage(String sourcePackage, String[] includeList, String[] excludeList,
Expand Down Expand Up @@ -795,7 +795,7 @@ public Set<Resource> getResourcesNewerThan(long modificationTime) {
/** /**
* Gets a reference to the internal rules for this module def. * Gets a reference to the internal rules for this module def.
*/ */
public synchronized Rules getRules() { public synchronized Deque<Rule> getRules() {
return rules; return rules;
} }


Expand Down
2 changes: 1 addition & 1 deletion dev/core/src/com/google/gwt/dev/cfg/ModuleDefSchema.java
Expand Up @@ -493,7 +493,7 @@ protected Schema __generate_with_begin(Class<? extends Generator> generator)
// Generator rebind rules for even distant dependencies are always considered primary since // Generator rebind rules for even distant dependencies are always considered primary since
// knowing whether they should be run is more complicated and is expected to be analyzed later // knowing whether they should be run is more complicated and is expected to be analyzed later
// during compilation. // during compilation.
moduleDef.getRules().prepend(rule); moduleDef.getRules().addFirst(rule);
return new FullConditionSchema(rule.getRootCondition()); return new FullConditionSchema(rule.getRootCondition());
} }


Expand Down
48 changes: 0 additions & 48 deletions dev/core/src/com/google/gwt/dev/cfg/Rules.java

This file was deleted.

19 changes: 0 additions & 19 deletions dev/core/src/com/google/gwt/dev/jjs/Correlation.java
Expand Up @@ -20,7 +20,6 @@
import com.google.gwt.dev.jjs.ast.JMethod; import com.google.gwt.dev.jjs.ast.JMethod;


import java.io.Serializable; import java.io.Serializable;
import java.util.Comparator;


/** /**
* Each SourceInfo may define one or more axes by which it can be correlated * Each SourceInfo may define one or more axes by which it can be correlated
Expand Down Expand Up @@ -84,24 +83,6 @@ public String getDescription() {
} }
} }


/**
* Compares Correlations based on axis and idents. Note that due to inherent
* limitations of mapping AST nodes into Strings, this Comparator may not
* always agree with {@link Correlation#equals(Object)}.
*/
public static final Comparator<Correlation> AXIS_IDENT_COMPARATOR =
new Comparator<Correlation>() {
@Override
public int compare(Correlation a, Correlation b) {
int r = a.axis.compareTo(b.axis);
if (r != 0) {
return r;
}

return a.ident.compareTo(b.ident);
}
};

/** /**
* This may contain a reference to either a Java or Js AST node. * This may contain a reference to either a Java or Js AST node.
*/ */
Expand Down
Expand Up @@ -28,7 +28,6 @@
import com.google.gwt.dev.cfg.Rule; import com.google.gwt.dev.cfg.Rule;
import com.google.gwt.dev.cfg.RuleGenerateWith; import com.google.gwt.dev.cfg.RuleGenerateWith;
import com.google.gwt.dev.cfg.RuleReplaceWithFallback; import com.google.gwt.dev.cfg.RuleReplaceWithFallback;
import com.google.gwt.dev.cfg.Rules;
import com.google.gwt.dev.cfg.RuntimeRebindRegistratorGenerator; import com.google.gwt.dev.cfg.RuntimeRebindRegistratorGenerator;
import com.google.gwt.dev.cfg.RuntimeRebindRuleGenerator; import com.google.gwt.dev.cfg.RuntimeRebindRuleGenerator;
import com.google.gwt.dev.javac.CompilationUnit; import com.google.gwt.dev.javac.CompilationUnit;
Expand Down Expand Up @@ -69,6 +68,7 @@


import java.io.File; import java.io.File;
import java.util.Collection; import java.util.Collection;
import java.util.Deque;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
Expand Down Expand Up @@ -347,7 +347,7 @@ void buildRuntimeRebindRegistrator(Set<String> allRootTypes) throws UnableToComp
} }


@VisibleForTesting @VisibleForTesting
void buildSimpleRuntimeRebindRules(Rules rules) throws UnableToCompleteException { void buildSimpleRuntimeRebindRules(Deque<Rule> rules) throws UnableToCompleteException {
// Create rebinders for rules specified in the module. // Create rebinders for rules specified in the module.
Iterator<Rule> iterator = rules.iterator(); Iterator<Rule> iterator = rules.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
Expand Down
9 changes: 0 additions & 9 deletions dev/core/src/com/google/gwt/dev/jjs/impl/EnumOrdinalizer.java
Expand Up @@ -197,15 +197,6 @@ public void logEnumsNotOrdinalized(TreeLogger logger, TreeLogger.Type logType) {
} }
} }


public void logEnumsOrdinalized(TreeLogger logger, TreeLogger.Type logType) {
if (logger != null && allEnumsOrdinalized.size() > 0) {
logger = logger.branch(logType, "Enums Ordinalized:");
for (String enumOrdinalized : allEnumsOrdinalized) {
logger.branch(logType, enumOrdinalized);
}
}
}

public void logEnumsOrdinalizedPerPass(TreeLogger logger, TreeLogger.Type logType) { public void logEnumsOrdinalizedPerPass(TreeLogger logger, TreeLogger.Type logType) {
if (logger == null) { if (logger == null) {
return; return;
Expand Down
Expand Up @@ -147,13 +147,6 @@ public boolean isLiveInFragment(Fragment fragment, JMethod method) {
return isLiveInFragment(fragmentForMethod, method, fragment); return isLiveInFragment(fragmentForMethod, method, fragment);
} }


/**
* Determine whether a string is live in a fragment.
*/
public boolean isLiveInFragment(Fragment fragment, String string) {
return isLiveInFragment(fragmentForString, string, fragment);
}

/** /**
* Determine whether a type is live in a fragment. * Determine whether a type is live in a fragment.
*/ */
Expand Down

This file was deleted.

5 changes: 0 additions & 5 deletions dev/core/src/com/google/gwt/dev/js/JsStaticEval.java
Expand Up @@ -46,7 +46,6 @@
import com.google.gwt.dev.js.ast.JsValueLiteral; import com.google.gwt.dev.js.ast.JsValueLiteral;
import com.google.gwt.dev.js.ast.JsVars; import com.google.gwt.dev.js.ast.JsVars;
import com.google.gwt.dev.js.ast.JsVars.JsVar; import com.google.gwt.dev.js.ast.JsVars.JsVar;
import com.google.gwt.dev.js.ast.JsVisitable;
import com.google.gwt.dev.js.ast.JsVisitor; import com.google.gwt.dev.js.ast.JsVisitor;
import com.google.gwt.dev.js.ast.JsWhile; import com.google.gwt.dev.js.ast.JsWhile;
import com.google.gwt.dev.js.rhino.ScriptRuntime; import com.google.gwt.dev.js.rhino.ScriptRuntime;
Expand Down Expand Up @@ -886,10 +885,6 @@ public JsStaticEval(JsProgram program) {
this.program = program; this.program = program;
} }


public <T extends JsVisitable> T execImpl(T node) {
return new StaticEvalVisitor().accept(node);
}

public OptimizerStats execImpl() { public OptimizerStats execImpl() {
StaticEvalVisitor sev = new StaticEvalVisitor(); StaticEvalVisitor sev = new StaticEvalVisitor();
sev.accept(program); sev.accept(program);
Expand Down
Expand Up @@ -22,14 +22,15 @@
import com.google.gwt.dev.PrecompileTaskOptionsImpl; import com.google.gwt.dev.PrecompileTaskOptionsImpl;
import com.google.gwt.dev.RebindCache; import com.google.gwt.dev.RebindCache;
import com.google.gwt.dev.cfg.ModuleDef; import com.google.gwt.dev.cfg.ModuleDef;
import com.google.gwt.dev.cfg.Rules; import com.google.gwt.dev.cfg.Rule;
import com.google.gwt.dev.javac.CompilationState; import com.google.gwt.dev.javac.CompilationState;
import com.google.gwt.dev.javac.StandardGeneratorContext; import com.google.gwt.dev.javac.StandardGeneratorContext;
import com.google.gwt.dev.util.log.speedtracer.DevModeEventType; import com.google.gwt.dev.util.log.speedtracer.DevModeEventType;
import com.google.gwt.dev.util.log.speedtracer.SpeedTracerLogger; import com.google.gwt.dev.util.log.speedtracer.SpeedTracerLogger;
import com.google.gwt.dev.util.log.speedtracer.SpeedTracerLogger.Event; import com.google.gwt.dev.util.log.speedtracer.SpeedTracerLogger.Event;


import java.io.File; import java.io.File;
import java.util.Deque;


/** /**
* Provides an environment for a {@link com.google.gwt.dev.shell.ModuleSpace} * Provides an environment for a {@link com.google.gwt.dev.shell.ModuleSpace}
Expand Down Expand Up @@ -104,7 +105,7 @@ public void onModuleReady(ModuleSpace readySpace)
// Set up the rebind oracle for the module. // Set up the rebind oracle for the module.
// It has to wait until now because we need to inject javascript. // It has to wait until now because we need to inject javascript.
// //
Rules rules = module.getRules(); Deque<Rule> rules = module.getRules();
PrecompileTaskOptionsImpl options = new PrecompileTaskOptionsImpl(); PrecompileTaskOptionsImpl options = new PrecompileTaskOptionsImpl();
options.setGenDir(genDir); options.setGenDir(genDir);
CompilerContext compilerContext = CompilerContext compilerContext =
Expand Down
Expand Up @@ -25,14 +25,14 @@
import com.google.gwt.core.ext.linker.ArtifactSet; import com.google.gwt.core.ext.linker.ArtifactSet;
import com.google.gwt.dev.RebindCache; import com.google.gwt.dev.RebindCache;
import com.google.gwt.dev.cfg.Rule; import com.google.gwt.dev.cfg.Rule;
import com.google.gwt.dev.cfg.Rules;
import com.google.gwt.dev.javac.CachedGeneratorResultImpl; import com.google.gwt.dev.javac.CachedGeneratorResultImpl;
import com.google.gwt.dev.javac.StandardGeneratorContext; import com.google.gwt.dev.javac.StandardGeneratorContext;
import com.google.gwt.dev.jdt.RebindOracle; import com.google.gwt.dev.jdt.RebindOracle;
import com.google.gwt.dev.util.log.speedtracer.DevModeEventType; import com.google.gwt.dev.util.log.speedtracer.DevModeEventType;
import com.google.gwt.dev.util.log.speedtracer.SpeedTracerLogger; import com.google.gwt.dev.util.log.speedtracer.SpeedTracerLogger;
import com.google.gwt.dev.util.log.speedtracer.SpeedTracerLogger.Event; import com.google.gwt.dev.util.log.speedtracer.SpeedTracerLogger.Event;


import java.util.Deque;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.Map; import java.util.Map;
Expand Down Expand Up @@ -243,9 +243,9 @@ private String processCacheableResult(TreeLogger logger, Rule rule, String typeN


private RebindCache rebindCache = null; private RebindCache rebindCache = null;


private final Rules rules; private final Deque<Rule> rules;


public StandardRebindOracle(PropertyOracle propOracle, Rules rules, public StandardRebindOracle(PropertyOracle propOracle, Deque<Rule> rules,
StandardGeneratorContext genCtx) { StandardGeneratorContext genCtx) {
this.propOracle = propOracle; this.propOracle = propOracle;
this.rules = rules; this.rules = rules;
Expand Down
7 changes: 0 additions & 7 deletions dev/core/src/com/google/gwt/dev/util/HtmlTextOutput.java
Expand Up @@ -62,11 +62,4 @@ public void printOpt(String s) {
public void printRaw(String s) { public void printRaw(String s) {
super.print(s); super.print(s);
} }

/**
* Print unescaped data into the output.
*/
public void printRawOpt(String s) {
super.printOpt(s);
}
} }
4 changes: 0 additions & 4 deletions dev/core/src/com/google/gwt/dev/util/OutputFileSet.java
Expand Up @@ -37,10 +37,6 @@ protected OutputFileSet(String pathDescription) {
this.pathDescription = pathDescription; this.pathDescription = pathDescription;
} }


public boolean alreadyContains(String path) {
return pathsSeen.contains(path);
}

/** /**
* No more output will be sent to this OutputFileSet. It is safe to call * No more output will be sent to this OutputFileSet. It is safe to call
* {@link #close()} on an already-closed instance. * {@link #close()} on an already-closed instance.
Expand Down
10 changes: 0 additions & 10 deletions dev/core/src/com/google/gwt/dev/util/PerfCounter.java
Expand Up @@ -82,16 +82,6 @@ protected Map<String, Long> initialValue() {
private static final Map<String, OperationStats> operationStats = private static final Map<String, OperationStats> operationStats =
new HashMap<String, OperationStats>(); new HashMap<String, OperationStats>();


/**
* Record the end of the operation.
*/
public static void end(String operation) {
if (!enabled) {
return;
}
end(operation, 1 * 1000000000 /* 1 sec */);
}

/** /**
* Record the end of the operation. * Record the end of the operation.
*/ */
Expand Down

0 comments on commit 542135d

Please sign in to comment.