Changeset 42989 in webkit for trunk/JavaScriptCore
- Timestamp:
- Apr 28, 2009, 11:07:26 PM (16 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 37 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSCallbackConstructor.cpp
r38440 r42989 62 62 Vector<JSValueRef, 16> arguments(argumentCount); 63 63 for (int i = 0; i < argumentCount; i++) 64 arguments[i] = toRef(args.at( exec,i));64 arguments[i] = toRef(args.at(i)); 65 65 66 66 JSLock::DropAllLocks dropAllLocks(exec); -
trunk/JavaScriptCore/API/JSCallbackFunction.cpp
r40046 r42989 56 56 Vector<JSValueRef, 16> arguments(argumentCount); 57 57 for (int i = 0; i < argumentCount; i++) 58 arguments[i] = toRef(args.at( exec,i));58 arguments[i] = toRef(args.at(i)); 59 59 60 60 JSLock::DropAllLocks dropAllLocks(exec); -
trunk/JavaScriptCore/API/JSCallbackObjectFunctions.h
r41931 r42989 283 283 Vector<JSValueRef, 16> arguments(argumentCount); 284 284 for (int i = 0; i < argumentCount; i++) 285 arguments[i] = toRef(args.at( exec,i));285 arguments[i] = toRef(args.at(i)); 286 286 JSLock::DropAllLocks dropAllLocks(exec); 287 287 JSValueRef exception = 0; … … 338 338 Vector<JSValueRef, 16> arguments(argumentCount); 339 339 for (int i = 0; i < argumentCount; i++) 340 arguments[i] = toRef(args.at( exec,i));340 arguments[i] = toRef(args.at(i)); 341 341 JSLock::DropAllLocks dropAllLocks(exec); 342 342 JSValueRef exception = 0; -
trunk/JavaScriptCore/ChangeLog
r42988 r42989 1 2009-04-28 Geoffrey Garen <[email protected]> 2 3 Rubber stamped by Beth Dakin. 4 5 Removed scaffolding supporting dynamically converting between 32bit and 6 64bit value representations. 7 8 * API/JSCallbackConstructor.cpp: 9 (JSC::constructJSCallback): 10 * API/JSCallbackFunction.cpp: 11 (JSC::JSCallbackFunction::call): 12 * API/JSCallbackObjectFunctions.h: 13 (JSC::::construct): 14 (JSC::::call): 15 * bytecode/CodeBlock.cpp: 16 (JSC::CodeBlock::dump): 17 * bytecode/CodeBlock.h: 18 (JSC::CodeBlock::getConstant): 19 * bytecompiler/BytecodeGenerator.cpp: 20 (JSC::BytecodeGenerator::emitEqualityOp): 21 * interpreter/CallFrame.cpp: 22 (JSC::CallFrame::thisValue): 23 * interpreter/Interpreter.cpp: 24 (JSC::Interpreter::callEval): 25 (JSC::Interpreter::throwException): 26 (JSC::Interpreter::createExceptionScope): 27 (JSC::Interpreter::privateExecute): 28 (JSC::Interpreter::retrieveArguments): 29 * interpreter/Register.h: 30 (JSC::Register::): 31 (JSC::Register::Register): 32 (JSC::Register::jsValue): 33 (JSC::Register::marked): 34 (JSC::Register::mark): 35 (JSC::Register::i): 36 (JSC::Register::activation): 37 (JSC::Register::arguments): 38 (JSC::Register::callFrame): 39 (JSC::Register::codeBlock): 40 (JSC::Register::function): 41 (JSC::Register::propertyNameIterator): 42 (JSC::Register::scopeChain): 43 (JSC::Register::vPC): 44 * jit/JITStubs.cpp: 45 (JSC::JITStubs::cti_op_call_NotJSFunction): 46 (JSC::JITStubs::cti_op_load_varargs): 47 (JSC::JITStubs::cti_op_call_eval): 48 * jsc.cpp: 49 (functionPrint): 50 (functionDebug): 51 (functionRun): 52 (functionLoad): 53 * runtime/ArgList.h: 54 (JSC::ArgList::at): 55 * runtime/Arguments.cpp: 56 (JSC::Arguments::copyToRegisters): 57 (JSC::Arguments::fillArgList): 58 (JSC::Arguments::getOwnPropertySlot): 59 * runtime/ArrayConstructor.cpp: 60 (JSC::constructArrayWithSizeQuirk): 61 * runtime/ArrayPrototype.cpp: 62 (JSC::arrayProtoFuncJoin): 63 (JSC::arrayProtoFuncConcat): 64 (JSC::arrayProtoFuncPush): 65 (JSC::arrayProtoFuncSlice): 66 (JSC::arrayProtoFuncSort): 67 (JSC::arrayProtoFuncSplice): 68 (JSC::arrayProtoFuncUnShift): 69 (JSC::arrayProtoFuncFilter): 70 (JSC::arrayProtoFuncMap): 71 (JSC::arrayProtoFuncEvery): 72 (JSC::arrayProtoFuncForEach): 73 (JSC::arrayProtoFuncSome): 74 (JSC::arrayProtoFuncReduce): 75 (JSC::arrayProtoFuncReduceRight): 76 (JSC::arrayProtoFuncIndexOf): 77 (JSC::arrayProtoFuncLastIndexOf): 78 * runtime/BooleanConstructor.cpp: 79 (JSC::constructBoolean): 80 (JSC::callBooleanConstructor): 81 * runtime/DateConstructor.cpp: 82 (JSC::constructDate): 83 (JSC::dateParse): 84 (JSC::dateUTC): 85 * runtime/DatePrototype.cpp: 86 (JSC::formatLocaleDate): 87 (JSC::fillStructuresUsingTimeArgs): 88 (JSC::fillStructuresUsingDateArgs): 89 (JSC::dateProtoFuncSetTime): 90 (JSC::dateProtoFuncSetYear): 91 * runtime/ErrorConstructor.cpp: 92 (JSC::constructError): 93 * runtime/FunctionConstructor.cpp: 94 (JSC::constructFunction): 95 * runtime/FunctionPrototype.cpp: 96 (JSC::functionProtoFuncApply): 97 (JSC::functionProtoFuncCall): 98 * runtime/JSArray.cpp: 99 (JSC::JSArray::JSArray): 100 (JSC::constructArray): 101 * runtime/JSArray.h: 102 * runtime/JSGlobalObjectFunctions.cpp: 103 (JSC::encode): 104 (JSC::decode): 105 (JSC::globalFuncEval): 106 (JSC::globalFuncParseInt): 107 (JSC::globalFuncParseFloat): 108 (JSC::globalFuncIsNaN): 109 (JSC::globalFuncIsFinite): 110 (JSC::globalFuncEscape): 111 (JSC::globalFuncUnescape): 112 (JSC::globalFuncJSCPrint): 113 * runtime/MathObject.cpp: 114 (JSC::mathProtoFuncAbs): 115 (JSC::mathProtoFuncACos): 116 (JSC::mathProtoFuncASin): 117 (JSC::mathProtoFuncATan): 118 (JSC::mathProtoFuncATan2): 119 (JSC::mathProtoFuncCeil): 120 (JSC::mathProtoFuncCos): 121 (JSC::mathProtoFuncExp): 122 (JSC::mathProtoFuncFloor): 123 (JSC::mathProtoFuncLog): 124 (JSC::mathProtoFuncMax): 125 (JSC::mathProtoFuncMin): 126 (JSC::mathProtoFuncPow): 127 (JSC::mathProtoFuncRound): 128 (JSC::mathProtoFuncSin): 129 (JSC::mathProtoFuncSqrt): 130 (JSC::mathProtoFuncTan): 131 * runtime/NativeErrorConstructor.cpp: 132 (JSC::NativeErrorConstructor::construct): 133 * runtime/NumberConstructor.cpp: 134 (JSC::constructWithNumberConstructor): 135 (JSC::callNumberConstructor): 136 * runtime/NumberPrototype.cpp: 137 (JSC::numberProtoFuncToString): 138 (JSC::numberProtoFuncToFixed): 139 (JSC::numberProtoFuncToExponential): 140 (JSC::numberProtoFuncToPrecision): 141 * runtime/ObjectConstructor.cpp: 142 (JSC::constructObject): 143 * runtime/ObjectPrototype.cpp: 144 (JSC::objectProtoFuncHasOwnProperty): 145 (JSC::objectProtoFuncIsPrototypeOf): 146 (JSC::objectProtoFuncDefineGetter): 147 (JSC::objectProtoFuncDefineSetter): 148 (JSC::objectProtoFuncLookupGetter): 149 (JSC::objectProtoFuncLookupSetter): 150 (JSC::objectProtoFuncPropertyIsEnumerable): 151 * runtime/PropertySlot.h: 152 (JSC::PropertySlot::getValue): 153 * runtime/RegExpConstructor.cpp: 154 (JSC::constructRegExp): 155 * runtime/RegExpObject.cpp: 156 (JSC::RegExpObject::match): 157 * runtime/RegExpPrototype.cpp: 158 (JSC::regExpProtoFuncCompile): 159 * runtime/StringConstructor.cpp: 160 (JSC::stringFromCharCodeSlowCase): 161 (JSC::stringFromCharCode): 162 (JSC::constructWithStringConstructor): 163 (JSC::callStringConstructor): 164 * runtime/StringPrototype.cpp: 165 (JSC::stringProtoFuncReplace): 166 (JSC::stringProtoFuncCharAt): 167 (JSC::stringProtoFuncCharCodeAt): 168 (JSC::stringProtoFuncConcat): 169 (JSC::stringProtoFuncIndexOf): 170 (JSC::stringProtoFuncLastIndexOf): 171 (JSC::stringProtoFuncMatch): 172 (JSC::stringProtoFuncSearch): 173 (JSC::stringProtoFuncSlice): 174 (JSC::stringProtoFuncSplit): 175 (JSC::stringProtoFuncSubstr): 176 (JSC::stringProtoFuncSubstring): 177 (JSC::stringProtoFuncLocaleCompare): 178 (JSC::stringProtoFuncFontcolor): 179 (JSC::stringProtoFuncFontsize): 180 (JSC::stringProtoFuncAnchor): 181 (JSC::stringProtoFuncLink): 182 1 183 2009-04-28 David Kilzer <[email protected]> 2 184 -
trunk/JavaScriptCore/bytecode/CodeBlock.cpp
r42337 r42989 358 358 size_t i = 0; 359 359 do { 360 printf(" r%u = %s\n", registerIndex, valueToSourceString(exec, m_constantRegisters[i].jsValue( exec)).ascii());360 printf(" r%u = %s\n", registerIndex, valueToSourceString(exec, m_constantRegisters[i].jsValue()).ascii()); 361 361 ++i; 362 362 ++registerIndex; -
trunk/JavaScriptCore/bytecode/CodeBlock.h
r41089 r42989 267 267 ALWAYS_INLINE JSValuePtr getConstant(int index) 268 268 { 269 return m_constantRegisters[index - m_numVars]. getJSValue();269 return m_constantRegisters[index - m_numVars].jsValue(); 270 270 } 271 271 -
trunk/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
r42922 r42989 847 847 && src1->isTemporary() 848 848 && m_codeBlock->isConstantRegisterIndex(src2->index()) 849 && m_codeBlock->constantRegister(src2->index() - m_codeBlock->m_numVars).jsValue( m_scopeChain->globalObject()->globalExec()).isString()) {850 const UString& value = asString(m_codeBlock->constantRegister(src2->index() - m_codeBlock->m_numVars).jsValue( m_scopeChain->globalObject()->globalExec()))->value();849 && m_codeBlock->constantRegister(src2->index() - m_codeBlock->m_numVars).jsValue().isString()) { 850 const UString& value = asString(m_codeBlock->constantRegister(src2->index() - m_codeBlock->m_numVars).jsValue())->value(); 851 851 if (value == "undefined") { 852 852 rewindUnaryOp(); -
trunk/JavaScriptCore/interpreter/CallFrame.cpp
r39670 r42989 33 33 JSValuePtr CallFrame::thisValue() 34 34 { 35 return this[codeBlock()->thisRegister()].jsValue( this);35 return this[codeBlock()->thisRegister()].jsValue(); 36 36 } 37 37 -
trunk/JavaScriptCore/interpreter/Interpreter.cpp
r42734 r42989 330 330 return jsUndefined(); 331 331 332 JSValuePtr program = argv[1].jsValue( callFrame);332 JSValuePtr program = argv[1].jsValue(); 333 333 334 334 if (!program.isString()) … … 549 549 #if !ENABLE(JIT) 550 550 if (isCallBytecode(codeBlock->instructions()[bytecodeOffset].u.opcode)) 551 profiler->didExecute(callFrame, callFrame[codeBlock->instructions()[bytecodeOffset + 2].u.operand].jsValue( callFrame));551 profiler->didExecute(callFrame, callFrame[codeBlock->instructions()[bytecodeOffset + 2].u.operand].jsValue()); 552 552 else if (codeBlock->instructions()[bytecodeOffset + 8].u.opcode == getOpcode(op_construct)) 553 profiler->didExecute(callFrame, callFrame[codeBlock->instructions()[bytecodeOffset + 10].u.operand].jsValue( callFrame));553 profiler->didExecute(callFrame, callFrame[codeBlock->instructions()[bytecodeOffset + 10].u.operand].jsValue()); 554 554 #else 555 555 int functionRegisterIndex; 556 556 if (codeBlock->functionRegisterForBytecodeOffset(bytecodeOffset, functionRegisterIndex)) 557 profiler->didExecute(callFrame, callFrame[functionRegisterIndex].jsValue( callFrame));557 profiler->didExecute(callFrame, callFrame[functionRegisterIndex].jsValue()); 558 558 #endif 559 559 } … … 906 906 CodeBlock* codeBlock = callFrame->codeBlock(); 907 907 Identifier& property = codeBlock->identifier((++vPC)->u.operand); 908 JSValuePtr value = callFrame[(++vPC)->u.operand].jsValue( callFrame);908 JSValuePtr value = callFrame[(++vPC)->u.operand].jsValue(); 909 909 JSObject* scope = new (callFrame) JSStaticScopeObject(callFrame, property, value, DontDelete); 910 910 callFrame[dst] = JSValuePtr(scope); … … 1221 1221 */ 1222 1222 int dst = (++vPC)->u.operand; 1223 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue( callFrame);1224 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue( callFrame);1223 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(); 1224 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(); 1225 1225 if (JSFastMath::canDoFastBitwiseOperations(src1, src2)) 1226 1226 callFrame[dst] = JSFastMath::equal(src1, src2); … … 1241 1241 */ 1242 1242 int dst = (++vPC)->u.operand; 1243 JSValuePtr src = callFrame[(++vPC)->u.operand].jsValue( callFrame);1243 JSValuePtr src = callFrame[(++vPC)->u.operand].jsValue(); 1244 1244 1245 1245 if (src.isUndefinedOrNull()) { … … 1261 1261 */ 1262 1262 int dst = (++vPC)->u.operand; 1263 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue( callFrame);1264 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue( callFrame);1263 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(); 1264 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(); 1265 1265 if (JSFastMath::canDoFastBitwiseOperations(src1, src2)) 1266 1266 callFrame[dst] = JSFastMath::notEqual(src1, src2); … … 1281 1281 */ 1282 1282 int dst = (++vPC)->u.operand; 1283 JSValuePtr src = callFrame[(++vPC)->u.operand].jsValue( callFrame);1283 JSValuePtr src = callFrame[(++vPC)->u.operand].jsValue(); 1284 1284 1285 1285 if (src.isUndefinedOrNull()) { … … 1301 1301 */ 1302 1302 int dst = (++vPC)->u.operand; 1303 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue( callFrame);1304 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue( callFrame);1303 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(); 1304 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(); 1305 1305 callFrame[dst] = jsBoolean(JSValuePtr::strictEqual(src1, src2)); 1306 1306 … … 1316 1316 */ 1317 1317 int dst = (++vPC)->u.operand; 1318 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue( callFrame);1319 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue( callFrame);1318 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(); 1319 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(); 1320 1320 callFrame[dst] = jsBoolean(!JSValuePtr::strictEqual(src1, src2)); 1321 1321 … … 1331 1331 */ 1332 1332 int dst = (++vPC)->u.operand; 1333 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue( callFrame);1334 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue( callFrame);1333 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(); 1334 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(); 1335 1335 JSValuePtr result = jsBoolean(jsLess(callFrame, src1, src2)); 1336 1336 CHECK_FOR_EXCEPTION(); … … 1348 1348 */ 1349 1349 int dst = (++vPC)->u.operand; 1350 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue( callFrame);1351 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue( callFrame);1350 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(); 1351 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(); 1352 1352 JSValuePtr result = jsBoolean(jsLessEq(callFrame, src1, src2)); 1353 1353 CHECK_FOR_EXCEPTION(); … … 1364 1364 */ 1365 1365 int srcDst = (++vPC)->u.operand; 1366 JSValuePtr v = callFrame[srcDst].jsValue( callFrame);1366 JSValuePtr v = callFrame[srcDst].jsValue(); 1367 1367 if (JSFastMath::canDoFastAdditiveOperations(v)) 1368 1368 callFrame[srcDst] = JSValuePtr(JSFastMath::incImmediateNumber(v)); … … 1383 1383 */ 1384 1384 int srcDst = (++vPC)->u.operand; 1385 JSValuePtr v = callFrame[srcDst].jsValue( callFrame);1385 JSValuePtr v = callFrame[srcDst].jsValue(); 1386 1386 if (JSFastMath::canDoFastAdditiveOperations(v)) 1387 1387 callFrame[srcDst] = JSValuePtr(JSFastMath::decImmediateNumber(v)); … … 1404 1404 int dst = (++vPC)->u.operand; 1405 1405 int srcDst = (++vPC)->u.operand; 1406 JSValuePtr v = callFrame[srcDst].jsValue( callFrame);1406 JSValuePtr v = callFrame[srcDst].jsValue(); 1407 1407 if (JSFastMath::canDoFastAdditiveOperations(v)) { 1408 1408 callFrame[dst] = v; 1409 1409 callFrame[srcDst] = JSValuePtr(JSFastMath::incImmediateNumber(v)); 1410 1410 } else { 1411 JSValuePtr number = callFrame[srcDst].jsValue( callFrame).toJSNumber(callFrame);1411 JSValuePtr number = callFrame[srcDst].jsValue().toJSNumber(callFrame); 1412 1412 CHECK_FOR_EXCEPTION(); 1413 1413 callFrame[dst] = number; … … 1427 1427 int dst = (++vPC)->u.operand; 1428 1428 int srcDst = (++vPC)->u.operand; 1429 JSValuePtr v = callFrame[srcDst].jsValue( callFrame);1429 JSValuePtr v = callFrame[srcDst].jsValue(); 1430 1430 if (JSFastMath::canDoFastAdditiveOperations(v)) { 1431 1431 callFrame[dst] = v; 1432 1432 callFrame[srcDst] = JSValuePtr(JSFastMath::decImmediateNumber(v)); 1433 1433 } else { 1434 JSValuePtr number = callFrame[srcDst].jsValue( callFrame).toJSNumber(callFrame);1434 JSValuePtr number = callFrame[srcDst].jsValue().toJSNumber(callFrame); 1435 1435 CHECK_FOR_EXCEPTION(); 1436 1436 callFrame[dst] = number; … … 1450 1450 int src = (++vPC)->u.operand; 1451 1451 1452 JSValuePtr srcVal = callFrame[src].jsValue( callFrame);1452 JSValuePtr srcVal = callFrame[src].jsValue(); 1453 1453 1454 1454 if (LIKELY(srcVal.isNumber())) … … 1470 1470 */ 1471 1471 int dst = (++vPC)->u.operand; 1472 JSValuePtr src = callFrame[(++vPC)->u.operand].jsValue( callFrame);1472 JSValuePtr src = callFrame[(++vPC)->u.operand].jsValue(); 1473 1473 ++vPC; 1474 1474 double v; … … 1491 1491 */ 1492 1492 int dst = (++vPC)->u.operand; 1493 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue( callFrame);1494 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue( callFrame);1493 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(); 1494 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(); 1495 1495 if (JSFastMath::canDoFastAdditiveOperations(src1, src2)) 1496 1496 callFrame[dst] = JSValuePtr(JSFastMath::addImmediateNumbers(src1, src2)); … … 1510 1510 */ 1511 1511 int dst = (++vPC)->u.operand; 1512 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue( callFrame);1513 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue( callFrame);1512 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(); 1513 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(); 1514 1514 double left; 1515 1515 double right; … … 1540 1540 */ 1541 1541 int dst = (++vPC)->u.operand; 1542 JSValuePtr dividend = callFrame[(++vPC)->u.operand].jsValue( callFrame);1543 JSValuePtr divisor = callFrame[(++vPC)->u.operand].jsValue( callFrame);1542 JSValuePtr dividend = callFrame[(++vPC)->u.operand].jsValue(); 1543 JSValuePtr divisor = callFrame[(++vPC)->u.operand].jsValue(); 1544 1544 double left; 1545 1545 double right; … … 1565 1565 int divisor = (++vPC)->u.operand; 1566 1566 1567 JSValuePtr dividendValue = callFrame[dividend].jsValue( callFrame);1568 JSValuePtr divisorValue = callFrame[divisor].jsValue( callFrame);1567 JSValuePtr dividendValue = callFrame[dividend].jsValue(); 1568 JSValuePtr divisorValue = callFrame[divisor].jsValue(); 1569 1569 1570 1570 if (JSValuePtr::areBothInt32Fast(dividendValue, divisorValue) && divisorValue != js0()) { … … 1593 1593 */ 1594 1594 int dst = (++vPC)->u.operand; 1595 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue( callFrame);1596 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue( callFrame);1595 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(); 1596 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(); 1597 1597 double left; 1598 1598 double right; … … 1617 1617 */ 1618 1618 int dst = (++vPC)->u.operand; 1619 JSValuePtr val = callFrame[(++vPC)->u.operand].jsValue( callFrame);1620 JSValuePtr shift = callFrame[(++vPC)->u.operand].jsValue( callFrame);1619 JSValuePtr val = callFrame[(++vPC)->u.operand].jsValue(); 1620 JSValuePtr shift = callFrame[(++vPC)->u.operand].jsValue(); 1621 1621 int32_t left; 1622 1622 uint32_t right; … … 1642 1642 */ 1643 1643 int dst = (++vPC)->u.operand; 1644 JSValuePtr val = callFrame[(++vPC)->u.operand].jsValue( callFrame);1645 JSValuePtr shift = callFrame[(++vPC)->u.operand].jsValue( callFrame);1644 JSValuePtr val = callFrame[(++vPC)->u.operand].jsValue(); 1645 JSValuePtr shift = callFrame[(++vPC)->u.operand].jsValue(); 1646 1646 int32_t left; 1647 1647 uint32_t right; … … 1667 1667 */ 1668 1668 int dst = (++vPC)->u.operand; 1669 JSValuePtr val = callFrame[(++vPC)->u.operand].jsValue( callFrame);1670 JSValuePtr shift = callFrame[(++vPC)->u.operand].jsValue( callFrame);1669 JSValuePtr val = callFrame[(++vPC)->u.operand].jsValue(); 1670 JSValuePtr shift = callFrame[(++vPC)->u.operand].jsValue(); 1671 1671 if (JSFastMath::canDoFastUrshift(val, shift)) 1672 1672 callFrame[dst] = JSValuePtr(JSFastMath::rightShiftImmediateNumbers(val, shift)); … … 1688 1688 */ 1689 1689 int dst = (++vPC)->u.operand; 1690 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue( callFrame);1691 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue( callFrame);1690 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(); 1691 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(); 1692 1692 int32_t left; 1693 1693 int32_t right; … … 1713 1713 */ 1714 1714 int dst = (++vPC)->u.operand; 1715 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue( callFrame);1716 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue( callFrame);1715 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(); 1716 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(); 1717 1717 int32_t left; 1718 1718 int32_t right; … … 1738 1738 */ 1739 1739 int dst = (++vPC)->u.operand; 1740 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue( callFrame);1741 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue( callFrame);1740 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(); 1741 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(); 1742 1742 int32_t left; 1743 1743 int32_t right; … … 1762 1762 */ 1763 1763 int dst = (++vPC)->u.operand; 1764 JSValuePtr src = callFrame[(++vPC)->u.operand].jsValue( callFrame);1764 JSValuePtr src = callFrame[(++vPC)->u.operand].jsValue(); 1765 1765 int32_t value; 1766 1766 if (src.numberToInt32(value)) … … 1782 1782 int dst = (++vPC)->u.operand; 1783 1783 int src = (++vPC)->u.operand; 1784 JSValuePtr result = jsBoolean(!callFrame[src].jsValue( callFrame).toBoolean(callFrame));1784 JSValuePtr result = jsBoolean(!callFrame[src].jsValue().toBoolean(callFrame)); 1785 1785 CHECK_FOR_EXCEPTION(); 1786 1786 callFrame[dst] = result; … … 1807 1807 int baseProto = vPC[4].u.operand; 1808 1808 1809 JSValuePtr baseVal = callFrame[base].jsValue( callFrame);1809 JSValuePtr baseVal = callFrame[base].jsValue(); 1810 1810 1811 1811 if (isNotObject(callFrame, true, callFrame->codeBlock(), vPC, baseVal, exceptionValue)) … … 1814 1814 JSObject* baseObj = asObject(baseVal); 1815 1815 if (baseObj->structure()->typeInfo().implementsHasInstance()) { 1816 bool result = baseObj->hasInstance(callFrame, callFrame[value].jsValue( callFrame), callFrame[baseProto].jsValue(callFrame));1816 bool result = baseObj->hasInstance(callFrame, callFrame[value].jsValue(), callFrame[baseProto].jsValue()); 1817 1817 CHECK_FOR_EXCEPTION(); 1818 1818 callFrame[dst] = jsBoolean(result); … … 1831 1831 int dst = (++vPC)->u.operand; 1832 1832 int src = (++vPC)->u.operand; 1833 callFrame[dst] = JSValuePtr(jsTypeStringForValue(callFrame, callFrame[src].jsValue( callFrame)));1833 callFrame[dst] = JSValuePtr(jsTypeStringForValue(callFrame, callFrame[src].jsValue())); 1834 1834 1835 1835 ++vPC; … … 1845 1845 int dst = (++vPC)->u.operand; 1846 1846 int src = (++vPC)->u.operand; 1847 JSValuePtr v = callFrame[src].jsValue( callFrame);1847 JSValuePtr v = callFrame[src].jsValue(); 1848 1848 callFrame[dst] = jsBoolean(v.isCell() ? v.asCell()->structure()->typeInfo().masqueradesAsUndefined() : v.isUndefined()); 1849 1849 … … 1860 1860 int dst = (++vPC)->u.operand; 1861 1861 int src = (++vPC)->u.operand; 1862 callFrame[dst] = jsBoolean(callFrame[src].jsValue( callFrame).isBoolean());1862 callFrame[dst] = jsBoolean(callFrame[src].jsValue().isBoolean()); 1863 1863 1864 1864 ++vPC; … … 1874 1874 int dst = (++vPC)->u.operand; 1875 1875 int src = (++vPC)->u.operand; 1876 callFrame[dst] = jsBoolean(callFrame[src].jsValue( callFrame).isNumber());1876 callFrame[dst] = jsBoolean(callFrame[src].jsValue().isNumber()); 1877 1877 1878 1878 ++vPC; … … 1888 1888 int dst = (++vPC)->u.operand; 1889 1889 int src = (++vPC)->u.operand; 1890 callFrame[dst] = jsBoolean(callFrame[src].jsValue( callFrame).isString());1890 callFrame[dst] = jsBoolean(callFrame[src].jsValue().isString()); 1891 1891 1892 1892 ++vPC; … … 1902 1902 int dst = (++vPC)->u.operand; 1903 1903 int src = (++vPC)->u.operand; 1904 callFrame[dst] = jsBoolean(jsIsObjectType(callFrame[src].jsValue( callFrame)));1904 callFrame[dst] = jsBoolean(jsIsObjectType(callFrame[src].jsValue())); 1905 1905 1906 1906 ++vPC; … … 1916 1916 int dst = (++vPC)->u.operand; 1917 1917 int src = (++vPC)->u.operand; 1918 callFrame[dst] = jsBoolean(jsIsFunctionType(callFrame[src].jsValue( callFrame)));1918 callFrame[dst] = jsBoolean(jsIsFunctionType(callFrame[src].jsValue())); 1919 1919 1920 1920 ++vPC; … … 1934 1934 int base = (++vPC)->u.operand; 1935 1935 1936 JSValuePtr baseVal = callFrame[base].jsValue( callFrame);1936 JSValuePtr baseVal = callFrame[base].jsValue(); 1937 1937 if (isNotObject(callFrame, false, callFrame->codeBlock(), vPC, baseVal, exceptionValue)) 1938 1938 goto vm_throw; … … 1940 1940 JSObject* baseObj = asObject(baseVal); 1941 1941 1942 JSValuePtr propName = callFrame[property].jsValue( callFrame);1942 JSValuePtr propName = callFrame[property].jsValue(); 1943 1943 1944 1944 uint32_t i; … … 2020 2020 int value = (++vPC)->u.operand; 2021 2021 2022 scope->registerAt(index) = JSValuePtr(callFrame[value].jsValue( callFrame));2022 scope->registerAt(index) = JSValuePtr(callFrame[value].jsValue()); 2023 2023 ++vPC; 2024 2024 NEXT_INSTRUCTION(); … … 2068 2068 ASSERT((*iter)->isVariableObject()); 2069 2069 JSVariableObject* scope = static_cast<JSVariableObject*>(*iter); 2070 scope->registerAt(index) = JSValuePtr(callFrame[value].jsValue( callFrame));2070 scope->registerAt(index) = JSValuePtr(callFrame[value].jsValue()); 2071 2071 ++vPC; 2072 2072 NEXT_INSTRUCTION(); … … 2136 2136 CodeBlock* codeBlock = callFrame->codeBlock(); 2137 2137 Identifier& ident = codeBlock->identifier(property); 2138 JSValuePtr baseValue = callFrame[base].jsValue( callFrame);2138 JSValuePtr baseValue = callFrame[base].jsValue(); 2139 2139 PropertySlot slot(baseValue); 2140 2140 JSValuePtr result = baseValue.get(callFrame, ident, slot); … … 2155 2155 */ 2156 2156 int base = vPC[2].u.operand; 2157 JSValuePtr baseValue = callFrame[base].jsValue( callFrame);2157 JSValuePtr baseValue = callFrame[base].jsValue(); 2158 2158 2159 2159 if (LIKELY(baseValue.isCell())) { … … 2186 2186 */ 2187 2187 int base = vPC[2].u.operand; 2188 JSValuePtr baseValue = callFrame[base].jsValue( callFrame);2188 JSValuePtr baseValue = callFrame[base].jsValue(); 2189 2189 2190 2190 if (LIKELY(baseValue.isCell())) { … … 2235 2235 */ 2236 2236 int base = vPC[2].u.operand; 2237 JSValuePtr baseValue = callFrame[base].jsValue( callFrame);2237 JSValuePtr baseValue = callFrame[base].jsValue(); 2238 2238 2239 2239 if (LIKELY(baseValue.isCell())) { … … 2283 2283 2284 2284 Identifier& ident = callFrame->codeBlock()->identifier(property); 2285 JSValuePtr baseValue = callFrame[base].jsValue( callFrame);2285 JSValuePtr baseValue = callFrame[base].jsValue(); 2286 2286 PropertySlot slot(baseValue); 2287 2287 JSValuePtr result = baseValue.get(callFrame, ident, slot); … … 2301 2301 2302 2302 int base = vPC[2].u.operand; 2303 JSValuePtr baseValue = callFrame[base].jsValue( callFrame);2303 JSValuePtr baseValue = callFrame[base].jsValue(); 2304 2304 if (LIKELY(isJSArray(globalData, baseValue))) { 2305 2305 int dst = vPC[1].u.operand; … … 2321 2321 2322 2322 int base = vPC[2].u.operand; 2323 JSValuePtr baseValue = callFrame[base].jsValue( callFrame);2323 JSValuePtr baseValue = callFrame[base].jsValue(); 2324 2324 if (LIKELY(isJSString(globalData, baseValue))) { 2325 2325 int dst = vPC[1].u.operand; … … 2347 2347 2348 2348 CodeBlock* codeBlock = callFrame->codeBlock(); 2349 JSValuePtr baseValue = callFrame[base].jsValue( callFrame);2349 JSValuePtr baseValue = callFrame[base].jsValue(); 2350 2350 Identifier& ident = codeBlock->identifier(property); 2351 2351 PutPropertySlot slot; 2352 baseValue.put(callFrame, ident, callFrame[value].jsValue( callFrame), slot);2352 baseValue.put(callFrame, ident, callFrame[value].jsValue(), slot); 2353 2353 CHECK_FOR_EXCEPTION(); 2354 2354 … … 2370 2370 */ 2371 2371 int base = vPC[1].u.operand; 2372 JSValuePtr baseValue = callFrame[base].jsValue( callFrame);2372 JSValuePtr baseValue = callFrame[base].jsValue(); 2373 2373 2374 2374 if (LIKELY(baseValue.isCell())) { … … 2398 2398 unsigned offset = vPC[7].u.operand; 2399 2399 ASSERT(baseObject->offsetForLocation(baseObject->getDirectLocation(callFrame->codeBlock()->identifier(vPC[2].u.operand))) == offset); 2400 baseObject->putDirectOffset(offset, callFrame[value].jsValue( callFrame));2400 baseObject->putDirectOffset(offset, callFrame[value].jsValue()); 2401 2401 2402 2402 vPC += 8; … … 2420 2420 */ 2421 2421 int base = vPC[1].u.operand; 2422 JSValuePtr baseValue = callFrame[base].jsValue( callFrame);2422 JSValuePtr baseValue = callFrame[base].jsValue(); 2423 2423 2424 2424 if (LIKELY(baseValue.isCell())) { … … 2433 2433 2434 2434 ASSERT(baseObject->offsetForLocation(baseObject->getDirectLocation(callFrame->codeBlock()->identifier(vPC[2].u.operand))) == offset); 2435 baseObject->putDirectOffset(offset, callFrame[value].jsValue( callFrame));2435 baseObject->putDirectOffset(offset, callFrame[value].jsValue()); 2436 2436 2437 2437 vPC += 8; … … 2456 2456 int value = vPC[3].u.operand; 2457 2457 2458 JSValuePtr baseValue = callFrame[base].jsValue( callFrame);2458 JSValuePtr baseValue = callFrame[base].jsValue(); 2459 2459 Identifier& ident = callFrame->codeBlock()->identifier(property); 2460 2460 PutPropertySlot slot; 2461 baseValue.put(callFrame, ident, callFrame[value].jsValue( callFrame), slot);2461 baseValue.put(callFrame, ident, callFrame[value].jsValue(), slot); 2462 2462 CHECK_FOR_EXCEPTION(); 2463 2463 … … 2477 2477 int property = (++vPC)->u.operand; 2478 2478 2479 JSObject* baseObj = callFrame[base].jsValue( callFrame).toObject(callFrame);2479 JSObject* baseObj = callFrame[base].jsValue().toObject(callFrame); 2480 2480 Identifier& ident = callFrame->codeBlock()->identifier(property); 2481 2481 JSValuePtr result = jsBoolean(baseObj->deleteProperty(callFrame, ident)); … … 2497 2497 int property = (++vPC)->u.operand; 2498 2498 2499 JSValuePtr baseValue = callFrame[base].jsValue( callFrame);2500 JSValuePtr subscript = callFrame[property].jsValue( callFrame);2499 JSValuePtr baseValue = callFrame[base].jsValue(); 2500 JSValuePtr subscript = callFrame[property].jsValue(); 2501 2501 2502 2502 JSValuePtr result; … … 2541 2541 int value = (++vPC)->u.operand; 2542 2542 2543 JSValuePtr baseValue = callFrame[base].jsValue( callFrame);2544 JSValuePtr subscript = callFrame[property].jsValue( callFrame);2543 JSValuePtr baseValue = callFrame[base].jsValue(); 2544 JSValuePtr subscript = callFrame[property].jsValue(); 2545 2545 2546 2546 if (LIKELY(subscript.isUInt32Fast())) { … … 2549 2549 JSArray* jsArray = asArray(baseValue); 2550 2550 if (jsArray->canSetIndex(i)) 2551 jsArray->setIndex(i, callFrame[value].jsValue( callFrame));2551 jsArray->setIndex(i, callFrame[value].jsValue()); 2552 2552 else 2553 jsArray->JSArray::put(callFrame, i, callFrame[value].jsValue( callFrame));2553 jsArray->JSArray::put(callFrame, i, callFrame[value].jsValue()); 2554 2554 } else if (isJSByteArray(globalData, baseValue) && asByteArray(baseValue)->canAccessIndex(i)) { 2555 2555 JSByteArray* jsByteArray = asByteArray(baseValue); 2556 2556 double dValue = 0; 2557 JSValuePtr jsValue = callFrame[value].jsValue( callFrame);2557 JSValuePtr jsValue = callFrame[value].jsValue(); 2558 2558 if (jsValue.isInt32Fast()) 2559 2559 jsByteArray->setIndex(i, jsValue.getInt32Fast()); … … 2563 2563 baseValue.put(callFrame, i, jsValue); 2564 2564 } else 2565 baseValue.put(callFrame, i, callFrame[value].jsValue( callFrame));2565 baseValue.put(callFrame, i, callFrame[value].jsValue()); 2566 2566 } else { 2567 2567 Identifier property(callFrame, subscript.toString(callFrame)); 2568 2568 if (!globalData->exception) { // Don't put to an object if toString threw an exception. 2569 2569 PutPropertySlot slot; 2570 baseValue.put(callFrame, property, callFrame[value].jsValue( callFrame), slot);2570 baseValue.put(callFrame, property, callFrame[value].jsValue(), slot); 2571 2571 } 2572 2572 } … … 2588 2588 int property = (++vPC)->u.operand; 2589 2589 2590 JSObject* baseObj = callFrame[base].jsValue( callFrame).toObject(callFrame); // may throw2591 2592 JSValuePtr subscript = callFrame[property].jsValue( callFrame);2590 JSObject* baseObj = callFrame[base].jsValue().toObject(callFrame); // may throw 2591 2592 JSValuePtr subscript = callFrame[property].jsValue(); 2593 2593 JSValuePtr result; 2594 2594 uint32_t i; … … 2623 2623 int value = (++vPC)->u.operand; 2624 2624 2625 callFrame[base].jsValue( callFrame).put(callFrame, property, callFrame[value].jsValue(callFrame));2625 callFrame[base].jsValue().put(callFrame, property, callFrame[value].jsValue()); 2626 2626 2627 2627 ++vPC; … … 2670 2670 int cond = (++vPC)->u.operand; 2671 2671 int target = (++vPC)->u.operand; 2672 if (callFrame[cond].jsValue( callFrame).toBoolean(callFrame)) {2672 if (callFrame[cond].jsValue().toBoolean(callFrame)) { 2673 2673 vPC += target; 2674 2674 CHECK_FOR_TIMEOUT(); … … 2687 2687 int cond = (++vPC)->u.operand; 2688 2688 int target = (++vPC)->u.operand; 2689 if (callFrame[cond].jsValue( callFrame).toBoolean(callFrame)) {2689 if (callFrame[cond].jsValue().toBoolean(callFrame)) { 2690 2690 vPC += target; 2691 2691 NEXT_INSTRUCTION(); … … 2703 2703 int cond = (++vPC)->u.operand; 2704 2704 int target = (++vPC)->u.operand; 2705 if (!callFrame[cond].jsValue( callFrame).toBoolean(callFrame)) {2705 if (!callFrame[cond].jsValue().toBoolean(callFrame)) { 2706 2706 vPC += target; 2707 2707 NEXT_INSTRUCTION(); … … 2719 2719 int src = (++vPC)->u.operand; 2720 2720 int target = (++vPC)->u.operand; 2721 JSValuePtr srcValue = callFrame[src].jsValue( callFrame);2721 JSValuePtr srcValue = callFrame[src].jsValue(); 2722 2722 2723 2723 if (srcValue.isUndefinedOrNull() || (srcValue.isCell() && srcValue.asCell()->structure()->typeInfo().masqueradesAsUndefined())) { … … 2737 2737 int src = (++vPC)->u.operand; 2738 2738 int target = (++vPC)->u.operand; 2739 JSValuePtr srcValue = callFrame[src].jsValue( callFrame);2739 JSValuePtr srcValue = callFrame[src].jsValue(); 2740 2740 2741 2741 if (!srcValue.isUndefinedOrNull() || (srcValue.isCell() && !srcValue.asCell()->structure()->typeInfo().masqueradesAsUndefined())) { … … 2756 2756 JSValuePtr ptr = JSValuePtr((++vPC)->u.jsCell); 2757 2757 int target = (++vPC)->u.operand; 2758 JSValuePtr srcValue = callFrame[src].jsValue( callFrame);2758 JSValuePtr srcValue = callFrame[src].jsValue(); 2759 2759 if (srcValue != ptr) { 2760 2760 vPC += target; … … 2776 2776 the JS timeout is reached. 2777 2777 */ 2778 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue( callFrame);2779 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue( callFrame);2778 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(); 2779 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(); 2780 2780 int target = (++vPC)->u.operand; 2781 2781 … … 2803 2803 the JS timeout is reached. 2804 2804 */ 2805 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue( callFrame);2806 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue( callFrame);2805 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(); 2806 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(); 2807 2807 int target = (++vPC)->u.operand; 2808 2808 … … 2827 2827 result of the comparison is false. 2828 2828 */ 2829 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue( callFrame);2830 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue( callFrame);2829 JSValuePtr src1 = callFrame[(++vPC)->u.operand].jsValue(); 2830 JSValuePtr src2 = callFrame[(++vPC)->u.operand].jsValue(); 2831 2831 int target = (++vPC)->u.operand; 2832 2832 … … 2853 2853 int tableIndex = (++vPC)->u.operand; 2854 2854 int defaultOffset = (++vPC)->u.operand; 2855 JSValuePtr scrutinee = callFrame[(++vPC)->u.operand].jsValue( callFrame);2855 JSValuePtr scrutinee = callFrame[(++vPC)->u.operand].jsValue(); 2856 2856 if (scrutinee.isInt32Fast()) 2857 2857 vPC += callFrame->codeBlock()->immediateSwitchJumpTable(tableIndex).offsetForValue(scrutinee.getInt32Fast(), defaultOffset); … … 2877 2877 int tableIndex = (++vPC)->u.operand; 2878 2878 int defaultOffset = (++vPC)->u.operand; 2879 JSValuePtr scrutinee = callFrame[(++vPC)->u.operand].jsValue( callFrame);2879 JSValuePtr scrutinee = callFrame[(++vPC)->u.operand].jsValue(); 2880 2880 if (!scrutinee.isString()) 2881 2881 vPC += defaultOffset; … … 2900 2900 int tableIndex = (++vPC)->u.operand; 2901 2901 int defaultOffset = (++vPC)->u.operand; 2902 JSValuePtr scrutinee = callFrame[(++vPC)->u.operand].jsValue( callFrame);2902 JSValuePtr scrutinee = callFrame[(++vPC)->u.operand].jsValue(); 2903 2903 if (!scrutinee.isString()) 2904 2904 vPC += defaultOffset; … … 2956 2956 int registerOffset = vPC[4].u.operand; 2957 2957 2958 JSValuePtr funcVal = callFrame[func].jsValue( callFrame);2958 JSValuePtr funcVal = callFrame[func].jsValue(); 2959 2959 2960 2960 Register* newCallFrame = callFrame->registers() + registerOffset; 2961 2961 Register* argv = newCallFrame - RegisterFile::CallFrameHeaderSize - argCount; 2962 JSValuePtr thisValue = argv[0].jsValue( callFrame);2962 JSValuePtr thisValue = argv[0].jsValue(); 2963 2963 JSGlobalObject* globalObject = callFrame->scopeChain()->globalObject(); 2964 2964 … … 2993 2993 int registerOffset = vPC[4].u.operand; 2994 2994 2995 JSValuePtr v = callFrame[func].jsValue( callFrame);2995 JSValuePtr v = callFrame[func].jsValue(); 2996 2996 2997 2997 CallData callData; … … 3031 3031 3032 3032 // FIXME: All host methods should be calling toThisObject, but this is not presently the case. 3033 JSValuePtr thisValue = thisRegister->jsValue( callFrame);3033 JSValuePtr thisValue = thisRegister->jsValue(); 3034 3034 if (thisValue == jsNull()) 3035 3035 thisValue = callFrame->globalThisValue(); … … 3057 3057 int argsOffset = (++vPC)->u.operand; 3058 3058 3059 JSValuePtr arguments = callFrame[argsOffset].jsValue( callFrame);3059 JSValuePtr arguments = callFrame[argsOffset].jsValue(); 3060 3060 uint32_t argCount = 0; 3061 3061 if (!arguments.isUndefinedOrNull()) { … … 3127 3127 int registerOffset = vPC[4].u.operand; 3128 3128 3129 JSValuePtr v = callFrame[func].jsValue( callFrame);3129 JSValuePtr v = callFrame[func].jsValue(); 3130 3130 int argCount = callFrame[argCountReg].i(); 3131 3131 registerOffset += argCount; … … 3166 3166 3167 3167 // FIXME: All host methods should be calling toThisObject, but this is not presently the case. 3168 JSValuePtr thisValue = thisRegister->jsValue( callFrame);3168 JSValuePtr thisValue = thisRegister->jsValue(); 3169 3169 if (thisValue == jsNull()) 3170 3170 thisValue = callFrame->globalThisValue(); … … 3204 3204 ASSERT(callFrame->codeBlock()->needsFullScopeChain()); 3205 3205 3206 asActivation(callFrame[src]. getJSValue())->copyRegisters(callFrame->optionalCalleeArguments());3206 asActivation(callFrame[src].jsValue())->copyRegisters(callFrame->optionalCalleeArguments()); 3207 3207 3208 3208 ++vPC; … … 3244 3244 callFrame->scopeChain()->deref(); 3245 3245 3246 JSValuePtr returnValue = callFrame[result].jsValue( callFrame);3246 JSValuePtr returnValue = callFrame[result].jsValue(); 3247 3247 3248 3248 vPC = callFrame->returnPC(); … … 3323 3323 3324 3324 int thisRegister = (++vPC)->u.operand; 3325 JSValuePtr thisVal = callFrame[thisRegister]. getJSValue();3325 JSValuePtr thisVal = callFrame[thisRegister].jsValue(); 3326 3326 if (thisVal.needsThisConversion()) 3327 3327 callFrame[thisRegister] = JSValuePtr(thisVal.toThisObject(callFrame)); … … 3370 3370 int thisRegister = vPC[6].u.operand; 3371 3371 3372 JSValuePtr v = callFrame[func].jsValue( callFrame);3372 JSValuePtr v = callFrame[func].jsValue(); 3373 3373 3374 3374 ConstructData constructData; … … 3381 3381 3382 3382 Structure* structure; 3383 JSValuePtr prototype = callFrame[proto].jsValue( callFrame);3383 JSValuePtr prototype = callFrame[proto].jsValue(); 3384 3384 if (prototype.isObject()) 3385 3385 structure = asObject(prototype)->inheritorID(); … … 3441 3441 3442 3442 int dst = vPC[1].u.operand; 3443 if (LIKELY(callFrame[dst].jsValue( callFrame).isObject())) {3443 if (LIKELY(callFrame[dst].jsValue().isObject())) { 3444 3444 vPC += 3; 3445 3445 NEXT_INSTRUCTION(); … … 3460 3460 */ 3461 3461 int scope = (++vPC)->u.operand; 3462 JSValuePtr v = callFrame[scope].jsValue( callFrame);3462 JSValuePtr v = callFrame[scope].jsValue(); 3463 3463 JSObject* o = v.toObject(callFrame); 3464 3464 CHECK_FOR_EXCEPTION(); … … 3491 3491 int base = (++vPC)->u.operand; 3492 3492 3493 callFrame[dst] = JSPropertyNameIterator::create(callFrame, callFrame[base].jsValue( callFrame));3493 callFrame[dst] = JSPropertyNameIterator::create(callFrame, callFrame[base].jsValue()); 3494 3494 ++vPC; 3495 3495 NEXT_INSTRUCTION(); … … 3585 3585 3586 3586 int ex = (++vPC)->u.operand; 3587 exceptionValue = callFrame[ex].jsValue( callFrame);3587 exceptionValue = callFrame[ex].jsValue(); 3588 3588 3589 3589 handler = throwException(callFrame, exceptionValue, vPC - callFrame->codeBlock()->instructions().begin(), true); … … 3639 3639 } 3640 3640 int result = (++vPC)->u.operand; 3641 return callFrame[result].jsValue( callFrame);3641 return callFrame[result].jsValue(); 3642 3642 } 3643 3643 DEFINE_OPCODE(op_put_getter) { … … 3656 3656 int function = (++vPC)->u.operand; 3657 3657 3658 ASSERT(callFrame[base].jsValue( callFrame).isObject());3659 JSObject* baseObj = asObject(callFrame[base].jsValue( callFrame));3658 ASSERT(callFrame[base].jsValue().isObject()); 3659 JSObject* baseObj = asObject(callFrame[base].jsValue()); 3660 3660 Identifier& ident = callFrame->codeBlock()->identifier(property); 3661 ASSERT(callFrame[function].jsValue( callFrame).isObject());3662 baseObj->defineGetter(callFrame, ident, asObject(callFrame[function].jsValue( callFrame)));3661 ASSERT(callFrame[function].jsValue().isObject()); 3662 baseObj->defineGetter(callFrame, ident, asObject(callFrame[function].jsValue())); 3663 3663 3664 3664 ++vPC; … … 3680 3680 int function = (++vPC)->u.operand; 3681 3681 3682 ASSERT(callFrame[base].jsValue( callFrame).isObject());3683 JSObject* baseObj = asObject(callFrame[base].jsValue( callFrame));3682 ASSERT(callFrame[base].jsValue().isObject()); 3683 JSObject* baseObj = asObject(callFrame[base].jsValue()); 3684 3684 Identifier& ident = callFrame->codeBlock()->identifier(property); 3685 ASSERT(callFrame[function].jsValue( callFrame).isObject());3686 baseObj->defineSetter(callFrame, ident, asObject(callFrame[function].jsValue( callFrame)));3685 ASSERT(callFrame[function].jsValue().isObject()); 3686 baseObj->defineSetter(callFrame, ident, asObject(callFrame[function].jsValue())); 3687 3687 3688 3688 ++vPC; … … 3737 3737 3738 3738 if (*enabledProfilerReference) 3739 (*enabledProfilerReference)->willExecute(callFrame, callFrame[function].jsValue( callFrame));3739 (*enabledProfilerReference)->willExecute(callFrame, callFrame[function].jsValue()); 3740 3740 3741 3741 vPC += 2; … … 3751 3751 3752 3752 if (*enabledProfilerReference) 3753 (*enabledProfilerReference)->didExecute(callFrame, callFrame[function].jsValue( callFrame));3753 (*enabledProfilerReference)->didExecute(callFrame, callFrame[function].jsValue()); 3754 3754 3755 3755 vPC += 2; … … 3793 3793 SymbolTable& symbolTable = codeBlock->symbolTable(); 3794 3794 int argumentsIndex = symbolTable.get(functionCallFrame->propertyNames().arguments.ustring().rep()).getIndex(); 3795 return functionCallFrame[argumentsIndex].jsValue( callFrame);3795 return functionCallFrame[argumentsIndex].jsValue(); 3796 3796 } 3797 3797 -
trunk/JavaScriptCore/interpreter/Register.h
r41126 r42989 52 52 Register(JSValuePtr); 53 53 54 JSValuePtr jsValue(CallFrame*) const; 55 JSValuePtr getJSValue() const; 54 JSValuePtr jsValue() const; 56 55 57 56 bool marked() const; … … 102 101 Instruction* vPC; 103 102 } u; 104 103 }; 104 105 ALWAYS_INLINE Register::Register() 106 { 105 107 #ifndef NDEBUG 106 enum {107 EmptyType,108 109 IntType,110 ValueType,111 112 ActivationType,113 ArgumentsType,114 CallFrameType,115 CodeBlockType,116 FunctionType,117 InstructionType,118 PropertyNameIteratorType,119 RegisterType,120 ScopeChainNodeType121 } m_type;122 #endif123 };124 125 #ifndef NDEBUG126 #define SET_TYPE(type) m_type = (type)127 // FIXME: The CTI code to put value into registers doesn't set m_type.128 // Once it does, we can turn this assertion back on.129 #define ASSERT_TYPE(type)130 #else131 #define SET_TYPE(type)132 #define ASSERT_TYPE(type)133 #endif134 135 ALWAYS_INLINE Register::Register()136 {137 #ifndef NDEBUG138 SET_TYPE(EmptyType);139 108 u.value = JSValuePtr::encode(noValue()); 140 109 #endif … … 143 112 ALWAYS_INLINE Register::Register(JSValuePtr v) 144 113 { 145 SET_TYPE(ValueType);146 114 u.value = JSValuePtr::encode(v); 147 115 } 148 116 149 // This function is scaffolding for legacy clients. It will eventually go away. 150 ALWAYS_INLINE JSValuePtr Register::jsValue(CallFrame*) const 151 { 152 // Once registers hold doubles, this function will allocate a JSValue* 153 // if the register doesn't hold one already. 154 ASSERT_TYPE(ValueType); 117 ALWAYS_INLINE JSValuePtr Register::jsValue() const 118 { 155 119 return JSValuePtr::decode(u.value); 156 120 } 157 121 158 ALWAYS_INLINE JSValuePtr Register::getJSValue() const159 {160 ASSERT_TYPE(JSValueType);161 return JSValuePtr::decode(u.value);162 }163 164 122 ALWAYS_INLINE bool Register::marked() const 165 123 { 166 return getJSValue().marked();124 return jsValue().marked(); 167 125 } 168 126 169 127 ALWAYS_INLINE void Register::mark() 170 128 { 171 getJSValue().mark();129 jsValue().mark(); 172 130 } 173 131 … … 176 134 ALWAYS_INLINE Register::Register(Arguments* arguments) 177 135 { 178 SET_TYPE(ArgumentsType);179 136 u.arguments = arguments; 180 137 } … … 182 139 ALWAYS_INLINE Register::Register(JSActivation* activation) 183 140 { 184 SET_TYPE(ActivationType);185 141 u.activation = activation; 186 142 } … … 188 144 ALWAYS_INLINE Register::Register(CallFrame* callFrame) 189 145 { 190 SET_TYPE(CallFrameType);191 146 u.callFrame = callFrame; 192 147 } … … 194 149 ALWAYS_INLINE Register::Register(CodeBlock* codeBlock) 195 150 { 196 SET_TYPE(CodeBlockType);197 151 u.codeBlock = codeBlock; 198 152 } … … 200 154 ALWAYS_INLINE Register::Register(JSFunction* function) 201 155 { 202 SET_TYPE(FunctionType);203 156 u.function = function; 204 157 } … … 206 159 ALWAYS_INLINE Register::Register(Instruction* vPC) 207 160 { 208 SET_TYPE(InstructionType);209 161 u.vPC = vPC; 210 162 } … … 212 164 ALWAYS_INLINE Register::Register(ScopeChainNode* scopeChain) 213 165 { 214 SET_TYPE(ScopeChainNodeType);215 166 u.scopeChain = scopeChain; 216 167 } … … 218 169 ALWAYS_INLINE Register::Register(JSPropertyNameIterator* propertyNameIterator) 219 170 { 220 SET_TYPE(PropertyNameIteratorType);221 171 u.propertyNameIterator = propertyNameIterator; 222 172 } … … 224 174 ALWAYS_INLINE Register::Register(intptr_t i) 225 175 { 226 SET_TYPE(IntType);227 176 u.i = i; 228 177 } … … 230 179 ALWAYS_INLINE intptr_t Register::i() const 231 180 { 232 ASSERT_TYPE(IntType);233 181 return u.i; 234 182 } … … 241 189 ALWAYS_INLINE JSActivation* Register::activation() const 242 190 { 243 ASSERT_TYPE(ActivationType);244 191 return u.activation; 245 192 } … … 247 194 ALWAYS_INLINE Arguments* Register::arguments() const 248 195 { 249 ASSERT_TYPE(ArgumentsType);250 196 return u.arguments; 251 197 } … … 253 199 ALWAYS_INLINE CallFrame* Register::callFrame() const 254 200 { 255 ASSERT_TYPE(CallFrameType);256 201 return u.callFrame; 257 202 } … … 259 204 ALWAYS_INLINE CodeBlock* Register::codeBlock() const 260 205 { 261 ASSERT_TYPE(CodeBlockType);262 206 return u.codeBlock; 263 207 } … … 265 209 ALWAYS_INLINE JSFunction* Register::function() const 266 210 { 267 ASSERT_TYPE(FunctionType);268 211 return u.function; 269 212 } … … 271 214 ALWAYS_INLINE JSPropertyNameIterator* Register::propertyNameIterator() const 272 215 { 273 ASSERT_TYPE(PropertyNameIteratorType);274 216 return u.propertyNameIterator; 275 217 } … … 277 219 ALWAYS_INLINE ScopeChainNode* Register::scopeChain() const 278 220 { 279 ASSERT_TYPE(ScopeChainNodeType);280 221 return u.scopeChain; 281 222 } … … 283 224 ALWAYS_INLINE Instruction* Register::vPC() const 284 225 { 285 ASSERT_TYPE(InstructionType);286 226 return u.vPC; 287 227 } 288 228 289 #undef SET_TYPE290 #undef ASSERT_TYPE291 292 229 } // namespace JSC 293 230 -
trunk/JavaScriptCore/jit/JITStubs.cpp
r42976 r42989 941 941 942 942 // FIXME: All host methods should be calling toThisObject, but this is not presently the case. 943 JSValuePtr thisValue = argv[0].jsValue( callFrame);943 JSValuePtr thisValue = argv[0].jsValue(); 944 944 if (thisValue == jsNull()) 945 945 thisValue = callFrame->globalThisValue(); … … 1415 1415 RegisterFile* registerFile = ARG_registerFile; 1416 1416 int argsOffset = ARG_int1; 1417 JSValuePtr arguments = callFrame[argsOffset].jsValue( callFrame);1417 JSValuePtr arguments = callFrame[argsOffset].jsValue(); 1418 1418 uint32_t argCount = 0; 1419 1419 if (!arguments.isUndefinedOrNull()) { … … 1891 1891 Register* newCallFrame = callFrame->registers() + registerOffset; 1892 1892 Register* argv = newCallFrame - RegisterFile::CallFrameHeaderSize - argCount; 1893 JSValuePtr thisValue = argv[0].jsValue( callFrame);1893 JSValuePtr thisValue = argv[0].jsValue(); 1894 1894 JSGlobalObject* globalObject = callFrame->scopeChain()->globalObject(); 1895 1895 -
trunk/JavaScriptCore/jsc.cpp
r41627 r42989 193 193 putchar(' '); 194 194 195 printf("%s", args.at( exec,i).toString(exec).UTF8String().c_str());195 printf("%s", args.at(i).toString(exec).UTF8String().c_str()); 196 196 } 197 197 … … 203 203 JSValuePtr functionDebug(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args) 204 204 { 205 fprintf(stderr, "--> %s\n", args.at( exec,0).toString(exec).UTF8String().c_str());205 fprintf(stderr, "--> %s\n", args.at(0).toString(exec).UTF8String().c_str()); 206 206 return jsUndefined(); 207 207 } … … 224 224 { 225 225 StopWatch stopWatch; 226 UString fileName = args.at( exec,0).toString(exec);226 UString fileName = args.at(0).toString(exec); 227 227 Vector<char> script; 228 228 if (!fillBufferWithContentsOfFile(fileName, script)) … … 240 240 JSValuePtr functionLoad(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args) 241 241 { 242 UString fileName = args.at( exec,0).toString(exec);242 UString fileName = args.at(0).toString(exec); 243 243 Vector<char> script; 244 244 if (!fillBufferWithContentsOfFile(fileName, script)) -
trunk/JavaScriptCore/runtime/ArgList.h
r39670 r42989 86 86 bool isEmpty() const { return !m_size; } 87 87 88 JSValuePtr at( ExecState* exec,size_t i) const88 JSValuePtr at(size_t i) const 89 89 { 90 90 if (i < m_size) 91 return m_buffer[i].jsValue( exec);91 return m_buffer[i].jsValue(); 92 92 return jsUndefined(); 93 93 } -
trunk/JavaScriptCore/runtime/Arguments.cpp
r42337 r42989 83 83 unsigned i = 0; 84 84 for (; i < parametersLength; ++i) 85 buffer[i] = d->registers[d->firstParameterIndex + i].jsValue( exec);85 buffer[i] = d->registers[d->firstParameterIndex + i].jsValue(); 86 86 for (; i < d->numArguments; ++i) 87 buffer[i] = d->extraArguments[i - d->numParameters].jsValue( exec);87 buffer[i] = d->extraArguments[i - d->numParameters].jsValue(); 88 88 return; 89 89 } … … 93 93 for (; i < parametersLength; ++i) { 94 94 if (!d->deletedArguments[i]) 95 buffer[i] = d->registers[d->firstParameterIndex + i].jsValue( exec);95 buffer[i] = d->registers[d->firstParameterIndex + i].jsValue(); 96 96 else 97 97 buffer[i] = get(exec, i); … … 99 99 for (; i < d->numArguments; ++i) { 100 100 if (!d->deletedArguments[i]) 101 buffer[i] = d->extraArguments[i - d->numParameters].jsValue( exec);101 buffer[i] = d->extraArguments[i - d->numParameters].jsValue(); 102 102 else 103 103 buffer[i] = get(exec, i); … … 128 128 unsigned i = 0; 129 129 for (; i < parametersLength; ++i) 130 args.append(d->registers[d->firstParameterIndex + i].jsValue( exec));130 args.append(d->registers[d->firstParameterIndex + i].jsValue()); 131 131 for (; i < d->numArguments; ++i) 132 args.append(d->extraArguments[i - d->numParameters].jsValue( exec));132 args.append(d->extraArguments[i - d->numParameters].jsValue()); 133 133 return; 134 134 } … … 138 138 for (; i < parametersLength; ++i) { 139 139 if (!d->deletedArguments[i]) 140 args.append(d->registers[d->firstParameterIndex + i].jsValue( exec));140 args.append(d->registers[d->firstParameterIndex + i].jsValue()); 141 141 else 142 142 args.append(get(exec, i)); … … 144 144 for (; i < d->numArguments; ++i) { 145 145 if (!d->deletedArguments[i]) 146 args.append(d->extraArguments[i - d->numParameters].jsValue( exec));146 args.append(d->extraArguments[i - d->numParameters].jsValue()); 147 147 else 148 148 args.append(get(exec, i)); … … 156 156 slot.setRegisterSlot(&d->registers[d->firstParameterIndex + i]); 157 157 } else 158 slot.setValue(d->extraArguments[i - d->numParameters].jsValue( exec));158 slot.setValue(d->extraArguments[i - d->numParameters].jsValue()); 159 159 return true; 160 160 } … … 171 171 slot.setRegisterSlot(&d->registers[d->firstParameterIndex + i]); 172 172 } else 173 slot.setValue(d->extraArguments[i - d->numParameters].jsValue( exec));173 slot.setValue(d->extraArguments[i - d->numParameters].jsValue()); 174 174 return true; 175 175 } -
trunk/JavaScriptCore/runtime/ArrayConstructor.cpp
r40046 r42989 46 46 { 47 47 // a single numeric argument denotes the array size (!) 48 if (args.size() == 1 && args.at( exec,0).isNumber()) {49 uint32_t n = args.at( exec,0).toUInt32(exec);50 if (n != args.at( exec,0).toNumber(exec))48 if (args.size() == 1 && args.at(0).isNumber()) { 49 uint32_t n = args.at(0).toUInt32(exec); 50 if (n != args.at(0).toNumber(exec)) 51 51 return throwError(exec, RangeError, "Array size is not a small enough positive integer."); 52 52 return new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure(), n); … … 54 54 55 55 // otherwise the array is constructed with the arguments in it 56 return new (exec) JSArray(exec , exec->lexicalGlobalObject()->arrayStructure(), args);56 return new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure(), args); 57 57 } 58 58 -
trunk/JavaScriptCore/runtime/ArrayPrototype.cpp
r42734 r42989 253 253 254 254 UChar comma = ','; 255 UString separator = args.at( exec, 0).isUndefined() ? UString(&comma, 1) : args.at(exec,0).toString(exec);255 UString separator = args.at(0).isUndefined() ? UString(&comma, 1) : args.at(0).toString(exec); 256 256 257 257 unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec); … … 306 306 if (it == end) 307 307 break; 308 curArg = (*it).jsValue( exec);308 curArg = (*it).jsValue(); 309 309 ++it; 310 310 } … … 336 336 if (isJSArray(&exec->globalData(), thisValue) && args.size() == 1) { 337 337 JSArray* array = asArray(thisValue); 338 array->push(exec, args.begin()->jsValue( exec));338 array->push(exec, args.begin()->jsValue()); 339 339 return jsNumber(exec, array->length()); 340 340 } … … 343 343 unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec); 344 344 for (unsigned n = 0; n < args.size(); n++) 345 thisObj->put(exec, length + n, args.at( exec,n));345 thisObj->put(exec, length + n, args.at(n)); 346 346 length += args.size(); 347 347 putProperty(exec, thisObj, exec->propertyNames().length, jsNumber(exec, length)); … … 405 405 JSArray* resObj = constructEmptyArray(exec); 406 406 JSValuePtr result = resObj; 407 double begin = args.at( exec,0).toInteger(exec);407 double begin = args.at(0).toInteger(exec); 408 408 unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec); 409 409 if (begin >= 0) { … … 416 416 } 417 417 double end; 418 if (args.at( exec,1).isUndefined())418 if (args.at(1).isUndefined()) 419 419 end = length; 420 420 else { 421 end = args.at( exec,1).toInteger(exec);421 end = args.at(1).toInteger(exec); 422 422 if (end < 0) { 423 423 end += length; … … 445 445 JSObject* thisObj = thisValue.toThisObject(exec); 446 446 447 JSValuePtr function = args.at( exec,0);447 JSValuePtr function = args.at(0); 448 448 CallData callData; 449 449 CallType callType = function.getCallData(callData); … … 509 509 if (!args.size()) 510 510 return jsUndefined(); 511 int begin = args.at( exec,0).toUInt32(exec);511 int begin = args.at(0).toUInt32(exec); 512 512 if (begin < 0) 513 513 begin = std::max<int>(begin + length, 0); … … 517 517 unsigned deleteCount; 518 518 if (args.size() > 1) 519 deleteCount = std::min<int>(std::max<int>(args.at( exec,1).toUInt32(exec), 0), length - begin);519 deleteCount = std::min<int>(std::max<int>(args.at(1).toUInt32(exec), 0), length - begin); 520 520 else 521 521 deleteCount = length - begin; … … 548 548 } 549 549 for (unsigned k = 0; k < additionalArgs; ++k) 550 thisObj->put(exec, k + begin, args.at( exec,k + 2));550 thisObj->put(exec, k + begin, args.at(k + 2)); 551 551 552 552 putProperty(exec, thisObj, exec->propertyNames().length, jsNumber(exec, length - deleteCount + additionalArgs)); … … 570 570 } 571 571 for (unsigned k = 0; k < nrArgs; ++k) 572 thisObj->put(exec, k, args.at( exec,k));572 thisObj->put(exec, k, args.at(k)); 573 573 JSValuePtr result = jsNumber(exec, length + nrArgs); 574 574 putProperty(exec, thisObj, exec->propertyNames().length, result); … … 580 580 JSObject* thisObj = thisValue.toThisObject(exec); 581 581 582 JSValuePtr function = args.at( exec,0);582 JSValuePtr function = args.at(0); 583 583 CallData callData; 584 584 CallType callType = function.getCallData(callData); … … 586 586 return throwError(exec, TypeError); 587 587 588 JSObject* applyThis = args.at( exec, 1).isUndefinedOrNull() ? exec->globalThisValue() : args.at(exec,1).toObject(exec);588 JSObject* applyThis = args.at(1).isUndefinedOrNull() ? exec->globalThisValue() : args.at(1).toObject(exec); 589 589 JSArray* resultArray = constructEmptyArray(exec); 590 590 … … 638 638 JSObject* thisObj = thisValue.toThisObject(exec); 639 639 640 JSValuePtr function = args.at( exec,0);640 JSValuePtr function = args.at(0); 641 641 CallData callData; 642 642 CallType callType = function.getCallData(callData); … … 644 644 return throwError(exec, TypeError); 645 645 646 JSObject* applyThis = args.at( exec, 1).isUndefinedOrNull() ? exec->globalThisValue() : args.at(exec,1).toObject(exec);646 JSObject* applyThis = args.at(1).isUndefinedOrNull() ? exec->globalThisValue() : args.at(1).toObject(exec); 647 647 648 648 unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec); … … 695 695 JSObject* thisObj = thisValue.toThisObject(exec); 696 696 697 JSValuePtr function = args.at( exec,0);697 JSValuePtr function = args.at(0); 698 698 CallData callData; 699 699 CallType callType = function.getCallData(callData); … … 701 701 return throwError(exec, TypeError); 702 702 703 JSObject* applyThis = args.at( exec, 1).isUndefinedOrNull() ? exec->globalThisValue() : args.at(exec,1).toObject(exec);703 JSObject* applyThis = args.at(1).isUndefinedOrNull() ? exec->globalThisValue() : args.at(1).toObject(exec); 704 704 705 705 JSValuePtr result = jsBoolean(true); … … 751 751 JSObject* thisObj = thisValue.toThisObject(exec); 752 752 753 JSValuePtr function = args.at( exec,0);753 JSValuePtr function = args.at(0); 754 754 CallData callData; 755 755 CallType callType = function.getCallData(callData); … … 757 757 return throwError(exec, TypeError); 758 758 759 JSObject* applyThis = args.at( exec, 1).isUndefinedOrNull() ? exec->globalThisValue() : args.at(exec,1).toObject(exec);759 JSObject* applyThis = args.at(1).isUndefinedOrNull() ? exec->globalThisValue() : args.at(1).toObject(exec); 760 760 761 761 unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec); … … 796 796 JSObject* thisObj = thisValue.toThisObject(exec); 797 797 798 JSValuePtr function = args.at( exec,0);798 JSValuePtr function = args.at(0); 799 799 CallData callData; 800 800 CallType callType = function.getCallData(callData); … … 802 802 return throwError(exec, TypeError); 803 803 804 JSObject* applyThis = args.at( exec, 1).isUndefinedOrNull() ? exec->globalThisValue() : args.at(exec,1).toObject(exec);804 JSObject* applyThis = args.at(1).isUndefinedOrNull() ? exec->globalThisValue() : args.at(1).toObject(exec); 805 805 806 806 JSValuePtr result = jsBoolean(false); … … 849 849 JSObject* thisObj = thisValue.toThisObject(exec); 850 850 851 JSValuePtr function = args.at( exec,0);851 JSValuePtr function = args.at(0); 852 852 CallData callData; 853 853 CallType callType = function.getCallData(callData); … … 865 865 866 866 if (args.size() >= 2) 867 rv = args.at( exec,1);867 rv = args.at(1); 868 868 else if (array && array->canGetIndex(0)){ 869 869 rv = array->getIndex(0); … … 919 919 JSObject* thisObj = thisValue.toThisObject(exec); 920 920 921 JSValuePtr function = args.at( exec,0);921 JSValuePtr function = args.at(0); 922 922 CallData callData; 923 923 CallType callType = function.getCallData(callData); … … 935 935 936 936 if (args.size() >= 2) 937 rv = args.at( exec,1);937 rv = args.at(1); 938 938 else if (array && array->canGetIndex(length - 1)){ 939 939 rv = array->getIndex(length - 1); … … 992 992 993 993 unsigned index = 0; 994 double d = args.at( exec,1).toInteger(exec);994 double d = args.at(1).toInteger(exec); 995 995 unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec); 996 996 if (d < 0) … … 1003 1003 } 1004 1004 1005 JSValuePtr searchElement = args.at( exec,0);1005 JSValuePtr searchElement = args.at(0); 1006 1006 for (; index < length; ++index) { 1007 1007 JSValuePtr e = getProperty(exec, thisObj, index); … … 1024 1024 unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec); 1025 1025 int index = length - 1; 1026 double d = args.at( exec,1).toIntegerPreserveNaN(exec);1026 double d = args.at(1).toIntegerPreserveNaN(exec); 1027 1027 1028 1028 if (d < 0) { … … 1034 1034 index = static_cast<int>(d); 1035 1035 1036 JSValuePtr searchElement = args.at( exec,0);1036 JSValuePtr searchElement = args.at(0); 1037 1037 for (; index >= 0; --index) { 1038 1038 JSValuePtr e = getProperty(exec, thisObj, index); -
trunk/JavaScriptCore/runtime/BooleanConstructor.cpp
r40046 r42989 42 42 { 43 43 BooleanObject* obj = new (exec) BooleanObject(exec->lexicalGlobalObject()->booleanObjectStructure()); 44 obj->setInternalValue(jsBoolean(args.at( exec,0).toBoolean(exec)));44 obj->setInternalValue(jsBoolean(args.at(0).toBoolean(exec))); 45 45 return obj; 46 46 } … … 60 60 static JSValuePtr callBooleanConstructor(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args) 61 61 { 62 return jsBoolean(args.at( exec,0).toBoolean(exec));62 return jsBoolean(args.at(0).toBoolean(exec)); 63 63 } 64 64 -
trunk/JavaScriptCore/runtime/DateConstructor.cpp
r40046 r42989 74 74 value = getCurrentUTCTime(); 75 75 else if (numArgs == 1) { 76 if (args.at( exec,0).isObject(&DateInstance::info))77 value = asDateInstance(args.at( exec,0))->internalNumber();76 if (args.at(0).isObject(&DateInstance::info)) 77 value = asDateInstance(args.at(0))->internalNumber(); 78 78 else { 79 JSValuePtr primitive = args.at( exec,0).toPrimitive(exec);79 JSValuePtr primitive = args.at(0).toPrimitive(exec); 80 80 if (primitive.isString()) 81 81 value = parseDate(primitive.getString()); … … 84 84 } 85 85 } else { 86 if (isnan(args.at( exec,0).toNumber(exec))87 || isnan(args.at( exec,1).toNumber(exec))88 || (numArgs >= 3 && isnan(args.at( exec,2).toNumber(exec)))89 || (numArgs >= 4 && isnan(args.at( exec,3).toNumber(exec)))90 || (numArgs >= 5 && isnan(args.at( exec,4).toNumber(exec)))91 || (numArgs >= 6 && isnan(args.at( exec,5).toNumber(exec)))92 || (numArgs >= 7 && isnan(args.at( exec,6).toNumber(exec))))86 if (isnan(args.at(0).toNumber(exec)) 87 || isnan(args.at(1).toNumber(exec)) 88 || (numArgs >= 3 && isnan(args.at(2).toNumber(exec))) 89 || (numArgs >= 4 && isnan(args.at(3).toNumber(exec))) 90 || (numArgs >= 5 && isnan(args.at(4).toNumber(exec))) 91 || (numArgs >= 6 && isnan(args.at(5).toNumber(exec))) 92 || (numArgs >= 7 && isnan(args.at(6).toNumber(exec)))) 93 93 value = NaN; 94 94 else { 95 95 GregorianDateTime t; 96 int year = args.at( exec,0).toInt32(exec);96 int year = args.at(0).toInt32(exec); 97 97 t.year = (year >= 0 && year <= 99) ? year : year - 1900; 98 t.month = args.at( exec,1).toInt32(exec);99 t.monthDay = (numArgs >= 3) ? args.at( exec,2).toInt32(exec) : 1;100 t.hour = args.at( exec,3).toInt32(exec);101 t.minute = args.at( exec,4).toInt32(exec);102 t.second = args.at( exec,5).toInt32(exec);98 t.month = args.at(1).toInt32(exec); 99 t.monthDay = (numArgs >= 3) ? args.at(2).toInt32(exec) : 1; 100 t.hour = args.at(3).toInt32(exec); 101 t.minute = args.at(4).toInt32(exec); 102 t.second = args.at(5).toInt32(exec); 103 103 t.isDST = -1; 104 double ms = (numArgs >= 7) ? args.at( exec,6).toNumber(exec) : 0;104 double ms = (numArgs >= 7) ? args.at(6).toNumber(exec) : 0; 105 105 value = gregorianDateTimeToMS(t, ms, false); 106 106 } … … 141 141 static JSValuePtr dateParse(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args) 142 142 { 143 return jsNumber(exec, parseDate(args.at( exec,0).toString(exec)));143 return jsNumber(exec, parseDate(args.at(0).toString(exec))); 144 144 } 145 145 … … 152 152 { 153 153 int n = args.size(); 154 if (isnan(args.at( exec,0).toNumber(exec))155 || isnan(args.at( exec,1).toNumber(exec))156 || (n >= 3 && isnan(args.at( exec,2).toNumber(exec)))157 || (n >= 4 && isnan(args.at( exec,3).toNumber(exec)))158 || (n >= 5 && isnan(args.at( exec,4).toNumber(exec)))159 || (n >= 6 && isnan(args.at( exec,5).toNumber(exec)))160 || (n >= 7 && isnan(args.at( exec,6).toNumber(exec))))154 if (isnan(args.at(0).toNumber(exec)) 155 || isnan(args.at(1).toNumber(exec)) 156 || (n >= 3 && isnan(args.at(2).toNumber(exec))) 157 || (n >= 4 && isnan(args.at(3).toNumber(exec))) 158 || (n >= 5 && isnan(args.at(4).toNumber(exec))) 159 || (n >= 6 && isnan(args.at(5).toNumber(exec))) 160 || (n >= 7 && isnan(args.at(6).toNumber(exec)))) 161 161 return jsNaN(exec); 162 162 163 163 GregorianDateTime t; 164 int year = args.at( exec,0).toInt32(exec);164 int year = args.at(0).toInt32(exec); 165 165 t.year = (year >= 0 && year <= 99) ? year : year - 1900; 166 t.month = args.at( exec,1).toInt32(exec);167 t.monthDay = (n >= 3) ? args.at( exec,2).toInt32(exec) : 1;168 t.hour = args.at( exec,3).toInt32(exec);169 t.minute = args.at( exec,4).toInt32(exec);170 t.second = args.at( exec,5).toInt32(exec);171 double ms = (n >= 7) ? args.at( exec,6).toNumber(exec) : 0;166 t.month = args.at(1).toInt32(exec); 167 t.monthDay = (n >= 3) ? args.at(2).toInt32(exec) : 1; 168 t.hour = args.at(3).toInt32(exec); 169 t.minute = args.at(4).toInt32(exec); 170 t.second = args.at(5).toInt32(exec); 171 double ms = (n >= 7) ? args.at(6).toNumber(exec) : 0; 172 172 return jsNumber(exec, gregorianDateTimeToMS(t, ms, true)); 173 173 } -
trunk/JavaScriptCore/runtime/DatePrototype.cpp
r41909 r42989 142 142 UString customFormatString; 143 143 144 UString arg0String = args.at( exec,0).toString(exec);145 if (arg0String == "custom" && !args.at( exec,1).isUndefined()) {144 UString arg0String = args.at(0).toString(exec); 145 if (arg0String == "custom" && !args.at(1).isUndefined()) { 146 146 useCustomFormat = true; 147 customFormatString = args.at( exec,1).toString(exec);148 } else if (format == LocaleDateAndTime && !args.at( exec,1).isUndefined()) {147 customFormatString = args.at(1).toString(exec); 148 } else if (format == LocaleDateAndTime && !args.at(1).isUndefined()) { 149 149 dateStyle = styleFromArgString(arg0String, dateStyle); 150 timeStyle = styleFromArgString(args.at( exec,1).toString(exec), timeStyle);151 } else if (format != LocaleTime && !args.at( exec,0).isUndefined())150 timeStyle = styleFromArgString(args.at(1).toString(exec), timeStyle); 151 } else if (format != LocaleTime && !args.at(0).isUndefined()) 152 152 dateStyle = styleFromArgString(arg0String, dateStyle); 153 else if (format != LocaleDate && !args.at( exec,0).isUndefined())153 else if (format != LocaleDate && !args.at(0).isUndefined()) 154 154 timeStyle = styleFromArgString(arg0String, timeStyle); 155 155 … … 267 267 if (maxArgs >= 4 && idx < numArgs) { 268 268 t->hour = 0; 269 milliseconds += args.at( exec,idx++).toInt32(exec, ok) * msPerHour;269 milliseconds += args.at(idx++).toInt32(exec, ok) * msPerHour; 270 270 } 271 271 … … 273 273 if (maxArgs >= 3 && idx < numArgs && ok) { 274 274 t->minute = 0; 275 milliseconds += args.at( exec,idx++).toInt32(exec, ok) * msPerMinute;275 milliseconds += args.at(idx++).toInt32(exec, ok) * msPerMinute; 276 276 } 277 277 … … 279 279 if (maxArgs >= 2 && idx < numArgs && ok) { 280 280 t->second = 0; 281 milliseconds += args.at( exec,idx++).toInt32(exec, ok) * msPerSecond;281 milliseconds += args.at(idx++).toInt32(exec, ok) * msPerSecond; 282 282 } 283 283 … … 287 287 // milliseconds 288 288 if (idx < numArgs) { 289 double millis = args.at( exec,idx).toNumber(exec);289 double millis = args.at(idx).toNumber(exec); 290 290 ok = isfinite(millis); 291 291 milliseconds += millis; … … 313 313 // years 314 314 if (maxArgs >= 3 && idx < numArgs) 315 t->year = args.at( exec,idx++).toInt32(exec, ok) - 1900;315 t->year = args.at(idx++).toInt32(exec, ok) - 1900; 316 316 317 317 // months 318 318 if (maxArgs >= 2 && idx < numArgs && ok) 319 t->month = args.at( exec,idx++).toInt32(exec, ok);319 t->month = args.at(idx++).toInt32(exec, ok); 320 320 321 321 // days 322 322 if (idx < numArgs && ok) { 323 323 t->monthDay = 0; 324 *ms += args.at( exec,idx).toInt32(exec, ok) * msPerDay;324 *ms += args.at(idx).toInt32(exec, ok) * msPerDay; 325 325 } 326 326 … … 824 824 DateInstance* thisDateObj = asDateInstance(thisValue); 825 825 826 double milli = timeClip(args.at( exec,0).toNumber(exec));826 double milli = timeClip(args.at(0).toNumber(exec)); 827 827 JSValuePtr result = jsNumber(exec, milli); 828 828 thisDateObj->setInternalValue(result); … … 1011 1011 1012 1012 bool ok = true; 1013 int32_t year = args.at( exec,0).toInt32(exec, ok);1013 int32_t year = args.at(0).toInt32(exec, ok); 1014 1014 if (!ok) { 1015 1015 JSValuePtr result = jsNaN(exec); -
trunk/JavaScriptCore/runtime/ErrorConstructor.cpp
r40046 r42989 42 42 { 43 43 ErrorInstance* obj = new (exec) ErrorInstance(exec->lexicalGlobalObject()->errorStructure()); 44 if (!args.at( exec,0).isUndefined())45 obj->putDirect(exec->propertyNames().message, jsString(exec, args.at( exec,0).toString(exec)));44 if (!args.at(0).isUndefined()) 45 obj->putDirect(exec->propertyNames().message, jsString(exec, args.at(0).toString(exec))); 46 46 return obj; 47 47 } -
trunk/JavaScriptCore/runtime/FunctionConstructor.cpp
r41895 r42989 101 101 program = "(function() { \n})"; 102 102 else if (args.size() == 1) 103 program = "(function() { " + args.at( exec,0).toString(exec) + "\n})";103 program = "(function() { " + args.at(0).toString(exec) + "\n})"; 104 104 else { 105 program = "(function(" + args.at( exec,0).toString(exec);105 program = "(function(" + args.at(0).toString(exec); 106 106 for (size_t i = 1; i < args.size() - 1; i++) 107 program += "," + args.at( exec,i).toString(exec);108 program += ") { " + args.at( exec,args.size() - 1).toString(exec) + "\n})";107 program += "," + args.at(i).toString(exec); 108 program += ") { " + args.at(args.size() - 1).toString(exec) + "\n})"; 109 109 } 110 110 -
trunk/JavaScriptCore/runtime/FunctionPrototype.cpp
r42337 r42989 107 107 return throwError(exec, TypeError); 108 108 109 JSValuePtr array = args.at( exec,1);109 JSValuePtr array = args.at(1); 110 110 111 111 ArgList applyArgs; … … 125 125 } 126 126 127 return call(exec, thisValue, callType, callData, args.at( exec,0), applyArgs);127 return call(exec, thisValue, callType, callData, args.at(0), applyArgs); 128 128 } 129 129 … … 137 137 ArgList callArgs; 138 138 args.getSlice(1, callArgs); 139 return call(exec, thisValue, callType, callData, args.at( exec,0), callArgs);139 return call(exec, thisValue, callType, callData, args.at(0), callArgs); 140 140 } 141 141 -
trunk/JavaScriptCore/runtime/JSArray.cpp
r42605 r42989 157 157 } 158 158 159 JSArray::JSArray( ExecState* exec,PassRefPtr<Structure> structure, const ArgList& list)159 JSArray::JSArray(PassRefPtr<Structure> structure, const ArgList& list) 160 160 : JSObject(structure) 161 161 { … … 174 174 ArgList::const_iterator end = list.end(); 175 175 for (ArgList::const_iterator it = list.begin(); it != end; ++it, ++i) 176 storage->m_vector[i] = (*it).jsValue( exec);176 storage->m_vector[i] = (*it).jsValue(); 177 177 178 178 m_storage = storage; … … 1063 1063 ArgList values; 1064 1064 values.append(singleItemValue); 1065 return new (exec) JSArray(exec , exec->lexicalGlobalObject()->arrayStructure(), values);1065 return new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure(), values); 1066 1066 } 1067 1067 1068 1068 JSArray* constructArray(ExecState* exec, const ArgList& values) 1069 1069 { 1070 return new (exec) JSArray(exec , exec->lexicalGlobalObject()->arrayStructure(), values);1070 return new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure(), values); 1071 1071 } 1072 1072 -
trunk/JavaScriptCore/runtime/JSArray.h
r42680 r42989 43 43 explicit JSArray(PassRefPtr<Structure>); 44 44 JSArray(PassRefPtr<Structure>, unsigned initialLength); 45 JSArray( ExecState*,PassRefPtr<Structure>, const ArgList& initialValues);45 JSArray(PassRefPtr<Structure>, const ArgList& initialValues); 46 46 virtual ~JSArray(); 47 47 -
trunk/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
r42607 r42989 50 50 static JSValuePtr encode(ExecState* exec, const ArgList& args, const char* doNotEscape) 51 51 { 52 UString str = args.at( exec,0).toString(exec);52 UString str = args.at(0).toString(exec); 53 53 CString cstr = str.UTF8String(true); 54 54 if (!cstr.c_str()) … … 73 73 { 74 74 UString result = ""; 75 UString str = args.at( exec,0).toString(exec);75 UString str = args.at(0).toString(exec); 76 76 int k = 0; 77 77 int len = str.size(); … … 276 276 return throwError(exec, EvalError, "The \"this\" value passed to eval must be the global object from which eval originated"); 277 277 278 JSValuePtr x = args.at( exec,0);278 JSValuePtr x = args.at(0); 279 279 if (!x.isString()) 280 280 return x; … … 296 296 JSValuePtr globalFuncParseInt(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args) 297 297 { 298 JSValuePtr value = args.at( exec,0);299 int32_t radix = args.at( exec,1).toInt32(exec);298 JSValuePtr value = args.at(0); 299 int32_t radix = args.at(1).toInt32(exec); 300 300 301 301 if (value.isNumber() && (radix == 0 || radix == 10)) { … … 315 315 JSValuePtr globalFuncParseFloat(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args) 316 316 { 317 return jsNumber(exec, parseFloat(args.at( exec,0).toString(exec)));317 return jsNumber(exec, parseFloat(args.at(0).toString(exec))); 318 318 } 319 319 320 320 JSValuePtr globalFuncIsNaN(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args) 321 321 { 322 return jsBoolean(isnan(args.at( exec,0).toNumber(exec)));322 return jsBoolean(isnan(args.at(0).toNumber(exec))); 323 323 } 324 324 325 325 JSValuePtr globalFuncIsFinite(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args) 326 326 { 327 double n = args.at( exec,0).toNumber(exec);327 double n = args.at(0).toNumber(exec); 328 328 return jsBoolean(!isnan(n) && !isinf(n)); 329 329 } … … 374 374 UString result = ""; 375 375 UString s; 376 UString str = args.at( exec,0).toString(exec);376 UString str = args.at(0).toString(exec); 377 377 const UChar* c = str.data(); 378 378 for (int k = 0; k < str.size(); k++, c++) { … … 398 398 { 399 399 UString result = ""; 400 UString str = args.at( exec,0).toString(exec);400 UString str = args.at(0).toString(exec); 401 401 int k = 0; 402 402 int len = str.size(); … … 426 426 { 427 427 CStringBuffer string; 428 args.at( exec,0).toString(exec).getCString(string);428 args.at(0).toString(exec).getCString(string); 429 429 puts(string.data()); 430 430 return jsUndefined(); -
trunk/JavaScriptCore/runtime/MathObject.cpp
r40968 r42989 118 118 JSValuePtr mathProtoFuncAbs(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args) 119 119 { 120 return jsNumber(exec, fabs(args.at( exec,0).toNumber(exec)));120 return jsNumber(exec, fabs(args.at(0).toNumber(exec))); 121 121 } 122 122 123 123 JSValuePtr mathProtoFuncACos(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args) 124 124 { 125 return jsNumber(exec, acos(args.at( exec,0).toNumber(exec)));125 return jsNumber(exec, acos(args.at(0).toNumber(exec))); 126 126 } 127 127 128 128 JSValuePtr mathProtoFuncASin(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args) 129 129 { 130 return jsNumber(exec, asin(args.at( exec,0).toNumber(exec)));130 return jsNumber(exec, asin(args.at(0).toNumber(exec))); 131 131 } 132 132 133 133 JSValuePtr mathProtoFuncATan(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args) 134 134 { 135 return jsNumber(exec, atan(args.at( exec,0).toNumber(exec)));135 return jsNumber(exec, atan(args.at(0).toNumber(exec))); 136 136 } 137 137 138 138 JSValuePtr mathProtoFuncATan2(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args) 139 139 { 140 return jsNumber(exec, atan2(args.at( exec, 0).toNumber(exec), args.at(exec,1).toNumber(exec)));140 return jsNumber(exec, atan2(args.at(0).toNumber(exec), args.at(1).toNumber(exec))); 141 141 } 142 142 143 143 JSValuePtr mathProtoFuncCeil(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args) 144 144 { 145 return jsNumber(exec, ceil(args.at( exec,0).toNumber(exec)));145 return jsNumber(exec, ceil(args.at(0).toNumber(exec))); 146 146 } 147 147 148 148 JSValuePtr mathProtoFuncCos(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args) 149 149 { 150 return jsNumber(exec, cos(args.at( exec,0).toNumber(exec)));150 return jsNumber(exec, cos(args.at(0).toNumber(exec))); 151 151 } 152 152 153 153 JSValuePtr mathProtoFuncExp(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args) 154 154 { 155 return jsNumber(exec, exp(args.at( exec,0).toNumber(exec)));155 return jsNumber(exec, exp(args.at(0).toNumber(exec))); 156 156 } 157 157 158 158 JSValuePtr mathProtoFuncFloor(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args) 159 159 { 160 return jsNumber(exec, floor(args.at( exec,0).toNumber(exec)));160 return jsNumber(exec, floor(args.at(0).toNumber(exec))); 161 161 } 162 162 163 163 JSValuePtr mathProtoFuncLog(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args) 164 164 { 165 return jsNumber(exec, log(args.at( exec,0).toNumber(exec)));165 return jsNumber(exec, log(args.at(0).toNumber(exec))); 166 166 } 167 167 … … 171 171 double result = -Inf; 172 172 for (unsigned k = 0; k < argsCount; ++k) { 173 double val = args.at( exec,k).toNumber(exec);173 double val = args.at(k).toNumber(exec); 174 174 if (isnan(val)) { 175 175 result = NaN; … … 187 187 double result = +Inf; 188 188 for (unsigned k = 0; k < argsCount; ++k) { 189 double val = args.at( exec,k).toNumber(exec);189 double val = args.at(k).toNumber(exec); 190 190 if (isnan(val)) { 191 191 result = NaN; … … 202 202 // ECMA 15.8.2.1.13 203 203 204 double arg = args.at( exec,0).toNumber(exec);205 double arg2 = args.at( exec,1).toNumber(exec);204 double arg = args.at(0).toNumber(exec); 205 double arg2 = args.at(1).toNumber(exec); 206 206 207 207 if (isnan(arg2)) … … 219 219 JSValuePtr mathProtoFuncRound(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args) 220 220 { 221 double arg = args.at( exec,0).toNumber(exec);221 double arg = args.at(0).toNumber(exec); 222 222 if (signbit(arg) && arg >= -0.5) 223 223 return jsNumber(exec, -0.0); … … 227 227 JSValuePtr mathProtoFuncSin(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args) 228 228 { 229 return jsNumber(exec, sin(args.at( exec,0).toNumber(exec)));229 return jsNumber(exec, sin(args.at(0).toNumber(exec))); 230 230 } 231 231 232 232 JSValuePtr mathProtoFuncSqrt(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args) 233 233 { 234 return jsNumber(exec, sqrt(args.at( exec,0).toNumber(exec)));234 return jsNumber(exec, sqrt(args.at(0).toNumber(exec))); 235 235 } 236 236 237 237 JSValuePtr mathProtoFuncTan(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args) 238 238 { 239 return jsNumber(exec, tan(args.at( exec,0).toNumber(exec)));239 return jsNumber(exec, tan(args.at(0).toNumber(exec))); 240 240 } 241 241 -
trunk/JavaScriptCore/runtime/NativeErrorConstructor.cpp
r40046 r42989 44 44 { 45 45 ErrorInstance* object = new (exec) ErrorInstance(m_errorStructure); 46 if (!args.at( exec,0).isUndefined())47 object->putDirect(exec->propertyNames().message, jsString(exec, args.at( exec,0).toString(exec)));46 if (!args.at(0).isUndefined()) 47 object->putDirect(exec->propertyNames().message, jsString(exec, args.at(0).toString(exec))); 48 48 return object; 49 49 } -
trunk/JavaScriptCore/runtime/NumberConstructor.cpp
r41445 r42989 98 98 { 99 99 NumberObject* object = new (exec) NumberObject(exec->lexicalGlobalObject()->numberObjectStructure()); 100 double n = args.isEmpty() ? 0 : args.at( exec,0).toNumber(exec);100 double n = args.isEmpty() ? 0 : args.at(0).toNumber(exec); 101 101 object->setInternalValue(jsNumber(exec, n)); 102 102 return object; … … 112 112 static JSValuePtr callNumberConstructor(ExecState* exec, JSObject*, JSValuePtr, const ArgList& args) 113 113 { 114 return jsNumber(exec, args.isEmpty() ? 0 : args.at( exec,0).toNumber(exec));114 return jsNumber(exec, args.isEmpty() ? 0 : args.at(0).toNumber(exec)); 115 115 } 116 116 -
trunk/JavaScriptCore/runtime/NumberPrototype.cpp
r40046 r42989 140 140 return throwError(exec, TypeError); 141 141 142 double radixAsDouble = args.at( exec,0).toInteger(exec); // nan -> 0143 if (radixAsDouble == 10 || args.at( exec,0).isUndefined())142 double radixAsDouble = args.at(0).toInteger(exec); // nan -> 0 143 if (radixAsDouble == 10 || args.at(0).isUndefined()) 144 144 return jsString(exec, v.toString(exec)); 145 145 … … 224 224 return throwError(exec, TypeError); 225 225 226 JSValuePtr fractionDigits = args.at( exec,0);226 JSValuePtr fractionDigits = args.at(0); 227 227 double df = fractionDigits.toInteger(exec); 228 228 if (!(df >= 0 && df <= 20)) … … 314 314 return jsString(exec, UString::from(x)); 315 315 316 JSValuePtr fractionalDigitsValue = args.at( exec,0);316 JSValuePtr fractionalDigitsValue = args.at(0); 317 317 double df = fractionalDigitsValue.toInteger(exec); 318 318 if (!(df >= 0 && df <= 20)) … … 379 379 return throwError(exec, TypeError); 380 380 381 double doublePrecision = args.at( exec,0).toIntegerPreserveNaN(exec);381 double doublePrecision = args.at(0).toIntegerPreserveNaN(exec); 382 382 double x = v.uncheckedGetNumber(); 383 if (args.at( exec,0).isUndefined() || isnan(x) || isinf(x))383 if (args.at(0).isUndefined() || isnan(x) || isinf(x)) 384 384 return jsString(exec, v.toString(exec)); 385 385 -
trunk/JavaScriptCore/runtime/ObjectConstructor.cpp
r40046 r42989 42 42 static ALWAYS_INLINE JSObject* constructObject(ExecState* exec, const ArgList& args) 43 43 { 44 JSValuePtr arg = args.at( exec,0);44 JSValuePtr arg = args.at(0); 45 45 if (arg.isUndefinedOrNull()) 46 46 return new (exec) JSObject(exec->lexicalGlobalObject()->emptyObjectStructure()); -
trunk/JavaScriptCore/runtime/ObjectPrototype.cpp
r40046 r42989 68 68 JSValuePtr objectProtoFuncHasOwnProperty(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args) 69 69 { 70 return jsBoolean(thisValue.toThisObject(exec)->hasOwnProperty(exec, Identifier(exec, args.at( exec,0).toString(exec))));70 return jsBoolean(thisValue.toThisObject(exec)->hasOwnProperty(exec, Identifier(exec, args.at(0).toString(exec)))); 71 71 } 72 72 … … 75 75 JSObject* thisObj = thisValue.toThisObject(exec); 76 76 77 if (!args.at( exec,0).isObject())77 if (!args.at(0).isObject()) 78 78 return jsBoolean(false); 79 79 80 JSValuePtr v = asObject(args.at( exec,0))->prototype();80 JSValuePtr v = asObject(args.at(0))->prototype(); 81 81 82 82 while (true) { … … 93 93 { 94 94 CallData callData; 95 if (args.at( exec,1).getCallData(callData) == CallTypeNone)95 if (args.at(1).getCallData(callData) == CallTypeNone) 96 96 return throwError(exec, SyntaxError, "invalid getter usage"); 97 thisValue.toThisObject(exec)->defineGetter(exec, Identifier(exec, args.at( exec, 0).toString(exec)), asObject(args.at(exec,1)));97 thisValue.toThisObject(exec)->defineGetter(exec, Identifier(exec, args.at(0).toString(exec)), asObject(args.at(1))); 98 98 return jsUndefined(); 99 99 } … … 102 102 { 103 103 CallData callData; 104 if (args.at( exec,1).getCallData(callData) == CallTypeNone)104 if (args.at(1).getCallData(callData) == CallTypeNone) 105 105 return throwError(exec, SyntaxError, "invalid setter usage"); 106 thisValue.toThisObject(exec)->defineSetter(exec, Identifier(exec, args.at( exec, 0).toString(exec)), asObject(args.at(exec,1)));106 thisValue.toThisObject(exec)->defineSetter(exec, Identifier(exec, args.at(0).toString(exec)), asObject(args.at(1))); 107 107 return jsUndefined(); 108 108 } … … 110 110 JSValuePtr objectProtoFuncLookupGetter(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args) 111 111 { 112 return thisValue.toThisObject(exec)->lookupGetter(exec, Identifier(exec, args.at( exec,0).toString(exec)));112 return thisValue.toThisObject(exec)->lookupGetter(exec, Identifier(exec, args.at(0).toString(exec))); 113 113 } 114 114 115 115 JSValuePtr objectProtoFuncLookupSetter(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args) 116 116 { 117 return thisValue.toThisObject(exec)->lookupSetter(exec, Identifier(exec, args.at( exec,0).toString(exec)));117 return thisValue.toThisObject(exec)->lookupSetter(exec, Identifier(exec, args.at(0).toString(exec))); 118 118 } 119 119 120 120 JSValuePtr objectProtoFuncPropertyIsEnumerable(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args) 121 121 { 122 return jsBoolean(thisValue.toThisObject(exec)->propertyIsEnumerable(exec, Identifier(exec, args.at( exec,0).toString(exec))));122 return jsBoolean(thisValue.toThisObject(exec)->propertyIsEnumerable(exec, Identifier(exec, args.at(0).toString(exec)))); 123 123 } 124 124 -
trunk/JavaScriptCore/runtime/PropertySlot.h
r39670 r42989 60 60 return *m_data.valueSlot; 61 61 if (m_getValue == JSC_REGISTER_SLOT_MARKER) 62 return (*m_data.registerSlot).jsValue( exec);62 return (*m_data.registerSlot).jsValue(); 63 63 return m_getValue(exec, propertyName, *this); 64 64 } … … 69 69 return *m_data.valueSlot; 70 70 if (m_getValue == JSC_REGISTER_SLOT_MARKER) 71 return (*m_data.registerSlot).jsValue( exec);71 return (*m_data.registerSlot).jsValue(); 72 72 return m_getValue(exec, Identifier::from(exec, propertyName), *this); 73 73 } -
trunk/JavaScriptCore/runtime/RegExpConstructor.cpp
r40046 r42989 320 320 JSObject* constructRegExp(ExecState* exec, const ArgList& args) 321 321 { 322 JSValuePtr arg0 = args.at( exec,0);323 JSValuePtr arg1 = args.at( exec,1);322 JSValuePtr arg0 = args.at(0); 323 JSValuePtr arg1 = args.at(1); 324 324 325 325 if (arg0.isObject(&RegExpObject::info)) { -
trunk/JavaScriptCore/runtime/RegExpObject.cpp
r40046 r42989 135 135 RegExpConstructor* regExpConstructor = exec->lexicalGlobalObject()->regExpConstructor(); 136 136 137 UString input = args.isEmpty() ? regExpConstructor->input() : args.at( exec,0).toString(exec);137 UString input = args.isEmpty() ? regExpConstructor->input() : args.at(0).toString(exec); 138 138 if (input.isNull()) { 139 139 throwError(exec, GeneralError, "No input to " + toString(exec) + "."); -
trunk/JavaScriptCore/runtime/RegExpPrototype.cpp
r40046 r42989 76 76 77 77 RefPtr<RegExp> regExp; 78 JSValuePtr arg0 = args.at( exec,0);79 JSValuePtr arg1 = args.at( exec,1);78 JSValuePtr arg0 = args.at(0); 79 JSValuePtr arg1 = args.at(1); 80 80 81 81 if (arg0.isObject(&RegExpObject::info)) { -
trunk/JavaScriptCore/runtime/StringConstructor.cpp
r40046 r42989 34 34 ArgList::const_iterator end = args.end(); 35 35 for (ArgList::const_iterator it = args.begin(); it != end; ++it) 36 *p++ = static_cast<UChar>((*it).jsValue( exec).toUInt32(exec));36 *p++ = static_cast<UChar>((*it).jsValue().toUInt32(exec)); 37 37 return jsString(exec, UString(buf, p - buf, false)); 38 38 } … … 41 41 { 42 42 if (LIKELY(args.size() == 1)) 43 return jsSingleCharacterString(exec, args.at( exec,0).toUInt32(exec));43 return jsSingleCharacterString(exec, args.at(0).toUInt32(exec)); 44 44 return stringFromCharCodeSlowCase(exec, args); 45 45 } … … 65 65 if (args.isEmpty()) 66 66 return new (exec) StringObject(exec, exec->lexicalGlobalObject()->stringObjectStructure()); 67 return new (exec) StringObject(exec, exec->lexicalGlobalObject()->stringObjectStructure(), args.at( exec,0).toString(exec));67 return new (exec) StringObject(exec, exec->lexicalGlobalObject()->stringObjectStructure(), args.at(0).toString(exec)); 68 68 } 69 69 … … 79 79 if (args.isEmpty()) 80 80 return jsEmptyString(exec); 81 return jsString(exec, args.at( exec,0).toString(exec));81 return jsString(exec, args.at(0).toString(exec)); 82 82 } 83 83 -
trunk/JavaScriptCore/runtime/StringPrototype.cpp
r42744 r42989 211 211 const UString& source = sourceVal->value(); 212 212 213 JSValuePtr pattern = args.at( exec,0);214 215 JSValuePtr replacement = args.at( exec,1);213 JSValuePtr pattern = args.at(0); 214 215 JSValuePtr replacement = args.at(1); 216 216 UString replacementString; 217 217 CallData callData; … … 374 374 UString s = thisValue.toThisString(exec); 375 375 unsigned len = s.size(); 376 JSValuePtr a0 = args.at( exec,0);376 JSValuePtr a0 = args.at(0); 377 377 if (a0.isUInt32Fast()) { 378 378 uint32_t i = a0.getUInt32Fast(); … … 391 391 UString s = thisValue.toThisString(exec); 392 392 unsigned len = s.size(); 393 JSValuePtr a0 = args.at( exec,0);393 JSValuePtr a0 = args.at(0); 394 394 if (a0.isUInt32Fast()) { 395 395 uint32_t i = a0.getUInt32Fast(); … … 410 410 ArgList::const_iterator end = args.end(); 411 411 for (ArgList::const_iterator it = args.begin(); it != end; ++it) 412 s += (*it).jsValue( exec).toString(exec);412 s += (*it).jsValue().toString(exec); 413 413 return jsString(exec, s); 414 414 } … … 419 419 int len = s.size(); 420 420 421 JSValuePtr a0 = args.at( exec,0);422 JSValuePtr a1 = args.at( exec,1);421 JSValuePtr a0 = args.at(0); 422 JSValuePtr a1 = args.at(1); 423 423 UString u2 = a0.toString(exec); 424 424 int pos; … … 444 444 int len = s.size(); 445 445 446 JSValuePtr a0 = args.at( exec,0);447 JSValuePtr a1 = args.at( exec,1);446 JSValuePtr a0 = args.at(0); 447 JSValuePtr a1 = args.at(1); 448 448 449 449 UString u2 = a0.toString(exec); … … 460 460 UString s = thisValue.toThisString(exec); 461 461 462 JSValuePtr a0 = args.at( exec,0);462 JSValuePtr a0 = args.at(0); 463 463 464 464 UString u = s; … … 511 511 UString s = thisValue.toThisString(exec); 512 512 513 JSValuePtr a0 = args.at( exec,0);513 JSValuePtr a0 = args.at(0); 514 514 515 515 UString u = s; … … 537 537 int len = s.size(); 538 538 539 JSValuePtr a0 = args.at( exec,0);540 JSValuePtr a1 = args.at( exec,1);539 JSValuePtr a0 = args.at(0); 540 JSValuePtr a1 = args.at(1); 541 541 542 542 // The arg processing is very much like ArrayProtoFunc::Slice … … 560 560 UString s = thisValue.toThisString(exec); 561 561 562 JSValuePtr a0 = args.at( exec,0);563 JSValuePtr a1 = args.at( exec,1);562 JSValuePtr a0 = args.at(0); 563 JSValuePtr a1 = args.at(1); 564 564 565 565 JSArray* result = constructEmptyArray(exec); … … 623 623 int len = s.size(); 624 624 625 JSValuePtr a0 = args.at( exec,0);626 JSValuePtr a1 = args.at( exec,1);625 JSValuePtr a0 = args.at(0); 626 JSValuePtr a1 = args.at(1); 627 627 628 628 double start = a0.toInteger(exec); … … 645 645 int len = s.size(); 646 646 647 JSValuePtr a0 = args.at( exec,0);648 JSValuePtr a1 = args.at( exec,1);647 JSValuePtr a0 = args.at(0); 648 JSValuePtr a1 = args.at(1); 649 649 650 650 double start = a0.toNumber(exec); … … 746 746 747 747 UString s = thisValue.toThisString(exec); 748 JSValuePtr a0 = args.at( exec,0);748 JSValuePtr a0 = args.at(0); 749 749 return jsNumber(exec, localeCompare(s, a0.toString(exec))); 750 750 } … … 807 807 { 808 808 UString s = thisValue.toThisString(exec); 809 JSValuePtr a0 = args.at( exec,0);809 JSValuePtr a0 = args.at(0); 810 810 return jsNontrivialString(exec, "<font color=\"" + a0.toString(exec) + "\">" + s + "</font>"); 811 811 } … … 814 814 { 815 815 UString s = thisValue.toThisString(exec); 816 JSValuePtr a0 = args.at( exec,0);816 JSValuePtr a0 = args.at(0); 817 817 818 818 uint32_t smallInteger; … … 855 855 { 856 856 UString s = thisValue.toThisString(exec); 857 JSValuePtr a0 = args.at( exec,0);857 JSValuePtr a0 = args.at(0); 858 858 return jsNontrivialString(exec, "<a name=\"" + a0.toString(exec) + "\">" + s + "</a>"); 859 859 } … … 862 862 { 863 863 UString s = thisValue.toThisString(exec); 864 JSValuePtr a0 = args.at( exec,0);864 JSValuePtr a0 = args.at(0); 865 865 UString linkText = a0.toString(exec); 866 866
Note:
See TracChangeset
for help on using the changeset viewer.