| Index: test/unittests/compiler/js-typed-lowering-unittest.cc
|
| diff --git a/test/unittests/compiler/js-typed-lowering-unittest.cc b/test/unittests/compiler/js-typed-lowering-unittest.cc
|
| index aa4d81c41dfd558be9c089ec3d799c7aca574d84..3c5e6546ba4d760cd6271571f2701c3c5fc668fb 100644
|
| --- a/test/unittests/compiler/js-typed-lowering-unittest.cc
|
| +++ b/test/unittests/compiler/js-typed-lowering-unittest.cc
|
| @@ -954,6 +954,30 @@ TEST_F(JSTypedLoweringTest, JSCreateLiteralObject) {
|
| input0, input1, input2, _, context, frame_state, effect, control));
|
| }
|
|
|
| +
|
| +// -----------------------------------------------------------------------------
|
| +// JSCreateWithContext
|
| +
|
| +
|
| +TEST_F(JSTypedLoweringTest, JSCreateWithContext) {
|
| + FLAG_turbo_allocate = true;
|
| + Node* const object = Parameter(Type::Receiver());
|
| + Node* const closure = Parameter(Type::Any());
|
| + Node* const context = Parameter(Type::Any());
|
| + Node* const frame_state = EmptyFrameState();
|
| + Node* const effect = graph()->start();
|
| + Node* const control = graph()->start();
|
| + Reduction r =
|
| + Reduce(graph()->NewNode(javascript()->CreateWithContext(), object,
|
| + closure, context, frame_state, effect, control));
|
| + ASSERT_TRUE(r.Changed());
|
| + EXPECT_THAT(r.replacement(),
|
| + IsFinish(IsAllocate(IsNumberConstant(Context::SizeFor(
|
| + Context::MIN_CONTEXT_SLOTS)),
|
| + effect, control),
|
| + _));
|
| +}
|
| +
|
| } // namespace compiler
|
| } // namespace internal
|
| } // namespace v8
|
|
|