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

Side by Side Diff: runtime/vm/stack_frame_arm.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_arm.h ('k') | runtime/vm/stack_frame_ia32.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) 2011, 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_ARM)
7
8 #include "vm/instructions.h"
9 #include "vm/isolate.h"
10 #include "vm/stack_frame.h"
11
12 namespace dart {
13
14 // The constant kExitLinkOffsetInEntryFrame must be kept in sync with the
15 // code in the InvokeDartCode stub.
16 static const int kSavedContextOffsetInEntryFrame = -10 * kWordSize;
17 static const int kExitLinkOffsetInEntryFrame = -9 * kWordSize;
18 static const int kPcAddressOffsetFromSp = -2 * kWordSize;
19 static const int kEntrypointMarkerOffsetFromFp = 2 * kWordSize;
20 static const int kSpOffsetFromPreviousFp = 3 * kWordSize;
21
22
23 intptr_t StackFrame::PcAddressOffsetFromSp() {
24 return kPcAddressOffsetFromSp;
25 }
26
27
28 intptr_t StackFrame::EntrypointMarkerOffsetFromFp() {
29 return kEntrypointMarkerOffsetFromFp;
30 }
31
32
33 uword StackFrame::GetCallerSp() const {
34 return fp() + kSpOffsetFromPreviousFp;
35 }
36
37
38 uword StackFrame::GetCallerFp() const {
39 return *(reinterpret_cast<uword*>(fp()));
40 }
41
42
43 intptr_t EntryFrame::ExitLinkOffset() const {
44 return kExitLinkOffsetInEntryFrame;
45 }
46
47
48 intptr_t EntryFrame::SavedContextOffset() const {
49 return kSavedContextOffsetInEntryFrame;
50 }
51
52
53 void StackFrameIterator::SetupLastExitFrameData() {
54 Isolate* current = Isolate::Current();
55 uword exit_marker = current->top_exit_frame_info();
56 frames_.fp_ = exit_marker;
57 }
58
59
60 void StackFrameIterator::SetupNextExitFrameData() {
61 uword exit_address = entry_.fp() + kExitLinkOffsetInEntryFrame;
62 uword exit_marker = *reinterpret_cast<uword*>(exit_address);
63 frames_.fp_ = exit_marker;
64 frames_.sp_ = 0;
65 }
66
67 } // namespace dart
68
69 #endif // defined(TARGET_ARCH_ARM)
OLDNEW
« no previous file with comments | « runtime/vm/stack_frame_arm.h ('k') | runtime/vm/stack_frame_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698