| 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('js_helper'); | 5 #library('js_helper'); |
| 6 | 6 |
| 7 #import('core.dart'); | |
| 8 | |
| 9 $throw(String msg) { | 7 $throw(String msg) { |
| 10 var e = JS("Object", @"new Error($0)", msg); | 8 var e = JS("Object", @"new Error($0)", msg); |
| 11 var hasTrace = JS("bool", @"Error.captureStackTrace !== (void 0)"); | 9 var hasTrace = JS("bool", @"Error.captureStackTrace !== (void 0)"); |
| 12 if (hasTrace) { | 10 if (hasTrace) { |
| 13 JS("void", @"Error.captureStackTrace($0)", e); | 11 JS("void", @"Error.captureStackTrace($0)", e); |
| 14 } | 12 } |
| 15 throw e; | 13 throw e; |
| 16 } | 14 } |
| 17 | 15 |
| 18 /** | 16 /** |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 return UNINTERCEPTED(receiver.charCodeAt(index)); | 288 return UNINTERCEPTED(receiver.charCodeAt(index)); |
| 291 } | 289 } |
| 292 } | 290 } |
| 293 | 291 |
| 294 builtin$isEmpty$0(var receiver) { | 292 builtin$isEmpty$0(var receiver) { |
| 295 if (receiver is String || isJSArray(receiver)) { | 293 if (receiver is String || isJSArray(receiver)) { |
| 296 return JS("bool", @"$0.length === 0", receiver); | 294 return JS("bool", @"$0.length === 0", receiver); |
| 297 } | 295 } |
| 298 return UNINTERCEPTED(receiver.isEmpty()); | 296 return UNINTERCEPTED(receiver.isEmpty()); |
| 299 } | 297 } |
| OLD | NEW |