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

Unified Diff: src/objects.h

Issue 3156028: Change code pointer in function objects to a pointer to the first... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 4 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 | « src/mark-compact.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
===================================================================
--- src/objects.h (revision 5298)
+++ src/objects.h (working copy)
@@ -2887,6 +2887,9 @@
// Convert a target address into a code object.
static inline Code* GetCodeFromTargetAddress(Address address);
+ // Convert an entry address into an object.
+ static inline Object* GetObjectFromEntryAddress(Address location_of_address);
+
// Returns the address of the first instruction.
inline byte* instruction_start();
@@ -3707,6 +3710,10 @@
// Casting.
static inline JSFunction* cast(Object* obj);
+ // Iterates the objects, including code objects indirectly referenced
+ // through pointers to the first instruction in the code object.
+ void JSFunctionIterateBody(int object_size, ObjectVisitor* v);
+
// Dispatched behavior.
#ifdef DEBUG
void JSFunctionPrint();
@@ -3720,9 +3727,9 @@
static Context* GlobalContextFromLiterals(FixedArray* literals);
// Layout descriptors.
- static const int kCodeOffset = JSObject::kHeaderSize;
+ static const int kCodeEntryOffset = JSObject::kHeaderSize;
static const int kPrototypeOrInitialMapOffset =
- kCodeOffset + kPointerSize;
+ kCodeEntryOffset + kPointerSize;
static const int kSharedFunctionInfoOffset =
kPrototypeOrInitialMapOffset + kPointerSize;
static const int kContextOffset = kSharedFunctionInfoOffset + kPointerSize;
@@ -5437,6 +5444,9 @@
// Visits a code target in the instruction stream.
virtual void VisitCodeTarget(RelocInfo* rinfo);
+ // Visits a code entry in a JS function.
+ virtual void VisitCodeEntry(Address entry_address);
+
// Visits a runtime entry in the instruction stream.
virtual void VisitRuntimeEntry(RelocInfo* rinfo) {}
« no previous file with comments | « src/mark-compact.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698