Index: dart/frog/leg/emitter.dart |
diff --git a/dart/frog/leg/emitter.dart b/dart/frog/leg/emitter.dart |
index 0a057355f354104fdb30d5954b8b02904817f3b3..034a5aba9fbfc84b48a582f3d0b51cbf23395419 100644 |
--- a/dart/frog/leg/emitter.dart |
+++ b/dart/frog/leg/emitter.dart |
@@ -653,9 +653,11 @@ function(child, parent) { |
mainEnsureGetter = "$mainAccess.$invocationName = $mainAccess"; |
} |
- // TODO(ngeoffray): These globals are currently required by the isolate |
- // library, but since leg already generates code on an Isolate object, they |
- // are not really needed. We should remove them once Leg replaces Frog. |
+ if (compiler.isMockCompilation) return ""; |
+ |
+ // TODO(ngeoffray): These globals are currently required by the isolate |
+ // library, but since leg already generates code on an Isolate object, they |
+ // are not really needed. We should remove them once Leg replaces Frog. |
return """ |
var \$globalThis = $currentIsolate; |
var \$globalState; |
@@ -692,7 +694,9 @@ ${namer.isolateAccess(isolateMain)}($mainAccess);"""; |
compiler.isolateLibrary.find(Compiler.START_ROOT_ISOLATE); |
buffer.add(buildIsolateSetup(main, isolateMain)); |
} else { |
- buffer.add('${namer.isolateAccess(main)}();\n'); |
+ if (!compiler.isMockCompilation) { |
ngeoffray
2012/03/22 07:54:03
I would remove this check and the one line 656, to
ahe
2012/03/22 09:59:39
Done.
|
+ buffer.add('${namer.isolateAccess(main)}();\n'); |
+ } |
} |
compiler.assembledCode = buffer.toString(); |
}); |