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

Unified Diff: sdk/lib/_internal/lib/js_mirrors.dart

Issue 246633006: Revert "JS templates" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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
« no previous file with comments | « sdk/lib/_internal/lib/js_helper.dart ('k') | tests/compiler/dart2js/js_parser_statements_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/lib/js_mirrors.dart
diff --git a/sdk/lib/_internal/lib/js_mirrors.dart b/sdk/lib/_internal/lib/js_mirrors.dart
index e2da31dbb38a44b226957697d5766d87b2a6eb00..1036bfdb25540a67d5e265feb3ca4b8c3aefdfed 100644
--- a/sdk/lib/_internal/lib/js_mirrors.dart
+++ b/sdk/lib/_internal/lib/js_mirrors.dart
@@ -1133,13 +1133,8 @@ class JsInstanceMirror extends JsObjectMirror implements InstanceMirror {
var interceptor = getInterceptor(object);
if (!useEval) return _newInterceptGetterNoEvalFn(name, interceptor);
String className = JS('String', '#.constructor.name', interceptor);
- String functionName = '$className\$$name';
- var body =
- '(function(i) {'
- ' function $functionName(o){return i.$name(o)}'
- ' return $functionName;'
- '})';
- return JS('', '(function(b){return eval(b)})(#)(#)', body, interceptor);
+ var body = "(function $className\$$name(o){return i.$name(o)})";
+ return JS('', '(function(b,i){return eval(b)})(#,#)', body, interceptor);
}
_newInterceptGetterNoEvalFn(n, i) => JS('',
« no previous file with comments | « sdk/lib/_internal/lib/js_helper.dart ('k') | tests/compiler/dart2js/js_parser_statements_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698