Skip to main content

Module bytecode

Module bytecode 

Source

Structs§

ArchivedChunk
An archived Chunk
ArchivedDataLayout
An archived DataLayout
ArchivedDataSlot
An archived DataSlot
ArchivedModule
An archived Module
ArchivedStructTemplate
An archived StructTemplate
Chunk
A compiled function.
ChunkResolver
The resolver for an archived Chunk
CostModel
Per-target cost model used by the WCET and WCMU analyses.
DataLayout
Data segment layout declaration.
DataLayoutResolver
The resolver for an archived DataLayout
DataSlot
A named slot in the data segment.
DataSlotResolver
The resolver for an archived DataSlot
Module
A compiled Keleusma module.
ModuleResolver
The resolver for an archived Module
StructTemplate
Template for struct construction.
StructTemplateResolver
The resolver for an archived StructTemplate

Enums§

ArchivedBlockType
An archived BlockType
ArchivedConstValue
An archived ConstValue
ArchivedOp
An archived Op
BlockType
Classification of a compiled function chunk.
BlockTypeResolver
The resolver for an archived BlockType
ConstValue
A compile-time constant, the variant of Value that the compiler emits into the bytecode’s constant pool.
ConstValueResolver
The resolver for an archived ConstValue
LoadError
A failure encountered while loading or saving precompiled bytecode.
Op
A bytecode instruction.
OpResolver
The resolver for an archived Op
Value
Runtime value in the Keleusma VM.

Constants§

BYTECODE_MAGIC
Magic prefix identifying serialized Keleusma bytecode (KELE).
BYTECODE_VERSION
Wire format version for serialized bytecode. Bytecode produced under a different version is rejected at load time.
NOMINAL_COST_MODEL
Default cost model for the bundled runtime. WCMU value-slot size matches the runtime’s VALUE_SLOT_SIZE_BYTES. WCET pipelined cycles come from the unmeasured table provided by nominal_op_cycles.
RUNTIME_ADDRESS_BITS_LOG2
Address size in bits assumed by this runtime build, encoded as the base-2 exponent. Actual width in bits is 1 << RUNTIME_ADDRESS_BITS_LOG2. The current Keleusma runtime targets 64-bit address spaces, so the exponent is 6.
RUNTIME_FLOAT_BITS_LOG2
Floating-point width in bits assumed by this runtime build, encoded as the base-2 exponent. Actual width in bits is 1 << RUNTIME_FLOAT_BITS_LOG2. The current Keleusma runtime uses f64 exclusively, so the exponent is 6. Narrower or wider floats (f32 = 5, f128 = 7) are reserved for future portability work tracked under B10.
RUNTIME_WORD_BITS_LOG2
Word size in bits assumed by this runtime build, encoded as the base-2 exponent. Actual width in bits is 1 << RUNTIME_WORD_BITS_LOG2. The current Keleusma runtime uses 64-bit words (i64 and f64), so the exponent is 6.
VALUE_SLOT_SIZE_BYTES
Size in bytes of one operand-stack slot, namely the size of Value on the modern 64-bit target. The actual core::mem::size_of::<Value>() is implementation-dependent and may include padding to align variant discriminators. For WCMU analysis, the conservative upper bound is chosen so that the analysis remains sound even if the runtime representation grows.

Functions§

nominal_op_cycles
The pipelined-cycle cost table used by NOMINAL_COST_MODEL. Returns unmeasured pipelined-cycle estimates per the documented scale. The values are intended to be replaced with measured pipelined cycles during deployment validation.
op_from_archived
Convert an archived Op to its owned form.
value_from_archived
Convert an archived ConstValue to its owned Value form.