| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/globals.h" // Needed here to get TARGET_ARCH_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
| 9 | 9 |
| 10 #include "lib/error.h" | 10 #include "lib/error.h" |
| 11 #include "vm/ast_printer.h" | 11 #include "vm/ast_printer.h" |
| 12 #include "vm/code_descriptors.h" | 12 #include "vm/code_descriptors.h" |
| 13 #include "vm/code_generator.h" | 13 #include "vm/code_generator.h" |
| 14 #include "vm/debugger.h" | 14 #include "vm/debugger.h" |
| 15 #include "vm/disassembler.h" | 15 #include "vm/disassembler.h" |
| 16 #include "vm/intrinsifier.h" | 16 #include "vm/intrinsifier.h" |
| 17 #include "vm/longjump.h" | 17 #include "vm/longjump.h" |
| 18 #include "vm/object_store.h" | 18 #include "vm/object_store.h" |
| 19 #include "vm/parser.h" | 19 #include "vm/parser.h" |
| 20 #include "vm/stub_code.h" | 20 #include "vm/stub_code.h" |
| 21 | 21 |
| 22 namespace dart { | 22 namespace dart { |
| 23 | 23 |
| 24 DEFINE_FLAG(bool, print_scopes, false, "Print scopes of local variables."); |
| 25 DEFINE_FLAG(bool, trace_functions, false, "Trace entry of each function."); |
| 24 DECLARE_FLAG(bool, enable_type_checks); | 26 DECLARE_FLAG(bool, enable_type_checks); |
| 25 DECLARE_FLAG(bool, intrinsify); | 27 DECLARE_FLAG(bool, intrinsify); |
| 26 DECLARE_FLAG(bool, optimization_counter_threshold); | 28 DECLARE_FLAG(bool, optimization_counter_threshold); |
| 27 DECLARE_FLAG(bool, print_ast); | 29 DECLARE_FLAG(bool, print_ast); |
| 28 DECLARE_FLAG(bool, print_scopes); | |
| 29 DECLARE_FLAG(bool, report_usage_count); | 30 DECLARE_FLAG(bool, report_usage_count); |
| 30 DECLARE_FLAG(bool, trace_functions); | |
| 31 | 31 |
| 32 | 32 |
| 33 FlowGraphCompiler::FlowGraphCompiler( | 33 FlowGraphCompiler::FlowGraphCompiler( |
| 34 Assembler* assembler, | 34 Assembler* assembler, |
| 35 const ParsedFunction& parsed_function, | 35 const ParsedFunction& parsed_function, |
| 36 const GrowableArray<BlockEntryInstr*>& block_order) | 36 const GrowableArray<BlockEntryInstr*>& block_order) |
| 37 : FlowGraphVisitor(block_order), | 37 : FlowGraphVisitor(block_order), |
| 38 assembler_(assembler), | 38 assembler_(assembler), |
| 39 parsed_function_(parsed_function), | 39 parsed_function_(parsed_function), |
| 40 block_info_(block_order.length()), | 40 block_info_(block_order.length()), |
| (...skipping 1682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1723 ASSERT(exception_handlers_list_ != NULL); | 1723 ASSERT(exception_handlers_list_ != NULL); |
| 1724 const ExceptionHandlers& handlers = ExceptionHandlers::Handle( | 1724 const ExceptionHandlers& handlers = ExceptionHandlers::Handle( |
| 1725 exception_handlers_list_->FinalizeExceptionHandlers(code.EntryPoint())); | 1725 exception_handlers_list_->FinalizeExceptionHandlers(code.EntryPoint())); |
| 1726 code.set_exception_handlers(handlers); | 1726 code.set_exception_handlers(handlers); |
| 1727 } | 1727 } |
| 1728 | 1728 |
| 1729 | 1729 |
| 1730 } // namespace dart | 1730 } // namespace dart |
| 1731 | 1731 |
| 1732 #endif // defined TARGET_ARCH_X64 | 1732 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |