Changeset 111739 in webkit for trunk/Source/JavaScriptCore/llint


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/llint/LLIntSlowPaths.cpp

    r111244 r111739  
    190190static void traceFunctionPrologue(ExecState* exec, const char* comment, CodeSpecializationKind kind)
    191191{
    192     JSFunction* callee = asFunction(exec->callee());
     192    JSFunction* callee = jsCast<JSFunction*>(exec->callee());
    193193    FunctionExecutable* executable = callee->jsExecutable();
    194194    CodeBlock* codeBlock = &executable->generatedBytecodeFor(kind);
     
    317317LLINT_SLOW_PATH_DECL(entry_osr_function_for_call)
    318318{
    319     return entryOSR(exec, pc, &asFunction(exec->callee())->jsExecutable()->generatedBytecodeFor(CodeForCall), "entry_osr_function_for_call", Prologue);
     319    return entryOSR(exec, pc, &jsCast<JSFunction*>(exec->callee())->jsExecutable()->generatedBytecodeFor(CodeForCall), "entry_osr_function_for_call", Prologue);
    320320}
    321321
    322322LLINT_SLOW_PATH_DECL(entry_osr_function_for_construct)
    323323{
    324     return entryOSR(exec, pc, &asFunction(exec->callee())->jsExecutable()->generatedBytecodeFor(CodeForConstruct), "entry_osr_function_for_construct", Prologue);
     324    return entryOSR(exec, pc, &jsCast<JSFunction*>(exec->callee())->jsExecutable()->generatedBytecodeFor(CodeForConstruct), "entry_osr_function_for_construct", Prologue);
    325325}
    326326
    327327LLINT_SLOW_PATH_DECL(entry_osr_function_for_call_arityCheck)
    328328{
    329     return entryOSR(exec, pc, &asFunction(exec->callee())->jsExecutable()->generatedBytecodeFor(CodeForCall), "entry_osr_function_for_call_arityCheck", ArityCheck);
     329    return entryOSR(exec, pc, &jsCast<JSFunction*>(exec->callee())->jsExecutable()->generatedBytecodeFor(CodeForCall), "entry_osr_function_for_call_arityCheck", ArityCheck);
    330330}
    331331
    332332LLINT_SLOW_PATH_DECL(entry_osr_function_for_construct_arityCheck)
    333333{
    334     return entryOSR(exec, pc, &asFunction(exec->callee())->jsExecutable()->generatedBytecodeFor(CodeForConstruct), "entry_osr_function_for_construct_arityCheck", ArityCheck);
     334    return entryOSR(exec, pc, &jsCast<JSFunction*>(exec->callee())->jsExecutable()->generatedBytecodeFor(CodeForConstruct), "entry_osr_function_for_construct_arityCheck", ArityCheck);
    335335}
    336336
     
    453453{
    454454    LLINT_BEGIN();
    455     JSFunction* constructor = asFunction(exec->callee());
     455    JSFunction* constructor = jsCast<JSFunction*>(exec->callee());
    456456   
    457457#if !ASSERT_DISABLED
     
    13111311        return handleHostCall(execCallee, pc, calleeAsValue, kind);
    13121312   
    1313     JSFunction* callee = asFunction(calleeAsFunctionCell);
     1313    JSFunction* callee = jsCast<JSFunction*>(calleeAsFunctionCell);
    13141314    ScopeChainNode* scope = callee->scopeUnchecked();
    13151315    JSGlobalData& globalData = *scope->globalData;
Note: See TracChangeset for help on using the changeset viewer.