Changeset 2783 in webkit for trunk/JavaScriptCore/kjs/function.cpp
- Timestamp:
- Nov 20, 2002, 1:12:14 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/function.cpp
r2779 r2783 319 319 // ECMA 10.1.8 320 320 ArgumentsImp::ArgumentsImp(ExecState *exec, FunctionImp *func, const List &args) 321 : ObjectImp(exec->interpreter()->builtinObjectPrototype())321 : ArrayInstanceImp(exec->interpreter()->builtinObjectPrototype().imp(), args) 322 322 { 323 323 Value protect(this); 324 put(exec,calleePropertyName, Object(func), DontEnum); 325 put(exec,lengthPropertyName, Number(args.size()), DontEnum); 326 if (!args.isEmpty()) { 327 ListIterator arg = args.begin(); 328 for (int i = 0; arg != args.end(); arg++, i++) { 329 put(exec,i, *arg, DontEnum); 330 } 331 } 324 putDirect(calleePropertyName, func, DontEnum); 332 325 } 333 326 … … 338 331 // ECMA 10.1.6 339 332 ActivationImp::ActivationImp(ExecState *exec, FunctionImp *f, const List &args) 340 : _function(f) 333 : _function(f), _arguments(args) 341 334 { 342 335 Value protect(this); 343 arguments = new ArgumentsImp(exec,f, args); 344 arguments->setGcAllowed(); 345 put(exec, argumentsPropertyName, Object(arguments), Internal|DontDelete); 336 _argumentsObject = new ArgumentsImp(exec, f, args); 337 putDirect(argumentsPropertyName, _argumentsObject, Internal|DontDelete); 346 338 } 347 339 … … 353 345 { 354 346 Value protect(this); 355 put (exec,lengthPropertyName,Number(len),DontDelete|ReadOnly|DontEnum);347 putDirect(lengthPropertyName, len, DontDelete|ReadOnly|DontEnum); 356 348 } 357 349
Note:
See TracChangeset
for help on using the changeset viewer.