pub suberror CodeObjectVerifyError {
EmptyCode
MisalignedCodeSize(size~ : Int)
InvalidRelocation(index~ : Int, message~ : String)
DuplicateRelocationOffset(offset~ : Int)
InvalidSourceSite(index~ : Int, offset~ : Int)
InvalidTrapSite(index~ : Int, offset~ : Int)
InvalidSafepointSite(index~ : Int, offset~ : Int)
InvalidRootLocation(safepoint~ : Int, root~ : Int)
InvalidStackMap(safepoint~ : Int)
InvalidUnwindDirective(index~ : Int, message~ : String)
} derive(Eq, Debug)impl Show for CodeObjectVerifyErrorpub struct Relocation {
offset : Int
kind : RelocationKind
target : RelocationTarget
addend : Int64
} derive(Eq, Debug)fn Relocation::new(offset : Int, kind : RelocationKind, target : RelocationTarget, addend? : Int64) -> Relocationpub(all) enum RelocationTarget {
Code(CodeSymbol)
External(ExternalSymbol)
Data(DataSymbol)
} derive(Eq, Debug)pub(all) enum RootLocation {
Register(RegisterBank, Int)
Stack(offset~ : Int, ty~ : ValueType)
} derive(Eq, Debug)pub struct SafepointSite {
offset : Int
kind : SafepointKind
roots : Array[RootLocation]
source : SourceLocation?
stack_map : StackMapMetadata?
} derive(Eq, Debug)fn SafepointSite::new(offset : Int, kind : SafepointKind, roots : Array[RootLocation], source? : SourceLocation, stack_map? : StackMapMetadata) -> SafepointSitepub(all) enum UnwindOperation {
StackAlloc(size~ : Int)
SetFramePointer(RegisterBank, Int, cfa_offset~ : Int)
SaveRegister(RegisterBank, Int, cfa_offset~ : Int)
} derive(Eq, Debug)fn build(architecture : Architecture, code : Array[Byte], relocations? : Array[Relocation], sources? : Array[SourceSite], traps? : Array[TrapSite], safepoints? : Array[SafepointSite], unwind? : Array[UnwindDirective]) -> UnlinkedCodeObject raise CodeObjectVerifyErrorTarget-neutral semantic machine IR