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 "platform/memory_sanitizer.h" | 7 #include "platform/memory_sanitizer.h" |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/deopt_instructions.h" | 9 #include "vm/deopt_instructions.h" |
10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 code = GetCodeObject(); | 98 code = GetCodeObject(); |
99 if (!code.IsNull()) { | 99 if (!code.IsNull()) { |
100 // Visit the code object. | 100 // Visit the code object. |
101 RawObject* raw_code = code.raw(); | 101 RawObject* raw_code = code.raw(); |
102 visitor->VisitPointer(&raw_code); | 102 visitor->VisitPointer(&raw_code); |
103 | 103 |
104 // Optimized frames have a stack map. We need to visit the frame based | 104 // Optimized frames have a stack map. We need to visit the frame based |
105 // on the stack map. | 105 // on the stack map. |
106 Array maps; | 106 Array maps; |
107 maps = Array::null(); | 107 maps = Array::null(); |
108 Stackmap map; | 108 StackMap map; |
109 const uword start = Instructions::PayloadStart(code.instructions()); | 109 const uword start = Instructions::PayloadStart(code.instructions()); |
110 map = code.GetStackmap(pc() - start, &maps, &map); | 110 map = code.GetStackMap(pc() - start, &maps, &map); |
111 if (!map.IsNull()) { | 111 if (!map.IsNull()) { |
112 #if !defined(TARGET_ARCH_DBC) | 112 #if !defined(TARGET_ARCH_DBC) |
113 RawObject** first = reinterpret_cast<RawObject**>(sp()); | 113 RawObject** first = reinterpret_cast<RawObject**>(sp()); |
114 RawObject** last = reinterpret_cast<RawObject**>( | 114 RawObject** last = reinterpret_cast<RawObject**>( |
115 fp() + (kFirstLocalSlotFromFp * kWordSize)); | 115 fp() + (kFirstLocalSlotFromFp * kWordSize)); |
116 | 116 |
117 // A stack map is present in the code object, use the stack map to | 117 // A stack map is present in the code object, use the stack map to |
118 // visit frame slots which are marked as having objects. | 118 // visit frame slots which are marked as having objects. |
119 // | 119 // |
120 // The layout of the frame is (lower addresses to the right): | 120 // The layout of the frame is (lower addresses to the right): |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 StackFrameIterator frames(StackFrameIterator::kValidateFrames); | 572 StackFrameIterator frames(StackFrameIterator::kValidateFrames); |
573 StackFrame* frame = frames.NextFrame(); | 573 StackFrame* frame = frames.NextFrame(); |
574 while (frame != NULL) { | 574 while (frame != NULL) { |
575 frame = frames.NextFrame(); | 575 frame = frames.NextFrame(); |
576 } | 576 } |
577 } | 577 } |
578 #endif | 578 #endif |
579 | 579 |
580 | 580 |
581 } // namespace dart | 581 } // namespace dart |
OLD | NEW |