Expand description
Runtime data types shared by the VM and the compiler.
These live in the self-contained candela-vm crate so the runtime core
(vm + data + gc + embed + artifact) links without the parser,
compiler, or REPL. The candela compiler crate depends on this crate and
re-exports these types (aliasing candela_vm::rt as crate::rt, etc.), so
its own source keeps its import paths (compiler_data::Struct,
type_system::DataType, expr::Span).
Structs§
- Dynamic
LibFn - Enum
Type - A native tagged-union enum type. Its values are stored in the object pool
like structs: element 0 of the pool entry is the variant tag (an int index
into
variants), and elements1..are the variant’s payload in order. - Enum
Variant - Error
Catch - FnValue
- What a
fn(...)type says about the functions that may reach it. - GcState
- What the collector knows about the pools between two allocations.
- GcStats
- What the collector has done over a set of pools, and how large they are.
- Host
FnSig - Marshalling signature for a
hostfunction, indexed by the compiler’sFnSignature::id.types[0]is the return type;types[1..]are the argument types. - Instr
Src - Pool
Stats - How large one pool is.
- Pools
- Source
- Span
- A span of code in a
Source’scontents. - Struct
Enums§
- Data
Type - A resolved candela type. Attached to compiled artifacts (struct field types, dynamic-library / host function signatures) so the VM can marshal values.
- Library
Origin - Where a recorded
dylibspec is resolved from when an artifact loads. - Target
Os - Target operating system for dynamic-library filename resolution.
Functions§
- argv_
skip - The count
set_argv_skipput in effect on this thread. - dylib_
dirs - The directories
set_dylib_dirsput in effect on this thread. - resolve_
library_ filename - Maps a candela
dylib/importlibrary spec to a concrete filename foros. - set_
argv_ skip - Says how many leading command-line arguments are the command’s own, and returns the count that was in effect.
- set_
dylib_ dirs - Sets the directories a
dylibimport’s library is looked for in on this thread, and returns the ones that were in effect, so a caller can put them back. - std_
lib_ dir - The directory the standard library ships in:
CANDELA_LIB_PATHwhen it is set, andlibs/beside the running executable otherwise, which is where the toolchain installs it next tocandelaandcandela-vm.