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

Unified Diff: src/objects-inl.h

Issue 2812041: Extracting relocation info from the code object.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 6 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/objects.cc ('k') | src/spaces.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
===================================================================
--- src/objects-inl.h (revision 5008)
+++ src/objects-inl.h (working copy)
@@ -2784,7 +2784,7 @@
INT_ACCESSORS(Code, instruction_size, kInstructionSizeOffset)
-INT_ACCESSORS(Code, relocation_size, kRelocationSizeOffset)
+ACCESSORS(Code, relocation_info, ByteArray, kRelocationInfoOffset)
INT_ACCESSORS(Code, sinfo_size, kSInfoSizeOffset)
@@ -2793,16 +2793,31 @@
}
+byte* Code::instruction_end() {
+ return instruction_start() + instruction_size();
+}
+
+
int Code::body_size() {
- return RoundUp(instruction_size() + relocation_size(), kObjectAlignment);
+ return RoundUp(instruction_size(), kObjectAlignment);
}
+ByteArray* Code::unchecked_relocation_info() {
+ return reinterpret_cast<ByteArray*>(READ_FIELD(this, kRelocationInfoOffset));
+}
+
+
byte* Code::relocation_start() {
- return FIELD_ADDR(this, kHeaderSize + instruction_size());
+ return unchecked_relocation_info()->GetDataStartAddress();
}
+int Code::relocation_size() {
+ return unchecked_relocation_info()->length();
+}
+
+
byte* Code::entry() {
return instruction_start();
}
« no previous file with comments | « src/objects.cc ('k') | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698