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

Unified Diff: runtime/vm/stack_frame.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/scopes.cc ('k') | runtime/vm/stack_frame.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stack_frame.h
===================================================================
--- runtime/vm/stack_frame.h (revision 22469)
+++ runtime/vm/stack_frame.h (working copy)
@@ -37,18 +37,13 @@
uword sp() const { return sp_; }
uword fp() const { return fp_; }
uword pc() const {
- return *reinterpret_cast<uword*>(sp_ + PcAddressOffsetFromSp());
+ return *reinterpret_cast<uword*>(sp_ + (kSavedPcSlotFromSp * kWordSize));
}
void set_pc(uword value) {
- *reinterpret_cast<uword*>(sp_ + PcAddressOffsetFromSp()) = value;
+ *reinterpret_cast<uword*>(sp_ + (kSavedPcSlotFromSp * kWordSize)) = value;
}
- void SetEntrypointMarker(uword value) {
- ASSERT(!(IsStubFrame() || IsEntryFrame() || IsExitFrame()));
- *reinterpret_cast<uword*>(fp_ + EntrypointMarkerOffsetFromFp()) = value;
- }
-
// Visit objects in the frame.
virtual void VisitObjectPointers(ObjectPointerVisitor* visitor);
@@ -83,11 +78,13 @@
private:
RawCode* GetCodeObject() const;
- // Target specific implementations for locating pc and caller fp/sp values.
- static intptr_t PcAddressOffsetFromSp();
- static intptr_t EntrypointMarkerOffsetFromFp();
- uword GetCallerSp() const;
- uword GetCallerFp() const;
+ uword GetCallerSp() const {
+ return fp() + (kCallerSpSlotFromFp * kWordSize);
+ }
+ uword GetCallerFp() const {
+ return *(reinterpret_cast<uword*>(
+ fp() + (kSavedCallerFpSlotFromFp * kWordSize)));
+ }
uword fp_;
uword sp_;
@@ -142,8 +139,6 @@
private:
EntryFrame() { }
- intptr_t ExitLinkOffset() const;
- intptr_t SavedContextOffset() const;
friend class StackFrameIterator;
DISALLOW_COPY_AND_ASSIGN(EntryFrame);
@@ -176,8 +171,8 @@
if (fp_ == 0) {
return false;
}
- intptr_t offset = StackFrame::PcAddressOffsetFromSp();
- uword pc = *(reinterpret_cast<uword*>(sp_ + offset));
+ const uword pc = *(reinterpret_cast<uword*>(
+ sp_ + (kSavedPcSlotFromSp * kWordSize)));
return !StubCode::InInvocationStub(pc);
}
« no previous file with comments | « runtime/vm/scopes.cc ('k') | runtime/vm/stack_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698