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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/emitter_no_eval.dart

Issue 11419119: Don't use 'new Function' for lazily initialized getter. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 | « sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/js_backend/emitter_no_eval.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/js_backend/emitter_no_eval.dart (revision 15244)
+++ sdk/lib/_internal/compiler/implementation/js_backend/emitter_no_eval.dart (working copy)
@@ -59,6 +59,18 @@
}""";
}
+ String get lazyInitializerFunction {
+ return """
+function(prototype, staticName, fieldName, getterName, lazyValue, getter) {
+$lazyInitializerLogic
+}""";
+ }
+
+ void emitLazyInitializedGetter(VariableElement element, CodeBuffer buffer) {
+ String isolate = namer.CURRENT_ISOLATE;
+ buffer.add(', function() { return $isolate.${namer.getName(element)}; }');
+ }
+
void emitBoundClosureClassHeader(String mangledName,
String superName,
String extraArgument,
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698