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

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

Issue 12335102: Compile and simulate first dart function on arm generated from ast. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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/simulator_mips.cc ('k') | runtime/vm/stub_code_arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 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 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_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/instructions.h"
9 #include "vm/isolate.h"
8 #include "vm/stack_frame.h" 10 #include "vm/stack_frame.h"
9 11
10 namespace dart { 12 namespace dart {
11 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 = -1 * kWordSize;
19 static const int kSpOffsetFromPreviousFp = 3 * kWordSize;
20
21
12 intptr_t StackFrame::PcAddressOffsetFromSp() { 22 intptr_t StackFrame::PcAddressOffsetFromSp() {
13 UNIMPLEMENTED(); 23 return kPcAddressOffsetFromSp;
14 return 0; 24 }
25
26
27 uword StackFrame::GetCallerSp() const {
28 return fp() + kSpOffsetFromPreviousFp;
15 } 29 }
16 30
17 31
18 uword StackFrame::GetCallerFp() const { 32 uword StackFrame::GetCallerFp() const {
19 UNIMPLEMENTED(); 33 return *(reinterpret_cast<uword*>(fp()));
20 return 0;
21 }
22
23
24 uword StackFrame::GetCallerSp() const {
25 UNIMPLEMENTED();
26 return 0;
27 } 34 }
28 35
29 36
30 intptr_t EntryFrame::ExitLinkOffset() const { 37 intptr_t EntryFrame::ExitLinkOffset() const {
31 UNIMPLEMENTED(); 38 return kExitLinkOffsetInEntryFrame;
32 return 0;
33 } 39 }
34 40
35 41
36 intptr_t EntryFrame::SavedContextOffset() const { 42 intptr_t EntryFrame::SavedContextOffset() const {
37 UNIMPLEMENTED(); 43 return kSavedContextOffsetInEntryFrame;
38 return 0;
39 } 44 }
40 45
41 46
42 void StackFrameIterator::SetupLastExitFrameData() { 47 void StackFrameIterator::SetupLastExitFrameData() {
43 UNIMPLEMENTED(); 48 Isolate* current = Isolate::Current();
49 uword exit_marker = current->top_exit_frame_info();
50 frames_.fp_ = exit_marker;
44 } 51 }
45 52
46 53
47 void StackFrameIterator::SetupNextExitFrameData() { 54 void StackFrameIterator::SetupNextExitFrameData() {
48 UNIMPLEMENTED(); 55 uword exit_address = entry_.fp() + kExitLinkOffsetInEntryFrame;
56 uword exit_marker = *reinterpret_cast<uword*>(exit_address);
57 frames_.fp_ = exit_marker;
58 frames_.sp_ = 0;
49 } 59 }
50 60
51 } // namespace dart 61 } // namespace dart
52 62
53 #endif // defined(TARGET_ARCH_ARM) 63 #endif // defined(TARGET_ARCH_ARM)
OLDNEW
« no previous file with comments | « runtime/vm/simulator_mips.cc ('k') | runtime/vm/stub_code_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698