Search in sources :

Example 1 with NativeTailCallFunction

use of com.github.anba.es6draft.runtime.types.builtins.NativeTailCallFunction in project es6draft by anba.

the class Properties method createFunction.

private static void createFunction(Realm realm, OrdinaryObject target, FunctionLayout layout) {
    BuiltinFunction fun;
    if (layout.isTailCall()) {
        fun = new NativeTailCallFunction(realm, layout.name, layout.arity, layout.methodHandle);
    } else {
        fun = new NativeFunction(realm, layout.name, layout.arity, layout.nativeId, layout.methodHandle);
    }
    defineProperty(target, layout, valueProperty(layout, fun));
}
Also used : BuiltinFunction(com.github.anba.es6draft.runtime.types.builtins.BuiltinFunction) NativeFunction(com.github.anba.es6draft.runtime.types.builtins.NativeFunction) NativeTailCallFunction(com.github.anba.es6draft.runtime.types.builtins.NativeTailCallFunction)

Aggregations

BuiltinFunction (com.github.anba.es6draft.runtime.types.builtins.BuiltinFunction)1 NativeFunction (com.github.anba.es6draft.runtime.types.builtins.NativeFunction)1 NativeTailCallFunction (com.github.anba.es6draft.runtime.types.builtins.NativeTailCallFunction)1