| 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/parser.h" | 7 #include "vm/parser.h" |
| 8 | 8 |
| 9 namespace dart { | 9 namespace dart { |
| 10 | 10 |
| 11 // Quick access to the locally defined isolate() method. | 11 // Quick access to the locally defined isolate() method. |
| 12 #define I (isolate()) | 12 #define I (isolate()) |
| 13 | 13 |
| 14 // Nodes that are unreachable from already parsed expressions. | 14 // Nodes that are unreachable from already parsed expressions. |
| 15 #define FOR_EACH_UNREACHABLE_NODE(V) \ | 15 #define FOR_EACH_UNREACHABLE_NODE(V) \ |
| 16 V(Case) \ | 16 V(Case) \ |
| 17 V(CatchClause) \ | 17 V(CatchClause) \ |
| 18 V(CloneContext) \ | 18 V(CloneContext) \ |
| 19 V(ClosureCall) \ | 19 V(ClosureCall) \ |
| 20 V(DoWhile) \ | 20 V(DoWhile) \ |
| 21 V(If) \ | 21 V(If) \ |
| 22 V(InitStaticField) \ |
| 22 V(InlinedFinally) \ | 23 V(InlinedFinally) \ |
| 23 V(For) \ | 24 V(For) \ |
| 24 V(Jump) \ | 25 V(Jump) \ |
| 25 V(LoadInstanceField) \ | 26 V(LoadInstanceField) \ |
| 26 V(NativeBody) \ | 27 V(NativeBody) \ |
| 27 V(Primary) \ | 28 V(Primary) \ |
| 28 V(Return) \ | 29 V(Return) \ |
| 29 V(Sequence) \ | 30 V(Sequence) \ |
| 30 V(StoreInstanceField) \ | 31 V(StoreInstanceField) \ |
| 31 V(Switch) \ | 32 V(Switch) \ |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 void AwaitTransformer::VisitThrowNode(ThrowNode* node) { | 499 void AwaitTransformer::VisitThrowNode(ThrowNode* node) { |
| 499 // TODO(mlippautz): Check if relevant. | 500 // TODO(mlippautz): Check if relevant. |
| 500 AstNode* new_exception = Transform(node->exception()); | 501 AstNode* new_exception = Transform(node->exception()); |
| 501 AstNode* new_stacktrace = Transform(node->stacktrace()); | 502 AstNode* new_stacktrace = Transform(node->stacktrace()); |
| 502 result_ = new(I) ThrowNode(node->token_pos(), | 503 result_ = new(I) ThrowNode(node->token_pos(), |
| 503 new_exception, | 504 new_exception, |
| 504 new_stacktrace); | 505 new_stacktrace); |
| 505 } | 506 } |
| 506 | 507 |
| 507 } // namespace dart | 508 } // namespace dart |
| OLD | NEW |