Struct runestick::Unit [−][src]
pub struct Unit { /* fields omitted */ }
Expand description
Instructions from a single source file.
Implementations
pub fn new(
instructions: Vec<Inst>,
functions: HashMap<Hash, UnitFn>,
static_strings: Vec<Arc<StaticString>>,
static_bytes: Vec<Vec<u8>>,
static_object_keys: Vec<Box<[String]>>,
rtti: HashMap<Hash, Arc<Rtti>>,
variant_rtti: HashMap<Hash, Arc<VariantRtti>>,
debug: Option<Box<DebugInfo>>,
constants: HashMap<Hash, ConstValue>
) -> Self
pub fn new(
instructions: Vec<Inst>,
functions: HashMap<Hash, UnitFn>,
static_strings: Vec<Arc<StaticString>>,
static_bytes: Vec<Vec<u8>>,
static_object_keys: Vec<Box<[String]>>,
rtti: HashMap<Hash, Arc<Rtti>>,
variant_rtti: HashMap<Hash, Arc<VariantRtti>>,
debug: Option<Box<DebugInfo>>,
constants: HashMap<Hash, ConstValue>
) -> Self
Construct a new unit with the given content.
Access debug information for the given location if it is available.
Get the instruction at the given instruction pointer.
Iterate over all static strings in the unit.
Iterate over all static object keys in the unit.
Iterate over all instructions in order.
Iterate over dynamic functions.
Lookup the static string by slot, if it exists.
Lookup the static byte string by slot, if it exists.
Lookup the static object keys by slot, if it exists.
Lookup runt-time information for the given type hash.
Lookup variant runt-time information for the given variant hash.
Read a constant value from the unit.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more