#ifndef CallData_h
#define CallData_h
-#include "NativeFunctionWrapper.h"
+#include "JSCJSValue.h"
namespace JSC {
- class ArgList;
- class ExecState;
- class FunctionBodyNode;
- class JSObject;
- class JSValue;
- class ScopeChainNode;
+class ArgList;
+class ExecState;
+class FunctionExecutable;
+class JSObject;
+class JSScope;
- enum CallType {
- CallTypeNone,
- CallTypeHost,
- CallTypeJS
- };
+enum CallType {
+ CallTypeNone,
+ CallTypeHost,
+ CallTypeJS
+};
- typedef JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*, JSObject*, JSValue thisValue, const ArgList&);
+typedef EncodedJSValue (JSC_HOST_CALL *NativeFunction)(ExecState*);
- union CallData {
- struct {
- NativeFunction function;
- } native;
- struct {
- FunctionBodyNode* functionBody;
- ScopeChainNode* scopeChain;
- } js;
- };
+union CallData {
+ struct {
+ NativeFunction function;
+ } native;
+ struct {
+ FunctionExecutable* functionExecutable;
+ JSScope* scope;
+ } js;
+};
- JSValue call(ExecState*, JSValue functionObject, CallType, const CallData&, JSValue thisValue, const ArgList&);
+JS_EXPORT_PRIVATE JSValue call(ExecState*, JSValue functionObject, CallType, const CallData&, JSValue thisValue, const ArgList&);
} // namespace JSC