| 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 241 |
| 242 | 242 |
| 243 void AstPrinter::VisitJumpNode(JumpNode* node) { | 243 void AstPrinter::VisitJumpNode(JumpNode* node) { |
| 244 OS::Print("(%s %s in scope 0x%x)", | 244 OS::Print("(%s %s in scope 0x%x)", |
| 245 node->Name(), | 245 node->Name(), |
| 246 node->label()->name().ToCString(), | 246 node->label()->name().ToCString(), |
| 247 node->label()->owner()); | 247 node->label()->owner()); |
| 248 } | 248 } |
| 249 | 249 |
| 250 | 250 |
| 251 void AstPrinter::VisitIncrOpInstanceFieldNode(IncrOpInstanceFieldNode* node) { | |
| 252 VisitGenericAstNode(node); | |
| 253 } | |
| 254 | |
| 255 | |
| 256 void AstPrinter::VisitIncrOpIndexedNode(IncrOpIndexedNode* node) { | |
| 257 VisitGenericAstNode(node); | |
| 258 } | |
| 259 | |
| 260 | |
| 261 void AstPrinter::VisitInstanceCallNode(InstanceCallNode* node) { | 251 void AstPrinter::VisitInstanceCallNode(InstanceCallNode* node) { |
| 262 OS::Print("(%s '%s'(", node->Name(), node->function_name().ToCString()); | 252 OS::Print("(%s '%s'(", node->Name(), node->function_name().ToCString()); |
| 263 node->VisitChildren(this); | 253 node->VisitChildren(this); |
| 264 OS::Print("))"); | 254 OS::Print("))"); |
| 265 } | 255 } |
| 266 | 256 |
| 267 | 257 |
| 268 void AstPrinter::VisitStaticCallNode(StaticCallNode* node) { | 258 void AstPrinter::VisitStaticCallNode(StaticCallNode* node) { |
| 269 const char* function_fullname = node->function().ToFullyQualifiedCString(); | 259 const char* function_fullname = node->function().ToFullyQualifiedCString(); |
| 270 OS::Print("(%s '%s'(", node->Name(), function_fullname); | 260 OS::Print("(%s '%s'(", node->Name(), function_fullname); |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 ASSERT(node_sequence != NULL); | 477 ASSERT(node_sequence != NULL); |
| 488 AstPrinter ast_printer; | 478 AstPrinter ast_printer; |
| 489 const char* function_name = | 479 const char* function_name = |
| 490 parsed_function.function().ToFullyQualifiedCString(); | 480 parsed_function.function().ToFullyQualifiedCString(); |
| 491 OS::Print("Ast for function '%s' {\n", function_name); | 481 OS::Print("Ast for function '%s' {\n", function_name); |
| 492 node_sequence->Visit(&ast_printer); | 482 node_sequence->Visit(&ast_printer); |
| 493 OS::Print("}\n"); | 483 OS::Print("}\n"); |
| 494 } | 484 } |
| 495 | 485 |
| 496 } // namespace dart | 486 } // namespace dart |
| OLD | NEW |