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

Unified Diff: pkg/compiler/lib/src/js_emitter/full_emitter/emitter.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/js_emitter/full_emitter/emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
index 00c7574fd00a4631f6f9ddda725edab16cf9426a..278e35661c8e03d148d0c0492dde83bc3eebed31 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
@@ -610,8 +610,7 @@ class Emitter implements js_emitter.Emitter {
OutputUnit outputUnit) {
jsAst.Statement buildInitialization(Element element,
jsAst.Expression initialValue) {
- // Note: `namer.currentIsolate` refers to the isolate properties here.
- return js.statement('${namer.currentIsolate}.# = #',
+ return js.statement('${namer.staticStateHolder}.# = #',
[namer.globalPropertyName(element), initialValue]);
}
@@ -1466,7 +1465,7 @@ class Emitter implements js_emitter.Emitter {
// We abuse the short name used for the isolate here to store
// the isolate properties. This is safe as long as the real isolate
// object does not exist yet.
- var ${namer.currentIsolate} = #isolatePropertiesName;
+ var ${namer.staticStateHolder} = #isolatePropertiesName;
// Constants in checked mode call into RTI code to set type information
// which may need getInterceptor (and one-shot interceptor) methods, so
@@ -1478,7 +1477,7 @@ class Emitter implements js_emitter.Emitter {
// constants to be set up.
#staticNonFinalInitializers;
- ${namer.currentIsolate} = null;
+ ${namer.staticStateHolder} = null;
#deferredBoilerPlate;
@@ -1488,7 +1487,7 @@ class Emitter implements js_emitter.Emitter {
#isolateName = $finishIsolateConstructorName(#isolateName);
- ${namer.currentIsolate} = new #isolateName();
+ ${namer.staticStateHolder} = new #isolateName();
#metadata;
@@ -1843,7 +1842,7 @@ function(originalDescriptor, name, holder, isStatic, globalFunctionsAccess) {
// Function for initializing a loaded hunk, given its hash.
#initializeLoadedHunk = function(hunkHash) {
$deferredInitializers[hunkHash](
- #globalsHolder, ${namer.currentIsolate});
+ #globalsHolder, ${namer.staticStateHolder});
#deferredInitialized[hunkHash] = true;
};
}
@@ -1952,9 +1951,9 @@ function(originalDescriptor, name, holder, isStatic, globalFunctionsAccess) {
..add(js.statement('${typesAccess}.push.apply(${typesAccess}, '
'${namer.deferredTypesName});'));
- // Set the currentIsolate variable to the current isolate (which is
- // provided as second argument).
- body.add(js.statement("${namer.currentIsolate} = arguments[1];"));
+ // Sets the static state variable to the state of the current isolate
+ // (which is provided as second argument).
+ body.add(js.statement("${namer.staticStateHolder} = arguments[1];"));
body.add(buildCompileTimeConstants(fragment.constants,
isMainFragment: false));
« no previous file with comments | « pkg/compiler/lib/src/js_backend/namer.dart ('k') | pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698