Changeset 88668 in webkit


Ignore:
Timestamp:
Jun 13, 2011 12:09:32 PM (13 years ago)
Author:
oliver@apple.com
Message:

2011-06-13 Oliver Hunt <oliver@apple.com>

Reviewed by Simon Fraser.

Make it possible to inline Identifier::equal
https://bugs.webkit.org/show_bug.cgi?id=62584

Move Identifier::equal to the Identifier header file.

  • runtime/Identifier.cpp:
  • runtime/Identifier.h: (JSC::Identifier::equal):
Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r88661 r88668  
     12011-06-13  Oliver Hunt  <oliver@apple.com>
     2
     3        Reviewed by Simon Fraser.
     4
     5        Make it possible to inline Identifier::equal
     6        https://bugs.webkit.org/show_bug.cgi?id=62584
     7
     8        Move Identifier::equal to the Identifier header file.
     9
     10        * runtime/Identifier.cpp:
     11        * runtime/Identifier.h:
     12        (JSC::Identifier::equal):
     13
    1142011-06-13  Tony Chang  <tony@chromium.org>
    215
  • trunk/Source/JavaScriptCore/runtime/Identifier.cpp

    r81548 r88668  
    7878}
    7979
    80 bool Identifier::equal(const StringImpl* r, const UChar* s, unsigned length)
    81 {
    82     if (r->length() != length)
    83         return false;
    84     const UChar* d = r->characters();
    85     for (unsigned i = 0; i != length; ++i)
    86         if (d[i] != s[i])
    87             return false;
    88     return true;
    89 }
    90 
    9180struct IdentifierCStringTranslator {
    9281    static unsigned hash(const char* c)
  • trunk/Source/JavaScriptCore/runtime/Identifier.h

    r65588 r88668  
    136136    }
    137137
     138    inline bool Identifier::equal(const StringImpl* r, const UChar* s, unsigned length)
     139    {
     140        if (r->length() != length)
     141            return false;
     142        const UChar* d = r->characters();
     143        for (unsigned i = 0; i != length; ++i)
     144            if (d[i] != s[i])
     145                return false;
     146        return true;
     147    }
     148   
    138149    IdentifierTable* createIdentifierTable();
    139150    void deleteIdentifierTable(IdentifierTable*);
Note: See TracChangeset for help on using the changeset viewer.