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/log.h" | 8 #include "vm/log.h" |
9 #include "vm/object.h" | 9 #include "vm/object.h" |
10 #include "vm/os.h" | 10 #include "vm/os.h" |
11 #include "vm/parser.h" | 11 #include "vm/parser.h" |
12 | 12 |
13 #if !defined(PRODUCT) | 13 #if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME) |
14 | 14 |
15 namespace dart { | 15 namespace dart { |
16 | 16 |
17 AstPrinter::AstPrinter(bool log) | 17 AstPrinter::AstPrinter(bool log) |
18 : indent_(0), logger_(log ? Log::Current() : Log::NoOpLog()) {} | 18 : indent_(0), logger_(log ? Log::Current() : Log::NoOpLog()) {} |
19 | 19 |
20 | 20 |
21 AstPrinter::~AstPrinter() {} | 21 AstPrinter::~AstPrinter() {} |
22 | 22 |
23 | 23 |
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 ASSERT(node_sequence != NULL); | 564 ASSERT(node_sequence != NULL); |
565 const char* function_name = | 565 const char* function_name = |
566 parsed_function.function().ToFullyQualifiedCString(); | 566 parsed_function.function().ToFullyQualifiedCString(); |
567 logger_->Print("Ast for function '%s' {\n", function_name); | 567 logger_->Print("Ast for function '%s' {\n", function_name); |
568 node_sequence->Visit(this); | 568 node_sequence->Visit(this); |
569 logger_->Print("}\n"); | 569 logger_->Print("}\n"); |
570 } | 570 } |
571 | 571 |
572 } // namespace dart | 572 } // namespace dart |
573 | 573 |
574 #endif // !defined(PRODUCT) | 574 #endif // !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME) |
OLD | NEW |