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