Ignore:
Timestamp:
Jan 6, 2006, 3:51:00 PM (19 years ago)
Author:
mjs
Message:

Reviewed by Darin.

Changes mostly thanks to Maks Orlovich, tweaked a little by me.

  • kjs/create_hash_table: Use the same hash as the one used buy Identifier.
  • kjs/function.cpp: (KJS::FunctionImp::processParameters): Use the new List::copyFrom (KJS::ActivationImp::ActivationImp): track variable while iterating
  • kjs/internal.cpp: (KJS::StringImp::toObject): create StringInstance directly
  • kjs/list.cpp: (KJS::List::copy): implement in terms of copyFrom (KJS::List::copyFrom): more efficient way to copy in another list
  • kjs/list.h:
  • kjs/lookup.cpp: (keysMatch): updated to work with identifier hash (findEntry): ditto (Lookup::findEntry): ditto (Lookup::find): ditto
  • kjs/lookup.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/function.cpp

    r11910 r11920  
    182182    ListIterator it = args.begin();
    183183    Parameter *p = param;
     184    JSValue  *v = *it;
    184185    while (p) {
    185186      if (it != args.end()) {
     
    188189        printInfo(exec,"to", *it);
    189190#endif
    190         variable->put(exec, p->name, *it);
    191         it++;
     191        variable->put(exec, p->name, v);
     192        v = ++it;
    192193      } else
    193194        variable->put(exec, p->name, jsUndefined());
     
    486487    : _function(function), _arguments(true), _argumentsObject(0)
    487488{
    488   _arguments = arguments.copy();
     489  _arguments.copyFrom(arguments);
    489490  // FIXME: Do we need to support enumerating the arguments property?
    490491}
Note: See TracChangeset for help on using the changeset viewer.