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 static const int kPcAddressOffsetFromSp = -2 * kWordSize; |
| 13 static const int kEntrypointMarkerOffsetFromFp = 2 * kWordSize; |
| 14 static const int kSpOffsetFromPreviousFp = 3 * kWordSize; |
| 15 |
| 16 |
12 intptr_t StackFrame::PcAddressOffsetFromSp() { | 17 intptr_t StackFrame::PcAddressOffsetFromSp() { |
13 UNIMPLEMENTED(); | 18 return kPcAddressOffsetFromSp; |
14 return 0; | |
15 } | 19 } |
16 | 20 |
17 | 21 |
18 intptr_t StackFrame::EntrypointMarkerOffsetFromFp() { | 22 intptr_t StackFrame::EntrypointMarkerOffsetFromFp() { |
19 UNIMPLEMENTED(); | 23 return kEntrypointMarkerOffsetFromFp; |
20 return 0; | |
21 } | 24 } |
22 | 25 |
23 | 26 |
24 uword StackFrame::GetCallerFp() const { | 27 uword StackFrame::GetCallerFp() const { |
25 UNIMPLEMENTED(); | 28 return *(reinterpret_cast<uword*>(fp())); |
26 return 0; | |
27 } | 29 } |
28 | 30 |
29 | 31 |
30 uword StackFrame::GetCallerSp() const { | 32 uword StackFrame::GetCallerSp() const { |
31 UNIMPLEMENTED(); | 33 return fp() + kSpOffsetFromPreviousFp; |
32 return 0; | |
33 } | 34 } |
34 | 35 |
35 | 36 |
36 intptr_t EntryFrame::ExitLinkOffset() const { | 37 intptr_t EntryFrame::ExitLinkOffset() const { |
37 UNIMPLEMENTED(); | 38 UNIMPLEMENTED(); |
38 return 0; | 39 return 0; |
39 } | 40 } |
40 | 41 |
41 | 42 |
42 intptr_t EntryFrame::SavedContextOffset() const { | 43 intptr_t EntryFrame::SavedContextOffset() const { |
43 UNIMPLEMENTED(); | 44 UNIMPLEMENTED(); |
44 return 0; | 45 return 0; |
45 } | 46 } |
46 | 47 |
47 | 48 |
48 void StackFrameIterator::SetupLastExitFrameData() { | 49 void StackFrameIterator::SetupLastExitFrameData() { |
49 UNIMPLEMENTED(); | 50 Isolate* current = Isolate::Current(); |
| 51 uword exit_marker = current->top_exit_frame_info(); |
| 52 frames_.fp_ = exit_marker; |
50 } | 53 } |
51 | 54 |
52 | 55 |
53 void StackFrameIterator::SetupNextExitFrameData() { | 56 void StackFrameIterator::SetupNextExitFrameData() { |
54 UNIMPLEMENTED(); | 57 UNIMPLEMENTED(); |
55 } | 58 } |
56 | 59 |
57 } // namespace dart | 60 } // namespace dart |
58 | 61 |
59 #endif // defined TARGET_ARCH_MIPS | 62 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |