Changeset 11903 in webkit for trunk/JavaScriptCore
- Timestamp:
- Jan 6, 2006, 12:32:20 AM (19 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r11879 r11903 1 2006-01-05 Maciej Stachowiak <[email protected]> 2 3 Reviewed by Eric. 4 5 - fix remaining performance regression from Getter/Setter change 6 http://bugzilla.opendarwin.org/show_bug.cgi?id=6249 7 8 - Activation objects should not have __proto__ property 9 http://bugzilla.opendarwin.org/show_bug.cgi?id=6395 10 11 * kjs/function.cpp: 12 (KJS::ActivationImp::getOwnPropertySlot): Implement directly, thus 13 skipping getter/setter handling and __proto__ handling, as well 14 as inlining needed superclass stuff. 15 (KJS::ActivationImp::put): Implement directly, skipping getter/setter, 16 __proto__, and do canPut directly in PropertyMap::put since there's no 17 static property table either. 18 * kjs/function.h: 19 * kjs/property_map.cpp: 20 (KJS::PropertyMap::put): Allow optionally inlining canPut check. 21 * kjs/property_map.h: 22 1 23 2006-01-04 Geoffrey Garen <[email protected]> 2 24 -
trunk/JavaScriptCore/kjs/function.cpp
r11566 r11903 509 509 { 510 510 // do this first so property map arguments property wins over the below 511 if (JSObject::getOwnPropertySlot(exec, propertyName, slot)) 511 // we don't call JSObject because we won't have getter/setter properties 512 // and we don't want to support __proto__ 513 514 if (JSValue **location = getDirectLocation(propertyName)) { 515 slot.setValueSlot(this, location); 512 516 return true; 517 } 513 518 514 519 if (propertyName == exec->dynamicInterpreter()->argumentsIdentifier()) { … … 525 530 return false; 526 531 return JSObject::deleteProperty(exec, propertyName); 532 } 533 534 void ActivationImp::put(ExecState *exec, const Identifier &propertyName, JSValue *value, int attr) 535 { 536 // There's no way that an activation object can have a prototype or getter/setter properties 537 assert(!_prop.hasGetterSetterProperties()); 538 assert(!_proto); 539 540 _prop.put(propertyName, value, attr, (attr == None || attr == DontDelete)); 527 541 } 528 542 -
trunk/JavaScriptCore/kjs/function.h
r11566 r11903 127 127 128 128 virtual bool getOwnPropertySlot(ExecState *exec, const Identifier &, PropertySlot&); 129 virtual void put(ExecState *exec, const Identifier &propertyName, JSValue *value, int attr = None); 129 130 virtual bool deleteProperty(ExecState *exec, const Identifier &propertyName); 130 131 -
trunk/JavaScriptCore/kjs/property_map.cpp
r11773 r11903 289 289 #endif 290 290 291 void PropertyMap::put(const Identifier &name, JSValue *value, int attributes )291 void PropertyMap::put(const Identifier &name, JSValue *value, int attributes, bool roCheck) 292 292 { 293 293 assert(!name.isNull()); … … 308 308 UString::Rep *key = _singleEntry.key; 309 309 if (key) { 310 if (rep == key ) {310 if (rep == key && !(roCheck && (_singleEntry.attributes & ReadOnly))) { 311 311 _singleEntry.value = value; 312 312 return; … … 339 339 while (UString::Rep *key = entries[i].key) { 340 340 if (rep == key) { 341 if (roCheck && (_table->entries[i].attributes & ReadOnly)) 342 return; 341 343 // Put a new value in an existing hash table entry. 342 344 entries[i].value = value; -
trunk/JavaScriptCore/kjs/property_map.h
r11773 r11903 76 76 void clear(); 77 77 78 void put(const Identifier &name, JSValue *value, int attributes );78 void put(const Identifier &name, JSValue *value, int attributes, bool roCheck = false); 79 79 void remove(const Identifier &name); 80 80 JSValue *get(const Identifier &name) const;
Note:
See TracChangeset
for help on using the changeset viewer.