| 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 void AstPrinter::VisitStaticSetterNode(StaticSetterNode* node) { | 319 void AstPrinter::VisitStaticSetterNode(StaticSetterNode* node) { |
| 320 String& class_name = String::Handle(node->cls().Name()); | 320 String& class_name = String::Handle(node->cls().Name()); |
| 321 OS::Print("(%s '%s.%s'(", | 321 OS::Print("(%s '%s.%s'(", |
| 322 node->Name(), class_name.ToCString(), node->field_name().ToCString()); | 322 node->Name(), class_name.ToCString(), node->field_name().ToCString()); |
| 323 node->VisitChildren(this); | 323 node->VisitChildren(this); |
| 324 OS::Print("))"); | 324 OS::Print("))"); |
| 325 } | 325 } |
| 326 | 326 |
| 327 | 327 |
| 328 void AstPrinter::VisitLoadIndexedNode(LoadIndexedNode* node) { | 328 void AstPrinter::VisitLoadIndexedNode(LoadIndexedNode* node) { |
| 329 VisitGenericAstNode(node); | 329 OS::Print("(%s%s ", node->Name(), node->IsSuperLoad() ? " super" : ""); |
| 330 node->VisitChildren(this); |
| 331 OS::Print(")"); |
| 330 } | 332 } |
| 331 | 333 |
| 332 | 334 |
| 333 void AstPrinter::VisitStoreIndexedNode(StoreIndexedNode* node) { | 335 void AstPrinter::VisitStoreIndexedNode(StoreIndexedNode* node) { |
| 334 VisitGenericAstNode(node); | 336 OS::Print("(%s%s ", node->Name(), node->IsSuperStore() ? " super" : ""); |
| 337 node->VisitChildren(this); |
| 338 OS::Print(")"); |
| 335 } | 339 } |
| 336 | 340 |
| 337 | 341 |
| 338 void AstPrinter::VisitNativeBodyNode(NativeBodyNode* node) { | 342 void AstPrinter::VisitNativeBodyNode(NativeBodyNode* node) { |
| 339 OS::Print("(native_c call '%s'(%d args))", | 343 OS::Print("(native_c call '%s'(%d args))", |
| 340 node->native_c_function_name().ToCString(), | 344 node->native_c_function_name().ToCString(), |
| 341 node->argument_count()); | 345 node->argument_count()); |
| 342 } | 346 } |
| 343 | 347 |
| 344 | 348 |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 ASSERT(node_sequence != NULL); | 493 ASSERT(node_sequence != NULL); |
| 490 AstPrinter ast_printer; | 494 AstPrinter ast_printer; |
| 491 const char* function_name = | 495 const char* function_name = |
| 492 parsed_function.function().ToFullyQualifiedCString(); | 496 parsed_function.function().ToFullyQualifiedCString(); |
| 493 OS::Print("Ast for function '%s' {\n", function_name); | 497 OS::Print("Ast for function '%s' {\n", function_name); |
| 494 node_sequence->Visit(&ast_printer); | 498 node_sequence->Visit(&ast_printer); |
| 495 OS::Print("}\n"); | 499 OS::Print("}\n"); |
| 496 } | 500 } |
| 497 | 501 |
| 498 } // namespace dart | 502 } // namespace dart |
| OLD | NEW |