Chromium Code Reviews| Index: runtime/vm/compiler.cc |
| diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc |
| index 44591af3af265783e765cc5d8ae2b3bf85b63443..d3b8f3cac6547e5ffe86343f98fac22ae89a6c51 100644 |
| --- a/runtime/vm/compiler.cc |
| +++ b/runtime/vm/compiler.cc |
| @@ -70,6 +70,7 @@ DEFINE_FLAG(int, max_speculative_inlining_attempts, 1, |
| "Max number of attempts with speculative inlining (precompilation only)"); |
| DECLARE_FLAG(bool, background_compilation); |
| +DECLARE_FLAG(bool, huge_method_cutoff_in_code_size); |
| DECLARE_FLAG(bool, load_deferred_eagerly); |
| DECLARE_FLAG(bool, trace_failed_optimization_attempts); |
| DECLARE_FLAG(bool, trace_inlining_intervals); |
| @@ -466,6 +467,11 @@ void CompileParsedFunctionHelper::FinalizeCompilation( |
| Code::FinalizeCode(function, assembler, optimized())); |
| code.set_is_optimized(optimized()); |
| code.set_owner(function); |
| + if (!function.IsOptimizable()) { |
| + // A function with huge unoptimized code canb become non-optimizable |
|
Florian Schneider
2016/01/04 11:31:37
s/canb/can/
srdjan
2016/01/04 18:29:53
Done.
|
| + // after generating unoptimized code. |
| + function.set_usage_counter(INT_MIN); |
| + } |
| const Array& intervals = graph_compiler->inlined_code_intervals(); |
| INC_STAT(thread(), total_code_size, |