| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 import "dart:math"; | 5 import "dart:math"; |
| 6 import "dart:typed_data"; | 6 import "dart:typed_data"; |
| 7 | 7 |
| 8 // Equivalent of calling FATAL from C++ code. |
| 9 _fatal(msg) native "DartCore_fatal"; |
| 10 |
| 11 |
| 8 // We need to pass the exception and stack trace objects as second and third | 12 // We need to pass the exception and stack trace objects as second and third |
| 9 // parameter to the continuation. See vm/ast_transformer.cc for usage. | 13 // parameter to the continuation. See vm/ast_transformer.cc for usage. |
| 10 void _asyncCatchHelper(catchFunction, continuation) { | 14 void _asyncCatchHelper(catchFunction, continuation) { |
| 11 catchFunction((e, s) => continuation(null, e, s)); | 15 catchFunction((e, s) => continuation(null, e, s)); |
| 12 } | 16 } |
| 13 | 17 |
| 14 // The members of this class are cloned and added to each class that | 18 // The members of this class are cloned and added to each class that |
| 15 // represents an enum type. | 19 // represents an enum type. |
| 16 class _EnumHelper { | 20 class _EnumHelper { |
| 17 // Declare the list of enum value names private. When this field is | 21 // Declare the list of enum value names private. When this field is |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 if (isYieldEach) { | 71 if (isYieldEach) { |
| 68 // Spec mandates: it is a dynamic error if the class of [the object | 72 // Spec mandates: it is a dynamic error if the class of [the object |
| 69 // returned by yield*] does not implement Iterable. | 73 // returned by yield*] does not implement Iterable. |
| 70 yieldEachIterator = (current as Iterable).iterator; | 74 yieldEachIterator = (current as Iterable).iterator; |
| 71 continue; | 75 continue; |
| 72 } | 76 } |
| 73 return true; | 77 return true; |
| 74 } | 78 } |
| 75 } | 79 } |
| 76 } | 80 } |
| OLD | NEW |