private ScriptFunctionImpl(final String name, final MethodHandle invokeHandle, final Specialization[] specs, final Global global) { super(name, invokeHandle, map$, null, specs, ScriptFunctionData.IS_BUILTIN_CONSTRUCTOR); init(global); }
private ScriptFunctionImpl(final String name, final MethodHandle invokeHandle, final PropertyMap map, final Specialization[] specs, final Global global) { super(name, invokeHandle, map.addAll(map$), null, specs, ScriptFunctionData.IS_BUILTIN_CONSTRUCTOR); init(global); }
private static boolean isStrict(final int flags) { return (flags & ScriptFunctionData.IS_STRICT) != 0; }
BoundScriptFunctionImpl(final ScriptFunctionData data, final ScriptFunction targetFunction) { super(data, Global.instance()); setPrototype(ScriptRuntime.UNDEFINED); this.targetFunction = targetFunction; }
BoundScriptFunctionImpl(ScriptFunctionData data, ScriptFunction targetFunction) { super(data, Global.instance()); setPrototype(ScriptRuntime.UNDEFINED); this.targetFunction = targetFunction; }
/** * Only invoked internally from {@link BoundScriptFunctionImpl} constructor. * @param data the script function data for the bound function. * @param global the global object */ ScriptFunctionImpl(final ScriptFunctionData data, final Global global) { super(data, boundfunctionmap$, null); init(global); }
/** * Factory method for non-constructor built-in functions * * @param name function name * @param methodHandle handle for invocation * @param specs specialized versions of function if available, null otherwise * @return new ScriptFunction */ static ScriptFunction makeFunction(final String name, final MethodHandle methodHandle, final Specialization[] specs) { return makeFunction(name, methodHandle, specs, ScriptFunctionData.IS_BUILTIN); }
/** * Factory method for non-constructor built-in, strict functions * * @param name function name * @param methodHandle handle for invocation * @return new ScriptFunction */ static ScriptFunction makeStrictFunction(final String name, final MethodHandle methodHandle) { return makeFunction(name, methodHandle, null, ScriptFunctionData.IS_BUILTIN | ScriptFunctionData.IS_STRICT ); }
/** * This method is used to create a bound function based on this function. * * @param data the {@code ScriptFunctionData} specifying the functions immutable portion. * @return a function initialized from the specified data. Its parent scope will be set to null, therefore the * passed in data should not expect a callee. */ @Override protected ScriptFunction makeBoundFunction(final ScriptFunctionData data) { return new BoundScriptFunctionImpl(data, getTargetFunction()); }
/** * Only invoked internally from {@link BoundScriptFunctionImpl} constructor. * @param data the script function data for the bound function. * @param global the global object */ ScriptFunctionImpl(final ScriptFunctionData data, final Global global) { super(data, global.getBoundFunctionMap(), null); init(global); }