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

Unified Diff: test/cctest/test-heap.cc

Issue 329463005: Revert 21720: "Introduce FieldIndex to unify and abstract property/field offset" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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/x64/stub-cache-x64.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « src/x64/stub-cache-x64.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698