module Myst::NativeLib
Extended Modules
Defined in:
myst/interpreter/native_lib.crInstance Method Summary
-
#call_func(itr, func : TFunctor, args : Array(MTValue), receiver : MTValue | Nil = nil)
Mimic the functionality of a Call, but without the lookup of the function.
-
#call_func_by_name(itr, receiver : MTValue, name : String, args : Array(MTValue))
Same as
#call_func
, but the function to call is given as a name to look up on the given receiver. -
#instantiate(itr, type : TType, params : Array(MTValue)) : TInstance
Instantiate a given type and invoke its initializer
Macro Summary
- def_instance_method(type, name, impl_name)
- def_method(type, name, impl_name)
- method(name, this_type, *params, &block)
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.
Instantiate a given type and invoke its initializer