X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/9dae56ea45a0f5f8136a5c93d6f3a7f99399ca73..4be4e30906bcb8ee30b4d189205cb70bad6707ce:/runtime/CallData.cpp?ds=sidebyside diff --git a/runtime/CallData.cpp b/runtime/CallData.cpp index fbb6392..8e1d194 100644 --- a/runtime/CallData.cpp +++ b/runtime/CallData.cpp @@ -26,17 +26,18 @@ #include "config.h" #include "CallData.h" +#include "Executable.h" +#include "Interpreter.h" #include "JSFunction.h" +#include "Operations.h" namespace JSC { -JSValuePtr call(ExecState* exec, JSValuePtr functionObject, CallType callType, const CallData& callData, JSValuePtr thisValue, const ArgList& args) +JSValue call(ExecState* exec, JSValue functionObject, CallType callType, const CallData& callData, JSValue thisValue, const ArgList& args) { - if (callType == CallTypeHost) - return callData.native.function(exec, asObject(functionObject), thisValue, args); - ASSERT(callType == CallTypeJS); - // FIXME: Can this be done more efficiently using the callData? - return asFunction(functionObject)->call(exec, thisValue, args); + ASSERT(callType == CallTypeJS || callType == CallTypeHost); + ASSERT(isValidThisObject(thisValue, exec)); + return exec->interpreter()->executeCall(exec, asObject(functionObject), callType, callData, thisValue, args); } } // namespace JSC