Changeset 78174 in webkit for trunk/Source/JavaScriptCore/jit
- Timestamp:
- Feb 9, 2011, 9:21:33 PM (14 years ago)
- Location:
- trunk/Source/JavaScriptCore/jit
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jit/JIT.cpp
r76369 r78174 588 588 } 589 589 590 #if USE(JSVALUE64)591 void JIT::emitGetVariableObjectRegister(RegisterID variableObject, int index, RegisterID dst)592 {593 loadPtr(Address(variableObject, OBJECT_OFFSETOF(JSVariableObject, d)), dst);594 loadPtr(Address(dst, OBJECT_OFFSETOF(JSVariableObject::JSVariableObjectData, registers)), dst);595 loadPtr(Address(dst, index * sizeof(Register)), dst);596 }597 598 void JIT::emitPutVariableObjectRegister(RegisterID src, RegisterID variableObject, int index)599 {600 loadPtr(Address(variableObject, OBJECT_OFFSETOF(JSVariableObject, d)), variableObject);601 loadPtr(Address(variableObject, OBJECT_OFFSETOF(JSVariableObject::JSVariableObjectData, registers)), variableObject);602 storePtr(src, Address(variableObject, index * sizeof(Register)));603 }604 #endif605 606 590 #if ENABLE(JIT_OPTIMIZE_CALL) 607 591 void JIT::unlinkCallOrConstruct(CallLinkInfo* callLinkInfo) -
trunk/Source/JavaScriptCore/jit/JIT.h
r75408 r78174 506 506 int32_t getConstantOperandImmediateInt(unsigned src); 507 507 508 void emitGetVariableObjectRegister(RegisterID variableObject, int index, RegisterID dst);509 void emitPutVariableObjectRegister(RegisterID src, RegisterID variableObject, int index);510 511 508 void killLastResultRegister(); 512 509 -
trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp
r75408 r78174 456 456 { 457 457 JSVariableObject* globalObject = m_codeBlock->globalObject(); 458 move(ImmPtr(globalObject), regT0);459 emitGetVariableObjectRegister(regT0, currentInstruction[2].u.operand, regT0);458 loadPtr(&globalObject->d->registers, regT0); 459 loadPtr(Address(regT0, currentInstruction[2].u.operand * sizeof(Register)), regT0); 460 460 emitPutVirtualRegister(currentInstruction[1].u.operand); 461 461 } … … 465 465 emitGetVirtualRegister(currentInstruction[2].u.operand, regT1); 466 466 JSVariableObject* globalObject = m_codeBlock->globalObject(); 467 move(ImmPtr(globalObject), regT0);468 emitPutVariableObjectRegister(regT1, regT0, currentInstruction[1].u.operand);467 loadPtr(&globalObject->d->registers, regT0); 468 storePtr(regT1, Address(regT0, currentInstruction[1].u.operand * sizeof(Register))); 469 469 } 470 470 … … 487 487 488 488 loadPtr(Address(regT0, OBJECT_OFFSETOF(ScopeChainNode, object)), regT0); 489 emitGetVariableObjectRegister(regT0, currentInstruction[2].u.operand, regT0); 489 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSVariableObject, d)), regT0); 490 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSVariableObject::JSVariableObjectData, registers)), regT0); 491 loadPtr(Address(regT0, currentInstruction[2].u.operand * sizeof(Register)), regT0); 490 492 emitPutVirtualRegister(currentInstruction[1].u.operand); 491 493 } … … 510 512 511 513 loadPtr(Address(regT1, OBJECT_OFFSETOF(ScopeChainNode, object)), regT1); 512 emitPutVariableObjectRegister(regT0, regT1, currentInstruction[1].u.operand); 514 loadPtr(Address(regT1, OBJECT_OFFSETOF(JSVariableObject, d)), regT1); 515 loadPtr(Address(regT1, OBJECT_OFFSETOF(JSVariableObject::JSVariableObjectData, registers)), regT1); 516 storePtr(regT0, Address(regT1, currentInstruction[1].u.operand * sizeof(Register))); 513 517 } 514 518
Note:
See TracChangeset
for help on using the changeset viewer.