Changeset 45609 in webkit for trunk/JavaScriptCore
- Timestamp:
- Jul 7, 2009, 2:52:07 PM (16 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r45600 r45609 1 2009-07-07 Gavin Barraclough <[email protected]> 2 3 Reviewed by Sam Weinig. 4 5 Stop loading constants into the register file. 6 7 Instead, use high register values (highest bit bar the sign bit set) to indicate 8 constants in the instruction stream, and when we encounter such a value load it 9 directly from the CodeBlock. 10 11 Since constants are no longer copied into the register file, this patch renders 12 the 'unexpected constant' mechanism redundant, and removes it. 13 14 2% improvement, thanks to Sam Weinig. 15 16 * bytecode/CodeBlock.cpp: 17 (JSC::CodeBlock::dump): 18 (JSC::CodeBlock::CodeBlock): 19 (JSC::CodeBlock::mark): 20 (JSC::CodeBlock::shrinkToFit): 21 * bytecode/CodeBlock.h: 22 (JSC::CodeBlock::isTemporaryRegisterIndex): 23 (JSC::CodeBlock::constantRegister): 24 (JSC::CodeBlock::isConstantRegisterIndex): 25 (JSC::CodeBlock::getConstant): 26 (JSC::ExecState::r): 27 * bytecode/Opcode.h: 28 * bytecompiler/BytecodeGenerator.cpp: 29 (JSC::BytecodeGenerator::preserveLastVar): 30 (JSC::BytecodeGenerator::BytecodeGenerator): 31 (JSC::BytecodeGenerator::addConstantValue): 32 (JSC::BytecodeGenerator::emitEqualityOp): 33 (JSC::BytecodeGenerator::emitLoad): 34 (JSC::BytecodeGenerator::emitResolveBase): 35 (JSC::BytecodeGenerator::emitResolveWithBase): 36 (JSC::BytecodeGenerator::emitNewError): 37 * bytecompiler/BytecodeGenerator.h: 38 (JSC::BytecodeGenerator::emitNode): 39 * interpreter/CallFrame.h: 40 (JSC::ExecState::noCaller): 41 (JSC::ExecState::hasHostCallFrameFlag): 42 (JSC::ExecState::addHostCallFrameFlag): 43 (JSC::ExecState::removeHostCallFrameFlag): 44 * interpreter/Interpreter.cpp: 45 (JSC::Interpreter::resolve): 46 (JSC::Interpreter::resolveSkip): 47 (JSC::Interpreter::resolveGlobal): 48 (JSC::Interpreter::resolveBase): 49 (JSC::Interpreter::resolveBaseAndProperty): 50 (JSC::Interpreter::resolveBaseAndFunc): 51 (JSC::Interpreter::dumpRegisters): 52 (JSC::Interpreter::throwException): 53 (JSC::Interpreter::createExceptionScope): 54 (JSC::Interpreter::privateExecute): 55 (JSC::Interpreter::retrieveArguments): 56 * jit/JIT.cpp: 57 (JSC::JIT::privateCompileMainPass): 58 * jit/JITInlineMethods.h: 59 (JSC::JIT::emitLoadDouble): 60 (JSC::JIT::emitLoadInt32ToDouble): 61 * jit/JITOpcodes.cpp: 62 (JSC::JIT::emit_op_new_error): 63 (JSC::JIT::emit_op_enter): 64 (JSC::JIT::emit_op_enter_with_activation): 65 * parser/Nodes.cpp: 66 (JSC::DeleteResolveNode::emitBytecode): 67 (JSC::DeleteValueNode::emitBytecode): 68 (JSC::PrefixResolveNode::emitBytecode): 69 * runtime/JSActivation.cpp: 70 (JSC::JSActivation::JSActivation): 71 * wtf/Platform.h: 72 1 73 2009-07-07 Mark Rowe <[email protected]> 2 74 -
trunk/JavaScriptCore/bytecode/CodeBlock.cpp
r44844 r45609 364 364 } 365 365 366 if (m_rareData && !m_rareData->m_unexpectedConstants.isEmpty()) {367 printf("\nUnexpected Constants:\n");368 size_t i = 0;369 do {370 printf(" k%u = %s\n", static_cast<unsigned>(i), valueToSourceString(exec, m_rareData->m_unexpectedConstants[i]).ascii());371 ++i;372 } while (i < m_rareData->m_unexpectedConstants.size());373 }374 375 366 if (m_rareData && !m_rareData->m_regexps.isEmpty()) { 376 367 printf("\nm_regexps:\n"); … … 507 498 break; 508 499 } 509 case op_unexpected_load: {510 int r0 = (++it)->u.operand;511 int k0 = (++it)->u.operand;512 printf("[%4d] unexpected_load\t %s, %s\n", location, registerName(r0).c_str(), constantName(exec, k0, unexpectedConstant(k0)).c_str());513 break;514 }515 500 case op_new_object: { 516 501 int r0 = (++it)->u.operand; … … 1085 1070 int errorType = (++it)->u.operand; 1086 1071 int k0 = (++it)->u.operand; 1087 printf("[%4d] new_error\t %s, %d, %s\n", location, registerName(r0).c_str(), errorType, constantName(exec, k0, unexpectedConstant(k0)).c_str());1072 printf("[%4d] new_error\t %s, %d, %s\n", location, registerName(r0).c_str(), errorType, constantName(exec, k0, getConstant(k0)).c_str()); 1088 1073 break; 1089 1074 } … … 1143 1128 macro(regexps) \ 1144 1129 macro(functions) \ 1145 macro(unexpectedConstants) \1146 1130 macro(exceptionHandlers) \ 1147 1131 macro(immediateSwitchJumpTables) \ … … 1268 1252 CodeBlock::CodeBlock(ScopeNode* ownerNode) 1269 1253 : m_numCalleeRegisters(0) 1270 , m_numConstants(0)1271 1254 , m_numVars(0) 1272 1255 , m_numParameters(0) … … 1291 1274 CodeBlock::CodeBlock(ScopeNode* ownerNode, CodeType codeType, PassRefPtr<SourceProvider> sourceProvider, unsigned sourceOffset) 1292 1275 : m_numCalleeRegisters(0) 1293 , m_numConstants(0)1294 1276 , m_numVars(0) 1295 1277 , m_numParameters(0) … … 1456 1438 m_rareData->m_functions[i]->body()->mark(); 1457 1439 1458 for (size_t i = 0; i < m_rareData->m_unexpectedConstants.size(); ++i) {1459 if (!m_rareData->m_unexpectedConstants[i].marked())1460 m_rareData->m_unexpectedConstants[i].mark();1461 }1462 1440 m_rareData->m_evalCodeCache.mark(); 1463 1441 } … … 1758 1736 m_rareData->m_exceptionHandlers.shrinkToFit(); 1759 1737 m_rareData->m_functions.shrinkToFit(); 1760 m_rareData->m_unexpectedConstants.shrinkToFit();1761 1738 m_rareData->m_regexps.shrinkToFit(); 1762 1739 m_rareData->m_immediateSwitchJumpTables.shrinkToFit(); -
trunk/JavaScriptCore/bytecode/CodeBlock.h
r45128 r45609 47 47 #endif 48 48 49 // Register numbers used in bytecode operations have different meaning accoring to their ranges: 50 // 0x80000000-0xFFFFFFFF Negative indicies from the CallFrame pointer are entries in the call frame, see RegisterFile.h. 51 // 0x00000000-0x3FFFFFFF Forwards indices from the CallFrame pointer are local vars and temporaries with the function's callframe. 52 // 0x40000000-0x7FFFFFFF Positive indices from 0x40000000 specify entries in the constant pool on the CodeBlock. 53 static const int FirstConstantRegisterIndex = 0x40000000; 54 49 55 namespace JSC { 50 56 … … 249 255 } 250 256 251 ALWAYS_INLINE bool isConstantRegisterIndex(int index)252 {253 return index >= m_numVars && index < m_numVars + m_numConstants;254 }255 256 ALWAYS_INLINE JSValue getConstant(int index)257 {258 return m_constantRegisters[index - m_numVars].jsValue();259 }260 261 257 ALWAYS_INLINE bool isTemporaryRegisterIndex(int index) 262 258 { 263 return index >= m_numVars + m_numConstants;259 return index >= m_numVars; 264 260 } 265 261 … … 401 397 size_t numberOfConstantRegisters() const { return m_constantRegisters.size(); } 402 398 void addConstantRegister(const Register& r) { return m_constantRegisters.append(r); } 403 Register& constantRegister(int index) { return m_constantRegisters[index]; } 399 Register& constantRegister(int index) { return m_constantRegisters[index - FirstConstantRegisterIndex]; } 400 ALWAYS_INLINE bool isConstantRegisterIndex(int index) { return index >= FirstConstantRegisterIndex; } 401 ALWAYS_INLINE JSValue getConstant(int index) const { return m_constantRegisters[index - FirstConstantRegisterIndex].jsValue(); } 404 402 405 403 unsigned addFunctionExpression(FuncExprNode* n) { unsigned size = m_functionExpressions.size(); m_functionExpressions.append(n); return size; } … … 410 408 411 409 bool hasFunctions() const { return m_functionExpressions.size() || (m_rareData && m_rareData->m_functions.size()); } 412 413 unsigned addUnexpectedConstant(JSValue v) { createRareDataIfNecessary(); unsigned size = m_rareData->m_unexpectedConstants.size(); m_rareData->m_unexpectedConstants.append(v); return size; }414 JSValue unexpectedConstant(int index) const { ASSERT(m_rareData); return m_rareData->m_unexpectedConstants[index]; }415 410 416 411 unsigned addRegExp(RegExp* r) { createRareDataIfNecessary(); unsigned size = m_rareData->m_regexps.size(); m_rareData->m_regexps.append(r); return size; } … … 442 437 443 438 int m_numCalleeRegisters; 444 // NOTE: numConstants holds the number of constant registers allocated445 // by the code generator, not the number of constant registers used.446 // (Duplicate constants are uniqued during code generation, and spare447 // constant registers may be allocated.)448 int m_numConstants;449 439 int m_numVars; 450 440 int m_numParameters; … … 520 510 // Rare Constants 521 511 Vector<RefPtr<FuncDeclNode> > m_functions; 522 Vector<JSValue> m_unexpectedConstants;523 512 Vector<RefPtr<RegExp> > m_regexps; 524 513 … … 575 564 }; 576 565 566 inline Register& ExecState::r(int index) 567 { 568 CodeBlock* codeBlock = this->codeBlock(); 569 if (codeBlock->isConstantRegisterIndex(index)) 570 return codeBlock->constantRegister(index); 571 return this[index]; 572 } 573 577 574 } // namespace JSC 578 575 -
trunk/JavaScriptCore/bytecode/Opcode.h
r44076 r45609 45 45 macro(op_convert_this, 2) \ 46 46 \ 47 macro(op_unexpected_load, 3) \48 47 macro(op_new_object, 2) \ 49 48 macro(op_new_array, 4) \ -
trunk/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
r44711 r45609 197 197 } 198 198 199 void BytecodeGenerator::allocateConstants(size_t count) 200 { 201 m_codeBlock->m_numConstants = count; 202 if (!count) 203 return; 204 205 m_nextConstantIndex = m_calleeRegisters.size(); 206 207 for (size_t i = 0; i < count; ++i) 208 newRegister(); 209 m_lastConstant = &m_calleeRegisters.last(); 199 void BytecodeGenerator::preserveLastVar() 200 { 201 if ((m_firstConstantIndex = m_calleeRegisters.size()) != 0) 202 m_lastVar = &m_calleeRegisters.last(); 210 203 } 211 204 … … 223 216 , m_codeType(GlobalCode) 224 217 , m_nextGlobalIndex(-1) 218 , m_nextConstantOffset(0) 225 219 , m_globalConstantIndex(0) 226 220 , m_globalData(&scopeChain.globalObject()->globalExec()->globalData()) … … 273 267 newVars.append(addGlobalVar(varStack[i].first, varStack[i].second & DeclarationStacks::IsConstant)); 274 268 275 allocateConstants(programNode->neededConstants());269 preserveLastVar(); 276 270 277 271 for (size_t i = 0; i < newVars.size(); ++i) … … 291 285 } 292 286 293 allocateConstants(programNode->neededConstants());287 preserveLastVar(); 294 288 } 295 289 } … … 306 300 , m_baseScopeDepth(0) 307 301 , m_codeType(FunctionCode) 302 , m_nextConstantOffset(0) 308 303 , m_globalConstantIndex(0) 309 304 , m_globalData(&scopeChain.globalObject()->globalExec()->globalData()) … … 373 368 addParameter(parameters[i]); 374 369 375 allocateConstants(functionBody->neededConstants());370 preserveLastVar(); 376 371 } 377 372 … … 388 383 , m_baseScopeDepth(codeBlock->baseScopeDepth()) 389 384 , m_codeType(EvalCode) 385 , m_nextConstantOffset(0) 390 386 , m_globalConstantIndex(0) 391 387 , m_globalData(&scopeChain.globalObject()->globalExec()->globalData()) … … 402 398 m_codeBlock->m_numParameters = 1; // Allocate space for "this" 403 399 404 allocateConstants(evalNode->neededConstants());400 preserveLastVar(); 405 401 } 406 402 … … 792 788 } 793 789 794 RegisterID* BytecodeGenerator::addConstant(JSValue v) 795 { 796 pair<JSValueMap::iterator, bool> result = m_jsValueMap.add(JSValue::encode(v), m_nextConstantIndex); 790 RegisterID* BytecodeGenerator::addConstantValue(JSValue v) 791 { 792 int index = m_nextConstantOffset; 793 794 pair<JSValueMap::iterator, bool> result = m_jsValueMap.add(JSValue::encode(v), m_nextConstantOffset); 797 795 if (result.second) { 798 RegisterID& constant = m_calleeRegisters[m_nextConstantIndex]; 799 800 ++m_nextConstantIndex; 801 796 m_constantPoolRegisters.append(FirstConstantRegisterIndex + m_nextConstantOffset); 797 ++m_nextConstantOffset; 802 798 m_codeBlock->addConstantRegister(JSValue(v)); 803 return &constant; 804 } 805 806 return ®isterFor(result.first->second); 807 } 808 809 unsigned BytecodeGenerator::addUnexpectedConstant(JSValue v) 810 { 811 return m_codeBlock->addUnexpectedConstant(v); 812 } 813 814 RegisterID* BytecodeGenerator::emitLoadGlobalObject(RegisterID* dst, JSObject* globalObject) 815 { 816 if (!m_globalConstantIndex) 817 m_globalConstantIndex = m_codeBlock->addUnexpectedConstant(globalObject); 818 emitOpcode(op_unexpected_load); 819 instructions().append(dst->index()); 820 instructions().append(m_globalConstantIndex); 821 return dst; 799 } else 800 index = result.first->second; 801 802 return &m_constantPoolRegisters[index]; 822 803 } 823 804 … … 899 880 && src1->isTemporary() 900 881 && m_codeBlock->isConstantRegisterIndex(src2->index()) 901 && m_codeBlock->constantRegister(src2->index() - m_codeBlock->m_numVars).jsValue().isString()) {902 const UString& value = asString(m_codeBlock->constantRegister(src2->index() - m_codeBlock->m_numVars).jsValue())->value();882 && m_codeBlock->constantRegister(src2->index()).jsValue().isString()) { 883 const UString& value = asString(m_codeBlock->constantRegister(src2->index()).jsValue())->value(); 903 884 if (value == "undefined") { 904 885 rewindUnaryOp(); … … 980 961 RegisterID* BytecodeGenerator::emitLoad(RegisterID* dst, JSValue v) 981 962 { 982 RegisterID* constantID = addConstant (v);963 RegisterID* constantID = addConstantValue(v); 983 964 if (dst) 984 965 return emitMove(dst, constantID); 985 966 return constantID; 986 }987 988 RegisterID* BytecodeGenerator::emitUnexpectedLoad(RegisterID* dst, bool b)989 {990 emitOpcode(op_unexpected_load);991 instructions().append(dst->index());992 instructions().append(addUnexpectedConstant(jsBoolean(b)));993 return dst;994 }995 996 RegisterID* BytecodeGenerator::emitUnexpectedLoad(RegisterID* dst, double d)997 {998 emitOpcode(op_unexpected_load);999 instructions().append(dst->index());1000 instructions().append(addUnexpectedConstant(jsNumber(globalData(), d)));1001 return dst;1002 967 } 1003 968 … … 1170 1135 1171 1136 // Global object is the base 1172 return emitLoad GlobalObject(dst, globalObject);1137 return emitLoad(dst, JSValue(globalObject)); 1173 1138 } 1174 1139 … … 1197 1162 1198 1163 // Global object is the base 1199 emitLoad GlobalObject(baseDst, globalObject);1164 emitLoad(baseDst, JSValue(globalObject)); 1200 1165 1201 1166 if (index != missingSymbolMarker() && !forceGlobalResolve) { … … 1832 1797 instructions().append(dst->index()); 1833 1798 instructions().append(static_cast<int>(type)); 1834 instructions().append(add UnexpectedConstant(message));1799 instructions().append(addConstantValue(message)->index()); 1835 1800 return dst; 1836 1801 } -
trunk/JavaScriptCore/bytecompiler/BytecodeGenerator.h
r45128 r45609 246 246 RegisterID* emitLoad(RegisterID* dst, const Identifier&); 247 247 RegisterID* emitLoad(RegisterID* dst, JSValue); 248 RegisterID* emitUnexpectedLoad(RegisterID* dst, bool);249 RegisterID* emitUnexpectedLoad(RegisterID* dst, double);250 RegisterID* emitLoadGlobalObject(RegisterID* dst, JSObject* globalObject);251 248 252 249 RegisterID* emitUnaryOp(OpcodeID, RegisterID* dst, RegisterID* src); … … 400 397 RegisterID* addParameter(const Identifier&); 401 398 402 void allocateConstants(size_t);399 void preserveLastVar(); 403 400 404 401 RegisterID& registerFor(int index) … … 421 418 unsigned addConstant(FuncExprNode*); 422 419 unsigned addConstant(const Identifier&); 423 RegisterID* addConstant(JSValue); 424 unsigned addUnexpectedConstant(JSValue); 420 RegisterID* addConstantValue(JSValue); 425 421 unsigned addRegExp(RegExp*); 426 422 … … 451 447 RegisterID m_argumentsRegister; 452 448 int m_activationRegisterIndex; 449 WTF::SegmentedVector<RegisterID, 32> m_constantPoolRegisters; 453 450 WTF::SegmentedVector<RegisterID, 32> m_calleeRegisters; 454 451 WTF::SegmentedVector<RegisterID, 32> m_parameters; … … 456 453 WTF::SegmentedVector<Label, 32> m_labels; 457 454 WTF::SegmentedVector<LabelScope, 8> m_labelScopes; 458 RefPtr<RegisterID> m_last Constant;455 RefPtr<RegisterID> m_lastVar; 459 456 int m_finallyDepth; 460 457 int m_dynamicScopeDepth; … … 467 464 int m_nextGlobalIndex; 468 465 int m_nextParameterIndex; 469 int m_nextConstantIndex; 466 int m_firstConstantIndex; 467 int m_nextConstantOffset; 470 468 unsigned m_globalConstantIndex; 471 469 -
trunk/JavaScriptCore/interpreter/CallFrame.h
r44550 r45609 125 125 } 126 126 127 private: 128 friend class Arguments; 129 friend class JSActivation; 130 friend class JSGlobalObject; 131 friend class Interpreter; 132 friend struct CallFrameClosure; 127 // Read a register from the codeframe (or constant from the CodeBlock). 128 inline Register& r(int); 133 129 130 static CallFrame* noCaller() { return reinterpret_cast<CallFrame*>(HostCallFrameFlag); } 134 131 int returnValueRegister() const { return this[RegisterFile::ReturnValueRegister].i(); } 135 132 133 bool hasHostCallFrameFlag() const { return reinterpret_cast<intptr_t>(this) & HostCallFrameFlag; } 134 CallFrame* addHostCallFrameFlag() const { return reinterpret_cast<CallFrame*>(reinterpret_cast<intptr_t>(this) | HostCallFrameFlag); } 135 CallFrame* removeHostCallFrameFlag() { return reinterpret_cast<CallFrame*>(reinterpret_cast<intptr_t>(this) & ~HostCallFrameFlag); } 136 137 private: 136 138 void setArgumentCount(int count) { this[RegisterFile::ArgumentCount] = count; } 137 139 void setCallee(JSFunction* callee) { this[RegisterFile::Callee] = callee; } … … 139 141 140 142 static const intptr_t HostCallFrameFlag = 1; 141 142 static CallFrame* noCaller() { return reinterpret_cast<CallFrame*>(HostCallFrameFlag); }143 bool hasHostCallFrameFlag() const { return reinterpret_cast<intptr_t>(this) & HostCallFrameFlag; }144 CallFrame* addHostCallFrameFlag() const { return reinterpret_cast<CallFrame*>(reinterpret_cast<intptr_t>(this) | HostCallFrameFlag); }145 CallFrame* removeHostCallFrameFlag() { return reinterpret_cast<CallFrame*>(reinterpret_cast<intptr_t>(this) & ~HostCallFrameFlag); }146 143 147 144 ExecState(); -
trunk/JavaScriptCore/interpreter/Interpreter.cpp
r45370 r45609 109 109 if (exceptionValue) 110 110 return false; 111 callFrame [dst]= JSValue(result);111 callFrame->r(dst) = JSValue(result); 112 112 return true; 113 113 } … … 142 142 if (exceptionValue) 143 143 return false; 144 callFrame [dst]= JSValue(result);144 callFrame->r(dst) = JSValue(result); 145 145 return true; 146 146 } … … 160 160 161 161 if (structure == globalObject->structure()) { 162 callFrame [dst]= JSValue(globalObject->getDirectOffset(offset));162 callFrame->r(dst) = JSValue(globalObject->getDirectOffset(offset)); 163 163 return true; 164 164 } … … 175 175 vPC[4] = globalObject->structure(); 176 176 vPC[5] = slot.cachedOffset(); 177 callFrame [dst]= JSValue(result);177 callFrame->r(dst) = JSValue(result); 178 178 return true; 179 179 } … … 182 182 if (exceptionValue) 183 183 return false; 184 callFrame [dst]= JSValue(result);184 callFrame->r(dst) = JSValue(result); 185 185 return true; 186 186 } … … 194 194 int dst = (vPC + 1)->u.operand; 195 195 int property = (vPC + 2)->u.operand; 196 callFrame [dst]= JSValue(JSC::resolveBase(callFrame, callFrame->codeBlock()->identifier(property), callFrame->scopeChain()));196 callFrame->r(dst) = JSValue(JSC::resolveBase(callFrame, callFrame->codeBlock()->identifier(property), callFrame->scopeChain())); 197 197 } 198 198 … … 222 222 if (exceptionValue) 223 223 return false; 224 callFrame [propDst]= JSValue(result);225 callFrame [baseDst]= JSValue(base);224 callFrame->r(propDst) = JSValue(result); 225 callFrame->r(baseDst) = JSValue(base); 226 226 return true; 227 227 } … … 267 267 return false; 268 268 269 callFrame [baseDst]= JSValue(thisObj);270 callFrame [funcDst]= JSValue(result);269 callFrame->r(baseDst) = JSValue(thisObj); 270 callFrame->r(funcDst) = JSValue(result); 271 271 return true; 272 272 } … … 433 433 printf("----------------------------------------------------\n"); 434 434 435 end = it + codeBlock->m_numConstants; 436 if (it != end) { 437 do { 438 printf("[r%2d] | %10p | %10p \n", registerCount, it, (*it).v()); 439 ++it; 440 ++registerCount; 441 } while (it != end); 442 } 443 printf("----------------------------------------------------\n"); 444 445 end = it + codeBlock->m_numCalleeRegisters - codeBlock->m_numConstants - codeBlock->m_numVars; 435 end = it + codeBlock->m_numCalleeRegisters - codeBlock->m_numVars; 446 436 if (it != end) { 447 437 do { … … 564 554 #if !ENABLE(JIT) 565 555 if (isCallBytecode(codeBlock->instructions()[bytecodeOffset].u.opcode)) 566 profiler->didExecute(callFrame, callFrame [codeBlock->instructions()[bytecodeOffset + 2].u.operand].jsValue());556 profiler->didExecute(callFrame, callFrame->r(codeBlock->instructions()[bytecodeOffset + 2].u.operand).jsValue()); 567 557 else if (codeBlock->instructions()[bytecodeOffset + 8].u.opcode == getOpcode(op_construct)) 568 profiler->didExecute(callFrame, callFrame [codeBlock->instructions()[bytecodeOffset + 10].u.operand].jsValue());558 profiler->didExecute(callFrame, callFrame->r(codeBlock->instructions()[bytecodeOffset + 10].u.operand).jsValue()); 569 559 #else 570 560 int functionRegisterIndex; 571 561 if (codeBlock->functionRegisterForBytecodeOffset(bytecodeOffset, functionRegisterIndex)) 572 profiler->didExecute(callFrame, callFrame [functionRegisterIndex].jsValue());562 profiler->didExecute(callFrame, callFrame->r(functionRegisterIndex).jsValue()); 573 563 #endif 574 564 } … … 622 612 623 613 CallFrame* newCallFrame = CallFrame::create(oldEnd + codeBlock->m_numParameters + RegisterFile::CallFrameHeaderSize); 624 newCallFrame [codeBlock->thisRegister()]= JSValue(thisObj);614 newCallFrame->r(codeBlock->thisRegister()) = JSValue(thisObj); 625 615 newCallFrame->init(codeBlock, 0, scopeChain, CallFrame::noCaller(), 0, 0, 0); 626 616 … … 679 669 CallFrame* newCallFrame = CallFrame::create(oldEnd); 680 670 size_t dst = 0; 681 newCallFrame [0]= JSValue(thisObj);671 newCallFrame->r(0) = JSValue(thisObj); 682 672 ArgList::const_iterator end = args.end(); 683 673 for (ArgList::const_iterator it = args.begin(); it != end; ++it) 684 newCallFrame [++dst]= *it;674 newCallFrame->r(++dst) = *it; 685 675 686 676 CodeBlock* codeBlock = &functionBodyNode->bytecode(scopeChain); … … 740 730 size_t dst = 0; 741 731 for (int i = 0; i < argc; ++i) 742 newCallFrame [++dst]= jsUndefined();732 newCallFrame->r(++dst) = jsUndefined(); 743 733 744 734 CodeBlock* codeBlock = &functionBodyNode->bytecode(scopeChain); … … 851 841 852 842 // a 0 codeBlock indicates a built-in caller 853 newCallFrame [codeBlock->thisRegister()]= JSValue(thisObj);843 newCallFrame->r(codeBlock->thisRegister()) = JSValue(thisObj); 854 844 newCallFrame->init(codeBlock, 0, scopeChain, callFrame->addHostCallFrameFlag(), 0, 0, 0); 855 845 … … 915 905 CodeBlock* codeBlock = callFrame->codeBlock(); 916 906 Identifier& property = codeBlock->identifier((++vPC)->u.operand); 917 JSValue value = callFrame [(++vPC)->u.operand].jsValue();907 JSValue value = callFrame->r((++vPC)->u.operand).jsValue(); 918 908 JSObject* scope = new (callFrame) JSStaticScopeObject(callFrame, property, value, DontDelete); 919 callFrame [dst]= JSValue(scope);909 callFrame->r(dst) = JSValue(scope); 920 910 921 911 return callFrame->scopeChain()->push(scope); … … 1194 1184 */ 1195 1185 int dst = (++vPC)->u.operand; 1196 callFrame [dst]= JSValue(constructEmptyObject(callFrame));1186 callFrame->r(dst) = JSValue(constructEmptyObject(callFrame)); 1197 1187 1198 1188 ++vPC; … … 1211 1201 int argCount = (++vPC)->u.operand; 1212 1202 ArgList args(callFrame->registers() + firstArg, argCount); 1213 callFrame [dst]= JSValue(constructArray(callFrame, args));1203 callFrame->r(dst) = JSValue(constructArray(callFrame, args)); 1214 1204 1215 1205 ++vPC; … … 1225 1215 int dst = (++vPC)->u.operand; 1226 1216 int regExp = (++vPC)->u.operand; 1227 callFrame [dst]= JSValue(new (globalData) RegExpObject(callFrame->scopeChain()->globalObject()->regExpStructure(), callFrame->codeBlock()->regexp(regExp)));1217 callFrame->r(dst) = JSValue(new (globalData) RegExpObject(callFrame->scopeChain()->globalObject()->regExpStructure(), callFrame->codeBlock()->regexp(regExp))); 1228 1218 1229 1219 ++vPC; … … 1237 1227 int dst = (++vPC)->u.operand; 1238 1228 int src = (++vPC)->u.operand; 1239 callFrame [dst] = callFrame[src];1229 callFrame->r(dst) = callFrame->r(src); 1240 1230 1241 1231 ++vPC; … … 1250 1240 */ 1251 1241 int dst = (++vPC)->u.operand; 1252 JSValue src1 = callFrame [(++vPC)->u.operand].jsValue();1253 JSValue src2 = callFrame [(++vPC)->u.operand].jsValue();1242 JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); 1243 JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); 1254 1244 if (JSFastMath::canDoFastBitwiseOperations(src1, src2)) 1255 callFrame [dst]= JSFastMath::equal(src1, src2);1245 callFrame->r(dst) = JSFastMath::equal(src1, src2); 1256 1246 else { 1257 1247 JSValue result = jsBoolean(JSValue::equalSlowCase(callFrame, src1, src2)); 1258 1248 CHECK_FOR_EXCEPTION(); 1259 callFrame [dst]= result;1249 callFrame->r(dst) = result; 1260 1250 } 1261 1251 … … 1270 1260 */ 1271 1261 int dst = (++vPC)->u.operand; 1272 JSValue src = callFrame [(++vPC)->u.operand].jsValue();1262 JSValue src = callFrame->r((++vPC)->u.operand).jsValue(); 1273 1263 1274 1264 if (src.isUndefinedOrNull()) { 1275 callFrame [dst]= jsBoolean(true);1265 callFrame->r(dst) = jsBoolean(true); 1276 1266 ++vPC; 1277 1267 NEXT_INSTRUCTION(); 1278 1268 } 1279 1269 1280 callFrame [dst]= jsBoolean(src.isCell() && src.asCell()->structure()->typeInfo().masqueradesAsUndefined());1270 callFrame->r(dst) = jsBoolean(src.isCell() && src.asCell()->structure()->typeInfo().masqueradesAsUndefined()); 1281 1271 ++vPC; 1282 1272 NEXT_INSTRUCTION(); … … 1290 1280 */ 1291 1281 int dst = (++vPC)->u.operand; 1292 JSValue src1 = callFrame [(++vPC)->u.operand].jsValue();1293 JSValue src2 = callFrame [(++vPC)->u.operand].jsValue();1282 JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); 1283 JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); 1294 1284 if (JSFastMath::canDoFastBitwiseOperations(src1, src2)) 1295 callFrame [dst]= JSFastMath::notEqual(src1, src2);1285 callFrame->r(dst) = JSFastMath::notEqual(src1, src2); 1296 1286 else { 1297 1287 JSValue result = jsBoolean(!JSValue::equalSlowCase(callFrame, src1, src2)); 1298 1288 CHECK_FOR_EXCEPTION(); 1299 callFrame [dst]= result;1289 callFrame->r(dst) = result; 1300 1290 } 1301 1291 … … 1310 1300 */ 1311 1301 int dst = (++vPC)->u.operand; 1312 JSValue src = callFrame [(++vPC)->u.operand].jsValue();1302 JSValue src = callFrame->r((++vPC)->u.operand).jsValue(); 1313 1303 1314 1304 if (src.isUndefinedOrNull()) { 1315 callFrame [dst]= jsBoolean(false);1305 callFrame->r(dst) = jsBoolean(false); 1316 1306 ++vPC; 1317 1307 NEXT_INSTRUCTION(); 1318 1308 } 1319 1309 1320 callFrame [dst]= jsBoolean(!src.isCell() || !asCell(src)->structure()->typeInfo().masqueradesAsUndefined());1310 callFrame->r(dst) = jsBoolean(!src.isCell() || !asCell(src)->structure()->typeInfo().masqueradesAsUndefined()); 1321 1311 ++vPC; 1322 1312 NEXT_INSTRUCTION(); … … 1330 1320 */ 1331 1321 int dst = (++vPC)->u.operand; 1332 JSValue src1 = callFrame [(++vPC)->u.operand].jsValue();1333 JSValue src2 = callFrame [(++vPC)->u.operand].jsValue();1334 callFrame [dst]= jsBoolean(JSValue::strictEqual(src1, src2));1322 JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); 1323 JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); 1324 callFrame->r(dst) = jsBoolean(JSValue::strictEqual(src1, src2)); 1335 1325 1336 1326 ++vPC; … … 1345 1335 */ 1346 1336 int dst = (++vPC)->u.operand; 1347 JSValue src1 = callFrame [(++vPC)->u.operand].jsValue();1348 JSValue src2 = callFrame [(++vPC)->u.operand].jsValue();1349 callFrame [dst]= jsBoolean(!JSValue::strictEqual(src1, src2));1337 JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); 1338 JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); 1339 callFrame->r(dst) = jsBoolean(!JSValue::strictEqual(src1, src2)); 1350 1340 1351 1341 ++vPC; … … 1360 1350 */ 1361 1351 int dst = (++vPC)->u.operand; 1362 JSValue src1 = callFrame [(++vPC)->u.operand].jsValue();1363 JSValue src2 = callFrame [(++vPC)->u.operand].jsValue();1352 JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); 1353 JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); 1364 1354 JSValue result = jsBoolean(jsLess(callFrame, src1, src2)); 1365 1355 CHECK_FOR_EXCEPTION(); 1366 callFrame [dst]= result;1356 callFrame->r(dst) = result; 1367 1357 1368 1358 ++vPC; … … 1377 1367 */ 1378 1368 int dst = (++vPC)->u.operand; 1379 JSValue src1 = callFrame [(++vPC)->u.operand].jsValue();1380 JSValue src2 = callFrame [(++vPC)->u.operand].jsValue();1369 JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); 1370 JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); 1381 1371 JSValue result = jsBoolean(jsLessEq(callFrame, src1, src2)); 1382 1372 CHECK_FOR_EXCEPTION(); 1383 callFrame [dst]= result;1373 callFrame->r(dst) = result; 1384 1374 1385 1375 ++vPC; … … 1393 1383 */ 1394 1384 int srcDst = (++vPC)->u.operand; 1395 JSValue v = callFrame [srcDst].jsValue();1385 JSValue v = callFrame->r(srcDst).jsValue(); 1396 1386 if (JSFastMath::canDoFastAdditiveOperations(v)) 1397 callFrame [srcDst]= JSValue(JSFastMath::incImmediateNumber(v));1387 callFrame->r(srcDst) = JSValue(JSFastMath::incImmediateNumber(v)); 1398 1388 else { 1399 1389 JSValue result = jsNumber(callFrame, v.toNumber(callFrame) + 1); 1400 1390 CHECK_FOR_EXCEPTION(); 1401 callFrame [srcDst]= result;1391 callFrame->r(srcDst) = result; 1402 1392 } 1403 1393 … … 1412 1402 */ 1413 1403 int srcDst = (++vPC)->u.operand; 1414 JSValue v = callFrame [srcDst].jsValue();1404 JSValue v = callFrame->r(srcDst).jsValue(); 1415 1405 if (JSFastMath::canDoFastAdditiveOperations(v)) 1416 callFrame [srcDst]= JSValue(JSFastMath::decImmediateNumber(v));1406 callFrame->r(srcDst) = JSValue(JSFastMath::decImmediateNumber(v)); 1417 1407 else { 1418 1408 JSValue result = jsNumber(callFrame, v.toNumber(callFrame) - 1); 1419 1409 CHECK_FOR_EXCEPTION(); 1420 callFrame [srcDst]= result;1410 callFrame->r(srcDst) = result; 1421 1411 } 1422 1412 … … 1433 1423 int dst = (++vPC)->u.operand; 1434 1424 int srcDst = (++vPC)->u.operand; 1435 JSValue v = callFrame [srcDst].jsValue();1425 JSValue v = callFrame->r(srcDst).jsValue(); 1436 1426 if (JSFastMath::canDoFastAdditiveOperations(v)) { 1437 callFrame [dst]= v;1438 callFrame [srcDst]= JSValue(JSFastMath::incImmediateNumber(v));1427 callFrame->r(dst) = v; 1428 callFrame->r(srcDst) = JSValue(JSFastMath::incImmediateNumber(v)); 1439 1429 } else { 1440 JSValue number = callFrame [srcDst].jsValue().toJSNumber(callFrame);1430 JSValue number = callFrame->r(srcDst).jsValue().toJSNumber(callFrame); 1441 1431 CHECK_FOR_EXCEPTION(); 1442 callFrame [dst]= number;1443 callFrame [srcDst]= JSValue(jsNumber(callFrame, number.uncheckedGetNumber() + 1));1432 callFrame->r(dst) = number; 1433 callFrame->r(srcDst) = JSValue(jsNumber(callFrame, number.uncheckedGetNumber() + 1)); 1444 1434 } 1445 1435 … … 1456 1446 int dst = (++vPC)->u.operand; 1457 1447 int srcDst = (++vPC)->u.operand; 1458 JSValue v = callFrame [srcDst].jsValue();1448 JSValue v = callFrame->r(srcDst).jsValue(); 1459 1449 if (JSFastMath::canDoFastAdditiveOperations(v)) { 1460 callFrame [dst]= v;1461 callFrame [srcDst]= JSValue(JSFastMath::decImmediateNumber(v));1450 callFrame->r(dst) = v; 1451 callFrame->r(srcDst) = JSValue(JSFastMath::decImmediateNumber(v)); 1462 1452 } else { 1463 JSValue number = callFrame [srcDst].jsValue().toJSNumber(callFrame);1453 JSValue number = callFrame->r(srcDst).jsValue().toJSNumber(callFrame); 1464 1454 CHECK_FOR_EXCEPTION(); 1465 callFrame [dst]= number;1466 callFrame [srcDst]= JSValue(jsNumber(callFrame, number.uncheckedGetNumber() - 1));1455 callFrame->r(dst) = number; 1456 callFrame->r(srcDst) = JSValue(jsNumber(callFrame, number.uncheckedGetNumber() - 1)); 1467 1457 } 1468 1458 … … 1479 1469 int src = (++vPC)->u.operand; 1480 1470 1481 JSValue srcVal = callFrame [src].jsValue();1471 JSValue srcVal = callFrame->r(src).jsValue(); 1482 1472 1483 1473 if (LIKELY(srcVal.isNumber())) 1484 callFrame [dst] = callFrame[src];1474 callFrame->r(dst) = callFrame->r(src); 1485 1475 else { 1486 1476 JSValue result = srcVal.toJSNumber(callFrame); 1487 1477 CHECK_FOR_EXCEPTION(); 1488 callFrame [dst]= result;1478 callFrame->r(dst) = result; 1489 1479 } 1490 1480 … … 1499 1489 */ 1500 1490 int dst = (++vPC)->u.operand; 1501 JSValue src = callFrame [(++vPC)->u.operand].jsValue();1491 JSValue src = callFrame->r((++vPC)->u.operand).jsValue(); 1502 1492 ++vPC; 1503 1493 double v; 1504 1494 if (src.getNumber(v)) 1505 callFrame [dst]= JSValue(jsNumber(callFrame, -v));1495 callFrame->r(dst) = JSValue(jsNumber(callFrame, -v)); 1506 1496 else { 1507 1497 JSValue result = jsNumber(callFrame, -src.toNumber(callFrame)); 1508 1498 CHECK_FOR_EXCEPTION(); 1509 callFrame [dst]= result;1499 callFrame->r(dst) = result; 1510 1500 } 1511 1501 … … 1520 1510 */ 1521 1511 int dst = (++vPC)->u.operand; 1522 JSValue src1 = callFrame [(++vPC)->u.operand].jsValue();1523 JSValue src2 = callFrame [(++vPC)->u.operand].jsValue();1512 JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); 1513 JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); 1524 1514 if (JSFastMath::canDoFastAdditiveOperations(src1, src2)) 1525 callFrame [dst]= JSValue(JSFastMath::addImmediateNumbers(src1, src2));1515 callFrame->r(dst) = JSValue(JSFastMath::addImmediateNumbers(src1, src2)); 1526 1516 else { 1527 1517 JSValue result = jsAdd(callFrame, src1, src2); 1528 1518 CHECK_FOR_EXCEPTION(); 1529 callFrame [dst]= result;1519 callFrame->r(dst) = result; 1530 1520 } 1531 1521 vPC += 2; … … 1539 1529 */ 1540 1530 int dst = (++vPC)->u.operand; 1541 JSValue src1 = callFrame [(++vPC)->u.operand].jsValue();1542 JSValue src2 = callFrame [(++vPC)->u.operand].jsValue();1531 JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); 1532 JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); 1543 1533 double left; 1544 1534 double right; … … 1547 1537 int32_t right = src2.getInt32Fast(); 1548 1538 if ((left | right) >> 15 == 0) 1549 callFrame [dst]= JSValue(jsNumber(callFrame, left * right));1539 callFrame->r(dst) = JSValue(jsNumber(callFrame, left * right)); 1550 1540 else 1551 callFrame [dst]= JSValue(jsNumber(callFrame, static_cast<double>(left) * static_cast<double>(right)));1541 callFrame->r(dst) = JSValue(jsNumber(callFrame, static_cast<double>(left) * static_cast<double>(right))); 1552 1542 } else if (src1.getNumber(left) && src2.getNumber(right)) 1553 callFrame [dst]= JSValue(jsNumber(callFrame, left * right));1543 callFrame->r(dst) = JSValue(jsNumber(callFrame, left * right)); 1554 1544 else { 1555 1545 JSValue result = jsNumber(callFrame, src1.toNumber(callFrame) * src2.toNumber(callFrame)); 1556 1546 CHECK_FOR_EXCEPTION(); 1557 callFrame [dst]= result;1547 callFrame->r(dst) = result; 1558 1548 } 1559 1549 … … 1569 1559 */ 1570 1560 int dst = (++vPC)->u.operand; 1571 JSValue dividend = callFrame [(++vPC)->u.operand].jsValue();1572 JSValue divisor = callFrame [(++vPC)->u.operand].jsValue();1561 JSValue dividend = callFrame->r((++vPC)->u.operand).jsValue(); 1562 JSValue divisor = callFrame->r((++vPC)->u.operand).jsValue(); 1573 1563 double left; 1574 1564 double right; 1575 1565 if (dividend.getNumber(left) && divisor.getNumber(right)) 1576 callFrame [dst]= JSValue(jsNumber(callFrame, left / right));1566 callFrame->r(dst) = JSValue(jsNumber(callFrame, left / right)); 1577 1567 else { 1578 1568 JSValue result = jsNumber(callFrame, dividend.toNumber(callFrame) / divisor.toNumber(callFrame)); 1579 1569 CHECK_FOR_EXCEPTION(); 1580 callFrame [dst]= result;1570 callFrame->r(dst) = result; 1581 1571 } 1582 1572 ++vPC; … … 1594 1584 int divisor = (++vPC)->u.operand; 1595 1585 1596 JSValue dividendValue = callFrame [dividend].jsValue();1597 JSValue divisorValue = callFrame [divisor].jsValue();1586 JSValue dividendValue = callFrame->r(dividend).jsValue(); 1587 JSValue divisorValue = callFrame->r(divisor).jsValue(); 1598 1588 1599 1589 if (JSValue::areBothInt32Fast(dividendValue, divisorValue) && divisorValue != jsNumber(callFrame, 0)) { … … 1602 1592 JSValue result = JSValue::makeInt32Fast(dividendValue.getInt32Fast() % divisorValue.getInt32Fast()); 1603 1593 ASSERT(result); 1604 callFrame [dst]= result;1594 callFrame->r(dst) = result; 1605 1595 ++vPC; 1606 1596 NEXT_INSTRUCTION(); … … 1610 1600 JSValue result = jsNumber(callFrame, fmod(d, divisorValue.toNumber(callFrame))); 1611 1601 CHECK_FOR_EXCEPTION(); 1612 callFrame [dst]= result;1602 callFrame->r(dst) = result; 1613 1603 ++vPC; 1614 1604 NEXT_INSTRUCTION(); … … 1622 1612 */ 1623 1613 int dst = (++vPC)->u.operand; 1624 JSValue src1 = callFrame [(++vPC)->u.operand].jsValue();1625 JSValue src2 = callFrame [(++vPC)->u.operand].jsValue();1614 JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); 1615 JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); 1626 1616 double left; 1627 1617 double right; 1628 1618 if (JSFastMath::canDoFastAdditiveOperations(src1, src2)) 1629 callFrame [dst]= JSValue(JSFastMath::subImmediateNumbers(src1, src2));1619 callFrame->r(dst) = JSValue(JSFastMath::subImmediateNumbers(src1, src2)); 1630 1620 else if (src1.getNumber(left) && src2.getNumber(right)) 1631 callFrame [dst]= JSValue(jsNumber(callFrame, left - right));1621 callFrame->r(dst) = JSValue(jsNumber(callFrame, left - right)); 1632 1622 else { 1633 1623 JSValue result = jsNumber(callFrame, src1.toNumber(callFrame) - src2.toNumber(callFrame)); 1634 1624 CHECK_FOR_EXCEPTION(); 1635 callFrame [dst]= result;1625 callFrame->r(dst) = result; 1636 1626 } 1637 1627 vPC += 2; … … 1646 1636 */ 1647 1637 int dst = (++vPC)->u.operand; 1648 JSValue val = callFrame [(++vPC)->u.operand].jsValue();1649 JSValue shift = callFrame [(++vPC)->u.operand].jsValue();1638 JSValue val = callFrame->r((++vPC)->u.operand).jsValue(); 1639 JSValue shift = callFrame->r((++vPC)->u.operand).jsValue(); 1650 1640 int32_t left; 1651 1641 uint32_t right; 1652 1642 if (JSValue::areBothInt32Fast(val, shift)) 1653 callFrame [dst]= JSValue(jsNumber(callFrame, val.getInt32Fast() << (shift.getInt32Fast() & 0x1f)));1643 callFrame->r(dst) = JSValue(jsNumber(callFrame, val.getInt32Fast() << (shift.getInt32Fast() & 0x1f))); 1654 1644 else if (val.numberToInt32(left) && shift.numberToUInt32(right)) 1655 callFrame [dst]= JSValue(jsNumber(callFrame, left << (right & 0x1f)));1645 callFrame->r(dst) = JSValue(jsNumber(callFrame, left << (right & 0x1f))); 1656 1646 else { 1657 1647 JSValue result = jsNumber(callFrame, (val.toInt32(callFrame)) << (shift.toUInt32(callFrame) & 0x1f)); 1658 1648 CHECK_FOR_EXCEPTION(); 1659 callFrame [dst]= result;1649 callFrame->r(dst) = result; 1660 1650 } 1661 1651 … … 1671 1661 */ 1672 1662 int dst = (++vPC)->u.operand; 1673 JSValue val = callFrame [(++vPC)->u.operand].jsValue();1674 JSValue shift = callFrame [(++vPC)->u.operand].jsValue();1663 JSValue val = callFrame->r((++vPC)->u.operand).jsValue(); 1664 JSValue shift = callFrame->r((++vPC)->u.operand).jsValue(); 1675 1665 int32_t left; 1676 1666 uint32_t right; 1677 1667 if (JSFastMath::canDoFastRshift(val, shift)) 1678 callFrame [dst]= JSValue(JSFastMath::rightShiftImmediateNumbers(val, shift));1668 callFrame->r(dst) = JSValue(JSFastMath::rightShiftImmediateNumbers(val, shift)); 1679 1669 else if (val.numberToInt32(left) && shift.numberToUInt32(right)) 1680 callFrame [dst]= JSValue(jsNumber(callFrame, left >> (right & 0x1f)));1670 callFrame->r(dst) = JSValue(jsNumber(callFrame, left >> (right & 0x1f))); 1681 1671 else { 1682 1672 JSValue result = jsNumber(callFrame, (val.toInt32(callFrame)) >> (shift.toUInt32(callFrame) & 0x1f)); 1683 1673 CHECK_FOR_EXCEPTION(); 1684 callFrame [dst]= result;1674 callFrame->r(dst) = result; 1685 1675 } 1686 1676 … … 1696 1686 */ 1697 1687 int dst = (++vPC)->u.operand; 1698 JSValue val = callFrame [(++vPC)->u.operand].jsValue();1699 JSValue shift = callFrame [(++vPC)->u.operand].jsValue();1688 JSValue val = callFrame->r((++vPC)->u.operand).jsValue(); 1689 JSValue shift = callFrame->r((++vPC)->u.operand).jsValue(); 1700 1690 if (JSFastMath::canDoFastUrshift(val, shift)) 1701 callFrame [dst]= JSValue(JSFastMath::rightShiftImmediateNumbers(val, shift));1691 callFrame->r(dst) = JSValue(JSFastMath::rightShiftImmediateNumbers(val, shift)); 1702 1692 else { 1703 1693 JSValue result = jsNumber(callFrame, (val.toUInt32(callFrame)) >> (shift.toUInt32(callFrame) & 0x1f)); 1704 1694 CHECK_FOR_EXCEPTION(); 1705 callFrame [dst]= result;1695 callFrame->r(dst) = result; 1706 1696 } 1707 1697 … … 1717 1707 */ 1718 1708 int dst = (++vPC)->u.operand; 1719 JSValue src1 = callFrame [(++vPC)->u.operand].jsValue();1720 JSValue src2 = callFrame [(++vPC)->u.operand].jsValue();1709 JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); 1710 JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); 1721 1711 int32_t left; 1722 1712 int32_t right; 1723 1713 if (JSFastMath::canDoFastBitwiseOperations(src1, src2)) 1724 callFrame [dst]= JSValue(JSFastMath::andImmediateNumbers(src1, src2));1714 callFrame->r(dst) = JSValue(JSFastMath::andImmediateNumbers(src1, src2)); 1725 1715 else if (src1.numberToInt32(left) && src2.numberToInt32(right)) 1726 callFrame [dst]= JSValue(jsNumber(callFrame, left & right));1716 callFrame->r(dst) = JSValue(jsNumber(callFrame, left & right)); 1727 1717 else { 1728 1718 JSValue result = jsNumber(callFrame, src1.toInt32(callFrame) & src2.toInt32(callFrame)); 1729 1719 CHECK_FOR_EXCEPTION(); 1730 callFrame [dst]= result;1720 callFrame->r(dst) = result; 1731 1721 } 1732 1722 … … 1742 1732 */ 1743 1733 int dst = (++vPC)->u.operand; 1744 JSValue src1 = callFrame [(++vPC)->u.operand].jsValue();1745 JSValue src2 = callFrame [(++vPC)->u.operand].jsValue();1734 JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); 1735 JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); 1746 1736 int32_t left; 1747 1737 int32_t right; 1748 1738 if (JSFastMath::canDoFastBitwiseOperations(src1, src2)) 1749 callFrame [dst]= JSValue(JSFastMath::xorImmediateNumbers(src1, src2));1739 callFrame->r(dst) = JSValue(JSFastMath::xorImmediateNumbers(src1, src2)); 1750 1740 else if (src1.numberToInt32(left) && src2.numberToInt32(right)) 1751 callFrame [dst]= JSValue(jsNumber(callFrame, left ^ right));1741 callFrame->r(dst) = JSValue(jsNumber(callFrame, left ^ right)); 1752 1742 else { 1753 1743 JSValue result = jsNumber(callFrame, src1.toInt32(callFrame) ^ src2.toInt32(callFrame)); 1754 1744 CHECK_FOR_EXCEPTION(); 1755 callFrame [dst]= result;1745 callFrame->r(dst) = result; 1756 1746 } 1757 1747 … … 1767 1757 */ 1768 1758 int dst = (++vPC)->u.operand; 1769 JSValue src1 = callFrame [(++vPC)->u.operand].jsValue();1770 JSValue src2 = callFrame [(++vPC)->u.operand].jsValue();1759 JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); 1760 JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); 1771 1761 int32_t left; 1772 1762 int32_t right; 1773 1763 if (JSFastMath::canDoFastBitwiseOperations(src1, src2)) 1774 callFrame [dst]= JSValue(JSFastMath::orImmediateNumbers(src1, src2));1764 callFrame->r(dst) = JSValue(JSFastMath::orImmediateNumbers(src1, src2)); 1775 1765 else if (src1.numberToInt32(left) && src2.numberToInt32(right)) 1776 callFrame [dst]= JSValue(jsNumber(callFrame, left | right));1766 callFrame->r(dst) = JSValue(jsNumber(callFrame, left | right)); 1777 1767 else { 1778 1768 JSValue result = jsNumber(callFrame, src1.toInt32(callFrame) | src2.toInt32(callFrame)); 1779 1769 CHECK_FOR_EXCEPTION(); 1780 callFrame [dst]= result;1770 callFrame->r(dst) = result; 1781 1771 } 1782 1772 … … 1791 1781 */ 1792 1782 int dst = (++vPC)->u.operand; 1793 JSValue src = callFrame [(++vPC)->u.operand].jsValue();1783 JSValue src = callFrame->r((++vPC)->u.operand).jsValue(); 1794 1784 int32_t value; 1795 1785 if (src.numberToInt32(value)) 1796 callFrame [dst]= JSValue(jsNumber(callFrame, ~value));1786 callFrame->r(dst) = JSValue(jsNumber(callFrame, ~value)); 1797 1787 else { 1798 1788 JSValue result = jsNumber(callFrame, ~src.toInt32(callFrame)); 1799 1789 CHECK_FOR_EXCEPTION(); 1800 callFrame [dst]= result;1790 callFrame->r(dst) = result; 1801 1791 } 1802 1792 ++vPC; … … 1811 1801 int dst = (++vPC)->u.operand; 1812 1802 int src = (++vPC)->u.operand; 1813 JSValue result = jsBoolean(!callFrame [src].jsValue().toBoolean(callFrame));1803 JSValue result = jsBoolean(!callFrame->r(src).jsValue().toBoolean(callFrame)); 1814 1804 CHECK_FOR_EXCEPTION(); 1815 callFrame [dst]= result;1805 callFrame->r(dst) = result; 1816 1806 1817 1807 ++vPC; … … 1836 1826 int baseProto = vPC[4].u.operand; 1837 1827 1838 JSValue baseVal = callFrame [base].jsValue();1828 JSValue baseVal = callFrame->r(base).jsValue(); 1839 1829 1840 1830 if (isInvalidParamForInstanceOf(callFrame, callFrame->codeBlock(), vPC, baseVal, exceptionValue)) 1841 1831 goto vm_throw; 1842 1832 1843 bool result = asObject(baseVal)->hasInstance(callFrame, callFrame [value].jsValue(), callFrame[baseProto].jsValue());1833 bool result = asObject(baseVal)->hasInstance(callFrame, callFrame->r(value).jsValue(), callFrame->r(baseProto).jsValue()); 1844 1834 CHECK_FOR_EXCEPTION(); 1845 callFrame [dst]= jsBoolean(result);1835 callFrame->r(dst) = jsBoolean(result); 1846 1836 1847 1837 vPC += 5; … … 1856 1846 int dst = (++vPC)->u.operand; 1857 1847 int src = (++vPC)->u.operand; 1858 callFrame [dst] = JSValue(jsTypeStringForValue(callFrame, callFrame[src].jsValue()));1848 callFrame->r(dst) = JSValue(jsTypeStringForValue(callFrame, callFrame->r(src).jsValue())); 1859 1849 1860 1850 ++vPC; … … 1870 1860 int dst = (++vPC)->u.operand; 1871 1861 int src = (++vPC)->u.operand; 1872 JSValue v = callFrame [src].jsValue();1873 callFrame [dst]= jsBoolean(v.isCell() ? v.asCell()->structure()->typeInfo().masqueradesAsUndefined() : v.isUndefined());1862 JSValue v = callFrame->r(src).jsValue(); 1863 callFrame->r(dst) = jsBoolean(v.isCell() ? v.asCell()->structure()->typeInfo().masqueradesAsUndefined() : v.isUndefined()); 1874 1864 1875 1865 ++vPC; … … 1885 1875 int dst = (++vPC)->u.operand; 1886 1876 int src = (++vPC)->u.operand; 1887 callFrame [dst] = jsBoolean(callFrame[src].jsValue().isBoolean());1877 callFrame->r(dst) = jsBoolean(callFrame->r(src).jsValue().isBoolean()); 1888 1878 1889 1879 ++vPC; … … 1899 1889 int dst = (++vPC)->u.operand; 1900 1890 int src = (++vPC)->u.operand; 1901 callFrame [dst] = jsBoolean(callFrame[src].jsValue().isNumber());1891 callFrame->r(dst) = jsBoolean(callFrame->r(src).jsValue().isNumber()); 1902 1892 1903 1893 ++vPC; … … 1913 1903 int dst = (++vPC)->u.operand; 1914 1904 int src = (++vPC)->u.operand; 1915 callFrame [dst] = jsBoolean(callFrame[src].jsValue().isString());1905 callFrame->r(dst) = jsBoolean(callFrame->r(src).jsValue().isString()); 1916 1906 1917 1907 ++vPC; … … 1927 1917 int dst = (++vPC)->u.operand; 1928 1918 int src = (++vPC)->u.operand; 1929 callFrame [dst] = jsBoolean(jsIsObjectType(callFrame[src].jsValue()));1919 callFrame->r(dst) = jsBoolean(jsIsObjectType(callFrame->r(src).jsValue())); 1930 1920 1931 1921 ++vPC; … … 1941 1931 int dst = (++vPC)->u.operand; 1942 1932 int src = (++vPC)->u.operand; 1943 callFrame [dst] = jsBoolean(jsIsFunctionType(callFrame[src].jsValue()));1933 callFrame->r(dst) = jsBoolean(jsIsFunctionType(callFrame->r(src).jsValue())); 1944 1934 1945 1935 ++vPC; … … 1959 1949 int base = (++vPC)->u.operand; 1960 1950 1961 JSValue baseVal = callFrame [base].jsValue();1951 JSValue baseVal = callFrame->r(base).jsValue(); 1962 1952 if (isInvalidParamForIn(callFrame, callFrame->codeBlock(), vPC, baseVal, exceptionValue)) 1963 1953 goto vm_throw; … … 1965 1955 JSObject* baseObj = asObject(baseVal); 1966 1956 1967 JSValue propName = callFrame [property].jsValue();1957 JSValue propName = callFrame->r(property).jsValue(); 1968 1958 1969 1959 uint32_t i; 1970 1960 if (propName.getUInt32(i)) 1971 callFrame [dst]= jsBoolean(baseObj->hasProperty(callFrame, i));1961 callFrame->r(dst) = jsBoolean(baseObj->hasProperty(callFrame, i)); 1972 1962 else { 1973 1963 Identifier property(callFrame, propName.toString(callFrame)); 1974 1964 CHECK_FOR_EXCEPTION(); 1975 callFrame [dst]= jsBoolean(baseObj->hasProperty(callFrame, property));1965 callFrame->r(dst) = jsBoolean(baseObj->hasProperty(callFrame, property)); 1976 1966 } 1977 1967 … … 2031 2021 int index = (++vPC)->u.operand; 2032 2022 2033 callFrame [dst]= scope->registerAt(index);2023 callFrame->r(dst) = scope->registerAt(index); 2034 2024 ++vPC; 2035 2025 NEXT_INSTRUCTION(); … … 2045 2035 int value = (++vPC)->u.operand; 2046 2036 2047 scope->registerAt(index) = JSValue(callFrame [value].jsValue());2037 scope->registerAt(index) = JSValue(callFrame->r(value).jsValue()); 2048 2038 ++vPC; 2049 2039 NEXT_INSTRUCTION(); … … 2070 2060 ASSERT((*iter)->isVariableObject()); 2071 2061 JSVariableObject* scope = static_cast<JSVariableObject*>(*iter); 2072 callFrame [dst]= scope->registerAt(index);2062 callFrame->r(dst) = scope->registerAt(index); 2073 2063 ++vPC; 2074 2064 NEXT_INSTRUCTION(); … … 2093 2083 ASSERT((*iter)->isVariableObject()); 2094 2084 JSVariableObject* scope = static_cast<JSVariableObject*>(*iter); 2095 scope->registerAt(index) = JSValue(callFrame [value].jsValue());2085 scope->registerAt(index) = JSValue(callFrame->r(value).jsValue()); 2096 2086 ++vPC; 2097 2087 NEXT_INSTRUCTION(); … … 2161 2151 CodeBlock* codeBlock = callFrame->codeBlock(); 2162 2152 Identifier& ident = codeBlock->identifier(property); 2163 JSValue baseValue = callFrame [base].jsValue();2153 JSValue baseValue = callFrame->r(base).jsValue(); 2164 2154 PropertySlot slot(baseValue); 2165 2155 JSValue result = baseValue.get(callFrame, ident, slot); … … 2168 2158 tryCacheGetByID(callFrame, codeBlock, vPC, baseValue, ident, slot); 2169 2159 2170 callFrame [dst]= result;2160 callFrame->r(dst) = result; 2171 2161 vPC += 8; 2172 2162 NEXT_INSTRUCTION(); … … 2180 2170 */ 2181 2171 int base = vPC[2].u.operand; 2182 JSValue baseValue = callFrame [base].jsValue();2172 JSValue baseValue = callFrame->r(base).jsValue(); 2183 2173 2184 2174 if (LIKELY(baseValue.isCell())) { … … 2193 2183 2194 2184 ASSERT(baseObject->get(callFrame, callFrame->codeBlock()->identifier(vPC[3].u.operand)) == baseObject->getDirectOffset(offset)); 2195 callFrame [dst]= JSValue(baseObject->getDirectOffset(offset));2185 callFrame->r(dst) = JSValue(baseObject->getDirectOffset(offset)); 2196 2186 2197 2187 vPC += 8; … … 2211 2201 */ 2212 2202 int base = vPC[2].u.operand; 2213 JSValue baseValue = callFrame [base].jsValue();2203 JSValue baseValue = callFrame->r(base).jsValue(); 2214 2204 2215 2205 if (LIKELY(baseValue.isCell())) { … … 2227 2217 2228 2218 ASSERT(protoObject->get(callFrame, callFrame->codeBlock()->identifier(vPC[3].u.operand)) == protoObject->getDirectOffset(offset)); 2229 callFrame [dst]= JSValue(protoObject->getDirectOffset(offset));2219 callFrame->r(dst) = JSValue(protoObject->getDirectOffset(offset)); 2230 2220 2231 2221 vPC += 8; … … 2260 2250 */ 2261 2251 int base = vPC[2].u.operand; 2262 JSValue baseValue = callFrame [base].jsValue();2252 JSValue baseValue = callFrame->r(base).jsValue(); 2263 2253 2264 2254 if (LIKELY(baseValue.isCell())) { … … 2282 2272 2283 2273 ASSERT(baseObject->get(callFrame, callFrame->codeBlock()->identifier(vPC[3].u.operand)) == baseObject->getDirectOffset(offset)); 2284 callFrame [dst]= JSValue(baseObject->getDirectOffset(offset));2274 callFrame->r(dst) = JSValue(baseObject->getDirectOffset(offset)); 2285 2275 2286 2276 vPC += 8; … … 2308 2298 2309 2299 Identifier& ident = callFrame->codeBlock()->identifier(property); 2310 JSValue baseValue = callFrame [base].jsValue();2300 JSValue baseValue = callFrame->r(base).jsValue(); 2311 2301 PropertySlot slot(baseValue); 2312 2302 JSValue result = baseValue.get(callFrame, ident, slot); 2313 2303 CHECK_FOR_EXCEPTION(); 2314 2304 2315 callFrame [dst]= result;2305 callFrame->r(dst) = result; 2316 2306 vPC += 8; 2317 2307 NEXT_INSTRUCTION(); … … 2326 2316 2327 2317 int base = vPC[2].u.operand; 2328 JSValue baseValue = callFrame [base].jsValue();2318 JSValue baseValue = callFrame->r(base).jsValue(); 2329 2319 if (LIKELY(isJSArray(globalData, baseValue))) { 2330 2320 int dst = vPC[1].u.operand; 2331 callFrame [dst]= JSValue(jsNumber(callFrame, asArray(baseValue)->length()));2321 callFrame->r(dst) = JSValue(jsNumber(callFrame, asArray(baseValue)->length())); 2332 2322 vPC += 8; 2333 2323 NEXT_INSTRUCTION(); … … 2346 2336 2347 2337 int base = vPC[2].u.operand; 2348 JSValue baseValue = callFrame [base].jsValue();2338 JSValue baseValue = callFrame->r(base).jsValue(); 2349 2339 if (LIKELY(isJSString(globalData, baseValue))) { 2350 2340 int dst = vPC[1].u.operand; 2351 callFrame [dst]= JSValue(jsNumber(callFrame, asString(baseValue)->value().size()));2341 callFrame->r(dst) = JSValue(jsNumber(callFrame, asString(baseValue)->value().size())); 2352 2342 vPC += 8; 2353 2343 NEXT_INSTRUCTION(); … … 2372 2362 2373 2363 CodeBlock* codeBlock = callFrame->codeBlock(); 2374 JSValue baseValue = callFrame [base].jsValue();2364 JSValue baseValue = callFrame->r(base).jsValue(); 2375 2365 Identifier& ident = codeBlock->identifier(property); 2376 2366 PutPropertySlot slot; 2377 baseValue.put(callFrame, ident, callFrame [value].jsValue(), slot);2367 baseValue.put(callFrame, ident, callFrame->r(value).jsValue(), slot); 2378 2368 CHECK_FOR_EXCEPTION(); 2379 2369 … … 2395 2385 */ 2396 2386 int base = vPC[1].u.operand; 2397 JSValue baseValue = callFrame [base].jsValue();2387 JSValue baseValue = callFrame->r(base).jsValue(); 2398 2388 2399 2389 if (LIKELY(baseValue.isCell())) { … … 2423 2413 unsigned offset = vPC[7].u.operand; 2424 2414 ASSERT(baseObject->offsetForLocation(baseObject->getDirectLocation(callFrame->codeBlock()->identifier(vPC[2].u.operand))) == offset); 2425 baseObject->putDirectOffset(offset, callFrame [value].jsValue());2415 baseObject->putDirectOffset(offset, callFrame->r(value).jsValue()); 2426 2416 2427 2417 vPC += 8; … … 2445 2435 */ 2446 2436 int base = vPC[1].u.operand; 2447 JSValue baseValue = callFrame [base].jsValue();2437 JSValue baseValue = callFrame->r(base).jsValue(); 2448 2438 2449 2439 if (LIKELY(baseValue.isCell())) { … … 2458 2448 2459 2449 ASSERT(baseObject->offsetForLocation(baseObject->getDirectLocation(callFrame->codeBlock()->identifier(vPC[2].u.operand))) == offset); 2460 baseObject->putDirectOffset(offset, callFrame [value].jsValue());2450 baseObject->putDirectOffset(offset, callFrame->r(value).jsValue()); 2461 2451 2462 2452 vPC += 8; … … 2481 2471 int value = vPC[3].u.operand; 2482 2472 2483 JSValue baseValue = callFrame [base].jsValue();2473 JSValue baseValue = callFrame->r(base).jsValue(); 2484 2474 Identifier& ident = callFrame->codeBlock()->identifier(property); 2485 2475 PutPropertySlot slot; 2486 baseValue.put(callFrame, ident, callFrame [value].jsValue(), slot);2476 baseValue.put(callFrame, ident, callFrame->r(value).jsValue(), slot); 2487 2477 CHECK_FOR_EXCEPTION(); 2488 2478 … … 2502 2492 int property = (++vPC)->u.operand; 2503 2493 2504 JSObject* baseObj = callFrame [base].jsValue().toObject(callFrame);2494 JSObject* baseObj = callFrame->r(base).jsValue().toObject(callFrame); 2505 2495 Identifier& ident = callFrame->codeBlock()->identifier(property); 2506 2496 JSValue result = jsBoolean(baseObj->deleteProperty(callFrame, ident)); 2507 2497 CHECK_FOR_EXCEPTION(); 2508 callFrame [dst]= result;2498 callFrame->r(dst) = result; 2509 2499 ++vPC; 2510 2500 NEXT_INSTRUCTION(); … … 2522 2512 int property = (++vPC)->u.operand; 2523 2513 2524 JSValue baseValue = callFrame [base].jsValue();2525 JSValue subscript = callFrame [property].jsValue();2514 JSValue baseValue = callFrame->r(base).jsValue(); 2515 JSValue subscript = callFrame->r(property).jsValue(); 2526 2516 2527 2517 JSValue result; … … 2547 2537 2548 2538 CHECK_FOR_EXCEPTION(); 2549 callFrame [dst]= result;2539 callFrame->r(dst) = result; 2550 2540 ++vPC; 2551 2541 NEXT_INSTRUCTION(); … … 2566 2556 int value = (++vPC)->u.operand; 2567 2557 2568 JSValue baseValue = callFrame [base].jsValue();2569 JSValue subscript = callFrame [property].jsValue();2558 JSValue baseValue = callFrame->r(base).jsValue(); 2559 JSValue subscript = callFrame->r(property).jsValue(); 2570 2560 2571 2561 if (LIKELY(subscript.isUInt32Fast())) { … … 2574 2564 JSArray* jsArray = asArray(baseValue); 2575 2565 if (jsArray->canSetIndex(i)) 2576 jsArray->setIndex(i, callFrame [value].jsValue());2566 jsArray->setIndex(i, callFrame->r(value).jsValue()); 2577 2567 else 2578 jsArray->JSArray::put(callFrame, i, callFrame [value].jsValue());2568 jsArray->JSArray::put(callFrame, i, callFrame->r(value).jsValue()); 2579 2569 } else if (isJSByteArray(globalData, baseValue) && asByteArray(baseValue)->canAccessIndex(i)) { 2580 2570 JSByteArray* jsByteArray = asByteArray(baseValue); 2581 2571 double dValue = 0; 2582 JSValue jsValue = callFrame [value].jsValue();2572 JSValue jsValue = callFrame->r(value).jsValue(); 2583 2573 if (jsValue.isInt32Fast()) 2584 2574 jsByteArray->setIndex(i, jsValue.getInt32Fast()); … … 2588 2578 baseValue.put(callFrame, i, jsValue); 2589 2579 } else 2590 baseValue.put(callFrame, i, callFrame [value].jsValue());2580 baseValue.put(callFrame, i, callFrame->r(value).jsValue()); 2591 2581 } else { 2592 2582 Identifier property(callFrame, subscript.toString(callFrame)); 2593 2583 if (!globalData->exception) { // Don't put to an object if toString threw an exception. 2594 2584 PutPropertySlot slot; 2595 baseValue.put(callFrame, property, callFrame [value].jsValue(), slot);2585 baseValue.put(callFrame, property, callFrame->r(value).jsValue(), slot); 2596 2586 } 2597 2587 } … … 2613 2603 int property = (++vPC)->u.operand; 2614 2604 2615 JSObject* baseObj = callFrame [base].jsValue().toObject(callFrame); // may throw2616 2617 JSValue subscript = callFrame [property].jsValue();2605 JSObject* baseObj = callFrame->r(base).jsValue().toObject(callFrame); // may throw 2606 2607 JSValue subscript = callFrame->r(property).jsValue(); 2618 2608 JSValue result; 2619 2609 uint32_t i; … … 2628 2618 2629 2619 CHECK_FOR_EXCEPTION(); 2630 callFrame [dst]= result;2620 callFrame->r(dst) = result; 2631 2621 ++vPC; 2632 2622 NEXT_INSTRUCTION(); … … 2648 2638 int value = (++vPC)->u.operand; 2649 2639 2650 callFrame [base].jsValue().put(callFrame, property, callFrame[value].jsValue());2640 callFrame->r(base).jsValue().put(callFrame, property, callFrame->r(value).jsValue()); 2651 2641 2652 2642 ++vPC; … … 2695 2685 int cond = (++vPC)->u.operand; 2696 2686 int target = (++vPC)->u.operand; 2697 if (callFrame [cond].jsValue().toBoolean(callFrame)) {2687 if (callFrame->r(cond).jsValue().toBoolean(callFrame)) { 2698 2688 vPC += target; 2699 2689 CHECK_FOR_TIMEOUT(); … … 2712 2702 int cond = (++vPC)->u.operand; 2713 2703 int target = (++vPC)->u.operand; 2714 if (callFrame [cond].jsValue().toBoolean(callFrame)) {2704 if (callFrame->r(cond).jsValue().toBoolean(callFrame)) { 2715 2705 vPC += target; 2716 2706 NEXT_INSTRUCTION(); … … 2728 2718 int cond = (++vPC)->u.operand; 2729 2719 int target = (++vPC)->u.operand; 2730 if (!callFrame [cond].jsValue().toBoolean(callFrame)) {2720 if (!callFrame->r(cond).jsValue().toBoolean(callFrame)) { 2731 2721 vPC += target; 2732 2722 NEXT_INSTRUCTION(); … … 2744 2734 int src = (++vPC)->u.operand; 2745 2735 int target = (++vPC)->u.operand; 2746 JSValue srcValue = callFrame [src].jsValue();2736 JSValue srcValue = callFrame->r(src).jsValue(); 2747 2737 2748 2738 if (srcValue.isUndefinedOrNull() || (srcValue.isCell() && srcValue.asCell()->structure()->typeInfo().masqueradesAsUndefined())) { … … 2762 2752 int src = (++vPC)->u.operand; 2763 2753 int target = (++vPC)->u.operand; 2764 JSValue srcValue = callFrame [src].jsValue();2754 JSValue srcValue = callFrame->r(src).jsValue(); 2765 2755 2766 2756 if (!srcValue.isUndefinedOrNull() || (srcValue.isCell() && !srcValue.asCell()->structure()->typeInfo().masqueradesAsUndefined())) { … … 2781 2771 JSValue ptr = JSValue((++vPC)->u.jsCell); 2782 2772 int target = (++vPC)->u.operand; 2783 JSValue srcValue = callFrame [src].jsValue();2773 JSValue srcValue = callFrame->r(src).jsValue(); 2784 2774 if (srcValue != ptr) { 2785 2775 vPC += target; … … 2801 2791 the JS timeout is reached. 2802 2792 */ 2803 JSValue src1 = callFrame [(++vPC)->u.operand].jsValue();2804 JSValue src2 = callFrame [(++vPC)->u.operand].jsValue();2793 JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); 2794 JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); 2805 2795 int target = (++vPC)->u.operand; 2806 2796 … … 2828 2818 the JS timeout is reached. 2829 2819 */ 2830 JSValue src1 = callFrame [(++vPC)->u.operand].jsValue();2831 JSValue src2 = callFrame [(++vPC)->u.operand].jsValue();2820 JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); 2821 JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); 2832 2822 int target = (++vPC)->u.operand; 2833 2823 … … 2852 2842 result of the comparison is false. 2853 2843 */ 2854 JSValue src1 = callFrame [(++vPC)->u.operand].jsValue();2855 JSValue src2 = callFrame [(++vPC)->u.operand].jsValue();2844 JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); 2845 JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); 2856 2846 int target = (++vPC)->u.operand; 2857 2847 … … 2875 2865 if and only if theresult of the comparison is false. 2876 2866 */ 2877 JSValue src1 = callFrame [(++vPC)->u.operand].jsValue();2878 JSValue src2 = callFrame [(++vPC)->u.operand].jsValue();2867 JSValue src1 = callFrame->r((++vPC)->u.operand).jsValue(); 2868 JSValue src2 = callFrame->r((++vPC)->u.operand).jsValue(); 2879 2869 int target = (++vPC)->u.operand; 2880 2870 … … 2901 2891 int tableIndex = (++vPC)->u.operand; 2902 2892 int defaultOffset = (++vPC)->u.operand; 2903 JSValue scrutinee = callFrame [(++vPC)->u.operand].jsValue();2893 JSValue scrutinee = callFrame->r((++vPC)->u.operand).jsValue(); 2904 2894 if (scrutinee.isInt32Fast()) 2905 2895 vPC += callFrame->codeBlock()->immediateSwitchJumpTable(tableIndex).offsetForValue(scrutinee.getInt32Fast(), defaultOffset); … … 2925 2915 int tableIndex = (++vPC)->u.operand; 2926 2916 int defaultOffset = (++vPC)->u.operand; 2927 JSValue scrutinee = callFrame [(++vPC)->u.operand].jsValue();2917 JSValue scrutinee = callFrame->r((++vPC)->u.operand).jsValue(); 2928 2918 if (!scrutinee.isString()) 2929 2919 vPC += defaultOffset; … … 2948 2938 int tableIndex = (++vPC)->u.operand; 2949 2939 int defaultOffset = (++vPC)->u.operand; 2950 JSValue scrutinee = callFrame [(++vPC)->u.operand].jsValue();2940 JSValue scrutinee = callFrame->r((++vPC)->u.operand).jsValue(); 2951 2941 if (!scrutinee.isString()) 2952 2942 vPC += defaultOffset; … … 2966 2956 int func = (++vPC)->u.operand; 2967 2957 2968 callFrame [dst]= callFrame->codeBlock()->function(func)->makeFunction(callFrame, callFrame->scopeChain());2958 callFrame->r(dst) = callFrame->codeBlock()->function(func)->makeFunction(callFrame, callFrame->scopeChain()); 2969 2959 2970 2960 ++vPC; … … 2982 2972 int func = (++vPC)->u.operand; 2983 2973 2984 callFrame [dst]= callFrame->codeBlock()->functionExpression(func)->makeFunction(callFrame, callFrame->scopeChain());2974 callFrame->r(dst) = callFrame->codeBlock()->functionExpression(func)->makeFunction(callFrame, callFrame->scopeChain()); 2985 2975 2986 2976 ++vPC; … … 3004 2994 int registerOffset = vPC[4].u.operand; 3005 2995 3006 JSValue funcVal = callFrame [func].jsValue();2996 JSValue funcVal = callFrame->r(func).jsValue(); 3007 2997 3008 2998 Register* newCallFrame = callFrame->registers() + registerOffset; … … 3015 3005 if (exceptionValue) 3016 3006 goto vm_throw; 3017 callFrame [dst]= result;3007 callFrame->r(dst) = result; 3018 3008 3019 3009 vPC += 5; … … 3041 3031 int registerOffset = vPC[4].u.operand; 3042 3032 3043 JSValue v = callFrame [func].jsValue();3033 JSValue v = callFrame->r(func).jsValue(); 3044 3034 3045 3035 CallData callData; … … 3090 3080 CHECK_FOR_EXCEPTION(); 3091 3081 3092 callFrame [dst]= JSValue(returnValue);3082 callFrame->r(dst) = JSValue(returnValue); 3093 3083 3094 3084 vPC += 5; … … 3105 3095 int argsOffset = (++vPC)->u.operand; 3106 3096 3107 JSValue arguments = callFrame [argsOffset].jsValue();3097 JSValue arguments = callFrame->r(argsOffset).jsValue(); 3108 3098 uint32_t argCount = 0; 3109 3099 if (!arguments) { 3110 argCount = (uint32_t)(callFrame [RegisterFile::ArgumentCount].u.i) - 1;3100 argCount = (uint32_t)(callFrame->argumentCount()) - 1; 3111 3101 int32_t sizeDelta = argsOffset + argCount + RegisterFile::CallFrameHeaderSize; 3112 3102 Register* newEnd = callFrame->registers() + sizeDelta; … … 3115 3105 goto vm_throw; 3116 3106 } 3117 uint32_t expectedParams = asFunction(callFrame[RegisterFile::Callee].jsValue())->body()->parameterCount();3107 uint32_t expectedParams = callFrame->callee()->body()->parameterCount(); 3118 3108 uint32_t inplaceArgs = min(argCount, expectedParams); 3119 3109 uint32_t i = 0; … … 3173 3163 } 3174 3164 CHECK_FOR_EXCEPTION(); 3175 callFrame [argCountDst]= argCount + 1;3165 callFrame->r(argCountDst) = argCount + 1; 3176 3166 ++vPC; 3177 3167 NEXT_INSTRUCTION(); … … 3194 3184 int registerOffset = vPC[4].u.operand; 3195 3185 3196 JSValue v = callFrame [func].jsValue();3197 int argCount = callFrame [argCountReg].i();3186 JSValue v = callFrame->r(func).jsValue(); 3187 int argCount = callFrame->r(argCountReg).i(); 3198 3188 registerOffset += argCount; 3199 3189 CallData callData; … … 3244 3234 CHECK_FOR_EXCEPTION(); 3245 3235 3246 callFrame [dst]= JSValue(returnValue);3236 callFrame->r(dst) = JSValue(returnValue); 3247 3237 3248 3238 vPC += 5; … … 3271 3261 ASSERT(callFrame->codeBlock()->needsFullScopeChain()); 3272 3262 3273 asActivation(callFrame [src].jsValue())->copyRegisters(callFrame->optionalCalleeArguments());3263 asActivation(callFrame->r(src).jsValue())->copyRegisters(callFrame->optionalCalleeArguments()); 3274 3264 3275 3265 ++vPC; … … 3311 3301 callFrame->scopeChain()->deref(); 3312 3302 3313 JSValue returnValue = callFrame [result].jsValue();3303 JSValue returnValue = callFrame->r(result).jsValue(); 3314 3304 3315 3305 vPC = callFrame->returnPC(); … … 3320 3310 return returnValue; 3321 3311 3322 callFrame [dst]= JSValue(returnValue);3312 callFrame->r(dst) = JSValue(returnValue); 3323 3313 3324 3314 NEXT_INSTRUCTION(); … … 3339 3329 3340 3330 for (size_t count = codeBlock->m_numVars; i < count; ++i) 3341 callFrame[i] = jsUndefined(); 3342 3343 for (size_t count = codeBlock->numberOfConstantRegisters(), j = 0; j < count; ++i, ++j) 3344 callFrame[i] = codeBlock->constantRegister(j); 3331 callFrame->r(i) = jsUndefined(); 3345 3332 3346 3333 ++vPC; … … 3364 3351 3365 3352 for (size_t count = codeBlock->m_numVars; i < count; ++i) 3366 callFrame[i] = jsUndefined(); 3367 3368 for (size_t count = codeBlock->numberOfConstantRegisters(), j = 0; j < count; ++i, ++j) 3369 callFrame[i] = codeBlock->constantRegister(j); 3353 callFrame->r(i) = jsUndefined(); 3370 3354 3371 3355 int dst = (++vPC)->u.operand; 3372 3356 JSActivation* activation = new (globalData) JSActivation(callFrame, static_cast<FunctionBodyNode*>(codeBlock->ownerNode())); 3373 callFrame [dst]= activation;3357 callFrame->r(dst) = activation; 3374 3358 callFrame->setScopeChain(callFrame->scopeChain()->copy()->push(activation)); 3375 3359 … … 3390 3374 3391 3375 int thisRegister = (++vPC)->u.operand; 3392 JSValue thisVal = callFrame [thisRegister].jsValue();3376 JSValue thisVal = callFrame->r(thisRegister).jsValue(); 3393 3377 if (thisVal.needsThisConversion()) 3394 callFrame [thisRegister]= JSValue(thisVal.toThisObject(callFrame));3378 callFrame->r(thisRegister) = JSValue(thisVal.toThisObject(callFrame)); 3395 3379 3396 3380 ++vPC; … … 3407 3391 block. 3408 3392 */ 3409 callFrame [RegisterFile::ArgumentsRegister]= JSValue();3393 callFrame->r(RegisterFile::ArgumentsRegister) = JSValue(); 3410 3394 ++vPC; 3411 3395 NEXT_INSTRUCTION(); … … 3422 3406 Arguments* arguments = new (globalData) Arguments(callFrame); 3423 3407 callFrame->setCalleeArguments(arguments); 3424 callFrame [RegisterFile::ArgumentsRegister]= arguments;3408 callFrame->r(RegisterFile::ArgumentsRegister) = arguments; 3425 3409 } 3426 3410 ++vPC; … … 3449 3433 int thisRegister = vPC[6].u.operand; 3450 3434 3451 JSValue v = callFrame [func].jsValue();3435 JSValue v = callFrame->r(func).jsValue(); 3452 3436 3453 3437 ConstructData constructData; … … 3460 3444 3461 3445 Structure* structure; 3462 JSValue prototype = callFrame [proto].jsValue();3446 JSValue prototype = callFrame->r(proto).jsValue(); 3463 3447 if (prototype.isObject()) 3464 3448 structure = asObject(prototype)->inheritorID(); … … 3467 3451 JSObject* newObject = new (globalData) JSObject(structure); 3468 3452 3469 callFrame [thisRegister]= JSValue(newObject); // "this" value3453 callFrame->r(thisRegister) = JSValue(newObject); // "this" value 3470 3454 3471 3455 CallFrame* previousCallFrame = callFrame; … … 3501 3485 } 3502 3486 CHECK_FOR_EXCEPTION(); 3503 callFrame [dst]= JSValue(returnValue);3487 callFrame->r(dst) = JSValue(returnValue); 3504 3488 3505 3489 vPC += 7; … … 3520 3504 3521 3505 int dst = vPC[1].u.operand; 3522 if (LIKELY(callFrame [dst].jsValue().isObject())) {3506 if (LIKELY(callFrame->r(dst).jsValue().isObject())) { 3523 3507 vPC += 3; 3524 3508 NEXT_INSTRUCTION(); … … 3526 3510 3527 3511 int override = vPC[2].u.operand; 3528 callFrame [dst] = callFrame[override];3512 callFrame->r(dst) = callFrame->r(override); 3529 3513 3530 3514 vPC += 3; … … 3536 3520 int count = (++vPC)->u.operand; 3537 3521 3538 callFrame [dst]= concatenateStrings(callFrame, &callFrame->registers()[src], count);3522 callFrame->r(dst) = concatenateStrings(callFrame, &callFrame->registers()[src], count); 3539 3523 ++vPC; 3540 3524 … … 3545 3529 int src = (++vPC)->u.operand; 3546 3530 3547 callFrame [dst] = callFrame[src].jsValue().toPrimitive(callFrame);3531 callFrame->r(dst) = callFrame->r(src).jsValue().toPrimitive(callFrame); 3548 3532 ++vPC; 3549 3533 … … 3558 3542 */ 3559 3543 int scope = (++vPC)->u.operand; 3560 JSValue v = callFrame [scope].jsValue();3544 JSValue v = callFrame->r(scope).jsValue(); 3561 3545 JSObject* o = v.toObject(callFrame); 3562 3546 CHECK_FOR_EXCEPTION(); 3563 3547 3564 callFrame [scope]= JSValue(o);3548 callFrame->r(scope) = JSValue(o); 3565 3549 callFrame->setScopeChain(callFrame->scopeChain()->push(o)); 3566 3550 … … 3589 3573 int base = (++vPC)->u.operand; 3590 3574 3591 callFrame [dst] = JSPropertyNameIterator::create(callFrame, callFrame[base].jsValue());3575 callFrame->r(dst) = JSPropertyNameIterator::create(callFrame, callFrame->r(base).jsValue()); 3592 3576 ++vPC; 3593 3577 NEXT_INSTRUCTION(); … … 3606 3590 int target = (++vPC)->u.operand; 3607 3591 3608 JSPropertyNameIterator* it = callFrame [iter].propertyNameIterator();3592 JSPropertyNameIterator* it = callFrame->r(iter).propertyNameIterator(); 3609 3593 if (JSValue temp = it->next(callFrame)) { 3610 3594 CHECK_FOR_TIMEOUT(); 3611 callFrame [dst]= JSValue(temp);3595 callFrame->r(dst) = JSValue(temp); 3612 3596 vPC += target; 3613 3597 NEXT_INSTRUCTION(); … … 3665 3649 ASSERT(!globalData->exception); 3666 3650 int ex = (++vPC)->u.operand; 3667 callFrame [ex]= exceptionValue;3651 callFrame->r(ex) = exceptionValue; 3668 3652 exceptionValue = JSValue(); 3669 3653 … … 3683 3667 3684 3668 int ex = (++vPC)->u.operand; 3685 exceptionValue = callFrame [ex].jsValue();3669 exceptionValue = callFrame->r(ex).jsValue(); 3686 3670 3687 3671 handler = throwException(callFrame, exceptionValue, vPC - callFrame->codeBlock()->instructions().begin(), true); … … 3694 3678 NEXT_INSTRUCTION(); 3695 3679 } 3696 DEFINE_OPCODE(op_unexpected_load) {3697 /* unexpected_load load dst(r) src(k)3698 3699 Copies constant src to register dst.3700 */3701 int dst = (++vPC)->u.operand;3702 int src = (++vPC)->u.operand;3703 callFrame[dst] = JSValue(callFrame->codeBlock()->unexpectedConstant(src));3704 3705 ++vPC;3706 NEXT_INSTRUCTION();3707 }3708 3680 DEFINE_OPCODE(op_new_error) { 3709 3681 /* new_error dst(r) type(n) message(k) … … 3719 3691 3720 3692 CodeBlock* codeBlock = callFrame->codeBlock(); 3721 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()));3693 callFrame->r(dst) = JSValue(Error::create(callFrame, (ErrorType)type, callFrame->r(message).jsValue().toString(callFrame), codeBlock->lineNumberForBytecodeOffset(callFrame, vPC - codeBlock->instructions().begin()), codeBlock->ownerNode()->sourceID(), codeBlock->ownerNode()->sourceURL())); 3722 3694 3723 3695 ++vPC; … … 3737 3709 } 3738 3710 int result = (++vPC)->u.operand; 3739 return callFrame [result].jsValue();3711 return callFrame->r(result).jsValue(); 3740 3712 } 3741 3713 DEFINE_OPCODE(op_put_getter) { … … 3754 3726 int function = (++vPC)->u.operand; 3755 3727 3756 ASSERT(callFrame [base].jsValue().isObject());3757 JSObject* baseObj = asObject(callFrame [base].jsValue());3728 ASSERT(callFrame->r(base).jsValue().isObject()); 3729 JSObject* baseObj = asObject(callFrame->r(base).jsValue()); 3758 3730 Identifier& ident = callFrame->codeBlock()->identifier(property); 3759 ASSERT(callFrame [function].jsValue().isObject());3760 baseObj->defineGetter(callFrame, ident, asObject(callFrame [function].jsValue()));3731 ASSERT(callFrame->r(function).jsValue().isObject()); 3732 baseObj->defineGetter(callFrame, ident, asObject(callFrame->r(function).jsValue())); 3761 3733 3762 3734 ++vPC; … … 3778 3750 int function = (++vPC)->u.operand; 3779 3751 3780 ASSERT(callFrame [base].jsValue().isObject());3781 JSObject* baseObj = asObject(callFrame [base].jsValue());3752 ASSERT(callFrame->r(base).jsValue().isObject()); 3753 JSObject* baseObj = asObject(callFrame->r(base).jsValue()); 3782 3754 Identifier& ident = callFrame->codeBlock()->identifier(property); 3783 ASSERT(callFrame [function].jsValue().isObject());3784 baseObj->defineSetter(callFrame, ident, asObject(callFrame [function].jsValue()));3755 ASSERT(callFrame->r(function).jsValue().isObject()); 3756 baseObj->defineSetter(callFrame, ident, asObject(callFrame->r(function).jsValue())); 3785 3757 3786 3758 ++vPC; … … 3799 3771 int retAddrDst = (++vPC)->u.operand; 3800 3772 int target = (++vPC)->u.operand; 3801 callFrame [retAddrDst]= vPC + 1;3773 callFrame->r(retAddrDst) = vPC + 1; 3802 3774 3803 3775 vPC += target; … … 3812 3784 */ 3813 3785 int retAddrSrc = (++vPC)->u.operand; 3814 vPC = callFrame [retAddrSrc].vPC();3786 vPC = callFrame->r(retAddrSrc).vPC(); 3815 3787 NEXT_INSTRUCTION(); 3816 3788 } … … 3839 3811 3840 3812 if (*enabledProfilerReference) 3841 (*enabledProfilerReference)->willExecute(callFrame, callFrame [function].jsValue());3813 (*enabledProfilerReference)->willExecute(callFrame, callFrame->r(function).jsValue()); 3842 3814 3843 3815 vPC += 2; … … 3853 3825 3854 3826 if (*enabledProfilerReference) 3855 (*enabledProfilerReference)->didExecute(callFrame, callFrame [function].jsValue());3827 (*enabledProfilerReference)->didExecute(callFrame, callFrame->r(function).jsValue()); 3856 3828 3857 3829 vPC += 2; … … 3896 3868 SymbolTable& symbolTable = codeBlock->symbolTable(); 3897 3869 int argumentsIndex = symbolTable.get(functionCallFrame->propertyNames().arguments.ustring().rep()).getIndex(); 3898 if (!functionCallFrame [argumentsIndex].arguments()) {3870 if (!functionCallFrame->r(argumentsIndex).arguments()) { 3899 3871 Arguments* arguments = new (callFrame) Arguments(functionCallFrame); 3900 3872 functionCallFrame->setCalleeArguments(arguments); 3901 functionCallFrame [RegisterFile::ArgumentsRegister]= arguments;3902 } 3903 return functionCallFrame [argumentsIndex].jsValue();3873 functionCallFrame->r(RegisterFile::ArgumentsRegister) = arguments; 3874 } 3875 return functionCallFrame->r(argumentsIndex).jsValue(); 3904 3876 } 3905 3877 -
trunk/JavaScriptCore/jit/JIT.cpp
r44889 r45609 276 276 DEFINE_OP(op_to_jsnumber) 277 277 DEFINE_OP(op_to_primitive) 278 DEFINE_OP(op_unexpected_load)279 278 280 279 case op_get_array_length: -
trunk/JavaScriptCore/jit/JITOpcodes.cpp
r44889 r45609 506 506 } 507 507 508 void JIT::emit_op_unexpected_load(Instruction* currentInstruction)509 {510 JSValue v = m_codeBlock->unexpectedConstant(currentInstruction[2].u.operand);511 move(ImmPtr(JSValue::encode(v)), regT0);512 emitPutVirtualRegister(currentInstruction[1].u.operand);513 }514 515 508 void JIT::emit_op_jsr(Instruction* currentInstruction) 516 509 { … … 760 753 JITStubCall stubCall(this, JITStubs::cti_op_new_error); 761 754 stubCall.addArgument(Imm32(currentInstruction[2].u.operand)); 762 stubCall.addArgument(ImmPtr(JSValue::encode(m_codeBlock-> unexpectedConstant(currentInstruction[3].u.operand))));755 stubCall.addArgument(ImmPtr(JSValue::encode(m_codeBlock->getConstant(currentInstruction[3].u.operand)))); 763 756 stubCall.addArgument(Imm32(m_bytecodeIndex)); 764 757 stubCall.call(currentInstruction[1].u.operand); … … 829 822 // registers to zap stale pointers, to avoid unnecessarily prolonging 830 823 // object lifetime and increasing GC pressure. 831 size_t count = m_codeBlock->m_numVars + m_codeBlock->numberOfConstantRegisters();824 size_t count = m_codeBlock->m_numVars; 832 825 for (size_t j = 0; j < count; ++j) 833 826 emitInitRegister(j); … … 840 833 // registers to zap stale pointers, to avoid unnecessarily prolonging 841 834 // object lifetime and increasing GC pressure. 842 size_t count = m_codeBlock->m_numVars + m_codeBlock->numberOfConstantRegisters();835 size_t count = m_codeBlock->m_numVars; 843 836 for (size_t j = 0; j < count; ++j) 844 837 emitInitRegister(j); -
trunk/JavaScriptCore/parser/Nodes.cpp
r45106 r45609 602 602 { 603 603 if (generator.registerFor(m_ident)) 604 return generator.emit UnexpectedLoad(generator.finalDestination(dst), false);604 return generator.emitLoad(generator.finalDestination(dst), false); 605 605 606 606 generator.emitExpressionInfo(divot(), startOffset(), endOffset()); … … 637 637 638 638 // delete on a non-location expression ignores the value and returns true 639 return generator.emit UnexpectedLoad(generator.finalDestination(dst), true);639 return generator.emitLoad(generator.finalDestination(dst), true); 640 640 } 641 641 … … 689 689 if (dst == generator.ignoredResult()) 690 690 return 0; 691 RefPtr<RegisterID> r0 = generator.emit UnexpectedLoad(generator.finalDestination(dst), (m_operator == OpPlusPlus) ? 1.0 : -1.0);691 RefPtr<RegisterID> r0 = generator.emitLoad(generator.finalDestination(dst), (m_operator == OpPlusPlus) ? 1.0 : -1.0); 692 692 return generator.emitBinaryOp(op_add, r0.get(), local, r0.get(), OperandTypes()); 693 693 } -
trunk/JavaScriptCore/runtime/JSActivation.cpp
r44224 r45609 41 41 42 42 JSActivation::JSActivation(CallFrame* callFrame, PassRefPtr<FunctionBodyNode> functionBody) 43 : Base(callFrame->globalData().activationStructure, new JSActivationData(functionBody, callFrame ))43 : Base(callFrame->globalData().activationStructure, new JSActivationData(functionBody, callFrame->registers())) 44 44 { 45 45 } -
trunk/JavaScriptCore/wtf/Platform.h
r44886 r45609 549 549 #endif 550 550 551 #if ENABLE(JIT) 551 552 #ifndef ENABLE_JIT_OPTIMIZE_CALL 552 553 #define ENABLE_JIT_OPTIMIZE_CALL 1 … … 563 564 #ifndef ENABLE_JIT_OPTIMIZE_METHOD_CALLS 564 565 #define ENABLE_JIT_OPTIMIZE_METHOD_CALLS 1 566 #endif 565 567 #endif 566 568
Note:
See TracChangeset
for help on using the changeset viewer.