| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 struct UCharBuffer { | 94 struct UCharBuffer { |
| 95 const UChar* s; | 95 const UChar* s; |
| 96 unsigned length; | 96 unsigned length; |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 static inline bool equal(StringImpl* string, const UChar* characters, unsigned l
ength) | 99 static inline bool equal(StringImpl* string, const UChar* characters, unsigned l
ength) |
| 100 { | 100 { |
| 101 if (string->length() != length) | 101 if (string->length() != length) |
| 102 return false; | 102 return false; |
| 103 | 103 |
| 104 #if PLATFORM(ARM) | 104 #if PLATFORM(ARM) || PLATFORM(SH4) |
| 105 const UChar* stringCharacters = string->characters(); | 105 const UChar* stringCharacters = string->characters(); |
| 106 for (unsigned i = 0; i != length; ++i) { | 106 for (unsigned i = 0; i != length; ++i) { |
| 107 if (*stringCharacters++ != *characters++) | 107 if (*stringCharacters++ != *characters++) |
| 108 return false; | 108 return false; |
| 109 } | 109 } |
| 110 return true; | 110 return true; |
| 111 #else | 111 #else |
| 112 /* Do it 4-bytes-at-a-time on architectures where it's safe */ | 112 /* Do it 4-bytes-at-a-time on architectures where it's safe */ |
| 113 | 113 |
| 114 const uint32_t* stringCharacters = reinterpret_cast<const uint32_t*>(string-
>characters()); | 114 const uint32_t* stringCharacters = reinterpret_cast<const uint32_t*>(string-
>characters()); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 new ((void*)&emptyAtom) AtomicString(""); | 299 new ((void*)&emptyAtom) AtomicString(""); |
| 300 new ((void*)&textAtom) AtomicString("#text"); | 300 new ((void*)&textAtom) AtomicString("#text"); |
| 301 new ((void*)&commentAtom) AtomicString("#comment"); | 301 new ((void*)&commentAtom) AtomicString("#comment"); |
| 302 new ((void*)&starAtom) AtomicString("*"); | 302 new ((void*)&starAtom) AtomicString("*"); |
| 303 | 303 |
| 304 initialized = true; | 304 initialized = true; |
| 305 } | 305 } |
| 306 } | 306 } |
| 307 | 307 |
| 308 } | 308 } |
| OLD | NEW |