Changeset 85725 in webkit
- Timestamp:
- May 4, 2011 1:33:12 AM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r85719 r85725 1 2011-05-04 Alexis Menard <alexis.menard@openbossa.org> 2 3 Reviewed by Geoffrey Garen. 4 5 JITPropertyAccess produces a unused but set variable warning in gcc 4.6.0. 6 https://bugs.webkit.org/show_bug.cgi?id=60050 7 8 This patch fix a compilation warning. The new warning scenario -Wunused-but-set-variable 9 in gcc 4.6.0 is included in -Wall and therefore stops the compilation when warnings are treated 10 as errors. The patch introduces a new macro ASSERT_JIT_OFFSET_UNUSED and ASSERT_WITH_MESSAGE_UNUSED 11 which copy the idea of ASSERT_UNUSED. 12 13 * jit/JIT.h: 14 * jit/JITPropertyAccess.cpp: 15 (JSC::JIT::emit_op_method_check): 16 (JSC::JIT::compileGetByIdHotPath): 17 (JSC::JIT::emit_op_put_by_id): 18 * wtf/Assertions.h: 19 (assertWithMessageUnused): 20 1 21 2011-04-29 Jer Noble <jer.noble@apple.com> 2 22 -
trunk/Source/JavaScriptCore/jit/JIT.h
r85432 r85725 37 37 #endif 38 38 39 #define ASSERT_JIT_OFFSET_UNUSED(variable, actual, expected) ASSERT_WITH_MESSAGE_UNUSED(variable, actual == expected, "JIT Offset \"%s\" should be %d, not %d.\n", #expected, static_cast<int>(expected), static_cast<int>(actual)); 39 40 #define ASSERT_JIT_OFFSET(actual, expected) ASSERT_WITH_MESSAGE(actual == expected, "JIT Offset \"%s\" should be %d, not %d.\n", #expected, static_cast<int>(expected), static_cast<int>(actual)); 40 41 -
trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp
r85372 r85725 348 348 Jump match = jump(); 349 349 350 ASSERT_JIT_OFFSET (differenceBetween(info.structureToCompare, protoObj), patchOffsetMethodCheckProtoObj);350 ASSERT_JIT_OFFSET_UNUSED(protoObj, differenceBetween(info.structureToCompare, protoObj), patchOffsetMethodCheckProtoObj); 351 351 ASSERT_JIT_OFFSET(differenceBetween(info.structureToCompare, protoStructureToCompare), patchOffsetMethodCheckProtoStruct); 352 ASSERT_JIT_OFFSET (differenceBetween(info.structureToCompare, putFunction), patchOffsetMethodCheckPutFunction);352 ASSERT_JIT_OFFSET_UNUSED(putFunction, differenceBetween(info.structureToCompare, putFunction), patchOffsetMethodCheckPutFunction); 353 353 354 354 // Link the failure cases here. … … 422 422 loadPtr(Address(regT0, OBJECT_OFFSETOF(JSObject, m_propertyStorage)), regT0); 423 423 DataLabel32 displacementLabel = loadPtrWithAddressOffsetPatch(Address(regT0, patchGetByIdDefaultOffset), regT0); 424 ASSERT_JIT_OFFSET (differenceBetween(hotPathBegin, displacementLabel), patchOffsetGetByIdPropertyMapOffset);424 ASSERT_JIT_OFFSET_UNUSED(displacementLabel, differenceBetween(hotPathBegin, displacementLabel), patchOffsetGetByIdPropertyMapOffset); 425 425 426 426 Label putResult(this); … … 501 501 END_UNINTERRUPTED_SEQUENCE(sequencePutById); 502 502 503 ASSERT_JIT_OFFSET (differenceBetween(hotPathBegin, displacementLabel), patchOffsetPutByIdPropertyMapOffset);503 ASSERT_JIT_OFFSET_UNUSED(displacementLabel, differenceBetween(hotPathBegin, displacementLabel), patchOffsetPutByIdPropertyMapOffset); 504 504 } 505 505 -
trunk/Source/JavaScriptCore/wtf/Assertions.h
r83709 r85725 280 280 while (0) 281 281 #endif 282 283 /* ASSERT_WITH_MESSAGE_UNUSED */ 284 285 #if COMPILER(MSVC7_OR_LOWER) 286 #define ASSERT_WITH_MESSAGE_UNUSED(variable, assertion) ((void)0) 287 #elif COMPILER(WINSCW) 288 #define ASSERT_WITH_MESSAGE_UNUSED(variable, assertion, arg...) ((void)0) 289 #elif ASSERT_MSG_DISABLED 290 #if COMPILER(INTEL) && !OS(WINDOWS) || COMPILER(RVCT) 291 template<typename T> 292 inline void assertWithMessageUnused(T& x) { (void)x; } 293 #define ASSERT_WITH_MESSAGE_UNUSED(variable, assertion, ...) (assertWithMessageUnused(variable)) 294 #else 295 #define ASSERT_WITH_MESSAGE_UNUSED(variable, assertion, ...) ((void)variable) 296 #endif 297 #else 298 #define ASSERT_WITH_MESSAGE_UNUSED(variable, assertion, ...) do \ 299 if (!(assertion)) { \ 300 WTFReportAssertionFailureWithMessage(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, #assertion, __VA_ARGS__); \ 301 CRASH(); \ 302 } \ 303 while (0) 304 #endif 282 305 283 306
Note: See TracChangeset
for help on using the changeset viewer.