Changeset 80969 in webkit for trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp
- Timestamp:
- Mar 13, 2011, 2:16:29 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp
r78732 r80969 102 102 addSlowCase(branchPtr(NotEqual, Address(regT0), ImmPtr(m_globalData->jsArrayVPtr))); 103 103 104 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSArray, m_storage)), regT2);105 addSlowCase(branch32(AboveOrEqual, regT1, Address(regT0, OBJECT_OFFSETOF(JSArray, m_vectorLength))));104 loadPtr(Address(regT0, JSArray::storageOffset()), regT2); 105 addSlowCase(branch32(AboveOrEqual, regT1, Address(regT0, JSArray::vectorLengthOffset()))); 106 106 107 107 loadPtr(BaseIndex(regT2, regT1, ScalePtr, OBJECT_OFFSETOF(ArrayStorage, m_vector[0])), regT0); … … 160 160 161 161 // Test base's structure 162 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), regT2);162 loadPtr(Address(regT0, JSCell::structureOffset()), regT2); 163 163 addSlowCase(branchPtr(NotEqual, regT2, Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_cachedStructure)))); 164 164 load32(addressFor(i), regT3); … … 199 199 emitJumpSlowCaseIfNotJSCell(regT0, base); 200 200 addSlowCase(branchPtr(NotEqual, Address(regT0), ImmPtr(m_globalData->jsArrayVPtr))); 201 addSlowCase(branch32(AboveOrEqual, regT1, Address(regT0, OBJECT_OFFSETOF(JSArray, m_vectorLength))));202 203 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSArray, m_storage)), regT2);201 addSlowCase(branch32(AboveOrEqual, regT1, Address(regT0, JSArray::vectorLengthOffset()))); 202 203 loadPtr(Address(regT0, JSArray::storageOffset()), regT2); 204 204 Jump empty = branchTestPtr(Zero, BaseIndex(regT2, regT1, ScalePtr, OBJECT_OFFSETOF(ArrayStorage, m_vector[0]))); 205 205 … … 337 337 BEGIN_UNINTERRUPTED_SEQUENCE(sequenceMethodCheck); 338 338 339 Jump structureCheck = branchPtrWithPatch(NotEqual, Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), info.structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure)));339 Jump structureCheck = branchPtrWithPatch(NotEqual, Address(regT0, JSCell::structureOffset()), info.structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure))); 340 340 DataLabelPtr protoStructureToCompare, protoObj = moveWithPatch(ImmPtr(0), regT1); 341 Jump protoStructureCheck = branchPtrWithPatch(NotEqual, Address(regT1, OBJECT_OFFSETOF(JSCell, m_structure)), protoStructureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure)));341 Jump protoStructureCheck = branchPtrWithPatch(NotEqual, Address(regT1, JSCell::structureOffset()), protoStructureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure))); 342 342 343 343 // This will be relinked to load the function without doing a load. … … 415 415 416 416 DataLabelPtr structureToCompare; 417 Jump structureCheck = branchPtrWithPatch(NotEqual, Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure)));417 Jump structureCheck = branchPtrWithPatch(NotEqual, Address(regT0, JSCell::structureOffset()), structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure))); 418 418 addSlowCase(structureCheck); 419 419 ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, structureToCompare), patchOffsetGetByIdStructure); … … 493 493 // It is important that the following instruction plants a 32bit immediate, in order that it can be patched over. 494 494 DataLabelPtr structureToCompare; 495 addSlowCase(branchPtrWithPatch(NotEqual, Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure))));495 addSlowCase(branchPtrWithPatch(NotEqual, Address(regT0, JSCell::structureOffset()), structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure)))); 496 496 ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, structureToCompare), patchOffsetPutByIdStructure); 497 497 … … 566 566 #if CPU(X86_64) 567 567 move(ImmPtr(prototype.asCell()->structure()), regT3); 568 failureCases.append(branchPtr(NotEqual, AbsoluteAddress( &prototype.asCell()->m_structure), regT3));568 failureCases.append(branchPtr(NotEqual, AbsoluteAddress(prototype.asCell()->addressOfStructure()), regT3)); 569 569 #else 570 failureCases.append(branchPtr(NotEqual, AbsoluteAddress( &prototype.asCell()->m_structure), ImmPtr(prototype.asCell()->structure())));570 failureCases.append(branchPtr(NotEqual, AbsoluteAddress(prototype.asCell()->addressOfStructure()), ImmPtr(prototype.asCell()->structure()))); 571 571 #endif 572 572 } … … 577 577 // Check eax is an object of the right Structure. 578 578 failureCases.append(emitJumpIfNotJSCell(regT0)); 579 failureCases.append(branchPtr(NotEqual, Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), ImmPtr(oldStructure)));579 failureCases.append(branchPtr(NotEqual, Address(regT0, JSCell::structureOffset()), ImmPtr(oldStructure))); 580 580 testPrototype(oldStructure->storedPrototype(), failureCases); 581 581 … … 611 611 sub32(Imm32(1), AbsoluteAddress(oldStructure->addressOfCount())); 612 612 add32(Imm32(1), AbsoluteAddress(newStructure->addressOfCount())); 613 storePtr(ImmPtr(newStructure), Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)));613 storePtr(ImmPtr(newStructure), Address(regT0, JSCell::structureOffset())); 614 614 615 615 // write the value … … 696 696 697 697 // Checks out okay! - get the length from the storage 698 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSArray, m_storage)), regT3);698 loadPtr(Address(regT0, JSArray::storageOffset()), regT3); 699 699 load32(Address(regT3, OBJECT_OFFSETOF(ArrayStorage, m_length)), regT2); 700 700 Jump failureCases2 = branch32(Above, regT2, Imm32(JSImmediate::maxImmediateInt)); … … 736 736 737 737 // Check the prototype object's Structure had not changed. 738 Structure* * prototypeStructureAddress = &(protoObject->m_structure);738 Structure* const * prototypeStructureAddress = protoObject->addressOfStructure(); 739 739 #if CPU(X86_64) 740 740 move(ImmPtr(prototypeStructure), regT3); … … 859 859 860 860 // Check the prototype object's Structure had not changed. 861 Structure* * prototypeStructureAddress = &(protoObject->m_structure);861 Structure* const * prototypeStructureAddress = protoObject->addressOfStructure(); 862 862 #if CPU(X86_64) 863 863 move(ImmPtr(prototypeStructure), regT3);
Note:
See TracChangeset
for help on using the changeset viewer.