| 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('coreimpl.dart'); | 7 #import('coreimpl.dart'); |
| 8 | 8 |
| 9 #source('constant_map.dart'); | 9 #source('constant_map.dart'); |
| 10 #source('date_helper.dart'); | 10 #source('date_helper.dart'); |
| (...skipping 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1378 String toString() => "Closure"; | 1378 String toString() => "Closure"; |
| 1379 } | 1379 } |
| 1380 | 1380 |
| 1381 bool jsHasOwnProperty(var jsObject, String property) { | 1381 bool jsHasOwnProperty(var jsObject, String property) { |
| 1382 return JS('bool', @'$0.hasOwnProperty($1)', jsObject, property); | 1382 return JS('bool', @'$0.hasOwnProperty($1)', jsObject, property); |
| 1383 } | 1383 } |
| 1384 | 1384 |
| 1385 jsPropertyAccess(var jsObject, String property) { | 1385 jsPropertyAccess(var jsObject, String property) { |
| 1386 return JS('var', @'$0[$1]', jsObject, property); | 1386 return JS('var', @'$0[$1]', jsObject, property); |
| 1387 } | 1387 } |
| 1388 |
| 1389 |
| 1390 // Called at the end of unaborted switch cases to get the (unique) |
| 1391 // FallThroughError exception that will be thrown. |
| 1392 FallThroughError fallThroughErrorInstance = null; |
| 1393 getFallThroughError() { |
| 1394 // TODO(lrn): Redo when we support "const FallThroughError()". |
| 1395 if (fallThroughErrorInstance === null) { |
| 1396 fallThroughErrorInstance = new FallThroughError(); |
| 1397 } |
| 1398 return fallThroughErrorInstance; |
| 1399 } |
| OLD | NEW |