From 2883c855e0105b51e5c8020d21458af109ffe3d4 Mon Sep 17 00:00:00 2001 From: Matheus Marchini Date: Thu, 5 Mar 2020 10:49:19 -0800 Subject: deps: update V8 to 8.1.307.20 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/32116 Reviewed-By: Michaƫl Zasso Reviewed-By: Jiawen Geng Reviewed-By: Ruben Bridgewater --- .../interpreter/bytecode-array-builder-unittest.cc | 9 +--- .../bytecode-array-iterator-unittest.cc | 2 +- .../bytecode-array-random-iterator-unittest.cc | 14 +++--- .../interpreter/constant-array-builder-unittest.cc | 14 +++--- .../interpreter/interpreter-assembler-unittest.cc | 55 +--------------------- 5 files changed, 18 insertions(+), 76 deletions(-) (limited to 'deps/v8/test/unittests/interpreter') diff --git a/deps/v8/test/unittests/interpreter/bytecode-array-builder-unittest.cc b/deps/v8/test/unittests/interpreter/bytecode-array-builder-unittest.cc index 667bfee64b..7591a30f6b 100644 --- a/deps/v8/test/unittests/interpreter/bytecode-array-builder-unittest.cc +++ b/deps/v8/test/unittests/interpreter/bytecode-array-builder-unittest.cc @@ -447,7 +447,7 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) { // Generate BytecodeArray. scope.SetScriptScopeInfo(factory->NewScopeInfo(1)); - ast_factory.Internalize(isolate()); + ast_factory.Internalize(isolate()->factory()); Handle the_array = builder.ToBytecodeArray(isolate()); CHECK_EQ(the_array->frame_size(), builder.total_register_count() * kSystemPointerSize); @@ -493,7 +493,6 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) { #undef CHECK_BYTECODE_PRESENT } - TEST_F(BytecodeArrayBuilderTest, FrameSizesLookGood) { for (int locals = 0; locals < 5; locals++) { for (int temps = 0; temps < 3; temps++) { @@ -520,7 +519,6 @@ TEST_F(BytecodeArrayBuilderTest, FrameSizesLookGood) { } } - TEST_F(BytecodeArrayBuilderTest, RegisterValues) { int index = 1; @@ -532,7 +530,6 @@ TEST_F(BytecodeArrayBuilderTest, RegisterValues) { CHECK_EQ(actual_index, index); } - TEST_F(BytecodeArrayBuilderTest, Parameters) { BytecodeArrayBuilder builder(zone(), 10, 0); @@ -541,7 +538,6 @@ TEST_F(BytecodeArrayBuilderTest, Parameters) { CHECK_EQ(param8.index() - receiver.index(), 9); } - TEST_F(BytecodeArrayBuilderTest, Constants) { BytecodeArrayBuilder builder(zone(), 1, 0); AstValueFactory ast_factory(zone(), isolate()->ast_string_constants(), @@ -564,7 +560,7 @@ TEST_F(BytecodeArrayBuilderTest, Constants) { .LoadLiteral(nan) .Return(); - ast_factory.Internalize(isolate()); + ast_factory.Internalize(isolate()->factory()); Handle array = builder.ToBytecodeArray(isolate()); // Should only have one entry for each identical constant. EXPECT_EQ(4, array->constant_pool().length()); @@ -695,7 +691,6 @@ TEST_F(BytecodeArrayBuilderTest, ForwardJumps) { iterator.Advance(); } - TEST_F(BytecodeArrayBuilderTest, BackwardJumps) { BytecodeArrayBuilder builder(zone(), 1, 1); diff --git a/deps/v8/test/unittests/interpreter/bytecode-array-iterator-unittest.cc b/deps/v8/test/unittests/interpreter/bytecode-array-iterator-unittest.cc index b2eedd9807..23f0d08c1c 100644 --- a/deps/v8/test/unittests/interpreter/bytecode-array-iterator-unittest.cc +++ b/deps/v8/test/unittests/interpreter/bytecode-array-iterator-unittest.cc @@ -73,7 +73,7 @@ TEST_F(BytecodeArrayIteratorTest, IteratesBytecodeArray) { .Return(); // Test iterator sees the expected output from the builder. - ast_factory.Internalize(isolate()); + ast_factory.Internalize(isolate()->factory()); BytecodeArrayIterator iterator(builder.ToBytecodeArray(isolate())); const int kPrefixByteSize = 1; int offset = 0; diff --git a/deps/v8/test/unittests/interpreter/bytecode-array-random-iterator-unittest.cc b/deps/v8/test/unittests/interpreter/bytecode-array-random-iterator-unittest.cc index 466062b563..9553058d8d 100644 --- a/deps/v8/test/unittests/interpreter/bytecode-array-random-iterator-unittest.cc +++ b/deps/v8/test/unittests/interpreter/bytecode-array-random-iterator-unittest.cc @@ -66,7 +66,7 @@ TEST_F(BytecodeArrayRandomIteratorTest, InvalidBeforeStart) { .Debugger() .Return(); - ast_factory.Internalize(isolate()); + ast_factory.Internalize(isolate()->factory()); Handle bytecodeArray = builder.ToBytecodeArray(isolate()); BytecodeArrayRandomIterator iterator(bytecodeArray, zone()); @@ -120,7 +120,7 @@ TEST_F(BytecodeArrayRandomIteratorTest, InvalidAfterEnd) { .Debugger() .Return(); - ast_factory.Internalize(isolate()); + ast_factory.Internalize(isolate()->factory()); Handle bytecodeArray = builder.ToBytecodeArray(isolate()); BytecodeArrayRandomIterator iterator(bytecodeArray, zone()); @@ -174,7 +174,7 @@ TEST_F(BytecodeArrayRandomIteratorTest, AccessesFirst) { .Debugger() .Return(); - ast_factory.Internalize(isolate()); + ast_factory.Internalize(isolate()->factory()); Handle bytecodeArray = builder.ToBytecodeArray(isolate()); BytecodeArrayRandomIterator iterator(bytecodeArray, zone()); @@ -233,7 +233,7 @@ TEST_F(BytecodeArrayRandomIteratorTest, AccessesLast) { .Debugger() .Return(); - ast_factory.Internalize(isolate()); + ast_factory.Internalize(isolate()->factory()); Handle bytecodeArray = builder.ToBytecodeArray(isolate()); BytecodeArrayRandomIterator iterator(bytecodeArray, zone()); @@ -294,7 +294,7 @@ TEST_F(BytecodeArrayRandomIteratorTest, RandomAccessValid) { .Return(); // Test iterator sees the expected output from the builder. - ast_factory.Internalize(isolate()); + ast_factory.Internalize(isolate()->factory()); BytecodeArrayRandomIterator iterator(builder.ToBytecodeArray(isolate()), zone()); const int kPrefixByteSize = 1; @@ -480,7 +480,7 @@ TEST_F(BytecodeArrayRandomIteratorTest, IteratesBytecodeArray) { .Return(); // Test iterator sees the expected output from the builder. - ast_factory.Internalize(isolate()); + ast_factory.Internalize(isolate()->factory()); BytecodeArrayRandomIterator iterator(builder.ToBytecodeArray(isolate()), zone()); const int kPrefixByteSize = 1; @@ -761,7 +761,7 @@ TEST_F(BytecodeArrayRandomIteratorTest, IteratesBytecodeArrayBackwards) { .Return(); // Test iterator sees the expected output from the builder. - ast_factory.Internalize(isolate()); + ast_factory.Internalize(isolate()->factory()); Handle bytecodeArray = builder.ToBytecodeArray(isolate()); BytecodeArrayRandomIterator iterator(bytecodeArray, zone()); const int kPrefixByteSize = 1; diff --git a/deps/v8/test/unittests/interpreter/constant-array-builder-unittest.cc b/deps/v8/test/unittests/interpreter/constant-array-builder-unittest.cc index bfe83b03ca..680479754a 100644 --- a/deps/v8/test/unittests/interpreter/constant-array-builder-unittest.cc +++ b/deps/v8/test/unittests/interpreter/constant-array-builder-unittest.cc @@ -40,7 +40,7 @@ TEST_F(ConstantArrayBuilderTest, AllocateAllEntries) { builder.Insert(i + 0.5); } CHECK_EQ(builder.size(), k16BitCapacity); - ast_factory.Internalize(isolate()); + ast_factory.Internalize(isolate()->factory()); for (size_t i = 0; i < k16BitCapacity; i++) { CHECK_EQ( Handle::cast(builder.At(i, isolate()).ToHandleChecked()) @@ -90,7 +90,7 @@ TEST_F(ConstantArrayBuilderTest, ToLargeFixedArrayWithReservations) { for (int i = 0; i < kNumberOfElements; i++) { builder.CommitReservedEntry(builder.CreateReservedEntry(), Smi::FromInt(i)); } - ast_factory.Internalize(isolate()); + ast_factory.Internalize(isolate()->factory()); Handle constant_array = builder.ToFixedArray(isolate()); ASSERT_EQ(kNumberOfElements, constant_array->length()); for (int i = 0; i < kNumberOfElements; i++) { @@ -149,7 +149,7 @@ TEST_F(ConstantArrayBuilderTest, AllocateEntriesWithIdx8Reservations) { builder.DiscardReservedEntry(OperandSize::kByte); } - ast_factory.Internalize(isolate()); + ast_factory.Internalize(isolate()->factory()); Handle constant_array = builder.ToFixedArray(isolate()); CHECK_EQ(constant_array->length(), static_cast(2 * k8BitCapacity + reserved)); @@ -203,7 +203,7 @@ TEST_F(ConstantArrayBuilderTest, AllocateEntriesWithWideReservations) { CHECK_EQ(builder.size(), i + 1); } - ast_factory.Internalize(isolate()); + ast_factory.Internalize(isolate()->factory()); Handle constant_array = builder.ToFixedArray(isolate()); CHECK_EQ(constant_array->length(), static_cast(k8BitCapacity + reserved)); @@ -234,7 +234,7 @@ TEST_F(ConstantArrayBuilderTest, GapFilledWhenLowReservationCommitted) { Smi::FromInt(static_cast(i))); CHECK_EQ(builder.size(), 2 * k8BitCapacity); } - ast_factory.Internalize(isolate()); + ast_factory.Internalize(isolate()->factory()); Handle constant_array = builder.ToFixedArray(isolate()); CHECK_EQ(constant_array->length(), static_cast(2 * k8BitCapacity)); for (size_t i = 0; i < k8BitCapacity; i++) { @@ -300,7 +300,7 @@ TEST_F(ConstantArrayBuilderTest, HolesWithUnusedReservations) { builder.DiscardReservedEntry(OperandSize::kByte); } - ast_factory.Internalize(isolate()); + ast_factory.Internalize(isolate()->factory()); Handle constant_array = builder.ToFixedArray(isolate()); CHECK_EQ(constant_array->length(), k8BitCapacity + 1); for (int i = kNumberOfHoles; i < k8BitCapacity; i++) { @@ -343,7 +343,7 @@ TEST_F(ConstantArrayBuilderTest, ReservationsAtAllScales) { builder.DiscardReservedEntry(OperandSize::kQuad); } - ast_factory.Internalize(isolate()); + ast_factory.Internalize(isolate()->factory()); Handle constant_array = builder.ToFixedArray(isolate()); CHECK_EQ(constant_array->length(), 65537); int count = 1; diff --git a/deps/v8/test/unittests/interpreter/interpreter-assembler-unittest.cc b/deps/v8/test/unittests/interpreter/interpreter-assembler-unittest.cc index 09d21e3095..ebc6790a40 100644 --- a/deps/v8/test/unittests/interpreter/interpreter-assembler-unittest.cc +++ b/deps/v8/test/unittests/interpreter/interpreter-assembler-unittest.cc @@ -46,7 +46,7 @@ InterpreterAssemblerTest::InterpreterAssemblerForTest:: GetAccumulator(); } if (Bytecodes::WritesAccumulator(bytecode())) { - SetAccumulator(nullptr); + SetAccumulator(NullConstant()); } } @@ -406,20 +406,6 @@ TARGET_TEST_F(InterpreterAssemblerTest, LoadConstantPoolEntry) { { TNode index = m.IntPtrConstant(2); TNode load_constant = m.LoadConstantPoolEntry(index); - if (COMPRESS_POINTERS_BOOL && FLAG_turbo_decompression_elimination) { - Matcher constant_pool_matcher = - IsChangeCompressedToTagged(m.IsLoadFromObject( - MachineType::AnyCompressed(), - c::IsParameter(InterpreterDispatchDescriptor::kBytecodeArray), - c::IsIntPtrConstant(BytecodeArray::kConstantPoolOffset - - kHeapObjectTag))); - EXPECT_THAT(load_constant, - IsChangeCompressedToTagged(m.IsLoad( - MachineType::AnyCompressed(), constant_pool_matcher, - c::IsIntPtrConstant(FixedArray::OffsetOfElementAt(2) - - kHeapObjectTag), - LoadSensitivity::kCritical))); - } else { Matcher constant_pool_matcher = m.IsLoadFromObject( MachineType::AnyTagged(), c::IsParameter(InterpreterDispatchDescriptor::kBytecodeArray), @@ -431,29 +417,11 @@ TARGET_TEST_F(InterpreterAssemblerTest, LoadConstantPoolEntry) { c::IsIntPtrConstant(FixedArray::OffsetOfElementAt(2) - kHeapObjectTag), LoadSensitivity::kCritical)); - } } { Node* index = m.Parameter(2); TNode load_constant = m.LoadConstantPoolEntry(m.ReinterpretCast(index)); - if (COMPRESS_POINTERS_BOOL && FLAG_turbo_decompression_elimination) { - Matcher constant_pool_matcher = - IsChangeCompressedToTagged(m.IsLoadFromObject( - MachineType::AnyCompressed(), - c::IsParameter(InterpreterDispatchDescriptor::kBytecodeArray), - c::IsIntPtrConstant(BytecodeArray::kConstantPoolOffset - - kHeapObjectTag))); - EXPECT_THAT( - load_constant, - IsChangeCompressedToTagged(m.IsLoad( - MachineType::AnyCompressed(), constant_pool_matcher, - c::IsIntPtrAdd( - c::IsIntPtrConstant(FixedArray::kHeaderSize - - kHeapObjectTag), - c::IsWordShl(index, c::IsIntPtrConstant(kTaggedSizeLog2))), - LoadSensitivity::kCritical))); - } else { Matcher constant_pool_matcher = m.IsLoadFromObject( MachineType::AnyTagged(), c::IsParameter(InterpreterDispatchDescriptor::kBytecodeArray), @@ -468,7 +436,6 @@ TARGET_TEST_F(InterpreterAssemblerTest, LoadConstantPoolEntry) { kHeapObjectTag), c::IsWordShl(index, c::IsIntPtrConstant(kTaggedSizeLog2))), LoadSensitivity::kCritical)); - } } } } @@ -481,17 +448,10 @@ TARGET_TEST_F(InterpreterAssemblerTest, LoadObjectField) { m.ReinterpretCast(m.IntPtrConstant(0xDEADBEEF)); int offset = 16; TNode load_field = m.LoadObjectField(object, offset); - if (COMPRESS_POINTERS_BOOL && FLAG_turbo_decompression_elimination) { - EXPECT_THAT(load_field, - IsChangeCompressedToTagged(m.IsLoadFromObject( - MachineType::AnyCompressed(), Eq(object), - c::IsIntPtrConstant(offset - kHeapObjectTag)))); - } else { EXPECT_THAT( load_field, m.IsLoadFromObject(MachineType::AnyTagged(), Eq(object), c::IsIntPtrConstant(offset - kHeapObjectTag))); - } } } @@ -573,18 +533,6 @@ TARGET_TEST_F(InterpreterAssemblerTest, LoadFeedbackVector) { m.IsLoad(MachineType::Pointer(), c::IsLoadParentFramePointer(), c::IsIntPtrConstant(Register::function_closure().ToOperand() * kSystemPointerSize))); - if (COMPRESS_POINTERS_BOOL && FLAG_turbo_decompression_elimination) { - Matcher load_vector_cell_matcher = - IsChangeCompressedPointerToTaggedPointer(m.IsLoadFromObject( - MachineType::CompressedPointer(), load_function_matcher, - c::IsIntPtrConstant(JSFunction::kFeedbackCellOffset - - kHeapObjectTag))); - EXPECT_THAT( - load_feedback_vector, - IsChangeCompressedPointerToTaggedPointer(m.IsLoadFromObject( - MachineType::CompressedPointer(), load_vector_cell_matcher, - c::IsIntPtrConstant(Cell::kValueOffset - kHeapObjectTag)))); - } else { Matcher load_vector_cell_matcher = m.IsLoadFromObject( MachineType::TaggedPointer(), load_function_matcher, c::IsIntPtrConstant(JSFunction::kFeedbackCellOffset - @@ -594,7 +542,6 @@ TARGET_TEST_F(InterpreterAssemblerTest, LoadFeedbackVector) { m.IsLoadFromObject( MachineType::TaggedPointer(), load_vector_cell_matcher, c::IsIntPtrConstant(Cell::kValueOffset - kHeapObjectTag))); - } } } -- cgit v1.2.1