| Index: compiler/java/com/google/dart/compiler/backend/js/ClosureJsBackend.java
|
| ===================================================================
|
| --- compiler/java/com/google/dart/compiler/backend/js/ClosureJsBackend.java (revision 350)
|
| +++ compiler/java/com/google/dart/compiler/backend/js/ClosureJsBackend.java (working copy)
|
| @@ -490,7 +490,7 @@
|
| * due to the renaming.
|
| */
|
| options.setReplaceIdGenerators(false);
|
| -
|
| +
|
| return options;
|
| }
|
|
|
| @@ -551,6 +551,8 @@
|
| // Add a declarations for the V8 logging function.
|
| private static final String UNIT_TEST_EXTERN_STUBS = "var write;";
|
|
|
| + private static final String CLOSURE_PRIMITIVES = "function JSCompiler_renameProperty() {};";
|
| +
|
| // TODO(johnlenz): include json.js in the default set of externs.
|
| private static final String MISSING_EXTERNS =
|
| "var JSON = {};\n" +
|
| @@ -615,6 +617,9 @@
|
| // Add methods used when running the unit tests.
|
| externs.add(JSSourceFile.fromCode("unitTestStubs", UNIT_TEST_EXTERN_STUBS));
|
|
|
| + // Add methods used by Closure Compiler itself.
|
| + externs.add(JSSourceFile.fromCode("closureCompilerPrimitives", CLOSURE_PRIMITIVES));
|
| +
|
| return externs;
|
| }
|
|
|
| @@ -646,4 +651,9 @@
|
| protected boolean shouldOptimize() {
|
| return (fastOutput) ? false : true;
|
| }
|
| +
|
| + @Override
|
| + protected boolean generateClosureCompatibleCode() {
|
| + return true;
|
| + }
|
| }
|
|
|