use of org.graalvm.compiler.lir.asm.FrameContext in project graal by oracle.
the class SubstrateAMD64Backend method newCompilationResultBuilder.
@Override
public CompilationResultBuilder newCompilationResultBuilder(LIRGenerationResult lirGenResult, FrameMap frameMap, CompilationResult compilationResult, CompilationResultBuilderFactory factory) {
Assembler masm = createAssembler(frameMap);
SharedMethod method = ((SubstrateLIRGenerationResult) lirGenResult).getMethod();
Deoptimizer.StubType stubType = method.getDeoptStubType();
DataBuilder dataBuilder = new SubstrateDataBuilder();
FrameContext frameContext;
if (stubType == Deoptimizer.StubType.EntryStub) {
frameContext = new DeoptEntryStubContext();
} else if (stubType == Deoptimizer.StubType.ExitStub) {
frameContext = new DeoptExitStubContext();
} else {
frameContext = new SubstrateAMD64FrameContext();
}
LIR lir = lirGenResult.getLIR();
OptionValues options = lir.getOptions();
DebugContext debug = lir.getDebug();
CompilationResultBuilder tasm = factory.createBuilder(getCodeCache(), getForeignCalls(), lirGenResult.getFrameMap(), masm, dataBuilder, frameContext, options, debug, compilationResult);
tasm.setTotalFrameSize(lirGenResult.getFrameMap().totalFrameSize());
return tasm;
}
Aggregations