isBuiltinFunction = true;
}
+Value BuiltinFunction::call(ExecutionContext *context, Value thisObject, Value *args, int argc)
+{
+ return code(context, thisObject, args, argc);
+}
+
Value BuiltinFunction::construct(ExecutionContext *ctx, Value *, int)
{
ctx->throwTypeError();
virtual Value construct(ExecutionContext *context, Value *args, int argc);
virtual Value call(ExecutionContext *, Value, Value *, int);
- virtual struct ScriptFunction *asScriptFunction() { return 0; }
-
protected:
static const ManagedVTable static_vtbl;
static void markObjects(Managed *that);
Value (*code)(ExecutionContext *parentContext, Value thisObject, Value *args, int argc);
BuiltinFunction(ExecutionContext *scope, String *name, Value (*code)(ExecutionContext *, Value, Value *, int));
- virtual Value call(ExecutionContext *context, Value thisObject, Value *args, int argc) {
- return code(context, thisObject, args, argc);
- }
+ virtual Value call(ExecutionContext *context, Value thisObject, Value *args, int argc);
virtual Value construct(ExecutionContext *ctx, Value *, int);
};
virtual Value call(ExecutionContext *context, Value thisObject, Value *args, int argc);
virtual Value construct(ExecutionContext *context, Value *args, int argc);
-
- virtual ScriptFunction *asScriptFunction() { return this; }
};
struct BoundFunction: FunctionObject {