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

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

Issue 2357343003: Fix lazy deoptimization in the presence of exceptions (Closed)
Patch Set: Ensure space for patching on ARM/MIPS archs 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_arm64.cc ('k') | runtime/vm/flow_graph_compiler_ia32.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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_DBC. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_DBC.
6 #if defined(TARGET_ARCH_DBC) 6 #if defined(TARGET_ARCH_DBC)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "vm/ast_printer.h" 10 #include "vm/ast_printer.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 RecordSafepoint(instr->locs()); 191 RecordSafepoint(instr->locs());
192 // Marks either the continuation point in unoptimized code or the 192 // Marks either the continuation point in unoptimized code or the
193 // deoptimization point in optimized code, after call. 193 // deoptimization point in optimized code, after call.
194 const intptr_t deopt_id_after = Thread::ToDeoptAfter(instr->deopt_id()); 194 const intptr_t deopt_id_after = Thread::ToDeoptAfter(instr->deopt_id());
195 if (is_optimizing()) { 195 if (is_optimizing()) {
196 // Return/ReturnTOS instruction drops incoming arguments so 196 // Return/ReturnTOS instruction drops incoming arguments so
197 // we have to drop outgoing arguments from the innermost environment. 197 // we have to drop outgoing arguments from the innermost environment.
198 // On all other architectures caller drops outgoing arguments itself 198 // On all other architectures caller drops outgoing arguments itself
199 // hence the difference. 199 // hence the difference.
200 pending_deoptimization_env_->DropArguments(instr->ArgumentCount()); 200 pending_deoptimization_env_->DropArguments(instr->ArgumentCount());
201 AddDeoptIndexAtCall(deopt_id_after, instr->token_pos()); 201 AddDeoptIndexAtCall(deopt_id_after);
202 } else { 202 } else {
203 // Add deoptimization continuation point after the call and before the 203 // Add deoptimization continuation point after the call and before the
204 // arguments are removed. 204 // arguments are removed.
205 // In optimized code this descriptor is needed for exception handling. 205 // In optimized code this descriptor is needed for exception handling.
206 AddCurrentDescriptor(RawPcDescriptors::kDeopt, 206 AddCurrentDescriptor(RawPcDescriptors::kDeopt,
207 deopt_id_after, 207 deopt_id_after,
208 instr->token_pos()); 208 instr->token_pos());
209 } 209 }
210 } 210 }
211 211
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { 531 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) {
532 UNIMPLEMENTED(); 532 UNIMPLEMENTED();
533 } 533 }
534 534
535 535
536 #undef __ 536 #undef __
537 537
538 } // namespace dart 538 } // namespace dart
539 539
540 #endif // defined TARGET_ARCH_DBC 540 #endif // defined TARGET_ARCH_DBC
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm64.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698