Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_XXX. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. |
| 6 | 6 |
| 7 #include "vm/flow_graph_compiler.h" | 7 #include "vm/flow_graph_compiler.h" |
| 8 | 8 |
| 9 #include "vm/bit_vector.h" | 9 #include "vm/bit_vector.h" |
| 10 #include "vm/cha.h" | 10 #include "vm/cha.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 68 DECLARE_FLAG(bool, support_debugger); | 68 DECLARE_FLAG(bool, support_debugger); |
| 69 DECLARE_FLAG(bool, use_field_guards); | 69 DECLARE_FLAG(bool, use_field_guards); |
| 70 DECLARE_FLAG(bool, use_cha_deopt); | 70 DECLARE_FLAG(bool, use_cha_deopt); |
| 71 DECLARE_FLAG(bool, use_osr); | 71 DECLARE_FLAG(bool, use_osr); |
| 72 DECLARE_FLAG(bool, warn_on_javascript_compatibility); | 72 DECLARE_FLAG(bool, warn_on_javascript_compatibility); |
| 73 DECLARE_FLAG(bool, print_stop_message); | 73 DECLARE_FLAG(bool, print_stop_message); |
| 74 DECLARE_FLAG(bool, lazy_dispatchers); | 74 DECLARE_FLAG(bool, lazy_dispatchers); |
| 75 DECLARE_FLAG(bool, interpret_irregexp); | 75 DECLARE_FLAG(bool, interpret_irregexp); |
| 76 DECLARE_FLAG(bool, enable_mirrors); | 76 DECLARE_FLAG(bool, enable_mirrors); |
| 77 DECLARE_FLAG(bool, link_natives_lazily); | 77 DECLARE_FLAG(bool, link_natives_lazily); |
| 78 DECLARE_FLAG(bool, trace_compiler); | |
| 78 | 79 |
| 79 bool FLAG_precompilation = false; | 80 bool FLAG_precompilation = false; |
| 80 static void PrecompilationModeHandler(bool value) { | 81 static void PrecompilationModeHandler(bool value) { |
| 81 if (value) { | 82 if (value) { |
| 82 #if defined(TARGET_ARCH_IA32) | 83 #if defined(TARGET_ARCH_IA32) |
| 83 FATAL("Precompilation not supported on IA32"); | 84 FATAL("Precompilation not supported on IA32"); |
| 84 #endif | 85 #endif |
| 85 FLAG_precompilation = true; | 86 FLAG_precompilation = true; |
| 86 | 87 |
| 87 FLAG_always_megamorphic_calls = true; | 88 FLAG_always_megamorphic_calls = true; |
| (...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 909 | 910 |
| 910 | 911 |
| 911 Label* FlowGraphCompiler::AddDeoptStub(intptr_t deopt_id, | 912 Label* FlowGraphCompiler::AddDeoptStub(intptr_t deopt_id, |
| 912 ICData::DeoptReasonId reason, | 913 ICData::DeoptReasonId reason, |
| 913 uint32_t flags) { | 914 uint32_t flags) { |
| 914 if (intrinsic_mode()) { | 915 if (intrinsic_mode()) { |
| 915 return &intrinsic_slow_path_label_; | 916 return &intrinsic_slow_path_label_; |
| 916 } | 917 } |
| 917 | 918 |
| 918 // No deoptimization allowed when 'always_optimize' is set. | 919 // No deoptimization allowed when 'always_optimize' is set. |
| 919 ASSERT(!Compiler::always_optimize()); | 920 if (Compiler::always_optimize()) { |
| 921 if (FLAG_trace_compiler) { | |
| 922 THR_Print("Retrying compilation %s, suppressing deopt_id:%" Pd "\n", | |
|
srdjan
2015/11/17 17:35:23
suppressing inlining of call deopt_id: ...
Florian Schneider
2015/11/17 19:38:56
Done.
| |
| 923 parsed_function_.function().ToCString(), deopt_id); | |
|
srdjan
2015/11/17 17:35:23
Maybe ToQualifiedCString gives a little bit more i
Florian Schneider
2015/11/17 19:38:56
Done.
| |
| 924 } | |
| 925 ASSERT(deopt_id != 0); // longjmp must return non-zero value. | |
| 926 Thread::Current()->long_jump_base()->Jump( | |
| 927 deopt_id, Object::speculative_inlining_error()); | |
| 928 } | |
| 929 | |
| 920 ASSERT(is_optimizing_); | 930 ASSERT(is_optimizing_); |
| 921 CompilerDeoptInfoWithStub* stub = | 931 CompilerDeoptInfoWithStub* stub = |
| 922 new(zone()) CompilerDeoptInfoWithStub(deopt_id, | 932 new(zone()) CompilerDeoptInfoWithStub(deopt_id, |
| 923 reason, | 933 reason, |
| 924 flags, | 934 flags, |
| 925 pending_deoptimization_env_); | 935 pending_deoptimization_env_); |
| 926 deopt_infos_.Add(stub); | 936 deopt_infos_.Add(stub); |
| 927 return stub->entry_label(); | 937 return stub->entry_label(); |
| 928 } | 938 } |
| 929 | 939 |
| (...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1846 | 1856 |
| 1847 | 1857 |
| 1848 void FlowGraphCompiler::FrameStateClear() { | 1858 void FlowGraphCompiler::FrameStateClear() { |
| 1849 ASSERT(!is_optimizing()); | 1859 ASSERT(!is_optimizing()); |
| 1850 frame_state_.TruncateTo(0); | 1860 frame_state_.TruncateTo(0); |
| 1851 } | 1861 } |
| 1852 #endif | 1862 #endif |
| 1853 | 1863 |
| 1854 | 1864 |
| 1855 } // namespace dart | 1865 } // namespace dart |
| OLD | NEW |