[turbofan] The JSCreateWithContext operator doesn't need a frame state.
Creating a with context cannot lazy/eager deoptimize, so we don't need to pass a frame state. R=jarin@chromium.org Review URL: https://codereview.chromium.org/1508373002 Cr-Commit-Position: refs/heads/master@{#32711}
This commit is contained in:
parent
67c99a9918
commit
6a1328452a
@ -57,7 +57,6 @@ int OperatorProperties::GetFrameStateInputCount(const Operator* op) {
|
||||
// Context operations
|
||||
case IrOpcode::kJSLoadDynamic:
|
||||
case IrOpcode::kJSCreateScriptContext:
|
||||
case IrOpcode::kJSCreateWithContext:
|
||||
|
||||
// Conversions
|
||||
case IrOpcode::kJSToName:
|
||||
|
@ -173,13 +173,10 @@ TEST_F(JSContextRelaxationTest,
|
||||
Node* const context = Parameter(2);
|
||||
Node* const outer_context = Parameter(3);
|
||||
const Operator* op = javascript()->CreateWithContext();
|
||||
Node* const frame_state_1 =
|
||||
ShallowFrameStateChain(outer_context, CALL_MAINTAINS_NATIVE_CONTEXT);
|
||||
Node* const effect = graph()->start();
|
||||
Node* const control = graph()->start();
|
||||
Node* nested_context =
|
||||
graph()->NewNode(op, graph()->start(), graph()->start(), outer_context,
|
||||
frame_state_1, effect, control);
|
||||
Node* nested_context = graph()->NewNode(
|
||||
op, graph()->start(), graph()->start(), outer_context, effect, control);
|
||||
Node* const frame_state_2 =
|
||||
ShallowFrameStateChain(nested_context, CALL_MAINTAINS_NATIVE_CONTEXT);
|
||||
Node* node = graph()->NewNode(
|
||||
|
@ -80,7 +80,7 @@ const SharedOperator kSharedOperators[] = {
|
||||
SHARED(HasProperty, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
|
||||
SHARED(TypeOf, Operator::kEliminatable, 1, 0, 1, 0, 1, 1, 0),
|
||||
SHARED(InstanceOf, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
|
||||
SHARED(CreateWithContext, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
|
||||
SHARED(CreateWithContext, Operator::kNoProperties, 2, 0, 1, 1, 1, 1, 2),
|
||||
SHARED(CreateModuleContext, Operator::kNoProperties, 2, 0, 1, 1, 1, 1, 2),
|
||||
#undef SHARED
|
||||
};
|
||||
|
@ -1124,12 +1124,11 @@ TEST_F(JSTypedLoweringTest, JSCreateWithContext) {
|
||||
Node* const object = Parameter(Type::Receiver());
|
||||
Node* const closure = Parameter(Type::Function());
|
||||
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));
|
||||
closure, context, effect, control));
|
||||
ASSERT_TRUE(r.Changed());
|
||||
EXPECT_THAT(r.replacement(),
|
||||
IsFinishRegion(IsAllocate(IsNumberConstant(Context::SizeFor(
|
||||
|
Loading…
Reference in New Issue
Block a user