Search in sources :

Example 1 with FrameContext

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;
}
Also used : OptionValues(org.graalvm.compiler.options.OptionValues) FrameContext(org.graalvm.compiler.lir.asm.FrameContext) DebugContext(org.graalvm.compiler.debug.DebugContext) Deoptimizer(com.oracle.svm.core.deopt.Deoptimizer) CompilationResultBuilder(org.graalvm.compiler.lir.asm.CompilationResultBuilder) LIR(org.graalvm.compiler.lir.LIR) SubstrateDataBuilder(com.oracle.svm.core.graal.code.SubstrateDataBuilder) DataBuilder(org.graalvm.compiler.lir.asm.DataBuilder) SharedMethod(com.oracle.svm.core.meta.SharedMethod) AMD64MacroAssembler(org.graalvm.compiler.asm.amd64.AMD64MacroAssembler) Assembler(org.graalvm.compiler.asm.Assembler) SubstrateDataBuilder(com.oracle.svm.core.graal.code.SubstrateDataBuilder)

Aggregations

Deoptimizer (com.oracle.svm.core.deopt.Deoptimizer)1 SubstrateDataBuilder (com.oracle.svm.core.graal.code.SubstrateDataBuilder)1 SharedMethod (com.oracle.svm.core.meta.SharedMethod)1 Assembler (org.graalvm.compiler.asm.Assembler)1 AMD64MacroAssembler (org.graalvm.compiler.asm.amd64.AMD64MacroAssembler)1 DebugContext (org.graalvm.compiler.debug.DebugContext)1 LIR (org.graalvm.compiler.lir.LIR)1 CompilationResultBuilder (org.graalvm.compiler.lir.asm.CompilationResultBuilder)1 DataBuilder (org.graalvm.compiler.lir.asm.DataBuilder)1 FrameContext (org.graalvm.compiler.lir.asm.FrameContext)1 OptionValues (org.graalvm.compiler.options.OptionValues)1