]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/CallData.h
JavaScriptCore-1218.34.tar.gz
[apple/javascriptcore.git] / runtime / CallData.h
index 24c19f91dbdf7f4c216ef71fe3a665f4a8d403d7..3bbac734fa999a9a992ba6021630fe58a233518a 100644 (file)
 #ifndef CallData_h
 #define CallData_h
 
-#include "NativeFunctionWrapper.h"
+#include "JSCJSValue.h"
 
 namespace JSC {
 
-    class ArgList;
-    class ExecState;
-    class FunctionExecutable;
-    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 {
-            FunctionExecutable* functionExecutable;
-            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