Ignore:
Timestamp:
Jan 6, 2006, 12:32:20 AM (19 years ago)
Author:
mjs
Message:

JavaScriptCore:

Reviewed by Eric.

  • kjs/function.cpp: (KJS::ActivationImp::getOwnPropertySlot): Implement directly, thus skipping getter/setter handling and proto handling, as well as inlining needed superclass stuff. (KJS::ActivationImp::put): Implement directly, skipping getter/setter, proto, and do canPut directly in PropertyMap::put since there's no static property table either.
  • kjs/function.h:
  • kjs/property_map.cpp: (KJS::PropertyMap::put): Allow optionally inlining canPut check.
  • kjs/property_map.h:

LayoutTests:

Reviewed by Eric.

  • fast/js/activation-proto-expected.txt: Added.
  • fast/js/activation-proto.html: Added.
File:
1 edited

Legend:

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

    r11566 r11903  
    509509{
    510510    // 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);
    512516        return true;
     517    }
    513518
    514519    if (propertyName == exec->dynamicInterpreter()->argumentsIdentifier()) {
     
    525530        return false;
    526531    return JSObject::deleteProperty(exec, propertyName);
     532}
     533
     534void 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));
    527541}
    528542
Note: See TracChangeset for help on using the changeset viewer.