Changeset 65478 in webkit for trunk/JavaScriptCore


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:
Location:
trunk/JavaScriptCore
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r65468 r65478  
     12010-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
    1192010-08-16  Gavin Barraclough  <[email protected]>
    220
  • trunk/JavaScriptCore/profiler/CallIdentifier.h

    r65305 r65478  
    3030#include <runtime/UString.h>
    3131#include "FastAllocBase.h"
     32#include <wtf/text/CString.h>
     33#include <wtf/text/StringHash.h>
    3234
    3335namespace JSC {
  • trunk/JavaScriptCore/profiler/ProfileNode.h

    r65104 r65478  
    3131
    3232#include "CallIdentifier.h"
    33 #include <wtf/Vector.h>
     33#include <wtf/HashCountedSet.h>
    3434#include <wtf/RefCounted.h>
    3535#include <wtf/RefPtr.h>
     36#include <wtf/Vector.h>
    3637
    3738namespace JSC {
  • trunk/JavaScriptCore/runtime/DateConversion.cpp

    r65305 r65478  
    4848#include <wtf/DateMath.h>
    4949#include <wtf/StringExtras.h>
     50#include <wtf/text/CString.h>
    5051
    5152using namespace WTF;
  • trunk/JavaScriptCore/runtime/Identifier.h

    r65344 r65478  
    2525#include "ThreadSpecific.h"
    2626#include "UString.h"
     27#include <wtf/text/CString.h>
    2728
    2829namespace JSC {
     
    139140    void deleteIdentifierTable(IdentifierTable*);
    140141
     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
    141147} // namespace JSC
    142148
  • trunk/JavaScriptCore/runtime/RegExpCache.h

    r62405 r65478  
    2929#include "RegExpKey.h"
    3030#include "UString.h"
     31#include <wtf/FixedArray.h>
     32#include <wtf/HashMap.h>
    3133
    3234#ifndef RegExpCache_h
  • trunk/JavaScriptCore/runtime/RegExpKey.h

    r65468 r65478  
    2727
    2828#include "UString.h"
     29#include <wtf/text/StringHash.h>
    2930
    3031#ifndef RegExpKey_h
  • trunk/JavaScriptCore/runtime/UString.cpp

    r65468 r65478  
    416416UString UString::substr(unsigned pos, unsigned len) const
    417417{
     418    // FIXME: We used to check against a limit of Heap::minExtraCost / sizeof(UChar).
     419
    418420    unsigned s = length();
    419421
  • 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
  • trunk/JavaScriptCore/wtf/text/WTFString.h

    r65468 r65478  
    11/*
    22 * (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.
    44 *
    55 * This library is free software; you can redistribute it and/or
     
    447447using WTF::charactersToFloat;
    448448using WTF::charactersToDouble;
    449 using WTF::operator+;
    450 
    451 #endif
     449
     450#endif
Note: See TracChangeset for help on using the changeset viewer.