Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart

Issue 11574032: Make unit testing of the compiler work with the new isolate helper library. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/lib/foreign_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (revision 16793)
+++ sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (working copy)
@@ -1873,35 +1873,14 @@
Element isolateMain) {
String mainAccess = "${namer.isolateAccess(appMain)}";
String currentIsolate = "${namer.CURRENT_ISOLATE}";
- String mainEnsureGetter = '';
// Since we pass the closurized version of the main method to
// the isolate method, we must make sure that it exists.
if (!compiler.codegenWorld.staticFunctionsNeedingGetter.contains(appMain)) {
Selector selector = new Selector.callClosure(0);
String invocationName = "${namer.closureInvocationName(selector)}";
- mainEnsureGetter = "$mainAccess.$invocationName = $mainAccess";
+ buffer.add("$mainAccess.$invocationName = $mainAccess");
}
- // TODO(ngeoffray): These globals are currently required by the isolate
- // library. They should be removed.
- buffer.add("""
-var \$globalThis = $currentIsolate;
-var \$globalState;
-var \$globals;
-var \$isWorker = false;
-var \$supportsWorkers = false;
-var \$thisScriptUrl;
-function \$static_init(){};
-
-function \$initGlobals(context) {
- context.isolateStatics = new ${namer.isolateName}();
-}
-function \$setGlobals(context) {
- $currentIsolate = context.isolateStatics;
- \$globalThis = $currentIsolate;
-}
-$mainEnsureGetter
-""");
- return "${namer.isolateAccess(isolateMain)}($mainAccess)";
+ return "${namer.isolateAccess(isolateMain)}($mainAccess)";
}
emitMain(CodeBuffer buffer) {
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/lib/foreign_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698