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

Unified Diff: vm/object.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
Index: vm/object.h
===================================================================
--- vm/object.h (revision 7576)
+++ vm/object.h (working copy)
@@ -2207,6 +2207,7 @@
}
static RawCode* FinalizeCode(const Function& function, Assembler* assembler);
static RawCode* FinalizeStubCode(const char* name, Assembler* assembler);
+ static RawCode* LookupCode(uword pc);
int32_t GetPointerOffsetAt(int index) const {
return *PointerOffsetAddrAt(index);
@@ -2230,6 +2231,21 @@
const GrowableObjectArray& ic_data_objs) const;
private:
+ // An object finder visitor interface.
+ class FindRawCodeVisitor : public FindObjectVisitor {
+ public:
+ explicit FindRawCodeVisitor(uword pc) : pc_(pc) { }
+ virtual ~FindRawCodeVisitor() { }
+
+ // Check if object matches find condition.
+ virtual bool FindObject(RawObject* obj);
+
+ private:
+ uword pc_;
srdjan 2012/05/14 20:00:17 const?
siva 2012/05/15 23:52:39 Done.
+
+ DISALLOW_COPY_AND_ASSIGN(FindRawCodeVisitor);
+ };
+
static const intptr_t kEntrySize = sizeof(int32_t); // NOLINT
void set_instructions(RawInstructions* instructions) {

Powered by Google App Engine
This is Rietveld 408576698