| Index: test/unittests/compiler/js-create-lowering-unittest.cc
|
| diff --git a/test/unittests/compiler/js-create-lowering-unittest.cc b/test/unittests/compiler/js-create-lowering-unittest.cc
|
| index e43dd27774517d8e6034730942ab474ad83d90ad..5d95d0db001a8a36cdb2917a6a913d3d2484620b 100644
|
| --- a/test/unittests/compiler/js-create-lowering-unittest.cc
|
| +++ b/test/unittests/compiler/js-create-lowering-unittest.cc
|
| @@ -80,95 +80,56 @@ TEST_F(JSCreateLoweringTest, JSCreate) {
|
| // -----------------------------------------------------------------------------
|
| // JSCreateArguments
|
|
|
| -TEST_F(JSCreateLoweringTest, JSCreateArgumentsViaStub) {
|
| - Node* const closure = Parameter(Type::Any());
|
| - Node* const context = UndefinedConstant();
|
| - Node* const effect = graph()->start();
|
| - Node* const control = graph()->start();
|
| - Handle<SharedFunctionInfo> shared(isolate()->object_function()->shared());
|
| - Node* const frame_state = FrameState(shared, graph()->start());
|
| - Reduction r = Reduce(graph()->NewNode(
|
| - javascript()->CreateArguments(CreateArgumentsType::kUnmappedArguments),
|
| - closure, context, frame_state, effect, control));
|
| - ASSERT_TRUE(r.Changed());
|
| - EXPECT_THAT(
|
| - r.replacement(),
|
| - IsCall(_, IsHeapConstant(
|
| - CodeFactory::FastNewStrictArguments(isolate()).code()),
|
| - closure, context, frame_state, effect, control));
|
| -}
|
| -
|
| -TEST_F(JSCreateLoweringTest, JSCreateArgumentsRestParameterViaStub) {
|
| - Node* const closure = Parameter(Type::Any());
|
| - Node* const context = UndefinedConstant();
|
| - Node* const effect = graph()->start();
|
| - Node* const control = graph()->start();
|
| - Handle<SharedFunctionInfo> shared(isolate()->object_function()->shared());
|
| - Node* const frame_state = FrameState(shared, graph()->start());
|
| - Reduction r = Reduce(graph()->NewNode(
|
| - javascript()->CreateArguments(CreateArgumentsType::kRestParameter),
|
| - closure, context, frame_state, effect, control));
|
| - ASSERT_TRUE(r.Changed());
|
| - EXPECT_THAT(
|
| - r.replacement(),
|
| - IsCall(_, IsHeapConstant(
|
| - CodeFactory::FastNewRestParameter(isolate()).code()),
|
| - closure, context, frame_state, effect, control));
|
| -}
|
| -
|
| TEST_F(JSCreateLoweringTest, JSCreateArgumentsInlinedMapped) {
|
| Node* const closure = Parameter(Type::Any());
|
| Node* const context = UndefinedConstant();
|
| Node* const effect = graph()->start();
|
| - Node* const control = graph()->start();
|
| Handle<SharedFunctionInfo> shared(isolate()->object_function()->shared());
|
| Node* const frame_state_outer = FrameState(shared, graph()->start());
|
| Node* const frame_state_inner = FrameState(shared, frame_state_outer);
|
| Reduction r = Reduce(graph()->NewNode(
|
| javascript()->CreateArguments(CreateArgumentsType::kMappedArguments),
|
| - closure, context, frame_state_inner, effect, control));
|
| + closure, context, frame_state_inner, effect));
|
| ASSERT_TRUE(r.Changed());
|
| - EXPECT_THAT(r.replacement(),
|
| - IsFinishRegion(
|
| - IsAllocate(IsNumberConstant(JSSloppyArgumentsObject::kSize),
|
| - _, control),
|
| - _));
|
| + EXPECT_THAT(
|
| + r.replacement(),
|
| + IsFinishRegion(
|
| + IsAllocate(IsNumberConstant(JSSloppyArgumentsObject::kSize), _, _),
|
| + _));
|
| }
|
|
|
| TEST_F(JSCreateLoweringTest, JSCreateArgumentsInlinedUnmapped) {
|
| Node* const closure = Parameter(Type::Any());
|
| Node* const context = UndefinedConstant();
|
| Node* const effect = graph()->start();
|
| - Node* const control = graph()->start();
|
| Handle<SharedFunctionInfo> shared(isolate()->object_function()->shared());
|
| Node* const frame_state_outer = FrameState(shared, graph()->start());
|
| Node* const frame_state_inner = FrameState(shared, frame_state_outer);
|
| Reduction r = Reduce(graph()->NewNode(
|
| javascript()->CreateArguments(CreateArgumentsType::kUnmappedArguments),
|
| - closure, context, frame_state_inner, effect, control));
|
| + closure, context, frame_state_inner, effect));
|
| ASSERT_TRUE(r.Changed());
|
| - EXPECT_THAT(r.replacement(),
|
| - IsFinishRegion(
|
| - IsAllocate(IsNumberConstant(JSStrictArgumentsObject::kSize),
|
| - _, control),
|
| - _));
|
| + EXPECT_THAT(
|
| + r.replacement(),
|
| + IsFinishRegion(
|
| + IsAllocate(IsNumberConstant(JSStrictArgumentsObject::kSize), _, _),
|
| + _));
|
| }
|
|
|
| TEST_F(JSCreateLoweringTest, JSCreateArgumentsInlinedRestArray) {
|
| Node* const closure = Parameter(Type::Any());
|
| Node* const context = UndefinedConstant();
|
| Node* const effect = graph()->start();
|
| - Node* const control = graph()->start();
|
| Handle<SharedFunctionInfo> shared(isolate()->object_function()->shared());
|
| Node* const frame_state_outer = FrameState(shared, graph()->start());
|
| Node* const frame_state_inner = FrameState(shared, frame_state_outer);
|
| Reduction r = Reduce(graph()->NewNode(
|
| javascript()->CreateArguments(CreateArgumentsType::kRestParameter),
|
| - closure, context, frame_state_inner, effect, control));
|
| + closure, context, frame_state_inner, effect));
|
| ASSERT_TRUE(r.Changed());
|
| - EXPECT_THAT(r.replacement(),
|
| - IsFinishRegion(
|
| - IsAllocate(IsNumberConstant(JSArray::kSize), _, control), _));
|
| + EXPECT_THAT(
|
| + r.replacement(),
|
| + IsFinishRegion(IsAllocate(IsNumberConstant(JSArray::kSize), _, _), _));
|
| }
|
|
|
| // -----------------------------------------------------------------------------
|
|
|