OLD | NEW |
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 deopt_info_ = deopt_info.raw(); | 66 deopt_info_ = deopt_info.raw(); |
67 | 67 |
68 const Function& function = Function::Handle(code.function()); | 68 const Function& function = Function::Handle(code.function()); |
69 | 69 |
70 // Do not include incoming arguments if there are optional arguments | 70 // Do not include incoming arguments if there are optional arguments |
71 // (they are copied into local space at method entry). | 71 // (they are copied into local space at method entry). |
72 num_args_ = | 72 num_args_ = |
73 function.HasOptionalParameters() ? 0 : function.num_fixed_parameters(); | 73 function.HasOptionalParameters() ? 0 : function.num_fixed_parameters(); |
74 | 74 |
75 // The fixed size section of the (fake) Dart frame called via a stub by the | 75 // The fixed size section of the (fake) Dart frame called via a stub by the |
76 // optimized function contains FP, PP (ARM and MIPS only), PC-marker and | 76 // optimized function contains FP, PP (ARM only), PC-marker and |
77 // return-address. This section is copied as well, so that its contained | 77 // return-address. This section is copied as well, so that its contained |
78 // values can be updated before returning to the deoptimized function. | 78 // values can be updated before returning to the deoptimized function. |
79 // Note: on DBC stack grows upwards unlike on all other architectures. | 79 // Note: on DBC stack grows upwards unlike on all other architectures. |
80 #if defined(TARGET_ARCH_DBC) | 80 #if defined(TARGET_ARCH_DBC) |
81 ASSERT(frame->sp() >= frame->fp()); | 81 ASSERT(frame->sp() >= frame->fp()); |
82 const intptr_t frame_size = (frame->sp() - frame->fp()) / kWordSize; | 82 const intptr_t frame_size = (frame->sp() - frame->fp()) / kWordSize; |
83 #else | 83 #else |
84 ASSERT(frame->fp() >= frame->sp()); | 84 ASSERT(frame->fp() >= frame->sp()); |
85 const intptr_t frame_size = (frame->fp() - frame->sp()) / kWordSize; | 85 const intptr_t frame_size = (frame->fp() - frame->sp()) / kWordSize; |
86 #endif | 86 #endif |
(...skipping 1286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1373 Smi* offset, | 1373 Smi* offset, |
1374 TypedData* info, | 1374 TypedData* info, |
1375 Smi* reason) { | 1375 Smi* reason) { |
1376 intptr_t i = index * kEntrySize; | 1376 intptr_t i = index * kEntrySize; |
1377 *offset ^= table.At(i); | 1377 *offset ^= table.At(i); |
1378 *info ^= table.At(i + 1); | 1378 *info ^= table.At(i + 1); |
1379 *reason ^= table.At(i + 2); | 1379 *reason ^= table.At(i + 2); |
1380 } | 1380 } |
1381 | 1381 |
1382 } // namespace dart | 1382 } // namespace dart |
OLD | NEW |