| 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/compiler.h" | 5 #include "vm/compiler.h" |
| 6 | 6 |
| 7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
| 8 | 8 |
| 9 #include "vm/ast_printer.h" | 9 #include "vm/ast_printer.h" |
| 10 #include "vm/block_scheduler.h" | 10 #include "vm/block_scheduler.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 DEFINE_FLAG(bool, trace_bailout, false, "Print bailout from ssa compiler."); | 39 DEFINE_FLAG(bool, trace_bailout, false, "Print bailout from ssa compiler."); |
| 40 DEFINE_FLAG(bool, trace_compiler, false, "Trace compiler operations."); | 40 DEFINE_FLAG(bool, trace_compiler, false, "Trace compiler operations."); |
| 41 DEFINE_FLAG(bool, constant_propagation, true, | 41 DEFINE_FLAG(bool, constant_propagation, true, |
| 42 "Do conditional constant propagation/unreachable code elimination."); | 42 "Do conditional constant propagation/unreachable code elimination."); |
| 43 DEFINE_FLAG(bool, common_subexpression_elimination, true, | 43 DEFINE_FLAG(bool, common_subexpression_elimination, true, |
| 44 "Do common subexpression elimination."); | 44 "Do common subexpression elimination."); |
| 45 DEFINE_FLAG(bool, loop_invariant_code_motion, true, | 45 DEFINE_FLAG(bool, loop_invariant_code_motion, true, |
| 46 "Do loop invariant code motion."); | 46 "Do loop invariant code motion."); |
| 47 DEFINE_FLAG(bool, propagate_types, true, "Do static type propagation."); | 47 DEFINE_FLAG(bool, propagate_types, true, "Do static type propagation."); |
| 48 DEFINE_FLAG(bool, allocation_sinking, true, | 48 DEFINE_FLAG(bool, allocation_sinking, true, |
| 49 "attempt to sink temporary allocations to side exits"); | 49 "Attempt to sink temporary allocations to side exits"); |
| 50 DEFINE_FLAG(int, deoptimization_counter_threshold, 16, | 50 DEFINE_FLAG(int, deoptimization_counter_threshold, 16, |
| 51 "How many times we allow deoptimization before we disallow optimization."); | 51 "How many times we allow deoptimization before we disallow optimization."); |
| 52 DEFINE_FLAG(int, deoptimization_counter_licm_threshold, 8, | 52 DEFINE_FLAG(int, deoptimization_counter_licm_threshold, 8, |
| 53 "How many times we allow deoptimization before we disable LICM."); | 53 "How many times we allow deoptimization before we disable LICM."); |
| 54 DEFINE_FLAG(bool, use_inlining, true, "Enable call-site inlining"); | 54 DEFINE_FLAG(bool, use_inlining, true, "Enable call-site inlining"); |
| 55 DEFINE_FLAG(bool, range_analysis, true, "Enable range analysis"); | 55 DEFINE_FLAG(bool, range_analysis, true, "Enable range analysis"); |
| 56 DEFINE_FLAG(bool, reorder_basic_blocks, true, "Enable basic-block reordering."); | 56 DEFINE_FLAG(bool, reorder_basic_blocks, false, |
| 57 "Enable basic-block reordering."); |
| 57 DEFINE_FLAG(bool, verify_compiler, false, | 58 DEFINE_FLAG(bool, verify_compiler, false, |
| 58 "Enable compiler verification assertions"); | 59 "Enable compiler verification assertions"); |
| 59 DECLARE_FLAG(bool, print_flow_graph); | 60 DECLARE_FLAG(bool, print_flow_graph); |
| 60 DECLARE_FLAG(bool, print_flow_graph_optimized); | 61 DECLARE_FLAG(bool, print_flow_graph_optimized); |
| 61 DECLARE_FLAG(bool, trace_failed_optimization_attempts); | 62 DECLARE_FLAG(bool, trace_failed_optimization_attempts); |
| 62 | 63 |
| 63 // Compile a function. Should call only if the function has not been compiled. | 64 // Compile a function. Should call only if the function has not been compiled. |
| 64 // Arg0: function object. | 65 // Arg0: function object. |
| 65 DEFINE_RUNTIME_ENTRY(CompileFunction, 1) { | 66 DEFINE_RUNTIME_ENTRY(CompileFunction, 1) { |
| 66 const Function& function = Function::CheckedHandle(arguments.ArgAt(0)); | 67 const Function& function = Function::CheckedHandle(arguments.ArgAt(0)); |
| (...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 923 Object::Handle(isolate->object_store()->sticky_error()); | 924 Object::Handle(isolate->object_store()->sticky_error()); |
| 924 isolate->object_store()->clear_sticky_error(); | 925 isolate->object_store()->clear_sticky_error(); |
| 925 isolate->set_long_jump_base(base); | 926 isolate->set_long_jump_base(base); |
| 926 return result.raw(); | 927 return result.raw(); |
| 927 } | 928 } |
| 928 UNREACHABLE(); | 929 UNREACHABLE(); |
| 929 return Object::null(); | 930 return Object::null(); |
| 930 } | 931 } |
| 931 | 932 |
| 932 } // namespace dart | 933 } // namespace dart |
| OLD | NEW |