Module lovm2::prelude[][src]

Important structs, enums and constants for using lovm2 as library

Macros

lv2_access

Creates an Access expression

lv2_call

Creates a Call expression

lv2_dict

Creates a dict Initialize expression using Expr as items

lv2_list

Creates a list Initialize expression using Expr as items

lv2_var

Creates a Variable from a rust identifier

Structs

Access

Consecutive read on a List or Dict

Assign

Storing data in various locations

Block

List of statements forming a code block

Branch

Conditional execution

Break

Highlevel break statement

Call

Execute a CodeObject by name using the given arguments

CompileOptions

Settings for lowering to bytecode

Continue

Highlevel continue statement

Conv

Do type conversion on a lowered Expr at runtime

Hir

Highlevel representation of a function

HirLoweringRuntime

Information for the process of lowering HIR to LIR

Include

Loads a module by name into the VM

IndexMap

A hash table where the iteration order of the key-value pairs is independent of the hash values of the keys.

Initialize

Initialize complex objects (Dict and List), supports Expr as arguments

Interrupt

Trigger a VM interrupt

Lovm2CompileError

Compiletime error

Lovm2Error

Runtime Error

Module

Main runtime representation for loadable modules.

ModuleBuilder

Representation of modules before lowering.

ModuleMeta

Meta information required on native and shared object modules.

Return

Return value from a CodeObject

Slice

Create a new List containing references to values on the target List

Variable

A thin wrapper around an identifier name.

Enums

Expr

Expressions and operations that produce Values

HirElement

Sum type for every HIR element

Iter

Iterator expressions and operations.

Lovm2ErrorTy
Operator1

Operator with one operand

Operator2

Operator with two operands

Repeat

Runs a Block forever or until a condition is met

Value

Runtime representation of values

Constants

DEFAULT_MODULE_NAME

If a module was not assigned a name, take this instead.

ENTRY_POINT

Name of the CodeObject entry that is used as a programs starting point inside Vm::run.

Traits

HasBlock

Supplying functionality for all structures containing a Block

HirLowering

Structures supporting transformation into LIR

Jumpable

Structures supporting custom jump targets

Functions

err_custom

Create an error from a custom message

err_empty_dereference

Tried to operate on an empty reference

err_from_string

Create a custom error from string

err_invalid_set_target

Set instructions operand is not a Ref

err_iterator_exhausted

next was called on an iterator even though it is empty

err_method_not_supported

The operation is not supported for this value type

err_not_supported

The operation is not supported

err_reserved_interrupt

The interrupt cannot be assigned from user code

err_symbol_not_found

Shared object symbol was not found

err_ty_unexpected

Unexpected type, expected other type instead

to_lower_camel_case

Translate a name from snake_case (lovm2 default) to lowerCamelCase

Type Definitions

Lovm2CompileResult

Compile Result

Lovm2Result

Runtime Result