Skip to main content

Module ops

Module ops 

Source
Expand description

Operator primitives shared across execution engines.

These are pure functions over Value — no interpreter state, no AST. The tree-walking evaluator, the bytecode VM, and AOT-Rust output all dispatch to these so the language-level semantics of +, *, ==, etc. live in exactly one place.

Short-circuiting operators (&&, ||) are NOT here: they depend on evaluation order and are the engine’s responsibility.

Functions§

add
div
/ always returns a Number, even for Int / Int. Matches Python’s / and sidesteps the “1 / 2 == 0” surprise.
eq
gt
gt_eq
index_get
index_set
lt
lt_eq
mul
neg
not
not_eq
rem
sub