Changeset 9992 in webkit for trunk/JavaScriptCore
- Timestamp:
- Jul 31, 2005, 10:02:13 PM (20 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r9932 r9992 1 2005-07-31 Darin Adler <[email protected]> 2 3 Reviewed by Maciej. 4 5 - remove uses of Mac-OS-X-specific MAX macro 6 - remove one of the many excess "APPLE_CHANGES" ifdefs 7 8 * kjs/collector.cpp: (KJS::Collector::allocate): Use std::max instead of MAX. 9 * kjs/property_map.cpp: (KJS::PropertyMap::rehash): Ditto. 10 * kjs/ustring.cpp: 11 (KJS::UChar::toLower): Take out non-ICU code path. 12 (KJS::UChar::toUpper): Ditto. 13 (KJS::UString::spliceSubstringsWithSeparators): Use std::max instead of MAX. 14 1 15 2005-07-27 Geoffrey Garen <[email protected]> 2 16 -
trunk/JavaScriptCore/kjs/collector.cpp
r9768 r9992 27 27 #include "value.h" 28 28 29 #include <algorithm> 30 29 31 #if APPLE_CHANGES 30 32 #include <CoreFoundation/CoreFoundation.h> … … 34 36 #include <mach/thread_act.h> 35 37 #endif 38 39 using std::max; 36 40 37 41 namespace KJS { … … 102 106 // oversize allocator 103 107 if (heap.usedOversizeCells == heap.numOversizeCells) { 104 heap.numOversizeCells = MAX(MIN_ARRAY_SIZE, heap.numOversizeCells * GROWTH_FACTOR);108 heap.numOversizeCells = max(MIN_ARRAY_SIZE, heap.numOversizeCells * GROWTH_FACTOR); 105 109 heap.oversizeCells = (CollectorCell **)kjs_fast_realloc(heap.oversizeCells, heap.numOversizeCells * sizeof(CollectorCell *)); 106 110 } … … 132 136 133 137 if (heap.usedBlocks == heap.numBlocks) { 134 heap.numBlocks = MAX(MIN_ARRAY_SIZE, heap.numBlocks * GROWTH_FACTOR);138 heap.numBlocks = max(MIN_ARRAY_SIZE, heap.numBlocks * GROWTH_FACTOR); 135 139 heap.blocks = (CollectorBlock **)kjs_fast_realloc(heap.blocks, heap.numBlocks * sizeof(CollectorBlock *)); 136 140 } -
trunk/JavaScriptCore/kjs/property_map.cpp
r9768 r9992 27 27 #include "reference_list.h" 28 28 29 #include <algorithm> 30 31 using std::max; 32 29 33 #define DEBUG_PROPERTIES 0 30 34 #define DO_CONSISTENCY_CHECK 0 … … 413 417 else { 414 418 int index = entry.index; 415 lastIndexUsed = MAX(index, lastIndexUsed);419 lastIndexUsed = max(index, lastIndexUsed); 416 420 insert(key, entry.value, entry.attributes, index); 417 421 } -
trunk/JavaScriptCore/kjs/ustring.cpp
r9768 r9992 43 43 #include "dtoa.h" 44 44 45 #if APPLE_CHANGES 45 #include <algorithm> 46 47 using std::max; 46 48 47 49 #include <unicode/uchar.h> 48 49 #endif50 50 51 51 namespace KJS { … … 150 150 UChar UChar::toLower() const 151 151 { 152 #if APPLE_CHANGES153 152 return static_cast<unsigned short>(u_tolower(uc)); 154 #else155 // ### properly support unicode tolower156 if (uc >= 256 || islower(uc))157 return *this;158 159 return (unsigned char)tolower(uc);160 #endif161 153 } 162 154 163 155 UChar UChar::toUpper() const 164 156 { 165 #if APPLE_CHANGES166 157 return static_cast<unsigned short>(u_toupper(uc)); 167 #else168 if (uc >= 256 || isupper(uc))169 return *this;170 171 return (unsigned char)toupper(uc);172 #endif173 158 } 174 159 … … 641 626 UChar *buffer = static_cast<UChar *>(kjs_fast_malloc(totalLength * sizeof(UChar))); 642 627 643 int maxCount = MAX(rangeCount, separatorCount);628 int maxCount = max(rangeCount, separatorCount); 644 629 int bufferPos = 0; 645 630 for (int i = 0; i < maxCount; i++) {
Note:
See TracChangeset
for help on using the changeset viewer.