Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 01073ca7b08bd272520e1b1009d266a671411e7e..128b7b995360e941b940955eebb08613e8012af0 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -1313,6 +1313,12 @@ int JSObject::GetInternalFieldCount() { |
} |
+int JSObject::GetInternalFieldOffset(int index) { |
+ ASSERT(index < GetInternalFieldCount() && index >= 0); |
+ return GetHeaderSize() + (kPointerSize * index); |
+} |
+ |
+ |
Object* JSObject::GetInternalField(int index) { |
ASSERT(index < GetInternalFieldCount() && index >= 0); |
// Internal objects do follow immediately after the header, whereas in-object |
@@ -1364,6 +1370,14 @@ Object* JSObject::FastPropertyAtPut(int index, Object* value) { |
} |
+int JSObject::GetInObjectPropertyOffset(int index) { |
+ // Adjust for the number of properties stored in the object. |
+ index -= map()->inobject_properties(); |
+ ASSERT(index < 0); |
+ return map()->instance_size() + (index * kPointerSize); |
+} |
+ |
+ |
Object* JSObject::InObjectPropertyAt(int index) { |
// Adjust for the number of properties stored in the object. |
index -= map()->inobject_properties(); |