| 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 void AstPrinter::VisitStoreIndexedNode(StoreIndexedNode* node) { | 335 void AstPrinter::VisitStoreIndexedNode(StoreIndexedNode* node) { |
| 336 OS::Print("(%s%s ", node->Name(), node->IsSuperStore() ? " super" : ""); | 336 OS::Print("(%s%s ", node->Name(), node->IsSuperStore() ? " super" : ""); |
| 337 node->VisitChildren(this); | 337 node->VisitChildren(this); |
| 338 OS::Print(")"); | 338 OS::Print(")"); |
| 339 } | 339 } |
| 340 | 340 |
| 341 | 341 |
| 342 void AstPrinter::VisitNativeBodyNode(NativeBodyNode* node) { | 342 void AstPrinter::VisitNativeBodyNode(NativeBodyNode* node) { |
| 343 OS::Print("(native_c call '%s'(%d args))", | 343 OS::Print("(native_c call '%s'(%d args))", |
| 344 node->native_c_function_name().ToCString(), | 344 node->native_c_function_name().ToCString(), |
| 345 node->argument_count()); | 345 NativeArguments::ParameterCountForResolution(node->function())); |
| 346 } | 346 } |
| 347 | 347 |
| 348 | 348 |
| 349 void AstPrinter::VisitCatchClauseNode(CatchClauseNode* node) { | 349 void AstPrinter::VisitCatchClauseNode(CatchClauseNode* node) { |
| 350 node->VisitChildren(this); | 350 node->VisitChildren(this); |
| 351 } | 351 } |
| 352 | 352 |
| 353 | 353 |
| 354 void AstPrinter::VisitTryCatchNode(TryCatchNode* node) { | 354 void AstPrinter::VisitTryCatchNode(TryCatchNode* node) { |
| 355 OS::Print("("); | 355 OS::Print("("); |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 ASSERT(node_sequence != NULL); | 493 ASSERT(node_sequence != NULL); |
| 494 AstPrinter ast_printer; | 494 AstPrinter ast_printer; |
| 495 const char* function_name = | 495 const char* function_name = |
| 496 parsed_function.function().ToFullyQualifiedCString(); | 496 parsed_function.function().ToFullyQualifiedCString(); |
| 497 OS::Print("Ast for function '%s' {\n", function_name); | 497 OS::Print("Ast for function '%s' {\n", function_name); |
| 498 node_sequence->Visit(&ast_printer); | 498 node_sequence->Visit(&ast_printer); |
| 499 OS::Print("}\n"); | 499 OS::Print("}\n"); |
| 500 } | 500 } |
| 501 | 501 |
| 502 } // namespace dart | 502 } // namespace dart |
| OLD | NEW |