hlrun.core
Core classes, handling, and casting for primitives.
class Args
Represents intercepted arguments passed to a function.
args: List[HlValue]
args = args_arr
init
def __init__(args: List[Any], fn_symbol: str, types: str)
to_prims
def to_prims() -> List[Any | HlPrim]
class HlClosure(HlValue)
Proxy to a callable function, out-of-context of an object.
init
def __init__(ptr: Any) -> None
class HlObj(HlValue)
Proxy to an instance of an HL class.
init
def __init__(ptr)
class HlPrim(HlValue)
Primitive object, stored as a castable Python object and a type kind.
obj: Any
type: Type
init
def __init__(obj: Any, type: Type) -> None
class HlValue
Value of some kind. ABC for all HL values.
class Type(Enum)
Type kind of an object.
VOID
VOID = 0
U8
U8 = 1
U16
U16 = 2
I32
I32 = 3
I64
I64 = 4
F32
F32 = 5
F64
F64 = 6
BOOL
BOOL = 7
BYTES
BYTES = 8
DYN
DYN = 9
FUN
FUN = 10
OBJ
OBJ = 11
ARRAY
ARRAY = 12
TYPETYPE
TYPETYPE = 13
REF
REF = 14
VIRTUAL
VIRTUAL = 15
DYNOBJ
DYNOBJ = 16
ABSTRACT
ABSTRACT = 17
ENUM
ENUM = 18
NULL
NULL = 19
METHOD
METHOD = 20
STRUCT
STRUCT = 21
PACKED
PACKED = 22
to_hlvalue
def to_hlvalue(obj: Any, kind: Type | int) -> HlValue | Any
Convert a Capsule containing a pointer to an HL object to a HlValue.
RUNTIME
RUNTIME = True