| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #library('dart:_interceptors'); | 5 #library('dart:_interceptors'); |
| 6 | 6 |
| 7 #import('coreimpl.dart'); | 7 #import('dart:coreimpl'); |
| 8 #import('js_helper.dart'); | |
| 9 | 8 |
| 10 add$1(var receiver, var value) { | 9 add$1(var receiver, var value) { |
| 11 if (isJsArray(receiver)) { | 10 if (isJsArray(receiver)) { |
| 12 checkGrowable(receiver, 'add'); | 11 checkGrowable(receiver, 'add'); |
| 13 JS('Object', @'#.push(#)', receiver, value); | 12 JS('Object', @'#.push(#)', receiver, value); |
| 14 return; | 13 return; |
| 15 } | 14 } |
| 16 return UNINTERCEPTED(receiver.add(value)); | 15 return UNINTERCEPTED(receiver.add(value)); |
| 17 } | 16 } |
| 18 | 17 |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 } else if (receiver is String) { | 658 } else if (receiver is String) { |
| 660 return getOrCreateCachedRuntimeType('String'); | 659 return getOrCreateCachedRuntimeType('String'); |
| 661 } else if (receiver is double) { | 660 } else if (receiver is double) { |
| 662 return getOrCreateCachedRuntimeType('double'); | 661 return getOrCreateCachedRuntimeType('double'); |
| 663 } else if (receiver is List) { | 662 } else if (receiver is List) { |
| 664 return getOrCreateCachedRuntimeType('List'); | 663 return getOrCreateCachedRuntimeType('List'); |
| 665 } else { | 664 } else { |
| 666 return UNINTERCEPTED(receiver.runtimeType()); | 665 return UNINTERCEPTED(receiver.runtimeType()); |
| 667 } | 666 } |
| 668 } | 667 } |
| OLD | NEW |