| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 template<size_t inlineCapacity> | 45 template<size_t inlineCapacity> |
| 46 explicit AtomicString(const Vector<UChar, inlineCapacity>& characters) | 46 explicit AtomicString(const Vector<UChar, inlineCapacity>& characters) |
| 47 : m_string(add(characters.data(), characters.size())) | 47 : m_string(add(characters.data(), characters.size())) |
| 48 { | 48 { |
| 49 } | 49 } |
| 50 | 50 |
| 51 // Constructing an AtomicString from a String / StringImpl can be expensive
if | 51 // Constructing an AtomicString from a String / StringImpl can be expensive
if |
| 52 // the StringImpl is not already atomic. | 52 // the StringImpl is not already atomic. |
| 53 explicit AtomicString(StringImpl* impl) : m_string(add(impl)) { } | 53 explicit AtomicString(StringImpl* impl) : m_string(add(impl)) { } |
| 54 explicit AtomicString(const String& s) : m_string(add(s.impl())) { } | 54 AtomicString(const String& s) : m_string(add(s.impl())) { } |
| 55 | 55 |
| 56 AtomicString(StringImpl* baseString, unsigned start, unsigned length) : m_st
ring(add(baseString, start, length)) { } | 56 AtomicString(StringImpl* baseString, unsigned start, unsigned length) : m_st
ring(add(baseString, start, length)) { } |
| 57 | 57 |
| 58 enum ConstructFromLiteralTag { ConstructFromLiteral }; | 58 enum ConstructFromLiteralTag { ConstructFromLiteral }; |
| 59 AtomicString(const char* characters, unsigned length, ConstructFromLiteralTa
g) | 59 AtomicString(const char* characters, unsigned length, ConstructFromLiteralTa
g) |
| 60 : m_string(addFromLiteralData(characters, length)) | 60 : m_string(addFromLiteralData(characters, length)) |
| 61 { | 61 { |
| 62 } | 62 } |
| 63 | 63 |
| 64 template<unsigned charactersCount> | 64 template<unsigned charactersCount> |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 | 243 |
| 244 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(AtomicString); | 244 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(AtomicString); |
| 245 | 245 |
| 246 using WTF::AtomicString; | 246 using WTF::AtomicString; |
| 247 using WTF::nullAtom; | 247 using WTF::nullAtom; |
| 248 using WTF::emptyAtom; | 248 using WTF::emptyAtom; |
| 249 using WTF::starAtom; | 249 using WTF::starAtom; |
| 250 | 250 |
| 251 #include "sky/engine/wtf/text/StringConcatenate.h" | 251 #include "sky/engine/wtf/text/StringConcatenate.h" |
| 252 #endif // SKY_ENGINE_WTF_TEXT_ATOMICSTRING_H_ | 252 #endif // SKY_ENGINE_WTF_TEXT_ATOMICSTRING_H_ |
| OLD | NEW |