 Chromium Code Reviews
 Chromium Code Reviews Issue 10534089:
  Add experimental expando support.  (Closed) 
  Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
    
  
    Issue 10534089:
  Add experimental expando support.  (Closed) 
  Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart| Index: lib/compiler/implementation/lib/js_helper.dart | 
| diff --git a/lib/compiler/implementation/lib/js_helper.dart b/lib/compiler/implementation/lib/js_helper.dart | 
| index 41c663ca082d9bc6e611831d4aac0799ac2da9c2..69c3823d6015c98351e67cceb814a64ad6364377 100644 | 
| --- a/lib/compiler/implementation/lib/js_helper.dart | 
| +++ b/lib/compiler/implementation/lib/js_helper.dart | 
| @@ -567,6 +567,22 @@ class Primitives { | 
| if (value.isNaN()) throw new IllegalArgumentException(str); | 
| return value; | 
| } | 
| + | 
| + static getProperty(object, key) { | 
| + checkNull(object); | 
| + if (object is bool || object is num || object is String) { | 
| 
sra1
2012/06/12 07:10:26
This predicate is in the wrong place.  A public AP
 | 
| + throw new IllegalArgumentException(object); | 
| + } | 
| + return JS('var', '#[#]', object, key); | 
| + } | 
| + | 
| + static void setProperty(object, key, value) { | 
| + checkNull(object); | 
| + if (object is bool || object is num || object is String) { | 
| 
sra1
2012/06/12 07:10:26
Ditto.
 | 
| + throw new IllegalArgumentException(object); | 
| + } | 
| + JS('void', '#[#] = #', object, key, value); | 
| + } | 
| } | 
| /** |