Changeset 34334 in webkit for trunk/JavaScriptCore/kjs


Ignore:
Timestamp:
Jun 2, 2008, 11:26:54 PM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2008-06-02 Geoffrey Garen <[email protected]>

Reviewed by Alexey Proskuryakov.

Removed JSObject::call, since it just called JSObject::callAsFunction.

SunSpider reports no change.

JavaScriptGlue:

2008-06-02 Geoffrey Garen <[email protected]>

Reviewed by Alexey Proskuryakov.

Removed JSObject::call, since it just called JSObject::callAsFunction.

SunSpider reports no change.

WebCore:

2008-06-02 Geoffrey Garen <[email protected]>

Reviewed by Alexey Proskuryakov.


Removed JSObject::call, since it just called JSObject::callAsFunction.


SunSpider reports no change.

Location:
trunk/JavaScriptCore/kjs
Files:
8 edited

Legend:

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

    r34302 r34334  
    547547        arguments.append(va);
    548548        arguments.append(vb);
    549         double compareResult = m_compareFunction->call(m_exec, m_globalThisValue, arguments)->toNumber(m_exec);
     549        double compareResult = m_compareFunction->callAsFunction(m_exec, m_globalThisValue, arguments)->toNumber(m_exec);
    550550        return (compareResult < 0) ? -1 : 1; // Not passing equality through, because we need to store all values, even if equivalent.
    551551    }
  • trunk/JavaScriptCore/kjs/array_object.cpp

    r34316 r34334  
    164164        UString str;
    165165        if (conversionFunction->isObject() && static_cast<JSObject*>(conversionFunction)->implementsCall())
    166             str = static_cast<JSObject*>(conversionFunction)->call(exec, o, exec->emptyList())->toString(exec);
     166            str = static_cast<JSObject*>(conversionFunction)->callAsFunction(exec, o, exec->emptyList())->toString(exec);
    167167        else
    168168            str = element->toString(exec);
     
    410410                l.append(jObj);
    411411                l.append(minObj);
    412                 compareResult = sortFunction->call(exec, exec->globalThisValue(), l)->toNumber(exec);
     412                compareResult = sortFunction->callAsFunction(exec, exec->globalThisValue(), l)->toNumber(exec);
    413413            } else
    414414                compareResult = (jObj->toString(exec) < minObj->toString(exec)) ? -1 : 1;
     
    527527        eachArguments.append(thisObj);
    528528
    529         JSValue* result = eachFunction->call(exec, applyThis, eachArguments);
     529        JSValue* result = eachFunction->callAsFunction(exec, applyThis, eachArguments);
    530530
    531531        if (result->toBoolean(exec))
     
    562562        eachArguments.append(thisObj);
    563563
    564         JSValue* result = eachFunction->call(exec, applyThis, eachArguments);
     564        JSValue* result = eachFunction->callAsFunction(exec, applyThis, eachArguments);
    565565        resultArray->put(exec, k, result);
    566566    }
     
    598598        eachArguments.append(thisObj);
    599599
    600         bool predicateResult = eachFunction->call(exec, applyThis, eachArguments)->toBoolean(exec);
     600        bool predicateResult = eachFunction->callAsFunction(exec, applyThis, eachArguments)->toBoolean(exec);
    601601
    602602        if (!predicateResult) {
     
    629629        eachArguments.append(thisObj);
    630630
    631         eachFunction->call(exec, applyThis, eachArguments);
     631        eachFunction->callAsFunction(exec, applyThis, eachArguments);
    632632    }
    633633    return jsUndefined();
     
    656656        eachArguments.append(thisObj);
    657657
    658         bool predicateResult = eachFunction->call(exec, applyThis, eachArguments)->toBoolean(exec);
     658        bool predicateResult = eachFunction->callAsFunction(exec, applyThis, eachArguments)->toBoolean(exec);
    659659
    660660        if (predicateResult) {
  • trunk/JavaScriptCore/kjs/function_object.cpp

    r34273 r34334  
    105105    }
    106106
    107     return thisObj->call(exec, applyThis, applyArgs);
     107    return thisObj->callAsFunction(exec, applyThis, applyArgs);
    108108}
    109109
     
    123123    List argsTail;
    124124    args.getSlice(1, argsTail);
    125     return thisObj->call(exec, callThis, argsTail);
     125    return thisObj->callAsFunction(exec, callThis, argsTail);
    126126}
    127127
  • trunk/JavaScriptCore/kjs/nodes.cpp

    r34319 r34334  
    12821282
    12831283            JSObject* thisObj = base->toThisObject(exec);
    1284             return func->call(exec, thisObj, argList);
     1284            return func->callAsFunction(exec, thisObj, argList);
    12851285        }
    12861286        ++iter;
     
    13411341
    13421342    JSObject* thisObj = exec->globalThisValue();
    1343     return func->call(exec, thisObj, argList);
     1343    return func->callAsFunction(exec, thisObj, argList);
    13441344}
    13451345
     
    14421442
    14431443    JSObject* thisObj = exec->globalThisValue();
    1444     return func->call(exec, thisObj, argList);
     1444    return func->callAsFunction(exec, thisObj, argList);
    14451445}
    14461446
     
    14961496
    14971497    JSObject* thisObj = exec->globalThisValue();
    1498     return func->call(exec, thisObj, argList);
     1498    return func->callAsFunction(exec, thisObj, argList);
    14991499}
    15001500
     
    16341634
    16351635    // No need to call toThisObject() on the thisObj as it is known not to be the GlobalObject or ActivationObject
    1636     return func->call(exec, thisObj, argList);
     1636    return func->callAsFunction(exec, thisObj, argList);
    16371637}
    16381638
     
    16911691
    16921692    // No need to call toThisObject() on the thisObj as it is known not to be the GlobalObject or ActivationObject
    1693     return func->call(exec, thisObj, argList);
     1693    return func->callAsFunction(exec, thisObj, argList);
    16941694}
    16951695
  • trunk/JavaScriptCore/kjs/object.cpp

    r34309 r34334  
    3939namespace KJS {
    4040
    41 // ------------------------------ Object ---------------------------------------
    42 
    43 JSValue* JSObject::call(ExecState* exec, JSObject* thisObj, const List& args)
    44 {
    45     ASSERT(implementsCall());
    46     return callAsFunction(exec, thisObj, args);
    47 }
    48 
    4941// ------------------------------ JSObject ------------------------------------
    5042
     
    159151          args.append(value);
    160152       
    161           setterFunc->call(exec, this->toThisObject(exec), args);
     153          setterFunc->callAsFunction(exec, this->toThisObject(exec), args);
    162154          return;
    163155        } else {
     
    247239      if (callType != CallTypeNone) {
    248240          JSObject* thisObj = const_cast<JSObject*>(object);
    249           JSValue* def = o->call(exec, thisObj->toThisObject(exec), exec->emptyList());
     241          JSValue* def = o->callAsFunction(exec, thisObj->toThisObject(exec), exec->emptyList());
    250242          JSType defType = def->type();
    251243          ASSERT(defType != GetterSetterType);
  • trunk/JavaScriptCore/kjs/object.h

    r34160 r34334  
    365365     */
    366366    bool implementsCall();
    367     JSValue *call(ExecState *exec, JSObject *thisObj, const List &args);
    368 
    369367    virtual JSValue *callAsFunction(ExecState *exec, JSObject *thisObj, const List &args);
    370368
  • trunk/JavaScriptCore/kjs/property_slot.cpp

    r33979 r34334  
    4747    CallType callType = slot.m_data.getterFunc->getCallData(data);
    4848    if (callType == CallTypeNative)
    49         return slot.m_data.getterFunc->call(exec, originalObject, exec->emptyList());
     49        return slot.m_data.getterFunc->callAsFunction(exec, originalObject, exec->emptyList());
    5050    ASSERT(callType == CallTypeJS);
    5151    RegisterFileStack* stack = &exec->dynamicGlobalObject()->registerFileStack();
    5252    stack->pushFunctionRegisterFile();
    53     JSValue* result = slot.m_data.getterFunc->call(exec, originalObject, exec->emptyList());
     53    JSValue* result = slot.m_data.getterFunc->callAsFunction(exec, originalObject, exec->emptyList());
    5454    stack->popFunctionRegisterFile();
    5555    return result;   
  • trunk/JavaScriptCore/kjs/string_object.cpp

    r33979 r34334  
    351351          args.append(sourceVal);
    352352
    353           substitutedReplacement = replacementFunction->call(exec, exec->globalThisValue(), args)->toString(exec);
     353          substitutedReplacement = replacementFunction->callAsFunction(exec, exec->globalThisValue(), args)->toString(exec);
    354354      } else
    355355          substitutedReplacement = substituteBackreferences(replacementString, source, ovector, reg);
     
    400400      args.append(sourceVal);
    401401     
    402       replacementString = replacementFunction->call(exec, exec->globalThisValue(), args)->toString(exec);
     402      replacementString = replacementFunction->callAsFunction(exec, exec->globalThisValue(), args)->toString(exec);
    403403  }
    404404
Note: See TracChangeset for help on using the changeset viewer.