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

Unified Diff: frog/leg/compiler.dart

Issue 9702074: Add support for capturing and changing the current isolate in the closure wrapper. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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/leg/compiler.dart
===================================================================
--- frog/leg/compiler.dart (revision 5637)
+++ frog/leg/compiler.dart (working copy)
@@ -180,9 +180,11 @@
void enableIsolateSupport(LibraryElement element) {
isolateLibrary = element;
- addToWorkList(element.find(START_ROOT_ISOLATE));
+ addToWorkList(element.find(START_ROOT_ISOLATE));
}
+ bool hasIsolateSupport() => isolateLibrary !== null;
+
void onLibraryLoaded(LibraryElement library, Uri uri) {
if (uri.toString() == 'dart:isolate') {
enableIsolateSupport(library);
@@ -219,6 +221,10 @@
const SourceString('UNINTERCEPTED'), library), this);
library.define(new ForeignElement(
const SourceString('JS_HAS_EQUALS'), library), this);
+ library.define(new ForeignElement(
+ const SourceString('JS_CURRENT_ISOLATE'), library), this);
+ library.define(new ForeignElement(
+ const SourceString('JS_CALL_IN_ISOLATE'), library), this);
}
void runCompiler(Uri uri) {

Powered by Google App Engine
This is Rietveld 408576698