[webkit-changes] cvs commit: JavaScriptCore/kjs array_instance.h array_object.cpp collector.cpp function.cpp function.h grammar.y internal.cpp lookup.h nodes.cpp nodes.h nodes2string.cpp object.cpp object.h object_object.cpp object_object.h property_slot.cpp property_slot.h string_object.cpp string_object.h value.h

Anders andersca at opensource.apple.com
Tue Dec 13 13:24:58 PST 2005


andersca    05/12/13 13:24:58

  Modified:    .        ChangeLog
               bindings runtime_array.cpp runtime_array.h
                        runtime_method.cpp runtime_method.h
                        runtime_object.cpp runtime_object.h
               kjs      array_instance.h array_object.cpp collector.cpp
                        function.cpp function.h grammar.y internal.cpp
                        lookup.h nodes.cpp nodes.h nodes2string.cpp
                        object.cpp object.h object_object.cpp
                        object_object.h property_slot.cpp property_slot.h
                        string_object.cpp string_object.h value.h
  Log:
  2005-12-12  Anders Carlsson  <andersca at mac.com>
  
          Reviewed by Darin.
  
          - Fixes <http://bugzilla.opendarwin.org/show_bug.cgi?id=6041>
  
          * bindings/runtime_array.cpp:
          (RuntimeArray::lengthGetter):
          (RuntimeArray::indexGetter):
          * bindings/runtime_array.h:
          * bindings/runtime_method.cpp:
          (RuntimeMethod::lengthGetter):
          * bindings/runtime_method.h:
          * bindings/runtime_object.cpp:
          (RuntimeObjectImp::fallbackObjectGetter):
          (RuntimeObjectImp::fieldGetter):
          (RuntimeObjectImp::methodGetter):
          * bindings/runtime_object.h:
          * kjs/array_instance.h:
          * kjs/array_object.cpp:
          (ArrayInstance::lengthGetter):
          (getProperty):
          Update for changes to PropertySlot::getValue and
          PropertySlot::GetValueFunc.
  
          * kjs/collector.cpp:
          (KJS::className):
          Handle GetterSetterType.
  
          * kjs/function.cpp:
          (KJS::FunctionImp::argumentsGetter):
          (KJS::FunctionImp::lengthGetter):
          (KJS::Arguments::mappedIndexGetter):
          (KJS::ActivationImp::argumentsGetter):
          * kjs/function.h:
          Update for changes to PropertySlot::getValue and
          PropertySlot::GetValueFunc.
  
          * kjs/grammar.y:
          Rework grammar parts for get set declarations directly
          in the object literal.
  
          * kjs/internal.cpp:
          (KJS::GetterSetterImp::mark):
          (KJS::GetterSetterImp::toPrimitive):
          (KJS::GetterSetterImp::toBoolean):
          (KJS::GetterSetterImp::toNumber):
          (KJS::GetterSetterImp::toString):
          (KJS::GetterSetterImp::toObject):
          Add type conversion functions. These aren't meant to be called.
  
          (KJS::printInfo):
          Handle GetterSetterType.
  
          * kjs/lookup.h:
          (KJS::staticFunctionGetter):
          (KJS::staticValueGetter):
          Update for changes to PropertySlot::GetValueFunc.
  
          * kjs/nodes.cpp:
          Refactor they way properties nodes are implemented.
          We now have a PropertyListNode which is a list of PropertyNodes.
          Each PropertyNode has a name (which is a PropertyNameNode) and an associated
          value node. PropertyNodes can be of different types. The Constant type is the
          old constant declaration and the Getter and Setter types are for property getters
          and setters.
          (ResolveNode::evaluate):
          Update for changes to PropertySlot::getValue.
  
          (PropertyListNode::evaluate):
          Go through all property nodes and set them on the newly created object. If the
          property nodes are of type Getter or Setter, define getters and setters. Otherwise,
          just add the properties like before.
  
          (PropertyNode::evaluate):
          This should never be called directly.
  
          (PropertyNameNode::evaluate):
          Rename from PropertyNode::evaluate.
  
          (FunctionCallResolveNode::evaluate):
          (FunctionCallBracketNode::evaluate):
          (FunctionCallDotNode::evaluate):
          (PostfixResolveNode::evaluate):
          (PostfixBracketNode::evaluate):
          (PostfixDotNode::evaluate):
          (TypeOfResolveNode::evaluate):
          (PrefixResolveNode::evaluate):
          (PrefixBracketNode::evaluate):
          (PrefixDotNode::evaluate):
          (AssignResolveNode::evaluate):
          (AssignDotNode::evaluate):
          (AssignBracketNode::evaluate):
          Update for changes to PropertySlot::getValue.
  
          * kjs/nodes.h:
          (KJS::PropertyNameNode::PropertyNameNode):
          Rename from PropertyNode.
  
          (KJS::PropertyNode::):
          (KJS::PropertyNode::PropertyNode):
          New class, representing a single property.
  
          (KJS::PropertyListNode::PropertyListNode):
          Rename from PropertyValueNode.
  
          (KJS::FuncExprNode::FuncExprNode):
          Put ParameterNode parameter last, and make it optional.
  
          (KJS::ObjectLiteralNode::ObjectLiteralNode):
          Use a PropertyListNode here now.
  
          * kjs/nodes2string.cpp:
          (PropertyListNode::streamTo):
          Iterate through all property nodes.
  
          (PropertyNode::streamTo):
          Print out the name and value. Doesn't handle getters and setters currently.
  
          (PropertyNameNode::streamTo):
          Rename from PropertyNode::streamTo.
  
          * kjs/object.cpp:
          (KJS::JSObject::get):
          Update for changes to PropertySlot::getValue.
  
          (KJS::JSObject::put):
          If the property already exists and has a Setter, invoke
          the setter function instead of setting the property directly.
  
          (KJS::JSObject::defineGetter):
          (KJS::JSObject::defineSetter):
          New functions for defining property getters and setters on the object.
  
          * kjs/object.h:
          (KJS::GetterSetterImp::type):
          (KJS::GetterSetterImp::GetterSetterImp):
          (KJS::GetterSetterImp::getGetter):
          (KJS::GetterSetterImp::setGetter):
          (KJS::GetterSetterImp::getSetter):
          (KJS::GetterSetterImp::setSetter):
          New class for properties which have getters and setters defined.
          This class is only used internally and should never be seen from the outside.
  
          (KJS::JSObject::getOwnPropertySlot):
           If the property is a getter, call setGetterSlot on the property slot.
  
          * kjs/object_object.cpp:
          (ObjectPrototype::ObjectPrototype):
          Add __defineGetter__, __defineSetter, __lookupGetter__, __lookupSetter__
          to prototype.
  
          (ObjectProtoFunc::callAsFunction):
          Implement handlers for new functions.
  
          * kjs/object_object.h:
          (KJS::ObjectProtoFunc::):
          Add ids for new functions.
  
          * kjs/property_slot.cpp:
          (KJS::PropertySlot::undefinedGetter):
          Update for changes to PropertySlot::GetValueFunc.
  
          (KJS::PropertySlot::functionGetter):
          Call the function getter object and return its value.
  
          * kjs/property_slot.h:
          (KJS::PropertySlot::getValue):
          Add a new argument which is the original object that
          getPropertySlot was called on.
  
          (KJS::PropertySlot::setGetterSlot):
          (KJS::PropertySlot::):
          New function which sets a getter slot. When getValue is called on a
          getter slot, the getter function object is invoked.
  
          * kjs/string_object.cpp:
          (StringInstance::lengthGetter):
          (StringInstance::indexGetter):
          * kjs/string_object.h:
          Update for changes to PropertySlot::GetValueFunc.
  
          * kjs/value.h:
          (KJS::):
          Add GetterSetterType and make GetterSetterImp a friend class of JSCell.
  
  Revision  Changes    Path
  1.900     +186 -0    JavaScriptCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/ChangeLog,v
  retrieving revision 1.899
  retrieving revision 1.900
  diff -u -r1.899 -r1.900
  --- ChangeLog	13 Dec 2005 11:06:01 -0000	1.899
  +++ ChangeLog	13 Dec 2005 21:24:44 -0000	1.900
  @@ -1,3 +1,189 @@
  +2005-12-12  Anders Carlsson  <andersca at mac.com>
  +
  +        Reviewed by Darin.
  +
  +        - Fixes <http://bugzilla.opendarwin.org/show_bug.cgi?id=6041>
  +        
  +        * bindings/runtime_array.cpp:
  +        (RuntimeArray::lengthGetter):
  +        (RuntimeArray::indexGetter):
  +        * bindings/runtime_array.h:
  +        * bindings/runtime_method.cpp:
  +        (RuntimeMethod::lengthGetter):
  +        * bindings/runtime_method.h:
  +        * bindings/runtime_object.cpp:
  +        (RuntimeObjectImp::fallbackObjectGetter):
  +        (RuntimeObjectImp::fieldGetter):
  +        (RuntimeObjectImp::methodGetter):
  +        * bindings/runtime_object.h:
  +        * kjs/array_instance.h:
  +        * kjs/array_object.cpp:
  +        (ArrayInstance::lengthGetter):
  +        (getProperty):
  +        Update for changes to PropertySlot::getValue and
  +        PropertySlot::GetValueFunc.
  +        
  +        * kjs/collector.cpp:
  +        (KJS::className):
  +        Handle GetterSetterType.
  +        
  +        * kjs/function.cpp:
  +        (KJS::FunctionImp::argumentsGetter):
  +        (KJS::FunctionImp::lengthGetter):
  +        (KJS::Arguments::mappedIndexGetter):
  +        (KJS::ActivationImp::argumentsGetter):
  +        * kjs/function.h:
  +        Update for changes to PropertySlot::getValue and
  +        PropertySlot::GetValueFunc.
  +        
  +        * kjs/grammar.y:
  +        Rework grammar parts for get set declarations directly
  +        in the object literal.
  +        
  +        * kjs/internal.cpp:
  +        (KJS::GetterSetterImp::mark):
  +        (KJS::GetterSetterImp::toPrimitive):
  +        (KJS::GetterSetterImp::toBoolean):
  +        (KJS::GetterSetterImp::toNumber):
  +        (KJS::GetterSetterImp::toString):
  +        (KJS::GetterSetterImp::toObject):
  +        Add type conversion functions. These aren't meant to be called.
  +        
  +        (KJS::printInfo):
  +        Handle GetterSetterType.
  +        
  +        * kjs/lookup.h:        
  +        (KJS::staticFunctionGetter):
  +        (KJS::staticValueGetter):
  +        Update for changes to PropertySlot::GetValueFunc.
  +        
  +        * kjs/nodes.cpp:
  +        Refactor they way properties nodes are implemented.
  +        We now have a PropertyListNode which is a list of PropertyNodes.
  +        Each PropertyNode has a name (which is a PropertyNameNode) and an associated
  +        value node. PropertyNodes can be of different types. The Constant type is the
  +        old constant declaration and the Getter and Setter types are for property getters
  +        and setters.
  +        (ResolveNode::evaluate):
  +        Update for changes to PropertySlot::getValue.
  +        
  +        (PropertyListNode::evaluate):
  +        Go through all property nodes and set them on the newly created object. If the
  +        property nodes are of type Getter or Setter, define getters and setters. Otherwise,
  +        just add the properties like before.
  +        
  +        (PropertyNode::evaluate):
  +        This should never be called directly.
  +        
  +        (PropertyNameNode::evaluate):
  +        Rename from PropertyNode::evaluate.
  +        
  +        (FunctionCallResolveNode::evaluate):
  +        (FunctionCallBracketNode::evaluate):
  +        (FunctionCallDotNode::evaluate):
  +        (PostfixResolveNode::evaluate):
  +        (PostfixBracketNode::evaluate):
  +        (PostfixDotNode::evaluate):
  +        (TypeOfResolveNode::evaluate):
  +        (PrefixResolveNode::evaluate):
  +        (PrefixBracketNode::evaluate):
  +        (PrefixDotNode::evaluate):
  +        (AssignResolveNode::evaluate):
  +        (AssignDotNode::evaluate):
  +        (AssignBracketNode::evaluate):
  +        Update for changes to PropertySlot::getValue.
  +        
  +        * kjs/nodes.h:
  +        (KJS::PropertyNameNode::PropertyNameNode):
  +        Rename from PropertyNode.
  +        
  +        (KJS::PropertyNode::):
  +        (KJS::PropertyNode::PropertyNode):
  +        New class, representing a single property.
  +        
  +        (KJS::PropertyListNode::PropertyListNode):
  +        Rename from PropertyValueNode.
  +        
  +        (KJS::FuncExprNode::FuncExprNode):
  +        Put ParameterNode parameter last, and make it optional.
  +        
  +        (KJS::ObjectLiteralNode::ObjectLiteralNode):
  +        Use a PropertyListNode here now.
  +        
  +        * kjs/nodes2string.cpp:
  +        (PropertyListNode::streamTo):
  +        Iterate through all property nodes.
  +        
  +        (PropertyNode::streamTo):
  +        Print out the name and value. Doesn't handle getters and setters currently.
  +        
  +        (PropertyNameNode::streamTo):
  +        Rename from PropertyNode::streamTo.
  +        
  +        * kjs/object.cpp:
  +        (KJS::JSObject::get):
  +        Update for changes to PropertySlot::getValue.
  +        
  +        (KJS::JSObject::put):
  +        If the property already exists and has a Setter, invoke
  +        the setter function instead of setting the property directly.
  +        
  +        (KJS::JSObject::defineGetter):
  +        (KJS::JSObject::defineSetter):
  +        New functions for defining property getters and setters on the object.
  +        
  +        * kjs/object.h:
  +        (KJS::GetterSetterImp::type):
  +        (KJS::GetterSetterImp::GetterSetterImp):
  +        (KJS::GetterSetterImp::getGetter):
  +        (KJS::GetterSetterImp::setGetter):
  +        (KJS::GetterSetterImp::getSetter):
  +        (KJS::GetterSetterImp::setSetter):
  +        New class for properties which have getters and setters defined.
  +        This class is only used internally and should never be seen from the outside.
  +        
  +        (KJS::JSObject::getOwnPropertySlot):
  +         If the property is a getter, call setGetterSlot on the property slot.
  +         
  +        * kjs/object_object.cpp:
  +        (ObjectPrototype::ObjectPrototype):
  +        Add __defineGetter__, __defineSetter, __lookupGetter__, __lookupSetter__
  +        to prototype.
  +        
  +        (ObjectProtoFunc::callAsFunction):
  +        Implement handlers for new functions.
  +        
  +        * kjs/object_object.h:
  +        (KJS::ObjectProtoFunc::):
  +        Add ids for new functions.
  +        
  +        * kjs/property_slot.cpp:
  +        (KJS::PropertySlot::undefinedGetter):
  +        Update for changes to PropertySlot::GetValueFunc.
  +        
  +        (KJS::PropertySlot::functionGetter):
  +        Call the function getter object and return its value.
  +        
  +        * kjs/property_slot.h:
  +        (KJS::PropertySlot::getValue):
  +        Add a new argument which is the original object that
  +        getPropertySlot was called on.
  +        
  +        (KJS::PropertySlot::setGetterSlot):
  +        (KJS::PropertySlot::):
  +        New function which sets a getter slot. When getValue is called on a 
  +        getter slot, the getter function object is invoked.
  +        
  +        * kjs/string_object.cpp:
  +        (StringInstance::lengthGetter):
  +        (StringInstance::indexGetter):
  +        * kjs/string_object.h:
  +        Update for changes to PropertySlot::GetValueFunc.
  +        
  +        * kjs/value.h:
  +        (KJS::):
  +        Add GetterSetterType and make GetterSetterImp a friend class of JSCell.
  +
   2005-12-12  Maciej Stachowiak  <mjs at apple.com>
   
           Reviewed by Eric.
  
  
  
  1.15      +2 -2      JavaScriptCore/bindings/runtime_array.cpp
  
  Index: runtime_array.cpp
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/bindings/runtime_array.cpp,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- runtime_array.cpp	11 Dec 2005 02:05:32 -0000	1.14
  +++ runtime_array.cpp	13 Dec 2005 21:24:47 -0000	1.15
  @@ -44,13 +44,13 @@
       delete _array;
   }
   
  -JSValue *RuntimeArray::lengthGetter(ExecState *exec, const Identifier& propertyName, const PropertySlot& slot)
  +JSValue *RuntimeArray::lengthGetter(ExecState *exec, JSObject *originalObject, const Identifier& propertyName, const PropertySlot& slot)
   {
       RuntimeArray *thisObj = static_cast<RuntimeArray *>(slot.slotBase());
       return jsNumber(thisObj->getLength());
   }
   
  -JSValue *RuntimeArray::indexGetter(ExecState *exec, const Identifier& propertyName, const PropertySlot& slot)
  +JSValue *RuntimeArray::indexGetter(ExecState *exec, JSObject *originalObject, const Identifier& propertyName, const PropertySlot& slot)
   {
       RuntimeArray *thisObj = static_cast<RuntimeArray *>(slot.slotBase());
       return thisObj->getConcreteArray()->valueAt(exec, slot.index());
  
  
  
  1.14      +2 -2      JavaScriptCore/bindings/runtime_array.h
  
  Index: runtime_array.h
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/bindings/runtime_array.h,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- runtime_array.h	11 Dec 2005 02:05:32 -0000	1.13
  +++ runtime_array.h	13 Dec 2005 21:24:47 -0000	1.14
  @@ -54,8 +54,8 @@
       static const ClassInfo info;
   
   private:
  -    static JSValue *lengthGetter(ExecState *, const Identifier&, const PropertySlot&);
  -    static JSValue *indexGetter(ExecState *, const Identifier&, const PropertySlot&);
  +    static JSValue *lengthGetter(ExecState *, JSObject *, const Identifier&, const PropertySlot&);
  +    static JSValue *indexGetter(ExecState *, JSObject *, const Identifier&, const PropertySlot&);
   
       Bindings::Array *_array;
   };
  
  
  
  1.17      +1 -1      JavaScriptCore/bindings/runtime_method.cpp
  
  Index: runtime_method.cpp
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/bindings/runtime_method.cpp,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- runtime_method.cpp	11 Dec 2005 02:05:32 -0000	1.16
  +++ runtime_method.cpp	13 Dec 2005 21:24:48 -0000	1.17
  @@ -41,7 +41,7 @@
   {
   }
   
  -JSValue *RuntimeMethod::lengthGetter(ExecState *exec, const Identifier& propertyName, const PropertySlot& slot)
  +JSValue *RuntimeMethod::lengthGetter(ExecState *exec, JSObject *originalObject, const Identifier& propertyName, const PropertySlot& slot)
   {
       RuntimeMethod *thisObj = static_cast<RuntimeMethod *>(slot.slotBase());
   
  
  
  
  1.9       +1 -1      JavaScriptCore/bindings/runtime_method.h
  
  Index: runtime_method.h
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/bindings/runtime_method.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- runtime_method.h	11 Dec 2005 02:05:32 -0000	1.8
  +++ runtime_method.h	13 Dec 2005 21:24:48 -0000	1.9
  @@ -48,7 +48,7 @@
       virtual Completion execute(ExecState *exec);
   
   private:
  -    static JSValue *lengthGetter(ExecState *, const Identifier&, const PropertySlot&);
  +    static JSValue *lengthGetter(ExecState *, JSObject *, const Identifier&, const PropertySlot&);
   
       Bindings::MethodList _methodList;
   };
  
  
  
  1.31      +3 -3      JavaScriptCore/bindings/runtime_object.cpp
  
  Index: runtime_object.cpp
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/bindings/runtime_object.cpp,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- runtime_object.cpp	11 Dec 2005 02:05:32 -0000	1.30
  +++ runtime_object.cpp	13 Dec 2005 21:24:48 -0000	1.31
  @@ -61,7 +61,7 @@
       instance = i;
   }
   
  -JSValue *RuntimeObjectImp::fallbackObjectGetter(ExecState *exec, const Identifier& propertyName, const PropertySlot& slot)
  +JSValue *RuntimeObjectImp::fallbackObjectGetter(ExecState *exec, JSObject *originalObject, const Identifier& propertyName, const PropertySlot& slot)
   {
       RuntimeObjectImp *thisObj = static_cast<RuntimeObjectImp *>(slot.slotBase());
       Bindings::Instance *instance = thisObj->instance;
  @@ -76,7 +76,7 @@
       return result;
   }
   
  -JSValue *RuntimeObjectImp::fieldGetter(ExecState *exec, const Identifier& propertyName, const PropertySlot& slot)
  +JSValue *RuntimeObjectImp::fieldGetter(ExecState *exec, JSObject *originalObject, const Identifier& propertyName, const PropertySlot& slot)
   {
       RuntimeObjectImp *thisObj = static_cast<RuntimeObjectImp *>(slot.slotBase());
       Bindings::Instance *instance = thisObj->instance;
  @@ -92,7 +92,7 @@
       return result;
   }
   
  -JSValue *RuntimeObjectImp::methodGetter(ExecState *exec, const Identifier& propertyName, const PropertySlot& slot)
  +JSValue *RuntimeObjectImp::methodGetter(ExecState *exec, JSObject *originalObject, const Identifier& propertyName, const PropertySlot& slot)
   {
       RuntimeObjectImp *thisObj = static_cast<RuntimeObjectImp *>(slot.slotBase());
       Bindings::Instance *instance = thisObj->instance;
  
  
  
  1.19      +3 -3      JavaScriptCore/bindings/runtime_object.h
  
  Index: runtime_object.h
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/bindings/runtime_object.h,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- runtime_object.h	11 Dec 2005 02:05:32 -0000	1.18
  +++ runtime_object.h	13 Dec 2005 21:24:48 -0000	1.19
  @@ -53,9 +53,9 @@
       static const ClassInfo info;
   
   private:
  -    static JSValue *fallbackObjectGetter(ExecState *, const Identifier&, const PropertySlot&);
  -    static JSValue *fieldGetter(ExecState *, const Identifier&, const PropertySlot&);
  -    static JSValue *methodGetter(ExecState *, const Identifier&, const PropertySlot&);
  +    static JSValue *fallbackObjectGetter(ExecState *, JSObject *, const Identifier&, const PropertySlot&);
  +    static JSValue *fieldGetter(ExecState *, JSObject *, const Identifier&, const PropertySlot&);
  +    static JSValue *methodGetter(ExecState *, JSObject *, const Identifier&, const PropertySlot&);
   
       Bindings::Instance *instance;
       bool ownsInstance;
  
  
  
  1.20      +1 -1      JavaScriptCore/kjs/array_instance.h
  
  Index: array_instance.h
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/array_instance.h,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- array_instance.h	11 Dec 2005 02:05:41 -0000	1.19
  +++ array_instance.h	13 Dec 2005 21:24:50 -0000	1.20
  @@ -52,7 +52,7 @@
       void sort(ExecState *exec, JSObject *compareFunction);
       
     private:
  -    static JSValue *lengthGetter(ExecState *, const Identifier&, const PropertySlot&);
  +    static JSValue *lengthGetter(ExecState *, JSObject *, const Identifier&, const PropertySlot&);
   
       void setLength(unsigned newLength, ExecState *exec);
       
  
  
  
  1.58      +2 -2      JavaScriptCore/kjs/array_object.cpp
  
  Index: array_object.cpp
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/array_object.cpp,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- array_object.cpp	11 Dec 2005 02:05:41 -0000	1.57
  +++ array_object.cpp	13 Dec 2005 21:24:50 -0000	1.58
  @@ -74,7 +74,7 @@
     fastFree(storage);
   }
   
  -JSValue *ArrayInstance::lengthGetter(ExecState *exec, const Identifier& propertyName, const PropertySlot& slot)
  +JSValue *ArrayInstance::lengthGetter(ExecState *exec, JSObject *originalObject, const Identifier& propertyName, const PropertySlot& slot)
   {
     return jsNumber(static_cast<ArrayInstance *>(slot.slotBase())->length);
   }
  @@ -428,7 +428,7 @@
       PropertySlot slot;
       if (!obj->getPropertySlot(exec, index, slot))
           return NULL;
  -    return slot.getValue(exec, index);
  +    return slot.getValue(exec, obj, index);
   }
   
   // ECMA 15.4.4
  
  
  
  1.55      +3 -0      JavaScriptCore/kjs/collector.cpp
  
  Index: collector.cpp
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/collector.cpp,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- collector.cpp	13 Dec 2005 11:06:04 -0000	1.54
  +++ collector.cpp	13 Dec 2005 21:24:50 -0000	1.55
  @@ -618,6 +618,9 @@
         name = info ? info->className : "Object";
         break;
       }
  +    case GetterSetterType:
  +      name = "gettersetter";
  +      break;
     }
     return name;
   }
  
  
  
  1.64      +4 -4      JavaScriptCore/kjs/function.cpp
  
  Index: function.cpp
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/function.cpp,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- function.cpp	11 Dec 2005 02:05:43 -0000	1.63
  +++ function.cpp	13 Dec 2005 21:24:50 -0000	1.64
  @@ -206,7 +206,7 @@
   {
   }
   
  -JSValue *FunctionImp::argumentsGetter(ExecState *exec, const Identifier& propertyName, const PropertySlot& slot)
  +JSValue *FunctionImp::argumentsGetter(ExecState *exec, JSObject *originalObject, const Identifier& propertyName, const PropertySlot& slot)
   {
     FunctionImp *thisObj = static_cast<FunctionImp *>(slot.slotBase());
     ContextImp *context = exec->_context;
  @@ -219,7 +219,7 @@
     return jsNull();
   }
   
  -JSValue *FunctionImp::lengthGetter(ExecState *exec, const Identifier& propertyName, const PropertySlot& slot)
  +JSValue *FunctionImp::lengthGetter(ExecState *exec, JSObject *originalObject, const Identifier& propertyName, const PropertySlot& slot)
   {
     FunctionImp *thisObj = static_cast<FunctionImp *>(slot.slotBase());
     const Parameter *p = thisObj->param;
  @@ -442,7 +442,7 @@
       _activationObject->mark();
   }
   
  -JSValue *Arguments::mappedIndexGetter(ExecState *exec, const Identifier& propertyName, const PropertySlot& slot)
  +JSValue *Arguments::mappedIndexGetter(ExecState *exec, JSObject *originalObject, const Identifier& propertyName, const PropertySlot& slot)
   {
     Arguments *thisObj = static_cast<Arguments *>(slot.slotBase());
     return thisObj->_activationObject->get(exec, thisObj->indexToNameMap[propertyName]);
  @@ -489,7 +489,7 @@
     // FIXME: Do we need to support enumerating the arguments property?
   }
   
  -JSValue *ActivationImp::argumentsGetter(ExecState *exec, const Identifier& propertyName, const PropertySlot& slot)
  +JSValue *ActivationImp::argumentsGetter(ExecState *exec, JSObject *originalObject, const Identifier& propertyName, const PropertySlot& slot)
   {
     ActivationImp *thisObj = static_cast<ActivationImp *>(slot.slotBase());
   
  
  
  
  1.38      +4 -4      JavaScriptCore/kjs/function.h
  
  Index: function.h
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/function.h,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- function.h	11 Dec 2005 02:05:43 -0000	1.37
  +++ function.h	13 Dec 2005 21:24:51 -0000	1.38
  @@ -64,8 +64,8 @@
       Identifier ident;
   
     private:
  -    static JSValue *argumentsGetter(ExecState *, const Identifier &, const PropertySlot&);
  -    static JSValue *lengthGetter(ExecState *, const Identifier &, const PropertySlot&);
  +    static JSValue *argumentsGetter(ExecState *, JSObject *, const Identifier &, const PropertySlot&);
  +    static JSValue *lengthGetter(ExecState *, JSObject *, const Identifier &, const PropertySlot&);
   
       void processParameters(ExecState *exec, const List &);
       virtual void processVarDecls(ExecState *exec);
  @@ -115,7 +115,7 @@
       virtual const ClassInfo *classInfo() const { return &info; }
       static const ClassInfo info;
     private:
  -    static JSValue *mappedIndexGetter(ExecState *exec, const Identifier &, const PropertySlot& slot);
  +    static JSValue *mappedIndexGetter(ExecState *exec, JSObject *, const Identifier &, const PropertySlot& slot);
   
       ActivationImp *_activationObject; 
       mutable IndexToNameMap indexToNameMap;
  @@ -136,7 +136,7 @@
       bool isActivation() { return true; }
     private:
       static PropertySlot::GetValueFunc getArgumentsGetter();
  -    static JSValue *argumentsGetter(ExecState *exec, const Identifier &, const PropertySlot& slot);
  +    static JSValue *argumentsGetter(ExecState *exec, JSObject *, const Identifier &, const PropertySlot& slot);
       void createArgumentsObject(ExecState *exec) const;
       
       FunctionImp *_function;
  
  
  
  1.32      +45 -20    JavaScriptCore/kjs/grammar.y
  
  Index: grammar.y
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/grammar.y,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- grammar.y	28 Sep 2005 18:51:13 -0000	1.31
  +++ grammar.y	13 Dec 2005 21:24:51 -0000	1.32
  @@ -54,6 +54,7 @@
   static bool makeAssignNode(Node*& result, Node *loc, Operator op, Node *expr);
   static bool makePrefixNode(Node*& result, Node *expr, Operator op);
   static bool makePostfixNode(Node*& result, Node *expr, Operator op);
  +static bool makeGetterOrSetterPropertyNode(PropertyNode*& result, Identifier &getOrSet, Identifier& name, ParameterNode *params, FunctionBodyNode *body);
   static Node *makeFunctionCallNode(Node *func, ArgumentsNode *args);
   static Node *makeTypeOfNode(Node *expr);
   static Node *makeDeleteNode(Node *expr);
  @@ -84,8 +85,9 @@
     CaseClauseNode      *ccl;
     ElementNode         *elm;
     Operator            op;
  -  PropertyValueNode   *plist;
  -  PropertyNode        *pnode;
  +  PropertyListNode   *plist;
  +  PropertyNode       *pnode;
  +  PropertyNameNode   *pname;
   }
   
   %start Program
  @@ -179,9 +181,9 @@
   %type <clist> CaseClauses  CaseClausesOpt
   %type <ival>  Elision ElisionOpt
   %type <elm>   ElementList
  -%type <plist> PropertyNameAndValueList
  -%type <pnode> PropertyName
  -
  +%type <pname> PropertyName
  +%type <pnode> Property
  +%type <plist> PropertyList
   %%
   
   Literal:
  @@ -202,10 +204,28 @@
                                           }
   ;
   
  +PropertyName:
  +    IDENT                               { $$ = new PropertyNameNode(*$1); }
  +  | STRING                              { $$ = new PropertyNameNode(Identifier(*$1)); }
  +  | NUMBER                              { $$ = new PropertyNameNode($1); }
  +;
  +
  +Property:
  +    PropertyName ':' AssignmentExpr     { $$ = new PropertyNode($1, $3, PropertyNode::Constant); }
  +  | IDENT IDENT '(' ')' FunctionBody    { if (!makeGetterOrSetterPropertyNode($$, *$1, *$2, 0, $5)) YYABORT; }
  +  | IDENT IDENT '(' FormalParameterList ')' FunctionBody
  +                                        { if (!makeGetterOrSetterPropertyNode($$, *$1, *$2, $4, $6)) YYABORT; }
  +;
  +
  +PropertyList:
  +    Property                            { $$ = new PropertyListNode($1); }
  +  | PropertyList ',' Property           { $$ = new PropertyListNode($3, $1); }
  +;
  +
   PrimaryExpr:
       PrimaryExprNoBrace
     | '{' '}'                             { $$ = new ObjectLiteralNode(); }
  -  | '{' PropertyNameAndValueList '}'    { $$ = new ObjectLiteralNode($2); }
  +  | '{' PropertyList '}'                { $$ = new ObjectLiteralNode($2); }
   ;
   
   PrimaryExprNoBrace:
  @@ -238,18 +258,6 @@
     | Elision ','                         { $$ = $1 + 1; }
   ;
   
  -PropertyNameAndValueList:
  -    PropertyName ':' AssignmentExpr     { $$ = new PropertyValueNode($1, $3); }
  -  | PropertyNameAndValueList ',' PropertyName ':' AssignmentExpr
  -                                        { $$ = new PropertyValueNode($3, $5, $1); }
  -;
  -
  -PropertyName:
  -    IDENT                               { $$ = new PropertyNode(*$1); }
  -  | STRING                              { $$ = new PropertyNode(Identifier(*$1)); }
  -  | NUMBER                              { $$ = new PropertyNode($1); }
  -;
  -
   MemberExpr:
       PrimaryExpr
     | FunctionExpr                        { $$ = $1; }
  @@ -806,10 +814,10 @@
   FunctionExpr:
       FUNCTION '(' ')' FunctionBody       { $$ = new FuncExprNode(Identifier::null(), $4); }
     | FUNCTION '(' FormalParameterList ')' FunctionBody
  -                                        { $$ = new FuncExprNode(Identifier::null(), $3, $5); }
  +                                        { $$ = new FuncExprNode(Identifier::null(), $5, $3); }
     | FUNCTION IDENT '(' ')' FunctionBody { $$ = new FuncExprNode(*$2, $5); }
     | FUNCTION IDENT '(' FormalParameterList ')' FunctionBody
  -                                        { $$ = new FuncExprNode(*$2, $4, $6); }
  +                                        { $$ = new FuncExprNode(*$2, $6, $4); }
   ;
   
   FormalParameterList:
  @@ -960,6 +968,23 @@
       }
   }
   
  +static bool makeGetterOrSetterPropertyNode(PropertyNode*& result, Identifier& getOrSet, Identifier& name, ParameterNode *params, FunctionBodyNode *body)
  +{
  +    PropertyNode::Type type;
  +    
  +    if (getOrSet == "get")
  +        type = PropertyNode::Getter;
  +    else if (getOrSet == "set")
  +        type = PropertyNode::Setter;
  +    else
  +        return false;
  +    
  +    result = new PropertyNode(new PropertyNameNode(name), 
  +                              new FuncExprNode(Identifier::null(), body, params), type);
  +
  +    return true;
  +}
  +
   int yyerror(const char * /* s */)  /* Called by yyparse on error */
   {
     // fprintf(stderr, "ERROR: %s at line %d\n", s, KJS::Lexer::curr()->lineNo());
  
  
  
  1.83      +42 -0     JavaScriptCore/kjs/internal.cpp
  
  Index: internal.cpp
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/internal.cpp,v
  retrieving revision 1.82
  retrieving revision 1.83
  diff -u -r1.82 -r1.83
  --- internal.cpp	11 Dec 2005 02:05:44 -0000	1.82
  +++ internal.cpp	13 Dec 2005 21:24:51 -0000	1.83
  @@ -223,6 +223,45 @@
     return (double)uint32 == val;
   }
   
  +// --------------------------- GetterSetterImp ---------------------------------
  +void GetterSetterImp::mark()
  +{
  +    if (getter && !getter->marked())
  +        getter->mark();
  +    if (setter && !setter->marked())
  +        setter->mark();
  +}
  +
  +JSValue *GetterSetterImp::toPrimitive(ExecState *exec, Type type) const
  +{
  +    assert(false);
  +    return jsNull();
  +}
  +
  +bool GetterSetterImp::toBoolean(ExecState *) const
  +{
  +    assert(false);
  +    return false;
  +}
  +
  +double GetterSetterImp::toNumber(ExecState *) const
  +{
  +    assert(false);
  +    return 0.0;
  +}
  +
  +UString GetterSetterImp::toString(ExecState *) const
  +{
  +    assert(false);
  +    return UString::null();
  +}
  +
  +JSObject *GetterSetterImp::toObject(ExecState *exec) const
  +{
  +    assert(false);
  +    return jsNull()->toObject(exec);
  +}
  +
   // ------------------------------ LabelStack -----------------------------------
   
   bool LabelStack::push(const Identifier &id)
  @@ -835,6 +874,9 @@
         if (name.isNull())
           name = "(unknown class)";
         break;
  +    case GetterSetterType:
  +      name = "GetterSetter";
  +      break;
       }
       UString vString = v->toString(exec);
       if ( vString.size() > 50 )
  
  
  
  1.21      +2 -2      JavaScriptCore/kjs/lookup.h
  
  Index: lookup.h
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/lookup.h,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- lookup.h	11 Dec 2005 02:05:45 -0000	1.20
  +++ lookup.h	13 Dec 2005 21:24:51 -0000	1.21
  @@ -127,7 +127,7 @@
      * Helper for getStaticFunctionSlot and getStaticPropertySlot
      */
     template <class FuncImp>
  -  inline JSValue *staticFunctionGetter(ExecState *exec, const Identifier& propertyName, const PropertySlot& slot)
  +  inline JSValue *staticFunctionGetter(ExecState *exec, JSObject *originalObject, const Identifier& propertyName, const PropertySlot& slot)
     {
         // Look for cached value in dynamic map of properties (in JSObject)
         JSObject *thisObj = slot.slotBase();
  @@ -146,7 +146,7 @@
      * Helper for getStaticValueSlot and getStaticPropertySlot
      */
     template <class ThisImp>
  -  inline JSValue *staticValueGetter(ExecState *exec, const Identifier&, const PropertySlot& slot)
  +  inline JSValue *staticValueGetter(ExecState *exec, JSObject *originalObject, const Identifier&, const PropertySlot& slot)
     {
         ThisImp *thisObj = static_cast<ThisImp *>(slot.slotBase());
         const HashEntry *entry = slot.staticEntry();
  
  
  
  1.91      +47 -26    JavaScriptCore/kjs/nodes.cpp
  
  Index: nodes.cpp
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/nodes.cpp,v
  retrieving revision 1.90
  retrieving revision 1.91
  diff -u -r1.90 -r1.91
  --- nodes.cpp	11 Dec 2005 02:05:45 -0000	1.90
  +++ nodes.cpp	13 Dec 2005 21:24:51 -0000	1.91
  @@ -277,7 +277,7 @@
       JSObject *o = *iter;
   
       if (o->getPropertySlot(exec, ident, slot))
  -      return slot.getValue(exec, ident);
  +      return slot.getValue(exec, o, ident);
       
       ++iter;
     } while (iter != end);
  @@ -353,29 +353,50 @@
     return exec->lexicalInterpreter()->builtinObject()->construct(exec,List::empty());
   }
   
  -// ------------------------------ PropertyValueNode ----------------------------
  +// ------------------------------ PropertyListNode -----------------------------
   
   // ECMA 11.1.5
  -JSValue *PropertyValueNode::evaluate(ExecState *exec)
  +JSValue *PropertyListNode::evaluate(ExecState *exec)
   {
     JSObject *obj = exec->lexicalInterpreter()->builtinObject()->construct(exec, List::empty());
     
  -  for (PropertyValueNode *p = this; p; p = p->list.get()) {
  -    JSValue *n = p->name->evaluate(exec);
  +  for (PropertyListNode *p = this; p; p = p->list.get()) {
  +    JSValue *n = p->node->name->evaluate(exec);
       KJS_CHECKEXCEPTIONVALUE
  -    JSValue *v = p->assign->evaluate(exec);
  +    JSValue *v = p->node->assign->evaluate(exec);
       KJS_CHECKEXCEPTIONVALUE
  -
  -    obj->put(exec, Identifier(n->toString(exec)), v);
  +    
  +    Identifier propertyName = Identifier(n->toString(exec));
  +    switch (p->node->type) {
  +      case PropertyNode::Getter:
  +        assert(v->isObject());
  +        obj->defineGetter(exec, propertyName, static_cast<JSObject *>(v));
  +        break;
  +      case PropertyNode::Setter:
  +        assert(v->isObject());
  +        obj->defineSetter(exec, propertyName, static_cast<JSObject *>(v));
  +        break;
  +      case PropertyNode::Constant:
  +        obj->put(exec, propertyName, v);
  +        break;
  +    }
     }
   
     return obj;
   }
   
  -// ------------------------------ PropertyNode ---------------------------------
  +// ------------------------------ PropertyNode -----------------------------
  +// ECMA 11.1.5
  +JSValue *PropertyNode::evaluate(ExecState *exec)
  +{
  +  assert(false);
  +  return jsNull();
  +}
  +
  +// ---------------------------- PropertyNameNode -------------------------------
   
   // ECMA 11.1.5
  -JSValue *PropertyNode::evaluate(ExecState *)
  +JSValue *PropertyNameNode::evaluate(ExecState *)
   {
     JSValue *s;
   
  @@ -520,7 +541,7 @@
     do { 
       base = *iter;
       if (base->getPropertySlot(exec, ident, slot)) {
  -      JSValue *v = slot.getValue(exec, ident);
  +      JSValue *v = slot.getValue(exec, base, ident);
         KJS_CHECKEXCEPTIONVALUE
           
         if (!v->isObject()) {
  @@ -569,7 +590,7 @@
     JSValue *funcVal;
     if (subscriptVal->getUInt32(i)) {
       if (baseObj->getPropertySlot(exec, i, slot))
  -      funcVal = slot.getValue(exec, i);
  +      funcVal = slot.getValue(exec, baseObj, i);
       else
         funcVal = jsUndefined();
     } else {
  @@ -620,7 +641,7 @@
   
     JSObject *baseObj = baseVal->toObject(exec);
     PropertySlot slot;
  -  JSValue *funcVal = baseObj->getPropertySlot(exec, ident, slot) ? slot.getValue(exec, ident) : jsUndefined();
  +  JSValue *funcVal = baseObj->getPropertySlot(exec, ident, slot) ? slot.getValue(exec, baseObj, ident) : jsUndefined();
     KJS_CHECKEXCEPTIONVALUE
   
     if (!funcVal->isObject())
  @@ -660,7 +681,7 @@
     do { 
       base = *iter;
       if (base->getPropertySlot(exec, m_ident, slot)) {
  -        JSValue *v = slot.getValue(exec, m_ident);
  +        JSValue *v = slot.getValue(exec, base, m_ident);
   
           double n = v->toNumber(exec);
           
  @@ -690,7 +711,7 @@
     uint32_t propertyIndex;
     if (subscript->getUInt32(propertyIndex)) {
       PropertySlot slot;
  -    JSValue *v = base->getPropertySlot(exec, propertyIndex, slot) ? slot.getValue(exec, propertyIndex) : jsUndefined();
  +    JSValue *v = base->getPropertySlot(exec, propertyIndex, slot) ? slot.getValue(exec, base, propertyIndex) : jsUndefined();
       KJS_CHECKEXCEPTIONVALUE
   
       double n = v->toNumber(exec);
  @@ -703,7 +724,7 @@
   
     Identifier propertyName(subscript->toString(exec));
     PropertySlot slot;
  -  JSValue *v = base->getPropertySlot(exec, propertyName, slot) ? slot.getValue(exec, propertyName) : jsUndefined();
  +  JSValue *v = base->getPropertySlot(exec, propertyName, slot) ? slot.getValue(exec, base, propertyName) : jsUndefined();
     KJS_CHECKEXCEPTIONVALUE
   
     double n = v->toNumber(exec);
  @@ -723,7 +744,7 @@
     JSObject *base = baseValue->toObject(exec);
   
     PropertySlot slot;
  -  JSValue *v = base->getPropertySlot(exec, m_ident, slot) ? slot.getValue(exec, m_ident) : jsUndefined();
  +  JSValue *v = base->getPropertySlot(exec, m_ident, slot) ? slot.getValue(exec, base, m_ident) : jsUndefined();
     KJS_CHECKEXCEPTIONVALUE
   
     double n = v->toNumber(exec);
  @@ -848,7 +869,7 @@
     do { 
       base = *iter;
       if (base->getPropertySlot(exec, m_ident, slot)) {
  -        JSValue *v = slot.getValue(exec, m_ident);
  +        JSValue *v = slot.getValue(exec, base, m_ident);
           return typeStringForValue(v);
       }
   
  @@ -886,7 +907,7 @@
     do { 
       base = *iter;
       if (base->getPropertySlot(exec, m_ident, slot)) {
  -        JSValue *v = slot.getValue(exec, m_ident);
  +        JSValue *v = slot.getValue(exec, base, m_ident);
   
           double n = v->toNumber(exec);
           
  @@ -917,7 +938,7 @@
     uint32_t propertyIndex;
     if (subscript->getUInt32(propertyIndex)) {
       PropertySlot slot;
  -    JSValue *v = base->getPropertySlot(exec, propertyIndex, slot) ? slot.getValue(exec, propertyIndex) : jsUndefined();
  +    JSValue *v = base->getPropertySlot(exec, propertyIndex, slot) ? slot.getValue(exec, base, propertyIndex) : jsUndefined();
       KJS_CHECKEXCEPTIONVALUE
   
       double n = v->toNumber(exec);
  @@ -931,7 +952,7 @@
   
     Identifier propertyName(subscript->toString(exec));
     PropertySlot slot;
  -  JSValue *v = base->getPropertySlot(exec, propertyName, slot) ? slot.getValue(exec, propertyName) : jsUndefined();
  +  JSValue *v = base->getPropertySlot(exec, propertyName, slot) ? slot.getValue(exec, base, propertyName) : jsUndefined();
     KJS_CHECKEXCEPTIONVALUE
   
     double n = v->toNumber(exec);
  @@ -952,7 +973,7 @@
     JSObject *base = baseValue->toObject(exec);
   
     PropertySlot slot;
  -  JSValue *v = base->getPropertySlot(exec, m_ident, slot) ? slot.getValue(exec, m_ident) : jsUndefined();
  +  JSValue *v = base->getPropertySlot(exec, m_ident, slot) ? slot.getValue(exec, base, m_ident) : jsUndefined();
     KJS_CHECKEXCEPTIONVALUE
   
     double n = v->toNumber(exec);
  @@ -1291,7 +1312,7 @@
     if (m_oper == OpEqual) {
       v = m_right->evaluate(exec);
     } else {
  -    JSValue *v1 = slot.getValue(exec, m_ident);
  +    JSValue *v1 = slot.getValue(exec, base, m_ident);
       KJS_CHECKEXCEPTIONVALUE
       JSValue *v2 = m_right->evaluate(exec);
       v = valueForReadModifyAssignment(exec, v1, v2, m_oper);
  @@ -1317,7 +1338,7 @@
       v = m_right->evaluate(exec);
     } else {
       PropertySlot slot;
  -    JSValue *v1 = base->getPropertySlot(exec, m_ident, slot) ? slot.getValue(exec, m_ident) : jsUndefined();
  +    JSValue *v1 = base->getPropertySlot(exec, m_ident, slot) ? slot.getValue(exec, base, m_ident) : jsUndefined();
       KJS_CHECKEXCEPTIONVALUE
       JSValue *v2 = m_right->evaluate(exec);
       v = valueForReadModifyAssignment(exec, v1, v2, m_oper);
  @@ -1347,7 +1368,7 @@
         v = m_right->evaluate(exec);
       } else {
         PropertySlot slot;
  -      JSValue *v1 = base->getPropertySlot(exec, propertyIndex, slot) ? slot.getValue(exec, propertyIndex) : jsUndefined();
  +      JSValue *v1 = base->getPropertySlot(exec, propertyIndex, slot) ? slot.getValue(exec, base, propertyIndex) : jsUndefined();
         KJS_CHECKEXCEPTIONVALUE
         JSValue *v2 = m_right->evaluate(exec);
         v = valueForReadModifyAssignment(exec, v1, v2, m_oper);
  @@ -1366,7 +1387,7 @@
       v = m_right->evaluate(exec);
     } else {
       PropertySlot slot;
  -    JSValue *v1 = base->getPropertySlot(exec, propertyName, slot) ? slot.getValue(exec, propertyName) : jsUndefined();
  +    JSValue *v1 = base->getPropertySlot(exec, propertyName, slot) ? slot.getValue(exec, base, propertyName) : jsUndefined();
       KJS_CHECKEXCEPTIONVALUE
       JSValue *v2 = m_right->evaluate(exec);
       v = valueForReadModifyAssignment(exec, v1, v2, m_oper);
  
  
  
  1.44      +38 -25    JavaScriptCore/kjs/nodes.h
  
  Index: nodes.h
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/nodes.h,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- nodes.h	11 Dec 2005 02:05:45 -0000	1.43
  +++ nodes.h	13 Dec 2005 21:24:51 -0000	1.44
  @@ -32,8 +32,8 @@
   namespace KJS {
   
     class ProgramNode;
  -  class PropertyNode;
  -  class PropertyValueNode;
  +  class PropertyNameNode;
  +  class PropertyListNode;
     class Reference;
     class RegExp;
     class SourceElementsNode;
  @@ -246,41 +246,54 @@
       bool opt;
     };
   
  -  class PropertyValueNode : public Node {
  +  class PropertyNameNode : public Node {
     public:
  -    // list pointer is tail of a circular list, cracked in the ObjectLiteralNode ctor
  -    PropertyValueNode(PropertyNode *n, Node *a)
  -      : name(n), assign(a), list(this) { }
  -    PropertyValueNode(PropertyNode *n, Node *a, PropertyValueNode *l)
  -      : name(n), assign(a), list(l->list) { l->list = this; }
  +    PropertyNameNode(double d) : numeric(d) { }
  +    PropertyNameNode(const Identifier &s) : str(s) { }
       JSValue *evaluate(ExecState *exec);
       virtual void streamTo(SourceStream &s) const;
     private:
  -    friend class ObjectLiteralNode;
  -    RefPtr<PropertyNode> name;
  +    double numeric;
  +    Identifier str;
  +  };
  +  
  +  class PropertyNode : public Node {
  +  public:
  +    enum Type { Constant, Getter, Setter };
  +    PropertyNode(PropertyNameNode *n, Node *a, Type t) 
  +      : name(n), assign(a), type(t) { }
  +    JSValue *evaluate(ExecState *exec);
  +    virtual void streamTo(SourceStream &s) const;
  +    friend class PropertyListNode;
  +  private:
  +    RefPtr<PropertyNameNode> name;
       RefPtr<Node> assign;
  -    RefPtr<PropertyValueNode> list;
  +    Type type;
     };
  -
  -  class ObjectLiteralNode : public Node {
  +  
  +  class PropertyListNode : public Node {
     public:
  -    ObjectLiteralNode() : list(0) { }
  -    ObjectLiteralNode(PropertyValueNode *l) : list(l->list) { l->list = 0; }
  +    // list pointer is tail of a circular list, cracked in the ObjectLiteralNode ctor
  +    PropertyListNode(PropertyNode *n)
  +      : node(n), list(this) { }
  +    PropertyListNode(PropertyNode *n, PropertyListNode *l)
  +      : node(n), list(l->list) { l->list = this; }
       JSValue *evaluate(ExecState *exec);
       virtual void streamTo(SourceStream &s) const;
     private:
  -    RefPtr<PropertyValueNode> list;
  +    friend class ObjectLiteralNode;
  +    RefPtr<PropertyNode> node;
  +    RefPtr<PropertyListNode> list;
     };
   
  -  class PropertyNode : public Node {
  +  class ObjectLiteralNode : public Node {
     public:
  -    PropertyNode(double d) : numeric(d) { }
  -    PropertyNode(const Identifier &s) : str(s) { }
  +    ObjectLiteralNode() : list(0) { }
  +    ObjectLiteralNode(PropertyListNode *l) : list(l->list) { l->list = 0; }
       JSValue *evaluate(ExecState *exec);
       virtual void streamTo(SourceStream &s) const;
     private:
  -    double numeric;
  -    Identifier str;
  +    RefPtr<PropertyListNode> list;
     };
   
     class BracketAccessorNode : public Node {
  @@ -1030,13 +1043,13 @@
   
     class FuncExprNode : public Node {
     public:
  -    FuncExprNode(const Identifier &i, FunctionBodyNode *b)
  -      : ident(i), param(0), body(b) { }
  -    FuncExprNode(const Identifier &i, ParameterNode *p, FunctionBodyNode *b)
  -      : ident(i), param(p->next), body(b) { p->next = 0; }
  +    FuncExprNode(const Identifier &i, FunctionBodyNode *b, ParameterNode *p = 0)
  +      : ident(i), param(p ? p->next : 0), body(b) { if (p) p->next = 0; }
       virtual JSValue *evaluate(ExecState *);
       virtual void streamTo(SourceStream &) const;
     private:
  +    // Used for streamTo
  +    friend class PropertyNode;
       Identifier ident;
       RefPtr<ParameterNode> param;
       RefPtr<FunctionBodyNode> body;
  
  
  
  1.23      +25 -3     JavaScriptCore/kjs/nodes2string.cpp
  
  Index: nodes2string.cpp
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/nodes2string.cpp,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- nodes2string.cpp	1 Dec 2005 17:59:25 -0000	1.22
  +++ nodes2string.cpp	13 Dec 2005 21:24:52 -0000	1.23
  @@ -155,14 +155,36 @@
       s << "{ }";
   }
   
  -void PropertyValueNode::streamTo(SourceStream &s) const
  +void PropertyListNode::streamTo(SourceStream &s) const
   {
  -  for (const PropertyValueNode *n = this; n; n = n->list.get())
  -    s << n->name << ": " << n->assign;
  +  s << node;
  +  
  +  for (const PropertyListNode *n = list.get(); n; n = n->list.get())
  +    s << ", " << n->node;
   }
   
   void PropertyNode::streamTo(SourceStream &s) const
   {
  +  switch (type) {
  +    case Constant:
  +      s << name << ": " << assign;
  +      break;
  +    case Getter:
  +    case Setter: {
  +      const FuncExprNode *func = static_cast<const FuncExprNode *>(assign.get());
  +      if (type == Getter)
  +        s << "get "; 
  +      else
  +        s << "set ";
  +      
  +      s << name << "(" << func->param << ")" << func->body;
  +      break;
  +    }
  +  }
  +}
  +
  +void PropertyNameNode::streamTo(SourceStream &s) const
  +{
     if (str.isNull())
       s << UString::from(numeric);
     else
  
  
  
  1.59      +61 -2     JavaScriptCore/kjs/object.cpp
  
  Index: object.cpp
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/object.cpp,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- object.cpp	11 Dec 2005 02:05:46 -0000	1.58
  +++ object.cpp	13 Dec 2005 21:24:52 -0000	1.59
  @@ -153,7 +153,7 @@
     PropertySlot slot;
   
     if (const_cast<JSObject *>(this)->getPropertySlot(exec, propertyName, slot))
  -    return slot.getValue(exec, propertyName);
  +    return slot.getValue(exec, const_cast<JSObject *>(this), propertyName);
       
     return jsUndefined();
   }
  @@ -162,7 +162,7 @@
   {
     PropertySlot slot;
     if (const_cast<JSObject *>(this)->getPropertySlot(exec, propertyName, slot))
  -    return slot.getValue(exec, propertyName);
  +    return slot.getValue(exec, const_cast<JSObject *>(this), propertyName);
       
     return jsUndefined();
   }
  @@ -213,6 +213,35 @@
       return;
     }
   
  +  JSObject *obj = this;
  +  while (true) {
  +    if (JSValue *gs = obj->_prop.get(propertyName)) {
  +      if (gs->type() == GetterSetterType) {
  +        JSObject *setterFunc = static_cast<GetterSetterImp *>(gs)->getSetter();
  +            
  +        if (!setterFunc) {
  +          throwError(exec, TypeError, "setting a property that has only a getter");
  +          return;
  +        }
  +            
  +        List args;
  +        args.append(value);
  +        
  +        setterFunc->call(exec, this, args);
  +        return;
  +      } else  {
  +        // If there's an existing property on the object or one of its 
  +        // prototype it should be replaced, so we just break here.
  +        break;
  +      }
  +    }
  +     
  +    if (!obj->_proto || !obj->_proto->isObject())
  +      break;
  +        
  +    obj = static_cast<JSObject *>(obj->_proto);
  +  }
  +
     _prop.put(propertyName,value,attr);
   }
   
  @@ -332,6 +361,36 @@
     return 0;
   }
   
  +void JSObject::defineGetter(ExecState *exec, const Identifier& propertyName, JSObject *getterFunc)
  +{
  +    JSValue *o = getDirect(propertyName);
  +    GetterSetterImp *gs;
  +    
  +    if (o && o->type() == GetterSetterType) {
  +        gs = static_cast<GetterSetterImp *>(o);
  +    } else {
  +        gs = new GetterSetterImp;
  +        putDirect(propertyName, gs);
  +    }
  +    
  +    gs->setGetter(getterFunc);
  +}
  +
  +void JSObject::defineSetter(ExecState *exec, const Identifier& propertyName, JSObject *setterFunc)
  +{
  +    JSValue *o = getDirect(propertyName);
  +    GetterSetterImp *gs;
  +    
  +    if (o && o->type() == GetterSetterType) {
  +        gs = static_cast<GetterSetterImp *>(o);
  +    } else {
  +        gs = new GetterSetterImp;
  +        putDirect(propertyName, gs);
  +    }
  +    
  +    gs->setSetter(setterFunc);
  +}
  +
   bool JSObject::implementsConstruct() const
   {
     return false;
  
  
  
  1.51      +39 -1     JavaScriptCore/kjs/object.h
  
  Index: object.h
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/object.h,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- object.h	11 Dec 2005 02:05:46 -0000	1.50
  +++ object.h	13 Dec 2005 21:24:52 -0000	1.51
  @@ -80,6 +80,32 @@
       void *dummy;
     };
     
  +  // This is an internal value object which stores getter and setter functions
  +  // for a property.
  +  class GetterSetterImp : public JSCell {
  +  public:
  +    Type type() const { return GetterSetterType; }
  +      
  +    GetterSetterImp() : getter(0), setter(0) { }
  +      
  +    virtual JSValue *toPrimitive(ExecState *exec, Type preferred = UnspecifiedType) const;
  +    virtual bool toBoolean(ExecState *exec) const;
  +    virtual double toNumber(ExecState *exec) const;
  +    virtual UString toString(ExecState *exec) const;
  +    virtual JSObject *toObject(ExecState *exec) const;
  +      
  +    virtual void mark();
  +      
  +    JSObject *getGetter() { return getter; }
  +    void setGetter(JSObject *g) { getter = g; }
  +    JSObject *getSetter() { return setter; }
  +    void setSetter(JSObject *s) { setter = s; }
  +      
  +  private:
  +    JSObject *getter;
  +    JSObject *setter;  
  +  };
  +  
     class JSObject : public JSCell {
     public:
       /**
  @@ -477,6 +503,9 @@
       void putDirect(const Identifier &propertyName, JSValue *value, int attr = 0);
       void putDirect(const Identifier &propertyName, int value, int attr = 0);
       
  +    void defineGetter(ExecState *exec, const Identifier& propertyName, JSObject *getterFunc);
  +    void defineSetter(ExecState *exec, const Identifier& propertyName, JSObject *setterFunc);
  +
       /**
        * Remove all properties from this object.
        * This doesn't take DontDelete into account, and isn't in the ECMA spec.
  @@ -606,7 +635,16 @@
   inline bool JSObject::getOwnPropertySlot(ExecState *exec, const Identifier& propertyName, PropertySlot& slot)
   {
       if (JSValue **location = getDirectLocation(propertyName)) {
  -        slot.setValueSlot(this, location);
  +        if ((*location)->type() == GetterSetterType) {
  +            GetterSetterImp *gs = static_cast<GetterSetterImp *>(*location);
  +            JSObject *getterFunc = gs->getGetter();
  +            if (getterFunc)
  +                slot.setGetterSlot(this, getterFunc);
  +            else
  +                slot.setUndefined(this);
  +        } else {
  +            slot.setValueSlot(this, location);
  +        }
           return true;
       }
   
  
  
  
  1.19      +52 -0     JavaScriptCore/kjs/object_object.cpp
  
  Index: object_object.cpp
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/object_object.cpp,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- object_object.cpp	11 Dec 2005 02:05:46 -0000	1.18
  +++ object_object.cpp	13 Dec 2005 21:24:52 -0000	1.19
  @@ -43,6 +43,11 @@
       putDirect(valueOfPropertyName, new ObjectProtoFunc(exec, funcProto, ObjectProtoFunc::ValueOf,                 0), DontEnum);
       putDirect("hasOwnProperty", new ObjectProtoFunc(exec, funcProto, ObjectProtoFunc::HasOwnProperty,             1), DontEnum);
       putDirect("propertyIsEnumerable", new ObjectProtoFunc(exec, funcProto, ObjectProtoFunc::PropertyIsEnumerable, 1), DontEnum);
  +    // Mozilla extensions
  +    putDirect("__defineGetter__", new ObjectProtoFunc(exec, funcProto, ObjectProtoFunc::DefineGetter,             2), DontEnum);
  +    putDirect("__defineSetter__", new ObjectProtoFunc(exec, funcProto, ObjectProtoFunc::DefineSetter,             2), DontEnum);
  +    putDirect("__lookupGetter__", new ObjectProtoFunc(exec, funcProto, ObjectProtoFunc::LookupGetter,             1), DontEnum);
  +    putDirect("__lookupSetter__", new ObjectProtoFunc(exec, funcProto, ObjectProtoFunc::LookupSetter,             1), DontEnum);
   }
   
   
  @@ -73,6 +78,53 @@
               PropertySlot slot;
               return jsBoolean(thisObj->getOwnPropertySlot(exec, Identifier(args[0]->toString(exec)), slot));
           }
  +        case DefineGetter: 
  +        case DefineSetter: {
  +            if (!args[1]->isObject() ||
  +                !static_cast<JSObject *>(args[1])->implementsCall()) {
  +                if (id == DefineGetter)
  +                    return throwError(exec, SyntaxError, "invalid getter usage");
  +                else
  +                    return throwError(exec, SyntaxError, "invalid setter usage");
  +            }
  +
  +            if (id == DefineGetter)
  +                thisObj->defineGetter(exec, Identifier(args[0]->toString(exec)), static_cast<JSObject *>(args[1]));
  +            else
  +                thisObj->defineSetter(exec, Identifier(args[0]->toString(exec)), static_cast<JSObject *>(args[1]));
  +            return jsUndefined();
  +        }
  +        case LookupGetter:
  +        case LookupSetter: {
  +            Identifier propertyName = Identifier(args[0]->toString(exec));
  +            
  +            JSObject *obj = thisObj;
  +            while (true) {
  +                JSValue *v = obj->getDirect(propertyName);
  +                
  +                if (v) {
  +                    if (v->type() != GetterSetterType)
  +                        return jsUndefined();
  +
  +                    JSObject *funcObj;
  +                        
  +                    if (id == LookupGetter)
  +                        funcObj = static_cast<GetterSetterImp *>(v)->getGetter();
  +                    else
  +                        funcObj = static_cast<GetterSetterImp *>(v)->getSetter();
  +                
  +                    if (!funcObj)
  +                        return jsUndefined();
  +                    else
  +                        return funcObj;
  +                }
  +                
  +                if (!obj->prototype() || !obj->prototype()->isObject())
  +                    return jsUndefined();
  +                
  +                obj = static_cast<JSObject *>(obj->prototype());
  +            }
  +        }
           case PropertyIsEnumerable:
               return jsBoolean(thisObj->propertyIsEnumerable(exec, Identifier(args[0]->toString(exec))));
           case ToLocaleString:
  
  
  
  1.12      +2 -1      JavaScriptCore/kjs/object_object.h
  
  Index: object_object.h
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/object_object.h,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- object_object.h	11 Dec 2005 02:05:46 -0000	1.11
  +++ object_object.h	13 Dec 2005 21:24:52 -0000	1.12
  @@ -52,7 +52,8 @@
       virtual bool implementsCall() const;
       virtual JSValue *callAsFunction(ExecState *, JSObject *, const List &args);
   
  -    enum { ToString, ToLocaleString, ValueOf, HasOwnProperty, PropertyIsEnumerable };
  +    enum { ToString, ToLocaleString, ValueOf, HasOwnProperty, PropertyIsEnumerable,
  +           DefineGetter, DefineSetter, LookupGetter, LookupSetter };
     private:
       int id;
     };
  
  
  
  1.6       +7 -1      JavaScriptCore/kjs/property_slot.cpp
  
  Index: property_slot.cpp
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/property_slot.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- property_slot.cpp	11 Dec 2005 02:05:47 -0000	1.5
  +++ property_slot.cpp	13 Dec 2005 21:24:52 -0000	1.6
  @@ -23,12 +23,18 @@
   
   #include "config.h"
   #include "property_slot.h"
  +#include "object.h"
   
   namespace KJS {
   
  -JSValue *PropertySlot::undefinedGetter(ExecState *, const Identifier& propertyName, const PropertySlot& slot)
  +JSValue *PropertySlot::undefinedGetter(ExecState *, JSObject *, const Identifier& propertyName, const PropertySlot& slot)
   {
       return jsUndefined();
   }
   
  +JSValue *PropertySlot::functionGetter(ExecState *exec, JSObject *originalObject, const Identifier&, const PropertySlot& slot)
  +{
  +    return slot.m_data.getterFunc->call(exec, originalObject, List::empty());
  +}
  +
   }
  
  
  
  1.8       +17 -8     JavaScriptCore/kjs/property_slot.h
  
  Index: property_slot.h
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/property_slot.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- property_slot.h	11 Dec 2005 02:05:47 -0000	1.7
  +++ property_slot.h	13 Dec 2005 21:24:53 -0000	1.8
  @@ -36,20 +36,20 @@
   class PropertySlot
   {
   public:
  -    typedef JSValue *(*GetValueFunc)(ExecState *, const Identifier&, const PropertySlot&);
  +    typedef JSValue *(*GetValueFunc)(ExecState *, JSObject *originalObject, const Identifier&, const PropertySlot&);
   
  -    JSValue *getValue(ExecState *exec, const Identifier& propertyName) const
  +    JSValue *getValue(ExecState *exec, JSObject *originalObject, const Identifier& propertyName) const
       { 
           if (m_getValue == VALUE_SLOT_MARKER)
               return *m_data.valueSlot;
  -        return m_getValue(exec, propertyName, *this); 
  +        return m_getValue(exec, originalObject, propertyName, *this); 
       }
   
  -    JSValue *getValue(ExecState *exec, unsigned propertyName) const
  +    JSValue *getValue(ExecState *exec, JSObject *originalObject, unsigned propertyName) const
       { 
           if (m_getValue == VALUE_SLOT_MARKER)
               return *m_data.valueSlot;
  -        return m_getValue(exec, Identifier::from(propertyName), *this); 
  +        return m_getValue(exec, originalObject, Identifier::from(propertyName), *this); 
       }
       
       void setValueSlot(JSObject *slotBase, JSValue **valueSlot) 
  @@ -81,7 +81,14 @@
           m_data.index = index;
           m_getValue = getValue;
       }
  -
  +    
  +    void setGetterSlot(JSObject *slotBase, JSObject *getterFunc)
  +    {
  +        m_getValue = functionGetter;
  +        m_slotBase = slotBase;
  +        m_data.getterFunc = getterFunc;
  +    }
  +    
       void setUndefined(JSObject *slotBase)
       {
           m_slotBase = slotBase;
  @@ -94,12 +101,14 @@
       unsigned index() const { return m_data.index; }
   
   private:
  -    static JSValue *undefinedGetter(ExecState *, const Identifier&, const PropertySlot&);
  -
  +    static JSValue *undefinedGetter(ExecState *, JSObject *, const Identifier&, const PropertySlot&);
  +    static JSValue *functionGetter(ExecState *, JSObject *, const Identifier&, const PropertySlot&);
  +    
       GetValueFunc m_getValue;
   
       JSObject *m_slotBase;
       union {
  +        JSObject *getterFunc;
           JSValue **valueSlot;
           const HashEntry *staticEntry;
           unsigned index;
  
  
  
  1.53      +2 -2      JavaScriptCore/kjs/string_object.cpp
  
  Index: string_object.cpp
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/string_object.cpp,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- string_object.cpp	11 Dec 2005 02:05:49 -0000	1.52
  +++ string_object.cpp	13 Dec 2005 21:24:53 -0000	1.53
  @@ -52,12 +52,12 @@
     setInternalValue(jsString(string));
   }
   
  -JSValue *StringInstance::lengthGetter(ExecState *exec, const Identifier& propertyName, const PropertySlot &slot)
  +JSValue *StringInstance::lengthGetter(ExecState *exec, JSObject *originalObject, const Identifier& propertyName, const PropertySlot &slot)
   {
       return jsNumber(static_cast<StringInstance *>(slot.slotBase())->internalValue()->toString(exec).size());
   }
   
  -JSValue *StringInstance::indexGetter(ExecState *exec, const Identifier& propertyName, const PropertySlot &slot)
  +JSValue *StringInstance::indexGetter(ExecState *exec, JSObject *originalObject, const Identifier& propertyName, const PropertySlot &slot)
   {
       const UChar c = static_cast<StringInstance *>(slot.slotBase())->internalValue()->toString(exec)[slot.index()];
       return jsString(UString(&c, 1));
  
  
  
  1.16      +2 -2      JavaScriptCore/kjs/string_object.h
  
  Index: string_object.h
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/string_object.h,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- string_object.h	11 Dec 2005 02:05:49 -0000	1.15
  +++ string_object.h	13 Dec 2005 21:24:53 -0000	1.16
  @@ -39,8 +39,8 @@
       virtual const ClassInfo *classInfo() const { return &info; }
       static const ClassInfo info;
     private:
  -    static JSValue *lengthGetter(ExecState *exec, const Identifier&, const PropertySlot &slot);
  -    static JSValue *indexGetter(ExecState *exec, const Identifier&, const PropertySlot &slot);
  +    static JSValue *lengthGetter(ExecState *exec, JSObject *, const Identifier&, const PropertySlot &slot);
  +    static JSValue *indexGetter(ExecState *exec, JSObject *, const Identifier&, const PropertySlot &slot);
     };
   
     /**
  
  
  
  1.41      +3 -1      JavaScriptCore/kjs/value.h
  
  Index: value.h
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/value.h,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- value.h	13 Dec 2005 11:06:04 -0000	1.40
  +++ value.h	13 Dec 2005 21:24:53 -0000	1.41
  @@ -54,7 +54,8 @@
       BooleanType       = 3,
       StringType        = 4,
       NumberType        = 5,
  -    ObjectType        = 6
  +    ObjectType        = 6,
  +    GetterSetterType  = 7
   };
   
   /**
  @@ -132,6 +133,7 @@
       friend class NumberImp;
       friend class StringImp;
       friend class JSObject;
  +    friend class GetterSetterImp;
   private:
       JSCell();
       virtual ~JSCell();
  
  
  



More information about the webkit-changes mailing list