Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(463)

Side by Side Diff: runtime/vm/flow_graph_compiler.cc

Issue 1663163003: Initial split of precompilation code from compiler.cc (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: rebased Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/disassembler.cc ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 } 926 }
927 927
928 928
929 Label* FlowGraphCompiler::AddDeoptStub(intptr_t deopt_id, 929 Label* FlowGraphCompiler::AddDeoptStub(intptr_t deopt_id,
930 ICData::DeoptReasonId reason, 930 ICData::DeoptReasonId reason,
931 uint32_t flags) { 931 uint32_t flags) {
932 if (intrinsic_mode()) { 932 if (intrinsic_mode()) {
933 return &intrinsic_slow_path_label_; 933 return &intrinsic_slow_path_label_;
934 } 934 }
935 935
936 // No deoptimization allowed when 'always_optimize' is set. 936 // No deoptimization allowed when 'FLAG_precompilation' is set.
937 if (FLAG_precompilation) { 937 if (FLAG_precompilation) {
938 if (FLAG_trace_compiler) { 938 if (FLAG_trace_compiler) {
939 THR_Print( 939 THR_Print(
940 "Retrying compilation %s, suppressing inlining of deopt_id:%" Pd "\n", 940 "Retrying compilation %s, suppressing inlining of deopt_id:%" Pd "\n",
941 parsed_function_.function().ToFullyQualifiedCString(), deopt_id); 941 parsed_function_.function().ToFullyQualifiedCString(), deopt_id);
942 } 942 }
943 ASSERT(deopt_id != 0); // longjmp must return non-zero value. 943 ASSERT(deopt_id != 0); // longjmp must return non-zero value.
944 Thread::Current()->long_jump_base()->Jump( 944 Thread::Current()->long_jump_base()->Jump(
945 deopt_id, Object::speculative_inlining_error()); 945 deopt_id, Object::speculative_inlining_error());
946 } 946 }
(...skipping 27 matching lines...) Expand all
974 ASSERT(pc_descriptors_list_ != NULL); 974 ASSERT(pc_descriptors_list_ != NULL);
975 const PcDescriptors& descriptors = PcDescriptors::Handle( 975 const PcDescriptors& descriptors = PcDescriptors::Handle(
976 pc_descriptors_list_->FinalizePcDescriptors(code.EntryPoint())); 976 pc_descriptors_list_->FinalizePcDescriptors(code.EntryPoint()));
977 if (!is_optimizing_) descriptors.Verify(parsed_function_.function()); 977 if (!is_optimizing_) descriptors.Verify(parsed_function_.function());
978 code.set_pc_descriptors(descriptors); 978 code.set_pc_descriptors(descriptors);
979 code.set_lazy_deopt_pc_offset(lazy_deopt_pc_offset_); 979 code.set_lazy_deopt_pc_offset(lazy_deopt_pc_offset_);
980 } 980 }
981 981
982 982
983 RawArray* FlowGraphCompiler::CreateDeoptInfo(Assembler* assembler) { 983 RawArray* FlowGraphCompiler::CreateDeoptInfo(Assembler* assembler) {
984 // No deopt information if we 'always_optimize' (no deoptimization allowed). 984 // No deopt information if we precompile (no deoptimization allowed).
985 if (FLAG_precompilation) { 985 if (FLAG_precompilation) {
986 return Array::empty_array().raw(); 986 return Array::empty_array().raw();
987 } 987 }
988 // For functions with optional arguments, all incoming arguments are copied 988 // For functions with optional arguments, all incoming arguments are copied
989 // to spill slots. The deoptimization environment does not track them. 989 // to spill slots. The deoptimization environment does not track them.
990 const Function& function = parsed_function().function(); 990 const Function& function = parsed_function().function();
991 const intptr_t incoming_arg_count = 991 const intptr_t incoming_arg_count =
992 function.HasOptionalParameters() ? 0 : function.num_fixed_parameters(); 992 function.HasOptionalParameters() ? 0 : function.num_fixed_parameters();
993 DeoptInfoBuilder builder(zone(), incoming_arg_count, assembler); 993 DeoptInfoBuilder builder(zone(), incoming_arg_count, assembler);
994 994
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after
1877 1877
1878 1878
1879 void FlowGraphCompiler::FrameStateClear() { 1879 void FlowGraphCompiler::FrameStateClear() {
1880 ASSERT(!is_optimizing()); 1880 ASSERT(!is_optimizing());
1881 frame_state_.TruncateTo(0); 1881 frame_state_.TruncateTo(0);
1882 } 1882 }
1883 #endif 1883 #endif
1884 1884
1885 1885
1886 } // namespace dart 1886 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/disassembler.cc ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698