Ignore:
Timestamp:
Aug 16, 2010, 7:13:02 PM (15 years ago)
Author:
[email protected]
Message:

Remove unnecessary includes from UString.h, add new includes as necessary.

Rubber stamped by Sam Weinig

JavaScriptCore:

  • profiler/CallIdentifier.h:
  • profiler/ProfileNode.h:
  • runtime/DateConversion.cpp:
  • runtime/Identifier.h:

(JSC::IdentifierRepHash::hash):

  • runtime/RegExpCache.h:
  • runtime/RegExpKey.h:
  • runtime/UString.cpp:

(JSC::UString::substr):

  • runtime/UString.h:
  • wtf/text/WTFString.h:

WebCore:

  • dom/ScriptExecutionContext.h:
  • loader/appcache/ApplicationCache.cpp:

WebKit2:

  • WebProcess/Plugins/Netscape/NetscapePlugin.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/UString.h

    r65468 r65478  
    11/*
    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.
     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.
    2020 *
    2121 */
     
    2424#define UString_h
    2525
    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>
    3626#include <wtf/text/StringImpl.h>
    37 #include <wtf/unicode/Unicode.h>
    3827
    3928namespace JSC {
     
    5140
    5241    // 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.
    5345    UString(const char* characters);
    54 
    55     // Construct a string with latin1 data, from a null-terminated source.
    56     UString(const char* characters, unsigned length);
    5746
    5847    // Construct a string referencing an existing StringImpl.
     
    206195}
    207196
    208 // We'd rather not do shared substring append for small strings, since
    209 // this runs too much risk of a tiny initial string holding down a
    210 // 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 
    218197} // namespace JSC
    219198
    220199namespace 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 };
    241200
    242201template <> struct VectorTraits<JSC::UString> : SimpleClassVectorTraits
     
    244203    static const bool canInitializeWithMemset = true;
    245204};
    246    
     205
    247206} // namespace WTF
    248207
Note: See TracChangeset for help on using the changeset viewer.