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

Unified Diff: lib/compiler/implementation/namer.dart

Issue 10855174: Lazy implementation of final variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments and move some code from compiler to backend. Created 8 years, 3 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: lib/compiler/implementation/namer.dart
diff --git a/lib/compiler/implementation/namer.dart b/lib/compiler/implementation/namer.dart
index e76ecbad75e1d18a8ab8a4e9da04e610d34d4c2c..9f2897df2698a4914bba7a95677308d725776916 100644
--- a/lib/compiler/implementation/namer.dart
+++ b/lib/compiler/implementation/namer.dart
@@ -273,6 +273,12 @@ class Namer {
}
}
+ String getLazyInitializerName(Element element) {
+ // TODO(floitsch): mangle while not conflicting with other statics.
+ assert(Elements.isStaticOrTopLevelField(element));
+ return "get\$${getName(element)}";
+ }
+
String isolatePropertiesAccess(Element element) {
return "$ISOLATE.$ISOLATE_PROPERTIES.${getName(element)}";
}
@@ -289,6 +295,10 @@ class Namer {
return '${isolateAccess(element)}\$bailout';
}
+ String isolateLazyInitializerAccess(Element element) {
+ return "$CURRENT_ISOLATE.${getLazyInitializerName(element)}";
+ }
+
String operatorIs(Element element) {
return 'is\$${getName(element)}';
}

Powered by Google App Engine
This is Rietveld 408576698