| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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_printer.h" | 5 #include "vm/ast_printer.h" |
| 6 | 6 |
| 7 #include "vm/handles.h" | 7 #include "vm/handles.h" |
| 8 #include "vm/object.h" | 8 #include "vm/object.h" |
| 9 #include "vm/os.h" | 9 #include "vm/os.h" |
| 10 #include "vm/parser.h" | 10 #include "vm/parser.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 case ReturnNode::kContinuation: | 50 case ReturnNode::kContinuation: |
| 51 kind = "continuation "; | 51 kind = "continuation "; |
| 52 break; | 52 break; |
| 53 case ReturnNode::kContinuationTarget: | 53 case ReturnNode::kContinuationTarget: |
| 54 kind = "continuation-target "; | 54 kind = "continuation-target "; |
| 55 break; | 55 break; |
| 56 case ReturnNode::kRegular: | 56 case ReturnNode::kRegular: |
| 57 kind = ""; | 57 kind = ""; |
| 58 break; | 58 break; |
| 59 default: | 59 default: |
| 60 kind = ""; |
| 60 UNREACHABLE(); | 61 UNREACHABLE(); |
| 61 } | 62 } |
| 62 OS::Print("(%s %s", node->PrettyName(), kind); | 63 OS::Print("(%s %s", node->PrettyName(), kind); |
| 63 node->VisitChildren(this); | 64 node->VisitChildren(this); |
| 64 OS::Print(")"); | 65 OS::Print(")"); |
| 65 } | 66 } |
| 66 | 67 |
| 67 | 68 |
| 68 void AstPrinter::VisitGenericLocalNode(AstNode* node, | 69 void AstPrinter::VisitGenericLocalNode(AstNode* node, |
| 69 const LocalVariable& var) { | 70 const LocalVariable& var) { |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 ASSERT(node_sequence != NULL); | 541 ASSERT(node_sequence != NULL); |
| 541 AstPrinter ast_printer; | 542 AstPrinter ast_printer; |
| 542 const char* function_name = | 543 const char* function_name = |
| 543 parsed_function.function().ToFullyQualifiedCString(); | 544 parsed_function.function().ToFullyQualifiedCString(); |
| 544 OS::Print("Ast for function '%s' {\n", function_name); | 545 OS::Print("Ast for function '%s' {\n", function_name); |
| 545 node_sequence->Visit(&ast_printer); | 546 node_sequence->Visit(&ast_printer); |
| 546 OS::Print("}\n"); | 547 OS::Print("}\n"); |
| 547 } | 548 } |
| 548 | 549 |
| 549 } // namespace dart | 550 } // namespace dart |
| OLD | NEW |