Changeset 50201 in webkit for trunk/JavaScriptCore
- Timestamp:
- Oct 28, 2009, 12:13:37 AM (16 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r50183 r50201 1 2009-10-27 Gavin Barraclough <[email protected]> 2 3 Rubber Stamped by Samuel Q. Weinig. 4 5 Make the asserts protecting the offsets in the JIT more descriptive. 6 7 * jit/JIT.h: 8 * jit/JITCall.cpp: 9 (JSC::JIT::compileOpCall): 10 * jit/JITPropertyAccess.cpp: 11 (JSC::JIT::emit_op_method_check): 12 (JSC::JIT::compileGetByIdHotPath): 13 (JSC::JIT::compileGetByIdSlowCase): 14 (JSC::JIT::emit_op_put_by_id): 15 1 16 2009-10-27 Geoffrey Garen <[email protected]> 2 17 -
trunk/JavaScriptCore/jit/JIT.h
r50109 r50201 38 38 #define JIT_CLASS_ALIGNMENT 39 39 #endif 40 41 #define ASSERT_JIT_OFFSET(actual, expected) ASSERT_WITH_MESSAGE(actual == expected, "JIT Offset \"%s\" shoud be %d, not %d.\n", #expected, actual, expected); 40 42 41 43 #include "CodeBlock.h" -
trunk/JavaScriptCore/jit/JITCall.cpp
r49293 r50201 615 615 616 616 addSlowCase(jumpToSlow); 617 ASSERT (differenceBetween(addressOfLinkedFunctionCheck, jumpToSlow) ==patchOffsetOpCallCompareToJump);617 ASSERT_JIT_OFFSET(differenceBetween(addressOfLinkedFunctionCheck, jumpToSlow), patchOffsetOpCallCompareToJump); 618 618 m_callStructureStubCompilationInfo[callLinkInfoIndex].hotPathBegin = addressOfLinkedFunctionCheck; 619 619 -
trunk/JavaScriptCore/jit/JITPropertyAccess.cpp
r49820 r50201 1133 1133 Jump match = jump(); 1134 1134 1135 ASSERT (differenceBetween(info.structureToCompare, protoObj) ==patchOffsetMethodCheckProtoObj);1136 ASSERT (differenceBetween(info.structureToCompare, protoStructureToCompare) ==patchOffsetMethodCheckProtoStruct);1137 ASSERT (differenceBetween(info.structureToCompare, putFunction) ==patchOffsetMethodCheckPutFunction);1135 ASSERT_JIT_OFFSET(differenceBetween(info.structureToCompare, protoObj), patchOffsetMethodCheckProtoObj); 1136 ASSERT_JIT_OFFSET(differenceBetween(info.structureToCompare, protoStructureToCompare), patchOffsetMethodCheckProtoStruct); 1137 ASSERT_JIT_OFFSET(differenceBetween(info.structureToCompare, putFunction), patchOffsetMethodCheckPutFunction); 1138 1138 1139 1139 // Link the failure cases here. … … 1202 1202 Jump structureCheck = branchPtrWithPatch(NotEqual, Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure))); 1203 1203 addSlowCase(structureCheck); 1204 ASSERT (differenceBetween(hotPathBegin, structureToCompare) ==patchOffsetGetByIdStructure);1205 ASSERT (differenceBetween(hotPathBegin, structureCheck) == patchOffsetGetByIdBranchToSlowCase);1204 ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, structureToCompare), patchOffsetGetByIdStructure); 1205 ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, structureCheck), patchOffsetGetByIdBranchToSlowCase) 1206 1206 1207 1207 Label externalLoad = loadPtrWithPatchToLEA(Address(regT0, OBJECT_OFFSETOF(JSObject, m_externalStorage)), regT0); 1208 1208 Label externalLoadComplete(this); 1209 ASSERT (differenceBetween(hotPathBegin, externalLoad) ==patchOffsetGetByIdExternalLoad);1210 ASSERT (differenceBetween(externalLoad, externalLoadComplete) ==patchLengthGetByIdExternalLoad);1209 ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, externalLoad), patchOffsetGetByIdExternalLoad); 1210 ASSERT_JIT_OFFSET(differenceBetween(externalLoad, externalLoadComplete), patchLengthGetByIdExternalLoad); 1211 1211 1212 1212 DataLabel32 displacementLabel = loadPtrWithAddressOffsetPatch(Address(regT0, patchGetByIdDefaultOffset), regT0); 1213 ASSERT (differenceBetween(hotPathBegin, displacementLabel) ==patchOffsetGetByIdPropertyMapOffset);1213 ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, displacementLabel), patchOffsetGetByIdPropertyMapOffset); 1214 1214 1215 1215 Label putResult(this); … … 1217 1217 END_UNINTERRUPTED_SEQUENCE(sequenceGetByIdHotPath); 1218 1218 1219 ASSERT (differenceBetween(hotPathBegin, putResult) ==patchOffsetGetByIdPutResult);1219 ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, putResult), patchOffsetGetByIdPutResult); 1220 1220 } 1221 1221 … … 1252 1252 END_UNINTERRUPTED_SEQUENCE(sequenceGetByIdSlowCase); 1253 1253 1254 ASSERT (differenceBetween(coldPathBegin, call) ==patchOffsetGetByIdSlowCaseCall);1254 ASSERT_JIT_OFFSET(differenceBetween(coldPathBegin, call), patchOffsetGetByIdSlowCaseCall); 1255 1255 1256 1256 // Track the location of the call; this will be used to recover patch information. … … 1283 1283 DataLabelPtr structureToCompare; 1284 1284 addSlowCase(branchPtrWithPatch(NotEqual, Address(regT0, OBJECT_OFFSETOF(JSCell, m_structure)), structureToCompare, ImmPtr(reinterpret_cast<void*>(patchGetByIdDefaultStructure)))); 1285 ASSERT (differenceBetween(hotPathBegin, structureToCompare) ==patchOffsetPutByIdStructure);1285 ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, structureToCompare), patchOffsetPutByIdStructure); 1286 1286 1287 1287 // Plant a load from a bogus ofset in the object's property map; we will patch this later, if it is to be used. 1288 1288 Label externalLoad = loadPtrWithPatchToLEA(Address(regT0, OBJECT_OFFSETOF(JSObject, m_externalStorage)), regT0); 1289 1289 Label externalLoadComplete(this); 1290 ASSERT (differenceBetween(hotPathBegin, externalLoad) ==patchOffsetPutByIdExternalLoad);1291 ASSERT (differenceBetween(externalLoad, externalLoadComplete) ==patchLengthPutByIdExternalLoad);1290 ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, externalLoad), patchOffsetPutByIdExternalLoad); 1291 ASSERT_JIT_OFFSET(differenceBetween(externalLoad, externalLoadComplete), patchLengthPutByIdExternalLoad); 1292 1292 1293 1293 DataLabel32 displacementLabel = storePtrWithAddressOffsetPatch(regT1, Address(regT0, patchGetByIdDefaultOffset)); … … 1295 1295 END_UNINTERRUPTED_SEQUENCE(sequencePutById); 1296 1296 1297 ASSERT (differenceBetween(hotPathBegin, displacementLabel) ==patchOffsetPutByIdPropertyMapOffset);1297 ASSERT_JIT_OFFSET(differenceBetween(hotPathBegin, displacementLabel), patchOffsetPutByIdPropertyMapOffset); 1298 1298 } 1299 1299
Note:
See TracChangeset
for help on using the changeset viewer.