Ignore:
Timestamp:
Jul 5, 2008, 10:26:58 PM (17 years ago)
Author:
[email protected]
Message:

2008-07-05 Sam Weinig <[email protected]>

Reviewed by Cameron Zwarich.

First step in broad cleanup effort.

[ File list elided ]

File:
1 edited

Legend:

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

    r35018 r35022  
    3636
    3737// ECMA 10.1.8
    38 Arguments::Arguments(ExecState* exec, JSFunction* func, const ArgList& args, JSActivation* act)
     38Arguments::Arguments(ExecState* exec, JSFunction* function, const ArgList& args, JSActivation* activation)
    3939    : JSObject(exec->lexicalGlobalObject()->objectPrototype())
    40     , _activationObject(act)
    41     , indexToNameMap(func, args)
     40    , m_activationObject(activation)
     41    , m_indexToNameMap(function, args)
    4242{
    43     putDirect(exec->propertyNames().callee, func, DontEnum);
     43    putDirect(exec->propertyNames().callee, function, DontEnum);
    4444    putDirect(exec, exec->propertyNames().length, args.size(), DontEnum);
    4545 
     
    4848    for (ArgList::const_iterator it = args.begin(); it != end; ++it, ++i) {
    4949        Identifier name = Identifier::from(exec, i);
    50         if (!indexToNameMap.isMapped(name))
     50        if (!m_indexToNameMap.isMapped(name))
    5151            putDirect(name, *it, DontEnum);
    5252    }
     
    5555void Arguments::mark()
    5656{
    57   JSObject::mark();
    58   if (_activationObject && !_activationObject->marked())
    59     _activationObject->mark();
     57    JSObject::mark();
     58    if (m_activationObject && !m_activationObject->marked())
     59        m_activationObject->mark();
    6060}
    6161
    6262JSValue* Arguments::mappedIndexGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot)
    6363{
    64   Arguments* thisObj = static_cast<Arguments*>(slot.slotBase());
    65   return thisObj->_activationObject->get(exec, thisObj->indexToNameMap[propertyName]);
     64      Arguments* thisObj = static_cast<Arguments*>(slot.slotBase());
     65      return thisObj->m_activationObject->get(exec, thisObj->m_indexToNameMap[propertyName]);
    6666}
    6767
    6868bool Arguments::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
    6969{
    70   if (indexToNameMap.isMapped(propertyName)) {
    71     slot.setCustom(this, mappedIndexGetter);
    72     return true;
    73   }
     70    if (m_indexToNameMap.isMapped(propertyName)) {
     71        slot.setCustom(this, mappedIndexGetter);
     72        return true;
     73    }
    7474
    75   return JSObject::getOwnPropertySlot(exec, propertyName, slot);
     75    return JSObject::getOwnPropertySlot(exec, propertyName, slot);
    7676}
    7777
    7878void Arguments::put(ExecState* exec, const Identifier& propertyName, JSValue* value)
    7979{
    80     if (indexToNameMap.isMapped(propertyName))
    81         _activationObject->put(exec, indexToNameMap[propertyName], value);
     80    if (m_indexToNameMap.isMapped(propertyName))
     81        m_activationObject->put(exec, m_indexToNameMap[propertyName], value);
    8282    else
    8383        JSObject::put(exec, propertyName, value);
     
    8686bool Arguments::deleteProperty(ExecState* exec, const Identifier& propertyName)
    8787{
    88   if (indexToNameMap.isMapped(propertyName)) {
    89     indexToNameMap.unMap(exec, propertyName);
    90     return true;
    91   } else {
     88    if (m_indexToNameMap.isMapped(propertyName)) {
     89        m_indexToNameMap.unMap(exec, propertyName);
     90        return true;
     91    }
     92
    9293    return JSObject::deleteProperty(exec, propertyName);
    93   }
    9494}
    9595
Note: See TracChangeset for help on using the changeset viewer.