A swapped division in revision 2290 effectively disabled JsInliner's check for whether a method is too large to inline. Re-enabling the check causes output size for Showcase and QueWeb to go back down about 3%.
Review by: scottb
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@2863 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/js/JsInliner.java b/dev/core/src/com/google/gwt/dev/js/JsInliner.java
index d6ae5ac..dc2b7b8 100644
--- a/dev/core/src/com/google/gwt/dev/js/JsInliner.java
+++ b/dev/core/src/com/google/gwt/dev/js/JsInliner.java
@@ -940,7 +940,7 @@
*/
int originalComplexity = complexity(x);
int inlinedComplexity = complexity(op);
- double ratio = ((double) originalComplexity) / inlinedComplexity;
+ double ratio = ((double) inlinedComplexity) / originalComplexity;
if (ratio > MAX_COMPLEXITY_INCREASE && isInvokedMoreThanOnce(f)) {
return;
}
@@ -979,6 +979,7 @@
private static class InvocationCountingVisitor extends JsVisitor {
private final Map<JsFunction, Integer> invocationCount = new IdentityHashMap<JsFunction, Integer>();
+ @Override
public void endVisit(JsInvocation x, JsContext<JsExpression> ctx) {
JsFunction function = isFunction(x.getQualifier());
if (function != null) {