| Index: test/cctest/test-dictionary.cc
|
| diff --git a/test/cctest/test-dictionary.cc b/test/cctest/test-dictionary.cc
|
| index b9e8b1ec061c94a896663bba07db901463cc46e5..44f64f788101cf8d8aa289ac3c81eed134b6934f 100644
|
| --- a/test/cctest/test-dictionary.cc
|
| +++ b/test/cctest/test-dictionary.cc
|
| @@ -41,7 +41,7 @@ using namespace v8::internal;
|
|
|
| TEST(ObjectHashTable) {
|
| LocalContext context;
|
| - Isolate* isolate = Isolate::Current();
|
| + Isolate* isolate = CcTest::i_isolate();
|
| Factory* factory = isolate->factory();
|
| v8::HandleScope scope(context->GetIsolate());
|
| Handle<ObjectHashTable> table = factory->NewObjectHashTable(23);
|
| @@ -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());
|
| }
|
| }
|
|
|
| @@ -120,7 +121,7 @@ class ObjectHashTableTest: public ObjectHashTable {
|
|
|
| TEST(HashTableRehash) {
|
| LocalContext context;
|
| - Isolate* isolate = Isolate::Current();
|
| + Isolate* isolate = CcTest::i_isolate();
|
| Factory* factory = isolate->factory();
|
| v8::HandleScope scope(context->GetIsolate());
|
| // Test almost filled table.
|
| @@ -156,7 +157,7 @@ TEST(HashTableRehash) {
|
| TEST(ObjectHashSetCausesGC) {
|
| i::FLAG_stress_compaction = false;
|
| LocalContext context;
|
| - Isolate* isolate = Isolate::Current();
|
| + Isolate* isolate = CcTest::i_isolate();
|
| Factory* factory = isolate->factory();
|
| v8::HandleScope scope(context->GetIsolate());
|
| Handle<ObjectHashSet> table = factory->NewObjectHashSet(1);
|
| @@ -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));
|
| @@ -189,7 +190,7 @@ TEST(ObjectHashSetCausesGC) {
|
| TEST(ObjectHashTableCausesGC) {
|
| i::FLAG_stress_compaction = false;
|
| LocalContext context;
|
| - Isolate* isolate = Isolate::Current();
|
| + Isolate* isolate = CcTest::i_isolate();
|
| Factory* factory = isolate->factory();
|
| v8::HandleScope scope(context->GetIsolate());
|
| Handle<ObjectHashTable> table = factory->NewObjectHashTable(1);
|
| @@ -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());
|
|
|