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

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

Issue 11778064: Cleanup the isolate library to pave the way for web worker support. (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
Index: sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (revision 16903)
+++ 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) {

Powered by Google App Engine
This is Rietveld 408576698