Changeset 38825 in webkit for trunk/JavaScriptCore/runtime


Ignore:
Timestamp:
Nov 27, 2008, 6:24:20 PM (17 years ago)
Author:
[email protected]
Message:

2008-11-27 Sam Weinig <[email protected]>

Reviewed by Cameron Zwarich.

Fix FIXME by adding accessor for JSFunction's m_body property.

  • interpreter/Interpreter.cpp: (JSC::Interpreter::cti_op_call_JSFunction): (JSC::Interpreter::cti_vm_dontLazyLinkCall): (JSC::Interpreter::cti_vm_lazyLinkCall):
  • profiler/Profiler.cpp: (JSC::createCallIdentifierFromFunctionImp):
  • runtime/Arguments.h: (JSC::Arguments::getArgumentsData): (JSC::Arguments::Arguments):
  • runtime/FunctionPrototype.cpp: (JSC::functionProtoFuncToString):
  • runtime/JSFunction.h: (JSC::JSFunction::JSFunction): (JSC::JSFunction::body):
Location:
trunk/JavaScriptCore/runtime
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/Arguments.h

    r38511 r38825  
    107107        function = callFrame->callee();
    108108   
    109         CodeBlock* codeBlock = &function->m_body->generatedBytecode();
     109        CodeBlock* codeBlock = &function->body()->generatedBytecode();
    110110        int numParameters = codeBlock->numParameters;
    111111        argc = callFrame->argumentCount();
     
    130130        getArgumentsData(callFrame, callee, firstParameterIndex, argv, numArguments);
    131131
    132         d->numParameters = callee->m_body->parameterCount();
     132        d->numParameters = callee->body()->parameterCount();
    133133        d->firstParameterIndex = firstParameterIndex;
    134134        d->numArguments = numArguments;
     
    161161        , d(new ArgumentsData)
    162162    {
    163         ASSERT(!callFrame->callee()->m_body->parameterCount());
     163        ASSERT(!callFrame->callee()->body()->parameterCount());
    164164
    165165        unsigned numArguments = callFrame->argumentCount() - 1;
  • trunk/JavaScriptCore/runtime/FunctionPrototype.cpp

    r38511 r38825  
    6868    if (thisValue->isObject(&JSFunction::info)) {
    6969        JSFunction* function = asFunction(thisValue);
    70         return jsString(exec, "function " + function->name(&exec->globalData()) + "(" + function->m_body->paramString() + ") " + function->m_body->toSourceString());
     70        return jsString(exec, "function " + function->name(&exec->globalData()) + "(" + function->body()->paramString() + ") " + function->body()->toSourceString());
    7171    }
    7272
  • trunk/JavaScriptCore/runtime/JSFunction.h

    r38767 r38825  
    4343
    4444        typedef InternalFunction Base;
    45         JSFunction(PassRefPtr<JSC::Structure> st) : InternalFunction(st), m_scopeChain(NoScopeChain()) {}
     45
     46        JSFunction(PassRefPtr<Structure> structure)
     47            : InternalFunction(structure)
     48            , m_scopeChain(NoScopeChain())
     49        {
     50        }
     51
    4652    public:
    4753        JSFunction(ExecState*, const Identifier&, FunctionBodyNode*, ScopeChainNode*);
     
    5864        ScopeChain& scope() { return m_scopeChain; }
    5965
     66        FunctionBodyNode* body() const { return m_body.get(); }
     67
    6068        virtual void mark();
    6169
    6270        static const ClassInfo info;
    63 
    64         // FIXME: This should be private
    65         RefPtr<FunctionBodyNode> m_body;
    6671
    6772        static PassRefPtr<Structure> createStructure(JSValue* prototype)
     
    8085        static JSValue* lengthGetter(ExecState*, const Identifier&, const PropertySlot&);
    8186
     87        RefPtr<FunctionBodyNode> m_body;
    8288        ScopeChain m_scopeChain;
    8389    };
Note: See TracChangeset for help on using the changeset viewer.