Changeset 14256 in webkit for trunk/JavaScriptCore
- Timestamp:
- May 9, 2006, 2:27:55 AM (19 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 53 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r14246 r14256 1 2006-05-09 Maciej Stachowiak <[email protected]> 2 3 Rubber stamped by Anders. 4 5 - renamed kxmlcore to wtf 6 7 kxmlcore --> wtf 8 KXMLCore --> WTF 9 WKC --> WTF 10 11 * JavaScriptCore.xcodeproj/project.pbxproj: 12 * bindings/c/c_instance.cpp: 13 * bindings/objc/WebScriptObject.mm: 14 * kjs/JSImmediate.h: 15 * kjs/Parser.cpp: 16 * kjs/Parser.h: 17 * kjs/array_object.cpp: 18 * kjs/collector.cpp: 19 (KJS::Collector::registerThread): 20 * kjs/collector.h: 21 * kjs/config.h: 22 * kjs/function.cpp: 23 (KJS::isStrWhiteSpace): 24 * kjs/function.h: 25 * kjs/identifier.cpp: 26 * kjs/internal.cpp: 27 * kjs/internal.h: 28 * kjs/lexer.cpp: 29 (Lexer::shift): 30 (Lexer::isWhiteSpace): 31 (Lexer::isIdentStart): 32 (Lexer::isIdentPart): 33 * kjs/lookup.cpp: 34 * kjs/nodes.cpp: 35 * kjs/nodes.h: 36 * kjs/number_object.cpp: 37 * kjs/object.h: 38 * kjs/property_map.cpp: 39 * kjs/property_map.h: 40 * kjs/string_object.cpp: 41 (StringProtoFunc::callAsFunction): 42 * kjs/testkjs.cpp: 43 (testIsInteger): 44 * kjs/ustring.cpp: 45 * kjs/ustring.h: 46 * kxmlcore: Removed. 47 * kxmlcore/AlwaysInline.h: Removed. 48 * kxmlcore/Assertions.cpp: Removed. 49 * kxmlcore/Assertions.h: Removed. 50 * kxmlcore/FastMalloc.cpp: Removed. 51 * kxmlcore/FastMalloc.h: Removed. 52 * kxmlcore/FastMallocInternal.h: Removed. 53 * kxmlcore/Forward.h: Removed. 54 * kxmlcore/HashCountedSet.h: Removed. 55 * kxmlcore/HashFunctions.h: Removed. 56 * kxmlcore/HashMap.h: Removed. 57 * kxmlcore/HashSet.h: Removed. 58 * kxmlcore/HashTable.cpp: Removed. 59 * kxmlcore/HashTable.h: Removed. 60 * kxmlcore/HashTraits.h: Removed. 61 * kxmlcore/ListRefPtr.h: Removed. 62 * kxmlcore/Noncopyable.h: Removed. 63 * kxmlcore/OwnArrayPtr.h: Removed. 64 * kxmlcore/OwnPtr.h: Removed. 65 * kxmlcore/PassRefPtr.h: Removed. 66 * kxmlcore/Platform.h: Removed. 67 * kxmlcore/RefPtr.h: Removed. 68 * kxmlcore/TCPageMap.h: Removed. 69 * kxmlcore/TCSpinLock.h: Removed. 70 * kxmlcore/TCSystemAlloc.cpp: Removed. 71 * kxmlcore/TCSystemAlloc.h: Removed. 72 * kxmlcore/UnusedParam.h: Removed. 73 * kxmlcore/Vector.h: Removed. 74 * kxmlcore/VectorTraits.h: Removed. 75 * kxmlcore/unicode: Removed. 76 * kxmlcore/unicode/Unicode.h: Removed. 77 * kxmlcore/unicode/UnicodeCategory.h: Removed. 78 * kxmlcore/unicode/icu: Removed. 79 * kxmlcore/unicode/icu/UnicodeIcu.h: Removed. 80 * kxmlcore/unicode/posix: Removed. 81 * kxmlcore/unicode/qt3: Removed. 82 * kxmlcore/unicode/qt4: Removed. 83 * kxmlcore/unicode/qt4/UnicodeQt4.h: Removed. 84 * pcre/pcre_get.c: 85 * wtf: Added. 86 * wtf/Assertions.cpp: 87 * wtf/Assertions.h: 88 * wtf/FastMalloc.cpp: 89 (WTF::TCMalloc_ThreadCache::Scavenge): 90 (WTF::do_malloc): 91 (WTF::do_free): 92 (WTF::TCMallocGuard::TCMallocGuard): 93 (WTF::malloc): 94 (WTF::free): 95 (WTF::calloc): 96 (WTF::cfree): 97 (WTF::realloc): 98 * wtf/FastMalloc.h: 99 * wtf/FastMallocInternal.h: 100 * wtf/Forward.h: 101 * wtf/HashCountedSet.h: 102 * wtf/HashFunctions.h: 103 * wtf/HashMap.h: 104 * wtf/HashSet.h: 105 * wtf/HashTable.cpp: 106 * wtf/HashTable.h: 107 * wtf/HashTraits.h: 108 * wtf/ListRefPtr.h: 109 * wtf/Noncopyable.h: 110 * wtf/OwnArrayPtr.h: 111 * wtf/OwnPtr.h: 112 * wtf/PassRefPtr.h: 113 * wtf/RefPtr.h: 114 * wtf/TCSystemAlloc.cpp: 115 (TCMalloc_SystemAlloc): 116 * wtf/Vector.h: 117 * wtf/VectorTraits.h: 118 * wtf/unicode/UnicodeCategory.h: 119 * wtf/unicode/icu/UnicodeIcu.h: 120 1 121 2006-05-08 Timothy Hatcher <[email protected]> 2 122 -
trunk/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r13830 r14256 550 550 937B63CC09E766D200A671DD /* DerivedSources.make */, 551 551 65417200039E01BA0058BFEB /* kjs */, 552 65162EF108E6A21C007556CD /* kxmlcore*/,552 65162EF108E6A21C007556CD /* wtf */, 553 553 51856D950562EE9C008B9D83 /* bindings */, 554 554 65417203039E01F90058BFEB /* pcre */, … … 649 649 sourceTree = BUILT_PRODUCTS_DIR; 650 650 }; 651 65162EF108E6A21C007556CD /* kxmlcore*/ = {651 65162EF108E6A21C007556CD /* wtf */ = { 652 652 isa = PBXGroup; 653 653 children = ( … … 682 682 6592C317098B7DE10003D4F6 /* VectorTraits.h */, 683 683 ); 684 path = kxmlcore;684 path = wtf; 685 685 sourceTree = "<group>"; 686 686 }; -
trunk/JavaScriptCore/bindings/c/c_instance.cpp
r13589 r14256 32 32 #include "list.h" 33 33 #include "npruntime_impl.h" 34 #include < kxmlcore/Vector.h>34 #include <wtf/Vector.h> 35 35 36 36 namespace KJS { -
trunk/JavaScriptCore/bindings/objc/WebScriptObject.mm
r13877 r14256 29 29 #import "objc_instance.h" 30 30 #import "runtime_object.h" 31 #import < kxmlcore/UnusedParam.h>31 #import <wtf/UnusedParam.h> 32 32 33 33 using namespace KJS; -
trunk/JavaScriptCore/kjs/JSImmediate.h
r12784 r14256 24 24 25 25 #include "JSType.h" 26 #include < kxmlcore/Assertions.h>26 #include <wtf/Assertions.h> 27 27 #include <stdint.h> 28 28 #include <stdlib.h> -
trunk/JavaScriptCore/kjs/Parser.cpp
r13304 r14256 28 28 #include "lexer.h" 29 29 #include "nodes.h" 30 #include < kxmlcore/HashSet.h>31 #include < kxmlcore/Vector.h>30 #include <wtf/HashSet.h> 31 #include <wtf/Vector.h> 32 32 33 33 extern int kjsyyparse(); -
trunk/JavaScriptCore/kjs/Parser.h
r13821 r14256 26 26 #define Parser_h 27 27 28 #include < kxmlcore/Forward.h>28 #include <wtf/Forward.h> 29 29 30 30 namespace KJS { -
trunk/JavaScriptCore/kjs/array_object.cpp
r13821 r14256 29 29 #include "operations.h" 30 30 #include "reference_list.h" 31 #include < kxmlcore/HashSet.h>31 #include <wtf/HashSet.h> 32 32 #include <stdio.h> 33 33 -
trunk/JavaScriptCore/kjs/collector.cpp
r14141 r14256 23 23 #include "collector.h" 24 24 25 #include < kxmlcore/FastMalloc.h>26 #include < kxmlcore/FastMallocInternal.h>27 #include < kxmlcore/HashCountedSet.h>25 #include <wtf/FastMalloc.h> 26 #include <wtf/FastMallocInternal.h> 27 #include <wtf/HashCountedSet.h> 28 28 #include "internal.h" 29 29 #include "list.h" … … 236 236 if (!pthread_getspecific(registeredThreadKey)) { 237 237 pthread_t pthread = pthread_self(); 238 KXMLCore::fastMallocRegisterThread(pthread);238 WTF::fastMallocRegisterThread(pthread); 239 239 Collector::Thread *thread = new Collector::Thread(pthread, pthread_mach_thread_np(pthread)); 240 240 thread->next = registeredThreads; -
trunk/JavaScriptCore/kjs/collector.h
r13830 r14256 26 26 27 27 #include "value.h" 28 #include < kxmlcore/HashCountedSet.h>28 #include <wtf/HashCountedSet.h> 29 29 30 30 #define KJS_MEM_LIMIT 500000 -
trunk/JavaScriptCore/kjs/config.h
r13670 r14256 1 #include < kxmlcore/Platform.h>1 #include <wtf/Platform.h> 2 2 3 3 #if PLATFORM(DARWIN) … … 44 44 #define HAVE_STRING_H 1 45 45 46 #define KXC_CHANGES 146 #define WTF_CHANGES 1 47 47 48 48 #ifdef __cplusplus 49 49 #undef new 50 50 #undef delete 51 #include < kxmlcore/FastMalloc.h>51 #include <wtf/FastMalloc.h> 52 52 #endif -
trunk/JavaScriptCore/kjs/function.cpp
r13663 r14256 41 41 #include <ctype.h> 42 42 43 #include < kxmlcore/unicode/Unicode.h>43 #include <wtf/unicode/Unicode.h> 44 44 45 45 namespace KJS { … … 662 662 return true; 663 663 default: 664 return KXMLCore::Unicode::isSeparatorSpace(c);664 return WTF::Unicode::isSeparatorSpace(c); 665 665 } 666 666 } -
trunk/JavaScriptCore/kjs/function.h
r13304 r14256 26 26 27 27 #include "internal.h" 28 #include < kxmlcore/OwnPtr.h>28 #include <wtf/OwnPtr.h> 29 29 30 30 namespace KJS { -
trunk/JavaScriptCore/kjs/identifier.cpp
r13093 r14256 39 39 #include "identifier.h" 40 40 41 #include < kxmlcore/FastMalloc.h>42 #include < kxmlcore/HashSet.h>41 #include <wtf/FastMalloc.h> 42 #include <wtf/HashSet.h> 43 43 #include <string.h> // for strlen 44 44 #include <new> // for placement new 45 45 46 namespace KXMLCore{46 namespace WTF { 47 47 48 48 template<typename T> class DefaultHash; -
trunk/JavaScriptCore/kjs/internal.cpp
r13865 r14256 43 43 #include "string_object.h" 44 44 #include <assert.h> 45 #include < kxmlcore/HashMap.h>46 #include < kxmlcore/HashSet.h>47 #include < kxmlcore/Vector.h>45 #include <wtf/HashMap.h> 46 #include <wtf/HashSet.h> 47 #include <wtf/Vector.h> 48 48 #include <math.h> 49 49 #include <stdio.h> -
trunk/JavaScriptCore/kjs/internal.h
r13821 r14256 34 34 #include "ustring.h" 35 35 36 #include < kxmlcore/Noncopyable.h>36 #include <wtf/Noncopyable.h> 37 37 38 38 #define I18N_NOOP(s) s -
trunk/JavaScriptCore/kjs/lexer.cpp
r13821 r14256 30 30 #include "nodes.h" 31 31 #include "lookup.h" 32 #include < kxmlcore/unicode/Unicode.h>32 #include <wtf/unicode/Unicode.h> 33 33 34 34 static bool isDecimalDigit(unsigned short c); … … 130 130 } 131 131 next3 = code[pos++].uc; 132 } while ( KXMLCore::Unicode::isFormatChar(next3));132 } while (WTF::Unicode::isFormatChar(next3)); 133 133 } 134 134 } … … 565 565 bool Lexer::isWhiteSpace() const 566 566 { 567 return current == '\t' || current == 0x0b || current == 0x0c || KXMLCore::Unicode::isSeparatorSpace(current);567 return current == '\t' || current == 0x0b || current == 0x0c || WTF::Unicode::isSeparatorSpace(current); 568 568 } 569 569 … … 581 581 bool Lexer::isIdentStart(unsigned short c) 582 582 { 583 return ( KXMLCore::Unicode::category(c) & (KXMLCore::Unicode::Letter_Uppercase584 | KXMLCore::Unicode::Letter_Lowercase585 | KXMLCore::Unicode::Letter_Titlecase586 | KXMLCore::Unicode::Letter_Modifier587 | KXMLCore::Unicode::Letter_Other))583 return (WTF::Unicode::category(c) & (WTF::Unicode::Letter_Uppercase 584 | WTF::Unicode::Letter_Lowercase 585 | WTF::Unicode::Letter_Titlecase 586 | WTF::Unicode::Letter_Modifier 587 | WTF::Unicode::Letter_Other)) 588 588 || c == '$' || c == '_'; 589 589 } … … 591 591 bool Lexer::isIdentPart(unsigned short c) 592 592 { 593 return ( KXMLCore::Unicode::category(c) & (KXMLCore::Unicode::Letter_Uppercase594 | KXMLCore::Unicode::Letter_Lowercase595 | KXMLCore::Unicode::Letter_Titlecase596 | KXMLCore::Unicode::Letter_Modifier597 | KXMLCore::Unicode::Letter_Other598 | KXMLCore::Unicode::Mark_NonSpacing599 | KXMLCore::Unicode::Mark_SpacingCombining600 | KXMLCore::Unicode::Number_DecimalDigit601 | KXMLCore::Unicode::Punctuation_Connector))593 return (WTF::Unicode::category(c) & (WTF::Unicode::Letter_Uppercase 594 | WTF::Unicode::Letter_Lowercase 595 | WTF::Unicode::Letter_Titlecase 596 | WTF::Unicode::Letter_Modifier 597 | WTF::Unicode::Letter_Other 598 | WTF::Unicode::Mark_NonSpacing 599 | WTF::Unicode::Mark_SpacingCombining 600 | WTF::Unicode::Number_DecimalDigit 601 | WTF::Unicode::Punctuation_Connector)) 602 602 || c == '$' || c == '_'; 603 603 } -
trunk/JavaScriptCore/kjs/lookup.cpp
r14094 r14256 26 26 27 27 #include "lookup.h" 28 #include < kxmlcore/Assertions.h>28 #include <wtf/Assertions.h> 29 29 30 30 using namespace KJS; -
trunk/JavaScriptCore/kjs/nodes.cpp
r13821 r14256 37 37 #include "operations.h" 38 38 #include "reference_list.h" 39 #include < kxmlcore/HashSet.h>40 #include < kxmlcore/HashCountedSet.h>39 #include <wtf/HashSet.h> 40 #include <wtf/HashCountedSet.h> 41 41 42 42 using namespace KJS; -
trunk/JavaScriptCore/kjs/nodes.h
r13821 r14256 28 28 #include "Parser.h" 29 29 #include "internal.h" 30 #include < kxmlcore/ListRefPtr.h>30 #include <wtf/ListRefPtr.h> 31 31 32 32 namespace KJS { -
trunk/JavaScriptCore/kjs/number_object.cpp
r13821 r14256 27 27 #include "lookup.h" 28 28 #include "operations.h" 29 #include < kxmlcore/Vector.h>29 #include <wtf/Vector.h> 30 30 #include <math.h> 31 31 -
trunk/JavaScriptCore/kjs/object.h
r13821 r14256 31 31 #include "property_slot.h" 32 32 #include "scope_chain.h" 33 #include < kxmlcore/AlwaysInline.h>33 #include <wtf/AlwaysInline.h> 34 34 35 35 namespace KJS { -
trunk/JavaScriptCore/kjs/property_map.cpp
r13120 r14256 27 27 #include "reference_list.h" 28 28 #include <algorithm> 29 #include < kxmlcore/FastMalloc.h>30 #include < kxmlcore/Vector.h>29 #include <wtf/FastMalloc.h> 30 #include <wtf/Vector.h> 31 31 32 32 using std::max; -
trunk/JavaScriptCore/kjs/property_map.h
r12523 r14256 25 25 26 26 #include "identifier.h" 27 #include < kxmlcore/OwnArrayPtr.h>27 #include <wtf/OwnArrayPtr.h> 28 28 29 29 namespace KJS { -
trunk/JavaScriptCore/kjs/string_object.cpp
r13821 r14256 29 29 #include "reference_list.h" 30 30 #include "regexp_object.h" 31 #include < kxmlcore/unicode/Unicode.h>31 #include <wtf/unicode/Unicode.h> 32 32 33 33 #include "string_object.lut.h" … … 627 627 uint16_t* destIfNeeded; 628 628 629 int len = KXMLCore::Unicode::toLower(dataPtr, u.size(), destIfNeeded);629 int len = WTF::Unicode::toLower(dataPtr, u.size(), destIfNeeded); 630 630 if (len >= 0) 631 631 result = jsString(UString(reinterpret_cast<UChar *>(destIfNeeded ? destIfNeeded : dataPtr), len)); … … 643 643 uint16_t* destIfNeeded; 644 644 645 int len = KXMLCore::Unicode::toUpper(dataPtr, u.size(), destIfNeeded);645 int len = WTF::Unicode::toUpper(dataPtr, u.size(), destIfNeeded); 646 646 if (len >= 0) 647 647 result = jsString(UString(reinterpret_cast<UChar *>(destIfNeeded ? destIfNeeded : dataPtr), len)); -
trunk/JavaScriptCore/kjs/testkjs.cpp
r14124 r14256 45 45 46 46 using namespace KJS; 47 using namespace KXMLCore;47 using namespace WTF; 48 48 49 49 static void testIsInteger(); … … 276 276 static void testIsInteger() 277 277 { 278 // Unit tests for KXMLCore::IsInteger. Don't have a better place for them now.279 // FIXME: move these once we create a unit test directory for KXMLCore.278 // Unit tests for WTF::IsInteger. Don't have a better place for them now. 279 // FIXME: move these once we create a unit test directory for WTF. 280 280 281 281 assert(IsInteger<bool>::value); -
trunk/JavaScriptCore/kjs/ustring.cpp
r13740 r14256 41 41 #include "dtoa.h" 42 42 43 #include < kxmlcore/Vector.h>43 #include <wtf/Vector.h> 44 44 45 45 using std::max; -
trunk/JavaScriptCore/kjs/ustring.h
r13740 r14256 25 25 #define _KJS_USTRING_H_ 26 26 27 #include < kxmlcore/FastMalloc.h>28 #include < kxmlcore/RefPtr.h>29 #include < kxmlcore/PassRefPtr.h>27 #include <wtf/FastMalloc.h> 28 #include <wtf/RefPtr.h> 29 #include <wtf/PassRefPtr.h> 30 30 31 31 #include <stdint.h> -
trunk/JavaScriptCore/pcre/pcre_get.c
r13015 r14256 45 45 46 46 #include "pcre_internal.h" 47 #include < kxmlcore/UnusedParam.h>47 #include <wtf/UnusedParam.h> 48 48 49 49 -
trunk/JavaScriptCore/wtf/Assertions.cpp
r14140 r14256 63 63 } 64 64 65 void KXCReportAssertionFailure(const char *file, int line, const char *function, const char *assertion)65 void WTFReportAssertionFailure(const char *file, int line, const char *function, const char *assertion) 66 66 { 67 67 if (assertion) … … 71 71 } 72 72 73 void KXCReportAssertionFailureWithMessage(const char *file, int line, const char *function, const char *assertion, const char *format, ...)73 void WTFReportAssertionFailureWithMessage(const char *file, int line, const char *function, const char *assertion, const char *format, ...) 74 74 { 75 75 fprintf(stderr, "=================\nASSERTION FAILED: "); … … 81 81 } 82 82 83 void KXCReportArgumentAssertionFailure(const char *file, int line, const char *function, const char *argName, const char *assertion)83 void WTFReportArgumentAssertionFailure(const char *file, int line, const char *function, const char *argName, const char *assertion) 84 84 { 85 85 fprintf(stderr, "=================\nARGUMENT BAD: %s, %s (%s:%d %s)\n=================\n", argName, assertion, file, line, function); 86 86 } 87 87 88 void KXCReportFatalError(const char *file, int line, const char *function, const char *format, ...)88 void WTFReportFatalError(const char *file, int line, const char *function, const char *format, ...) 89 89 { 90 90 fprintf(stderr, "=================\nFATAL ERROR: "); … … 96 96 } 97 97 98 void KXCReportError(const char *file, int line, const char *function, const char *format, ...)98 void WTFReportError(const char *file, int line, const char *function, const char *format, ...) 99 99 { 100 100 fprintf(stderr, "=================\nERROR: "); … … 106 106 } 107 107 108 void KXCLog(const char*, int, const char*, KXCLogChannel *channel, const char *format, ...)108 void WTFLog(const char*, int, const char*, WTFLogChannel *channel, const char *format, ...) 109 109 { 110 if (channel->state != KXCLogChannelOn)110 if (channel->state != WTFLogChannelOn) 111 111 return; 112 112 -
trunk/JavaScriptCore/wtf/Assertions.h
r13684 r14256 74 74 #endif 75 75 76 typedef enum { KXCLogChannelOff, KXCLogChannelOn } KXCLogChannelState;76 typedef enum { WTFLogChannelOff, WTFLogChannelOn } WTFLogChannelState; 77 77 78 78 typedef struct { 79 79 unsigned mask; 80 80 const char *defaultName; 81 KXCLogChannelState state;82 } KXCLogChannel;81 WTFLogChannelState state; 82 } WTFLogChannel; 83 83 84 void KXCReportAssertionFailure(const char *file, int line, const char *function, const char *assertion);85 void KXCReportAssertionFailureWithMessage(const char *file, int line, const char *function, const char *assertion, const char *format, ...);86 void KXCReportArgumentAssertionFailure(const char *file, int line, const char *function, const char *argName, const char *assertion);87 void KXCReportFatalError(const char *file, int line, const char *function, const char *format, ...) ;88 void KXCReportError(const char *file, int line, const char *function, const char *format, ...);89 void KXCLog(const char *file, int line, const char *function, KXCLogChannel *channel, const char *format, ...);84 void WTFReportAssertionFailure(const char *file, int line, const char *function, const char *assertion); 85 void WTFReportAssertionFailureWithMessage(const char *file, int line, const char *function, const char *assertion, const char *format, ...); 86 void WTFReportArgumentAssertionFailure(const char *file, int line, const char *function, const char *argName, const char *assertion); 87 void WTFReportFatalError(const char *file, int line, const char *function, const char *format, ...) ; 88 void WTFReportError(const char *file, int line, const char *function, const char *format, ...); 89 void WTFLog(const char *file, int line, const char *function, WTFLogChannel *channel, const char *format, ...); 90 90 91 91 #ifdef __cplusplus … … 114 114 #define ASSERT(assertion) do \ 115 115 if (!(assertion)) { \ 116 KXCReportAssertionFailure(__FILE__, __LINE__, KXMLCORE_PRETTY_FUNCTION, #assertion); \116 WTFReportAssertionFailure(__FILE__, __LINE__, KXMLCORE_PRETTY_FUNCTION, #assertion); \ 117 117 CRASH(); \ 118 118 } \ … … 120 120 #define ASSERT_WITH_MESSAGE(assertion, ...) do \ 121 121 if (!(assertion)) { \ 122 KXCReportAssertionFailureWithMessage(__FILE__, __LINE__, KXMLCORE_PRETTY_FUNCTION, #assertion, __VA_ARGS__); \122 WTFReportAssertionFailureWithMessage(__FILE__, __LINE__, KXMLCORE_PRETTY_FUNCTION, #assertion, __VA_ARGS__); \ 123 123 CRASH(); \ 124 124 } \ 125 125 while (0) 126 126 #define ASSERT_NOT_REACHED() do { \ 127 KXCReportAssertionFailure(__FILE__, __LINE__, KXMLCORE_PRETTY_FUNCTION, 0); \127 WTFReportAssertionFailure(__FILE__, __LINE__, KXMLCORE_PRETTY_FUNCTION, 0); \ 128 128 CRASH(); \ 129 129 } while (0) … … 141 141 #define ASSERT_ARG(argName, assertion) do \ 142 142 if (!(assertion)) { \ 143 KXCReportArgumentAssertionFailure(__FILE__, __LINE__, KXMLCORE_PRETTY_FUNCTION, #argName, #assertion); \143 WTFReportArgumentAssertionFailure(__FILE__, __LINE__, KXMLCORE_PRETTY_FUNCTION, #argName, #assertion); \ 144 144 CRASH(); \ 145 145 } \ … … 154 154 #else 155 155 #define FATAL(...) do { \ 156 KXCReportFatalError(__FILE__, __LINE__, KXMLCORE_PRETTY_FUNCTION, __VA_ARGS__); \156 WTFReportFatalError(__FILE__, __LINE__, KXMLCORE_PRETTY_FUNCTION, __VA_ARGS__); \ 157 157 CRASH(); \ 158 158 } while (0) … … 164 164 #define LOG_ERROR(...) ((void)0) 165 165 #else 166 #define LOG_ERROR(...) KXCReportError(__FILE__, __LINE__, KXMLCORE_PRETTY_FUNCTION, __VA_ARGS__)166 #define LOG_ERROR(...) WTFReportError(__FILE__, __LINE__, KXMLCORE_PRETTY_FUNCTION, __VA_ARGS__) 167 167 #endif 168 168 … … 172 172 #define LOG(channel, ...) ((void)0) 173 173 #else 174 #define LOG(channel, ...) KXCLog(__FILE__, __LINE__, KXMLCORE_PRETTY_FUNCTION, &JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, channel), __VA_ARGS__)174 #define LOG(channel, ...) WTFLog(__FILE__, __LINE__, KXMLCORE_PRETTY_FUNCTION, &JOIN_LOG_CHANNEL_WITH_PREFIX(LOG_CHANNEL_PREFIX, channel), __VA_ARGS__) 175 175 #define JOIN_LOG_CHANNEL_WITH_PREFIX(prefix, channel) JOIN_LOG_CHANNEL_WITH_PREFIX_LEVEL_2(prefix, channel) 176 176 #define JOIN_LOG_CHANNEL_WITH_PREFIX_LEVEL_2(prefix, channel) prefix ## channel -
trunk/JavaScriptCore/wtf/FastMalloc.cpp
r14162 r14256 81 81 #endif 82 82 83 namespace KXMLCore{83 namespace WTF { 84 84 85 85 void *fastMalloc(size_t n) … … 109 109 #endif 110 110 111 } // namespace KXMLCore111 } // namespace WTF 112 112 113 113 #else … … 135 135 #include <unistd.h> 136 136 137 #if KXC_CHANGES138 namespace KXMLCore{137 #if WTF_CHANGES 138 namespace WTF { 139 139 140 140 #define malloc fastMalloc … … 537 537 } 538 538 539 #ifndef KXC_CHANGES539 #ifndef WTF_CHANGES 540 540 static int DLL_Length(const Span* list) { 541 541 int result = 0; … … 654 654 655 655 // Dump state to stderr 656 #ifndef KXC_CHANGES656 #ifndef WTF_CHANGES 657 657 void Dump(TCMalloc_Printer* out); 658 658 #endif … … 858 858 } 859 859 860 #ifndef KXC_CHANGES860 #ifndef WTF_CHANGES 861 861 void TCMalloc_PageHeap::Dump(TCMalloc_Printer* out) { 862 862 int nonempty_sizes = 0; … … 1371 1371 // may not release much memory, but if so we will call scavenge again 1372 1372 // pretty soon and the low-water marks will be high on that call. 1373 #ifndef KXC_CHANGES1373 #ifndef WTF_CHANGES 1374 1374 int64 start = CycleClock::Now(); 1375 1375 #endif … … 1385 1385 } 1386 1386 1387 #ifndef KXC_CHANGES1387 #ifndef WTF_CHANGES 1388 1388 int64 finish = CycleClock::Now(); 1389 1389 CycleTimer ct; … … 1589 1589 }; 1590 1590 1591 #ifndef KXC_CHANGES1591 #ifndef WTF_CHANGES 1592 1592 // Get stats into "r". Also get per-size-class counts if class_count != NULL 1593 1593 static void ExtractStats(TCMallocStats* r, uint64_t* class_count) { … … 1623 1623 #endif 1624 1624 1625 #ifndef KXC_CHANGES1625 #ifndef WTF_CHANGES 1626 1626 // WRITE stats to "out" 1627 1627 static void DumpStats(TCMalloc_Printer* out, int level) { … … 1727 1727 #endif 1728 1728 1729 #ifndef KXC_CHANGES1729 #ifndef WTF_CHANGES 1730 1730 1731 1731 // TCMalloc's support for extra malloc interfaces … … 1818 1818 // We hack around this problem by disabling all deallocations 1819 1819 // after a global object destructor in this module has been called. 1820 #ifndef KXC_CHANGES1820 #ifndef WTF_CHANGES 1821 1821 static bool tcmalloc_is_destroyed = false; 1822 1822 #endif … … 1826 1826 //------------------------------------------------------------------- 1827 1827 1828 #ifndef KXC_CHANGES1828 #ifndef WTF_CHANGES 1829 1829 1830 1830 static Span* DoSampledAllocation(size_t size) { … … 1857 1857 static ALWAYS_INLINE void* do_malloc(size_t size) { 1858 1858 1859 #ifndef KXC_CHANGES1859 #ifndef WTF_CHANGES 1860 1860 if (TCMallocDebug::level >= TCMallocDebug::kVerbose) 1861 1861 MESSAGE("In tcmalloc do_malloc(%" PRIuS")\n", size); 1862 1862 #endif 1863 1863 1864 #ifndef KXC_CHANGES1864 #ifndef WTF_CHANGES 1865 1865 // The following call forces module initialization 1866 1866 TCMalloc_ThreadCache* heap = TCMalloc_ThreadCache::GetCache(); … … 1883 1883 return reinterpret_cast<void*>(span->start << kPageShift); 1884 1884 } else { 1885 #ifdef KXC_CHANGES1885 #ifdef WTF_CHANGES 1886 1886 TCMalloc_ThreadCache* heap = TCMalloc_ThreadCache::GetCache(); 1887 1887 #endif … … 1891 1891 1892 1892 static ALWAYS_INLINE void do_free(void* ptr) { 1893 #ifndef KXC_CHANGES1893 #ifndef WTF_CHANGES 1894 1894 if (TCMallocDebug::level >= TCMallocDebug::kVerbose) 1895 1895 MESSAGE("In tcmalloc do_free(%p)\n", ptr); 1896 1896 #endif 1897 #if KXC_CHANGES1897 #if WTF_CHANGES 1898 1898 if (ptr == NULL) return; 1899 #else KXC_CHANGES1899 #else WTF_CHANGES 1900 1900 if (ptr == NULL || tcmalloc_is_destroyed) return; 1901 1901 #endif … … 1905 1905 Span* span = pageheap->GetDescriptor(p); 1906 1906 1907 #ifndef KXC_CHANGES1907 #ifndef WTF_CHANGES 1908 1908 if (span == NULL) { 1909 1909 // We've seen systems where a piece of memory allocated using the … … 1944 1944 } 1945 1945 1946 #ifndef KXC_CHANGES1946 #ifndef WTF_CHANGES 1947 1947 // For use by exported routines below that want specific alignments 1948 1948 // … … 2034 2034 public: 2035 2035 TCMallocGuard() { 2036 #ifndef KXC_CHANGES2036 #ifndef WTF_CHANGES 2037 2037 char *envval; 2038 2038 if ((envval = getenv("TCMALLOC_DEBUG"))) { … … 2044 2044 TCMalloc_ThreadCache::InitTSD(); 2045 2045 do_free(do_malloc(1)); 2046 #ifndef KXC_CHANGES2046 #ifndef WTF_CHANGES 2047 2047 MallocExtension::Register(new TCMallocImplementation); 2048 2048 #endif 2049 2049 } 2050 2050 2051 #ifndef KXC_CHANGES2051 #ifndef WTF_CHANGES 2052 2052 ~TCMallocGuard() { 2053 2053 const char* env = getenv("MALLOCSTATS"); … … 2073 2073 // the call to the (de)allocation function. 2074 2074 2075 #ifndef KXC_CHANGES2075 #ifndef WTF_CHANGES 2076 2076 extern "C" 2077 2077 #endif 2078 2078 void* malloc(size_t size) { 2079 2079 void* result = do_malloc(size); 2080 #ifndef KXC_CHANGES2080 #ifndef WTF_CHANGES 2081 2081 MallocHook::InvokeNewHook(result, size); 2082 2082 #endif … … 2084 2084 } 2085 2085 2086 #ifndef KXC_CHANGES2086 #ifndef WTF_CHANGES 2087 2087 extern "C" 2088 2088 #endif 2089 2089 void free(void* ptr) { 2090 #ifndef KXC_CHANGES2090 #ifndef WTF_CHANGES 2091 2091 MallocHook::InvokeDeleteHook(ptr); 2092 2092 #endif … … 2094 2094 } 2095 2095 2096 #ifndef KXC_CHANGES2096 #ifndef WTF_CHANGES 2097 2097 extern "C" 2098 2098 #endif … … 2102 2102 memset(result, 0, n * elem_size); 2103 2103 } 2104 #ifndef KXC_CHANGES2104 #ifndef WTF_CHANGES 2105 2105 MallocHook::InvokeNewHook(result, n * elem_size); 2106 2106 #endif … … 2108 2108 } 2109 2109 2110 #ifndef KXC_CHANGES2110 #ifndef WTF_CHANGES 2111 2111 extern "C" 2112 2112 #endif 2113 2113 void cfree(void* ptr) { 2114 #ifndef KXC_CHANGES2114 #ifndef WTF_CHANGES 2115 2115 MallocHook::InvokeDeleteHook(ptr); 2116 2116 #endif … … 2118 2118 } 2119 2119 2120 #ifndef KXC_CHANGES2120 #ifndef WTF_CHANGES 2121 2121 extern "C" 2122 2122 #endif … … 2124 2124 if (old_ptr == NULL) { 2125 2125 void* result = do_malloc(new_size); 2126 #ifndef KXC_CHANGES2126 #ifndef WTF_CHANGES 2127 2127 MallocHook::InvokeNewHook(result, new_size); 2128 2128 #endif … … 2130 2130 } 2131 2131 if (new_size == 0) { 2132 #ifndef KXC_CHANGES2132 #ifndef WTF_CHANGES 2133 2133 MallocHook::InvokeDeleteHook(old_ptr); 2134 2134 #endif … … 2155 2155 return NULL; 2156 2156 } 2157 #ifndef KXC_CHANGES2157 #ifndef WTF_CHANGES 2158 2158 MallocHook::InvokeNewHook(new_ptr, new_size); 2159 2159 #endif 2160 2160 memcpy(new_ptr, old_ptr, ((old_size < new_size) ? old_size : new_size)); 2161 #ifndef KXC_CHANGES2161 #ifndef WTF_CHANGES 2162 2162 MallocHook::InvokeDeleteHook(old_ptr); 2163 2163 #endif … … 2177 2177 #endif 2178 2178 2179 #ifndef KXC_CHANGES2179 #ifndef WTF_CHANGES 2180 2180 2181 2181 void* operator new(size_t size) OPNEW_THROW { … … 2320 2320 #endif 2321 2321 2322 #if KXC_CHANGES2323 } // namespace KXMLCore2322 #if WTF_CHANGES 2323 } // namespace WTF 2324 2324 #endif 2325 2325 -
trunk/JavaScriptCore/wtf/FastMalloc.h
r13568 r14256 27 27 #include <new> 28 28 29 namespace KXMLCore{29 namespace WTF { 30 30 31 31 void *fastMalloc(size_t n); … … 34 34 void *fastRealloc(void* p, size_t n); 35 35 36 } // namespace KXMLCore36 } // namespace WTF 37 37 38 using KXMLCore::fastMalloc;39 using KXMLCore::fastCalloc;40 using KXMLCore::fastRealloc;41 using KXMLCore::fastFree;38 using WTF::fastMalloc; 39 using WTF::fastCalloc; 40 using WTF::fastRealloc; 41 using WTF::fastFree; 42 42 43 43 #if PLATFORM(GCC) && PLATFORM(DARWIN) -
trunk/JavaScriptCore/wtf/FastMallocInternal.h
r13089 r14256 28 28 #include <pthread.h> 29 29 30 namespace KXMLCore{30 namespace WTF { 31 31 void fastMallocRegisterThread(pthread_t thread); 32 32 } -
trunk/JavaScriptCore/wtf/Forward.h
r13832 r14256 24 24 #include <stddef.h> 25 25 26 namespace KXMLCore{26 namespace WTF { 27 27 template<typename T> class ListRefPtr; 28 28 template<typename T> class OwnArrayPtr; … … 32 32 } 33 33 34 using KXMLCore::ListRefPtr;35 using KXMLCore::OwnArrayPtr;36 using KXMLCore::OwnPtr;37 using KXMLCore::PassRefPtr;38 using KXMLCore::RefPtr;34 using WTF::ListRefPtr; 35 using WTF::OwnArrayPtr; 36 using WTF::OwnPtr; 37 using WTF::PassRefPtr; 38 using WTF::RefPtr; 39 39 40 40 #endif -
trunk/JavaScriptCore/wtf/HashCountedSet.h
r13830 r14256 27 27 #include "HashMap.h" 28 28 29 namespace KXMLCore{29 namespace WTF { 30 30 31 31 template<typename Value, typename HashFunctions = typename DefaultHash<Value>::Hash, … … 174 174 } // namespace khtml 175 175 176 using KXMLCore::HashCountedSet;176 using WTF::HashCountedSet; 177 177 178 178 #endif /* KXMLCORE_HASH_COUNTED_SET_H */ -
trunk/JavaScriptCore/wtf/HashFunctions.h
r13703 r14256 27 27 #include <stdint.h> 28 28 29 namespace KXMLCore{29 namespace WTF { 30 30 31 31 template<size_t size> struct IntTypes; … … 97 97 template<typename P> struct DefaultHash<RefPtr<P> > { typedef PtrHash<RefPtr<P> > Hash; }; 98 98 99 } // namespace KXMLCore99 } // namespace WTF 100 100 101 using KXMLCore::DefaultHash;102 using KXMLCore::IntHash;103 using KXMLCore::PtrHash;101 using WTF::DefaultHash; 102 using WTF::IntHash; 103 using WTF::PtrHash; 104 104 105 105 #endif // KXLMCORE_HASH_FUNCTIONS_H -
trunk/JavaScriptCore/wtf/HashMap.h
r14221 r14256 27 27 #include "HashTable.h" 28 28 29 namespace KXMLCore{29 namespace WTF { 30 30 31 31 template<typename PairType> struct PairFirstExtractor; … … 321 321 } 322 322 323 } // namespace KXMLCore324 325 using KXMLCore::HashMap;323 } // namespace WTF 324 325 using WTF::HashMap; 326 326 327 327 #endif /* KXMLCORE_HASH_MAP_H */ -
trunk/JavaScriptCore/wtf/HashSet.h
r14221 r14256 27 27 #include "HashTable.h" 28 28 29 namespace KXMLCore{29 namespace WTF { 30 30 31 31 template<typename T> struct IdentityExtractor; … … 307 307 } 308 308 309 } // namespace KXMLCore310 311 using KXMLCore::HashSet;309 } // namespace WTF 310 311 using WTF::HashSet; 312 312 313 313 #endif /* KXMLCORE_HASH_SET_H */ -
trunk/JavaScriptCore/wtf/HashTable.cpp
r12301 r14256 23 23 #include "HashTable.h" 24 24 25 namespace KXMLCore{25 namespace WTF { 26 26 27 27 #if DUMP_HASHTABLE_STATS … … 60 60 #endif 61 61 62 } // namespace KXMLCore62 } // namespace WTF -
trunk/JavaScriptCore/wtf/HashTable.h
r13821 r14256 28 28 #include <assert.h> 29 29 30 namespace KXMLCore{30 namespace WTF { 31 31 32 32 #define DUMP_HASHTABLE_STATS 0 … … 931 931 }; 932 932 933 } // namespace KXMLCore933 } // namespace WTF 934 934 935 935 #endif // KXMLCORE_HASH_TABLE_H -
trunk/JavaScriptCore/wtf/HashTraits.h
r13703 r14256 27 27 #include <utility> 28 28 29 namespace KXMLCore{29 namespace WTF { 30 30 31 31 using std::pair; … … 188 188 }; 189 189 190 } // namespace KXMLCore190 } // namespace WTF 191 191 192 using KXMLCore::HashTraits;193 using KXMLCore::PairHashTraits;192 using WTF::HashTraits; 193 using WTF::PairHashTraits; 194 194 195 195 #endif // KXMLCORE_HASH_TRAITS_H -
trunk/JavaScriptCore/wtf/ListRefPtr.h
r13821 r14256 24 24 #define KXMLCORE_LIST_REF_PTR_H 25 25 26 #include < kxmlcore/RefPtr.h>26 #include <wtf/RefPtr.h> 27 27 28 namespace KXMLCore{28 namespace WTF { 29 29 30 30 // Specialized version of RefPtr desgined for use in singly-linked lists. … … 52 52 }; 53 53 54 } // namespace KXMLCore54 } // namespace WTF 55 55 56 using KXMLCore::ListRefPtr;56 using WTF::ListRefPtr; 57 57 58 58 #endif // KXMLCORE_LIST_REF_PTR_H -
trunk/JavaScriptCore/wtf/Noncopyable.h
r12523 r14256 23 23 #define KXMLCORE_NONCOPYABLE 24 24 25 // We don't want argument-dependent lookup to pull in everything from the KXMLCore25 // We don't want argument-dependent lookup to pull in everything from the WTF 26 26 // namespace when you use Noncopyable, so put it in its own namespace. 27 27 28 namespace KXMLCoreNoncopyable {28 namespace WTFNoncopyable { 29 29 30 30 class Noncopyable { … … 36 36 }; 37 37 38 } // namespace KXMLCoreNoncopyable38 } // namespace WTFNoncopyable 39 39 40 using KXMLCoreNoncopyable::Noncopyable;40 using WTFNoncopyable::Noncopyable; 41 41 42 42 #endif // KXMLCORE_NONCOPYABLE -
trunk/JavaScriptCore/wtf/OwnArrayPtr.h
r12523 r14256 24 24 25 25 #include <algorithm> 26 #include < kxmlcore/Assertions.h>27 #include < kxmlcore/Noncopyable.h>26 #include <wtf/Assertions.h> 27 #include <wtf/Noncopyable.h> 28 28 29 namespace KXMLCore{29 namespace WTF { 30 30 31 31 template <typename T> class OwnArrayPtr : Noncopyable { … … 61 61 template <typename T> inline void swap(OwnArrayPtr<T>& a, OwnArrayPtr<T>& b) { a.swap(b); } 62 62 63 } // namespace KXMLCore63 } // namespace WTF 64 64 65 using KXMLCore::OwnArrayPtr;65 using WTF::OwnArrayPtr; 66 66 67 67 #endif // KXMLCORE_OWN_ARRAY_PTR_H -
trunk/JavaScriptCore/wtf/OwnPtr.h
r12523 r14256 24 24 25 25 #include <algorithm> 26 #include < kxmlcore/Assertions.h>27 #include < kxmlcore/Noncopyable.h>26 #include <wtf/Assertions.h> 27 #include <wtf/Noncopyable.h> 28 28 29 namespace KXMLCore{29 namespace WTF { 30 30 31 31 template <typename T> class OwnPtr : Noncopyable { … … 59 59 template <typename T> inline void swap(OwnPtr<T>& a, OwnPtr<T>& b) { a.swap(b); } 60 60 61 } // namespace KXMLCore61 } // namespace WTF 62 62 63 using KXMLCore::OwnPtr;63 using WTF::OwnPtr; 64 64 65 65 #endif // KXMLCORE_OWN_PTR_H -
trunk/JavaScriptCore/wtf/PassRefPtr.h
r12317 r14256 24 24 #define KXMLCORE_PASS_REF_PTR_H 25 25 26 namespace KXMLCore{26 namespace WTF { 27 27 28 28 template<typename T> class RefPtr; … … 179 179 } 180 180 181 } // namespace KXMLCore181 } // namespace WTF 182 182 183 using KXMLCore::PassRefPtr;184 using KXMLCore::adoptRef;185 using KXMLCore::static_pointer_cast;186 using KXMLCore::const_pointer_cast;183 using WTF::PassRefPtr; 184 using WTF::adoptRef; 185 using WTF::static_pointer_cast; 186 using WTF::const_pointer_cast; 187 187 188 188 #endif // KXMLCORE_PASS_REF_PTR_H -
trunk/JavaScriptCore/wtf/RefPtr.h
r12737 r14256 26 26 #include <algorithm> 27 27 28 namespace KXMLCore{28 namespace WTF { 29 29 30 30 template <typename T> class PassRefPtr; … … 176 176 } 177 177 178 } // namespace KXMLCore178 } // namespace WTF 179 179 180 using KXMLCore::RefPtr;181 using KXMLCore::static_pointer_cast;182 using KXMLCore::const_pointer_cast;180 using WTF::RefPtr; 181 using WTF::static_pointer_cast; 182 using WTF::const_pointer_cast; 183 183 184 184 #endif // KXMLCORE_REF_PTR_H -
trunk/JavaScriptCore/wtf/TCSystemAlloc.cpp
r13089 r14256 69 69 // the mmap address space (1300MBish) are disjoint, so we need both allocators 70 70 // to get as much virtual memory as possible. 71 #ifndef KXC_CHANGES71 #ifndef WTF_CHANGES 72 72 static bool use_devmem = false; 73 73 #endif … … 80 80 static bool mmap_failure = false; 81 81 82 #ifndef KXC_CHANGES82 #ifndef WTF_CHANGES 83 83 DEFINE_int32(malloc_devmem_start, 0, 84 84 "Physical memory starting location in MB for /dev/mem allocation." … … 173 173 #endif /* HAVE(MMAP) */ 174 174 175 #ifndef KXC_CHANGES175 #ifndef WTF_CHANGES 176 176 static void* TryDevMem(size_t size, size_t alignment) { 177 177 static bool initialized = false; … … 247 247 248 248 void* TCMalloc_SystemAlloc(size_t size, size_t alignment) { 249 #ifndef KXC_CHANGES249 #ifndef WTF_CHANGES 250 250 if (TCMallocDebug::level >= TCMallocDebug::kVerbose) { 251 251 MESSAGE("TCMalloc_SystemAlloc(%" PRIuS ", %" PRIuS")\n", … … 262 262 for (int i = 0; i < 2; i++) { 263 263 264 #ifndef KXC_CHANGES264 #ifndef WTF_CHANGES 265 265 if (use_devmem && !devmem_failure) { 266 266 void* result = TryDevMem(size, alignment); -
trunk/JavaScriptCore/wtf/Vector.h
r14184 r14256 34 34 #undef max 35 35 36 namespace KXMLCore{36 namespace WTF { 37 37 38 38 using std::min; … … 587 587 } 588 588 589 } // namespace KXMLCore590 591 using KXMLCore::Vector;589 } // namespace WTF 590 591 using WTF::Vector; 592 592 593 593 #endif // KXMLCORE_VECTOR_H -
trunk/JavaScriptCore/wtf/VectorTraits.h
r13090 r14256 29 29 using std::pair; 30 30 31 namespace KXMLCore{31 namespace WTF { 32 32 33 33 template <typename T> struct IsPod { static const bool value = false; }; … … 106 106 }; 107 107 108 } // namespace KXMLCore108 } // namespace WTF 109 109 110 using KXMLCore::VectorTraits;111 using KXMLCore::SimpleClassVectorTraits;110 using WTF::VectorTraits; 111 using WTF::SimpleClassVectorTraits; 112 112 113 113 #endif // KXMLCORE_VECTOR_TRAITS_H -
trunk/JavaScriptCore/wtf/unicode/UnicodeCategory.h
r13740 r14256 24 24 #define KJS_UNICODE_CATEGORY_H 25 25 26 namespace KXMLCore{26 namespace WTF { 27 27 namespace Unicode { 28 28 enum CharCategory { -
trunk/JavaScriptCore/wtf/unicode/icu/UnicodeIcu.h
r13742 r14256 30 30 #include "../UnicodeCategory.h" 31 31 32 namespace KXMLCore{32 namespace WTF { 33 33 namespace Unicode { 34 34
Note:
See TracChangeset
for help on using the changeset viewer.