summaryrefslogtreecommitdiff
path: root/deps/v8/test/cctest/test-code-stub-assembler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/cctest/test-code-stub-assembler.cc')
-rw-r--r--deps/v8/test/cctest/test-code-stub-assembler.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/deps/v8/test/cctest/test-code-stub-assembler.cc b/deps/v8/test/cctest/test-code-stub-assembler.cc
index 0c22f4503b..e7f592d1c5 100644
--- a/deps/v8/test/cctest/test-code-stub-assembler.cc
+++ b/deps/v8/test/cctest/test-code-stub-assembler.cc
@@ -14,6 +14,7 @@
#include "src/code-stub-assembler.h"
#include "src/compiler/node.h"
#include "src/debug/debug.h"
+#include "src/hash-seed-inl.h"
#include "src/heap/heap-inl.h"
#include "src/isolate.h"
#include "src/objects-inl.h"
@@ -21,9 +22,11 @@
#include "src/objects/heap-number-inl.h"
#include "src/objects/js-array-buffer-inl.h"
#include "src/objects/js-array-inl.h"
+#include "src/objects/ordered-hash-table-inl.h"
#include "src/objects/promise-inl.h"
#include "src/objects/smi.h"
#include "src/objects/struct-inl.h"
+#include "src/transitions-inl.h"
#include "test/cctest/compiler/code-assembler-tester.h"
#include "test/cctest/compiler/function-tester.h"
@@ -348,7 +351,7 @@ TEST(ComputeIntegerHash) {
Handle<Smi> key(Smi::FromInt(k), isolate);
Handle<Object> result = ft.Call(key).ToHandleChecked();
- uint32_t hash = ComputeSeededHash(k, isolate->heap()->HashSeed());
+ uint32_t hash = ComputeSeededHash(k, HashSeed(isolate));
Smi expected = Smi::FromInt(hash);
CHECK_EQ(expected, Smi::cast(*result));
}
@@ -1708,14 +1711,13 @@ TEST(AllocateNameDictionary) {
{
for (int i = 0; i < 256; i = i * 1.1 + 1) {
- Handle<Object> result =
- ft.Call(handle(Smi::FromInt(i), isolate)).ToHandleChecked();
+ Handle<HeapObject> result = Handle<HeapObject>::cast(
+ ft.Call(handle(Smi::FromInt(i), isolate)).ToHandleChecked());
Handle<NameDictionary> dict = NameDictionary::New(isolate, i);
// Both dictionaries should be memory equal.
- int size =
- FixedArrayBase::kHeaderSize + (dict->length() - 1) * kPointerSize;
- CHECK_EQ(0, memcmp(reinterpret_cast<void*>(dict->ptr()),
- reinterpret_cast<void*>(result->ptr()), size));
+ int size = dict->Size();
+ CHECK_EQ(0, memcmp(reinterpret_cast<void*>(dict->address()),
+ reinterpret_cast<void*>(result->address()), size));
}
}
}
@@ -2089,10 +2091,10 @@ class AppendJSArrayCodeStubAssembler : public CodeStubAssembler {
Handle<JSArray> array = isolate->factory()->NewJSArray(
kind_, 2, initial_size, INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE);
Object::SetElement(isolate, array, 0, Handle<Smi>(Smi::FromInt(1), isolate),
- LanguageMode::kSloppy)
+ kDontThrow)
.Check();
Object::SetElement(isolate, array, 1, Handle<Smi>(Smi::FromInt(2), isolate),
- LanguageMode::kSloppy)
+ kDontThrow)
.Check();
CodeStubArguments args(this, IntPtrConstant(kNumParams));
TVariable<IntPtrT> arg_index(this);