Changeset 34334 in webkit for trunk/JavaScriptCore/kjs
- Timestamp:
- Jun 2, 2008, 11:26:54 PM (17 years ago)
- Location:
- trunk/JavaScriptCore/kjs
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/array_instance.cpp
r34302 r34334 547 547 arguments.append(va); 548 548 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); 550 550 return (compareResult < 0) ? -1 : 1; // Not passing equality through, because we need to store all values, even if equivalent. 551 551 } -
trunk/JavaScriptCore/kjs/array_object.cpp
r34316 r34334 164 164 UString str; 165 165 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); 167 167 else 168 168 str = element->toString(exec); … … 410 410 l.append(jObj); 411 411 l.append(minObj); 412 compareResult = sortFunction->call (exec, exec->globalThisValue(), l)->toNumber(exec);412 compareResult = sortFunction->callAsFunction(exec, exec->globalThisValue(), l)->toNumber(exec); 413 413 } else 414 414 compareResult = (jObj->toString(exec) < minObj->toString(exec)) ? -1 : 1; … … 527 527 eachArguments.append(thisObj); 528 528 529 JSValue* result = eachFunction->call (exec, applyThis, eachArguments);529 JSValue* result = eachFunction->callAsFunction(exec, applyThis, eachArguments); 530 530 531 531 if (result->toBoolean(exec)) … … 562 562 eachArguments.append(thisObj); 563 563 564 JSValue* result = eachFunction->call (exec, applyThis, eachArguments);564 JSValue* result = eachFunction->callAsFunction(exec, applyThis, eachArguments); 565 565 resultArray->put(exec, k, result); 566 566 } … … 598 598 eachArguments.append(thisObj); 599 599 600 bool predicateResult = eachFunction->call (exec, applyThis, eachArguments)->toBoolean(exec);600 bool predicateResult = eachFunction->callAsFunction(exec, applyThis, eachArguments)->toBoolean(exec); 601 601 602 602 if (!predicateResult) { … … 629 629 eachArguments.append(thisObj); 630 630 631 eachFunction->call (exec, applyThis, eachArguments);631 eachFunction->callAsFunction(exec, applyThis, eachArguments); 632 632 } 633 633 return jsUndefined(); … … 656 656 eachArguments.append(thisObj); 657 657 658 bool predicateResult = eachFunction->call (exec, applyThis, eachArguments)->toBoolean(exec);658 bool predicateResult = eachFunction->callAsFunction(exec, applyThis, eachArguments)->toBoolean(exec); 659 659 660 660 if (predicateResult) { -
trunk/JavaScriptCore/kjs/function_object.cpp
r34273 r34334 105 105 } 106 106 107 return thisObj->call (exec, applyThis, applyArgs);107 return thisObj->callAsFunction(exec, applyThis, applyArgs); 108 108 } 109 109 … … 123 123 List argsTail; 124 124 args.getSlice(1, argsTail); 125 return thisObj->call (exec, callThis, argsTail);125 return thisObj->callAsFunction(exec, callThis, argsTail); 126 126 } 127 127 -
trunk/JavaScriptCore/kjs/nodes.cpp
r34319 r34334 1282 1282 1283 1283 JSObject* thisObj = base->toThisObject(exec); 1284 return func->call (exec, thisObj, argList);1284 return func->callAsFunction(exec, thisObj, argList); 1285 1285 } 1286 1286 ++iter; … … 1341 1341 1342 1342 JSObject* thisObj = exec->globalThisValue(); 1343 return func->call (exec, thisObj, argList);1343 return func->callAsFunction(exec, thisObj, argList); 1344 1344 } 1345 1345 … … 1442 1442 1443 1443 JSObject* thisObj = exec->globalThisValue(); 1444 return func->call (exec, thisObj, argList);1444 return func->callAsFunction(exec, thisObj, argList); 1445 1445 } 1446 1446 … … 1496 1496 1497 1497 JSObject* thisObj = exec->globalThisValue(); 1498 return func->call (exec, thisObj, argList);1498 return func->callAsFunction(exec, thisObj, argList); 1499 1499 } 1500 1500 … … 1634 1634 1635 1635 // 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); 1637 1637 } 1638 1638 … … 1691 1691 1692 1692 // 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); 1694 1694 } 1695 1695 -
trunk/JavaScriptCore/kjs/object.cpp
r34309 r34334 39 39 namespace KJS { 40 40 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 49 41 // ------------------------------ JSObject ------------------------------------ 50 42 … … 159 151 args.append(value); 160 152 161 setterFunc->call (exec, this->toThisObject(exec), args);153 setterFunc->callAsFunction(exec, this->toThisObject(exec), args); 162 154 return; 163 155 } else { … … 247 239 if (callType != CallTypeNone) { 248 240 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()); 250 242 JSType defType = def->type(); 251 243 ASSERT(defType != GetterSetterType); -
trunk/JavaScriptCore/kjs/object.h
r34160 r34334 365 365 */ 366 366 bool implementsCall(); 367 JSValue *call(ExecState *exec, JSObject *thisObj, const List &args);368 369 367 virtual JSValue *callAsFunction(ExecState *exec, JSObject *thisObj, const List &args); 370 368 -
trunk/JavaScriptCore/kjs/property_slot.cpp
r33979 r34334 47 47 CallType callType = slot.m_data.getterFunc->getCallData(data); 48 48 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()); 50 50 ASSERT(callType == CallTypeJS); 51 51 RegisterFileStack* stack = &exec->dynamicGlobalObject()->registerFileStack(); 52 52 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()); 54 54 stack->popFunctionRegisterFile(); 55 55 return result; -
trunk/JavaScriptCore/kjs/string_object.cpp
r33979 r34334 351 351 args.append(sourceVal); 352 352 353 substitutedReplacement = replacementFunction->call (exec, exec->globalThisValue(), args)->toString(exec);353 substitutedReplacement = replacementFunction->callAsFunction(exec, exec->globalThisValue(), args)->toString(exec); 354 354 } else 355 355 substitutedReplacement = substituteBackreferences(replacementString, source, ovector, reg); … … 400 400 args.append(sourceVal); 401 401 402 replacementString = replacementFunction->call (exec, exec->globalThisValue(), args)->toString(exec);402 replacementString = replacementFunction->callAsFunction(exec, exec->globalThisValue(), args)->toString(exec); 403 403 } 404 404
Note:
See TracChangeset
for help on using the changeset viewer.