Changeset 3018 in webkit for trunk/JavaScriptCore/kjs


Ignore:
Timestamp:
Dec 12, 2002, 2:38:17 AM (22 years ago)
Author:
mjs
Message:

JavaScriptCore:

Reviewed by Darin.

  • fixed 3056449 - can't select state at tucows.com
  • kjs/array_instance.h:
  • kjs/array_object.cpp: (ArrayInstanceImp::propList): Add numeric proprties that are in special storage.
  • kjs/array_object.h:
  • kjs/object.h: Make propList a virtual method.

WebCore:

Reviewed by Darin.

Location:
trunk/JavaScriptCore/kjs
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/array_instance.h

    r3015 r3018  
    4141    virtual bool deleteProperty(ExecState *exec, const Identifier &propertyName);
    4242    virtual bool deleteProperty(ExecState *exec, unsigned propertyName);
     43    virtual ReferenceList propList(ExecState *exec, bool recursive);
    4344
    4445    virtual void mark();
  • trunk/JavaScriptCore/kjs/array_object.cpp

    r3015 r3018  
    196196  return ObjectImp::deleteProperty(exec, Identifier::from(index));
    197197}
     198
     199ReferenceList ArrayInstanceImp::propList(ExecState *exec, bool recursive)
     200{
     201  ReferenceList properties = ObjectImp::propList(exec,recursive);
     202
     203  // avoid fetching this every time through the loop
     204  ValueImp *undefined = UndefinedImp::staticUndefined;
     205
     206  for (unsigned i = 0; i < storageLength; ++i) {
     207    ValueImp *imp = storage[i];
     208    if (imp && imp != undefined) {
     209      properties.append(Reference(this, i));
     210    }
     211  }
     212  return properties;
     213}
     214
    198215
    199216void ArrayInstanceImp::resizeStorage(unsigned newLength)
  • trunk/JavaScriptCore/kjs/object.h

    r3015 r3018  
    573573    void setScope(const ScopeChain &s) { _scope = s; }
    574574
    575     ReferenceList propList(ExecState *exec, bool recursive = true);
     575    virtual ReferenceList propList(ExecState *exec, bool recursive = true);
    576576
    577577    Value internalValue() const;
Note: See TracChangeset for help on using the changeset viewer.