Ignore:
Timestamp:
Jul 4, 2015, 12:42:18 PM (10 years ago)
Author:
Chris Dumez
Message:

Drop RefPtr::clear() method
https://bugs.webkit.org/show_bug.cgi?id=146556

Reviewed by Brady Eidson.

Source/JavaScriptCore:

Drop RefPtr::clear() method in favor of "= nullptr;" pattern.

Source/WebCore:

Drop RefPtr::clear() method in favor of "= nullptr;" pattern.

Source/WebKit:

Drop RefPtr::clear() method in favor of "= nullptr;" pattern.

Source/WebKit/mac:

Drop RefPtr::clear() method in favor of "= nullptr;" pattern.

Source/WebKit/win:

Drop RefPtr::clear() method in favor of "= nullptr;" pattern.

Source/WebKit2:

Drop RefPtr::clear() method in favor of "= nullptr;" pattern.

Source/WTF:

Drop RefPtr::clear() method in favor of "= nullptr;" pattern.
Also made the "= nullptr;" pattern as efficient as clear()
by providing a operator=(nullptr_t) overload. Local micro-
benchmarking showed that "= nullptr;" used to be ~1.7% slower
than clear().

Tools:

Drop RefPtr::clear() method in favor of "= nullptr;" pattern.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/parser/Parser.cpp

    r186246 r186279  
    492492    do {
    493493        lastIdent = 0;
    494         lastPattern = 0;
     494        lastPattern = TreeDestructuringPattern(0);
    495495        JSTokenLocation location(tokenLocation());
    496496        next();
     
    895895            if (pattern && (match(INTOKEN) || (match(IDENT) && *m_token.m_data.ident == m_vm->propertyNames->of)))
    896896                goto enumerationLoop;
    897             pattern = 0;
     897            pattern = TreeDestructuringPattern(0);
    898898            restoreSavePoint(savePoint);
    899899        }
Note: See TracChangeset for help on using the changeset viewer.