[turbofan] Tweak JSCallReducer::ReduceCallApiFunction a bit more.
The previous change to JSCallReducer::ReduceCallApiFunction regressed the case a bit where the optimized graph has some knowledge about the receiver already, but the API callback didn't need any receiver checks, as in that case we unnecessarily added a ConvertReceiver node. This change refactors the code to first see if there's information in the graph about the receiver, and only if none is found, introduce the ConvertReceiver node. It also removes the unnecessary context load from the target function, since the API callback doesn't care about the concrete context, and we never inline cross native contexts, so using whatever incoming context we have is perfectly fine (and saves us from unnecessarily materializing the target just to load the native context off of it). Drive-by-fix: Remove bogus comment about CallApiCallbackStub parameters. Bug: v8:8820 Change-Id: Ide1b283d9e448c3f0ae8f2daf4b1ad0202eae09e Cq-Include-Trybots: luci.chromium.try:linux-blink-rel Reviewed-on: https://chromium-review.googlesource.com/c/1466881 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#59536}
Showing
Please
register
or
sign in
to comment