Commit e73776cf authored by Benedikt Meurer's avatar Benedikt Meurer Committed by Commit Bot

[turbofan] Fixup wrong code comments.

Missed the feedback in https://chromium-review.googlesource.com/1611803
to address the code comments.

Tbr: neis@chromium.org
Bug: chromium:961199, v8:8820
Change-Id: I1ff85c0a7554099b72461eb91de9ea4bb2a5bded
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1617242Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61597}
parent 3000b890
...@@ -500,7 +500,7 @@ void CallOrConstructBuiltinsAssembler::CallFunctionTemplate( ...@@ -500,7 +500,7 @@ void CallOrConstructBuiltinsAssembler::CallFunctionTemplate(
// For API callbacks the receiver is always a JSReceiver (since // For API callbacks the receiver is always a JSReceiver (since
// they are treated like sloppy mode functions). We might need // they are treated like sloppy mode functions). We might need
// to perform access checks int the current {context}, depending // to perform access checks in the current {context}, depending
// on whether the "needs access check" bit is set on the receiver // on whether the "needs access check" bit is set on the receiver
// _and_ the {function_template_info} doesn't have the "accepts // _and_ the {function_template_info} doesn't have the "accepts
// any receiver" bit set. // any receiver" bit set.
......
...@@ -2834,13 +2834,6 @@ Reduction JSCallReducer::ReduceCallApiFunction( ...@@ -2834,13 +2834,6 @@ Reduction JSCallReducer::ReduceCallApiFunction(
graph()->NewNode(simplified()->ConvertReceiver(p.convert_mode()), graph()->NewNode(simplified()->ConvertReceiver(p.convert_mode()),
receiver, global_proxy, effect, control); receiver, global_proxy, effect, control);
} else { } else {
// The CallFunctionTemplate builtin requires the {receiver} to be
// an actual JSReceiver, so make sure we do the proper conversion
// first if necessary.
receiver = holder = effect =
graph()->NewNode(simplified()->ConvertReceiver(p.convert_mode()),
receiver, global_proxy, effect, control);
// We don't have enough information to eliminate the access check // We don't have enough information to eliminate the access check
// and/or the compatible receiver check, so use the generic builtin // and/or the compatible receiver check, so use the generic builtin
// that does those checks dynamically. This is still significantly // that does those checks dynamically. This is still significantly
...@@ -2852,6 +2845,14 @@ Reduction JSCallReducer::ReduceCallApiFunction( ...@@ -2852,6 +2845,14 @@ Reduction JSCallReducer::ReduceCallApiFunction(
: Builtins:: : Builtins::
kCallFunctionTemplate_CheckAccessAndCompatibleReceiver) kCallFunctionTemplate_CheckAccessAndCompatibleReceiver)
: Builtins::kCallFunctionTemplate_CheckCompatibleReceiver; : Builtins::kCallFunctionTemplate_CheckCompatibleReceiver;
// The CallFunctionTemplate builtin requires the {receiver} to be
// an actual JSReceiver, so make sure we do the proper conversion
// first if necessary.
receiver = holder = effect =
graph()->NewNode(simplified()->ConvertReceiver(p.convert_mode()),
receiver, global_proxy, effect, control);
Callable callable = Builtins::CallableFor(isolate(), builtin_name); Callable callable = Builtins::CallableFor(isolate(), builtin_name);
auto call_descriptor = Linkage::GetStubCallDescriptor( auto call_descriptor = Linkage::GetStubCallDescriptor(
graph()->zone(), callable.descriptor(), graph()->zone(), callable.descriptor(),
......
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