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

Unified Diff: sdk/lib/_internal/compiler/js_lib/js_names.dart

Issue 957343002: Make use of __proto__ when available. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Comments Created 5 years, 9 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/compiler/js_lib/js_mirrors.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/js_lib/js_names.dart
diff --git a/sdk/lib/_internal/compiler/js_lib/js_names.dart b/sdk/lib/_internal/compiler/js_lib/js_names.dart
index 3933e787245a3b25727d7a977dd0d5c52a1b49bb..87cc6c04eea97bdddc5e4322a1513dcacf728283 100644
--- a/sdk/lib/_internal/compiler/js_lib/js_names.dart
+++ b/sdk/lib/_internal/compiler/js_lib/js_names.dart
@@ -79,14 +79,7 @@ Map<String, String> computeReflectiveNames(Map<String, String> map) {
@NoInline()
List extractKeys(victim) {
- var result = JS('', '''
-(function(victim, hasOwnProperty) {
- var result = [];
- for (var key in victim) {
- if (hasOwnProperty.call(victim, key)) result.push(key);
- }
- return result;
-})(#, Object.prototype.hasOwnProperty)''', victim);
+ var result = JS('', '# ? Object.keys(#) : []', victim, victim);
return new JSArray.markFixed(result);
}
« no previous file with comments | « sdk/lib/_internal/compiler/js_lib/js_mirrors.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698