Ignore:
Timestamp:
Jan 11, 2009, 1:58:23 PM (16 years ago)
Author:
Darin Adler
Message:

2009-01-11 Darin Adler <Darin Adler>

Reviewed by Dan Bernstein.

Bug 23239: improve handling of unused arguments in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=23239

  • runtime/DatePrototype.cpp: Moved LocaleDateTimeFormat enum outside #if so we can use this on all platforms. Changed valueOf to share the same function with getTime, since the contents of the two are identical. Removed a FIXME since the idea isn't really specific enough or helpful enough to need to sit here in the source code. (JSC::formatLocaleDate): Changed the Mac version of this function to take the same arguments as the non-Mac version so the caller doesn't have to special-case the two platforms. Also made the formatString array be const; before the characters were, but the array was a modifiable global variable. (JSC::dateProtoFuncToLocaleString): Changed to call the new unified version of formatLocaleDate and remove the ifdef. (JSC::dateProtoFuncToLocaleDateString): Ditto. (JSC::dateProtoFuncToLocaleTimeString): Ditto.
  • runtime/JSNotAnObject.cpp: (JSC::JSNotAnObject::toObject): Use the new ASSERT_UNUSED instead of the old UNUSED_PARAM.
  • runtime/RegExp.cpp: (JSC::RegExp::RegExp): Changed to only use UNUSED_PARAM when the parameter is actually unused.
  • wtf/TCSystemAlloc.cpp: (TCMalloc_SystemRelease): Changed to only use UNUSED_PARAM when the parameter is actually unused. (TCMalloc_SystemCommit): Changed to omit the argument names instead of using UNUSED_PARAM.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/TCSystemAlloc.cpp

    r39600 r39809  
    384384void TCMalloc_SystemRelease(void* start, size_t length)
    385385{
    386   UNUSED_PARAM(start);
    387   UNUSED_PARAM(length);
    388386#if HAVE(MADV_DONTNEED)
    389387  if (FLAGS_malloc_devmem_start) {
     
    427425  return;
    428426#endif
     427
     428#if !HAVE(MADV_DONTNEED) && !HAVE(MMAP)
     429  UNUSED_PARAM(start);
     430  UNUSED_PARAM(length);
     431#endif
    429432}
    430433
    431434#if HAVE(VIRTUALALLOC)
    432 void TCMalloc_SystemCommit(void* start, size_t length)
     435void TCMalloc_SystemCommit(void*, size_t)
    433436{
    434     UNUSED_PARAM(start);
    435     UNUSED_PARAM(length);
    436 }
    437 #endif
     437}
     438#endif
Note: See TracChangeset for help on using the changeset viewer.