Commit e7e233fd authored by Mike Stanton's avatar Mike Stanton Committed by Commit Bot

[Turbofan] BytecodeGraphBuilder: Use native context directly.

In BuildLoadNativeContextField(), we have access to the native context
as a constant. Use it directly, rather than loading from the current
context.

Change-Id: I60cd97586bbe5f8336f809967a3df556d0d43049
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1630682Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61871}
parent ee8a33b0
...@@ -996,11 +996,9 @@ Node* BytecodeGraphBuilder::GetFunctionClosure() { ...@@ -996,11 +996,9 @@ Node* BytecodeGraphBuilder::GetFunctionClosure() {
} }
Node* BytecodeGraphBuilder::BuildLoadNativeContextField(int index) { Node* BytecodeGraphBuilder::BuildLoadNativeContextField(int index) {
const Operator* op =
javascript()->LoadContext(0, Context::NATIVE_CONTEXT_INDEX, true);
Node* native_context = NewNode(op);
Node* result = NewNode(javascript()->LoadContext(0, index, true)); Node* result = NewNode(javascript()->LoadContext(0, index, true));
NodeProperties::ReplaceContextInput(result, native_context); NodeProperties::ReplaceContextInput(
result, jsgraph()->HeapConstant(native_context()));
return result; return result;
} }
......
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