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

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
« no previous file with comments | « frog/corejs.dart ('k') | frog/leg/lib/core.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/gen.dart
diff --git a/frog/gen.dart b/frog/gen.dart
index 52e0ba5a90f9ad260290529bf428ecf12c317958..1af4307645b41e474888d8c71d77f09ffd4f1dd7 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698