Commit 309c36f5 authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] Remove use of CallFunctionStub from TurboFan.

Use the Call builtin instead, which does the right thing(TM)
always, especially since the CallFunctionStub is going away.

R=jarin@chromium.org
BUG=v8:4413
LOG=n

Review URL: https://codereview.chromium.org/1410853007

Cr-Commit-Position: refs/heads/master@{#31794}
parent 305546e1
......@@ -302,6 +302,13 @@ Callable CodeFactory::ArgumentAdaptor(Isolate* isolate) {
}
// static
Callable CodeFactory::Call(Isolate* isolate) {
return Callable(isolate->builtins()->Call(),
CallTrampolineDescriptor(isolate));
}
// static
Callable CodeFactory::InterpreterPushArgsAndCall(Isolate* isolate) {
return Callable(isolate->builtins()->InterpreterPushArgsAndCall(),
......
......@@ -97,10 +97,12 @@ class CodeFactory final {
static Callable AllocateMutableHeapNumber(Isolate* isolate);
static Callable AllocateInNewSpace(Isolate* isolate);
// TODO(bmeurer): Kill this!
static Callable CallFunction(Isolate* isolate, int argc,
CallFunctionFlags flags);
static Callable ArgumentAdaptor(Isolate* isolate);
static Callable Call(Isolate* isolate);
static Callable InterpreterPushArgsAndCall(Isolate* isolate);
static Callable InterpreterPushArgsAndConstruct(Isolate* isolate);
......
......@@ -1969,9 +1969,8 @@ void AstGraphBuilder::VisitArrayLiteral(ArrayLiteral* expr) {
Node* iterable = environment()->Pop();
Node* function = BuildLoadNativeContextField(
Context::CONCAT_ITERABLE_TO_ARRAY_BUILTIN_INDEX);
result = NewNode(javascript()->CallFunction(3, NO_CALL_FUNCTION_FLAGS,
language_mode()),
function, array, iterable);
result = NewNode(javascript()->CallFunction(3, language_mode()), function,
array, iterable);
states.AddToNode(result, expr->GetIdForElement(array_index));
} else {
VisitForValue(subexpr);
......@@ -2317,7 +2316,6 @@ void AstGraphBuilder::VisitCall(Call* expr) {
// Prepare the callee and the receiver to the function call. This depends on
// the semantics of the underlying call type.
CallFunctionFlags flags = NO_CALL_FUNCTION_FLAGS;
ConvertReceiverMode receiver_hint = ConvertReceiverMode::kAny;
Node* receiver_value = nullptr;
Node* callee_value = nullptr;
......@@ -2363,7 +2361,6 @@ void AstGraphBuilder::VisitCall(Call* expr) {
// not to be null or undefined at this point.
receiver_hint = ConvertReceiverMode::kNotNullOrUndefined;
receiver_value = environment()->Pop();
flags = CALL_AS_METHOD;
break;
}
case Call::KEYED_PROPERTY_CALL: {
......@@ -2383,7 +2380,6 @@ void AstGraphBuilder::VisitCall(Call* expr) {
// not to be null or undefined at this point.
receiver_hint = ConvertReceiverMode::kNotNullOrUndefined;
receiver_value = environment()->Pop();
flags = CALL_AS_METHOD;
break;
}
case Call::NAMED_SUPER_PROPERTY_CALL: {
......@@ -2403,7 +2399,6 @@ void AstGraphBuilder::VisitCall(Call* expr) {
// an object for sloppy callees. Since the receiver is not the target of
// the load, it could very well be null or undefined at this point.
receiver_value = environment()->Pop();
flags = CALL_AS_METHOD;
environment()->Drop(1);
break;
}
......@@ -2427,7 +2422,6 @@ void AstGraphBuilder::VisitCall(Call* expr) {
// an object for sloppy callees. Since the receiver is not the target of
// the load, it could very well be null or undefined at this point.
receiver_value = environment()->Pop();
flags = CALL_AS_METHOD;
environment()->Drop(1);
break;
}
......@@ -2493,7 +2487,7 @@ void AstGraphBuilder::VisitCall(Call* expr) {
// Create node to perform the function call.
VectorSlotPair feedback = CreateVectorSlotPair(expr->CallFeedbackICSlot());
const Operator* call = javascript()->CallFunction(
args->length() + 2, flags, language_mode(), feedback, receiver_hint);
args->length() + 2, language_mode(), feedback, receiver_hint);
FrameStateBeforeAndAfter states(this, expr->CallId());
Node* value = ProcessArguments(call, args->length() + 2);
environment()->Push(value->InputAt(0)); // The callee passed to the call.
......@@ -2553,7 +2547,6 @@ void AstGraphBuilder::VisitCallNew(CallNew* expr) {
void AstGraphBuilder::VisitCallJSRuntime(CallRuntime* expr) {
// The callee and the receiver both have to be pushed onto the operand stack
// before arguments are being evaluated.
CallFunctionFlags flags = NO_CALL_FUNCTION_FLAGS;
Node* callee_value = BuildLoadNativeContextField(expr->context_index());
Node* receiver_value = jsgraph()->UndefinedConstant();
......@@ -2566,7 +2559,7 @@ void AstGraphBuilder::VisitCallJSRuntime(CallRuntime* expr) {
// Create node to perform the JS runtime call.
const Operator* call =
javascript()->CallFunction(args->length() + 2, flags, language_mode());
javascript()->CallFunction(args->length() + 2, language_mode());
FrameStateBeforeAndAfter states(this, expr->CallId());
Node* value = ProcessArguments(call, args->length() + 2);
states.AddToNode(value, expr->id(), ast_context()->GetStateCombine());
......
......@@ -520,6 +520,7 @@ void JSGenericLowering::LowerJSCreateScriptContext(Node* node) {
void JSGenericLowering::LowerJSCallConstruct(Node* node) {
// TODO(bmeurer): Use the Construct builtin here.
int arity = OpParameter<int>(node);
CallConstructStub stub(isolate(), SUPER_CONSTRUCTOR_CALL);
CallInterfaceDescriptor d = stub.GetCallInterfaceDescriptor();
......@@ -540,18 +541,19 @@ void JSGenericLowering::LowerJSCallConstruct(Node* node) {
void JSGenericLowering::LowerJSCallFunction(Node* node) {
const CallFunctionParameters& p = CallFunctionParametersOf(node->op());
int arg_count = static_cast<int>(p.arity() - 2);
CallFunctionStub stub(isolate(), arg_count, p.flags());
CallInterfaceDescriptor d = stub.GetCallInterfaceDescriptor();
CallFunctionParameters const& p = CallFunctionParametersOf(node->op());
int const arg_count = static_cast<int>(p.arity() - 2);
Callable callable = CodeFactory::Call(isolate());
CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
if (p.AllowTailCalls()) {
if (p.tail_call_mode() == TailCallMode::kAllow) {
flags |= CallDescriptor::kSupportsTailCalls;
}
CallDescriptor* desc = Linkage::GetStubCallDescriptor(
isolate(), zone(), d, static_cast<int>(p.arity() - 1), flags);
Node* stub_code = jsgraph()->HeapConstant(stub.GetCode());
isolate(), zone(), callable.descriptor(), arg_count + 1, flags);
Node* stub_code = jsgraph()->HeapConstant(callable.code());
Node* stub_arity = jsgraph()->Int32Constant(arg_count);
node->InsertInput(zone(), 0, stub_code);
node->InsertInput(zone(), 2, stub_arity);
NodeProperties::ChangeOp(node, common()->Call(desc));
}
......
......@@ -539,9 +539,9 @@ Reduction JSIntrinsicLowering::ReduceCallFunction(Node* node) {
}
node->ReplaceInput(0, function);
NodeProperties::ChangeOp(
node, javascript()->CallFunction(
params.arity(), NO_CALL_FUNCTION_FLAGS, STRICT,
VectorSlotPair(), ConvertReceiverMode::kAny, ALLOW_TAIL_CALLS));
node, javascript()->CallFunction(params.arity(), STRICT, VectorSlotPair(),
ConvertReceiverMode::kAny,
TailCallMode::kAllow));
return Changed(node);
}
......
......@@ -41,7 +41,7 @@ size_t hash_value(VectorSlotPair const& p) {
size_t hash_value(ConvertReceiverMode mode) {
return base::hash_value(static_cast<int>(mode));
return base::hash_value(static_cast<unsigned>(mode));
}
......@@ -65,11 +65,26 @@ ConvertReceiverMode ConvertReceiverModeOf(Operator const* op) {
}
std::ostream& operator<<(std::ostream& os, CallFunctionParameters const& p) {
os << p.arity() << ", " << p.flags() << ", " << p.language_mode();
if (p.AllowTailCalls()) {
os << ", ALLOW_TAIL_CALLS";
size_t hash_value(TailCallMode mode) {
return base::hash_value(static_cast<unsigned>(mode));
}
std::ostream& operator<<(std::ostream& os, TailCallMode mode) {
switch (mode) {
case TailCallMode::kAllow:
return os << "ALLOW_TAIL_CALLS";
case TailCallMode::kDisallow:
return os << "DISALLOW_TAIL_CALLS";
}
UNREACHABLE();
return os;
}
std::ostream& operator<<(std::ostream& os, CallFunctionParameters const& p) {
os << p.arity() << ", " << p.language_mode() << ", " << p.convert_mode()
<< ", " << p.tail_call_mode();
return os;
}
......@@ -470,10 +485,9 @@ CACHED_OP_LIST_WITH_LANGUAGE_MODE(CACHED_WITH_LANGUAGE_MODE)
const Operator* JSOperatorBuilder::CallFunction(
size_t arity, CallFunctionFlags flags, LanguageMode language_mode,
VectorSlotPair const& feedback, ConvertReceiverMode convert_mode,
TailCallMode tail_call_mode) {
CallFunctionParameters parameters(arity, flags, language_mode, feedback,
size_t arity, LanguageMode language_mode, VectorSlotPair const& feedback,
ConvertReceiverMode convert_mode, TailCallMode tail_call_mode) {
CallFunctionParameters parameters(arity, language_mode, feedback,
tail_call_mode, convert_mode);
return new (zone()) Operator1<CallFunctionParameters>( // --
IrOpcode::kJSCallFunction, Operator::kNoProperties, // opcode
......
......@@ -44,7 +44,7 @@ size_t hash_value(VectorSlotPair const&);
// Defines hints about receiver values based on structural knowledge. This is
// used as a parameter by JSConvertReceiver operators.
enum class ConvertReceiverMode : int {
enum class ConvertReceiverMode : unsigned {
kNullOrUndefined, // Guaranteed to be null or undefined.
kNotNullOrUndefined, // Guaranteed to never be null or undefined.
kAny // No specific knowledge about receiver.
......@@ -58,57 +58,59 @@ ConvertReceiverMode ConvertReceiverModeOf(const Operator* op);
// Defines whether tail call optimization is allowed.
enum TailCallMode { NO_TAIL_CALLS, ALLOW_TAIL_CALLS };
enum class TailCallMode : unsigned { kAllow, kDisallow };
size_t hash_value(TailCallMode);
std::ostream& operator<<(std::ostream&, TailCallMode);
// Defines the arity and the call flags for a JavaScript function call. This is
// used as a parameter by JSCallFunction operators.
class CallFunctionParameters final {
public:
CallFunctionParameters(size_t arity, CallFunctionFlags flags,
LanguageMode language_mode,
CallFunctionParameters(size_t arity, LanguageMode language_mode,
VectorSlotPair const& feedback,
TailCallMode tail_call_mode,
ConvertReceiverMode convert_mode)
: bit_field_(ArityField::encode(arity) | FlagsField::encode(flags) |
LanguageModeField::encode(language_mode)),
feedback_(feedback),
tail_call_mode_(tail_call_mode),
convert_mode_(convert_mode) {}
: bit_field_(ArityField::encode(arity) |
ConvertReceiverModeField::encode(convert_mode) |
LanguageModeField::encode(language_mode) |
TailCallModeField::encode(tail_call_mode)),
feedback_(feedback) {}
size_t arity() const { return ArityField::decode(bit_field_); }
CallFunctionFlags flags() const { return FlagsField::decode(bit_field_); }
LanguageMode language_mode() const {
return LanguageModeField::decode(bit_field_);
}
ConvertReceiverMode convert_mode() const { return convert_mode_; }
ConvertReceiverMode convert_mode() const {
return ConvertReceiverModeField::decode(bit_field_);
}
TailCallMode tail_call_mode() const {
return TailCallModeField::decode(bit_field_);
}
VectorSlotPair const& feedback() const { return feedback_; }
bool operator==(CallFunctionParameters const& that) const {
return this->bit_field_ == that.bit_field_ &&
this->feedback_ == that.feedback_ &&
this->tail_call_mode_ == that.tail_call_mode_ &&
this->convert_mode_ == that.convert_mode_;
this->feedback_ == that.feedback_;
}
bool operator!=(CallFunctionParameters const& that) const {
return !(*this == that);
}
bool AllowTailCalls() const { return tail_call_mode_ == ALLOW_TAIL_CALLS; }
private:
friend size_t hash_value(CallFunctionParameters const& p) {
return base::hash_combine(p.bit_field_, p.feedback_, p.convert_mode_);
return base::hash_combine(p.bit_field_, p.feedback_);
}
typedef BitField<size_t, 0, 28> ArityField;
typedef BitField<CallFunctionFlags, 28, 2> FlagsField;
typedef BitField<LanguageMode, 30, 2> LanguageModeField;
typedef BitField<size_t, 0, 27> ArityField;
typedef BitField<ConvertReceiverMode, 27, 2> ConvertReceiverModeField;
typedef BitField<LanguageMode, 29, 2> LanguageModeField;
typedef BitField<TailCallMode, 31, 1> TailCallModeField;
const uint32_t bit_field_;
const VectorSlotPair feedback_;
TailCallMode tail_call_mode_;
ConvertReceiverMode convert_mode_;
};
size_t hash_value(CallFunctionParameters const&);
......@@ -406,10 +408,10 @@ class JSOperatorBuilder final : public ZoneObject {
const Operator* CreateLiteralObject(int literal_flags);
const Operator* CallFunction(
size_t arity, CallFunctionFlags flags, LanguageMode language_mode,
size_t arity, LanguageMode language_mode,
VectorSlotPair const& feedback = VectorSlotPair(),
ConvertReceiverMode convert_mode = ConvertReceiverMode::kAny,
TailCallMode tail_call_mode = NO_TAIL_CALLS);
TailCallMode tail_call_mode = TailCallMode::kDisallow);
const Operator* CallRuntime(Runtime::FunctionId id, size_t arity);
const Operator* CallConstruct(int arguments);
......
......@@ -1613,7 +1613,9 @@ Reduction JSTypedLowering::ReduceJSCallFunction(Node* node) {
// Compute flags for the call.
CallDescriptor::Flags flags = CallDescriptor::kNeedsFrameState;
if (p.AllowTailCalls()) flags |= CallDescriptor::kSupportsTailCalls;
if (p.tail_call_mode() == TailCallMode::kAllow) {
flags |= CallDescriptor::kSupportsTailCalls;
}
if (shared->internal_formal_parameter_count() == arity ||
shared->internal_formal_parameter_count() ==
......
......@@ -88,10 +88,9 @@ TEST_F(JSBuiltinReducerTest, MathMax0) {
Node* context = UndefinedConstant();
Node* frame_state = graph()->start();
TRACED_FOREACH(LanguageMode, language_mode, kLanguageModes) {
Node* call = graph()->NewNode(
javascript()->CallFunction(2, NO_CALL_FUNCTION_FLAGS, language_mode),
function, UndefinedConstant(), context, frame_state, frame_state,
effect, control);
Node* call = graph()->NewNode(javascript()->CallFunction(2, language_mode),
function, UndefinedConstant(), context,
frame_state, frame_state, effect, control);
Reduction r = Reduce(call);
ASSERT_TRUE(r.Changed());
......@@ -110,10 +109,10 @@ TEST_F(JSBuiltinReducerTest, MathMax1) {
TRACED_FOREACH(LanguageMode, language_mode, kLanguageModes) {
TRACED_FOREACH(Type*, t0, kNumberTypes) {
Node* p0 = Parameter(t0, 0);
Node* call = graph()->NewNode(
javascript()->CallFunction(3, NO_CALL_FUNCTION_FLAGS, language_mode),
function, UndefinedConstant(), p0, context, frame_state, frame_state,
effect, control);
Node* call =
graph()->NewNode(javascript()->CallFunction(3, language_mode),
function, UndefinedConstant(), p0, context,
frame_state, frame_state, effect, control);
Reduction r = Reduce(call);
ASSERT_TRUE(r.Changed());
......@@ -136,8 +135,7 @@ TEST_F(JSBuiltinReducerTest, MathMax2) {
Node* p0 = Parameter(t0, 0);
Node* p1 = Parameter(t1, 1);
Node* call =
graph()->NewNode(javascript()->CallFunction(
4, NO_CALL_FUNCTION_FLAGS, language_mode),
graph()->NewNode(javascript()->CallFunction(4, language_mode),
function, UndefinedConstant(), p0, p1, context,
frame_state, frame_state, effect, control);
Reduction r = Reduce(call);
......@@ -168,8 +166,7 @@ TEST_F(JSBuiltinReducerTest, MathImul) {
Node* p0 = Parameter(t0, 0);
Node* p1 = Parameter(t1, 1);
Node* call =
graph()->NewNode(javascript()->CallFunction(
4, NO_CALL_FUNCTION_FLAGS, language_mode),
graph()->NewNode(javascript()->CallFunction(4, language_mode),
function, UndefinedConstant(), p0, p1, context,
frame_state, frame_state, effect, control);
Reduction r = Reduce(call);
......@@ -196,10 +193,10 @@ TEST_F(JSBuiltinReducerTest, MathFround) {
TRACED_FOREACH(LanguageMode, language_mode, kLanguageModes) {
TRACED_FOREACH(Type*, t0, kNumberTypes) {
Node* p0 = Parameter(t0, 0);
Node* call = graph()->NewNode(
javascript()->CallFunction(3, NO_CALL_FUNCTION_FLAGS, language_mode),
function, UndefinedConstant(), p0, context, frame_state, frame_state,
effect, control);
Node* call =
graph()->NewNode(javascript()->CallFunction(3, language_mode),
function, UndefinedConstant(), p0, context,
frame_state, frame_state, effect, control);
Reduction r = Reduce(call);
ASSERT_TRUE(r.Changed());
......
......@@ -83,9 +83,8 @@ TEST_F(JSContextRelaxationTest,
Node* const effect = graph()->start();
Node* const control = graph()->start();
Node* node = graph()->NewNode(
javascript()->CallFunction(2, NO_CALL_FUNCTION_FLAGS, STRICT,
VectorSlotPair()),
input0, input1, context, frame_state, frame_state, effect, control);
javascript()->CallFunction(2, STRICT, VectorSlotPair()), input0, input1,
context, frame_state, frame_state, effect, control);
Reduction const r = Reduce(node);
EXPECT_TRUE(r.Changed());
EXPECT_EQ(outer_context, NodeProperties::GetContextInput(node));
......@@ -102,9 +101,8 @@ TEST_F(JSContextRelaxationTest,
Node* const effect = graph()->start();
Node* const control = graph()->start();
Node* node = graph()->NewNode(
javascript()->CallFunction(2, NO_CALL_FUNCTION_FLAGS, STRICT,
VectorSlotPair()),
input0, input1, context, frame_state, frame_state, effect, control);
javascript()->CallFunction(2, STRICT, VectorSlotPair()), input0, input1,
context, frame_state, frame_state, effect, control);
Reduction const r = Reduce(node);
EXPECT_FALSE(r.Changed());
EXPECT_EQ(context, NodeProperties::GetContextInput(node));
......@@ -121,9 +119,8 @@ TEST_F(JSContextRelaxationTest,
Node* const effect = graph()->start();
Node* const control = graph()->start();
Node* node = graph()->NewNode(
javascript()->CallFunction(2, NO_CALL_FUNCTION_FLAGS, STRICT,
VectorSlotPair()),
input0, input1, context, frame_state, frame_state, effect, control);
javascript()->CallFunction(2, STRICT, VectorSlotPair()), input0, input1,
context, frame_state, frame_state, effect, control);
Reduction const r = Reduce(node);
EXPECT_TRUE(r.Changed());
EXPECT_EQ(outer_context, NodeProperties::GetContextInput(node));
......@@ -140,9 +137,8 @@ TEST_F(JSContextRelaxationTest,
Node* const effect = graph()->start();
Node* const control = graph()->start();
Node* node = graph()->NewNode(
javascript()->CallFunction(2, NO_CALL_FUNCTION_FLAGS, STRICT,
VectorSlotPair()),
input0, input1, context, frame_state, frame_state, effect, control);
javascript()->CallFunction(2, STRICT, VectorSlotPair()), input0, input1,
context, frame_state, frame_state, effect, control);
Reduction const r = Reduce(node);
EXPECT_FALSE(r.Changed());
EXPECT_EQ(context, NodeProperties::GetContextInput(node));
......@@ -162,9 +158,8 @@ TEST_F(JSContextRelaxationTest,
Node* const frame_state_2 =
ShallowFrameStateChain(nested_context, CALL_MAINTAINS_NATIVE_CONTEXT);
Node* node = graph()->NewNode(
javascript()->CallFunction(2, NO_CALL_FUNCTION_FLAGS, STRICT,
VectorSlotPair()),
input0, input1, context, frame_state_2, frame_state_2, effect, control);
javascript()->CallFunction(2, STRICT, VectorSlotPair()), input0, input1,
context, frame_state_2, frame_state_2, effect, control);
Reduction const r = Reduce(node);
EXPECT_TRUE(r.Changed());
EXPECT_EQ(outer_context, NodeProperties::GetContextInput(node));
......@@ -188,9 +183,8 @@ TEST_F(JSContextRelaxationTest,
Node* const frame_state_2 =
ShallowFrameStateChain(nested_context, CALL_MAINTAINS_NATIVE_CONTEXT);
Node* node = graph()->NewNode(
javascript()->CallFunction(2, NO_CALL_FUNCTION_FLAGS, STRICT,
VectorSlotPair()),
input0, input1, context, frame_state_2, frame_state_2, effect, control);
javascript()->CallFunction(2, STRICT, VectorSlotPair()), input0, input1,
context, frame_state_2, frame_state_2, effect, control);
Reduction const r = Reduce(node);
EXPECT_TRUE(r.Changed());
EXPECT_EQ(outer_context, NodeProperties::GetContextInput(node));
......@@ -212,9 +206,8 @@ TEST_F(JSContextRelaxationTest,
Node* const frame_state_2 =
ShallowFrameStateChain(nested_context, CALL_MAINTAINS_NATIVE_CONTEXT);
Node* node = graph()->NewNode(
javascript()->CallFunction(2, NO_CALL_FUNCTION_FLAGS, STRICT,
VectorSlotPair()),
input0, input1, context, frame_state_2, frame_state_2, effect, control);
javascript()->CallFunction(2, STRICT, VectorSlotPair()), input0, input1,
context, frame_state_2, frame_state_2, effect, control);
Reduction const r = Reduce(node);
EXPECT_TRUE(r.Changed());
EXPECT_EQ(outer_context, NodeProperties::GetContextInput(node));
......@@ -238,9 +231,8 @@ TEST_F(JSContextRelaxationTest,
Node* const frame_state_2 =
ShallowFrameStateChain(nested_context, CALL_MAINTAINS_NATIVE_CONTEXT);
Node* node = graph()->NewNode(
javascript()->CallFunction(2, NO_CALL_FUNCTION_FLAGS, STRICT,
VectorSlotPair()),
input0, input1, context, frame_state_2, frame_state_2, effect, control);
javascript()->CallFunction(2, STRICT, VectorSlotPair()), input0, input1,
context, frame_state_2, frame_state_2, effect, control);
Reduction const r = Reduce(node);
EXPECT_TRUE(r.Changed());
EXPECT_EQ(nested_context, NodeProperties::GetContextInput(node));
......@@ -261,9 +253,8 @@ TEST_F(JSContextRelaxationTest,
Node* const frame_state_2 =
ShallowFrameStateChain(nested_context, CALL_MAINTAINS_NATIVE_CONTEXT);
Node* node = graph()->NewNode(
javascript()->CallFunction(2, NO_CALL_FUNCTION_FLAGS, STRICT,
VectorSlotPair()),
input0, input1, context, frame_state_2, frame_state_2, effect, control);
javascript()->CallFunction(2, STRICT, VectorSlotPair()), input0, input1,
context, frame_state_2, frame_state_2, effect, control);
Reduction const r = Reduce(node);
EXPECT_TRUE(r.Changed());
EXPECT_EQ(nested_context, NodeProperties::GetContextInput(node));
......@@ -284,9 +275,8 @@ TEST_F(JSContextRelaxationTest,
Node* const frame_state_2 =
ShallowFrameStateChain(nested_context, CALL_MAINTAINS_NATIVE_CONTEXT);
Node* node = graph()->NewNode(
javascript()->CallFunction(2, NO_CALL_FUNCTION_FLAGS, STRICT,
VectorSlotPair()),
input0, input1, context, frame_state_2, frame_state_2, effect, control);
javascript()->CallFunction(2, STRICT, VectorSlotPair()), input0, input1,
context, frame_state_2, frame_state_2, effect, control);
Reduction const r = Reduce(node);
EXPECT_FALSE(r.Changed());
EXPECT_EQ(context, NodeProperties::GetContextInput(node));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment