OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 #include "vm/ast_transformer.h" | 5 #include "vm/ast_transformer.h" |
6 | 6 |
7 #include "vm/object_store.h" | 7 #include "vm/object_store.h" |
8 #include "vm/parser.h" | 8 #include "vm/parser.h" |
9 #include "vm/thread.h" | 9 #include "vm/thread.h" |
10 | 10 |
11 namespace dart { | 11 namespace dart { |
12 | 12 |
13 // Quick access to the current zone. | 13 // Quick access to the current zone. |
14 #define Z (thread()->zone()) | 14 #define Z (thread()->zone()) |
15 | 15 |
16 // Nodes that are unreachable from already parsed expressions. | 16 // Nodes that are unreachable from already parsed expressions. |
17 #define FOR_EACH_UNREACHABLE_NODE(V) \ | 17 #define FOR_EACH_UNREACHABLE_NODE(V) \ |
18 V(AwaitMarker) \ | 18 V(AwaitMarker) \ |
19 V(Case) \ | 19 V(Case) \ |
20 V(CatchClause) \ | 20 V(CatchClause) \ |
21 V(CloneContext) \ | 21 V(CloneContext) \ |
22 V(ClosureCall) \ | 22 V(ClosureCall) \ |
23 V(DoWhile) \ | 23 V(DoWhile) \ |
24 V(If) \ | 24 V(If) \ |
25 V(InitStaticField) \ | 25 V(InitStaticField) \ |
26 V(InlinedFinally) \ | 26 V(InlinedFinally) \ |
27 V(For) \ | 27 V(For) \ |
28 V(Jump) \ | 28 V(Jump) \ |
| 29 V(Stop) \ |
29 V(LoadInstanceField) \ | 30 V(LoadInstanceField) \ |
30 V(NativeBody) \ | 31 V(NativeBody) \ |
31 V(Primary) \ | 32 V(Primary) \ |
32 V(Return) \ | 33 V(Return) \ |
33 V(Sequence) \ | 34 V(Sequence) \ |
34 V(StoreInstanceField) \ | 35 V(StoreInstanceField) \ |
35 V(Switch) \ | 36 V(Switch) \ |
36 V(TryCatch) \ | 37 V(TryCatch) \ |
37 V(While) | 38 V(While) |
38 | 39 |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 | 604 |
604 | 605 |
605 void AwaitTransformer::VisitThrowNode(ThrowNode* node) { | 606 void AwaitTransformer::VisitThrowNode(ThrowNode* node) { |
606 AstNode* new_exception = Transform(node->exception()); | 607 AstNode* new_exception = Transform(node->exception()); |
607 result_ = new(Z) ThrowNode(node->token_pos(), | 608 result_ = new(Z) ThrowNode(node->token_pos(), |
608 new_exception, | 609 new_exception, |
609 node->stacktrace()); | 610 node->stacktrace()); |
610 } | 611 } |
611 | 612 |
612 } // namespace dart | 613 } // namespace dart |
OLD | NEW |