native_Function_call

This function provides a way for Mildew functions to be called with arbitrary "this" objects. This function is public so that there is a common interface for calling ScriptFunctions without worrying about the underlying details.

Parameters

env Environment

Since this function is to be called from other native functions, this should be the Environment object received. The underlying function handlers will handle the closure data of ScriptFunctions.

args ScriptAny[]

An array of arguments to call the function with, but the first element must be the "this" object to use.

nfe NativeFunctionError

Since this function is to be called from native ScriptFunction implementations, this should be the same NativeFunctionError reference. This must always be checked after using native_Function_call directly.

Return Value

Type: ScriptAny

The return value of calling the ScriptFunction.

Meta