| 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 19 matching lines...) Expand all Loading... |
| 30 // CodeGeneratorContext. | 30 // CodeGeneratorContext. |
| 31 ASSERT(node_sequence != NULL); | 31 ASSERT(node_sequence != NULL); |
| 32 for (int i = 0; i < node_sequence->length(); i++) { | 32 for (int i = 0; i < node_sequence->length(); i++) { |
| 33 OS::Print("id %d: ", node_sequence->NodeAt(i)->id()); | 33 OS::Print("id %d: ", node_sequence->NodeAt(i)->id()); |
| 34 node_sequence->NodeAt(i)->Visit(this); | 34 node_sequence->NodeAt(i)->Visit(this); |
| 35 OS::Print("\n"); | 35 OS::Print("\n"); |
| 36 } | 36 } |
| 37 } | 37 } |
| 38 | 38 |
| 39 | 39 |
| 40 void AstPrinter::VisitCloneContextNode(CloneContextNode* node) { |
| 41 VisitGenericAstNode(node); |
| 42 } |
| 43 |
| 44 |
| 40 void AstPrinter::VisitArgumentListNode(ArgumentListNode* arguments) { | 45 void AstPrinter::VisitArgumentListNode(ArgumentListNode* arguments) { |
| 41 VisitGenericAstNode(arguments); | 46 VisitGenericAstNode(arguments); |
| 42 } | 47 } |
| 43 | 48 |
| 44 | 49 |
| 45 void AstPrinter::VisitReturnNode(ReturnNode* node) { | 50 void AstPrinter::VisitReturnNode(ReturnNode* node) { |
| 46 VisitGenericAstNode(node); | 51 VisitGenericAstNode(node); |
| 47 } | 52 } |
| 48 | 53 |
| 49 | 54 |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 ASSERT(node_sequence != NULL); | 468 ASSERT(node_sequence != NULL); |
| 464 AstPrinter ast_printer; | 469 AstPrinter ast_printer; |
| 465 const char* function_name = | 470 const char* function_name = |
| 466 parsed_function.function().ToFullyQualifiedCString(); | 471 parsed_function.function().ToFullyQualifiedCString(); |
| 467 OS::Print("Ast for function '%s' {\n", function_name); | 472 OS::Print("Ast for function '%s' {\n", function_name); |
| 468 node_sequence->Visit(&ast_printer); | 473 node_sequence->Visit(&ast_printer); |
| 469 OS::Print("}\n"); | 474 OS::Print("}\n"); |
| 470 } | 475 } |
| 471 | 476 |
| 472 } // namespace dart | 477 } // namespace dart |
| OLD | NEW |