Represents a single interpretable chunk of bytecode, Think a function.
spans: Vec<(usize, Span)>
Creates a new empty Lambda to be filled.
Emits an opcode as a byte
pub fn emit_bytes(&mut self, bytes: &mut Vec<u8>)[src]
Emits a series of bytes
Emits a span, should be called before an opcode is emmited. This function ties opcodes to spans in source. See index_span as well.
Removes the last emitted byte
pub fn index_data(&mut self, data: Data) -> usize[src]
Given some data, this function adds it to the constants table, and returns the data's index. The constants table is push only, so constants are identified by their index. The resulting usize can be split up into a number byte stream, and be inserted into the bytecode.
pub fn index_span(&mut self, index: usize) -> Span[src]
Look up the nearest span at or before the index of a specific bytecode op.
impl StructuralEq for Lambda[src]
impl StructuralPartialEq for Lambda[src]
impl !RefUnwindSafe for Lambda
impl !UnwindSafe for Lambda
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)[src]
type Error = Infallible
The type returned in the event of a conversion error.