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

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

Issue 9429055: Required rename on x64 platform. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 10 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/instructions_x64_test.cc ('k') | no next file » | 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) 2012, 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_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/instructions.h" 8 #include "vm/instructions.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/stack_frame.h" 10 #include "vm/stack_frame.h"
11 11
12 namespace dart { 12 namespace dart {
13 13
14 // The constant kExitLinkOffsetInEntryFrame must be kept in sync with the 14 // The constant kExitLinkOffsetInEntryFrame must be kept in sync with the
15 // code in the InvokeDartCode stub. 15 // code in the InvokeDartCode stub.
16 static const int kExitLinkOffsetInEntryFrame = -8 * kWordSize; 16 static const int kExitLinkOffsetInEntryFrame = -8 * kWordSize;
17 static const int kPcAddressOffsetFromSp = -1 * kWordSize; 17 static const int kPcAddressOffsetFromSp = -1 * kWordSize;
18 static const int kSpOffsetFromPreviousFp = 2 * kWordSize; 18 static const int kSpOffsetFromPreviousFp = 2 * kWordSize;
19 19
20 20
21 static bool ExitedFromStub(uword exit_marker) { 21 static bool ExitedFromStub(uword exit_marker) {
22 if (exit_marker != 0) { 22 if (exit_marker != 0) {
23 uword caller_pc = *reinterpret_cast<uword*>(exit_marker + kWordSize); 23 uword caller_pc = *reinterpret_cast<uword*>(exit_marker + kWordSize);
24 uword call_instr_pc = caller_pc - Call::InstructionLength(); 24 uword call_instr_pc = caller_pc - CallPattern::InstructionLength();
25 uword call_target = Call(call_instr_pc).TargetAddress(); 25 uword call_target = CallPattern(call_instr_pc).TargetAddress();
26 return StubCode::InStubCallToRuntimeStubCode(call_target); 26 return StubCode::InStubCallToRuntimeStubCode(call_target);
27 } 27 }
28 return false; 28 return false;
29 } 29 }
30 30
31 31
32 intptr_t StackFrame::PcAddressOffsetFromSp() { 32 intptr_t StackFrame::PcAddressOffsetFromSp() {
33 return kPcAddressOffsetFromSp; 33 return kPcAddressOffsetFromSp;
34 } 34 }
35 35
(...skipping 25 matching lines...) Expand all
61 uword exit_address = entry_.fp() + kExitLinkOffsetInEntryFrame; 61 uword exit_address = entry_.fp() + kExitLinkOffsetInEntryFrame;
62 uword exit_marker = *reinterpret_cast<uword*>(exit_address); 62 uword exit_marker = *reinterpret_cast<uword*>(exit_address);
63 frames_.fp_ = exit_marker; 63 frames_.fp_ = exit_marker;
64 frames_.from_stub_exitframe_ = ExitedFromStub(exit_marker); 64 frames_.from_stub_exitframe_ = ExitedFromStub(exit_marker);
65 frames_.sp_ = 0; 65 frames_.sp_ = 0;
66 } 66 }
67 67
68 } // namespace dart 68 } // namespace dart
69 69
70 #endif // defined TARGET_ARCH_X64 70 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/instructions_x64_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698