Impl.getNameOf() no longer makes methods unprunnable. A recent patch marked methods referred to by Impl.getNameOf so that they are not inlined, devirtualized or prunned. Marking them as non prunnable is not really necessary for our current use cases, and Impl.getNameOf() documentation already states that it will return null for prunned methods. Change-Id: Ieedbece696d0d0132022483548b1bb99992fd3b4
diff --git a/dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java b/dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java index aecf722..542618f 100644 --- a/dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java +++ b/dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java
@@ -35,7 +35,6 @@ import com.google.gwt.dev.jjs.ast.JLocalRef; import com.google.gwt.dev.jjs.ast.JMethod; import com.google.gwt.dev.jjs.ast.JMethodCall; -import com.google.gwt.dev.jjs.ast.JNameOf; import com.google.gwt.dev.jjs.ast.JNewArray; import com.google.gwt.dev.jjs.ast.JNewInstance; import com.google.gwt.dev.jjs.ast.JNode; @@ -437,17 +436,6 @@ } @Override - public boolean visit(JNameOf x, Context ctx) { - if (x.getNode() == null) { - return true; - } - - assert x.getNode() instanceof JMethod; - rescue((JMethod) x.getNode()); - return true; - } - - @Override public boolean visit(JNewArray newArray, Context ctx) { // rescue and instantiate the array type JArrayType arrayType = newArray.getArrayType();
diff --git a/user/test/com/google/gwt/core/client/impl/ImplTest.java b/user/test/com/google/gwt/core/client/impl/ImplTest.java index 7f92f70..ca4be7d 100644 --- a/user/test/com/google/gwt/core/client/impl/ImplTest.java +++ b/user/test/com/google/gwt/core/client/impl/ImplTest.java
@@ -31,7 +31,7 @@ // A function that is not referenced and can be pruned very early in the compilation pipeline. public static String prunableFunction() { - return "Prunnable"; + return "Prunable"; } // A very simple function that will certainly be inlined away in optimized compiles. @@ -57,8 +57,6 @@ assertNotNull(foo.statifiableFunction(null)); assertNotNull(inlinableFunction()); assertNotNullNorEmpty( - Impl.getNameOf("@com.google.gwt.core.client.impl.ImplTest::prunableFunction()")); - assertNotNullNorEmpty( Impl.getNameOf("@com.google.gwt.core.client.impl.ImplTest::inlinableFunction()")); assertNotNullNorEmpty( Impl.getNameOf("@com.google.gwt.core.client.impl.ImplTest.Foo::statifiableFunction(*)")); @@ -71,10 +69,10 @@ return; } - String prunnableFnName = + String prunableFnName = Impl.getNameOf("@com.google.gwt.core.client.impl.ImplTest::prunableFunction()"); - assertTrue("Expecting 'prunableFunction' got '" + prunnableFnName + "'", - prunnableFnName.contains("prunableFunction")); + assertTrue("Expecting 'prunableFunction' or null got '" + prunableFnName + "'", + prunableFnName == null || prunableFnName.contains("prunableFunction")); String inlineableFnName = Impl.getNameOf("@com.google.gwt.core.client.impl.ImplTest::inlinableFunction()");