Index: test/cctest/test-dictionary.cc |
diff --git a/test/cctest/test-dictionary.cc b/test/cctest/test-dictionary.cc |
index 2abefae930edb463a1bf31b895e7e4680f51dbd9..44f64f788101cf8d8aa289ac3c81eed134b6934f 100644 |
--- a/test/cctest/test-dictionary.cc |
+++ b/test/cctest/test-dictionary.cc |
@@ -50,13 +50,13 @@ TEST(ObjectHashTable) { |
table = PutIntoObjectHashTable(table, a, b); |
CHECK_EQ(table->NumberOfElements(), 1); |
CHECK_EQ(table->Lookup(*a), *b); |
- CHECK_EQ(table->Lookup(*b), HEAP->the_hole_value()); |
+ CHECK_EQ(table->Lookup(*b), CcTest::heap()->the_hole_value()); |
// Keys still have to be valid after objects were moved. |
- HEAP->CollectGarbage(NEW_SPACE); |
+ CcTest::heap()->CollectGarbage(NEW_SPACE); |
CHECK_EQ(table->NumberOfElements(), 1); |
CHECK_EQ(table->Lookup(*a), *b); |
- CHECK_EQ(table->Lookup(*b), HEAP->the_hole_value()); |
+ CHECK_EQ(table->Lookup(*b), CcTest::heap()->the_hole_value()); |
// Keys that are overwritten should not change number of elements. |
table = PutIntoObjectHashTable(table, a, factory->NewJSArray(13)); |
@@ -67,7 +67,7 @@ TEST(ObjectHashTable) { |
table = PutIntoObjectHashTable(table, a, factory->the_hole_value()); |
CHECK_EQ(table->NumberOfElements(), 0); |
CHECK_EQ(table->NumberOfDeletedElements(), 1); |
- CHECK_EQ(table->Lookup(*a), HEAP->the_hole_value()); |
+ CHECK_EQ(table->Lookup(*a), CcTest::heap()->the_hole_value()); |
// Keys should map back to their respective values and also should get |
// an identity hash code generated. |
@@ -87,7 +87,7 @@ TEST(ObjectHashTable) { |
Handle<JSReceiver> key = factory->NewJSArray(7); |
CHECK(key->GetIdentityHash(ALLOW_CREATION)->ToObjectChecked()->IsSmi()); |
CHECK_EQ(table->FindEntry(*key), ObjectHashTable::kNotFound); |
- CHECK_EQ(table->Lookup(*key), HEAP->the_hole_value()); |
+ CHECK_EQ(table->Lookup(*key), CcTest::heap()->the_hole_value()); |
CHECK(key->GetIdentityHash(OMIT_CREATION)->ToObjectChecked()->IsSmi()); |
} |
@@ -95,8 +95,9 @@ TEST(ObjectHashTable) { |
// should not get an identity hash code generated. |
for (int i = 0; i < 100; i++) { |
Handle<JSReceiver> key = factory->NewJSArray(7); |
- CHECK_EQ(table->Lookup(*key), HEAP->the_hole_value()); |
- CHECK_EQ(key->GetIdentityHash(OMIT_CREATION), HEAP->undefined_value()); |
+ CHECK_EQ(table->Lookup(*key), CcTest::heap()->the_hole_value()); |
+ CHECK_EQ(key->GetIdentityHash(OMIT_CREATION), |
+ CcTest::heap()->undefined_value()); |
} |
} |
@@ -170,8 +171,8 @@ TEST(ObjectHashSetCausesGC) { |
// Simulate a full heap so that generating an identity hash code |
// in subsequent calls will request GC. |
- SimulateFullSpace(HEAP->new_space()); |
- SimulateFullSpace(HEAP->old_pointer_space()); |
+ SimulateFullSpace(CcTest::heap()->new_space()); |
+ SimulateFullSpace(CcTest::heap()->old_pointer_space()); |
// Calling Contains() should not cause GC ever. |
CHECK(!table->Contains(*key)); |
@@ -203,8 +204,8 @@ TEST(ObjectHashTableCausesGC) { |
// Simulate a full heap so that generating an identity hash code |
// in subsequent calls will request GC. |
- SimulateFullSpace(HEAP->new_space()); |
- SimulateFullSpace(HEAP->old_pointer_space()); |
+ SimulateFullSpace(CcTest::heap()->new_space()); |
+ SimulateFullSpace(CcTest::heap()->old_pointer_space()); |
// Calling Lookup() should not cause GC ever. |
CHECK(table->Lookup(*key)->IsTheHole()); |