| 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/globals.h" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
| 7 | 7 |
| 8 #include "vm/stack_frame.h" | 8 #include "vm/stack_frame.h" |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| 11 | 11 |
| 12 // The constant kExitLinkOffsetInEntryFrame must be kept in sync with the |
| 13 // code in the InvokeDartCode stub. |
| 14 static const int kExitLinkOffsetInEntryFrame = -10 * kWordSize; |
| 12 static const int kPcAddressOffsetFromSp = -2 * kWordSize; | 15 static const int kPcAddressOffsetFromSp = -2 * kWordSize; |
| 13 static const int kEntrypointMarkerOffsetFromFp = 2 * kWordSize; | 16 static const int kEntrypointMarkerOffsetFromFp = 2 * kWordSize; |
| 14 static const int kSpOffsetFromPreviousFp = 3 * kWordSize; | 17 static const int kSpOffsetFromPreviousFp = 3 * kWordSize; |
| 15 | 18 |
| 16 | 19 |
| 17 intptr_t StackFrame::PcAddressOffsetFromSp() { | 20 intptr_t StackFrame::PcAddressOffsetFromSp() { |
| 18 return kPcAddressOffsetFromSp; | 21 return kPcAddressOffsetFromSp; |
| 19 } | 22 } |
| 20 | 23 |
| 21 | 24 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 47 | 50 |
| 48 | 51 |
| 49 void StackFrameIterator::SetupLastExitFrameData() { | 52 void StackFrameIterator::SetupLastExitFrameData() { |
| 50 Isolate* current = Isolate::Current(); | 53 Isolate* current = Isolate::Current(); |
| 51 uword exit_marker = current->top_exit_frame_info(); | 54 uword exit_marker = current->top_exit_frame_info(); |
| 52 frames_.fp_ = exit_marker; | 55 frames_.fp_ = exit_marker; |
| 53 } | 56 } |
| 54 | 57 |
| 55 | 58 |
| 56 void StackFrameIterator::SetupNextExitFrameData() { | 59 void StackFrameIterator::SetupNextExitFrameData() { |
| 57 UNIMPLEMENTED(); | 60 uword exit_address = entry_.fp() + kExitLinkOffsetInEntryFrame; |
| 61 uword exit_marker = *reinterpret_cast<uword*>(exit_address); |
| 62 frames_.fp_ = exit_marker; |
| 63 frames_.sp_ = 0; |
| 58 } | 64 } |
| 59 | 65 |
| 60 } // namespace dart | 66 } // namespace dart |
| 61 | 67 |
| 62 #endif // defined TARGET_ARCH_MIPS | 68 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |