Ignore:
Timestamp:
May 19, 2010, 6:15:32 PM (15 years ago)
Author:
[email protected]
Message:

Reverting r59800, this b0rked stuff.

Reviewed by NOBODY (build fix).

(JSC::Interpreter::retrieveCaller):
(JSC::Interpreter::findFunctionCallFrame):

  • interpreter/Interpreter.h:
  • profiler/Profiler.cpp:

(JSC::Profiler::createCallIdentifier):

  • runtime/FunctionPrototype.cpp:

(JSC::functionProtoFuncToString):

  • runtime/JSFunction.cpp:

(JSC::):
(JSC::JSFunction::JSFunction):

  • runtime/JSFunction.h:
  • runtime/JSObject.cpp:
  • runtime/JSObject.h:
  • runtime/Lookup.cpp:

(JSC::setUpStaticFunctionSlot):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/JSFunction.cpp

    r59800 r59801  
    4444ASSERT_CLASS_FITS_IN_CELL(JSFunction);
    4545
    46 const ClassInfo JSFunction::info = { "Function", 0, 0, 0 };
     46const ClassInfo JSFunction::info = { "Function", &InternalFunction::info, 0, 0 };
    4747
    4848bool JSFunction::isHostFunctionNonInline() const
     
    5959
    6060JSFunction::JSFunction(ExecState* exec, NonNullPassRefPtr<Structure> structure, int length, const Identifier& name, PassRefPtr<NativeExecutable> thunk)
    61     : Base(structure)
     61    : Base(&exec->globalData(), structure, name)
    6262#if ENABLE(JIT)
    6363    , m_executable(thunk)
     
    6565    , m_scopeChain(NoScopeChain())
    6666{
    67     putDirect(exec->globalData().propertyNames->name, jsString(exec, name.isNull() ? "" : name.ustring()), DontDelete | ReadOnly | DontEnum);
    6867#if ENABLE(JIT)
    6968    putDirect(exec->propertyNames().length, jsNumber(exec, length), DontDelete | ReadOnly | DontEnum);
     
    7675
    7776JSFunction::JSFunction(ExecState* exec, NonNullPassRefPtr<Structure> structure, int length, const Identifier& name, NativeFunction func)
    78     : Base(structure)
     77    : Base(&exec->globalData(), structure, name)
    7978#if ENABLE(JIT)
    8079    , m_executable(exec->globalData().getHostFunction(func))
     
    8281    , m_scopeChain(NoScopeChain())
    8382{
    84     putDirect(exec->globalData().propertyNames->name, jsString(exec, name.isNull() ? "" : name.ustring()), DontDelete | ReadOnly | DontEnum);
    8583#if ENABLE(JIT)
    8684    putDirect(exec->propertyNames().length, jsNumber(exec, length), DontDelete | ReadOnly | DontEnum);
     
    9391
    9492JSFunction::JSFunction(ExecState* exec, NonNullPassRefPtr<FunctionExecutable> executable, ScopeChainNode* scopeChainNode)
    95     : Base(exec->lexicalGlobalObject()->functionStructure())
     93    : Base(&exec->globalData(), exec->lexicalGlobalObject()->functionStructure(), executable->name())
    9694    , m_executable(executable)
    9795    , m_scopeChain(scopeChainNode)
    9896{
    99     const Identifier& name = static_cast<FunctionExecutable*>(m_executable.get())->name();
    100     putDirect(exec->globalData().propertyNames->name, jsString(exec, name.isNull() ? "" : name.ustring()), DontDelete | ReadOnly | DontEnum);
    10197}
    10298
     
    119115}
    120116
    121 const UString& JSFunction::name(ExecState* exec)
    122 {
    123     return asString(getDirect(exec->globalData().propertyNames->name))->value(exec);
    124 }
    125 
    126 const UString JSFunction::displayName(ExecState* exec)
    127 {
    128     JSValue displayName = getDirect(exec->globalData().propertyNames->displayName);
    129    
    130     if (displayName && isJSString(&exec->globalData(), displayName))
    131         return asString(displayName)->value(exec);
    132    
    133     return UString::null();
    134 }
    135 
    136 const UString JSFunction::calculatedDisplayName(ExecState* exec)
    137 {
    138     const UString explicitName = displayName(exec);
    139    
    140     if (!explicitName.isEmpty())
    141         return explicitName;
    142    
    143     return name(exec);
    144 }
    145 
    146117void JSFunction::markChildren(MarkStack& markStack)
    147118{
Note: See TracChangeset for help on using the changeset viewer.