module Myst::NativeLib
Extended Modules
Defined in:
myst/interpreter/native_lib.crMacro Summary
- def_instance_method(type, name, impl_name)
- def_method(type, name, impl_name)
- method(name, this_type, *params, &block)
Instance Method Summary
-
#call_func(itr, func : TFunctor, args : Array(Value), receiver : Value | Nil = nil)
Mimic the functionality of a Call, but without the lookup of the function.
-
#call_func_by_name(itr, receiver : Value, name : String, args : Array(Value))
Same as
#call_func
, but the function to call is given as a name to look up on the given receiver. -
#error(message : String, trace : Callstack)
Return a RuntimeError with the given string as the value.
-
#instantiate(itr, type : TType, params : Array(Value)) : TInstance
Instantiate a given type and invoke its initializer
Macro Detail
Instance Method Detail
Mimic the functionality of a Call, but without the lookup of the function. The function can be either a native function or a source-level function. The results do not affect the stack, the result of calling the function will be returned directly.
Same as #call_func
, but the function to call is given as a name to
look up on the given receiver.
Return a RuntimeError with the given string as the value.
Instantiate a given type and invoke its initializer