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

Unified Diff: pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart

Issue 784843002: Move isolateStaticClosureAccess and isolateLazyInitializerAccess from namer to emitter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/new_emitter/emitter.dart ('k') | pkg/compiler/lib/src/ssa/codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
index c9c45db4bcd1b9dff0a598f75989424ea1484efc..b429495122bb9b9332d8a176daa666445ecd3cbb 100644
--- a/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
@@ -181,6 +181,16 @@ class OldEmitter implements Emitter {
return '$initName.$global';
}
+ jsAst.Expression isolateLazyInitializerAccess(Element element) {
+ return jsAst.js('#.#', [namer.globalObjectFor(element),
+ namer.getLazyInitializerName(element)]);
+ }
+
+ jsAst.Expression isolateStaticClosureAccess(Element element) {
+ return jsAst.js('#.#()',
+ [namer.globalObjectFor(element), namer.getStaticClosureName(element)]);
+ }
+
jsAst.PropertyAccess globalPropertyAccess(Element element) {
String name = namer.getNameX(element);
jsAst.PropertyAccess pa = new jsAst.PropertyAccess.field(
@@ -1063,7 +1073,7 @@ class OldEmitter implements Emitter {
/// `function(args) { $.startRootIsolate(X.main$closure(), args); }`
jsAst.Expression buildIsolateSetupClosure(Element appMain,
Element isolateMain) {
- jsAst.Expression mainAccess = namer.isolateStaticClosureAccess(appMain);
+ jsAst.Expression mainAccess = isolateStaticClosureAccess(appMain);
// Since we pass the closurized version of the main method to
// the isolate method, we must make sure that it exists.
return js('function(a){ #(#, a); }',
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/new_emitter/emitter.dart ('k') | pkg/compiler/lib/src/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698