Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: runtime/vm/ast_printer.cc

Issue 17977002: - Remove arguments definition test from the VM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/ast.h ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 30 matching lines...) Expand all
41 void AstPrinter::VisitCloneContextNode(CloneContextNode* node) { 41 void AstPrinter::VisitCloneContextNode(CloneContextNode* node) {
42 VisitGenericAstNode(node); 42 VisitGenericAstNode(node);
43 } 43 }
44 44
45 45
46 void AstPrinter::VisitArgumentListNode(ArgumentListNode* arguments) { 46 void AstPrinter::VisitArgumentListNode(ArgumentListNode* arguments) {
47 VisitGenericAstNode(arguments); 47 VisitGenericAstNode(arguments);
48 } 48 }
49 49
50 50
51 void AstPrinter::VisitArgumentDefinitionTestNode(
52 ArgumentDefinitionTestNode* node) {
53 OS::Print("(%s ?%s @%"Pd")",
54 node->Name(),
55 node->formal_parameter_name().ToCString(),
56 node->formal_parameter_index());
57 }
58
59
60 void AstPrinter::VisitReturnNode(ReturnNode* node) { 51 void AstPrinter::VisitReturnNode(ReturnNode* node) {
61 VisitGenericAstNode(node); 52 VisitGenericAstNode(node);
62 } 53 }
63 54
64 55
65 void AstPrinter::VisitGenericLocalNode(AstNode* node, 56 void AstPrinter::VisitGenericLocalNode(AstNode* node,
66 const LocalVariable& var) { 57 const LocalVariable& var) {
67 OS::Print("(%s %s%s '%s'", 58 OS::Print("(%s %s%s '%s'",
68 node->Name(), 59 node->Name(),
69 var.is_final() ? "final " : "", 60 var.is_final() ? "final " : "",
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 ASSERT(node_sequence != NULL); 489 ASSERT(node_sequence != NULL);
499 AstPrinter ast_printer; 490 AstPrinter ast_printer;
500 const char* function_name = 491 const char* function_name =
501 parsed_function.function().ToFullyQualifiedCString(); 492 parsed_function.function().ToFullyQualifiedCString();
502 OS::Print("Ast for function '%s' {\n", function_name); 493 OS::Print("Ast for function '%s' {\n", function_name);
503 node_sequence->Visit(&ast_printer); 494 node_sequence->Visit(&ast_printer);
504 OS::Print("}\n"); 495 OS::Print("}\n");
505 } 496 }
506 497
507 } // namespace dart 498 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/ast.h ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698