mildew.types.bindings

This module implements the __proto__ field given to each special object such as ScriptObject, ScriptFunction, ScriptArray, and ScriptString, as well as the static methods for Object, Array, Function, and String

────────────────────────────────────────────────────────────────────────────────

Copyright (C) 2021 pillager86.rf.gd

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

Members

Functions

getArrayPrototype
ScriptObject getArrayPrototype()
Undocumented in source. Be warned that the author may not have intended to support it.
getFunctionPrototype
ScriptObject getFunctionPrototype()
Undocumented in source. Be warned that the author may not have intended to support it.
getLocalThis
ScriptAny getLocalThis(Environment env, ScriptAny func)

Determine the local this

getObjectPrototype
ScriptObject getObjectPrototype()
Undocumented in source. Be warned that the author may not have intended to support it.
getStringPrototype
ScriptObject getStringPrototype()
Undocumented in source. Be warned that the author may not have intended to support it.
initializeTypesLibrary
void initializeTypesLibrary(Interpreter interpreter)

Initializes the bindings of builtin types such as Object, Function, String, and Array. This function is not required because these objects already have their __proto__ set correctly when constructed. Documentation for all these classes' methods can be found at https://pillager86.github.io/dmildew/

native_Function_call
ScriptAny native_Function_call(Environment env, ScriptAny* thisIsFn, ScriptAny[] args, NativeFunctionError nfe)

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.

Meta