Fix SOYC-related slowdown in non-SOYC compiles.

Patch by: bobv
Review by: spoon


git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@3694 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java b/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java
index 7fdb9ae..4eca433 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java
@@ -464,8 +464,9 @@
    * itself.
    */
   public SourceInfo createSourceInfoSynthetic(String description) {
-    return createSourceInfo(0, SourceInfoJava.findCaller()).makeChild(
-        description);
+    String caller = enableSourceInfoDescendants ? SourceInfoJava.findCaller()
+        : "Unknown caller";
+    return createSourceInfo(0, caller).makeChild(description);
   }
 
   public JReferenceType generalizeTypes(
diff --git a/dev/core/src/com/google/gwt/dev/js/ast/JsProgram.java b/dev/core/src/com/google/gwt/dev/js/ast/JsProgram.java
index 1677b1b..a649e4c 100644
--- a/dev/core/src/com/google/gwt/dev/js/ast/JsProgram.java
+++ b/dev/core/src/com/google/gwt/dev/js/ast/JsProgram.java
@@ -71,7 +71,9 @@
   }
 
   public SourceInfo createSourceInfoSynthetic(String description) {
-    return createSourceInfo(0, SourceInfoJs.findCaller()).makeChild(description);
+    String caller = enableSourceInfoDescendants ? SourceInfoJs.findCaller()
+        : "Unknown caller";
+    return createSourceInfo(0, caller).makeChild(description);
   }
 
   public JsBooleanLiteral getBooleanLiteral(boolean truth) {