Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Side by Side Diff: runtime/vm/stack_frame_mips.cc

Issue 14925005: Remove stack_frame_<arch>.cc files. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/stack_frame_mips.h ('k') | runtime/vm/stack_frame_x64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_MIPS)
7
8 #include "vm/stack_frame.h"
9
10 namespace dart {
11
12 // The constant kExitLinkOffsetInEntryFrame must be kept in sync with the
13 // code in the InvokeDartCode stub.
14 static const int kSavedContextOffsetInEntryFrame = -11 * kWordSize;
15 static const int kExitLinkOffsetInEntryFrame = -10 * kWordSize;
16 static const int kPcAddressOffsetFromSp = -2 * kWordSize;
17 static const int kEntrypointMarkerOffsetFromFp = 2 * kWordSize;
18 static const int kSpOffsetFromPreviousFp = 3 * kWordSize;
19
20
21 intptr_t StackFrame::PcAddressOffsetFromSp() {
22 return kPcAddressOffsetFromSp;
23 }
24
25
26 intptr_t StackFrame::EntrypointMarkerOffsetFromFp() {
27 return kEntrypointMarkerOffsetFromFp;
28 }
29
30
31 uword StackFrame::GetCallerFp() const {
32 return *(reinterpret_cast<uword*>(fp()));
33 }
34
35
36 uword StackFrame::GetCallerSp() const {
37 return fp() + kSpOffsetFromPreviousFp;
38 }
39
40
41 intptr_t EntryFrame::ExitLinkOffset() const {
42 return kExitLinkOffsetInEntryFrame;
43 }
44
45
46 intptr_t EntryFrame::SavedContextOffset() const {
47 return kSavedContextOffsetInEntryFrame;
48 }
49
50
51 void StackFrameIterator::SetupLastExitFrameData() {
52 Isolate* current = Isolate::Current();
53 uword exit_marker = current->top_exit_frame_info();
54 frames_.fp_ = exit_marker;
55 }
56
57
58 void StackFrameIterator::SetupNextExitFrameData() {
59 uword exit_address = entry_.fp() + kExitLinkOffsetInEntryFrame;
60 uword exit_marker = *reinterpret_cast<uword*>(exit_address);
61 frames_.fp_ = exit_marker;
62 frames_.sp_ = 0;
63 }
64
65 } // namespace dart
66
67 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/stack_frame_mips.h ('k') | runtime/vm/stack_frame_x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698