Skip to main content

system_native

Function system_native 

Source
pub fn system_native(name: &str, argc: usize) -> Option<BuiltinId>
Expand description

The standard library’s system natives that run through call_builtin — file.lg’s read and write, random.lg’s randomInt and randomFloat, env.lg’s get, time.lg’s now — by name and arity. The one table the tree-walker and the VM compiler both consult, so a native cannot be wired on one tier and fall through to its empty body on the other. A caller asks it only for a ## To native declaration: a program’s own function of the same name always wins.