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

Unified Diff: frog/gen.dart

Issue 9422019: isolates refactor: this change introduces 'dart:isolate' as a library. This is a (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: '' Created 8 years, 10 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: frog/gen.dart
diff --git a/frog/gen.dart b/frog/gen.dart
index 9ab557f04aaeca6c8a2455de6b009f911888b212..a4e89d7472b1922f60b7cd576d18cd87ebf93bac 100644
--- a/frog/gen.dart
+++ b/frog/gen.dart
@@ -89,21 +89,13 @@ class WorldGenerator {
}
}
- // Only include isolate-specific code if isolates are used.
- if (world.corelib.types['Isolate'].isUsed
- || world.coreimpl.types['ReceivePortImpl'].isUsed) {
-
- // Generate callbacks from JS to isolate code if needed
- if (corejs.useWrap0 || corejs.useWrap1) {
- genMethod(world.coreimpl.types['IsolateContext'].getMember('eval'));
- genMethod(world.coreimpl.types['EventLoop'].getMember('run'));
- }
-
+ // Only wrap the app as an isolate if the isolate library was imported.
+ if (world.isolatelib != null) {
corejs.useIsolates = true;
MethodMember isolateMain =
- world.coreimpl.lookup('startRootIsolate', main.span);
- var isolateMainTarget = new TypeValue(world.coreimpl.topType, main.span);
- mainCall = isolateMain.invoke(mainContext, null, isolateMainTarget,
+ world.isolatelib.lookup('startRootIsolate', main.span);
+ mainCall = isolateMain.invoke(mainContext, null,
+ new TypeValue(world.isolatelib.topType, main.span),
new Arguments(null, [main._get(mainContext, main.definition, null)]));
}
« no previous file with comments | « frog/corejs.dart ('k') | frog/leg/lib/core.dart » ('j') | lib/isolate/isolate_api.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698