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