Index: test/cctest/test-heap.cc |
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc |
index b86b96db009cade488d690739f39329fc47eb20e..158e146967ce067485272c37ca6df11976066004 100644 |
--- a/test/cctest/test-heap.cc |
+++ b/test/cctest/test-heap.cc |
@@ -1018,9 +1018,7 @@ TEST(Regression39128) { |
CHECK_EQ(0, FixedArray::cast(jsobject->elements())->length()); |
CHECK_EQ(0, jsobject->properties()->length()); |
// Create a reference to object in new space in jsobject. |
- FieldIndex index = FieldIndex::ForInObjectOffset( |
- JSObject::kHeaderSize - kPointerSize); |
- jsobject->FastPropertyAtPut(index, array); |
+ jsobject->FastPropertyAtPut(-1, array); |
CHECK_EQ(0, static_cast<int>(*limit_addr - *top_addr)); |
@@ -2320,17 +2318,13 @@ TEST(OptimizedPretenuringMixedInObjectProperties) { |
v8::Utils::OpenHandle(*v8::Handle<v8::Object>::Cast(res)); |
CHECK(CcTest::heap()->InOldPointerSpace(*o)); |
- FieldIndex idx1 = FieldIndex::ForPropertyIndex(o->map(), 0); |
- FieldIndex idx2 = FieldIndex::ForPropertyIndex(o->map(), 1); |
- CHECK(CcTest::heap()->InOldPointerSpace(o->RawFastPropertyAt(idx1))); |
- CHECK(CcTest::heap()->InOldDataSpace(o->RawFastPropertyAt(idx2))); |
+ CHECK(CcTest::heap()->InOldPointerSpace(o->RawFastPropertyAt(0))); |
+ CHECK(CcTest::heap()->InOldDataSpace(o->RawFastPropertyAt(1))); |
- JSObject* inner_object = |
- reinterpret_cast<JSObject*>(o->RawFastPropertyAt(idx1)); |
+ JSObject* inner_object = reinterpret_cast<JSObject*>(o->RawFastPropertyAt(0)); |
CHECK(CcTest::heap()->InOldPointerSpace(inner_object)); |
- CHECK(CcTest::heap()->InOldDataSpace(inner_object->RawFastPropertyAt(idx1))); |
- CHECK(CcTest::heap()->InOldPointerSpace( |
- inner_object->RawFastPropertyAt(idx2))); |
+ CHECK(CcTest::heap()->InOldDataSpace(inner_object->RawFastPropertyAt(0))); |
+ CHECK(CcTest::heap()->InOldPointerSpace(inner_object->RawFastPropertyAt(1))); |
} |
@@ -3087,9 +3081,9 @@ TEST(Regress2211) { |
CHECK(value->Equals(obj->GetHiddenValue(v8_str("key string")))); |
// Check size. |
- FieldIndex index = FieldIndex::ForDescriptor(internal_obj->map(), 0); |
+ DescriptorArray* descriptors = internal_obj->map()->instance_descriptors(); |
ObjectHashTable* hashtable = ObjectHashTable::cast( |
- internal_obj->RawFastPropertyAt(index)); |
+ internal_obj->RawFastPropertyAt(descriptors->GetFieldIndex(0))); |
// HashTable header (5) and 4 initial entries (8). |
CHECK_LE(hashtable->SizeFor(hashtable->length()), 13 * kPointerSize); |
} |