public class CompilationResultBuilder extends Object
CompilationResult as its code is being assembled.CompilationResultBuilderFactory| Modifier and Type | Class and Description |
|---|---|
static class |
CompilationResultBuilder.Options |
static class |
CompilationResultBuilder.PendingImplicitException |
| Modifier and Type | Field and Description |
|---|---|
Assembler |
asm |
CodeCacheProvider |
codeCache |
CompilationResult |
compilationResult |
protected int |
currentBlockIndex
The index of the block currently being emitted.
|
DataBuilder |
dataBuilder |
ForeignCallsProvider |
foreignCalls |
FrameContext |
frameContext
The object that emits code for managing a method's frame.
|
FrameMap |
frameMap |
protected LIR |
lir
The LIR for which code is being generated.
|
CodeGenProviders |
providers |
TargetDescription |
target |
Register |
uncompressedNullRegister |
| Constructor and Description |
|---|
CompilationResultBuilder(CodeGenProviders providers,
FrameMap frameMap,
Assembler asm,
DataBuilder dataBuilder,
FrameContext frameContext,
OptionValues options,
DebugContext debug,
CompilationResult compilationResult,
Register uncompressedNullRegister) |
CompilationResultBuilder(CodeGenProviders providers,
FrameMap frameMap,
Assembler asm,
DataBuilder dataBuilder,
FrameContext frameContext,
OptionValues options,
DebugContext debug,
CompilationResult compilationResult,
Register uncompressedNullRegister,
org.graalvm.collections.EconomicMap<Constant,DataSection.Data> dataCache) |
| Modifier and Type | Method and Description |
|---|---|
AbstractAddress |
asAddress(Value value) |
AbstractAddress |
asByteAddr(Value value) |
AbstractAddress |
asDoubleAddr(Value value) |
double |
asDoubleConst(Value value)
Returns the double value of any constant that can be represented by a 64-bit float value.
|
AbstractAddress |
asDoubleConstRef(JavaConstant value)
Returns the address of a double constant that is embedded as a data reference into the code.
|
AbstractAddress |
asDoubleConstRef(JavaConstant value,
int alignment) |
AbstractAddress |
asFloatAddr(Value value) |
float |
asFloatConst(Value value)
Returns the float value of any constant that can be represented by a 32-bit float value.
|
AbstractAddress |
asFloatConstRef(JavaConstant value)
Returns the address of a float constant that is embedded as a data reference into the code.
|
AbstractAddress |
asFloatConstRef(JavaConstant value,
int alignment) |
AbstractAddress |
asIntAddr(Value value) |
int |
asIntConst(Value value)
Returns the integer value of any constant that can be represented by a 32-bit integer value,
including long constants that fit into the 32-bit range.
|
AbstractAddress |
asLongAddr(Value value) |
long |
asLongConst(Value value)
Returns the long value of any constant that can be represented by a 64-bit long value.
|
AbstractAddress |
asLongConstRef(JavaConstant value)
Returns the address of a long constant that is embedded as a data reference into the code.
|
AbstractAddress |
asObjectConstRef(JavaConstant value)
Returns the address of an object constant that is embedded as a data reference into the code.
|
AbstractAddress |
asShortAddr(Value value) |
void |
blockComment(String s) |
void |
buildLabelOffsets(LIR generatedLIR)
Builds up a map for label and LIR instruction positions where labels are or labels pointing
to.
|
protected void |
closeCompilationResult()
|
DataSection.Data |
createDataItem(Constant constant) |
void |
emit(LIR lir)
Emits code for
lir in its code emitting order. |
void |
finish()
|
int |
getLastImplicitExceptionOffset() |
LIR |
getLIR() |
OptionValues |
getOptions() |
List<CompilationResultBuilder.PendingImplicitException> |
getPendingImplicitExceptionList() |
boolean |
hasImplicitException(int pcOffset) |
boolean |
isSuccessorEdge(LabelRef edge)
Determines if a given edge from the block currently being emitted goes to its lexical
successor.
|
boolean |
labelWithinLIRRange(LIRInstruction instruction,
Label label,
int maxLIRDistance)
Determines whether the distance from the LIR instruction to the label is within
maxLIRDistance LIR instructions.
|
boolean |
mustReplaceWithUncompressedNullRegister(JavaConstant nullConstant) |
boolean |
needsClearUpperVectorRegisters() |
boolean |
needsMHDeoptHandler() |
AbstractAddress |
recordDataReferenceInCode(Constant constant,
int alignment) |
AbstractAddress |
recordDataReferenceInCode(DataPointerConstant constant) |
AbstractAddress |
recordDataSectionReference(DataSection.Data data) |
Call |
recordDirectCall(int posBefore,
int posAfter,
InvokeTarget callTarget,
LIRFrameState info) |
void |
recordExceptionHandlers(int pcOffset,
LIRFrameState info) |
void |
recordImplicitException(int pcOffset,
int dispatchOffset,
LIRFrameState info) |
void |
recordImplicitException(int pcOffset,
LIRFrameState info) |
void |
recordIndirectCall(int posBefore,
int posAfter,
InvokeTarget callTarget,
LIRFrameState info) |
void |
recordInfopoint(int pos,
DebugInfo debugInfo,
InfopointReason reason) |
void |
recordInfopoint(int pos,
LIRFrameState info,
InfopointReason reason) |
void |
recordInlineDataInCode(Constant data) |
void |
recordInlineDataInCodeWithNote(Constant data,
Object note) |
CompilationResult.CodeMark |
recordMark(CompilationResult.MarkId markId)
Associates
markId with the current assembler position in the compilation result. |
CompilationResult.CodeMark |
recordMark(int codePos,
CompilationResult.MarkId markId)
Associates
markId with position codePos in the compilation result. |
void |
recordSourceMapping(int pcOffset,
int endPcOffset,
NodeSourcePosition sourcePosition) |
void |
resetForEmittingCode() |
void |
setConservativeLabelRanges()
Sets this CompilationResultBuilder into conservative mode.
|
void |
setMaxInterpreterFrameSize(int maxInterpreterFrameSize) |
void |
setNeedsMHDeoptHandler() |
void |
setTotalFrameSize(int frameSize) |
public final Assembler asm
public final DataBuilder dataBuilder
public final CompilationResult compilationResult
public final Register uncompressedNullRegister
public final TargetDescription target
public final CodeGenProviders providers
public final CodeCacheProvider codeCache
public final ForeignCallsProvider foreignCalls
public final FrameMap frameMap
protected LIR lir
protected int currentBlockIndex
public final FrameContext frameContext
public CompilationResultBuilder(CodeGenProviders providers, FrameMap frameMap, Assembler asm, DataBuilder dataBuilder, FrameContext frameContext, OptionValues options, DebugContext debug, CompilationResult compilationResult, Register uncompressedNullRegister)
public CompilationResultBuilder(CodeGenProviders providers, FrameMap frameMap, Assembler asm, DataBuilder dataBuilder, FrameContext frameContext, OptionValues options, DebugContext debug, CompilationResult compilationResult, Register uncompressedNullRegister, org.graalvm.collections.EconomicMap<Constant,DataSection.Data> dataCache)
public final boolean mustReplaceWithUncompressedNullRegister(JavaConstant nullConstant)
public void setTotalFrameSize(int frameSize)
public void setMaxInterpreterFrameSize(int maxInterpreterFrameSize)
public CompilationResult.CodeMark recordMark(int codePos, CompilationResult.MarkId markId)
markId with position codePos in the compilation result.public CompilationResult.CodeMark recordMark(CompilationResult.MarkId markId)
markId with the current assembler position in the compilation result.public void blockComment(String s)
public void finish()
protected void closeCompilationResult()
public void recordExceptionHandlers(int pcOffset,
LIRFrameState info)
public void recordImplicitException(int pcOffset,
LIRFrameState info)
public void recordImplicitException(int pcOffset,
int dispatchOffset,
LIRFrameState info)
public int getLastImplicitExceptionOffset()
public boolean hasImplicitException(int pcOffset)
public Call recordDirectCall(int posBefore,
int posAfter,
InvokeTarget callTarget,
LIRFrameState info)
public void recordIndirectCall(int posBefore,
int posAfter,
InvokeTarget callTarget,
LIRFrameState info)
public void recordInfopoint(int pos,
LIRFrameState info,
InfopointReason reason)
public void recordInfopoint(int pos,
DebugInfo debugInfo,
InfopointReason reason)
public void recordSourceMapping(int pcOffset,
int endPcOffset,
NodeSourcePosition sourcePosition)
public void recordInlineDataInCode(Constant data)
public void recordInlineDataInCodeWithNote(Constant data,
Object note)
public AbstractAddress recordDataSectionReference(DataSection.Data data)
public AbstractAddress recordDataReferenceInCode(DataPointerConstant constant)
public AbstractAddress recordDataReferenceInCode(Constant constant, int alignment)
public DataSection.Data createDataItem(Constant constant)
public int asIntConst(Value value)
public float asFloatConst(Value value)
public long asLongConst(Value value)
public double asDoubleConst(Value value)
public AbstractAddress asFloatConstRef(JavaConstant value)
public AbstractAddress asFloatConstRef(JavaConstant value, int alignment)
public AbstractAddress asDoubleConstRef(JavaConstant value)
public AbstractAddress asDoubleConstRef(JavaConstant value, int alignment)
public AbstractAddress asLongConstRef(JavaConstant value)
public AbstractAddress asObjectConstRef(JavaConstant value)
public AbstractAddress asByteAddr(Value value)
public AbstractAddress asShortAddr(Value value)
public AbstractAddress asIntAddr(Value value)
public AbstractAddress asLongAddr(Value value)
public AbstractAddress asFloatAddr(Value value)
public AbstractAddress asDoubleAddr(Value value)
public AbstractAddress asAddress(Value value)
public boolean isSuccessorEdge(LabelRef edge)
public void emit(LIR lir)
lir in its code emitting order.public LIR getLIR()
public void resetForEmittingCode()
public OptionValues getOptions()
public void buildLabelOffsets(LIR generatedLIR)
public boolean labelWithinLIRRange(LIRInstruction instruction, Label label, int maxLIRDistance)
maxLIRDistance - Maximum number of LIR instructions between label and instructionpublic void setConservativeLabelRanges()
CompilationResultBuilder.labelWithinLIRRange(LIRInstruction, Label, int) always
returns false.public final boolean needsClearUpperVectorRegisters()
public void setNeedsMHDeoptHandler()
public boolean needsMHDeoptHandler()
public List<CompilationResultBuilder.PendingImplicitException> getPendingImplicitExceptionList()