| 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 #include "vm/ast_printer.h" | 8 #include "vm/ast_printer.h" |
| 9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/code_patcher.h" | 10 #include "vm/code_patcher.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 DEFINE_FLAG(bool, trace_bailout, false, "Print bailout from ssa compiler."); | 36 DEFINE_FLAG(bool, trace_bailout, false, "Print bailout from ssa compiler."); |
| 37 DEFINE_FLAG(bool, trace_compiler, false, "Trace compiler operations."); | 37 DEFINE_FLAG(bool, trace_compiler, false, "Trace compiler operations."); |
| 38 DEFINE_FLAG(bool, cp, true, | 38 DEFINE_FLAG(bool, cp, true, |
| 39 "Do conditional constant propagation/unreachable code elimination."); | 39 "Do conditional constant propagation/unreachable code elimination."); |
| 40 DEFINE_FLAG(bool, cse, true, "Do common subexpression elimination."); | 40 DEFINE_FLAG(bool, cse, true, "Do common subexpression elimination."); |
| 41 DEFINE_FLAG(bool, licm, true, "Do loop invariant code motion."); | 41 DEFINE_FLAG(bool, licm, true, "Do loop invariant code motion."); |
| 42 DEFINE_FLAG(bool, propagate_types, true, "Do static type propagation."); | 42 DEFINE_FLAG(bool, propagate_types, true, "Do static type propagation."); |
| 43 DEFINE_FLAG(int, deoptimization_counter_threshold, 5, | 43 DEFINE_FLAG(int, deoptimization_counter_threshold, 5, |
| 44 "How many times we allow deoptimization before we disallow" | 44 "How many times we allow deoptimization before we disallow" |
| 45 " certain optimizations"); | 45 " certain optimizations"); |
| 46 DEFINE_FLAG(bool, use_inlining, true, "Enable call-site inlining"); | 46 DEFINE_FLAG(bool, use_inlining, false, "Enable call-site inlining"); |
| 47 DECLARE_FLAG(bool, print_flow_graph); | 47 DECLARE_FLAG(bool, print_flow_graph); |
| 48 | 48 |
| 49 | 49 |
| 50 // Compile a function. Should call only if the function has not been compiled. | 50 // Compile a function. Should call only if the function has not been compiled. |
| 51 // Arg0: function object. | 51 // Arg0: function object. |
| 52 DEFINE_RUNTIME_ENTRY(CompileFunction, 1) { | 52 DEFINE_RUNTIME_ENTRY(CompileFunction, 1) { |
| 53 ASSERT(arguments.Count() == kCompileFunctionRuntimeEntry.argument_count()); | 53 ASSERT(arguments.Count() == kCompileFunctionRuntimeEntry.argument_count()); |
| 54 const Function& function = Function::CheckedHandle(arguments.At(0)); | 54 const Function& function = Function::CheckedHandle(arguments.At(0)); |
| 55 ASSERT(!function.HasCode()); | 55 ASSERT(!function.HasCode()); |
| 56 const Error& error = Error::Handle(Compiler::CompileFunction(function)); | 56 const Error& error = Error::Handle(Compiler::CompileFunction(function)); |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 result = isolate->object_store()->sticky_error(); | 562 result = isolate->object_store()->sticky_error(); |
| 563 isolate->object_store()->clear_sticky_error(); | 563 isolate->object_store()->clear_sticky_error(); |
| 564 isolate->set_long_jump_base(base); | 564 isolate->set_long_jump_base(base); |
| 565 return result.raw(); | 565 return result.raw(); |
| 566 } | 566 } |
| 567 UNREACHABLE(); | 567 UNREACHABLE(); |
| 568 return Object::null(); | 568 return Object::null(); |
| 569 } | 569 } |
| 570 | 570 |
| 571 } // namespace dart | 571 } // namespace dart |
| OLD | NEW |