Changeset 39316 in webkit for trunk/JavaScriptCore/jit/JITPropertyAccess.cpp
- Timestamp:
- Dec 15, 2008, 3:38:19 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/jit/JITPropertyAccess.cpp
r39284 r39316 108 108 m_propertyAccessCompilationInfo[propertyAccessInstructionIndex].hotPathBegin = hotPathBegin; 109 109 110 __ cmpl_i 32m(repatchGetByIdDefaultStructure, FIELD_OFFSET(JSCell, m_structure), X86::eax);110 __ cmpl_im_force32(repatchGetByIdDefaultStructure, FIELD_OFFSET(JSCell, m_structure), X86::eax); 111 111 ASSERT(X86Assembler::getDifferenceBetweenLabels(hotPathBegin, __ label()) == repatchOffsetGetByIdStructure); 112 112 addSlowCase(__ jne()); … … 159 159 160 160 // It is important that the following instruction plants a 32bit immediate, in order that it can be patched over. 161 __ cmpl_i 32m(repatchGetByIdDefaultStructure, FIELD_OFFSET(JSCell, m_structure), X86::eax);161 __ cmpl_im_force32(repatchGetByIdDefaultStructure, FIELD_OFFSET(JSCell, m_structure), X86::eax); 162 162 ASSERT(X86Assembler::getDifferenceBetweenLabels(hotPathBegin, __ label()) == repatchOffsetPutByIdStructure); 163 163 addSlowCase(__ jne()); … … 202 202 __ testl_i32r(JSImmediate::TagMask, X86::eax); 203 203 failureCases.append(__ jne()); 204 __ cmpl_i 32m(reinterpret_cast<uint32_t>(oldStructure), FIELD_OFFSET(JSCell, m_structure), X86::eax);204 __ cmpl_im(reinterpret_cast<uint32_t>(oldStructure), FIELD_OFFSET(JSCell, m_structure), X86::eax); 205 205 failureCases.append(__ jne()); 206 206 Vector<JmpSrc> successCases; … … 209 209 __ movl_mr(FIELD_OFFSET(JSCell, m_structure), X86::eax, X86::ecx); 210 210 // proto(ecx) = baseObject->structure()->prototype() 211 __ cmpl_i 32m(ObjectType, FIELD_OFFSET(Structure, m_typeInfo) + FIELD_OFFSET(TypeInfo, m_type), X86::ecx);211 __ cmpl_im(ObjectType, FIELD_OFFSET(Structure, m_typeInfo) + FIELD_OFFSET(TypeInfo, m_type), X86::ecx); 212 212 failureCases.append(__ jne()); 213 213 __ movl_mr(FIELD_OFFSET(Structure, m_prototype), X86::ecx, X86::ecx); … … 216 216 for (RefPtr<Structure>* it = chain->head(); *it; ++it) { 217 217 // null check the prototype 218 __ cmpl_i 32r(asInteger(jsNull()), X86::ecx);218 __ cmpl_ir(asInteger(jsNull()), X86::ecx); 219 219 successCases.append(__ je()); 220 220 221 221 // Check the structure id 222 __ cmpl_i 32m(reinterpret_cast<uint32_t>(it->get()), FIELD_OFFSET(JSCell, m_structure), X86::ecx);222 __ cmpl_im(reinterpret_cast<uint32_t>(it->get()), FIELD_OFFSET(JSCell, m_structure), X86::ecx); 223 223 failureCases.append(__ jne()); 224 224 225 225 __ movl_mr(FIELD_OFFSET(JSCell, m_structure), X86::ecx, X86::ecx); 226 __ cmpl_i 32m(ObjectType, FIELD_OFFSET(Structure, m_typeInfo) + FIELD_OFFSET(TypeInfo, m_type), X86::ecx);226 __ cmpl_im(ObjectType, FIELD_OFFSET(Structure, m_typeInfo) + FIELD_OFFSET(TypeInfo, m_type), X86::ecx); 227 227 failureCases.append(__ jne()); 228 228 __ movl_mr(FIELD_OFFSET(Structure, m_prototype), X86::ecx, X86::ecx); … … 237 237 // emit a call only if storage realloc is needed 238 238 if (transitionWillNeedStorageRealloc(oldStructure, newStructure)) { 239 __ push l_r(X86::edx);240 __ push l_i32(newStructure->propertyStorageCapacity());241 __ push l_i32(oldStructure->propertyStorageCapacity());242 __ push l_r(X86::eax);239 __ push_r(X86::edx); 240 __ push_i32(newStructure->propertyStorageCapacity()); 241 __ push_i32(oldStructure->propertyStorageCapacity()); 242 __ push_r(X86::eax); 243 243 callTarget = __ call(); 244 __ addl_i 32r(3 * sizeof(void*), X86::esp);245 __ pop l_r(X86::edx);244 __ addl_ir(3 * sizeof(void*), X86::esp); 245 __ pop_r(X86::edx); 246 246 } 247 247 248 248 // Assumes m_refCount can be decremented easily, refcount decrement is safe as 249 249 // codeblock should ensure oldStructure->m_refCount > 0 250 __ subl_i 8m(1, reinterpret_cast<void*>(oldStructure));251 __ addl_i 8m(1, reinterpret_cast<void*>(newStructure));250 __ subl_im(1, reinterpret_cast<void*>(oldStructure)); 251 __ addl_im(1, reinterpret_cast<void*>(newStructure)); 252 252 __ movl_i32m(reinterpret_cast<uint32_t>(newStructure), FIELD_OFFSET(JSCell, m_structure), X86::eax); 253 253 … … 308 308 309 309 // Check eax is an array 310 __ cmpl_i 32m(reinterpret_cast<unsigned>(m_interpreter->m_jsArrayVptr), X86::eax);310 __ cmpl_im(reinterpret_cast<unsigned>(m_interpreter->m_jsArrayVptr), 0, X86::eax); 311 311 JmpSrc failureCases1 = __ jne(); 312 312 … … 315 315 __ movl_mr(FIELD_OFFSET(ArrayStorage, m_length), X86::ecx, X86::ecx); 316 316 317 __ cmpl_i 32r(JSImmediate::maxImmediateInt, X86::ecx);317 __ cmpl_ir(JSImmediate::maxImmediateInt, X86::ecx); 318 318 JmpSrc failureCases2 = __ ja(); 319 319 320 320 __ addl_rr(X86::ecx, X86::ecx); 321 __ addl_i 8r(1, X86::ecx);321 __ addl_ir(1, X86::ecx); 322 322 __ movl_rr(X86::ecx, X86::eax); 323 323 JmpSrc success = __ jmp(); … … 381 381 // Check the prototype object's Structure had not changed. 382 382 Structure** prototypeStructureAddress = &(protoObject->m_structure); 383 __ cmpl_i 32m(reinterpret_cast<uint32_t>(prototypeStructure), prototypeStructureAddress);383 __ cmpl_im(reinterpret_cast<uint32_t>(prototypeStructure), prototypeStructureAddress); 384 384 JmpSrc failureCases2 = __ jne(); 385 385 … … 420 420 // Check the prototype object's Structure had not changed. 421 421 Structure** prototypeStructureAddress = &(protoObject->m_structure); 422 __ cmpl_i 32m(reinterpret_cast<uint32_t>(prototypeStructure), prototypeStructureAddress);422 __ cmpl_im(reinterpret_cast<uint32_t>(prototypeStructure), prototypeStructureAddress); 423 423 JmpSrc failureCases3 = __ jne(); 424 424 … … 483 483 // Check the prototype object's Structure had not changed. 484 484 Structure** prototypeStructureAddress = &(protoObject->m_structure); 485 __ cmpl_i 32m(reinterpret_cast<uint32_t>(prototypeStructure), prototypeStructureAddress);485 __ cmpl_im(reinterpret_cast<uint32_t>(prototypeStructure), prototypeStructureAddress); 486 486 JmpSrc failureCases2 = __ jne(); 487 487 … … 530 530 // Check the prototype object's Structure had not changed. 531 531 Structure** prototypeStructureAddress = &(protoObject->m_structure); 532 __ cmpl_i 32m(reinterpret_cast<uint32_t>(currStructure), prototypeStructureAddress);532 __ cmpl_im(reinterpret_cast<uint32_t>(currStructure), prototypeStructureAddress); 533 533 bucketsOfFail.append(__ jne()); 534 534 } … … 586 586 // Check the prototype object's Structure had not changed. 587 587 Structure** prototypeStructureAddress = &(protoObject->m_structure); 588 __ cmpl_i 32m(reinterpret_cast<uint32_t>(currStructure), prototypeStructureAddress);588 __ cmpl_im(reinterpret_cast<uint32_t>(currStructure), prototypeStructureAddress); 589 589 bucketsOfFail.append(__ jne()); 590 590 } … … 633 633 // Check the prototype object's Structure had not changed. 634 634 Structure** prototypeStructureAddress = &(protoObject->m_structure); 635 __ cmpl_i 32m(reinterpret_cast<uint32_t>(currStructure), prototypeStructureAddress);635 __ cmpl_im(reinterpret_cast<uint32_t>(currStructure), prototypeStructureAddress); 636 636 bucketsOfFail.append(__ jne()); 637 637 }
Note:
See TracChangeset
for help on using the changeset viewer.