Changeset 27126 in webkit for trunk/JavaScriptCore/kjs/function.h
- Timestamp:
- Oct 26, 2007, 3:43:03 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/function.h
r27097 r27126 25 25 #define KJS_FUNCTION_H 26 26 27 #include "SymbolTable.h" 27 28 #include "object.h" 28 29 #include <wtf/OwnPtr.h> … … 138 139 class ActivationImp : public JSObject { 139 140 public: 140 ActivationImp(FunctionImp* function, const List& arguments); 141 struct LocalStorageEntry { 142 LocalStorageEntry() 143 { 144 } 145 146 LocalStorageEntry(JSValue* v, int a) 147 : value(v) 148 , attributes(a) 149 { 150 } 151 152 JSValue* value; 153 int attributes; 154 }; 155 156 typedef Vector<LocalStorageEntry, 32> LocalStorage; 157 158 private: 159 struct ActivationImpPrivate { 160 ActivationImpPrivate(FunctionImp* f, const List& a) 161 : function(f) 162 , arguments(a) 163 , argumentsObject(0) 164 { 165 ASSERT(f); 166 } 167 168 FunctionImp* function; 169 LocalStorage localStorage; 170 171 List arguments; 172 Arguments* argumentsObject; 173 }; 174 175 public: 176 ActivationImp::ActivationImp(FunctionImp* function, const List& arguments); 141 177 142 178 virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); … … 151 187 bool isActivation() { return true; } 152 188 153 void releaseArguments() { _arguments.reset(); } 189 void releaseArguments() { d->arguments.reset(); } 190 191 LocalStorage& localStorage() { return d->localStorage; }; 154 192 155 193 private: … … 157 195 static JSValue* argumentsGetter(ExecState*, JSObject*, const Identifier&, const PropertySlot& slot); 158 196 void createArgumentsObject(ExecState*); 159 160 FunctionImp* _function; 161 List _arguments; 162 mutable Arguments* _argumentsObject; 197 198 OwnPtr<ActivationImpPrivate> d; 199 SymbolTable* symbolTable; 163 200 }; 164 201
Note:
See TracChangeset
for help on using the changeset viewer.