Chromium Code Reviews| Index: vm/object.h |
| =================================================================== |
| --- vm/object.h (revision 3380) |
| +++ vm/object.h (working copy) |
| @@ -2633,6 +2633,15 @@ |
| virtual intptr_t CharSize() const; |
| + bool Equals(const String& str) const { |
| + if (raw() == str.raw()) { |
| + return true; // Both handles point to the same raw instance. |
| + } |
| + if (str.IsNull()) { |
| + return false; |
| + } |
|
Ivan Posva
2012/01/18 19:44:30
Do you want to inline the hash check here?
siva
2012/01/18 20:01:06
As discussed offline, introducing the hash check s
|
| + return Equals(str, 0, str.Length()); |
| + } |
| bool Equals(const String& str, intptr_t begin_index, intptr_t len) const; |
| bool Equals(const char* str) const; |
| bool Equals(const uint8_t* characters, intptr_t len) const; |