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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/ssa/builder.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/ssa/builder.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart b/dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
index 2afe47ab02aa27fb6cec379acfc621d7ca99cd3b..db516033b1b8d9c0afd3e5ce5bf560e7c7f5f2e0 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
@@ -2969,10 +2969,10 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
return;
}
- void handleForeignJsCurrentIsolate(Send node) {
+ void handleForeignJsCurrentIsolateContext(Send node) {
if (!node.arguments.isEmpty) {
compiler.cancel(
- 'Too many arguments to JS_CURRENT_ISOLATE', node: node);
+ 'Too many arguments to JS_CURRENT_ISOLATE_CONTEXT', node: node);
}
if (!compiler.hasIsolateSupport()) {
@@ -3091,13 +3091,22 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
<HInstruction>[]));
}
+ void handleForeignJsCurrentIsolate(Send node) {
+ if (!node.arguments.isEmpty) {
+ compiler.cancel('Too many arguments', node: node.argumentsNode);
+ }
+ push(new HForeign(new js.LiteralString(backend.namer.CURRENT_ISOLATE),
+ HType.UNKNOWN,
+ <HInstruction>[]));
+ }
+
visitForeignSend(Send node) {
Selector selector = elements.getSelector(node);
SourceString name = selector.name;
if (name == const SourceString('JS')) {
handleForeignJs(node);
- } else if (name == const SourceString('JS_CURRENT_ISOLATE')) {
- handleForeignJsCurrentIsolate(node);
+ } else if (name == const SourceString('JS_CURRENT_ISOLATE_CONTEXT')) {
+ handleForeignJsCurrentIsolateContext(node);
} else if (name == const SourceString('JS_CALL_IN_ISOLATE')) {
handleForeignJsCallInIsolate(node);
} else if (name == const SourceString('DART_CLOSURE_TO_JS')) {
@@ -3114,6 +3123,8 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
stack.add(addConstantString(node, backend.namer.operatorAsPrefix()));
} else if (name == const SourceString('JS_DART_OBJECT_CONSTRUCTOR')) {
handleForeignDartObjectJsConstructorFunction(node);
+ } else if (name == const SourceString('JS_CURRENT_ISOLATE')) {
+ handleForeignJsCurrentIsolate(node);
} else {
throw "Unknown foreign: ${selector}";
}

Powered by Google App Engine
This is Rietveld 408576698