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

Side by Side Diff: runtime/vm/deopt_instructions.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/code_generator.cc ('k') | runtime/vm/flow_graph_compiler.h » ('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/deopt_instructions.h" 5 #include "vm/deopt_instructions.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/code_patcher.h" 8 #include "vm/code_patcher.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/disassembler.h" 10 #include "vm/disassembler.h"
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 virtual const char* ArgumentsToCString() const { 690 virtual const char* ArgumentsToCString() const {
691 return Thread::Current()->zone()->PrintToString( 691 return Thread::Current()->zone()->PrintToString(
692 "%" Pd "", object_table_index_); 692 "%" Pd "", object_table_index_);
693 } 693 }
694 694
695 void Execute(DeoptContext* deopt_context, intptr_t* dest_addr) { 695 void Execute(DeoptContext* deopt_context, intptr_t* dest_addr) {
696 Function& function = Function::Handle(deopt_context->zone()); 696 Function& function = Function::Handle(deopt_context->zone());
697 function ^= deopt_context->ObjectAt(object_table_index_); 697 function ^= deopt_context->ObjectAt(object_table_index_);
698 if (function.IsNull()) { 698 if (function.IsNull()) {
699 *reinterpret_cast<RawObject**>(dest_addr) = deopt_context->is_lazy_deopt() 699 *reinterpret_cast<RawObject**>(dest_addr) = deopt_context->is_lazy_deopt()
700 ? StubCode::DeoptimizeLazy_entry()->code() 700 ? StubCode::DeoptimizeLazyFromReturn_entry()->code()
701 : StubCode::Deoptimize_entry()->code(); 701 : StubCode::Deoptimize_entry()->code();
702 return; 702 return;
703 } 703 }
704 704
705 // We don't always have the Code object for the frame's corresponding 705 // We don't always have the Code object for the frame's corresponding
706 // unoptimized code as it may have been collected. Use a stub as the pc 706 // unoptimized code as it may have been collected. Use a stub as the pc
707 // marker until we can recreate that Code object during deferred 707 // marker until we can recreate that Code object during deferred
708 // materialization to maintain the invariant that Dart frames always have 708 // materialization to maintain the invariant that Dart frames always have
709 // a pc marker. 709 // a pc marker.
710 *reinterpret_cast<RawObject**>(dest_addr) = 710 *reinterpret_cast<RawObject**>(dest_addr) =
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
1354 Smi* offset, 1354 Smi* offset,
1355 TypedData* info, 1355 TypedData* info,
1356 Smi* reason) { 1356 Smi* reason) {
1357 intptr_t i = index * kEntrySize; 1357 intptr_t i = index * kEntrySize;
1358 *offset ^= table.At(i); 1358 *offset ^= table.At(i);
1359 *info ^= table.At(i + 1); 1359 *info ^= table.At(i + 1);
1360 *reason ^= table.At(i + 2); 1360 *reason ^= table.At(i + 2);
1361 } 1361 }
1362 1362
1363 } // namespace dart 1363 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698