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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart

Issue 16135004: Rename JS_CURRENT_ISOLATE to JS_CURRENT_ISOLATE_CONTEXT. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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: dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart b/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
index 24dc706aa9a34a264f84eec26f52439645f080e6..3d949ce68fdd4a4e2a80125c7dbf848f3b1777af 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
@@ -9,9 +9,10 @@ import 'dart:_foreign_helper' show DART_CLOSURE_TO_JS,
JS,
JS_CALL_IN_ISOLATE,
JS_CURRENT_ISOLATE,
+ JS_CURRENT_ISOLATE_CONTEXT,
JS_DART_OBJECT_CONSTRUCTOR,
- JS_OPERATOR_IS_PREFIX,
JS_OPERATOR_AS_PREFIX,
+ JS_OPERATOR_IS_PREFIX,
RAW_DART_FUNCTION_REF;
import 'dart:_interceptors';
import "dart:_collection-dev" as _symbol_dev;
@@ -588,8 +589,7 @@ class Primitives {
if (JS('bool', '# == "num"', int)) return const JSNumber();
if (JS('bool', '# == "bool"', int)) return const JSBool();
if (JS('bool', '# == "List"', int)) return const JSArray();
- // TODO(ahe): How to safely access $?
- return JS('var', r'$[#]', className);
+ return JS('var', '#[#]', JS_CURRENT_ISOLATE(), className);
}
static bool identicalImplementation(a, b) {
@@ -944,7 +944,7 @@ convertDartClosureToJS(closure, int arity) {
// Capture the current isolate now. Remember that "#"
// in JS is simply textual substitution of compiled
// expressions.
- JS_CURRENT_ISOLATE(),
+ JS_CURRENT_ISOLATE_CONTEXT(),
DART_CLOSURE_TO_JS(invokeClosure));
JS('void', r'#.$identity = #', closure, function);

Powered by Google App Engine
This is Rietveld 408576698