Changeset 30040 in webkit for trunk/JavaScriptCore/kjs/function.cpp
- Timestamp:
- Feb 6, 2008, 9:33:07 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/function.cpp
r29818 r30040 282 282 // ECMA 10.1.8 283 283 Arguments::Arguments(ExecState* exec, FunctionImp* func, const List& args, ActivationImp* act) 284 : JSObject(exec->lexicalGlobalObject()->objectPrototype()), 285 _activationObject(act), 286 indexToNameMap(func, args)287 { 288 putDirect(exec->propertyNames().callee, func, DontEnum);289 putDirect(exec->propertyNames().length, args.size(), DontEnum);290 291 int i = 0;292 List::const_iterator end = args.end();293 for (List::const_iterator it = args.begin(); it != end; ++it, ++i) {294 if (!indexToNameMap.isMapped(Identifier::from(i))) {295 JSObject::put(exec, Identifier::from(i), *it, DontEnum);296 }297 }284 : JSObject(exec->lexicalGlobalObject()->objectPrototype()) 285 , _activationObject(act) 286 , indexToNameMap(func, args) 287 { 288 putDirect(exec->propertyNames().callee, func, DontEnum); 289 putDirect(exec->propertyNames().length, args.size(), DontEnum); 290 291 int i = 0; 292 List::const_iterator end = args.end(); 293 for (List::const_iterator it = args.begin(); it != end; ++it, ++i) { 294 Identifier name = Identifier::from(i); 295 if (!indexToNameMap.isMapped(name)) 296 putDirect(name, *it, DontEnum); 297 } 298 298 } 299 299 … … 867 867 { 868 868 ASSERT_ARG(function, function); 869 put (exec,exec->propertyNames().length, jsNumber(len), DontDelete | ReadOnly | DontEnum);869 putDirect(exec->propertyNames().length, jsNumber(len), DontDelete | ReadOnly | DontEnum); 870 870 } 871 871 … … 875 875 { 876 876 ASSERT_ARG(function, function); 877 put (exec,exec->propertyNames().length, jsNumber(len), DontDelete | ReadOnly | DontEnum);877 putDirect(exec->propertyNames().length, jsNumber(len), DontDelete | ReadOnly | DontEnum); 878 878 } 879 879
Note:
See TracChangeset
for help on using the changeset viewer.