Changeset 36317 in webkit for trunk/JavaScriptCore/VM/CTI.cpp
- Timestamp:
- Sep 10, 2008, 2:23:35 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/VM/CTI.cpp
r36316 r36317 629 629 break; 630 630 } 631 case op_get_global_var: { 632 JSVariableObject* globalObject = static_cast<JSVariableObject*>(instruction[i + 2].u.jsCell); 633 m_jit.movl_i32r(reinterpret_cast<unsigned>(globalObject), X86::eax); 634 emitGetVariableObjectRegister(X86::eax, instruction[i + 3].u.operand, X86::eax); 635 emitPutResult(instruction[i + 1].u.operand, X86::eax); 636 i += 4; 637 break; 638 } 639 case op_put_global_var: { 640 JSVariableObject* globalObject = static_cast<JSVariableObject*>(instruction[i + 1].u.jsCell); 641 m_jit.movl_i32r(reinterpret_cast<unsigned>(globalObject), X86::eax); 642 emitGetArg(instruction[i + 3].u.operand, X86::edx); 643 emitPutVariableObjectRegister(X86::edx, X86::eax, instruction[i + 2].u.operand); 644 i += 4; 645 break; 646 } 631 647 case op_get_scoped_var: { 632 648 int skip = instruction[i + 3].u.operand + m_codeBlock->needsFullScopeChain; … … 637 653 638 654 m_jit.movl_mr(OBJECT_OFFSET(ScopeChainNode, object), X86::eax, X86::eax); 639 m_jit.movl_mr(JSVariableObject::offsetOf_d(), X86::eax, X86::eax); 640 m_jit.movl_mr(JSVariableObject::offsetOf_Data_registers(), X86::eax, X86::eax); 641 m_jit.movl_mr((instruction[i + 2].u.operand) * sizeof(Register), X86::eax, X86::eax); 655 emitGetVariableObjectRegister(X86::eax, instruction[i + 2].u.operand, X86::eax); 642 656 emitPutResult(instruction[i + 1].u.operand); 643 657 i += 4; … … 653 667 654 668 m_jit.movl_mr(OBJECT_OFFSET(ScopeChainNode, object), X86::edx, X86::edx); 655 m_jit.movl_mr(JSVariableObject::offsetOf_d(), X86::edx, X86::edx); 656 m_jit.movl_mr(JSVariableObject::offsetOf_Data_registers(), X86::edx, X86::edx); 657 m_jit.movl_rm(X86::eax, (instruction[i + 1].u.operand) * sizeof(Register), X86::edx); 669 emitPutVariableObjectRegister(X86::eax, X86::edx, instruction[i + 1].u.operand); 658 670 i += 4; 659 671 break; … … 1831 1843 } 1832 1844 1845 void CTI::emitGetVariableObjectRegister(X86Assembler::RegisterID variableObject, int index, X86Assembler::RegisterID dst) 1846 { 1847 m_jit.movl_mr(JSVariableObject::offsetOf_d(), variableObject, dst); 1848 m_jit.movl_mr(JSVariableObject::offsetOf_Data_registers(), dst, dst); 1849 m_jit.movl_mr(index * sizeof(Register), dst, dst); 1850 } 1851 1852 void CTI::emitPutVariableObjectRegister(X86Assembler::RegisterID src, X86Assembler::RegisterID variableObject, int index) 1853 { 1854 m_jit.movl_mr(JSVariableObject::offsetOf_d(), variableObject, variableObject); 1855 m_jit.movl_mr(JSVariableObject::offsetOf_Data_registers(), variableObject, variableObject); 1856 m_jit.movl_rm(src, index * sizeof(Register), variableObject); 1857 } 1858 1833 1859 #if ENABLE(WREC) 1834 1860
Note:
See TracChangeset
for help on using the changeset viewer.