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

Unified Diff: vm/stack_frame.h

Issue 10375059: Use a reserved stack local variable to store the Code object so that it can be looked up easily whe… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 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 | « vm/raw_object.h ('k') | vm/stack_frame.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/stack_frame.h
===================================================================
--- vm/stack_frame.h (revision 7669)
+++ vm/stack_frame.h (working copy)
@@ -31,6 +31,11 @@
*reinterpret_cast<uword*>(sp_ + PcAddressOffsetFromSp()) = value;
}
+ void SetEntrypointMarker(uword value) {
+ ASSERT(!(IsStubFrame() || IsEntryFrame() || IsExitFrame()));
+ *reinterpret_cast<uword*>(fp_ - kWordSize) = value;
+ }
+
// Visit objects in the frame.
virtual void VisitObjectPointers(ObjectPointerVisitor* visitor);
@@ -43,7 +48,7 @@
// Frame type.
virtual bool IsDartFrame() const {
ASSERT(IsValid());
- return !(IsStubFrame() || IsEntryFrame() || IsExitFrame());
+ return !(IsEntryFrame() || IsExitFrame() || IsStubFrame());
}
virtual bool IsStubFrame() const;
virtual bool IsEntryFrame() const { return false; }
@@ -53,10 +58,6 @@
RawCode* LookupDartCode() const;
bool FindExceptionHandler(uword* handler_pc) const;
- // Find code object corresponding to pc (only frames running dart code or
- // stub code will have a code object associated with them).
- static RawCode* LookupCode(Isolate* isolate, uword pc);
-
protected:
StackFrame() : fp_(0), sp_(0) { }
@@ -64,21 +65,8 @@
virtual const char* GetName() const { return IsStubFrame()? "stub" : "dart"; }
private:
- // An object finder visitor interface.
- class FindRawCodeVisitor : public FindObjectVisitor {
- public:
- explicit FindRawCodeVisitor(uword pc) : pc_(pc) { }
- virtual ~FindRawCodeVisitor() { }
+ RawCode* GetCodeObject() const;
- // Check if object matches find condition.
- virtual bool FindObject(RawObject* obj);
-
- private:
- uword pc_;
-
- DISALLOW_COPY_AND_ASSIGN(FindRawCodeVisitor);
- };
-
// Target specific implementations for locating pc and caller fp/sp values.
static intptr_t PcAddressOffsetFromSp();
uword GetCallerSp() const;
« no previous file with comments | « vm/raw_object.h ('k') | vm/stack_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698