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

Unified Diff: frog/lib/corelib.dart

Issue 9111002: Fixes improper boxing in obj.dynamic (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 12 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 | « no previous file | frog/minfrog » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/lib/corelib.dart
diff --git a/frog/lib/corelib.dart b/frog/lib/corelib.dart
index 16c53d08aea2f1e08e7fa0f13a9b8491a48849fe..e1e9a863935bc36036422f266e49e31bbd53e07e 100644
--- a/frog/lib/corelib.dart
+++ b/frog/lib/corelib.dart
@@ -118,8 +118,10 @@ class Object native "Object" {
bool operator ==(Object other) native;
String toString() native;
- // TODO(jmesserly): optimize this. No need to call it.
- get dynamic() => this;
+ // TODO(jmesserly): optimize this. No need to call it, unless it's overridden.
+ // Notes: "use strict" prevents boxing.
+ // The Dart "return this" might help with type inference.
+ get dynamic() native '"use strict"; return this;' { return this; }
// TODO(jmesserly): add named args. For now stay compatible with the VM.
noSuchMethod(String name, List args) {
« no previous file with comments | « no previous file | frog/minfrog » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698