Changeset 65478 in webkit for trunk/JavaScriptCore
- Timestamp:
- Aug 16, 2010, 7:13:02 PM (15 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r65468 r65478 1 2010-08-16 Gavin Barraclough <[email protected]> 2 3 Rubber stamped by Sam Weinig 4 5 Remove unnecessary includes from UString.h, add new includes as necessary. 6 7 * profiler/CallIdentifier.h: 8 * profiler/ProfileNode.h: 9 * runtime/DateConversion.cpp: 10 * runtime/Identifier.h: 11 (JSC::IdentifierRepHash::hash): 12 * runtime/RegExpCache.h: 13 * runtime/RegExpKey.h: 14 * runtime/UString.cpp: 15 (JSC::UString::substr): 16 * runtime/UString.h: 17 * wtf/text/WTFString.h: 18 1 19 2010-08-16 Gavin Barraclough <[email protected]> 2 20 -
trunk/JavaScriptCore/profiler/CallIdentifier.h
r65305 r65478 30 30 #include <runtime/UString.h> 31 31 #include "FastAllocBase.h" 32 #include <wtf/text/CString.h> 33 #include <wtf/text/StringHash.h> 32 34 33 35 namespace JSC { -
trunk/JavaScriptCore/profiler/ProfileNode.h
r65104 r65478 31 31 32 32 #include "CallIdentifier.h" 33 #include <wtf/ Vector.h>33 #include <wtf/HashCountedSet.h> 34 34 #include <wtf/RefCounted.h> 35 35 #include <wtf/RefPtr.h> 36 #include <wtf/Vector.h> 36 37 37 38 namespace JSC { -
trunk/JavaScriptCore/runtime/DateConversion.cpp
r65305 r65478 48 48 #include <wtf/DateMath.h> 49 49 #include <wtf/StringExtras.h> 50 #include <wtf/text/CString.h> 50 51 51 52 using namespace WTF; -
trunk/JavaScriptCore/runtime/Identifier.h
r65344 r65478 25 25 #include "ThreadSpecific.h" 26 26 #include "UString.h" 27 #include <wtf/text/CString.h> 27 28 28 29 namespace JSC { … … 139 140 void deleteIdentifierTable(IdentifierTable*); 140 141 142 struct IdentifierRepHash : PtrHash<RefPtr<StringImpl> > { 143 static unsigned hash(const RefPtr<StringImpl>& key) { return key->existingHash(); } 144 static unsigned hash(StringImpl* key) { return key->existingHash(); } 145 }; 146 141 147 } // namespace JSC 142 148 -
trunk/JavaScriptCore/runtime/RegExpCache.h
r62405 r65478 29 29 #include "RegExpKey.h" 30 30 #include "UString.h" 31 #include <wtf/FixedArray.h> 32 #include <wtf/HashMap.h> 31 33 32 34 #ifndef RegExpCache_h -
trunk/JavaScriptCore/runtime/RegExpKey.h
r65468 r65478 27 27 28 28 #include "UString.h" 29 #include <wtf/text/StringHash.h> 29 30 30 31 #ifndef RegExpKey_h -
trunk/JavaScriptCore/runtime/UString.cpp
r65468 r65478 416 416 UString UString::substr(unsigned pos, unsigned len) const 417 417 { 418 // FIXME: We used to check against a limit of Heap::minExtraCost / sizeof(UChar). 419 418 420 unsigned s = length(); 419 421 -
trunk/JavaScriptCore/runtime/UString.h
r65468 r65478 1 1 /* 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 * 12 * 13 * 14 * 15 * 16 * 17 * 18 * 19 * 2 * Copyright (C) 1999-2000 Harri Porten ([email protected]) 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 4 * Copyright (C) 2009 Google Inc. All rights reserved. 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Library General Public 8 * License as published by the Free Software Foundation; either 9 * version 2 of the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Library General Public License for more details. 15 * 16 * You should have received a copy of the GNU Library General Public License 17 * along with this library; see the file COPYING.LIB. If not, write to 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 * Boston, MA 02110-1301, USA. 20 20 * 21 21 */ … … 24 24 #define UString_h 25 25 26 #include "Collector.h"27 #include <stdint.h>28 #include <string.h>29 #include <wtf/Assertions.h>30 #include <wtf/CrossThreadRefCounted.h>31 #include <wtf/OwnFastMallocPtr.h>32 #include <wtf/PassRefPtr.h>33 #include <wtf/RefPtr.h>34 #include <wtf/Vector.h>35 #include <wtf/text/CString.h>36 26 #include <wtf/text/StringImpl.h> 37 #include <wtf/unicode/Unicode.h>38 27 39 28 namespace JSC { … … 51 40 52 41 // Construct a string with latin1 data. 42 UString(const char* characters, unsigned length); 43 44 // Construct a string with latin1 data, from a null-terminated source. 53 45 UString(const char* characters); 54 55 // Construct a string with latin1 data, from a null-terminated source.56 UString(const char* characters, unsigned length);57 46 58 47 // Construct a string referencing an existing StringImpl. … … 206 195 } 207 196 208 // We'd rather not do shared substring append for small strings, since209 // this runs too much risk of a tiny initial string holding down a210 // huge buffer.211 static const unsigned minShareSize = Heap::minExtraCost / sizeof(UChar);212 213 struct IdentifierRepHash : PtrHash<RefPtr<StringImpl> > {214 static unsigned hash(const RefPtr<StringImpl>& key) { return key->existingHash(); }215 static unsigned hash(StringImpl* key) { return key->existingHash(); }216 };217 218 197 } // namespace JSC 219 198 220 199 namespace WTF { 221 222 template<typename T> struct DefaultHash;223 template<typename T> struct StrHash;224 225 template<> struct StrHash<StringImpl*> {226 static unsigned hash(const StringImpl* key) { return key->hash(); }227 static bool equal(const StringImpl* a, const StringImpl* b) { return ::equal(a, b); }228 static const bool safeToCompareToEmptyOrDeleted = false;229 };230 231 template<> struct StrHash<RefPtr<StringImpl> > : public StrHash<StringImpl*> {232 using StrHash<StringImpl*>::hash;233 static unsigned hash(const RefPtr<StringImpl>& key) { return key->hash(); }234 using StrHash<StringImpl*>::equal;235 static bool equal(const RefPtr<StringImpl>& a, const RefPtr<StringImpl>& b) { return ::equal(a.get(), b.get()); }236 static bool equal(const StringImpl* a, const RefPtr<StringImpl>& b) { return ::equal(a, b.get()); }237 static bool equal(const RefPtr<StringImpl>& a, const StringImpl* b) { return ::equal(a.get(), b); }238 239 static const bool safeToCompareToEmptyOrDeleted = false;240 };241 200 242 201 template <> struct VectorTraits<JSC::UString> : SimpleClassVectorTraits … … 244 203 static const bool canInitializeWithMemset = true; 245 204 }; 246 205 247 206 } // namespace WTF 248 207 -
trunk/JavaScriptCore/wtf/text/WTFString.h
r65468 r65478 1 1 /* 2 2 * (C) 1999 Lars Knoll ([email protected]) 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 4 4 * 5 5 * This library is free software; you can redistribute it and/or … … 447 447 using WTF::charactersToFloat; 448 448 using WTF::charactersToDouble; 449 using WTF::operator+; 450 451 #endif 449 450 #endif
Note:
See TracChangeset
for help on using the changeset viewer.