Changeset 35022 in webkit for trunk/JavaScriptCore/kjs/JSFunction.h
- Timestamp:
- Jul 5, 2008, 10:26:58 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/JSFunction.h
r35016 r35022 33 33 namespace KJS { 34 34 35 class FunctionBodyNode;36 class FunctionPrototype;37 class JSActivation;38 class JSGlobalObject;35 class FunctionBodyNode; 36 class FunctionPrototype; 37 class JSActivation; 38 class JSGlobalObject; 39 39 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*); 43 43 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); 47 47 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&); 50 50 51 // Note: Returns a null identifier for any parameters that will never get set52 // 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); 54 54 55 static const ClassInfo info; 55 void setScope(const ScopeChain& scopeChain) { m_scopeChain = scopeChain; } 56 ScopeChain& scope() { return m_scopeChain; } 56 57 57 RefPtr<FunctionBodyNode> body;58 virtual void mark(); 58 59 59 void setScope(const ScopeChain& s) { _scope = s; } 60 ScopeChain& scope() { return _scope; } 60 static const ClassInfo info; 61 61 62 virtual void mark(); 62 // FIXME: This should be private 63 RefPtr<FunctionBodyNode> m_body; 63 64 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; } 68 67 69 ScopeChain _scope; 68 virtual ConstructType getConstructData(ConstructData&); 69 virtual CallType getCallData(CallData&); 70 70 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 }; 75 77 76 78 } // namespace kJS
Note:
See TracChangeset
for help on using the changeset viewer.