| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 OS::Print("(as "); | 157 OS::Print("(as "); |
| 158 node->VisitChildren(this); | 158 node->VisitChildren(this); |
| 159 OS::Print(")"); | 159 OS::Print(")"); |
| 160 } else { | 160 } else { |
| 161 VisitGenericAstNode(node); | 161 VisitGenericAstNode(node); |
| 162 } | 162 } |
| 163 } | 163 } |
| 164 | 164 |
| 165 | 165 |
| 166 void AstPrinter::VisitBinaryOpNode(BinaryOpNode* node) { | 166 void AstPrinter::VisitBinaryOpNode(BinaryOpNode* node) { |
| 167 VisitGenericAstNode(node); | 167 OS::Print("(%s ", node->Name()); |
| 168 node->VisitChildren(this); |
| 169 if (node->has_mask32()) { |
| 170 OS::Print(" & 0x%"Px64"", node->mask32()); |
| 171 } |
| 172 OS::Print(")"); |
| 168 } | 173 } |
| 169 | 174 |
| 170 | 175 |
| 171 void AstPrinter::VisitUnaryOpNode(UnaryOpNode* node) { | 176 void AstPrinter::VisitUnaryOpNode(UnaryOpNode* node) { |
| 172 VisitGenericAstNode(node); | 177 VisitGenericAstNode(node); |
| 173 } | 178 } |
| 174 | 179 |
| 175 | 180 |
| 176 void AstPrinter::VisitConditionalExprNode(ConditionalExprNode* node) { | 181 void AstPrinter::VisitConditionalExprNode(ConditionalExprNode* node) { |
| 177 VisitGenericAstNode(node); | 182 VisitGenericAstNode(node); |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 ASSERT(node_sequence != NULL); | 494 ASSERT(node_sequence != NULL); |
| 490 AstPrinter ast_printer; | 495 AstPrinter ast_printer; |
| 491 const char* function_name = | 496 const char* function_name = |
| 492 parsed_function.function().ToFullyQualifiedCString(); | 497 parsed_function.function().ToFullyQualifiedCString(); |
| 493 OS::Print("Ast for function '%s' {\n", function_name); | 498 OS::Print("Ast for function '%s' {\n", function_name); |
| 494 node_sequence->Visit(&ast_printer); | 499 node_sequence->Visit(&ast_printer); |
| 495 OS::Print("}\n"); | 500 OS::Print("}\n"); |
| 496 } | 501 } |
| 497 | 502 |
| 498 } // namespace dart | 503 } // namespace dart |
| OLD | NEW |