Changeset 43122 in webkit for trunk/JavaScriptCore/interpreter/Interpreter.cpp
- Timestamp:
- May 1, 2009, 3:43:39 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/interpreter/Interpreter.cpp
r43121 r43122 91 91 } 92 92 93 NEVER_INLINE bool Interpreter::resolve(CallFrame* callFrame, Instruction* vPC, JSValue Ptr& exceptionValue)93 NEVER_INLINE bool Interpreter::resolve(CallFrame* callFrame, Instruction* vPC, JSValue& exceptionValue) 94 94 { 95 95 int dst = (vPC + 1)->u.operand; … … 107 107 PropertySlot slot(o); 108 108 if (o->getPropertySlot(callFrame, ident, slot)) { 109 JSValue Ptrresult = slot.getValue(callFrame, ident);109 JSValue result = slot.getValue(callFrame, ident); 110 110 exceptionValue = callFrame->globalData().exception; 111 111 if (exceptionValue) 112 112 return false; 113 callFrame[dst] = JSValue Ptr(result);113 callFrame[dst] = JSValue(result); 114 114 return true; 115 115 } … … 119 119 } 120 120 121 NEVER_INLINE bool Interpreter::resolveSkip(CallFrame* callFrame, Instruction* vPC, JSValue Ptr& exceptionValue)121 NEVER_INLINE bool Interpreter::resolveSkip(CallFrame* callFrame, Instruction* vPC, JSValue& exceptionValue) 122 122 { 123 123 CodeBlock* codeBlock = callFrame->codeBlock(); … … 140 140 PropertySlot slot(o); 141 141 if (o->getPropertySlot(callFrame, ident, slot)) { 142 JSValue Ptrresult = slot.getValue(callFrame, ident);142 JSValue result = slot.getValue(callFrame, ident); 143 143 exceptionValue = callFrame->globalData().exception; 144 144 if (exceptionValue) 145 145 return false; 146 callFrame[dst] = JSValue Ptr(result);146 callFrame[dst] = JSValue(result); 147 147 return true; 148 148 } … … 152 152 } 153 153 154 NEVER_INLINE bool Interpreter::resolveGlobal(CallFrame* callFrame, Instruction* vPC, JSValue Ptr& exceptionValue)154 NEVER_INLINE bool Interpreter::resolveGlobal(CallFrame* callFrame, Instruction* vPC, JSValue& exceptionValue) 155 155 { 156 156 int dst = (vPC + 1)->u.operand; … … 162 162 163 163 if (structure == globalObject->structure()) { 164 callFrame[dst] = JSValue Ptr(globalObject->getDirectOffset(offset));164 callFrame[dst] = JSValue(globalObject->getDirectOffset(offset)); 165 165 return true; 166 166 } … … 170 170 PropertySlot slot(globalObject); 171 171 if (globalObject->getPropertySlot(callFrame, ident, slot)) { 172 JSValue Ptrresult = slot.getValue(callFrame, ident);172 JSValue result = slot.getValue(callFrame, ident); 173 173 if (slot.isCacheable() && !globalObject->structure()->isDictionary()) { 174 174 if (vPC[4].u.structure) … … 177 177 vPC[4] = globalObject->structure(); 178 178 vPC[5] = slot.cachedOffset(); 179 callFrame[dst] = JSValue Ptr(result);179 callFrame[dst] = JSValue(result); 180 180 return true; 181 181 } … … 184 184 if (exceptionValue) 185 185 return false; 186 callFrame[dst] = JSValue Ptr(result);186 callFrame[dst] = JSValue(result); 187 187 return true; 188 188 } … … 196 196 int dst = (vPC + 1)->u.operand; 197 197 int property = (vPC + 2)->u.operand; 198 callFrame[dst] = JSValue Ptr(JSC::resolveBase(callFrame, callFrame->codeBlock()->identifier(property), callFrame->scopeChain()));198 callFrame[dst] = JSValue(JSC::resolveBase(callFrame, callFrame->codeBlock()->identifier(property), callFrame->scopeChain())); 199 199 } 200 200 201 NEVER_INLINE bool Interpreter::resolveBaseAndProperty(CallFrame* callFrame, Instruction* vPC, JSValue Ptr& exceptionValue)201 NEVER_INLINE bool Interpreter::resolveBaseAndProperty(CallFrame* callFrame, Instruction* vPC, JSValue& exceptionValue) 202 202 { 203 203 int baseDst = (vPC + 1)->u.operand; … … 220 220 PropertySlot slot(base); 221 221 if (base->getPropertySlot(callFrame, ident, slot)) { 222 JSValue Ptrresult = slot.getValue(callFrame, ident);222 JSValue result = slot.getValue(callFrame, ident); 223 223 exceptionValue = callFrame->globalData().exception; 224 224 if (exceptionValue) 225 225 return false; 226 callFrame[propDst] = JSValue Ptr(result);227 callFrame[baseDst] = JSValue Ptr(base);226 callFrame[propDst] = JSValue(result); 227 callFrame[baseDst] = JSValue(base); 228 228 return true; 229 229 } … … 235 235 } 236 236 237 NEVER_INLINE bool Interpreter::resolveBaseAndFunc(CallFrame* callFrame, Instruction* vPC, JSValue Ptr& exceptionValue)237 NEVER_INLINE bool Interpreter::resolveBaseAndFunc(CallFrame* callFrame, Instruction* vPC, JSValue& exceptionValue) 238 238 { 239 239 int baseDst = (vPC + 1)->u.operand; … … 264 264 // We also handle wrapper substitution for the global object at the same time. 265 265 JSObject* thisObj = base->toThisObject(callFrame); 266 JSValue Ptrresult = slot.getValue(callFrame, ident);266 JSValue result = slot.getValue(callFrame, ident); 267 267 exceptionValue = callFrame->globalData().exception; 268 268 if (exceptionValue) 269 269 return false; 270 270 271 callFrame[baseDst] = JSValue Ptr(thisObj);272 callFrame[funcDst] = JSValue Ptr(result);271 callFrame[baseDst] = JSValue(thisObj); 272 callFrame[funcDst] = JSValue(result); 273 273 return true; 274 274 } … … 317 317 } 318 318 319 static NEVER_INLINE bool isNotObject(CallFrame* callFrame, bool forInstanceOf, CodeBlock* codeBlock, const Instruction* vPC, JSValue Ptr value, JSValuePtr& exceptionData)319 static NEVER_INLINE bool isNotObject(CallFrame* callFrame, bool forInstanceOf, CodeBlock* codeBlock, const Instruction* vPC, JSValue value, JSValue& exceptionData) 320 320 { 321 321 if (value.isObject()) … … 325 325 } 326 326 327 NEVER_INLINE JSValue Ptr Interpreter::callEval(CallFrame* callFrame, RegisterFile* registerFile, Register* argv, int argc, int registerOffset, JSValuePtr& exceptionValue)327 NEVER_INLINE JSValue Interpreter::callEval(CallFrame* callFrame, RegisterFile* registerFile, Register* argv, int argc, int registerOffset, JSValue& exceptionValue) 328 328 { 329 329 if (argc < 2) 330 330 return jsUndefined(); 331 331 332 JSValue Ptrprogram = argv[1].jsValue();332 JSValue program = argv[1].jsValue(); 333 333 334 334 if (!program.isString()) … … 341 341 RefPtr<EvalNode> evalNode = codeBlock->evalCodeCache().get(callFrame, programSource, scopeChain, exceptionValue); 342 342 343 JSValue Ptrresult = jsUndefined();343 JSValue result = jsUndefined(); 344 344 if (evalNode) 345 345 result = callFrame->globalData().interpreter->execute(evalNode.get(), callFrame, callFrame->thisValue().toThisObject(callFrame), callFrame->registers() - registerFile->start() + registerOffset, scopeChain, &exceptionValue); … … 452 452 } 453 453 454 NEVER_INLINE bool Interpreter::unwindCallFrame(CallFrame*& callFrame, JSValue PtrexceptionValue, unsigned& bytecodeOffset, CodeBlock*& codeBlock)454 NEVER_INLINE bool Interpreter::unwindCallFrame(CallFrame*& callFrame, JSValue exceptionValue, unsigned& bytecodeOffset, CodeBlock*& codeBlock) 455 455 { 456 456 CodeBlock* oldCodeBlock = codeBlock; … … 495 495 } 496 496 497 NEVER_INLINE HandlerInfo* Interpreter::throwException(CallFrame*& callFrame, JSValue Ptr& exceptionValue, unsigned bytecodeOffset, bool explicitThrow)497 NEVER_INLINE HandlerInfo* Interpreter::throwException(CallFrame*& callFrame, JSValue& exceptionValue, unsigned bytecodeOffset, bool explicitThrow) 498 498 { 499 499 // Set up the exception object … … 580 580 } 581 581 582 JSValue Ptr Interpreter::execute(ProgramNode* programNode, CallFrame* callFrame, ScopeChainNode* scopeChain, JSObject* thisObj, JSValuePtr* exception)582 JSValue Interpreter::execute(ProgramNode* programNode, CallFrame* callFrame, ScopeChainNode* scopeChain, JSObject* thisObj, JSValue* exception) 583 583 { 584 584 ASSERT(!scopeChain->globalData->exception); … … 607 607 608 608 CallFrame* newCallFrame = CallFrame::create(oldEnd + codeBlock->m_numParameters + RegisterFile::CallFrameHeaderSize); 609 newCallFrame[codeBlock->thisRegister()] = JSValue Ptr(thisObj);609 newCallFrame[codeBlock->thisRegister()] = JSValue(thisObj); 610 610 newCallFrame->init(codeBlock, 0, scopeChain, CallFrame::noCaller(), 0, 0, 0); 611 611 … … 617 617 (*profiler)->willExecute(newCallFrame, programNode->sourceURL(), programNode->lineNo()); 618 618 619 JSValue Ptrresult;619 JSValue result; 620 620 { 621 621 SamplingTool::CallRecord callRecord(m_sampler); … … 643 643 } 644 644 645 JSValue Ptr Interpreter::execute(FunctionBodyNode* functionBodyNode, CallFrame* callFrame, JSFunction* function, JSObject* thisObj, const ArgList& args, ScopeChainNode* scopeChain, JSValuePtr* exception)645 JSValue Interpreter::execute(FunctionBodyNode* functionBodyNode, CallFrame* callFrame, JSFunction* function, JSObject* thisObj, const ArgList& args, ScopeChainNode* scopeChain, JSValue* exception) 646 646 { 647 647 ASSERT(!scopeChain->globalData->exception); … … 666 666 CallFrame* newCallFrame = CallFrame::create(oldEnd); 667 667 size_t dst = 0; 668 newCallFrame[0] = JSValue Ptr(thisObj);668 newCallFrame[0] = JSValue(thisObj); 669 669 ArgList::const_iterator end = args.end(); 670 670 for (ArgList::const_iterator it = args.begin(); it != end; ++it) … … 685 685 (*profiler)->willExecute(callFrame, function); 686 686 687 JSValue Ptrresult;687 JSValue result; 688 688 { 689 689 SamplingTool::CallRecord callRecord(m_sampler); … … 707 707 } 708 708 709 CallFrameClosure Interpreter::prepareForRepeatCall(FunctionBodyNode* functionBodyNode, CallFrame* callFrame, JSFunction* function, int argCount, ScopeChainNode* scopeChain, JSValue Ptr* exception)709 CallFrameClosure Interpreter::prepareForRepeatCall(FunctionBodyNode* functionBodyNode, CallFrame* callFrame, JSFunction* function, int argCount, ScopeChainNode* scopeChain, JSValue* exception) 710 710 { 711 711 ASSERT(!scopeChain->globalData->exception); … … 749 749 } 750 750 751 JSValue Ptr Interpreter::execute(CallFrameClosure& closure, JSValuePtr* exception)751 JSValue Interpreter::execute(CallFrameClosure& closure, JSValue* exception) 752 752 { 753 753 closure.resetCallFrame(); … … 756 756 (*profiler)->willExecute(closure.oldCallFrame, closure.function); 757 757 758 JSValue Ptrresult;758 JSValue result; 759 759 { 760 760 SamplingTool::CallRecord callRecord(m_sampler); … … 779 779 } 780 780 781 JSValue Ptr Interpreter::execute(EvalNode* evalNode, CallFrame* callFrame, JSObject* thisObj, ScopeChainNode* scopeChain, JSValuePtr* exception)781 JSValue Interpreter::execute(EvalNode* evalNode, CallFrame* callFrame, JSObject* thisObj, ScopeChainNode* scopeChain, JSValue* exception) 782 782 { 783 783 return execute(evalNode, callFrame, thisObj, m_registerFile.size() + evalNode->bytecode(scopeChain).m_numParameters + RegisterFile::CallFrameHeaderSize, scopeChain, exception); 784 784 } 785 785 786 JSValue Ptr Interpreter::execute(EvalNode* evalNode, CallFrame* callFrame, JSObject* thisObj, int globalRegisterOffset, ScopeChainNode* scopeChain, JSValuePtr* exception)786 JSValue Interpreter::execute(EvalNode* evalNode, CallFrame* callFrame, JSObject* thisObj, int globalRegisterOffset, ScopeChainNode* scopeChain, JSValue* exception) 787 787 { 788 788 ASSERT(!scopeChain->globalData->exception); … … 841 841 842 842 // a 0 codeBlock indicates a built-in caller 843 newCallFrame[codeBlock->thisRegister()] = JSValue Ptr(thisObj);843 newCallFrame[codeBlock->thisRegister()] = JSValue(thisObj); 844 844 newCallFrame->init(codeBlock, 0, scopeChain, callFrame->addHostCallFrameFlag(), 0, 0, 0); 845 845 … … 851 851 (*profiler)->willExecute(newCallFrame, evalNode->sourceURL(), evalNode->lineNo()); 852 852 853 JSValue Ptrresult;853 JSValue result; 854 854 { 855 855 SamplingTool::CallRecord callRecord(m_sampler); … … 906 906 CodeBlock* codeBlock = callFrame->codeBlock(); 907 907 Identifier& property = codeBlock->identifier((++vPC)->u.operand); 908 JSValue Ptrvalue = callFrame[(++vPC)->u.operand].jsValue();908 JSValue value = callFrame[(++vPC)->u.operand].jsValue(); 909 909 JSObject* scope = new (callFrame) JSStaticScopeObject(callFrame, property, value, DontDelete); 910 callFrame[dst] = JSValue Ptr(scope);910 callFrame[dst] = JSValue(scope); 911 911 912 912 return callFrame->scopeChain()->push(scope); 913 913 } 914 914 915 NEVER_INLINE void Interpreter::tryCachePutByID(CallFrame* callFrame, CodeBlock* codeBlock, Instruction* vPC, JSValue PtrbaseValue, const PutPropertySlot& slot)915 NEVER_INLINE void Interpreter::tryCachePutByID(CallFrame* callFrame, CodeBlock* codeBlock, Instruction* vPC, JSValue baseValue, const PutPropertySlot& slot) 916 916 { 917 917 // Recursive invocation may already have specialized this instruction. … … 981 981 } 982 982 983 NEVER_INLINE void Interpreter::tryCacheGetByID(CallFrame* callFrame, CodeBlock* codeBlock, Instruction* vPC, JSValue PtrbaseValue, const Identifier& propertyName, const PropertySlot& slot)983 NEVER_INLINE void Interpreter::tryCacheGetByID(CallFrame* callFrame, CodeBlock* codeBlock, Instruction* vPC, JSValue baseValue, const Identifier& propertyName, const PropertySlot& slot) 984 984 { 985 985 // Recursive invocation may already have specialized this instruction. … … 1080 1080 } 1081 1081 1082 JSValue Ptr Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFile, CallFrame* callFrame, JSValuePtr* exception)1082 JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFile, CallFrame* callFrame, JSValue* exception) 1083 1083 { 1084 1084 // One-time initialization of our address tables. We have to put this code … … 1104 1104 1105 1105 JSGlobalData* globalData = &callFrame->globalData(); 1106 JSValue PtrexceptionValue = noValue();1106 JSValue exceptionValue = noValue(); 1107 1107 HandlerInfo* handler = 0; 1108 1108 … … 1165 1165 */ 1166 1166 int dst = (++vPC)->u.operand; 1167 callFrame[dst] = JSValue Ptr(constructEmptyObject(callFrame));1167 callFrame[dst] = JSValue(constructEmptyObject(callFrame)); 1168 1168 1169 1169 ++vPC; … … 1182 1182 int argCount = (++vPC)->u.operand; 1183 1183 ArgList args(callFrame->registers() + firstArg, argCount); 1184 callFrame[dst] = JSValue Ptr(constructArray(callFrame, args));1184 callFrame[dst] = JSValue(constructArray(callFrame, args)); 1185 1185 1186 1186 ++vPC; … … 1196 1196 int dst = (++vPC)->u.operand; 1197 1197 int regExp = (++vPC)->u.operand; 1198 callFrame[dst] = JSValue Ptr(new (globalData) RegExpObject(callFrame->scopeChain()->globalObject()->regExpStructure(), callFrame->codeBlock()->regexp(regExp)));1198 callFrame[dst] = JSValue(new (globalData) RegExpObject(callFrame->scopeChain()->globalObject()->regExpStructure(), callFrame->codeBlock()->regexp(regExp))); 1199 1199 1200 1200 ++vPC; … … 1221 1221 */ 1222 1222 int dst = (++vPC)->u.operand; 1223 JSValue Ptrsrc1 = callFrame[(++vPC)->u.operand].jsValue();1224 JSValue Ptrsrc2 = callFrame[(++vPC)->u.operand].jsValue();1223 JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); 1224 JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); 1225 1225 if (JSFastMath::canDoFastBitwiseOperations(src1, src2)) 1226 1226 callFrame[dst] = JSFastMath::equal(src1, src2); 1227 1227 else { 1228 JSValue Ptr result = jsBoolean(JSValuePtr::equalSlowCase(callFrame, src1, src2));1228 JSValue result = jsBoolean(JSValue::equalSlowCase(callFrame, src1, src2)); 1229 1229 CHECK_FOR_EXCEPTION(); 1230 1230 callFrame[dst] = result; … … 1241 1241 */ 1242 1242 int dst = (++vPC)->u.operand; 1243 JSValue Ptrsrc = callFrame[(++vPC)->u.operand].jsValue();1243 JSValue src = callFrame[(++vPC)->u.operand].jsValue(); 1244 1244 1245 1245 if (src.isUndefinedOrNull()) { … … 1261 1261 */ 1262 1262 int dst = (++vPC)->u.operand; 1263 JSValue Ptrsrc1 = callFrame[(++vPC)->u.operand].jsValue();1264 JSValue Ptrsrc2 = callFrame[(++vPC)->u.operand].jsValue();1263 JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); 1264 JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); 1265 1265 if (JSFastMath::canDoFastBitwiseOperations(src1, src2)) 1266 1266 callFrame[dst] = JSFastMath::notEqual(src1, src2); 1267 1267 else { 1268 JSValue Ptr result = jsBoolean(!JSValuePtr::equalSlowCase(callFrame, src1, src2));1268 JSValue result = jsBoolean(!JSValue::equalSlowCase(callFrame, src1, src2)); 1269 1269 CHECK_FOR_EXCEPTION(); 1270 1270 callFrame[dst] = result; … … 1281 1281 */ 1282 1282 int dst = (++vPC)->u.operand; 1283 JSValue Ptrsrc = callFrame[(++vPC)->u.operand].jsValue();1283 JSValue src = callFrame[(++vPC)->u.operand].jsValue(); 1284 1284 1285 1285 if (src.isUndefinedOrNull()) { … … 1301 1301 */ 1302 1302 int dst = (++vPC)->u.operand; 1303 JSValue Ptrsrc1 = callFrame[(++vPC)->u.operand].jsValue();1304 JSValue Ptrsrc2 = callFrame[(++vPC)->u.operand].jsValue();1305 callFrame[dst] = jsBoolean(JSValue Ptr::strictEqual(src1, src2));1303 JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); 1304 JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); 1305 callFrame[dst] = jsBoolean(JSValue::strictEqual(src1, src2)); 1306 1306 1307 1307 ++vPC; … … 1316 1316 */ 1317 1317 int dst = (++vPC)->u.operand; 1318 JSValue Ptrsrc1 = callFrame[(++vPC)->u.operand].jsValue();1319 JSValue Ptrsrc2 = callFrame[(++vPC)->u.operand].jsValue();1320 callFrame[dst] = jsBoolean(!JSValue Ptr::strictEqual(src1, src2));1318 JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); 1319 JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); 1320 callFrame[dst] = jsBoolean(!JSValue::strictEqual(src1, src2)); 1321 1321 1322 1322 ++vPC; … … 1331 1331 */ 1332 1332 int dst = (++vPC)->u.operand; 1333 JSValue Ptrsrc1 = callFrame[(++vPC)->u.operand].jsValue();1334 JSValue Ptrsrc2 = callFrame[(++vPC)->u.operand].jsValue();1335 JSValue Ptrresult = jsBoolean(jsLess(callFrame, src1, src2));1333 JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); 1334 JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); 1335 JSValue result = jsBoolean(jsLess(callFrame, src1, src2)); 1336 1336 CHECK_FOR_EXCEPTION(); 1337 1337 callFrame[dst] = result; … … 1348 1348 */ 1349 1349 int dst = (++vPC)->u.operand; 1350 JSValue Ptrsrc1 = callFrame[(++vPC)->u.operand].jsValue();1351 JSValue Ptrsrc2 = callFrame[(++vPC)->u.operand].jsValue();1352 JSValue Ptrresult = jsBoolean(jsLessEq(callFrame, src1, src2));1350 JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); 1351 JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); 1352 JSValue result = jsBoolean(jsLessEq(callFrame, src1, src2)); 1353 1353 CHECK_FOR_EXCEPTION(); 1354 1354 callFrame[dst] = result; … … 1364 1364 */ 1365 1365 int srcDst = (++vPC)->u.operand; 1366 JSValue Ptrv = callFrame[srcDst].jsValue();1366 JSValue v = callFrame[srcDst].jsValue(); 1367 1367 if (JSFastMath::canDoFastAdditiveOperations(v)) 1368 callFrame[srcDst] = JSValue Ptr(JSFastMath::incImmediateNumber(v));1368 callFrame[srcDst] = JSValue(JSFastMath::incImmediateNumber(v)); 1369 1369 else { 1370 JSValue Ptrresult = jsNumber(callFrame, v.toNumber(callFrame) + 1);1370 JSValue result = jsNumber(callFrame, v.toNumber(callFrame) + 1); 1371 1371 CHECK_FOR_EXCEPTION(); 1372 1372 callFrame[srcDst] = result; … … 1383 1383 */ 1384 1384 int srcDst = (++vPC)->u.operand; 1385 JSValue Ptrv = callFrame[srcDst].jsValue();1385 JSValue v = callFrame[srcDst].jsValue(); 1386 1386 if (JSFastMath::canDoFastAdditiveOperations(v)) 1387 callFrame[srcDst] = JSValue Ptr(JSFastMath::decImmediateNumber(v));1387 callFrame[srcDst] = JSValue(JSFastMath::decImmediateNumber(v)); 1388 1388 else { 1389 JSValue Ptrresult = jsNumber(callFrame, v.toNumber(callFrame) - 1);1389 JSValue result = jsNumber(callFrame, v.toNumber(callFrame) - 1); 1390 1390 CHECK_FOR_EXCEPTION(); 1391 1391 callFrame[srcDst] = result; … … 1404 1404 int dst = (++vPC)->u.operand; 1405 1405 int srcDst = (++vPC)->u.operand; 1406 JSValue Ptrv = callFrame[srcDst].jsValue();1406 JSValue v = callFrame[srcDst].jsValue(); 1407 1407 if (JSFastMath::canDoFastAdditiveOperations(v)) { 1408 1408 callFrame[dst] = v; 1409 callFrame[srcDst] = JSValue Ptr(JSFastMath::incImmediateNumber(v));1409 callFrame[srcDst] = JSValue(JSFastMath::incImmediateNumber(v)); 1410 1410 } else { 1411 JSValue Ptrnumber = callFrame[srcDst].jsValue().toJSNumber(callFrame);1411 JSValue number = callFrame[srcDst].jsValue().toJSNumber(callFrame); 1412 1412 CHECK_FOR_EXCEPTION(); 1413 1413 callFrame[dst] = number; 1414 callFrame[srcDst] = JSValue Ptr(jsNumber(callFrame, number.uncheckedGetNumber() + 1));1414 callFrame[srcDst] = JSValue(jsNumber(callFrame, number.uncheckedGetNumber() + 1)); 1415 1415 } 1416 1416 … … 1427 1427 int dst = (++vPC)->u.operand; 1428 1428 int srcDst = (++vPC)->u.operand; 1429 JSValue Ptrv = callFrame[srcDst].jsValue();1429 JSValue v = callFrame[srcDst].jsValue(); 1430 1430 if (JSFastMath::canDoFastAdditiveOperations(v)) { 1431 1431 callFrame[dst] = v; 1432 callFrame[srcDst] = JSValue Ptr(JSFastMath::decImmediateNumber(v));1432 callFrame[srcDst] = JSValue(JSFastMath::decImmediateNumber(v)); 1433 1433 } else { 1434 JSValue Ptrnumber = callFrame[srcDst].jsValue().toJSNumber(callFrame);1434 JSValue number = callFrame[srcDst].jsValue().toJSNumber(callFrame); 1435 1435 CHECK_FOR_EXCEPTION(); 1436 1436 callFrame[dst] = number; 1437 callFrame[srcDst] = JSValue Ptr(jsNumber(callFrame, number.uncheckedGetNumber() - 1));1437 callFrame[srcDst] = JSValue(jsNumber(callFrame, number.uncheckedGetNumber() - 1)); 1438 1438 } 1439 1439 … … 1450 1450 int src = (++vPC)->u.operand; 1451 1451 1452 JSValue PtrsrcVal = callFrame[src].jsValue();1452 JSValue srcVal = callFrame[src].jsValue(); 1453 1453 1454 1454 if (LIKELY(srcVal.isNumber())) 1455 1455 callFrame[dst] = callFrame[src]; 1456 1456 else { 1457 JSValue Ptrresult = srcVal.toJSNumber(callFrame);1457 JSValue result = srcVal.toJSNumber(callFrame); 1458 1458 CHECK_FOR_EXCEPTION(); 1459 1459 callFrame[dst] = result; … … 1470 1470 */ 1471 1471 int dst = (++vPC)->u.operand; 1472 JSValue Ptrsrc = callFrame[(++vPC)->u.operand].jsValue();1472 JSValue src = callFrame[(++vPC)->u.operand].jsValue(); 1473 1473 ++vPC; 1474 1474 double v; 1475 1475 if (src.getNumber(v)) 1476 callFrame[dst] = JSValue Ptr(jsNumber(callFrame, -v));1476 callFrame[dst] = JSValue(jsNumber(callFrame, -v)); 1477 1477 else { 1478 JSValue Ptrresult = jsNumber(callFrame, -src.toNumber(callFrame));1478 JSValue result = jsNumber(callFrame, -src.toNumber(callFrame)); 1479 1479 CHECK_FOR_EXCEPTION(); 1480 1480 callFrame[dst] = result; … … 1491 1491 */ 1492 1492 int dst = (++vPC)->u.operand; 1493 JSValue Ptrsrc1 = callFrame[(++vPC)->u.operand].jsValue();1494 JSValue Ptrsrc2 = callFrame[(++vPC)->u.operand].jsValue();1493 JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); 1494 JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); 1495 1495 if (JSFastMath::canDoFastAdditiveOperations(src1, src2)) 1496 callFrame[dst] = JSValue Ptr(JSFastMath::addImmediateNumbers(src1, src2));1496 callFrame[dst] = JSValue(JSFastMath::addImmediateNumbers(src1, src2)); 1497 1497 else { 1498 JSValue Ptrresult = jsAdd(callFrame, src1, src2);1498 JSValue result = jsAdd(callFrame, src1, src2); 1499 1499 CHECK_FOR_EXCEPTION(); 1500 1500 callFrame[dst] = result; … … 1510 1510 */ 1511 1511 int dst = (++vPC)->u.operand; 1512 JSValue Ptrsrc1 = callFrame[(++vPC)->u.operand].jsValue();1513 JSValue Ptrsrc2 = callFrame[(++vPC)->u.operand].jsValue();1512 JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); 1513 JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); 1514 1514 double left; 1515 1515 double right; 1516 if (JSValue Ptr::areBothInt32Fast(src1, src2)) {1516 if (JSValue::areBothInt32Fast(src1, src2)) { 1517 1517 int32_t left = src1.getInt32Fast(); 1518 1518 int32_t right = src2.getInt32Fast(); 1519 1519 if ((left | right) >> 15 == 0) 1520 callFrame[dst] = JSValue Ptr(jsNumber(callFrame, left * right));1520 callFrame[dst] = JSValue(jsNumber(callFrame, left * right)); 1521 1521 else 1522 callFrame[dst] = JSValue Ptr(jsNumber(callFrame, static_cast<double>(left) * static_cast<double>(right)));1522 callFrame[dst] = JSValue(jsNumber(callFrame, static_cast<double>(left) * static_cast<double>(right))); 1523 1523 } else if (src1.getNumber(left) && src2.getNumber(right)) 1524 callFrame[dst] = JSValue Ptr(jsNumber(callFrame, left * right));1524 callFrame[dst] = JSValue(jsNumber(callFrame, left * right)); 1525 1525 else { 1526 JSValue Ptrresult = jsNumber(callFrame, src1.toNumber(callFrame) * src2.toNumber(callFrame));1526 JSValue result = jsNumber(callFrame, src1.toNumber(callFrame) * src2.toNumber(callFrame)); 1527 1527 CHECK_FOR_EXCEPTION(); 1528 1528 callFrame[dst] = result; … … 1540 1540 */ 1541 1541 int dst = (++vPC)->u.operand; 1542 JSValue Ptrdividend = callFrame[(++vPC)->u.operand].jsValue();1543 JSValue Ptrdivisor = callFrame[(++vPC)->u.operand].jsValue();1542 JSValue dividend = callFrame[(++vPC)->u.operand].jsValue(); 1543 JSValue divisor = callFrame[(++vPC)->u.operand].jsValue(); 1544 1544 double left; 1545 1545 double right; 1546 1546 if (dividend.getNumber(left) && divisor.getNumber(right)) 1547 callFrame[dst] = JSValue Ptr(jsNumber(callFrame, left / right));1547 callFrame[dst] = JSValue(jsNumber(callFrame, left / right)); 1548 1548 else { 1549 JSValue Ptrresult = jsNumber(callFrame, dividend.toNumber(callFrame) / divisor.toNumber(callFrame));1549 JSValue result = jsNumber(callFrame, dividend.toNumber(callFrame) / divisor.toNumber(callFrame)); 1550 1550 CHECK_FOR_EXCEPTION(); 1551 1551 callFrame[dst] = result; … … 1565 1565 int divisor = (++vPC)->u.operand; 1566 1566 1567 JSValue PtrdividendValue = callFrame[dividend].jsValue();1568 JSValue PtrdivisorValue = callFrame[divisor].jsValue();1569 1570 if (JSValue Ptr::areBothInt32Fast(dividendValue, divisorValue) && divisorValue != jsNumber(callFrame, 0)) {1567 JSValue dividendValue = callFrame[dividend].jsValue(); 1568 JSValue divisorValue = callFrame[divisor].jsValue(); 1569 1570 if (JSValue::areBothInt32Fast(dividendValue, divisorValue) && divisorValue != jsNumber(callFrame, 0)) { 1571 1571 // We expect the result of the modulus of a number that was representable as an int32 to also be representable 1572 1572 // as an int32. 1573 JSValue Ptr result = JSValuePtr::makeInt32Fast(dividendValue.getInt32Fast() % divisorValue.getInt32Fast());1573 JSValue result = JSValue::makeInt32Fast(dividendValue.getInt32Fast() % divisorValue.getInt32Fast()); 1574 1574 ASSERT(result); 1575 1575 callFrame[dst] = result; … … 1579 1579 1580 1580 double d = dividendValue.toNumber(callFrame); 1581 JSValue Ptrresult = jsNumber(callFrame, fmod(d, divisorValue.toNumber(callFrame)));1581 JSValue result = jsNumber(callFrame, fmod(d, divisorValue.toNumber(callFrame))); 1582 1582 CHECK_FOR_EXCEPTION(); 1583 1583 callFrame[dst] = result; … … 1593 1593 */ 1594 1594 int dst = (++vPC)->u.operand; 1595 JSValue Ptrsrc1 = callFrame[(++vPC)->u.operand].jsValue();1596 JSValue Ptrsrc2 = callFrame[(++vPC)->u.operand].jsValue();1595 JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); 1596 JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); 1597 1597 double left; 1598 1598 double right; 1599 1599 if (JSFastMath::canDoFastAdditiveOperations(src1, src2)) 1600 callFrame[dst] = JSValue Ptr(JSFastMath::subImmediateNumbers(src1, src2));1600 callFrame[dst] = JSValue(JSFastMath::subImmediateNumbers(src1, src2)); 1601 1601 else if (src1.getNumber(left) && src2.getNumber(right)) 1602 callFrame[dst] = JSValue Ptr(jsNumber(callFrame, left - right));1602 callFrame[dst] = JSValue(jsNumber(callFrame, left - right)); 1603 1603 else { 1604 JSValue Ptrresult = jsNumber(callFrame, src1.toNumber(callFrame) - src2.toNumber(callFrame));1604 JSValue result = jsNumber(callFrame, src1.toNumber(callFrame) - src2.toNumber(callFrame)); 1605 1605 CHECK_FOR_EXCEPTION(); 1606 1606 callFrame[dst] = result; … … 1617 1617 */ 1618 1618 int dst = (++vPC)->u.operand; 1619 JSValue Ptrval = callFrame[(++vPC)->u.operand].jsValue();1620 JSValue Ptrshift = callFrame[(++vPC)->u.operand].jsValue();1619 JSValue val = callFrame[(++vPC)->u.operand].jsValue(); 1620 JSValue shift = callFrame[(++vPC)->u.operand].jsValue(); 1621 1621 int32_t left; 1622 1622 uint32_t right; 1623 if (JSValue Ptr::areBothInt32Fast(val, shift))1624 callFrame[dst] = JSValue Ptr(jsNumber(callFrame, val.getInt32Fast() << (shift.getInt32Fast() & 0x1f)));1623 if (JSValue::areBothInt32Fast(val, shift)) 1624 callFrame[dst] = JSValue(jsNumber(callFrame, val.getInt32Fast() << (shift.getInt32Fast() & 0x1f))); 1625 1625 else if (val.numberToInt32(left) && shift.numberToUInt32(right)) 1626 callFrame[dst] = JSValue Ptr(jsNumber(callFrame, left << (right & 0x1f)));1626 callFrame[dst] = JSValue(jsNumber(callFrame, left << (right & 0x1f))); 1627 1627 else { 1628 JSValue Ptrresult = jsNumber(callFrame, (val.toInt32(callFrame)) << (shift.toUInt32(callFrame) & 0x1f));1628 JSValue result = jsNumber(callFrame, (val.toInt32(callFrame)) << (shift.toUInt32(callFrame) & 0x1f)); 1629 1629 CHECK_FOR_EXCEPTION(); 1630 1630 callFrame[dst] = result; … … 1642 1642 */ 1643 1643 int dst = (++vPC)->u.operand; 1644 JSValue Ptrval = callFrame[(++vPC)->u.operand].jsValue();1645 JSValue Ptrshift = callFrame[(++vPC)->u.operand].jsValue();1644 JSValue val = callFrame[(++vPC)->u.operand].jsValue(); 1645 JSValue shift = callFrame[(++vPC)->u.operand].jsValue(); 1646 1646 int32_t left; 1647 1647 uint32_t right; 1648 1648 if (JSFastMath::canDoFastRshift(val, shift)) 1649 callFrame[dst] = JSValue Ptr(JSFastMath::rightShiftImmediateNumbers(val, shift));1649 callFrame[dst] = JSValue(JSFastMath::rightShiftImmediateNumbers(val, shift)); 1650 1650 else if (val.numberToInt32(left) && shift.numberToUInt32(right)) 1651 callFrame[dst] = JSValue Ptr(jsNumber(callFrame, left >> (right & 0x1f)));1651 callFrame[dst] = JSValue(jsNumber(callFrame, left >> (right & 0x1f))); 1652 1652 else { 1653 JSValue Ptrresult = jsNumber(callFrame, (val.toInt32(callFrame)) >> (shift.toUInt32(callFrame) & 0x1f));1653 JSValue result = jsNumber(callFrame, (val.toInt32(callFrame)) >> (shift.toUInt32(callFrame) & 0x1f)); 1654 1654 CHECK_FOR_EXCEPTION(); 1655 1655 callFrame[dst] = result; … … 1667 1667 */ 1668 1668 int dst = (++vPC)->u.operand; 1669 JSValue Ptrval = callFrame[(++vPC)->u.operand].jsValue();1670 JSValue Ptrshift = callFrame[(++vPC)->u.operand].jsValue();1669 JSValue val = callFrame[(++vPC)->u.operand].jsValue(); 1670 JSValue shift = callFrame[(++vPC)->u.operand].jsValue(); 1671 1671 if (JSFastMath::canDoFastUrshift(val, shift)) 1672 callFrame[dst] = JSValue Ptr(JSFastMath::rightShiftImmediateNumbers(val, shift));1672 callFrame[dst] = JSValue(JSFastMath::rightShiftImmediateNumbers(val, shift)); 1673 1673 else { 1674 JSValue Ptrresult = jsNumber(callFrame, (val.toUInt32(callFrame)) >> (shift.toUInt32(callFrame) & 0x1f));1674 JSValue result = jsNumber(callFrame, (val.toUInt32(callFrame)) >> (shift.toUInt32(callFrame) & 0x1f)); 1675 1675 CHECK_FOR_EXCEPTION(); 1676 1676 callFrame[dst] = result; … … 1688 1688 */ 1689 1689 int dst = (++vPC)->u.operand; 1690 JSValue Ptrsrc1 = callFrame[(++vPC)->u.operand].jsValue();1691 JSValue Ptrsrc2 = callFrame[(++vPC)->u.operand].jsValue();1690 JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); 1691 JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); 1692 1692 int32_t left; 1693 1693 int32_t right; 1694 1694 if (JSFastMath::canDoFastBitwiseOperations(src1, src2)) 1695 callFrame[dst] = JSValue Ptr(JSFastMath::andImmediateNumbers(src1, src2));1695 callFrame[dst] = JSValue(JSFastMath::andImmediateNumbers(src1, src2)); 1696 1696 else if (src1.numberToInt32(left) && src2.numberToInt32(right)) 1697 callFrame[dst] = JSValue Ptr(jsNumber(callFrame, left & right));1697 callFrame[dst] = JSValue(jsNumber(callFrame, left & right)); 1698 1698 else { 1699 JSValue Ptrresult = jsNumber(callFrame, src1.toInt32(callFrame) & src2.toInt32(callFrame));1699 JSValue result = jsNumber(callFrame, src1.toInt32(callFrame) & src2.toInt32(callFrame)); 1700 1700 CHECK_FOR_EXCEPTION(); 1701 1701 callFrame[dst] = result; … … 1713 1713 */ 1714 1714 int dst = (++vPC)->u.operand; 1715 JSValue Ptrsrc1 = callFrame[(++vPC)->u.operand].jsValue();1716 JSValue Ptrsrc2 = callFrame[(++vPC)->u.operand].jsValue();1715 JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); 1716 JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); 1717 1717 int32_t left; 1718 1718 int32_t right; 1719 1719 if (JSFastMath::canDoFastBitwiseOperations(src1, src2)) 1720 callFrame[dst] = JSValue Ptr(JSFastMath::xorImmediateNumbers(src1, src2));1720 callFrame[dst] = JSValue(JSFastMath::xorImmediateNumbers(src1, src2)); 1721 1721 else if (src1.numberToInt32(left) && src2.numberToInt32(right)) 1722 callFrame[dst] = JSValue Ptr(jsNumber(callFrame, left ^ right));1722 callFrame[dst] = JSValue(jsNumber(callFrame, left ^ right)); 1723 1723 else { 1724 JSValue Ptrresult = jsNumber(callFrame, src1.toInt32(callFrame) ^ src2.toInt32(callFrame));1724 JSValue result = jsNumber(callFrame, src1.toInt32(callFrame) ^ src2.toInt32(callFrame)); 1725 1725 CHECK_FOR_EXCEPTION(); 1726 1726 callFrame[dst] = result; … … 1738 1738 */ 1739 1739 int dst = (++vPC)->u.operand; 1740 JSValue Ptrsrc1 = callFrame[(++vPC)->u.operand].jsValue();1741 JSValue Ptrsrc2 = callFrame[(++vPC)->u.operand].jsValue();1740 JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); 1741 JSValue src2 = callFrame[(++vPC)->u.operand].jsValue(); 1742 1742 int32_t left; 1743 1743 int32_t right; 1744 1744 if (JSFastMath::canDoFastBitwiseOperations(src1, src2)) 1745 callFrame[dst] = JSValue Ptr(JSFastMath::orImmediateNumbers(src1, src2));1745 callFrame[dst] = JSValue(JSFastMath::orImmediateNumbers(src1, src2)); 1746 1746 else if (src1.numberToInt32(left) && src2.numberToInt32(right)) 1747 callFrame[dst] = JSValue Ptr(jsNumber(callFrame, left | right));1747 callFrame[dst] = JSValue(jsNumber(callFrame, left | right)); 1748 1748 else { 1749 JSValue Ptrresult = jsNumber(callFrame, src1.toInt32(callFrame) | src2.toInt32(callFrame));1749 JSValue result = jsNumber(callFrame, src1.toInt32(callFrame) | src2.toInt32(callFrame)); 1750 1750 CHECK_FOR_EXCEPTION(); 1751 1751 callFrame[dst] = result; … … 1762 1762 */ 1763 1763 int dst = (++vPC)->u.operand; 1764 JSValue Ptrsrc = callFrame[(++vPC)->u.operand].jsValue();1764 JSValue src = callFrame[(++vPC)->u.operand].jsValue(); 1765 1765 int32_t value; 1766 1766 if (src.numberToInt32(value)) 1767 callFrame[dst] = JSValue Ptr(jsNumber(callFrame, ~value));1767 callFrame[dst] = JSValue(jsNumber(callFrame, ~value)); 1768 1768 else { 1769 JSValue Ptrresult = jsNumber(callFrame, ~src.toInt32(callFrame));1769 JSValue result = jsNumber(callFrame, ~src.toInt32(callFrame)); 1770 1770 CHECK_FOR_EXCEPTION(); 1771 1771 callFrame[dst] = result; … … 1782 1782 int dst = (++vPC)->u.operand; 1783 1783 int src = (++vPC)->u.operand; 1784 JSValue Ptrresult = jsBoolean(!callFrame[src].jsValue().toBoolean(callFrame));1784 JSValue 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 JSValue PtrbaseVal = callFrame[base].jsValue();1809 JSValue baseVal = callFrame[base].jsValue(); 1810 1810 1811 1811 if (isNotObject(callFrame, true, callFrame->codeBlock(), vPC, baseVal, exceptionValue)) … … 1831 1831 int dst = (++vPC)->u.operand; 1832 1832 int src = (++vPC)->u.operand; 1833 callFrame[dst] = JSValue Ptr(jsTypeStringForValue(callFrame, callFrame[src].jsValue()));1833 callFrame[dst] = JSValue(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 JSValue Ptrv = callFrame[src].jsValue();1847 JSValue v = callFrame[src].jsValue(); 1848 1848 callFrame[dst] = jsBoolean(v.isCell() ? v.asCell()->structure()->typeInfo().masqueradesAsUndefined() : v.isUndefined()); 1849 1849 … … 1934 1934 int base = (++vPC)->u.operand; 1935 1935 1936 JSValue PtrbaseVal = callFrame[base].jsValue();1936 JSValue 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 JSValue PtrpropName = callFrame[property].jsValue();1942 JSValue propName = callFrame[property].jsValue(); 1943 1943 1944 1944 uint32_t i; … … 2020 2020 int value = (++vPC)->u.operand; 2021 2021 2022 scope->registerAt(index) = JSValue Ptr(callFrame[value].jsValue());2022 scope->registerAt(index) = JSValue(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) = JSValue Ptr(callFrame[value].jsValue());2070 scope->registerAt(index) = JSValue(callFrame[value].jsValue()); 2071 2071 ++vPC; 2072 2072 NEXT_INSTRUCTION(); … … 2136 2136 CodeBlock* codeBlock = callFrame->codeBlock(); 2137 2137 Identifier& ident = codeBlock->identifier(property); 2138 JSValue PtrbaseValue = callFrame[base].jsValue();2138 JSValue baseValue = callFrame[base].jsValue(); 2139 2139 PropertySlot slot(baseValue); 2140 JSValue Ptrresult = baseValue.get(callFrame, ident, slot);2140 JSValue result = baseValue.get(callFrame, ident, slot); 2141 2141 CHECK_FOR_EXCEPTION(); 2142 2142 … … 2155 2155 */ 2156 2156 int base = vPC[2].u.operand; 2157 JSValue PtrbaseValue = callFrame[base].jsValue();2157 JSValue baseValue = callFrame[base].jsValue(); 2158 2158 2159 2159 if (LIKELY(baseValue.isCell())) { … … 2168 2168 2169 2169 ASSERT(baseObject->get(callFrame, callFrame->codeBlock()->identifier(vPC[3].u.operand)) == baseObject->getDirectOffset(offset)); 2170 callFrame[dst] = JSValue Ptr(baseObject->getDirectOffset(offset));2170 callFrame[dst] = JSValue(baseObject->getDirectOffset(offset)); 2171 2171 2172 2172 vPC += 8; … … 2186 2186 */ 2187 2187 int base = vPC[2].u.operand; 2188 JSValue PtrbaseValue = callFrame[base].jsValue();2188 JSValue baseValue = callFrame[base].jsValue(); 2189 2189 2190 2190 if (LIKELY(baseValue.isCell())) { … … 2202 2202 2203 2203 ASSERT(protoObject->get(callFrame, callFrame->codeBlock()->identifier(vPC[3].u.operand)) == protoObject->getDirectOffset(offset)); 2204 callFrame[dst] = JSValue Ptr(protoObject->getDirectOffset(offset));2204 callFrame[dst] = JSValue(protoObject->getDirectOffset(offset)); 2205 2205 2206 2206 vPC += 8; … … 2235 2235 */ 2236 2236 int base = vPC[2].u.operand; 2237 JSValue PtrbaseValue = callFrame[base].jsValue();2237 JSValue baseValue = callFrame[base].jsValue(); 2238 2238 2239 2239 if (LIKELY(baseValue.isCell())) { … … 2257 2257 2258 2258 ASSERT(baseObject->get(callFrame, callFrame->codeBlock()->identifier(vPC[3].u.operand)) == baseObject->getDirectOffset(offset)); 2259 callFrame[dst] = JSValue Ptr(baseObject->getDirectOffset(offset));2259 callFrame[dst] = JSValue(baseObject->getDirectOffset(offset)); 2260 2260 2261 2261 vPC += 8; … … 2283 2283 2284 2284 Identifier& ident = callFrame->codeBlock()->identifier(property); 2285 JSValue PtrbaseValue = callFrame[base].jsValue();2285 JSValue baseValue = callFrame[base].jsValue(); 2286 2286 PropertySlot slot(baseValue); 2287 JSValue Ptrresult = baseValue.get(callFrame, ident, slot);2287 JSValue result = baseValue.get(callFrame, ident, slot); 2288 2288 CHECK_FOR_EXCEPTION(); 2289 2289 … … 2301 2301 2302 2302 int base = vPC[2].u.operand; 2303 JSValue PtrbaseValue = callFrame[base].jsValue();2303 JSValue baseValue = callFrame[base].jsValue(); 2304 2304 if (LIKELY(isJSArray(globalData, baseValue))) { 2305 2305 int dst = vPC[1].u.operand; 2306 callFrame[dst] = JSValue Ptr(jsNumber(callFrame, asArray(baseValue)->length()));2306 callFrame[dst] = JSValue(jsNumber(callFrame, asArray(baseValue)->length())); 2307 2307 vPC += 8; 2308 2308 NEXT_INSTRUCTION(); … … 2321 2321 2322 2322 int base = vPC[2].u.operand; 2323 JSValue PtrbaseValue = callFrame[base].jsValue();2323 JSValue baseValue = callFrame[base].jsValue(); 2324 2324 if (LIKELY(isJSString(globalData, baseValue))) { 2325 2325 int dst = vPC[1].u.operand; 2326 callFrame[dst] = JSValue Ptr(jsNumber(callFrame, asString(baseValue)->value().size()));2326 callFrame[dst] = JSValue(jsNumber(callFrame, asString(baseValue)->value().size())); 2327 2327 vPC += 8; 2328 2328 NEXT_INSTRUCTION(); … … 2347 2347 2348 2348 CodeBlock* codeBlock = callFrame->codeBlock(); 2349 JSValue PtrbaseValue = callFrame[base].jsValue();2349 JSValue baseValue = callFrame[base].jsValue(); 2350 2350 Identifier& ident = codeBlock->identifier(property); 2351 2351 PutPropertySlot slot; … … 2370 2370 */ 2371 2371 int base = vPC[1].u.operand; 2372 JSValue PtrbaseValue = callFrame[base].jsValue();2372 JSValue baseValue = callFrame[base].jsValue(); 2373 2373 2374 2374 if (LIKELY(baseValue.isCell())) { … … 2383 2383 RefPtr<Structure>* it = vPC[6].u.structureChain->head(); 2384 2384 2385 JSValue Ptrproto = baseObject->structure()->prototypeForLookup(callFrame);2385 JSValue proto = baseObject->structure()->prototypeForLookup(callFrame); 2386 2386 while (!proto.isNull()) { 2387 2387 if (UNLIKELY(asObject(proto)->structure() != (*it).get())) { … … 2420 2420 */ 2421 2421 int base = vPC[1].u.operand; 2422 JSValue PtrbaseValue = callFrame[base].jsValue();2422 JSValue baseValue = callFrame[base].jsValue(); 2423 2423 2424 2424 if (LIKELY(baseValue.isCell())) { … … 2456 2456 int value = vPC[3].u.operand; 2457 2457 2458 JSValue PtrbaseValue = callFrame[base].jsValue();2458 JSValue baseValue = callFrame[base].jsValue(); 2459 2459 Identifier& ident = callFrame->codeBlock()->identifier(property); 2460 2460 PutPropertySlot slot; … … 2479 2479 JSObject* baseObj = callFrame[base].jsValue().toObject(callFrame); 2480 2480 Identifier& ident = callFrame->codeBlock()->identifier(property); 2481 JSValue Ptrresult = jsBoolean(baseObj->deleteProperty(callFrame, ident));2481 JSValue result = jsBoolean(baseObj->deleteProperty(callFrame, ident)); 2482 2482 CHECK_FOR_EXCEPTION(); 2483 2483 callFrame[dst] = result; … … 2497 2497 int property = (++vPC)->u.operand; 2498 2498 2499 JSValue PtrbaseValue = callFrame[base].jsValue();2500 JSValue Ptrsubscript = callFrame[property].jsValue();2501 2502 JSValue Ptrresult;2499 JSValue baseValue = callFrame[base].jsValue(); 2500 JSValue subscript = callFrame[property].jsValue(); 2501 2502 JSValue result; 2503 2503 2504 2504 if (LIKELY(subscript.isUInt32Fast())) { … … 2541 2541 int value = (++vPC)->u.operand; 2542 2542 2543 JSValue PtrbaseValue = callFrame[base].jsValue();2544 JSValue Ptrsubscript = callFrame[property].jsValue();2543 JSValue baseValue = callFrame[base].jsValue(); 2544 JSValue subscript = callFrame[property].jsValue(); 2545 2545 2546 2546 if (LIKELY(subscript.isUInt32Fast())) { … … 2555 2555 JSByteArray* jsByteArray = asByteArray(baseValue); 2556 2556 double dValue = 0; 2557 JSValue PtrjsValue = callFrame[value].jsValue();2557 JSValue jsValue = callFrame[value].jsValue(); 2558 2558 if (jsValue.isInt32Fast()) 2559 2559 jsByteArray->setIndex(i, jsValue.getInt32Fast()); … … 2590 2590 JSObject* baseObj = callFrame[base].jsValue().toObject(callFrame); // may throw 2591 2591 2592 JSValue Ptrsubscript = callFrame[property].jsValue();2593 JSValue Ptrresult;2592 JSValue subscript = callFrame[property].jsValue(); 2593 JSValue result; 2594 2594 uint32_t i; 2595 2595 if (subscript.getUInt32(i)) … … 2719 2719 int src = (++vPC)->u.operand; 2720 2720 int target = (++vPC)->u.operand; 2721 JSValue PtrsrcValue = callFrame[src].jsValue();2721 JSValue 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 JSValue PtrsrcValue = callFrame[src].jsValue();2739 JSValue srcValue = callFrame[src].jsValue(); 2740 2740 2741 2741 if (!srcValue.isUndefinedOrNull() || (srcValue.isCell() && !srcValue.asCell()->structure()->typeInfo().masqueradesAsUndefined())) { … … 2754 2754 */ 2755 2755 int src = (++vPC)->u.operand; 2756 JSValue Ptr ptr = JSValuePtr((++vPC)->u.jsCell);2756 JSValue ptr = JSValue((++vPC)->u.jsCell); 2757 2757 int target = (++vPC)->u.operand; 2758 JSValue PtrsrcValue = callFrame[src].jsValue();2758 JSValue srcValue = callFrame[src].jsValue(); 2759 2759 if (srcValue != ptr) { 2760 2760 vPC += target; … … 2776 2776 the JS timeout is reached. 2777 2777 */ 2778 JSValue Ptrsrc1 = callFrame[(++vPC)->u.operand].jsValue();2779 JSValue Ptrsrc2 = callFrame[(++vPC)->u.operand].jsValue();2778 JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); 2779 JSValue 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 JSValue Ptrsrc1 = callFrame[(++vPC)->u.operand].jsValue();2806 JSValue Ptrsrc2 = callFrame[(++vPC)->u.operand].jsValue();2805 JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); 2806 JSValue 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 JSValue Ptrsrc1 = callFrame[(++vPC)->u.operand].jsValue();2830 JSValue Ptrsrc2 = callFrame[(++vPC)->u.operand].jsValue();2829 JSValue src1 = callFrame[(++vPC)->u.operand].jsValue(); 2830 JSValue 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 JSValue Ptrscrutinee = callFrame[(++vPC)->u.operand].jsValue();2855 JSValue 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 JSValue Ptrscrutinee = callFrame[(++vPC)->u.operand].jsValue();2879 JSValue 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 JSValue Ptrscrutinee = callFrame[(++vPC)->u.operand].jsValue();2902 JSValue 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 JSValue PtrfuncVal = callFrame[func].jsValue();2958 JSValue funcVal = callFrame[func].jsValue(); 2959 2959 2960 2960 Register* newCallFrame = callFrame->registers() + registerOffset; 2961 2961 Register* argv = newCallFrame - RegisterFile::CallFrameHeaderSize - argCount; 2962 JSValue PtrthisValue = argv[0].jsValue();2962 JSValue thisValue = argv[0].jsValue(); 2963 2963 JSGlobalObject* globalObject = callFrame->scopeChain()->globalObject(); 2964 2964 2965 2965 if (thisValue == globalObject && funcVal == globalObject->evalFunction()) { 2966 JSValue Ptrresult = callEval(callFrame, registerFile, argv, argCount, registerOffset, exceptionValue);2966 JSValue result = callEval(callFrame, registerFile, argv, argCount, registerOffset, exceptionValue); 2967 2967 if (exceptionValue) 2968 2968 goto vm_throw; … … 2993 2993 int registerOffset = vPC[4].u.operand; 2994 2994 2995 JSValue Ptrv = callFrame[func].jsValue();2995 JSValue 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 JSValue PtrthisValue = thisRegister->jsValue();3033 JSValue thisValue = thisRegister->jsValue(); 3034 3034 if (thisValue == jsNull()) 3035 3035 thisValue = callFrame->globalThisValue(); 3036 3036 3037 JSValue PtrreturnValue;3037 JSValue returnValue; 3038 3038 { 3039 3039 SamplingTool::HostCallRecord callRecord(m_sampler); … … 3042 3042 CHECK_FOR_EXCEPTION(); 3043 3043 3044 callFrame[dst] = JSValue Ptr(returnValue);3044 callFrame[dst] = JSValue(returnValue); 3045 3045 3046 3046 vPC += 5; … … 3057 3057 int argsOffset = (++vPC)->u.operand; 3058 3058 3059 JSValue Ptrarguments = callFrame[argsOffset].jsValue();3059 JSValue 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 JSValue Ptrv = callFrame[func].jsValue();3129 JSValue 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 JSValue PtrthisValue = thisRegister->jsValue();3168 JSValue thisValue = thisRegister->jsValue(); 3169 3169 if (thisValue == jsNull()) 3170 3170 thisValue = callFrame->globalThisValue(); 3171 3171 3172 JSValue PtrreturnValue;3172 JSValue returnValue; 3173 3173 { 3174 3174 SamplingTool::HostCallRecord callRecord(m_sampler); … … 3177 3177 CHECK_FOR_EXCEPTION(); 3178 3178 3179 callFrame[dst] = JSValue Ptr(returnValue);3179 callFrame[dst] = JSValue(returnValue); 3180 3180 3181 3181 vPC += 5; … … 3244 3244 callFrame->scopeChain()->deref(); 3245 3245 3246 JSValue PtrreturnValue = callFrame[result].jsValue();3246 JSValue returnValue = callFrame[result].jsValue(); 3247 3247 3248 3248 vPC = callFrame->returnPC(); … … 3253 3253 return returnValue; 3254 3254 3255 callFrame[dst] = JSValue Ptr(returnValue);3255 callFrame[dst] = JSValue(returnValue); 3256 3256 3257 3257 NEXT_INSTRUCTION(); … … 3323 3323 3324 3324 int thisRegister = (++vPC)->u.operand; 3325 JSValue PtrthisVal = callFrame[thisRegister].jsValue();3325 JSValue thisVal = callFrame[thisRegister].jsValue(); 3326 3326 if (thisVal.needsThisConversion()) 3327 callFrame[thisRegister] = JSValue Ptr(thisVal.toThisObject(callFrame));3327 callFrame[thisRegister] = JSValue(thisVal.toThisObject(callFrame)); 3328 3328 3329 3329 ++vPC; … … 3370 3370 int thisRegister = vPC[6].u.operand; 3371 3371 3372 JSValue Ptrv = callFrame[func].jsValue();3372 JSValue v = callFrame[func].jsValue(); 3373 3373 3374 3374 ConstructData constructData; … … 3381 3381 3382 3382 Structure* structure; 3383 JSValue Ptrprototype = callFrame[proto].jsValue();3383 JSValue prototype = callFrame[proto].jsValue(); 3384 3384 if (prototype.isObject()) 3385 3385 structure = asObject(prototype)->inheritorID(); … … 3388 3388 JSObject* newObject = new (globalData) JSObject(structure); 3389 3389 3390 callFrame[thisRegister] = JSValue Ptr(newObject); // "this" value3390 callFrame[thisRegister] = JSValue(newObject); // "this" value 3391 3391 3392 3392 CallFrame* previousCallFrame = callFrame; … … 3416 3416 newCallFrame->init(0, vPC + 7, scopeChain, callFrame, dst, argCount, 0); 3417 3417 3418 JSValue PtrreturnValue;3418 JSValue returnValue; 3419 3419 { 3420 3420 SamplingTool::HostCallRecord callRecord(m_sampler); … … 3422 3422 } 3423 3423 CHECK_FOR_EXCEPTION(); 3424 callFrame[dst] = JSValue Ptr(returnValue);3424 callFrame[dst] = JSValue(returnValue); 3425 3425 3426 3426 vPC += 7; … … 3460 3460 */ 3461 3461 int scope = (++vPC)->u.operand; 3462 JSValue Ptrv = callFrame[scope].jsValue();3462 JSValue v = callFrame[scope].jsValue(); 3463 3463 JSObject* o = v.toObject(callFrame); 3464 3464 CHECK_FOR_EXCEPTION(); 3465 3465 3466 callFrame[scope] = JSValue Ptr(o);3466 callFrame[scope] = JSValue(o); 3467 3467 callFrame->setScopeChain(callFrame->scopeChain()->push(o)); 3468 3468 … … 3509 3509 3510 3510 JSPropertyNameIterator* it = callFrame[iter].propertyNameIterator(); 3511 if (JSValue Ptrtemp = it->next(callFrame)) {3511 if (JSValue temp = it->next(callFrame)) { 3512 3512 CHECK_FOR_TIMEOUT(); 3513 callFrame[dst] = JSValue Ptr(temp);3513 callFrame[dst] = JSValue(temp); 3514 3514 vPC += target; 3515 3515 NEXT_INSTRUCTION(); … … 3603 3603 int dst = (++vPC)->u.operand; 3604 3604 int src = (++vPC)->u.operand; 3605 callFrame[dst] = JSValue Ptr(callFrame->codeBlock()->unexpectedConstant(src));3605 callFrame[dst] = JSValue(callFrame->codeBlock()->unexpectedConstant(src)); 3606 3606 3607 3607 ++vPC; … … 3621 3621 3622 3622 CodeBlock* codeBlock = callFrame->codeBlock(); 3623 callFrame[dst] = JSValue Ptr(Error::create(callFrame, (ErrorType)type, codeBlock->unexpectedConstant(message).toString(callFrame), codeBlock->lineNumberForBytecodeOffset(callFrame, vPC - codeBlock->instructions().begin()), codeBlock->ownerNode()->sourceID(), codeBlock->ownerNode()->sourceURL()));3623 callFrame[dst] = JSValue(Error::create(callFrame, (ErrorType)type, codeBlock->unexpectedConstant(message).toString(callFrame), codeBlock->lineNumberForBytecodeOffset(callFrame, vPC - codeBlock->instructions().begin()), codeBlock->ownerNode()->sourceID(), codeBlock->ownerNode()->sourceURL())); 3624 3624 3625 3625 ++vPC; … … 3782 3782 } 3783 3783 3784 JSValue PtrInterpreter::retrieveArguments(CallFrame* callFrame, JSFunction* function) const3784 JSValue Interpreter::retrieveArguments(CallFrame* callFrame, JSFunction* function) const 3785 3785 { 3786 3786 CallFrame* functionCallFrame = findFunctionCallFrame(callFrame, function); … … 3806 3806 } 3807 3807 3808 JSValue PtrInterpreter::retrieveCaller(CallFrame* callFrame, InternalFunction* function) const3808 JSValue Interpreter::retrieveCaller(CallFrame* callFrame, InternalFunction* function) const 3809 3809 { 3810 3810 CallFrame* functionCallFrame = findFunctionCallFrame(callFrame, function); … … 3816 3816 return jsNull(); 3817 3817 3818 JSValue Ptrcaller = callerFrame->callee();3818 JSValue caller = callerFrame->callee(); 3819 3819 if (!caller) 3820 3820 return jsNull(); … … 3823 3823 } 3824 3824 3825 void Interpreter::retrieveLastCaller(CallFrame* callFrame, int& lineNumber, intptr_t& sourceID, UString& sourceURL, JSValue Ptr& function) const3825 void Interpreter::retrieveLastCaller(CallFrame* callFrame, int& lineNumber, intptr_t& sourceID, UString& sourceURL, JSValue& function) const 3826 3826 { 3827 3827 function = noValue();
Note:
See TracChangeset
for help on using the changeset viewer.