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/runtime/RegExp.cpp

    r39162 r39809  
    4545    , m_numSubpatterns(0)
    4646{
    47     UNUSED_PARAM(globalData);
    4847#if ENABLE(WREC)
    4948    m_wrecFunction = Generator::compileRegExp(globalData, pattern, &m_numSubpatterns, &m_constructionError, m_executablePool);
     
    5150        return;
    5251    // Fall through to non-WREC case.
     52#else
     53    UNUSED_PARAM(globalData);
    5354#endif
    5455    m_regExp = jsRegExpCompile(reinterpret_cast<const UChar*>(pattern.data()), pattern.size(),
     
    6970    , m_numSubpatterns(0)
    7071{
    71     UNUSED_PARAM(globalData);
    72 
    7372    // NOTE: The global flag is handled on a case-by-case basis by functions like
    7473    // String::match and RegExpObject::match.
     
    9493        return;
    9594    // Fall through to non-WREC case.
     95#else
     96    UNUSED_PARAM(globalData);
    9697#endif
    9798    m_regExp = jsRegExpCompile(reinterpret_cast<const UChar*>(pattern.data()), pattern.size(),
Note: See TracChangeset for help on using the changeset viewer.