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

Unified Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 1232463007: dart2js: Rename "current isolate" to "static state (holder)". (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments. Created 5 years, 5 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: pkg/compiler/lib/src/ssa/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index f866a0ff989f46e37a7c7f899aa2f7f93147f9cc..da8a4d9f8f597c6a2770dca850113d15a77ffdf4 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -4064,8 +4064,8 @@ class SsaBuilder extends ast.Visitor
if (!compiler.hasIsolateSupport) {
// If the isolate library is not used, we just generate code
- // to fetch the current isolate.
- String name = backend.namer.currentIsolate;
+ // to fetch the static state.
+ String name = backend.namer.staticStateHolder;
push(new HForeignCode(js.js.parseForeignJS(name),
backend.dynamicType,
<HInstruction>[]));
@@ -4331,13 +4331,13 @@ class SsaBuilder extends ast.Visitor
handleForeignRawFunctionRef(node, name);
}
- void handleForeignSetCurrentIsolate(ast.Send node) {
+ void handleForeignJsSetStaticState(ast.Send node) {
if (node.arguments.isEmpty || !node.arguments.tail.isEmpty) {
compiler.internalError(node.argumentsNode,
'Exactly one argument required.');
}
visit(node.arguments.head);
- String isolateName = backend.namer.currentIsolate;
+ String isolateName = backend.namer.staticStateHolder;
SideEffects sideEffects = new SideEffects.empty();
sideEffects.setAllSideEffects();
push(new HForeignCode(
@@ -4348,11 +4348,11 @@ class SsaBuilder extends ast.Visitor
effects: sideEffects));
}
- void handleForeignJsCurrentIsolate(ast.Send node) {
+ void handleForeignJsGetStaticState(ast.Send node) {
if (!node.arguments.isEmpty) {
compiler.internalError(node.argumentsNode, 'Too many arguments.');
}
- push(new HForeignCode(js.js.parseForeignJS(backend.namer.currentIsolate),
+ push(new HForeignCode(js.js.parseForeignJS(backend.namer.staticStateHolder),
backend.dynamicType,
<HInstruction>[]));
}
@@ -4369,10 +4369,10 @@ class SsaBuilder extends ast.Visitor
handleForeignDartClosureToJs(node, 'DART_CLOSURE_TO_JS');
} else if (name == 'RAW_DART_FUNCTION_REF') {
handleForeignRawFunctionRef(node, 'RAW_DART_FUNCTION_REF');
- } else if (name == 'JS_SET_CURRENT_ISOLATE') {
- handleForeignSetCurrentIsolate(node);
- } else if (name == 'JS_CURRENT_ISOLATE') {
- handleForeignJsCurrentIsolate(node);
+ } else if (name == 'JS_SET_STATIC_STATE') {
+ handleForeignJsSetStaticState(node);
+ } else if (name == 'JS_GET_STATIC_STATE') {
+ handleForeignJsGetStaticState(node);
} else if (name == 'JS_GET_NAME') {
handleForeignJsGetName(node);
} else if (name == 'JS_EMBEDDED_GLOBAL') {
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/program_builder/registry.dart ('k') | pkg/dart2js_incremental/lib/library_updater.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698