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

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

Issue 2374273002: Fix a throw returning to a frame marked for lazy deopt that captures the stacktrace. (Closed)
Patch Set: . 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_pc_offset_(Code::kInvalidPc), 228 lazy_deopt_return_pc_offset_(Code::kInvalidPc),
229 lazy_deopt_throw_pc_offset_(Code::kInvalidPc),
229 deopt_id_to_ic_data_(NULL), 230 deopt_id_to_ic_data_(NULL),
230 edge_counters_array_(Array::ZoneHandle()), 231 edge_counters_array_(Array::ZoneHandle()),
231 inlined_code_intervals_(Array::ZoneHandle(Object::empty_array().raw())), 232 inlined_code_intervals_(Array::ZoneHandle(Object::empty_array().raw())),
232 inline_id_to_function_(inline_id_to_function), 233 inline_id_to_function_(inline_id_to_function),
233 inline_id_to_token_pos_(inline_id_to_token_pos), 234 inline_id_to_token_pos_(inline_id_to_token_pos),
234 caller_inline_id_(caller_inline_id) { 235 caller_inline_id_(caller_inline_id) {
235 ASSERT(flow_graph->parsed_function().function().raw() == 236 ASSERT(flow_graph->parsed_function().function().raw() ==
236 parsed_function.function().raw()); 237 parsed_function.function().raw());
237 if (!is_optimizing) { 238 if (!is_optimizing) {
238 const intptr_t len = thread()->deopt_id(); 239 const intptr_t len = thread()->deopt_id();
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 } 1024 }
1024 } 1025 }
1025 1026
1026 1027
1027 void FlowGraphCompiler::FinalizePcDescriptors(const Code& code) { 1028 void FlowGraphCompiler::FinalizePcDescriptors(const Code& code) {
1028 ASSERT(pc_descriptors_list_ != NULL); 1029 ASSERT(pc_descriptors_list_ != NULL);
1029 const PcDescriptors& descriptors = PcDescriptors::Handle( 1030 const PcDescriptors& descriptors = PcDescriptors::Handle(
1030 pc_descriptors_list_->FinalizePcDescriptors(code.PayloadStart())); 1031 pc_descriptors_list_->FinalizePcDescriptors(code.PayloadStart()));
1031 if (!is_optimizing_) descriptors.Verify(parsed_function_.function()); 1032 if (!is_optimizing_) descriptors.Verify(parsed_function_.function());
1032 code.set_pc_descriptors(descriptors); 1033 code.set_pc_descriptors(descriptors);
1033 code.set_lazy_deopt_pc_offset(lazy_deopt_pc_offset_); 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_);
1034 } 1036 }
1035 1037
1036 1038
1037 RawArray* FlowGraphCompiler::CreateDeoptInfo(Assembler* assembler) { 1039 RawArray* FlowGraphCompiler::CreateDeoptInfo(Assembler* assembler) {
1038 // No deopt information if we precompile (no deoptimization allowed). 1040 // No deopt information if we precompile (no deoptimization allowed).
1039 if (FLAG_precompiled_mode) { 1041 if (FLAG_precompiled_mode) {
1040 return Array::empty_array().raw(); 1042 return Array::empty_array().raw();
1041 } 1043 }
1042 // For functions with optional arguments, all incoming arguments are copied 1044 // For functions with optional arguments, all incoming arguments are copied
1043 // to spill slots. The deoptimization environment does not track them. 1045 // to spill slots. The deoptimization environment does not track them.
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
2004 2006
2005 2007
2006 void FlowGraphCompiler::FrameStateClear() { 2008 void FlowGraphCompiler::FrameStateClear() {
2007 ASSERT(!is_optimizing()); 2009 ASSERT(!is_optimizing());
2008 frame_state_.TruncateTo(0); 2010 frame_state_.TruncateTo(0);
2009 } 2011 }
2010 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) 2012 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC)
2011 2013
2012 2014
2013 } // namespace dart 2015 } // 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