Version 2.2.23
API change: Convert Unicode code points outside the basic multilingual
plane to the replacement character. Previous behavior was to silently
truncate the value to 16 bits.
Fixed crash: handle all flat string types in regexp replace.
Prevent invalid pre-parsing data passed in through the API from
crashing V8.
Performance improvements on all platforms.
Review URL: http://codereview.chromium.org/2814050
git-svn-id: http://v8.googlecode.com/svn/trunk@5033 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 79f2c97..0e45550 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -2807,7 +2807,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)
@@ -2816,13 +2816,28 @@
}
+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();
}