Changeset 40562 in webkit for trunk/JavaScriptCore/jit/JITPropertyAccess.cpp
- Timestamp:
- Feb 3, 2009, 6:02:32 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/jit/JITPropertyAccess.cpp
r39738 r40562 104 104 105 105 DataLabelPtr structureToCompare; 106 Jump structureCheck = jnePtrWithPatch(Address(X86::eax, FIELD_OFFSET(JSCell, m_structure)), structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure)));106 Jump structureCheck = branchPtrWithPatch(NotEqual, Address(X86::eax, FIELD_OFFSET(JSCell, m_structure)), structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure))); 107 107 addSlowCase(structureCheck); 108 108 ASSERT(differenceBetween(hotPathBegin, structureToCompare) == patchOffsetGetByIdStructure); … … 160 160 // It is important that the following instruction plants a 32bit immediate, in order that it can be patched over. 161 161 DataLabelPtr structureToCompare; 162 addSlowCase( jnePtrWithPatch(Address(X86::eax, FIELD_OFFSET(JSCell, m_structure)), structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure))));162 addSlowCase(branchPtrWithPatch(NotEqual, Address(X86::eax, FIELD_OFFSET(JSCell, m_structure)), structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure)))); 163 163 ASSERT(differenceBetween(hotPathBegin, structureToCompare) == patchOffsetPutByIdStructure); 164 164 … … 199 199 // Check eax is an object of the right Structure. 200 200 failureCases.append(emitJumpIfNotJSCell(X86::eax)); 201 failureCases.append( jnePtr(Address(X86::eax, FIELD_OFFSET(JSCell, m_structure)), ImmPtr(oldStructure)));201 failureCases.append(branchPtr(NotEqual, Address(X86::eax, FIELD_OFFSET(JSCell, m_structure)), ImmPtr(oldStructure))); 202 202 JumpList successCases; 203 203 … … 205 205 loadPtr(Address(X86::eax, FIELD_OFFSET(JSCell, m_structure)), X86::ecx); 206 206 // proto(ecx) = baseObject->structure()->prototype() 207 failureCases.append( jne32(Address(X86::ecx, FIELD_OFFSET(Structure, m_typeInfo) + FIELD_OFFSET(TypeInfo, m_type)), Imm32(ObjectType)));207 failureCases.append(branch32(NotEqual, Address(X86::ecx, FIELD_OFFSET(Structure, m_typeInfo) + FIELD_OFFSET(TypeInfo, m_type)), Imm32(ObjectType))); 208 208 209 209 loadPtr(Address(X86::ecx, FIELD_OFFSET(Structure, m_prototype)), X86::ecx); … … 212 212 for (RefPtr<Structure>* it = chain->head(); *it; ++it) { 213 213 // null check the prototype 214 successCases.append( jePtr(X86::ecx, ImmPtr(JSValuePtr::encode(jsNull()))));214 successCases.append(branchPtr(Equal, X86::ecx, ImmPtr(JSValuePtr::encode(jsNull())))); 215 215 216 216 // Check the structure id 217 failureCases.append( jnePtr(Address(X86::ecx, FIELD_OFFSET(JSCell, m_structure)), ImmPtr(it->get())));217 failureCases.append(branchPtr(NotEqual, Address(X86::ecx, FIELD_OFFSET(JSCell, m_structure)), ImmPtr(it->get()))); 218 218 219 219 loadPtr(Address(X86::ecx, FIELD_OFFSET(JSCell, m_structure)), X86::ecx); 220 failureCases.append( jne32(Address(X86::ecx, FIELD_OFFSET(Structure, m_typeInfo) + FIELD_OFFSET(TypeInfo, m_type)), Imm32(ObjectType)));220 failureCases.append(branch32(NotEqual, Address(X86::ecx, FIELD_OFFSET(Structure, m_typeInfo) + FIELD_OFFSET(TypeInfo, m_type)), Imm32(ObjectType))); 221 221 loadPtr(Address(X86::ecx, FIELD_OFFSET(Structure, m_prototype)), X86::ecx); 222 222 } … … 314 314 315 315 // Check eax is an array 316 Jump failureCases1 = jnePtr(Address(X86::eax), ImmPtr(m_interpreter->m_jsArrayVptr));316 Jump failureCases1 = branchPtr(NotEqual, Address(X86::eax), ImmPtr(m_interpreter->m_jsArrayVptr)); 317 317 318 318 // Checks out okay! - get the length from the storage … … 320 320 load32(Address(X86::ecx, FIELD_OFFSET(ArrayStorage, m_length)), X86::ecx); 321 321 322 Jump failureCases2 = ja32(X86::ecx, Imm32(JSImmediate::maxImmediateInt));322 Jump failureCases2 = branch32(Above, X86::ecx, Imm32(JSImmediate::maxImmediateInt)); 323 323 324 324 emitFastArithIntToImmNoCheck(X86::ecx, X86::eax); … … 386 386 #if PLATFORM(X86_64) 387 387 move(ImmPtr(prototypeStructure), X86::ebx); 388 Jump failureCases2 = jnePtr(X86::ebx, AbsoluteAddress(prototypeStructureAddress));389 #else 390 Jump failureCases2 = jnePtr(AbsoluteAddress(prototypeStructureAddress), ImmPtr(prototypeStructure));388 Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), X86::ebx); 389 #else 390 Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), ImmPtr(prototypeStructure)); 391 391 #endif 392 392 … … 427 427 // Check the prototype object's Structure had not changed. 428 428 Structure** prototypeStructureAddress = &(protoObject->m_structure); 429 Jump failureCases3 = jnePtr(AbsoluteAddress(prototypeStructureAddress), ImmPtr(prototypeStructure));429 Jump failureCases3 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), ImmPtr(prototypeStructure)); 430 430 431 431 // Checks out okay! - getDirectOffset … … 493 493 #if PLATFORM(X86_64) 494 494 move(ImmPtr(prototypeStructure), X86::ebx); 495 Jump failureCases2 = jnePtr(X86::ebx, AbsoluteAddress(prototypeStructureAddress));496 #else 497 Jump failureCases2 = jnePtr(AbsoluteAddress(prototypeStructureAddress), ImmPtr(prototypeStructure));495 Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), X86::ebx); 496 #else 497 Jump failureCases2 = branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), ImmPtr(prototypeStructure)); 498 498 #endif 499 499 … … 545 545 #if PLATFORM(X86_64) 546 546 move(ImmPtr(currStructure), X86::ebx); 547 bucketsOfFail.append( jnePtr(X86::ebx, AbsoluteAddress(prototypeStructureAddress)));548 #else 549 bucketsOfFail.append( jnePtr(AbsoluteAddress(prototypeStructureAddress), ImmPtr(currStructure)));547 bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), X86::ebx)); 548 #else 549 bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), ImmPtr(currStructure))); 550 550 #endif 551 551 } … … 604 604 #if PLATFORM(X86_64) 605 605 move(ImmPtr(currStructure), X86::ebx); 606 bucketsOfFail.append( jnePtr(X86::ebx, AbsoluteAddress(prototypeStructureAddress)));607 #else 608 bucketsOfFail.append( jnePtr(AbsoluteAddress(prototypeStructureAddress), ImmPtr(currStructure)));606 bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), X86::ebx)); 607 #else 608 bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), ImmPtr(currStructure))); 609 609 #endif 610 610 } … … 654 654 #if PLATFORM(X86_64) 655 655 move(ImmPtr(currStructure), X86::ebx); 656 bucketsOfFail.append( jnePtr(X86::ebx, AbsoluteAddress(prototypeStructureAddress)));657 #else 658 bucketsOfFail.append( jnePtr(AbsoluteAddress(prototypeStructureAddress), ImmPtr(currStructure)));656 bucketsOfFail.append(branchPtr(NotEqual, X86::ebx, AbsoluteAddress(prototypeStructureAddress))); 657 #else 658 bucketsOfFail.append(branchPtr(NotEqual, AbsoluteAddress(prototypeStructureAddress), ImmPtr(currStructure))); 659 659 #endif 660 660 }
Note:
See TracChangeset
for help on using the changeset viewer.