Ignore:
Timestamp:
Jul 5, 2008, 10:26:58 PM (17 years ago)
Author:
[email protected]
Message:

2008-07-05 Sam Weinig <[email protected]>

Reviewed by Cameron Zwarich.

First step in broad cleanup effort.

[ File list elided ]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/JSFunction.h

    r35016 r35022  
    3333namespace KJS {
    3434
    35   class FunctionBodyNode;
    36   class FunctionPrototype;
    37   class JSActivation;
    38   class JSGlobalObject;
     35    class FunctionBodyNode;
     36    class FunctionPrototype;
     37    class JSActivation;
     38    class JSGlobalObject;
    3939
    40   class JSFunction : public InternalFunction {
    41   public:
    42     JSFunction(ExecState*, const Identifier&, FunctionBodyNode*, ScopeChainNode*);
     40    class JSFunction : public InternalFunction {
     41    public:
     42        JSFunction(ExecState*, const Identifier&, FunctionBodyNode*, ScopeChainNode*);
    4343
    44     virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
    45     virtual void put(ExecState*, const Identifier& propertyName, JSValue*);
    46     virtual bool deleteProperty(ExecState*, const Identifier& propertyName);
     44        virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
     45        virtual void put(ExecState*, const Identifier& propertyName, JSValue*);
     46        virtual bool deleteProperty(ExecState*, const Identifier& propertyName);
    4747
    48     JSObject* construct(ExecState*, const ArgList&);
    49     JSValue* call(ExecState*, JSValue* thisValue, const ArgList&);
     48        JSObject* construct(ExecState*, const ArgList&);
     49        JSValue* call(ExecState*, JSValue* thisValue, const ArgList&);
    5050
    51     // Note: Returns a null identifier for any parameters that will never get set
    52     // due to a later parameter with the same name.
    53     const Identifier& getParameterName(int index);
     51        // Note: Returns a null identifier for any parameters that will never get set
     52        // due to a later parameter with the same name.
     53        const Identifier& getParameterName(int index);
    5454
    55     static const ClassInfo info;
     55        void setScope(const ScopeChain& scopeChain) { m_scopeChain = scopeChain; }
     56        ScopeChain& scope() { return m_scopeChain; }
    5657
    57     RefPtr<FunctionBodyNode> body;
     58        virtual void mark();
    5859
    59     void setScope(const ScopeChain& s) { _scope = s; }
    60     ScopeChain& scope() { return _scope; }
     60        static const ClassInfo info;
    6161
    62     virtual void mark();
     62        // FIXME: This should be private
     63        RefPtr<FunctionBodyNode> m_body;
    6364
    64   private:
    65     virtual const ClassInfo* classInfo() const { return &info; }
    66     virtual ConstructType getConstructData(ConstructData&);
    67     virtual CallType getCallData(CallData&);
     65    private:
     66        virtual const ClassInfo* classInfo() const { return &info; }
    6867
    69     ScopeChain _scope;
     68        virtual ConstructType getConstructData(ConstructData&);
     69        virtual CallType getCallData(CallData&);
    7070
    71     static JSValue* argumentsGetter(ExecState*, const Identifier&, const PropertySlot&);
    72     static JSValue* callerGetter(ExecState*, const Identifier&, const PropertySlot&);
    73     static JSValue* lengthGetter(ExecState*, const Identifier&, const PropertySlot&);
    74   };
     71        static JSValue* argumentsGetter(ExecState*, const Identifier&, const PropertySlot&);
     72        static JSValue* callerGetter(ExecState*, const Identifier&, const PropertySlot&);
     73        static JSValue* lengthGetter(ExecState*, const Identifier&, const PropertySlot&);
     74
     75        ScopeChain m_scopeChain;
     76    };
    7577
    7678} // namespace kJS
Note: See TracChangeset for help on using the changeset viewer.