Commit f6047244 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[turbofan] Use new CodeAssembler::GetJSContextParameter.

This uses the aforementioned helper within the {FastAccessorAssembler}.
It was made available as a helper function now that several users create
code objects following {kCallJSFunction} linkage via the {CodeAssembler}.

R=vogelheim@chromium.org

Review-Url: https://codereview.chromium.org/2644033003
Cr-Commit-Position: refs/heads/master@{#42516}
parent 0d4fc4c3
......@@ -184,12 +184,7 @@ FastAccessorAssembler::ValueId FastAccessorAssembler::Call(
CallInterfaceDescriptor descriptor = stub.GetCallInterfaceDescriptor();
DCHECK_EQ(4, descriptor.GetParameterCount());
DCHECK_EQ(0, descriptor.GetStackParameterCount());
// TODO(vogelheim): There is currently no clean way to retrieve the context
// parameter for a stub and the implementation details are hidden in
// compiler/*. The context_paramter is computed as:
// Linkage::GetJSCallContextParamIndex(descriptor->JSParameterCount())
const int kContextParameter = 3;
Node* context = assembler_->Parameter(kContextParameter);
Node* context = assembler_->GetJSContextParameter();
Node* target = assembler_->HeapConstant(stub.GetCode());
Node* call = assembler_->CallStub(
......
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