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

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

Issue 2380403003: Lazy deopt without code patching. (Closed)
Patch Set: remove tracing register assignment Created 4 years, 2 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/flow_graph_compiler.h ('k') | runtime/vm/flow_graph_compiler_arm.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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 isolate()->object_store()->float32x4_class())), 218 isolate()->object_store()->float32x4_class())),
219 float64x2_class_(Class::ZoneHandle( 219 float64x2_class_(Class::ZoneHandle(
220 isolate()->object_store()->float64x2_class())), 220 isolate()->object_store()->float64x2_class())),
221 int32x4_class_(Class::ZoneHandle( 221 int32x4_class_(Class::ZoneHandle(
222 isolate()->object_store()->int32x4_class())), 222 isolate()->object_store()->int32x4_class())),
223 list_class_(Class::ZoneHandle( 223 list_class_(Class::ZoneHandle(
224 Library::Handle(Library::CoreLibrary()). 224 Library::Handle(Library::CoreLibrary()).
225 LookupClass(Symbols::List()))), 225 LookupClass(Symbols::List()))),
226 parallel_move_resolver_(this), 226 parallel_move_resolver_(this),
227 pending_deoptimization_env_(NULL), 227 pending_deoptimization_env_(NULL),
228 lazy_deopt_return_pc_offset_(Code::kInvalidPc),
229 lazy_deopt_throw_pc_offset_(Code::kInvalidPc),
230 deopt_id_to_ic_data_(NULL), 228 deopt_id_to_ic_data_(NULL),
231 edge_counters_array_(Array::ZoneHandle()), 229 edge_counters_array_(Array::ZoneHandle()),
232 inlined_code_intervals_(Array::ZoneHandle(Object::empty_array().raw())), 230 inlined_code_intervals_(Array::ZoneHandle(Object::empty_array().raw())),
233 inline_id_to_function_(inline_id_to_function), 231 inline_id_to_function_(inline_id_to_function),
234 inline_id_to_token_pos_(inline_id_to_token_pos), 232 inline_id_to_token_pos_(inline_id_to_token_pos),
235 caller_inline_id_(caller_inline_id) { 233 caller_inline_id_(caller_inline_id) {
236 ASSERT(flow_graph->parsed_function().function().raw() == 234 ASSERT(flow_graph->parsed_function().function().raw() ==
237 parsed_function.function().raw()); 235 parsed_function.function().raw());
238 if (!is_optimizing) { 236 if (!is_optimizing) {
239 const intptr_t len = thread()->deopt_id(); 237 const intptr_t len = thread()->deopt_id();
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 } 1022 }
1025 } 1023 }
1026 1024
1027 1025
1028 void FlowGraphCompiler::FinalizePcDescriptors(const Code& code) { 1026 void FlowGraphCompiler::FinalizePcDescriptors(const Code& code) {
1029 ASSERT(pc_descriptors_list_ != NULL); 1027 ASSERT(pc_descriptors_list_ != NULL);
1030 const PcDescriptors& descriptors = PcDescriptors::Handle( 1028 const PcDescriptors& descriptors = PcDescriptors::Handle(
1031 pc_descriptors_list_->FinalizePcDescriptors(code.PayloadStart())); 1029 pc_descriptors_list_->FinalizePcDescriptors(code.PayloadStart()));
1032 if (!is_optimizing_) descriptors.Verify(parsed_function_.function()); 1030 if (!is_optimizing_) descriptors.Verify(parsed_function_.function());
1033 code.set_pc_descriptors(descriptors); 1031 code.set_pc_descriptors(descriptors);
1034 code.set_lazy_deopt_return_pc_offset(lazy_deopt_return_pc_offset_);
1035 code.set_lazy_deopt_throw_pc_offset(lazy_deopt_throw_pc_offset_);
1036 } 1032 }
1037 1033
1038 1034
1039 RawArray* FlowGraphCompiler::CreateDeoptInfo(Assembler* assembler) { 1035 RawArray* FlowGraphCompiler::CreateDeoptInfo(Assembler* assembler) {
1040 // No deopt information if we precompile (no deoptimization allowed). 1036 // No deopt information if we precompile (no deoptimization allowed).
1041 if (FLAG_precompiled_mode) { 1037 if (FLAG_precompiled_mode) {
1042 return Array::empty_array().raw(); 1038 return Array::empty_array().raw();
1043 } 1039 }
1044 // For functions with optional arguments, all incoming arguments are copied 1040 // For functions with optional arguments, all incoming arguments are copied
1045 // to spill slots. The deoptimization environment does not track them. 1041 // to spill slots. The deoptimization environment does not track them.
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after
2007 2003
2008 2004
2009 void FlowGraphCompiler::FrameStateClear() { 2005 void FlowGraphCompiler::FrameStateClear() {
2010 ASSERT(!is_optimizing()); 2006 ASSERT(!is_optimizing());
2011 frame_state_.TruncateTo(0); 2007 frame_state_.TruncateTo(0);
2012 } 2008 }
2013 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) 2009 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC)
2014 2010
2015 2011
2016 } // namespace dart 2012 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698