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

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

Issue 2039913006: DBC: Eager deoptimization and CheckSmi instruction. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments Created 4 years, 6 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/deopt_instructions.h ('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/intermediate_language.h" 10 #include "vm/intermediate_language.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // Do not include incoming arguments if there are optional arguments 60 // Do not include incoming arguments if there are optional arguments
61 // (they are copied into local space at method entry). 61 // (they are copied into local space at method entry).
62 num_args_ = 62 num_args_ =
63 function.HasOptionalParameters() ? 0 : function.num_fixed_parameters(); 63 function.HasOptionalParameters() ? 0 : function.num_fixed_parameters();
64 64
65 // The fixed size section of the (fake) Dart frame called via a stub by the 65 // The fixed size section of the (fake) Dart frame called via a stub by the
66 // optimized function contains FP, PP (ARM and MIPS only), PC-marker and 66 // optimized function contains FP, PP (ARM and MIPS only), PC-marker and
67 // return-address. This section is copied as well, so that its contained 67 // return-address. This section is copied as well, so that its contained
68 // values can be updated before returning to the deoptimized function. 68 // values can be updated before returning to the deoptimized function.
69 // Note: on DBC stack grows upwards unlike on all other architectures. 69 // Note: on DBC stack grows upwards unlike on all other architectures.
70 #if defined(TARGET_ARCH_DBC)
71 ASSERT(frame->sp() >= frame->fp());
72 const intptr_t frame_size = (frame->sp() - frame->fp()) / kWordSize;
73 #else
74 ASSERT(frame->fp() >= frame->sp());
75 const intptr_t frame_size = (frame->fp() - frame->sp()) / kWordSize;
76 #endif
77
70 source_frame_size_ = 78 source_frame_size_ =
71 + kDartFrameFixedSize // For saved values below sp. 79 + kDartFrameFixedSize // For saved values below sp.
72 #if !defined(TARGET_ARCH_DBC) 80 + frame_size // For frame size incl. sp.
73 + ((frame->fp() - frame->sp()) / kWordSize) // For frame size incl. sp.
74 #else
75 + ((frame->sp() - frame->fp()) / kWordSize) // For frame size incl. sp.
76 #endif // !defined(TARGET_ARCH_DBC)
77 + 1 // For fp. 81 + 1 // For fp.
78 + kParamEndSlotFromFp // For saved values above fp. 82 + kParamEndSlotFromFp // For saved values above fp.
79 + num_args_; // For arguments. 83 + num_args_; // For arguments.
80 84
81 source_frame_ = FrameBase(frame); 85 source_frame_ = FrameBase(frame);
82 86
83 if (dest_options == kDestIsOriginalFrame) { 87 if (dest_options == kDestIsOriginalFrame) {
84 // Work from a copy of the source frame. 88 // Work from a copy of the source frame.
85 intptr_t* original_frame = source_frame_; 89 intptr_t* original_frame = source_frame_;
86 source_frame_ = new intptr_t[source_frame_size_]; 90 source_frame_ = new intptr_t[source_frame_size_];
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1338 Smi* offset, 1342 Smi* offset,
1339 TypedData* info, 1343 TypedData* info,
1340 Smi* reason) { 1344 Smi* reason) {
1341 intptr_t i = index * kEntrySize; 1345 intptr_t i = index * kEntrySize;
1342 *offset ^= table.At(i); 1346 *offset ^= table.At(i);
1343 *info ^= table.At(i + 1); 1347 *info ^= table.At(i + 1);
1344 *reason ^= table.At(i + 2); 1348 *reason ^= table.At(i + 2);
1345 } 1349 }
1346 1350
1347 } // namespace dart 1351 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/deopt_instructions.h ('k') | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698