diff options
author | Michaël Zasso <targos@protonmail.com> | 2019-08-01 08:38:30 +0200 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2019-08-01 12:53:56 +0200 |
commit | 2dcc3665abf57c3607cebffdeeca062f5894885d (patch) | |
tree | 4f560748132edcfb4c22d6f967a7e80d23d7ea2c /deps/v8/test/cctest/test-dictionary.cc | |
parent | 1ee47d550c6de132f06110aa13eceb7551d643b3 (diff) | |
download | node-new-2dcc3665abf57c3607cebffdeeca062f5894885d.tar.gz |
deps: update V8 to 7.6.303.28
PR-URL: https://github.com/nodejs/node/pull/28016
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann (רפאל פלחי) <refack@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Diffstat (limited to 'deps/v8/test/cctest/test-dictionary.cc')
-rw-r--r-- | deps/v8/test/cctest/test-dictionary.cc | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/deps/v8/test/cctest/test-dictionary.cc b/deps/v8/test/cctest/test-dictionary.cc index a06c18df02..1f4a4c59a0 100644 --- a/deps/v8/test/cctest/test-dictionary.cc +++ b/deps/v8/test/cctest/test-dictionary.cc @@ -25,18 +25,18 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include "src/v8.h" +#include "src/init/v8.h" #include "test/cctest/cctest.h" #include "src/builtins/builtins-constructor.h" #include "src/debug/debug.h" -#include "src/execution.h" -#include "src/global-handles.h" +#include "src/execution/execution.h" +#include "src/handles/global-handles.h" #include "src/heap/factory.h" #include "src/heap/spaces.h" -#include "src/objects-inl.h" #include "src/objects/hash-table-inl.h" -#include "src/roots.h" +#include "src/objects/objects-inl.h" +#include "src/roots/roots.h" #include "test/cctest/heap/heap-utils.h" namespace v8 { @@ -86,17 +86,17 @@ static void TestHashMap(Handle<HashMap> table) { CHECK_EQ(table->NumberOfElements(), i + 1); CHECK_NE(table->FindEntry(isolate, key), HashMap::kNotFound); CHECK_EQ(table->Lookup(key), *value); - CHECK(key->GetIdentityHash()->IsSmi()); + CHECK(key->GetIdentityHash().IsSmi()); } // Keys never added to the map which already have an identity hash // code should not be found. for (int i = 0; i < 100; i++) { Handle<JSReceiver> key = factory->NewJSArray(7); - CHECK(key->GetOrCreateIdentityHash(isolate)->IsSmi()); + CHECK(key->GetOrCreateIdentityHash(isolate).IsSmi()); CHECK_EQ(table->FindEntry(isolate, key), HashMap::kNotFound); CHECK_EQ(table->Lookup(key), roots.the_hole_value()); - CHECK(key->GetIdentityHash()->IsSmi()); + CHECK(key->GetIdentityHash().IsSmi()); } // Keys that don't have an identity hash should not be found and also @@ -157,16 +157,16 @@ static void TestHashSet(Handle<HashSet> table) { table = HashSet::Add(isolate, table, key); CHECK_EQ(table->NumberOfElements(), i + 2); CHECK(table->Has(isolate, key)); - CHECK(key->GetIdentityHash()->IsSmi()); + CHECK(key->GetIdentityHash().IsSmi()); } // Keys never added to the map which already have an identity hash // code should not be found. for (int i = 0; i < 100; i++) { Handle<JSReceiver> key = factory->NewJSArray(7); - CHECK(key->GetOrCreateIdentityHash(isolate)->IsSmi()); + CHECK(key->GetOrCreateIdentityHash(isolate).IsSmi()); CHECK(!table->Has(isolate, key)); - CHECK(key->GetIdentityHash()->IsSmi()); + CHECK(key->GetIdentityHash().IsSmi()); } // Keys that don't have an identity hash should not be found and also @@ -215,26 +215,26 @@ TEST(HashTableRehash) { { Handle<ObjectHashTable> table = ObjectHashTable::New(isolate, 100); ObjectHashTableTest t(*table); - int capacity = t->capacity(); + int capacity = t.capacity(); for (int i = 0; i < capacity - 1; i++) { - t->insert(i, i * i, i); + t.insert(i, i * i, i); } - t->Rehash(ReadOnlyRoots(isolate)); + t.Rehash(ReadOnlyRoots(isolate)); for (int i = 0; i < capacity - 1; i++) { - CHECK_EQ(i, t->lookup(i * i)); + CHECK_EQ(i, t.lookup(i * i)); } } // Test half-filled table. { Handle<ObjectHashTable> table = ObjectHashTable::New(isolate, 100); ObjectHashTableTest t(*table); - int capacity = t->capacity(); + int capacity = t.capacity(); for (int i = 0; i < capacity / 2; i++) { - t->insert(i, i * i, i); + t.insert(i, i * i, i); } - t->Rehash(ReadOnlyRoots(isolate)); + t.Rehash(ReadOnlyRoots(isolate)); for (int i = 0; i < capacity / 2; i++) { - CHECK_EQ(i, t->lookup(i * i)); + CHECK_EQ(i, t.lookup(i * i)); } } } @@ -285,7 +285,7 @@ static void TestHashMapDoesNotCauseGC(Handle<HashMap> table) { heap::SimulateFullSpace(CcTest::heap()->old_space()); // Calling Lookup() should not cause GC ever. - CHECK(table->Lookup(key)->IsTheHole(isolate)); + CHECK(table->Lookup(key).IsTheHole(isolate)); // Calling Put() should request GC by returning a failure. int gc_count = isolate->heap()->gc_count(); |