Add JSValue::isFunction
https://bugs.webkit.org/show_bug.cgi?id=81935
Reviewed by Geoff Garen.
This would be useful in the WebCore bindings code.
Also, remove asFunction, replace with jsCast<JSFunction*>.
Source/JavaScriptCore:
- API/JSContextRef.cpp:
- debugger/Debugger.cpp:
- debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::functionName):
(JSC::DFG::Graph::valueOfFunctionConstant):
- dfg/DFGOperations.cpp:
- interpreter/CallFrame.cpp:
(JSC::CallFrame::isInlineCallFrameSlow):
- interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
(JSC::DEFINE_STUB_FUNCTION):
(JSC::jitCompileFor):
(JSC::lazyLinkFor):
- llint/LLIntSlowPaths.cpp:
(JSC::LLInt::traceFunctionPrologue):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::setUpCall):
(JSC::Arguments::finishCreation):
- runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncFilter):
(JSC::arrayProtoFuncMap):
(JSC::arrayProtoFuncEvery):
(JSC::arrayProtoFuncForEach):
(JSC::arrayProtoFuncSome):
(JSC::arrayProtoFuncReduce):
(JSC::arrayProtoFuncReduceRight):
- runtime/CommonSlowPaths.h:
(JSC::CommonSlowPaths::arityCheckFor):
(JSC::FunctionExecutable::compileFor):
(JSC::FunctionExecutable::compileOptimizedFor):
- runtime/FunctionPrototype.cpp:
(JSC::functionProtoFuncToString):
(JSC::JSArray::sort):
(JSC::JSFunction::argumentsGetter):
(JSC::JSFunction::callerGetter):
(JSC::JSFunction::lengthGetter):
(JSC):
(JSC::asJSFunction):
(JSC::JSValue::isFunction):
- runtime/JSGlobalData.cpp:
(WTF::Recompiler::operator()):
(JSC::JSGlobalData::releaseExecutableMemory):
- runtime/JSValue.h:
- runtime/StringPrototype.cpp:
(JSC::replaceUsingRegExpSearch):
Source/WebCore:
- bindings/js/JSInjectedScriptHostCustom.cpp:
(WebCore::JSInjectedScriptHost::functionDetails):
- bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStack):