Function xsCallFunction

xs.bindings.xsSlotRecord xsCallFunction (
  scope xs.bindings.xsMachineRecord* the,
  const(xs.bindings.xsSlotRecord) function_,
  const(xs.bindings.xsSlotRecord) this_,
  const(xs.bindings.xsSlotRecord[]) params...
);

Parameters

NameDescription
theA machine
this_A reference to the instance that will have the property or item
function_A reference to the the property or item to call
paramsThe parameter slots to pass to the function

Returns

The function's return value slot.

Examples

In ECMAScript:

foo()
this.foo(1)
this[0](2, 3)

In D:

xsCallFunction(xsGlobal, foo);
xsCallFunction(xsThis, foo, xsInteger(1));
xsCallFunction(xsThis, 0, xsInteger(2), xsInteger(3));