Ignore:
Timestamp:
Mar 22, 2012, 11:54:50 AM (13 years ago)
Author:
[email protected]
Message:

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):

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::valueOfFunctionConstant):

  • dfg/DFGOperations.cpp:
  • interpreter/CallFrame.cpp:

(JSC::CallFrame::isInlineCallFrameSlow):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::privateExecute):

  • jit/JITStubs.cpp:

(JSC::DEFINE_STUB_FUNCTION):
(JSC::jitCompileFor):
(JSC::lazyLinkFor):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::traceFunctionPrologue):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::setUpCall):

  • runtime/Arguments.h:

(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):

  • runtime/Executable.h:

(JSC::FunctionExecutable::compileFor):
(JSC::FunctionExecutable::compileOptimizedFor):

  • runtime/FunctionPrototype.cpp:

(JSC::functionProtoFuncToString):

  • runtime/JSArray.cpp:

(JSC::JSArray::sort):

  • runtime/JSFunction.cpp:

(JSC::JSFunction::argumentsGetter):
(JSC::JSFunction::callerGetter):
(JSC::JSFunction::lengthGetter):

  • runtime/JSFunction.h:

(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):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSGlobalData.cpp

    r111013 r111739  
    8282    if (!cell->inherits(&JSFunction::s_info))
    8383        return;
    84     JSFunction* function = asFunction(cell);
     84    JSFunction* function = jsCast<JSFunction*>(cell);
    8585    if (!function->executable() || function->executable()->isHostFunction())
    8686        return;
     
    479479                executable = static_cast<ScriptExecutable*>(*ptr);
    480480            else if (cell->inherits(&JSFunction::s_info)) {
    481                 JSFunction* function = asFunction(*ptr);
     481                JSFunction* function = jsCast<JSFunction*>(*ptr);
    482482                if (function->isHostFunction())
    483483                    continue;
Note: See TracChangeset for help on using the changeset viewer.