| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/stack_frame.h" | 5 #include "vm/stack_frame.h" |
| 6 | 6 |
| 7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
| 8 #include "vm/deopt_instructions.h" | 8 #include "vm/deopt_instructions.h" |
| 9 #include "vm/isolate.h" | 9 #include "vm/isolate.h" |
| 10 #include "vm/object.h" | 10 #include "vm/object.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 RawObject** last = reinterpret_cast<RawObject**>( | 79 RawObject** last = reinterpret_cast<RawObject**>( |
| 80 fp() + (kFirstLocalSlotFromFp * kWordSize)); | 80 fp() + (kFirstLocalSlotFromFp * kWordSize)); |
| 81 | 81 |
| 82 // A stack map is present in the code object, use the stack map to | 82 // A stack map is present in the code object, use the stack map to |
| 83 // visit frame slots which are marked as having objects. | 83 // visit frame slots which are marked as having objects. |
| 84 // | 84 // |
| 85 // The layout of the frame is (lower addresses to the right): | 85 // The layout of the frame is (lower addresses to the right): |
| 86 // | spill slots | outgoing arguments | saved registers | | 86 // | spill slots | outgoing arguments | saved registers | |
| 87 // |XXXXXXXXXXXXX|--------------------|XXXXXXXXXXXXXXXXX| | 87 // |XXXXXXXXXXXXX|--------------------|XXXXXXXXXXXXXXXXX| |
| 88 // | 88 // |
| 89 // The splill slots and any saved registers are described in the stack | 89 // The spill slots and any saved registers are described in the stack |
| 90 // map. The outgoing arguments are assumed to be tagged; the number | 90 // map. The outgoing arguments are assumed to be tagged; the number |
| 91 // of outgoing arguments is not explicitly tracked. | 91 // of outgoing arguments is not explicitly tracked. |
| 92 // | 92 // |
| 93 // TODO(kmillikin): This does not handle slow path calls with | 93 // TODO(kmillikin): This does not handle slow path calls with |
| 94 // arguments, where the arguments are pushed after the live registers. | 94 // arguments, where the arguments are pushed after the live registers. |
| 95 // Enable such calls. | 95 // Enable such calls. |
| 96 intptr_t length = map.Length(); | 96 intptr_t length = map.Length(); |
| 97 // Spill slots are at the 'bottom' of the frame. | 97 // Spill slots are at the 'bottom' of the frame. |
| 98 intptr_t spill_slot_count = length - map.RegisterBitCount(); | 98 intptr_t spill_slot_count = length - map.RegisterBitCount(); |
| 99 for (intptr_t bit = 0; bit < spill_slot_count; ++bit) { | 99 for (intptr_t bit = 0; bit < spill_slot_count; ++bit) { |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 if (deopt_instr->kind() == DeoptInstr::kCallerFp) { | 424 if (deopt_instr->kind() == DeoptInstr::kCallerFp) { |
| 425 return index; | 425 return index; |
| 426 } | 426 } |
| 427 } | 427 } |
| 428 UNREACHABLE(); | 428 UNREACHABLE(); |
| 429 return 0; | 429 return 0; |
| 430 } | 430 } |
| 431 | 431 |
| 432 | 432 |
| 433 } // namespace dart | 433 } // namespace dart |
| OLD | NEW |