Mac WTF build checks dependencies before copying header files
[WebKit-https.git] / Source / WTF / ChangeLog
1 2012-10-18  Michael Saboff  <msaboff@apple.com>
2
3         Mac WTF build checks dependencies before copying header files
4         https://bugs.webkit.org/show_bug.cgi?id=99770
5
6         Reviewed by Mark Rowe.
7
8         Fixed up build rules per Mark Rowe. Made new target an Aggregate and removed "WTF copy".
9
10         * Configurations/CopyWTFHeaders.xcconfig: Added.
11         * Configurations/WTF.xcconfig:
12         * WTF.xcodeproj/project.pbxproj:
13
14 2012-10-18  Michael Saboff  <msaboff@apple.com>
15
16         Mac WTF build checks dependencies before copying header files
17         https://bugs.webkit.org/show_bug.cgi?id=99770
18
19         Reviewed by Geoffrey Garen.
20
21         Added a new build target "Copy WTF HEaders" to copy the header files and made that new target a dependency
22         for the main WTF build target.  Moved the "Copy WTF Headers" phase from WTF target to the new target.
23
24         * WTF.xcodeproj/project.pbxproj:
25
26 2012-10-17  Anders Carlsson  <andersca@apple.com>
27
28         Clean up Vector.h
29         https://bugs.webkit.org/show_bug.cgi?id=99622
30
31         Reviewed by Benjamin Poulain.
32
33         Remove unused member functions from Vector and get rid of the std::max and std::min using declarations
34         (as per the WebKit coding style guidelines).
35
36         * WTF.xcodeproj/project.pbxproj:
37         Turns out StreamBuffer.h was never added to the Xcode project; add it. Also go ahead and sort the project file.
38
39         * wtf/Deque.h:
40         (WTF::::expandCapacity):
41         * wtf/StreamBuffer.h:
42         (WTF::StreamBuffer::append):
43         Add std:: prefixes to max and min.
44
45         * wtf/Vector.h:
46         Remove VectorBase::bufferSlot(), VectorReverseProxy and add std:: prefixes where needed.
47
48 2012-10-17  Michael Saboff  <msaboff@apple.com>
49
50         Creating a String from an NSString should check for all 8 bit strings
51         https://bugs.webkit.org/show_bug.cgi?id=99392
52
53         Reviewed by Geoffrey Garen.
54
55         Exported the LChar* version of create().
56
57         * wtf/text/StringImpl.cpp:
58         (WTF::StringImpl::create):
59
60 2012-10-17  Michael Saboff  <msaboff@apple.com>
61
62         StringImpl::findIgnoringCase() and reverseFindIgnoringCase() don't optimally handle a mix of 8 and 16 bit strings
63         https://bugs.webkit.org/show_bug.cgi?id=99224
64
65         Reviewed by Geoffrey Garen.
66
67         Added helper templated functions and all four combinations similar to find() and reverseFind().
68
69         (WTF::findIgnoringCaseInner):
70         (WTF::StringImpl::findIgnoringCase):
71         (WTF::reverseFindIgnoringCaseInner):
72         (WTF::StringImpl::reverseFindIgnoringCase):
73
74 2012-10-17  Michael Saboff  <msaboff@apple.com>
75
76         AtomicString::HashAndUTF8CharactersTranslator::equal() doesn't optimally handle 8 bit strings
77         https://bugs.webkit.org/show_bug.cgi?id=99223
78
79         Reviewed by Geoffrey Garen.
80
81         Added an 8 bit path.
82
83         * wtf/text/AtomicString.cpp:
84         (WTF::HashAndUTF8CharactersTranslator::equal):
85
86 2012-10-17  Anders Carlsson  <andersca@apple.com>
87
88         Always use fastRealloc when growing or shrinking the Vector buffer
89         https://bugs.webkit.org/show_bug.cgi?id=99616
90
91         Reviewed by Andreas Kling.
92
93         Remove the pointless #if PLATFORM(BLACKBERRY) and always try to use fastRealloc to grow or shrink the
94         vector buffer when possible; realloc should always be at least as fast as free+malloc.
95
96         * wtf/Vector.h:
97         (WTF::VectorBufferBase::shouldReallocateBuffer):
98
99 2012-10-16  Michael Saboff  <msaboff@apple.com>
100
101         Change WTF_USE_8BIT_TEXTRUN to ENABLE_8BIT_TEXTRUN
102         https://bugs.webkit.org/show_bug.cgi?id=99484
103
104         Reviewed by Eric Seidel.
105
106         Changed macro name to align with it's purpose.
107
108         * wtf/Platform.h:
109
110 2012-10-16  Michael Saboff  <msaboff@apple.com>
111
112         StringImpl::reverseFind() with a single match character isn't optimal for mixed 8/16 bit cases
113         https://bugs.webkit.org/show_bug.cgi?id=99363
114
115         Reviewed by Benjamin Poulain.
116
117         Factored out the 8/16 bitness check of the match character from the subject character bitness
118         check.  Did this for both find() and reverseFind().  Added all UChar/LChar combinations to the
119         inline reverseFind().
120
121         * wtf/text/StringImpl.cpp:
122         (WTF::StringImpl::find):
123         (WTF::StringImpl::reverseFind):
124         * wtf/text/StringImpl.h:
125         (WTF::reverseFind):
126
127 2012-10-16  Dima Gorbik  <dgorbik@apple.com>
128
129         Remove Platform.h include from the header files.
130         https://bugs.webkit.org/show_bug.cgi?id=98665
131
132         Reviewed by Eric Seidel.
133
134         We don't want other clients that include WebKit headers to know about Platform.h.
135
136         * wtf/Assertions.h:
137         * wtf/MainThread.h:
138
139 2012-10-16  Adrienne Walker  <enne@google.com>
140
141         Remove unused WTF_NEW_HASHMAP_ITERATORS_INTERFACE #define
142         https://bugs.webkit.org/show_bug.cgi?id=99367
143
144         Reviewed by James Robinson.
145
146         Does what it says on the tin.
147
148         * wtf/HashTraits.h:
149
150 2012-10-15  Andreas Kling  <kling@webkit.org>
151
152         Remove WTF::fastDeleteAllValues().
153         <http://webkit.org/b/99345>
154
155         Reviewed by Eric Seidel.
156
157         It was only used to fastDelete() a class that was already overriding operator delete
158         by way of WTF_MAKE_FAST_ALLOCATED anyway.
159
160         * wtf/HashSet.h:
161         (WTF):
162         (HashSet):
163
164 2012-10-15  Mark Hahnenberg  <mhahnenberg@apple.com>
165
166         Parallel GC should not be disabled for all platforms
167
168         * wtf/Platform.h: D'oh!
169
170 2012-10-15  George Staikos  <staikos@webkit.org>
171
172         [BlackBerry] Adapt to Platform API changes in string handling
173         https://bugs.webkit.org/show_bug.cgi?id=99248
174
175         Reviewed by Yong Li.
176
177         Convert usage of WebString, char* and std::string to BlackBerry::Platform::String.
178
179         * wtf/Assertions.cpp: Use proper log function.
180         * wtf/text/AtomicString.h: Add BlackBerry support
181         (AtomicString):
182         (WTF::AtomicString::AtomicString): Add BlackBerry Support
183         (WTF::AtomicString::operator BlackBerry::Platform::String):
184         * wtf/text/StringImpl.h: Conversion support.
185         * wtf/text/WTFString.h: Conversion support.
186         (Platform):
187         (String):
188
189 2012-10-15  Michael Saboff  <msaboff@apple.com>
190
191         Update RenderText to use String instead of UChar* for text
192         https://bugs.webkit.org/show_bug.cgi?id=96979
193
194         Reviewed by Dan Bernstein.
195
196         Added WTF_USE_8BIT_TEXTRUN to encase code that creates 8 bit TextRun's.  Enabled WTF_USE_8BIT_TEXTRUN
197         for PLATFORM(MAC).  Other platform can update this setting in Platform.h when their platform specific use of
198         TextRun handle 8 bit data.  Added a new Vector::appendVector to allow appending the contents of a vector
199         containing one type to the end of vector containing another.  This is used to append a Vector<LChar> to
200         the end of a Vector<UChar>.
201
202         * wtf/Platform.h:
203         * wtf/Vector.h:
204         (Vector):
205         (WTF::Vector::appendVector):
206
207 2012-10-15  Ilya Tikhonovsky  <loislo@chromium.org>
208
209         Web Inspector: convert manual size calculation of different WebKit things into MemoryInstrumentation.
210         https://bugs.webkit.org/show_bug.cgi?id=99309
211
212         Reviewed by Yury Semikhatsky.
213
214         JSHeap, DOMStorage and HeapProfiler data were counted manually.
215         Now we count the sizes more generic way.
216
217         * wtf/MemoryInstrumentation.h: calculateContainerSize were removed.
218         * wtf/MemoryInstrumentationSequence.h: empty instrumentations were added for 'const char*' and 'const void*' sequences.
219
220 2012-10-12  Anders Carlsson  <andersca@apple.com>
221
222         Move QDataStream functions into HistoryItemQt.cpp
223         https://bugs.webkit.org/show_bug.cgi?id=99203
224
225         Reviewed by Andreas Kling.
226
227         It seems like the QDataStream stream operators are only used from HistoryItemQt.cpp
228         inside WebCore, so move them there. If in the future they are required elsewhere, they should
229         be moved into a separate header instead of polluting headers unnecessarily.
230
231         * wtf/Vector.h:
232         * wtf/qt/StringQt.cpp:
233         * wtf/text/WTFString.h:
234
235 2012-10-12  Michael Saboff  <msaboff@apple.com>
236
237         StringBuilder::append(StringBuilder&) doesn't take into account the bit size of the argument string
238         https://bugs.webkit.org/show_bug.cgi?id=99225
239
240         Reviewed by Benjamin Poulain.
241
242         Added 8 bit path.
243
244         * wtf/text/StringBuilder.h:
245         (WTF::StringBuilder::append):
246
247 2012-10-12  Sheriff Bot  <webkit.review.bot@gmail.com>
248
249         Unreviewed, rolling out r131224.
250         http://trac.webkit.org/changeset/131224
251         https://bugs.webkit.org/show_bug.cgi?id=99210
252
253         It broke the build (Requested by andersca on #webkit).
254
255         * wtf/Vector.h:
256         (WTF):
257         (WTF::operator<<):
258         (WTF::operator>>):
259         * wtf/qt/StringQt.cpp:
260         (WTF::operator<<):
261         (WTF):
262         (WTF::operator>>):
263         * wtf/text/WTFString.h:
264         (WTF):
265
266 2012-10-12  Anders Carlsson  <andersca@apple.com>
267
268         Move QDataStream functions into HistoryItemQt.cpp
269         https://bugs.webkit.org/show_bug.cgi?id=99203
270
271         Reviewed by Andreas Kling.
272
273         It seems like the QDataStream stream operators are only used from HistoryItemQt.cpp
274         inside WebCore, so move them there. If in the future they are required elsewhere, they should
275         be moved into a separate header instead of polluting headers unnecessarily.
276
277         * wtf/Vector.h:
278         * wtf/qt/StringQt.cpp:
279         * wtf/text/WTFString.h:
280
281 2012-10-11  Mark Toller  <mark.toller@samsung.com>
282
283         Removed incorrect pthread_mutex_trylock code in an ASSERT in TCMalloc_PageHeap::signalScavenger. This 
284         branch is used by the Webkit GTK code.
285
286         https://bugs.webkit.org/show_bug.cgi?id=97539
287
288         Reviewed by Geoffrey Garen.
289
290         The code was never compiled in, and was functionally broken. There is no need for locking around the 
291         m_scavengeThreadActive flag, however, we should lock pageheap_lock before calling 'shouldScavenge()', as we
292         only want to scavenge when really required, so it's better to wait for any current memory operation to 
293         complete before checking. 
294
295         * wtf/FastMalloc.cpp:
296         (WTF::TCMalloc_PageHeap::signalScavenger):
297
298 2012-10-10  Yong Li  <yoli@rim.com>
299
300         [BlackBerry] Define WTF_USE_EXTRA_MACROS in cmake rather than Platform.h
301         https://bugs.webkit.org/show_bug.cgi?id=98819
302
303         Reviewed by Rob Buis.
304
305         And make it depend on SHARED_CORE
306         RIM PR# 221339.
307
308         * wtf/Platform.h:
309
310 2012-10-09  Filip Pizlo  <fpizlo@apple.com>
311
312         JSC should infer when indexed storage is contiguous, and optimize for it
313         https://bugs.webkit.org/show_bug.cgi?id=97288
314
315         Reviewed by Mark Hahnenberg.
316
317         Moved out this helpful math utility to MathExtras, since we now use it in
318         multiple places.
319
320         * wtf/MathExtras.h:
321         (timesThreePlusOneDividedByTwo):
322
323 2012-10-08  Benjamin Poulain  <benjamin@webkit.org>
324
325         Generalize moving URLComponent's begin position
326         https://bugs.webkit.org/show_bug.cgi?id=98626
327
328         Reviewed by Adam Barth.
329
330         The patch r130609 introduced moving URLComponents's position.
331         It turns out this concept is really useful in the parser so
332         this patch generalize the idea.
333
334         * wtf/url/api/ParsedURL.cpp:
335         (WTF::ParsedURL::removePort):
336         * wtf/url/src/URLCanonEtc.cpp:
337         * wtf/url/src/URLComponent.h:
338         (WTF::URLComponent::moveBy):
339         Rename URLComponent::move() to URLComponent::moveBy() for consistency
340         with some of WebCore types.
341
342         * wtf/url/src/URLParse.cpp:
343         * wtf/url/src/URLParseFile.cpp:
344
345         * wtf/url/src/URLSegments.cpp:
346         (WTF::URLSegments::moveFromComponentBy):
347         Change the semantic to everything from a certain component. This is
348         useful to move everything, including the scheme.
349
350         * wtf/url/src/URLSegments.h:
351         (URLSegments):
352
353 2012-10-08  Andreas Kling  <kling@webkit.org>
354
355         Lower minimum table size of WTF::HashTable to reduce memory usage.
356         <http://webkit.org/b/98406>
357         <rdar://problem/12432140>
358
359         Reviewed by Anders Carlsson.
360
361         Lower the default minimumTableSize for WTF hash tables from 64 to 8 entries.
362         This reduces WebProcess memory consumption by ~16MB on Membuster3 (a 6% progression!)
363
364         No significant movement on PLT or JSC benchmarks on my machine. If there's a perf regression somewhere
365         from this, we can tweak individual tables to have a larger minimumTableSize.
366
367         * wtf/HashTraits.h:
368
369 2012-10-08  Andreas Kling  <kling@webkit.org>
370
371         Using float/double as WTF hash table key is unreliable.
372         <http://webkit.org/b/98627>
373
374         Reviewed by Geoffrey Garen.
375
376         Change FloatHash::equal() to do a bitwise compare instead of a logical compare.
377         This fixes a problem where the keys with different binary representation but the
378         same logical value (e.g 0 and -0) could block each other from being found if they
379         ended up in the same hash bucket.
380
381         * wtf/HashFunctions.h:
382         (FloatHash):
383         (WTF::FloatHash::hash):
384         (WTF::FloatHash::equal):
385
386 2012-10-08  Sheriff Bot  <webkit.review.bot@gmail.com>
387
388         Unreviewed, rolling out r130619.
389         http://trac.webkit.org/changeset/130619
390         https://bugs.webkit.org/show_bug.cgi?id=98634
391
392         Causes many crashes on the EFL bots. (Requested by rakuco on
393         #webkit).
394
395         * wtf/efl/MainThreadEfl.cpp:
396         (WTF::pipeObject):
397         (WTF):
398         (WTF::monitorDispatchFunctions):
399         (WTF::initializeMainThreadPlatform):
400         (WTF::scheduleDispatchFunctionsOnMainThread):
401
402 2012-10-08  Byungwoo Lee  <bw80.lee@samsung.com>
403
404         [EFL] Use ecore_main_loop_thread_safe_call_async() to wakeup main loop.
405         https://bugs.webkit.org/show_bug.cgi?id=98505
406
407         Reviewed by Kenneth Rohde Christiansen.
408
409         Instead of ecore_pipe_write(),
410         use ecore_main_loop_thread_safe_call_async() to wakeup ecore main loop.
411
412         According to the EFL API document, this function is designed to dispatch
413         a function on ecore main loop by avoiding dead lock or race condition. 
414         With this function, webkit doesn't need to maintain ecore pipe also.
415
416         * wtf/efl/MainThreadEfl.cpp:
417         (WTF::monitorDispatchFunctions):
418         (WTF::initializeMainThreadPlatform):
419         (WTF::scheduleDispatchFunctionsOnMainThread):
420
421 2012-10-07  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
422
423         Rename first/second to key/value in HashMap iterators
424         https://bugs.webkit.org/show_bug.cgi?id=82784
425
426         Reviewed by Eric Seidel.
427
428         Currently HashMap iterators follow the same interface in std::map: given an
429         iterator it, we use it->first to access the key and it->second to access the
430         value. This patch changes these accesses to it->key and it->value, improving the
431         readability at call sites.
432
433         One potential downside of this change would be the confusion between std::map and
434         HashMap interfaces. However, they are already different in other aspects and the
435         usage of std::map is more an exception than a rule in WebKit code, so we consider
436         the confusion will be less likely to happen.
437
438         * wtf/HashCountedSet.h:
439         (WTF::::add):
440         (WTF::::remove):
441         (WTF::copyToVector):
442         * wtf/HashIterators.h:
443         (WTF::HashTableConstKeysIterator::get):
444         (WTF::HashTableConstValuesIterator::get):
445         (WTF::HashTableKeysIterator::get):
446         (WTF::HashTableValuesIterator::get):
447         * wtf/HashMap.h:
448         (WTF::KeyValuePairKeyExtractor::extract):
449         (WTF::HashMapValueTraits::isEmptyValue):
450         (WTF::HashMapTranslator::translate):
451         (WTF::HashMapTranslatorAdapter::translate):
452         (WTF::::set):
453         (WTF::::get):
454         (WTF::::take):
455         (WTF::operator==):
456         (WTF::deleteAllValues):
457         (WTF::deleteAllKeys):
458         Removed deleteAllPairFirsts() and deleteAllPairSeconds() since they are now unused.
459
460         * wtf/HashTable.h:
461         (WTF::hashTableSwap):
462         (WTF::::checkTableConsistencyExceptSize):
463         * wtf/HashTraits.h:
464         (WTF):
465         (WTF::KeyValuePair::KeyValuePair):
466         (KeyValuePair):
467         (WTF::KeyValuePairHashTraits::constructDeletedValue):
468         (WTF::KeyValuePairHashTraits::isDeletedValue):
469         * wtf/MetaAllocator.cpp:
470         (WTF::MetaAllocator::addFreeSpace):
471         (WTF::MetaAllocator::incrementPageOccupancy):
472         (WTF::MetaAllocator::decrementPageOccupancy):
473         * wtf/RefCountedLeakCounter.cpp:
474         (WTF::RefCountedLeakCounter::~RefCountedLeakCounter):
475         * wtf/RefPtrHashMap.h:
476         (WTF::::set):
477         (WTF::::get):
478         (WTF::::inlineGet):
479         (WTF::::take):
480         * wtf/Spectrum.h:
481         (WTF::Spectrum::add):
482         (WTF::Spectrum::get):
483         (WTF::Spectrum::buildList):
484         * wtf/ThreadingPthreads.cpp:
485         (WTF::identifierByPthreadHandle):
486
487 2012-10-07  Benjamin Poulain  <benjamin@webkit.org>
488
489         WTFURL: implement URL port removal for HTMLAnchorElement
490         https://bugs.webkit.org/show_bug.cgi?id=98604
491
492         Reviewed by Adam Barth.
493
494         Add hasStandardScheme() (similar to isStandard from Google URL),
495         hasPort() and removePort() to implement the port removal of KURL.
496
497         * wtf/url/api/ParsedURL.cpp:
498         (WTF::ParsedURL::hasStandardScheme):
499         (WTF::ParsedURL::hasPort):
500         (WTF::ParsedURL::removePort):
501         * wtf/url/api/ParsedURL.h:
502         (ParsedURL):
503         * wtf/url/src/URLComponent.h:
504         (WTF::URLComponent::move):
505         * wtf/url/src/URLSegments.cpp:
506         (WTF::URLSegments::moveComponentsAfter):
507         * wtf/url/src/URLSegments.h:
508         (URLSegments):
509         * wtf/url/src/URLUtil.cpp:
510         (URLUtilities):
511         (WTF::URLUtilities::isStandard):
512         * wtf/url/src/URLUtil.h:
513         (URLUtilities):
514         Remove LowerCaseEqualsASCII() from the interface, make it an internal template.
515
516         (WTF::URLUtilities::isStandard):
517         Since in WebKit, LChar is a superset of char, expose LChar and cast char* to LChar*.
518
519 2012-10-06  Ilya Tikhonovsky  <loislo@chromium.org>
520
521         Web Inspector: NMI fix String instrumentation the way it was discussed in WK97964
522         https://bugs.webkit.org/show_bug.cgi?id=98500
523
524         Reviewed by Benjamin Poulain.
525
526         Current instrumentation incorrectly covers the case when StringImpl object has been created via StringImpl::createWithTerminatingNullCharacter().
527         Looks like the only way to detect the strings that has been created from literals is to compare the addresses of buffer and stringImpl + 1.
528
529         * wtf/MemoryInstrumentationString.h:
530         (WTF::reportMemoryUsage):
531         * wtf/text/StringImpl.h:
532         (WTF::StringImpl::hasInternalBuffer):
533
534 2012-10-06  Benjamin Poulain  <benjamin@webkit.org>
535
536         Fix build of WTFURL after r130187
537         https://bugs.webkit.org/show_bug.cgi?id=98588
538
539         Reviewed by Kentaro Hara.
540
541         * wtf/MemoryInstrumentationParsedURL.h:
542         (WTF::reportMemoryUsage):
543         * wtf/url/api/ParsedURL.h:
544         (WTF::ParsedURL::spec):
545
546 2012-10-05  Simon Pena  <spena@igalia.com>
547
548         [GTK] Add support for GBytes in GRefPtr
549         https://bugs.webkit.org/show_bug.cgi?id=98489
550
551         Reviewed by Carlos Garcia Campos.
552
553         Adding support for GBytes in GRefPtr makes it easier
554         for them to be used when adding GResources support,
555         and is more consistent with the rest of the port.
556
557         This calls g_bytes_ref and g_bytes_unref in the implementation
558         of the refPtr and derefPtr template functions, in case the GLib
559         version is met. Otherwise, it does nothing.
560
561         * wtf/gobject/GRefPtr.cpp: Implement templates for ref and deref.
562         (WTF::refGPtr):
563         (WTF):
564         (WTF::derefGPtr):
565         * wtf/gobject/GRefPtr.h:
566         (WTF):
567         * wtf/gobject/GTypedefs.h: Define the GBytes datatype.
568
569 2012-10-05  Sheriff Bot  <webkit.review.bot@gmail.com>
570
571         Unreviewed, rolling out r130478.
572         http://trac.webkit.org/changeset/130478
573         https://bugs.webkit.org/show_bug.cgi?id=98494
574
575         It broke the Qt build (Requested by Ossy on #webkit).
576
577         * wtf/gobject/GRefPtr.cpp:
578         * wtf/gobject/GRefPtr.h:
579         (WTF):
580         * wtf/gobject/GTypedefs.h:
581
582 2012-10-05  Simon Pena  <spena@igalia.com>
583
584         [GTK] Add support for GBytes in GRefPtr
585         https://bugs.webkit.org/show_bug.cgi?id=98489
586
587         Reviewed by Carlos Garcia Campos.
588
589         Adding support for GBytes in GRefPtr makes it easier
590         for them to be used when adding GResources support,
591         and is more consistent with the rest of the port.
592
593         This calls g_bytes_ref and g_bytes_unref in the implementation
594         of the refPtr and derefPtr template functions.
595
596         * wtf/gobject/GRefPtr.cpp: Implement templates for ref and deref.
597         (WTF::refGPtr):
598         (WTF):
599         (WTF::derefGPtr):
600         * wtf/gobject/GRefPtr.h:
601         (WTF):
602         * wtf/gobject/GTypedefs.h: Define the GBytes datatype.
603
604 2012-10-04  Dirk Pranke  <dpranke@chromium.org>
605
606         Unreviewed, rolling out r130419.
607         http://trac.webkit.org/changeset/130419
608         https://bugs.webkit.org/show_bug.cgi?id=98406
609
610         broke editing/pasteboard/data-transfer-items.html on chromium
611
612         * wtf/HashTraits.h:
613
614 2012-10-04  Andreas Kling  <kling@webkit.org>
615
616         Lower minimum table size of WTF::HashTable to reduce memory usage.
617         <http://webkit.org/b/98406>
618         <rdar://problem/12432140>
619
620         Reviewed by Anders Carlsson.
621
622         Lower the default minimumTableSize for WTF hash tables from 64 to 8 entries.
623         This reduces WebProcess memory consumption by ~16MB on Membuster3 (a 6% progression!)
624
625         No significant movement on PLT or JSC benchmarks on my machine. If there's a perf regression somewhere
626         from this, we can tweak individual tables to have a larger minimumTableSize.
627
628         * wtf/HashTraits.h:
629
630 2012-10-04  Michael Saboff  <msaboff@apple.com>
631
632         String::remove will convert an 8 bit string to a 16 bit string
633         https://bugs.webkit.org/show_bug.cgi?id=98299
634
635         Reviewed by Benjamin Poulain.
636
637         Added an 8 bit path to remove().  Added a private templated helper removeInternal.
638
639         * wtf/text/WTFString.cpp:
640         (WTF::String::removeInternal):
641         (WTF::String::remove):
642         * wtf/text/WTFString.h:
643         (String):
644
645 2012-10-03  Kangil Han  <kangil.han@samsung.com>
646
647         [Refactoring] Tidy NDEBUG optioning in RefCountedBase.
648         https://bugs.webkit.org/show_bug.cgi?id=98252
649
650         Reviewed by Benjamin Poulain.
651
652         Fixed incomplete implementation for NDEBUG option.
653         Additionally, adopted CHECK_REF_COUNTED_LIFECYCLE definition to suppress abusing NDEBUG option.
654
655         * wtf/RefCounted.h:
656         (WTF):
657         (WTF::RefCountedBase::ref):
658         (WTF::RefCountedBase::hasOneRef):
659         (WTF::RefCountedBase::refCount):
660         (WTF::RefCountedBase::turnOffVerifier):
661         (WTF::RefCountedBase::relaxAdoptionRequirement):
662         (WTF::RefCountedBase::RefCountedBase):
663         (WTF::RefCountedBase::~RefCountedBase):
664         (WTF::RefCountedBase::derefBase):
665         (RefCountedBase):
666         (WTF::adopted):
667         (WTF::RefCountedBase::setMutexForVerifier):
668         (WTF::RefCountedBase::setDispatchQueueForVerifier):
669
670 2012-10-03  Yury Semikhatsky  <yurys@chromium.org>
671
672         Remove MemoryInstrumentation::addCollectionElements
673         https://bugs.webkit.org/show_bug.cgi?id=98245
674
675         Reviewed by Vsevolod Vlasov.
676
677         Removed MemoryInstrumentation::addCollectionElements and switched all call sites
678         to reportSequenceMemoryUsage.
679
680         Drive-by fix: removed some unused methods on MemoryInstrumentation.
681
682         * wtf/MemoryInstrumentation.h:
683         * wtf/MemoryInstrumentationHashSet.h:
684         (WTF::reportMemoryUsage):
685         * wtf/MemoryInstrumentationSequence.h:
686         (WTF::SequenceMemoryInstrumentationTraits::reportMemoryUsage):
687         * wtf/MemoryInstrumentationVector.h:
688         (WTF::reportMemoryUsage):
689
690 2012-10-02  Yury Semikhatsky  <yurys@chromium.org>
691
692         Provide memory instrumentation for HashCountedSet
693         https://bugs.webkit.org/show_bug.cgi?id=98138
694
695         Reviewed by Pavel Feldman.
696
697         Added memory instrumentation for HashCountedSet.
698
699         Extracted common routines for collecting memory info for an iterable sequence.
700
701         * GNUmakefile.list.am:
702         * WTF.gypi:
703         * WTF.pro:
704         * WTF.vcproj/WTF.vcproj:
705         * WTF.xcodeproj/project.pbxproj:
706         * wtf/MemoryInstrumentation.h:
707         (WTF):
708         * wtf/MemoryInstrumentationHashCountedSet.h: Copied from Source/WTF/wtf/MemoryInstrumentationHashSet.h.
709         (WTF):
710         (WTF::reportMemoryUsage):
711         * wtf/MemoryInstrumentationHashMap.h:
712         (WTF::reportMemoryUsage):
713         * wtf/MemoryInstrumentationHashSet.h:
714         * wtf/MemoryInstrumentationSequence.h: Copied from Source/WTF/wtf/MemoryInstrumentationHashMap.h.
715         (WTF):
716         (WTF::SequenceMemoryInstrumentationTraits::reportMemoryUsage):
717         (WTF::reportSequenceMemoryUsage):
718
719 2012-10-02  Joshua Bell  <jsbell@chromium.org>
720
721         Add htons/htonl definitions and implementations
722         https://bugs.webkit.org/show_bug.cgi?id=98054
723
724         Reviewed by Darin Adler.
725
726         For parsing or serializing binary data, byte order matters. The canonical htons/htonl/
727         ntohs/ntohl functions are not present everywhere, so implementations are proliferating in
728         parsers. Expose a new WTF header (wtf/ByteOrder.h) that includes the standard
729         implementations on UNIX-like OSs and provides basic inlined implementations on Windows.
730
731         * GNUmakefile.list.am:
732         * WTF.gypi:
733         * WTF.pro:
734         * WTF.vcproj/WTF.vcproj:
735         * WTF.xcodeproj/project.pbxproj:
736         * wtf/ByteOrder.h: Added.
737         (WTF::wswap32): Inline functions so arguments are only evaluated once.
738         (WTF::bswap32):
739         (WTF::bswap16):
740         (ntohs): Inline functions on OS(WINDOWS) to match macros on OS(UNIX)
741         (htons):
742         (ntohl):
743         (htonl):
744         * wtf/CMakeLists.txt:
745
746 2012-10-02  Michael Saboff  <msaboff@apple.com>
747
748         HTMLConstructionSite::insertTextNode isn't optimized for 8 bit strings
749         https://bugs.webkit.org/show_bug.cgi?id=97740
750
751         Reviewed by Darin Adler.
752
753         Added an append method that takes an LChar source.  Made both the UChar and LChar versions optimally handle
754         the appendee and appendend string bitness.
755
756         * wtf/text/WTFString.cpp:
757         (WTF::String::append):
758         * wtf/text/WTFString.h:
759         (String):
760
761 2012-10-02  Ilya Tikhonovsky  <loislo@chromium.org>
762
763         Web Inspector: NMI: switch to non intrusive instrumentation of ParsedURL.
764         https://bugs.webkit.org/show_bug.cgi?id=98150
765
766         Reviewed by Yury Semikhatsky.
767
768         Memory instrumentation for ParsedURL was extracted into separate header MemoryInstrumentationParsedURL.h
769
770         Drive by fix: unnecessary include was removed from String*.cpp files.
771
772         * GNUmakefile.list.am:
773         * WTF.gypi:
774         * WTF.pro:
775         * WTF.xcodeproj/project.pbxproj:
776         * wtf/MemoryInstrumentation.h:
777         (WTF):
778         * wtf/MemoryInstrumentationParsedURL.h: Added.
779         (WTF):
780         (WTF::reportMemoryUsage):
781         * wtf/text/AtomicString.cpp:
782         * wtf/text/StringImpl.cpp:
783         * wtf/text/WTFString.cpp:
784         * wtf/url/api/ParsedURL.cpp:
785         * wtf/url/api/ParsedURL.h:
786         * wtf/url/api/URLString.cpp:
787         * wtf/url/api/URLString.h:
788
789 2012-09-29  Ilya Tikhonovsky  <loislo@chromium.org>
790
791         Web Inspector: NMI make String* instrumentation non intrusive
792         https://bugs.webkit.org/show_bug.cgi?id=97964
793
794         Reviewed by Yury Semikhatsky.
795
796         MemoryInstrumentationString.h was added.
797         Intrusive instrumentation was removed.
798
799         * GNUmakefile.list.am:
800         * WTF.gypi:
801         * WTF.pro:
802         * WTF.vcproj/WTF.vcproj:
803         * WTF.xcodeproj/project.pbxproj:
804         * wtf/MemoryInstrumentation.h:
805         (WTF):
806         * wtf/MemoryInstrumentationString.h: Added.
807         (WTF):
808         (WTF::reportMemoryUsage):
809         * wtf/text/AtomicString.cpp:
810         (WTF):
811         * wtf/text/AtomicString.h:
812         (AtomicString):
813         * wtf/text/CString.h:
814         (WTF::CStringBuffer::length):
815         * wtf/text/StringImpl.cpp:
816         * wtf/text/StringImpl.h:
817         (WTF::StringImpl::usesInternalBuffer):
818         (WTF::StringImpl::baseString):
819         (StringImpl):
820
821 2012-10-02  Sheriff Bot  <webkit.review.bot@gmail.com>
822
823         Unreviewed, rolling out r130129.
824         http://trac.webkit.org/changeset/130129
825         https://bugs.webkit.org/show_bug.cgi?id=98125
826
827         broke 4 webkit_unit_tests
828         (MemoryInstrumentationTest.hashMapWith*) (Requested by caseq
829         on #webkit).
830
831         * GNUmakefile.list.am:
832         * WTF.gypi:
833         * WTF.pro:
834         * WTF.vcproj/WTF.vcproj:
835         * WTF.xcodeproj/project.pbxproj:
836         * wtf/MemoryInstrumentation.h:
837         (WTF):
838         * wtf/MemoryInstrumentationString.h: Removed.
839         * wtf/text/AtomicString.cpp:
840         (WTF::AtomicString::reportMemoryUsage):
841         (WTF):
842         * wtf/text/AtomicString.h:
843         (AtomicString):
844         * wtf/text/CString.h:
845         (WTF::CStringBuffer::length):
846         (CStringBuffer):
847         (WTF::CStringBuffer::reportMemoryUsage):
848         (CString):
849         (WTF::CString::reportMemoryUsage):
850         * wtf/text/StringImpl.cpp:
851         (WTF::StringImpl::reportMemoryUsage):
852         (WTF):
853         * wtf/text/StringImpl.h:
854         (StringImpl):
855         * wtf/text/WTFString.cpp:
856         (WTF::String::reportMemoryUsage):
857         (WTF):
858         * wtf/text/WTFString.h:
859         (String):
860
861 2012-09-29  Ilya Tikhonovsky  <loislo@chromium.org>
862
863         Web Inspector: NMI make String* instrumentation non intrusive
864         https://bugs.webkit.org/show_bug.cgi?id=97964
865
866         Reviewed by Yury Semikhatsky.
867
868         MemoryInstrumentationString.h was added.
869         Intrusive instrumentation was removed.
870
871         * GNUmakefile.list.am:
872         * WTF.gypi:
873         * WTF.pro:
874         * WTF.vcproj/WTF.vcproj:
875         * WTF.xcodeproj/project.pbxproj:
876         * wtf/MemoryInstrumentation.h:
877         (WTF):
878         * wtf/MemoryInstrumentationString.h: Added.
879         (WTF):
880         (WTF::reportMemoryUsage):
881         * wtf/text/AtomicString.cpp:
882         (WTF):
883         * wtf/text/AtomicString.h:
884         (AtomicString):
885         * wtf/text/CString.h:
886         (WTF::CStringBuffer::length):
887         * wtf/text/StringImpl.cpp:
888         * wtf/text/StringImpl.h:
889         (WTF::StringImpl::usesInternalBuffer):
890         (WTF::StringImpl::baseString):
891         (StringImpl):
892
893 2012-10-01  Daniel Drake  <dsd@laptop.org>
894
895         Another SIGILL in JavaScriptCore on a Geode processor
896         https://bugs.webkit.org/show_bug.cgi?id=96286
897
898         Reviewed by Filip Pizlo.
899
900         Disable LLint for the GTK build where the build target does not
901         support SSE2 instructions. Restores support for non-SSE2 processors
902         such as the AMD Geode.
903
904         * wtf/Platform.h:
905
906 2012-10-01  Yury Semikhatsky  <yurys@chromium.org>
907
908         Web Inspector: provide memory instrumentation for HashMap
909         https://bugs.webkit.org/show_bug.cgi?id=98005
910
911         Reviewed by Pavel Feldman.
912
913         Extracted HashMap memory instrumentation into its own file. The map's content
914         elements will be automatically traversed if their types are supported
915         by the memory instrumentation. No need to call special method for hash map
916         fields any more.
917
918         * GNUmakefile.list.am:
919         * WTF.gypi:
920         * WTF.pro:
921         * WTF.vcproj/WTF.vcproj:
922         * wtf/MemoryInstrumentation.h:
923         (MemoryInstrumentation):
924         (WTF):
925         * wtf/MemoryInstrumentationHashMap.h: Added.
926         (WTF):
927         (WTF::SequenceMemoryInstrumentationTraits::reportMemoryUsage):
928         (WTF::reportMemoryUsage):
929
930 2012-10-01  Alberto Garcia  <agarcia@igalia.com>
931
932         Check that __cplusplus is defined before comparing its value
933         https://bugs.webkit.org/show_bug.cgi?id=98015
934
935         Reviewed by Xan Lopez.
936
937         If __cplusplus is not defined is interpreted as having the value
938         0, but it produces a compilation warning with -Wundef.
939
940         This is the case with some API tests that are written in C
941         (JSNode.c, JSNodeList.c, minidom.c).
942
943         * wtf/Compiler.h:
944
945 2012-10-01  Carlos Garcia Campos  <cgarcia@igalia.com>
946
947         Unreviewed. Fix make distcheck.
948
949         * GNUmakefile.list.am: Add missing header files to compilation.
950
951 2012-09-30  Mark Hahnenberg  <mhahnenberg@apple.com>
952
953         Clean up HasTrivialConstructor/Destructor
954         https://bugs.webkit.org/show_bug.cgi?id=97754
955
956         Reviewed by Sam Weinig.
957
958         Mixed up the HasTrivialDestructor/Constructor case for VS2010 and later in the previous patch.
959
960         * wtf/TypeTraits.h:
961
962 2012-09-29  Sheriff Bot  <webkit.review.bot@gmail.com>
963
964         Unreviewed, rolling out r129982.
965         http://trac.webkit.org/changeset/129982
966         https://bugs.webkit.org/show_bug.cgi?id=97971
967
968         hit assert in fast/overflow/overflow-height-float-not-removed-
969         crash3.html (Requested by eae on #webkit).
970
971         * wtf/Platform.h:
972
973 2012-09-29  Emil A Eklund  <eae@chromium.org>
974
975         Enable SATURATED_LAYOUT_ARITHMETIC for chromium
976         https://bugs.webkit.org/show_bug.cgi?id=95053
977
978         Reviewed by Abhishek Arya.
979
980         Enable the SATURATED_LAYOUT_ARITHMETIC flag for the chromium port.
981         This changes the behavior of FractionalLayoutUnit to clamp to the
982         max or min value instead of overflowing.
983
984         This may very well impact performance so the current plan is to enable
985         it for a couple of hours to a day to collect performance data and then
986         disable it again until we've had a chance to review the perf data.
987
988         * wtf/Platform.h:
989
990 2012-09-28  Anders Carlsson  <andersca@apple.com>
991
992         Remove Java bridge
993         https://bugs.webkit.org/show_bug.cgi?id=97954
994
995         Reviewed by Sam Weinig.
996
997         The Java bridge is not used by any port; Mac now has a NPAPI Java plug-in.
998
999         * wtf/Platform.h:
1000
1001 2012-09-28  Kai Koehne  <kai.koehne@digia.com>
1002
1003         Disable YARR_JIT for Windows 64 bit
1004         https://bugs.webkit.org/show_bug.cgi?id=97772
1005
1006         Reviewed by Simon Hausmann.
1007
1008         Using YARR_JIT requires ASSEMBLER, which in turn enables the
1009         executable fixed allocator, which is mmap based (not available on
1010         Windows).
1011
1012         * wtf/Platform.h:
1013
1014 2012-09-28  Yury Semikhatsky  <yurys@chromium.org>
1015
1016         Web Inspector: make HashSet memory instrumentation non-intrusive
1017         https://bugs.webkit.org/show_bug.cgi?id=97879
1018
1019         Reviewed by Vsevolod Vlasov.
1020
1021         Removed reportMemoryUsage declarations as a friend of HashSet and HashTable. Also
1022         removed MemoryInstrumentationHashTable which is not needed if we don't have
1023         access to HashSet's guts.
1024
1025         * GNUmakefile.list.am:
1026         * WTF.gypi:
1027         * WTF.pro:
1028         * WTF.vcproj/WTF.vcproj:
1029         * WTF.xcodeproj/project.pbxproj:
1030         * wtf/HashSet.h:
1031         (WTF):
1032         (HashSet):
1033         * wtf/HashTable.h:
1034         (HashTable):
1035         * wtf/MemoryInstrumentation.h:
1036         (WTF::MemoryClassInfo::addPrivateBuffer):
1037         * wtf/MemoryInstrumentationHashSet.h:
1038         (WTF::reportMemoryUsage):
1039         * wtf/MemoryInstrumentationHashTable.h: Removed.
1040
1041 2012-09-27  Anders Carlsson  <andersca@apple.com>
1042
1043         Remove the clang pragmas to disable warnings in Noncopyable.h
1044         https://bugs.webkit.org/show_bug.cgi?id=97826
1045
1046         Reviewed by Beth Dakin.
1047
1048         Warnings about C++11 extensions are already disabled project-wide now so there's no need
1049         to keep these pragmas.
1050
1051         * wtf/Noncopyable.h:
1052
1053 2012-09-26  Mark Hahnenberg  <mhahnenberg@apple.com>
1054
1055         Clean up HasTrivialConstructor/Destructor
1056         https://bugs.webkit.org/show_bug.cgi?id=97754
1057
1058         Reviewed by Darin Adler.
1059
1060         Cleaned up HasTrivialConstructor and HasTrivialDestructor by defining them in terms of 
1061         other type traits we have. Also moved some ifdefs and comments to make things more clear.
1062
1063         * wtf/TypeTraits.h:
1064
1065 2012-09-27  Ilya Tikhonovsky  <loislo@chromium.org>
1066
1067         Web Inspector: NMI: move visited and countObjectSize methods implementation into separate class.
1068         https://bugs.webkit.org/show_bug.cgi?id=97461
1069
1070         Reviewed by Yury Semikhatsky.
1071
1072         These methods and the data collected by them need to be used in the instrumentation code for other components.
1073         As example when we are visiting bitmaps we need to visit platform specific objects.
1074         These objects will be instrumented with help of component's own instrumentation code
1075         but we have to keep the single set of visited objects and the map of counters.
1076
1077         * wtf/MemoryInstrumentation.h:
1078         (MemoryInstrumentationClient):
1079         (WTF::MemoryInstrumentationClient::~MemoryInstrumentationClient):
1080         (WTF):
1081         (WTF::MemoryInstrumentation::MemoryInstrumentation):
1082         (MemoryInstrumentation):
1083         (WTF::MemoryInstrumentation::countObjectSize):
1084         (WTF::MemoryInstrumentation::visited):
1085
1086 2012-09-27  Csaba Osztrogonác  <ossy@webkit.org>, Tor Arne Vestbø  <vestbo@webkit.org>
1087
1088         [Qt] Enable the LLInt on Linux
1089         https://bugs.webkit.org/show_bug.cgi?id=95749
1090
1091         Reviewed by Simon Hausmann.
1092
1093         * wtf/Platform.h:
1094
1095 2012-09-26  Cosmin Truta  <ctruta@rim.com>
1096
1097         [BlackBerry] Allow denormal floats in ARM VFP
1098         https://bugs.webkit.org/show_bug.cgi?id=97008
1099
1100         Reviewed by Filip Pizlo.
1101         Reviewed internally by Yong Li.
1102
1103         Cleared the Flush-to-Zero flag in the ARM FPSCR register on QNX.
1104
1105         * wtf/ThreadingPthreads.cpp:
1106         (WTF::enableIEEE754Denormal): Added.
1107         (WTF::initializeThreading):
1108         (WTF::initializeCurrentThreadInternal):
1109
1110 2012-09-26  Michael Saboff  <msaboff@apple.com>
1111
1112         Update ComplexTextController for 8 bit TextRun changes
1113         https://bugs.webkit.org/show_bug.cgi?id=97378
1114
1115         Reviewed by Geoffrey Garen.
1116
1117         Add a new create method to make a 16 bit string from 8 bit source data.  This is used in 
1118         ComplexTextController when we have LChar* + length text data, but we really want 16 bit
1119         data for the complex text rendering code.
1120
1121         * wtf/text/WTFString.cpp:
1122         (WTF::String::make16BitFrom8BitSource):
1123         (WTF):
1124         * wtf/text/WTFString.h:
1125         (String):
1126
1127 2012-09-26  Ilya Tikhonovsky  <loislo@chromium.org>
1128
1129         Web Inspector: NMI: replace manual JS external resources counting with MemoryInstrumentation
1130         https://bugs.webkit.org/show_bug.cgi?id=97662
1131
1132         Reviewed by Yury Semikhatsky.
1133
1134         Old schema uses sizeInBytes method on StringImpl. This method works incorrect for substrings.
1135         Also we'd like to know exact pointers to strings and buffers for verification purposes.
1136
1137         * GNUmakefile.list.am:
1138         * WTF.gypi:
1139         * WTF.pro:
1140         * WTF.vcproj/WTF.vcproj:
1141         * WTF.xcodeproj/project.pbxproj:
1142         * wtf/MemoryInstrumentationArrayBufferView.h:
1143         (WTF):
1144         (WTF::reportMemoryUsage):
1145
1146 2012-09-25  Ilya Tikhonovsky  <loislo@chromium.org>
1147
1148         Web Inspector: extract HashSet instrumentation from core NMI code and put it into MemoryInstrumentationHashSet.h
1149         https://bugs.webkit.org/show_bug.cgi?id=97198
1150
1151         Reviewed by Yury Semikhatsky.
1152
1153         Current implementation has overloads for HashSet.
1154         This prevents us from instrumenting complex cases like Vector<HashSet<...> >.
1155
1156         * GNUmakefile.list.am:
1157         * WTF.gypi:
1158         * WTF.pro:
1159         * WTF.vcproj/WTF.vcproj:
1160         * WTF.xcodeproj/project.pbxproj:
1161         * wtf/HashSet.h:
1162         (WTF):
1163         (HashSet):
1164         * wtf/HashTable.h:
1165         (WTF):
1166         (HashTable):
1167         * wtf/MemoryInstrumentation.h:
1168         (WTF::MemoryClassInfo::addCollectionElements):
1169         (WTF::MemoryClassInfo::addHashCountedSet):
1170         * wtf/MemoryInstrumentationHashSet.h: Added.
1171         (WTF):
1172         (WTF::reportMemoryUsage):
1173         * wtf/MemoryInstrumentationHashTable.h: Added.
1174         (WTF):
1175         (WTF::reportMemoryUsage):
1176
1177 2012-09-26  Yury Semikhatsky  <yurys@chromium.org>
1178
1179         Web Inspector: compare objects counted by the memory instrumentation with those allocated in the heap
1180         https://bugs.webkit.org/show_bug.cgi?id=97641
1181
1182         Reviewed by Pavel Feldman.
1183
1184         Added a method for checking if reported object was actually allocated in the heap.
1185
1186         * wtf/MemoryInstrumentation.h:
1187         (MemoryInstrumentation):
1188         (WTF::MemoryInstrumentation::addObjectImpl):
1189
1190 2012-09-26  Gavin Barraclough  <barraclough@apple.com>
1191
1192         String.localeCompare should normalize input
1193         https://bugs.webkit.org/show_bug.cgi?id=97639
1194
1195         Reviewed by Filip Pizlo.
1196
1197         From the spec: "It is strongly recommended that this function treat Strings that are
1198         canonically equivalent according to the Unicode standard as identical (in other words,
1199         compare the Strings as if they had both been converted to Normalised Form C or D first).
1200         It is also recommended that this function not honour Unicode compatibility equivalences
1201         or decompositions."
1202
1203         * wtf/unicode/icu/CollatorICU.cpp:
1204         (WTF::Collator::createCollator):
1205             - Enable normalization.
1206
1207 2012-09-25  Cosmin Truta  <ctruta@rim.com>
1208
1209         [BlackBerry] Enable LLInt
1210         https://bugs.webkit.org/show_bug.cgi?id=97604
1211
1212         Reviewed by Yong Li.
1213
1214         Set the prefix of LOCAL_LABEL_STRING to ".L" on QNX.
1215
1216         * wtf/InlineASM.h:
1217
1218 2012-09-25  Patrick Gansterer  <paroga@webkit.org>
1219
1220         Do not enable DFG JIT for COMPILER(MSVC).
1221
1222         The current code does not support MSVC inline assembler, so disable it for now.
1223
1224         * wtf/Platform.h:
1225
1226 2012-09-25  Pratik Solanki  <psolanki@apple.com>
1227
1228         Remove HAVE_SBRK since we never set use_sbrk to true
1229         https://bugs.webkit.org/show_bug.cgi?id=97525
1230         <rdar://problem/12363601>
1231
1232         Reviewed by Geoffrey Garen.
1233
1234         The code under HAVE(SBRK) has not been used since 2005. We use mmap not sbrk for FastMalloc
1235         not sbrk. We can just remove the define and move all of this code inside #ifndef
1236         WTF_CHANGES.
1237
1238         * wtf/Platform.h:
1239         * wtf/TCSystemAlloc.cpp:
1240         (TCMalloc_SystemAlloc):
1241
1242 2012-09-25  Mark Lam  <mark.lam@apple.com>
1243
1244         #undef some symbols before redefining them.
1245         https://bugs.webkit.org/show_bug.cgi?id=97568.
1246
1247         Reviewed by Michael Saboff.
1248
1249         * wtf/Platform.h:
1250
1251 2012-09-21  Ilya Tikhonovsky  <loislo@chromium.org>
1252
1253         Web Inspector: extract Vector instrumentation from core NMI code into MemoryInstrumentationVector.h header.
1254         https://bugs.webkit.org/show_bug.cgi?id=96650
1255
1256         Reviewed by Vsevolod Vlasov.
1257
1258         Added reportMemoryUsage free template function with default body to core NMI code
1259         and add custom version of reportMemoryUsage function for Vectors.
1260
1261         * GNUmakefile.list.am:
1262         * WTF.gypi:
1263         * WTF.pro:
1264         * WTF.vcproj/WTF.vcproj:
1265         * WTF.xcodeproj/project.pbxproj:
1266         * wtf/MemoryInstrumentation.h:
1267         (WTF):
1268         (MemoryInstrumentation):
1269         (WTF::MemoryInstrumentation::addObjectImpl):
1270         * wtf/MemoryInstrumentationVector.h: Added.
1271         (WTF):
1272         (WTF::instrumentVectorValues):
1273         (WTF::reportMemoryUsage):
1274
1275 2012-09-24  Mark Lam  <mark.lam@apple.com>
1276
1277         Deleting the classic interpreter and cleaning up some build options.
1278         https://bugs.webkit.org/show_bug.cgi?id=96969.
1279
1280         Reviewed by Geoffrey Garen.
1281
1282         * wtf/OSAllocatorPosix.cpp:
1283         (WTF::OSAllocator::reserveAndCommit):
1284         * wtf/Platform.h:
1285
1286 2012-09-24  Patrick Gansterer  <paroga@webkit.org>
1287
1288         Remove String::operator+=()
1289         https://bugs.webkit.org/show_bug.cgi?id=96172
1290
1291         Reviewed by Benjamin Poulain.
1292
1293         * wtf/Platform.h:
1294         * wtf/text/WTFString.h:
1295
1296 2012-09-24  Benjamin Poulain  <benjamin@webkit.org>
1297
1298         Add support for query encoding to WTFURL
1299         https://bugs.webkit.org/show_bug.cgi?id=97422
1300
1301         Reviewed by Adam Barth.
1302
1303         Expose character conversion through the new abstract class URLQueryCharsetConverter.
1304         URLQueryCharsetConverter is implemented by WebCore to expose the TextEncoding classes.
1305
1306         Unfortunatelly that forces us to bring over URLBuffer in the public API. We may be able
1307         to mitigate that later when moving WTFURL to more templates.
1308
1309         The change fixes 2 of the URL layout tests.
1310
1311         * WTF.xcodeproj/project.pbxproj:
1312         * wtf/url/api/ParsedURL.cpp:
1313         (WTF::ParsedURL::ParsedURL):
1314         * wtf/url/api/ParsedURL.h:
1315         (ParsedURL):
1316         ParsedURL was using the same constructor for ParsedURLString, and URL without a base.
1317         That was a mistake on my part, I did not intend that, fixed it now :)
1318
1319         * wtf/url/api/URLBuffer.h: Renamed from Source/WTF/wtf/url/src/URLBuffer.h.
1320         (URLBuffer):
1321         (WTF::URLBuffer::URLBuffer):
1322         (WTF::URLBuffer::~URLBuffer):
1323         (WTF::URLBuffer::at):
1324         (WTF::URLBuffer::set):
1325         (WTF::URLBuffer::capacity):
1326         (WTF::URLBuffer::length):
1327         (WTF::URLBuffer::data):
1328         (WTF::URLBuffer::setLength):
1329         (WTF::URLBuffer::append):
1330         (WTF::URLBuffer::grow):
1331         * wtf/url/api/URLQueryCharsetConverter.h: Added.
1332         (URLQueryCharsetConverter):
1333         (WTF::URLQueryCharsetConverter::URLQueryCharsetConverter):
1334         (WTF::URLQueryCharsetConverter::~URLQueryCharsetConverter):
1335         * wtf/url/src/URLCanon.h:
1336         (URLCanonicalizer):
1337         * wtf/url/src/URLCanonFilesystemurl.cpp:
1338         (WTF::URLCanonicalizer::canonicalizeFileSystemURL):
1339         (WTF::URLCanonicalizer::ReplaceFileSystemURL):
1340         * wtf/url/src/URLCanonFileurl.cpp:
1341         (WTF::URLCanonicalizer::CanonicalizeFileURL):
1342         (WTF::URLCanonicalizer::ReplaceFileURL):
1343         * wtf/url/src/URLCanonInternal.h:
1344         (URLCanonicalizer):
1345         * wtf/url/src/URLCanonQuery.cpp:
1346         (WTF::URLCanonicalizer::CanonicalizeQuery):
1347         (WTF::URLCanonicalizer::ConvertUTF16ToQueryEncoding):
1348         * wtf/url/src/URLCanonRelative.cpp:
1349         (WTF::URLCanonicalizer::resolveRelativeURL):
1350         * wtf/url/src/URLCanonStdURL.cpp:
1351         (WTF::URLCanonicalizer::CanonicalizeStandardURL):
1352         (WTF::URLCanonicalizer::ReplaceStandardURL):
1353         * wtf/url/src/URLUtil.cpp:
1354         (URLUtilities):
1355         (WTF::URLUtilities::canonicalize):
1356         (WTF::URLUtilities::resolveRelative):
1357         (WTF::URLUtilities::ReplaceComponents):
1358         * wtf/url/src/URLUtil.h:
1359         (URLUtilities):
1360
1361 2012-09-24  Benjamin Poulain  <benjamin@webkit.org>
1362
1363         Integrate most of GoogleURL in WTFURL
1364         https://bugs.webkit.org/show_bug.cgi?id=97405
1365
1366         Reviewed by Adam Barth.
1367
1368         This patch brings almost all of the implementatation of Google-URL in WTFURL
1369         with only minor changes.
1370
1371         The changes from the original code are mostly:
1372         -Code cleaning.
1373         -Replace url_parse::Parsed by URLSegments.
1374         -Replace url_parse::Component by URLComponent
1375         -More code cleaning.
1376         -Adopt URLBuffer and RawURLBuffer instead of the CanonOutputT and RawCanonOutputT.
1377         -Use URLCharacterTypes instead of the litany of characters functions.
1378         -Some more code cleaning.
1379         -Fix the style to match WebKit as much as possible.
1380         -Rename the files to match WebKit style.
1381
1382         * WTF.xcodeproj/project.pbxproj:
1383         * wtf/url/api/ParsedURL.cpp:
1384         (WTF::ParsedURL::ParsedURL):
1385         (WTF::ParsedURL::segment):
1386         * wtf/url/api/ParsedURL.h:
1387         (WTF::ParsedURL::isValid):
1388         * wtf/url/src/RawURLBuffer.h:
1389         * wtf/url/src/URLCanon.h: Added.
1390         (URLCanonicalizer):
1391         (CharsetConverter):
1392         (WTF::URLCanonicalizer::CharsetConverter::CharsetConverter):
1393         (WTF::URLCanonicalizer::CharsetConverter::~CharsetConverter):
1394         (CanonHostInfo):
1395         (WTF::URLCanonicalizer::CanonHostInfo::CanonHostInfo):
1396         (WTF::URLCanonicalizer::CanonHostInfo::IsIPAddress):
1397         (WTF::URLCanonicalizer::CanonHostInfo::AddressLength):
1398         (URLComponentSource):
1399         (WTF::URLCanonicalizer::URLComponentSource::URLComponentSource):
1400         (Replacements):
1401         (WTF::URLCanonicalizer::Replacements::Replacements):
1402         (WTF::URLCanonicalizer::Replacements::SetScheme):
1403         (WTF::URLCanonicalizer::Replacements::IsSchemeOverridden):
1404         (WTF::URLCanonicalizer::Replacements::SetUsername):
1405         (WTF::URLCanonicalizer::Replacements::ClearUsername):
1406         (WTF::URLCanonicalizer::Replacements::IsUsernameOverridden):
1407         (WTF::URLCanonicalizer::Replacements::SetPassword):
1408         (WTF::URLCanonicalizer::Replacements::ClearPassword):
1409         (WTF::URLCanonicalizer::Replacements::IsPasswordOverridden):
1410         (WTF::URLCanonicalizer::Replacements::SetHost):
1411         (WTF::URLCanonicalizer::Replacements::ClearHost):
1412         (WTF::URLCanonicalizer::Replacements::IsHostOverridden):
1413         (WTF::URLCanonicalizer::Replacements::SetPort):
1414         (WTF::URLCanonicalizer::Replacements::ClearPort):
1415         (WTF::URLCanonicalizer::Replacements::IsPortOverridden):
1416         (WTF::URLCanonicalizer::Replacements::SetPath):
1417         (WTF::URLCanonicalizer::Replacements::ClearPath):
1418         (WTF::URLCanonicalizer::Replacements::IsPathOverridden):
1419         (WTF::URLCanonicalizer::Replacements::SetQuery):
1420         (WTF::URLCanonicalizer::Replacements::ClearQuery):
1421         (WTF::URLCanonicalizer::Replacements::IsQueryOverridden):
1422         (WTF::URLCanonicalizer::Replacements::SetRef):
1423         (WTF::URLCanonicalizer::Replacements::ClearRef):
1424         (WTF::URLCanonicalizer::Replacements::IsRefOverridden):
1425         (WTF::URLCanonicalizer::Replacements::sources):
1426         (WTF::URLCanonicalizer::Replacements::components):
1427         (WTF::URLCanonicalizer::Replacements::Placeholder):
1428         * wtf/url/src/URLCanonEtc.cpp: Added.
1429         (WTF::URLCanonicalizer::removeURLWhitespace):
1430         (URLCanonicalizer):
1431         (WTF::URLCanonicalizer::canonicalSchemeChar):
1432         (WTF::URLCanonicalizer::CanonicalizeScheme):
1433         (WTF::URLCanonicalizer::CanonicalizeUserInfo):
1434         (WTF::URLCanonicalizer::CanonicalizePort):
1435         (WTF::URLCanonicalizer::CanonicalizeRef):
1436         * wtf/url/src/URLCanonFilesystemurl.cpp: Added.
1437         (WTF::URLCanonicalizer::CanonicalizeFileSystemURL):
1438         (URLCanonicalizer):
1439         (WTF::URLCanonicalizer::ReplaceFileSystemURL):
1440         * wtf/url/src/URLCanonFileurl.cpp: Added.
1441         (WTF::URLCanonicalizer::CanonicalizeFileURL):
1442         (URLCanonicalizer):
1443         (WTF::URLCanonicalizer::FileCanonicalizePath):
1444         (WTF::URLCanonicalizer::ReplaceFileURL):
1445         * wtf/url/src/URLCanonHost.cpp: Added.
1446         (WTF::URLCanonicalizer::CanonicalizeHost):
1447         (URLCanonicalizer):
1448         (WTF::URLCanonicalizer::CanonicalizeHostVerbose):
1449         * wtf/url/src/URLCanonICU.cpp: Added.
1450         (WTF::URLCanonicalizer::IDNToASCII):
1451         (URLCanonicalizer):
1452         (WTF::URLCanonicalizer::readUTFChar):
1453         * wtf/url/src/URLCanonIP.cpp: Added.
1454         (WTF::URLCanonicalizer::CanonicalizeIPAddress):
1455         (URLCanonicalizer):
1456         * wtf/url/src/URLCanonInternal.cpp: Added.
1457         (URLCanonicalizer):
1458         (WTF::URLCanonicalizer::AppendInvalidNarrowString):
1459         (WTF::URLCanonicalizer::ConvertUTF16ToUTF8):
1460         (WTF::URLCanonicalizer::ConvertUTF8ToUTF16):
1461         (WTF::URLCanonicalizer::SetupOverrideComponents):
1462         (WTF::URLCanonicalizer::SetupUTF16OverrideComponents):
1463         (WTF::URLCanonicalizer::_itoa_s):
1464         (WTF::URLCanonicalizer::_itow_s):
1465         * wtf/url/src/URLCanonInternal.h: Added.
1466         (URLCanonicalizer):
1467         (WTF::URLCanonicalizer::hexCharToValue):
1468         (WTF::URLCanonicalizer::isDot):
1469         (WTF::URLCanonicalizer::appendURLEscapedCharacter):
1470         (WTF::URLCanonicalizer::doAppendUTF8):
1471         (WTF::URLCanonicalizer::AppendCharToOutput):
1472         (WTF::URLCanonicalizer::AppendUTF8Value):
1473         (WTF::URLCanonicalizer::AppendUTF8EscapedValue):
1474         (WTF::URLCanonicalizer::AppendUTF16Value):
1475         (WTF::URLCanonicalizer::AppendUTF8EscapedChar):
1476         (WTF::URLCanonicalizer::Is8BitChar):
1477         (WTF::URLCanonicalizer::DecodeEscaped):
1478         (WTF::URLCanonicalizer::_itoa_s):
1479         (WTF::URLCanonicalizer::_itow_s):
1480         (WTF::URLCanonicalizer::_strtoui64):
1481         * wtf/url/src/URLCanonMailto.cpp: Added.
1482         (WTF::URLCanonicalizer::CanonicalizeMailtoURL):
1483         (URLCanonicalizer):
1484         (WTF::URLCanonicalizer::ReplaceMailtoURL):
1485         * wtf/url/src/URLCanonPath.cpp: Added.
1486         (WTF::URLCanonicalizer::CanonicalizePath):
1487         (URLCanonicalizer):
1488         (WTF::URLCanonicalizer::CanonicalizePartialPath):
1489         * wtf/url/src/URLCanonPathurl.cpp: Added.
1490         (WTF::URLCanonicalizer::canonicalizePathURL):
1491         (URLCanonicalizer):
1492         (WTF::URLCanonicalizer::ReplacePathURL):
1493         * wtf/url/src/URLCanonQuery.cpp: Added.
1494         (WTF::URLCanonicalizer::CanonicalizeQuery):
1495         (URLCanonicalizer):
1496         (WTF::URLCanonicalizer::ConvertUTF16ToQueryEncoding):
1497         * wtf/url/src/URLCanonRelative.cpp: Added.
1498         (WTF::URLCanonicalizer::isRelativeURL):
1499         (URLCanonicalizer):
1500         (WTF::URLCanonicalizer::resolveRelativeURL):
1501         * wtf/url/src/URLCanonStdURL.cpp: Added.
1502         (WTF::URLCanonicalizer::DefaultPortForScheme):
1503         (URLCanonicalizer):
1504         (WTF::URLCanonicalizer::CanonicalizeStandardURL):
1505         (WTF::URLCanonicalizer::ReplaceStandardURL):
1506         * wtf/url/src/URLCharacterTypes.cpp:
1507         * wtf/url/src/URLCharacterTypes.h:
1508         (WTF::URLCharacterTypes::isComponentChar):
1509         (WTF::URLCharacterTypes::isHexChar):
1510         (WTF::URLCharacterTypes::isIPv4Char):
1511         (WTF::URLCharacterTypes::isQueryChar):
1512         (WTF::URLCharacterTypes::isCharacterOfType):
1513         (URLCharacterTypes):
1514         * wtf/url/src/URLEscape.cpp: Removed.
1515         * wtf/url/src/URLFile.h: Added.
1516         (URLParser):
1517         (WTF::URLParser::isWindowsDriveSeparator):
1518         (WTF::URLParser::isWindowsDriveLetter):
1519         (WTF::URLParser::findNextSlash):
1520         (WTF::URLParser::doesBeginWindowsDriveSpec):
1521         (WTF::URLParser::doesBeginUNCPath):
1522         * wtf/url/src/URLParse.cpp: Added.
1523         (WTF::URLParser::ExtractScheme):
1524         (URLParser):
1525         (WTF::URLParser::IsAuthorityTerminator):
1526         (WTF::URLParser::ExtractFileName):
1527         (WTF::URLParser::ExtractQueryKeyValue):
1528         (WTF::URLParser::ParseAuthority):
1529         (WTF::URLParser::ParsePort):
1530         (WTF::URLParser::ParseStandardURL):
1531         (WTF::URLParser::ParsePathURL):
1532         (WTF::URLParser::ParseFileSystemURL):
1533         (WTF::URLParser::ParseMailtoURL):
1534         (WTF::URLParser::parsePathInternal):
1535         (WTF::URLParser::ParseAfterScheme):
1536         * wtf/url/src/URLParse.h: Added.
1537         (URLParser):
1538         * wtf/url/src/URLParseFile.cpp: Added.
1539         (WTF):
1540         (WTF::URLParser::ParseFileURL):
1541         (URLParser):
1542         * wtf/url/src/URLParseInternal.h: Added.
1543         (URLParser):
1544         (WTF::URLParser::isURLSlash):
1545         (WTF::URLParser::shouldTrimFromURL):
1546         (WTF::URLParser::trimURL):
1547         (WTF::URLParser::countConsecutiveSlashes):
1548         * wtf/url/src/URLParser.h: Removed.
1549         * wtf/url/src/URLQueryCanonicalizer.h: Removed.
1550         * wtf/url/src/URLSegments.cpp:
1551         * wtf/url/src/URLSegments.h:
1552         (WTF::URLSegments::URLSegments):
1553         (URLSegments):
1554         (WTF::URLSegments::operator=):
1555         (WTF::URLSegments::innerURLSegments):
1556         (WTF::URLSegments::setInnerURLSegments):
1557         (WTF::URLSegments::clearInnerURLSegments):
1558         * wtf/url/src/URLUtil.cpp: Added.
1559         (URLUtilities):
1560         (WTF::URLUtilities::IsStandard):
1561         (WTF::URLUtilities::FindAndCompareScheme):
1562         (WTF::URLUtilities::Canonicalize):
1563         (WTF::URLUtilities::resolveRelative):
1564         (WTF::URLUtilities::ReplaceComponents):
1565         (WTF::URLUtilities::LowerCaseEqualsASCII):
1566         (WTF::URLUtilities::DecodeURLEscapeSequences):
1567         (WTF::URLUtilities::EncodeURIComponent):
1568         (WTF::URLUtilities::CompareSchemeComponent):
1569         * wtf/url/src/URLUtil.h: Added.
1570         (URLUtilities):
1571         * wtf/url/src/URLUtilInternal.h: Renamed from Source/WTF/wtf/url/src/URLEscape.h.
1572         (URLUtilities):
1573
1574 2012-09-24  Joone Hur  <joone.hur@intel.com>
1575
1576         [GTK] Implement GraphicsLayer using Clutter
1577         https://bugs.webkit.org/show_bug.cgi?id=73767
1578
1579         Reviewed by Martin Robinson.
1580
1581         Add ClutterActor and GraphicsLayerActor to GTypedefs.h.
1582
1583         * wtf/gobject/GTypedefs.h:
1584
1585 2012-09-23  Byungwoo Lee  <bw80.lee@gmail.com>
1586
1587         Fix build warnings : -Wunused-parameter, -Wparentheses, -Wuninitialized.
1588         https://bugs.webkit.org/show_bug.cgi?id=97306
1589
1590         Reviewed by Benjamin Poulain.
1591
1592         Fix build warning about -Wunused-parameter on FastMalloc.cpp,
1593         OSAllocatorPosix.cpp by using UNUSED_PARAM() macro.
1594         Fix header including order of FastMalloc.cpp.
1595
1596         * wtf/FastMalloc.cpp:
1597         (WTF::fastMallocSize):
1598         * wtf/OSAllocatorPosix.cpp:
1599         (WTF::OSAllocator::reserveAndCommit):
1600
1601 2012-09-22  Sam Weinig  <sam@webkit.org>
1602
1603         Add explicit conversion operator to RetainPtr for easier use in C++11 environments
1604         https://bugs.webkit.org/show_bug.cgi?id=97403
1605
1606         Reviewed by Dan Bernstein.
1607
1608         * wtf/Compiler.h:
1609         Add support for COMPILER_SUPPORTS(CXX_EXPLICIT_CONVERSIONS)
1610
1611         * wtf/RetainPtr.h:
1612         (RetainPtr):
1613         (WTF::RetainPtr::get):
1614         (WTF::RetainPtr::operator PtrType):
1615         Add the explicit conversion operator and group all the underlying
1616         pointer accessors together.
1617
1618 2012-09-21  Simon Hausmann  <simon.hausmann@digia.com>
1619
1620         [Qt] Error out early if we don't have ICU available
1621
1622         Reviewed by Tor Arne Vestbø.
1623
1624         * WTF.pri:
1625
1626 2012-09-20  Patrick Gansterer  <paroga@webkit.org>
1627
1628         Add String::numberToStringFixedWidth()
1629         https://bugs.webkit.org/show_bug.cgi?id=96330
1630
1631         Reviewed by Benjamin Poulain.
1632
1633         Add this new function as replacement for the ShouldRoundDecimalPlaces flag of String::number()
1634         and remove the now unnecessary branch in String::number() for the old flags.
1635
1636         * wtf/text/WTFString.cpp:
1637         (WTF::String::number):
1638         (WTF::String::numberToStringFixedWidth):
1639         * wtf/text/WTFString.h:
1640
1641 2012-09-19  Geoffrey Garen  <ggaren@apple.com>
1642
1643         OSR exit sometimes neglects to create the arguments object
1644         https://bugs.webkit.org/show_bug.cgi?id=97162
1645
1646         Reviewed by Filip Pizlo.
1647
1648         * wtf/HashTraits.h:
1649         (NullableHashTraits):
1650         (WTF::NullableHashTraits::emptyValue):
1651         (WTF):
1652
1653 2012-09-18  Glenn Adams  <glenn@skynav.com>
1654
1655         WTFString::show doesn't dump non-ASCII characters in a readable manner
1656         https://bugs.webkit.org/show_bug.cgi?id=96749
1657
1658         Reviewed by Benjamin Poulain.
1659
1660         Dump non-ASCII characters in a useful form for debugging.
1661
1662         * wtf/text/WTFString.cpp:
1663         (asciiDebug):
1664         Dump non-ASCII characters (i.e., UTF-16 code elements) as well as non-printable ASCII characters
1665         using \uXXXX format. Also escape \ as \\ in order to remove ambiguity.
1666
1667 2012-09-18  Mark Hahnenberg  <mhahnenberg@apple.com>
1668
1669         Use WTF::HasTrivialDestructor instead of compiler-specific versions in JSC::NeedsDestructor
1670         https://bugs.webkit.org/show_bug.cgi?id=96980
1671
1672         Reviewed by Benjamin Poulain.
1673
1674         * wtf/TypeTraits.h:
1675         (WTF):
1676
1677 2012-09-17  Glenn Adams  <glenn@skynav.com>
1678
1679         Including HexNumber.h fails build if hexDigitsForMode is not referenced
1680         https://bugs.webkit.org/show_bug.cgi?id=96873
1681
1682         Reviewed by Benjamin Poulain.
1683
1684         Ensure release build is possible when hexDigitsForMode is not referenced by
1685         template expansion.
1686
1687         * wtf/HexNumber.h:
1688         (WTF::Internal::hexDigitsForMode):
1689         Change hexDigitsForMode to inline (rather than static). Make string literals
1690         {lower,upper}HexDigits non-local and non-static, but const, to which the linker
1691         should merge references in the RO data segment.
1692
1693 2012-09-17  Filip Pizlo  <fpizlo@apple.com>
1694
1695         The ThreadRescrictionVerifier should be more forcibly disabled on systems that use threads
1696         https://bugs.webkit.org/show_bug.cgi?id=96957
1697
1698         Reviewed by Oliver Hunt.
1699
1700         * wtf/ThreadRestrictionVerifier.h:
1701         (WTF):
1702         (WTF::ThreadRestrictionVerifier::ThreadRestrictionVerifier):
1703         (ThreadRestrictionVerifier):
1704         (WTF::ThreadRestrictionVerifier::setMutexMode):
1705         (WTF::ThreadRestrictionVerifier::setDispatchQueueMode):
1706         (WTF::ThreadRestrictionVerifier::turnOffVerification):
1707         (WTF::ThreadRestrictionVerifier::setShared):
1708         (WTF::ThreadRestrictionVerifier::isSafeToUse):
1709
1710 2012-09-17  Sheriff Bot  <webkit.review.bot@gmail.com>
1711
1712         Unreviewed, rolling out r128796.
1713         http://trac.webkit.org/changeset/128796
1714         https://bugs.webkit.org/show_bug.cgi?id=96966
1715
1716         It broke everything (Requested by Ossy_NIGHT on #webkit).
1717
1718         * wtf/OSAllocatorPosix.cpp:
1719         (WTF::OSAllocator::reserveUncommitted):
1720         (WTF::OSAllocator::reserveAndCommit):
1721         (WTF::OSAllocator::commit):
1722         (WTF::OSAllocator::decommit):
1723
1724 2012-09-17  Uli Schlachter  <psychon@znc.in>
1725
1726         Implement uncommitted memory for Linux.
1727         https://bugs.webkit.org/show_bug.cgi?id=65766
1728
1729         Reviewed by Gavin Barraclough.
1730
1731         The old approach used MAP_NORESERVE to allocate address space without
1732         committing it. However, that flag gets ignored if
1733         /proc/sys/vm/overcommit_memory is set to 2. The new approach uses a
1734         mapping with PROT_NONE. This works because mappings which aren't even
1735         readable don't get accounted as committed on Linux.
1736
1737         * wtf/OSAllocatorPosix.cpp:
1738         (WTF::OSAllocator::reserveUncommitted):
1739         (WTF::OSAllocator::reserveAndCommit):
1740         (WTF::OSAllocator::commit):
1741         (WTF::OSAllocator::decommit):
1742
1743 2012-09-17  Filip Pizlo  <fpizlo@apple.com>
1744
1745         Array profiling has convergence issues
1746         https://bugs.webkit.org/show_bug.cgi?id=96891
1747
1748         Reviewed by Gavin Barraclough.
1749
1750         Added functions for testing if something is a power of 2.
1751
1752         * wtf/MathExtras.h:
1753         (hasZeroOrOneBitsSet):
1754         (hasTwoOrMoreBitsSet):
1755
1756 2012-09-17  Ilya Tikhonovsky  <loislo@chromium.org>
1757
1758         Web Inspector: NMI: now when we can detect instrumented classes we can
1759         remove addInstrumentedMember and use addMember for everything.
1760         https://bugs.webkit.org/show_bug.cgi?id=96913
1761
1762         Reviewed by Yury Semikhatsky.
1763
1764         * wtf/MemoryInstrumentation.h:
1765         (WTF::MemoryInstrumentation::addRootObject):
1766         (WTF::MemoryInstrumentation::addObject):
1767         (WTF::MemoryInstrumentation::addObjectImpl):
1768         (WTF):
1769         (WTF::MemoryInstrumentation::addInstrumentedCollection):
1770         (WTF::MemoryInstrumentation::addInstrumentedMapEntries):
1771         (WTF::MemoryInstrumentation::addInstrumentedMapValues):
1772         * wtf/text/AtomicString.cpp:
1773         (WTF::AtomicString::reportMemoryUsage):
1774         * wtf/text/CString.h:
1775         (WTF::CString::reportMemoryUsage):
1776         * wtf/text/StringImpl.cpp:
1777         (WTF::StringImpl::reportMemoryUsage):
1778         * wtf/text/WTFString.cpp:
1779         (WTF::String::reportMemoryUsage):
1780         * wtf/url/api/ParsedURL.cpp:
1781         (WTF::ParsedURL::reportMemoryUsage):
1782         * wtf/url/api/URLString.cpp:
1783         (WTF::URLString::reportMemoryUsage):
1784
1785 2012-09-17  Ilya Tikhonovsky  <loislo@chromium.org>
1786
1787         Unreviewed compilation fix.
1788
1789         * wtf/MemoryInstrumentation.h:
1790         (WTF::MemoryInstrumentation::reportObjectMemoryUsage):
1791
1792 2012-09-15  Yury Semikhatsky  <yurys@chromium.org>
1793
1794         Web Inspector: automatically detect if class has reportMemoryUsage method
1795         https://bugs.webkit.org/show_bug.cgi?id=96756
1796
1797         Reviewed by Alexander Pavlov.
1798
1799         Implemeted automatic selector of the memory reporting method. If
1800         an object has reportMemoryUsage method then call it. Otherwise
1801         count only object's self size. As the next step we will delete
1802         addInstrumentedMember and addInstrumentedObjectImpl and will
1803         have only addMember and addObjectImpl that would automatically
1804         call reportMemoryUsage if it is present.
1805
1806         * wtf/MemoryInstrumentation.h:
1807         (WTF::MemoryInstrumentation::selectInstrumentationMethod):
1808         (MemoryInstrumentation):
1809         (WTF::MemoryInstrumentation::reportObjectMemoryUsage):
1810         (WTF::MemoryInstrumentation::addInstrumentedObjectImpl):
1811         (WTF::MemoryInstrumentation::addObjectImpl):
1812         (WTF::::process):
1813
1814 2012-09-14  Yury Semikhatsky  <yurys@chromium.org>
1815
1816         Web Inspector: OwnPtr and RefPtr reported by pointer can be double counted by the memory instrumentation
1817         https://bugs.webkit.org/show_bug.cgi?id=96791
1818
1819         Reviewed by Alexander Pavlov.
1820
1821         * wtf/MemoryInstrumentation.h:
1822         (WTF::MemoryInstrumentation::addObjectImpl): check if the smart pointer has already
1823         been visited before counting its size.
1824
1825 2012-09-15  Benjamin Poulain  <benjamin@webkit.org>
1826
1827         Fix the build with WTF URL
1828         https://bugs.webkit.org/show_bug.cgi?id=96875
1829
1830         Reviewed by Adam Barth.
1831
1832         Add support for MemoryInstrumentation to WTF's URL classes.
1833
1834         * wtf/url/api/ParsedURL.cpp:
1835         (WTF::ParsedURL::reportMemoryUsage):
1836         * wtf/url/api/ParsedURL.h:
1837         (ParsedURL):
1838         * wtf/url/api/URLString.cpp:
1839         (WTF::URLString::reportMemoryUsage):
1840         * wtf/url/api/URLString.h:
1841         (URLString):
1842
1843 2012-09-15  Raphael Kubo da Costa  <rakuco@FreeBSD.org>
1844
1845         llint: Implement LOCAL_LABEL_STRING for the BSD platforms.
1846         https://bugs.webkit.org/show_bug.cgi?id=96870
1847
1848         Reviewed by Filip Pizlo.
1849
1850         * wtf/InlineASM.h: Extend the definition of LOCAL_LABEL_STRING
1851         currently used for OS(LINUX) to the BSDs, since they also normally
1852         use GNU as, and clang/llvm seems to parse that syntax just fine as
1853         well.
1854
1855 2012-09-14  Alexey Proskuryakov  <ap@apple.com>
1856
1857         Minimize collisions when hashing pairs
1858         https://bugs.webkit.org/show_bug.cgi?id=96022
1859
1860         Build fix (with newer clang?)
1861
1862         * wtf/HashFunctions.h: (WTF::pairIntHash): Be explicit about casting from
1863         64 bit to 32 bit.
1864
1865 2012-09-14  Dana Jansens  <danakj@chromium.org>
1866
1867         Minimize collisions when hashing pairs
1868         https://bugs.webkit.org/show_bug.cgi?id=96022
1869
1870         Reviewed by Adrienne Walker.
1871
1872         The current hash function for pairs has poor performance as it does a
1873         nice hash function on 64 bits, but then just drops the top 32 bits. The
1874         hash method for pairs tries to use Thomas Wang's 64 bit Mix Function,
1875         but this requires not dropping any bits in order to retain the
1876         characteristics mentioned by Thomas.
1877
1878         A better method of hashing sets of 32-bit integers is to use
1879         multiplication in 64 bits with random integers. This method is a
1880         provably almost-universal hash function. Testing shows that this
1881         method decreases the time required, when compared with the current
1882         method, by more than 20% due to better hashing characteristics.
1883
1884         * wtf/HashFunctions.h:
1885         (WTF):
1886         (WTF::pairIntHash):
1887         Implments the hashing method for a pair of unsigned integers.
1888
1889         (WTF::PairHash::hash):
1890         Use pairIntHash() on the hash results of each object in the pair.
1891
1892         (WTF::IntPairHash::hash):
1893         Implement an integer-specific PairHash class that does not need to
1894         hash each object in the pair. It uses pairIntHash on the two
1895         integers in the pair directly.
1896
1897         (WTF::IntPairHash::equal):
1898         (IntPairHash):
1899
1900 2012-09-14  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
1901
1902         [Qt] Make force_static_libs_as_shared work on Mac OS
1903
1904         We had to move a few LIBS += around that were in the wrong place,
1905         and not caught when everything was just linked into the final
1906         QtWebKit library.
1907
1908         Reviewed by Simon Hausmann.
1909
1910         * WTF.pri:
1911
1912 2012-09-14  Ilya Tikhonovsky  <loislo@chromium.org>
1913
1914         Web Inspector: NMI: convert template versions of String*::reportMemoryUsage functions to normal functions.
1915         https://bugs.webkit.org/show_bug.cgi?id=96759
1916
1917         Reviewed by Yury Semikhatsky.
1918
1919         Now when MemoryInstrumentation.h is a part of WTF we can move reportMemoryUsage functions to cpp file.
1920
1921         * wtf/text/AtomicString.cpp:
1922         (WTF::AtomicString::reportMemoryUsage):
1923         (WTF):
1924         * wtf/text/AtomicString.h:
1925         (WTF):
1926         (AtomicString):
1927         * wtf/text/StringImpl.cpp:
1928         (WTF::StringImpl::reportMemoryUsage):
1929         (WTF):
1930         * wtf/text/StringImpl.h:
1931         (WTF):
1932         (StringImpl):
1933         * wtf/text/WTFString.cpp:
1934         (WTF::String::reportMemoryUsage):
1935         (WTF):
1936         * wtf/text/WTFString.h:
1937         (WTF):
1938         (String):
1939
1940 2012-09-14  Ilya Tikhonovsky  <loislo@chromium.org>
1941
1942         Web Inspector: NMI: remove current traits helper class because it is customizing the instrumentation at a wrong place and is not necessary at the moment.
1943         https://bugs.webkit.org/show_bug.cgi?id=96737
1944
1945         Reviewed by Yury Semikhatsky.
1946
1947         * wtf/MemoryInstrumentation.h:
1948         (MemoryInstrumentation):
1949         WTF::MemoryInstrumentationTraits): removed
1950         (WTF::MemoryInstrumentation::OwningTraits::addInstrumentedObject): direct call inserted
1951         (WTF::MemoryInstrumentation::OwningTraits::addObject):direct call inserted
1952
1953 2012-09-13  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1954
1955         Evas_Object* is a ref'ed structure, so tread it as such
1956         https://bugs.webkit.org/show_bug.cgi?id=96659
1957
1958         Reviewed by Gyuyoung Kim.
1959
1960         Remove OwnPtr support for Evas_Object* and add support for it
1961         with RefPtr instead (the latter moved from WebCore).
1962
1963         * wtf/PlatformEfl.cmake:
1964         * wtf/efl/OwnPtrEfl.cpp:
1965         * wtf/efl/RefPtrEfl.cpp: Renamed from Source/WebCore/platform/efl/RefPtrEfl.cpp.
1966         (WTF):
1967         (WTF::refIfNotNull):
1968         (WTF::derefIfNotNull):
1969         * wtf/efl/RefPtrEfl.h: Renamed from Source/WebCore/platform/efl/RefPtrEfl.h.
1970         (WTF):
1971
1972 2012-09-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1973
1974         Unreviewed, rolling out r128507.
1975         http://trac.webkit.org/changeset/128507
1976         https://bugs.webkit.org/show_bug.cgi?id=96659
1977
1978         Revert. r128507 makes too many crash in EFL layout test bots.
1979
1980         * wtf/PlatformEfl.cmake:
1981         * wtf/efl/OwnPtrEfl.cpp:
1982         (WTF::deleteOwnedPtr):
1983         (WTF):
1984
1985 2012-09-13  Kevin Funk  <kevin.funk@kdab.com>
1986
1987         Make compile with both OS(WINCE) and PLATFORM(QT) support
1988         https://bugs.webkit.org/show_bug.cgi?id=95536
1989
1990         Reviewed by Simon Hausmann.
1991
1992         Fixes for Windows CE.
1993
1994         * WTF.pri:
1995         Also include path for mt19937ar.c
1996         * wtf/unicode/icu/CollatorICU.cpp:
1997         Fix undeclared strdup() on CE7
1998         * wtf/Platform.h:
1999
2000 2012-09-13  Byungseon Shin  <xingri@gmail.com>
2001
2002         Fix for WTF fails to compile in thumb mode when llint is enabled.
2003         https://bugs.webkit.org/show_bug.cgi?id=96400
2004
2005         Reviewed by Filip Pizlo.
2006
2007         When using "+m" with Armv7 cross compiler assume offset range between +/- 4095
2008         (the largest possible offset range).
2009         However, ldrex/strex can only use offset range of 0~1020, so "+m" needed to be changed to "+Q".
2010         Ref. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54480
2011
2012         * wtf/Atomics.h:
2013         (WTF::weakCompareAndSwap):
2014
2015 2012-09-13  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2016
2017         Evas_Object* is a ref'ed structure, so tread it as such
2018         https://bugs.webkit.org/show_bug.cgi?id=96659
2019
2020         Reviewed by Adam Barth.
2021
2022         Remove OwnPtr support for Evas_Object* and add support for it
2023         with RefPtr instead (the latter moved from WebCore).
2024
2025         * wtf/PlatformEfl.cmake:
2026         * wtf/efl/OwnPtrEfl.cpp:
2027         * wtf/efl/RefPtrEfl.cpp: Renamed from Source/WebCore/platform/efl/RefPtrEfl.cpp.
2028         (WTF):
2029         (WTF::refIfNotNull):
2030         (WTF::derefIfNotNull):
2031         * wtf/efl/RefPtrEfl.h: Renamed from Source/WebCore/platform/efl/RefPtrEfl.h.
2032         (WTF):
2033
2034 2012-09-13  Michael Saboff  <msaboff@apple.com>
2035
2036         Added 8 bit path to WidthIterator::advance()
2037         https://bugs.webkit.org/show_bug.cgi?id=96590
2038
2039         Reviewed by Geoffrey Garen.
2040
2041         Added new character constant for Hiragana Letter Small A.
2042
2043         * wtf/unicode/CharacterNames.h:
2044         (Unicode):
2045
2046 2012-09-13  Ilya Tikhonovsky  <loislo@chromium.org>
2047
2048         Web Inspector: NMI: instrument KURL directly.
2049         https://bugs.webkit.org/show_bug.cgi?id=96624
2050
2051         Reviewed by Yury Semikhatsky.
2052
2053         I replaced traits based instrumentation of KURL with reportMemoryUsage functions.
2054         CString* were also instrumented.
2055
2056         Drive by fix: Instrumentation code in QualifiedName was moved to cpp.
2057
2058         * wtf/text/CString.h:
2059         (CStringBuffer):
2060         (WTF::CStringBuffer::reportMemoryUsage):
2061         (CString):
2062         (WTF::CString::reportMemoryUsage):
2063
2064 2012-09-12  Ilya Tikhonovsky  <loislo@chromium.org>
2065
2066         Web Inspector: NMI: migrate core instrumentation code to WTF namespace
2067         https://bugs.webkit.org/show_bug.cgi?id=96511
2068
2069         Reviewed by Yury Semikhatsky.
2070
2071         After moving core NMI code to WTF namespace I removed forward declarations
2072         of MemoryObjectInfo and MemoryInstrumentation from WebCore headers and add
2073         forward declaration into wtf/Forward.h
2074
2075         * wtf/Forward.h:
2076         (WTF):
2077         * wtf/MemoryInstrumentation.h:
2078
2079 2012-09-12  Dan Bernstein  <mitz@apple.com>
2080
2081         Removed a reference to a file that doesn’t participate in any target.
2082
2083         * WTF.xcodeproj/project.pbxproj: Removed the reference to
2084         CONTRIBUTORS.pthreads-win32.
2085
2086 2012-09-11  Michael Saboff  <msaboff@apple.com>
2087
2088         Element::classAttributeChanged should use characters8/16 to find first non-whitespace
2089         https://bugs.webkit.org/show_bug.cgi?id=96446
2090
2091         Reviewed by Benjamin Poulain.
2092
2093         Added bit size related string accessors to AtomicString to support change.
2094
2095         * wtf/text/AtomicString.h:
2096         (AtomicString):
2097         (WTF::AtomicString::is8Bit):
2098         (WTF::AtomicString::characters8):
2099         (WTF::AtomicString::characters16):
2100
2101 2012-09-12  Michael Saboff  <msaboff@apple.com>
2102
2103         Build fixed for http://trac.webkit.org/changeset/128243
2104
2105         Unreviewed build fix.
2106
2107         Removed temporarily added function signature.
2108
2109         * icu/unicode/unistr.h:
2110         (UnicodeString::extract):
2111
2112 2012-09-12  Michael Saboff  <msaboff@apple.com>
2113
2114         Build fixed for http://trac.webkit.org/changeset/128243
2115
2116         Unreviewed build fix.
2117
2118         Change UnicodeString::extract for gcc based on ICU fix described in
2119         http://bugs.icu-project.org/trac/ticket/8197.
2120
2121         * icu/unicode/unistr.h:
2122         (UnicodeString::extract):
2123
2124 2012-09-12  Ilya Tikhonovsky  <loislo@chromium.org>
2125
2126         Web Inspector: NMI move String* instrumentation to wtf.
2127         https://bugs.webkit.org/show_bug.cgi?id=96405
2128
2129         Reviewed by Yury Semikhatsky.
2130
2131         This instrumentation is solving the problem with substrings and removes traits based code which is hard to upstream.
2132
2133         Tested by webkit_unit_tests.
2134
2135         * wtf/text/AtomicString.h:
2136         (AtomicString):
2137         (WTF::AtomicString::reportMemoryUsage):
2138         * wtf/text/StringImpl.h:
2139         (StringImpl):
2140         (WTF::StringImpl::reportMemoryUsage):
2141         * wtf/text/WTFString.h:
2142         (String):
2143         (WTF::String::reportMemoryUsage):
2144
2145 2012-09-12  Sheriff Bot  <webkit.review.bot@gmail.com>
2146
2147         Unreviewed, rolling out r128279.
2148         http://trac.webkit.org/changeset/128279
2149         https://bugs.webkit.org/show_bug.cgi?id=96487
2150
2151         "Snow Leopard compilation broken" (Requested by yurys on
2152         #webkit).
2153
2154         * wtf/MemoryInstrumentation.h:
2155         (GenericMemoryTypes):
2156         (WebCore):
2157         (WebCore::MemoryInstrumentation::addRootObject):
2158         (WebCore::MemoryObjectInfo::reportObjectInfo):
2159         (WebCore::MemoryClassInfo::MemoryClassInfo):
2160         * wtf/text/AtomicString.h:
2161         (AtomicString):
2162         * wtf/text/StringImpl.h:
2163         * wtf/text/WTFString.h:
2164
2165 2012-09-12  Yury Semikhatsky  <yurys@chromium.org>
2166
2167         Web Inspector: Persistent handle referenced from ScriptWrappable is double counted
2168         https://bugs.webkit.org/show_bug.cgi?id=96483
2169
2170         Reviewed by Alexander Pavlov.
2171
2172         * wtf/MemoryInstrumentation.h:
2173         (WebCore::MemoryClassInfo::addWeakPointer): this method is expected to be
2174         used on fields that are pointers to objects which are parts of bigger memory
2175         blocks (field of another object, element in an array, object allocated in a
2176         memory arena etc.). We don't want to count such objects' memory separately
2177         from their owners but in order to be able to validates the memory instrumentation
2178         with clang plugin we need to make sure all fields in instrumented objects
2179         are reported.
2180         (MemoryClassInfo):
2181
2182 2012-09-12  Ilya Tikhonovsky  <loislo@chromium.org>
2183
2184         Web Inspector: NMI move String* instrumentation to wtf.
2185         https://bugs.webkit.org/show_bug.cgi?id=96405
2186
2187         Reviewed by Yury Semikhatsky.
2188
2189         This instrumentation is solving the problem with substrings and removes traits based code which is hard to upstream.
2190
2191         Tested by webkit_unit_tests.
2192
2193         * wtf/MemoryInstrumentation.h:
2194         (WebCore):
2195         (WebCore::MemoryInstrumentation::addRootObject):
2196         (WebCore::MemoryObjectInfo::reportObjectInfo):
2197         (WebCore::MemoryClassInfo::MemoryClassInfo):
2198         * wtf/text/AtomicString.h:
2199         (AtomicString):
2200         (WTF::AtomicString::reportMemoryUsage):
2201         * wtf/text/StringImpl.h:
2202         (StringImpl):
2203         (WTF::StringImpl::reportMemoryUsage):
2204         * wtf/text/WTFString.h:
2205         (String):
2206         (WTF::String::reportMemoryUsage):
2207
2208 2012-09-11  Michael Saboff  <msaboff@apple.com>
2209
2210         Build fixed for http://trac.webkit.org/changeset/128243
2211
2212         Unreviewed build fix.
2213
2214         Added missing include file needed by 96422 for C++ ICU APIs.
2215
2216         * icu/unicode/bytestream.h: Added.
2217         * icu/unicode/rep.h: Added.
2218         * icu/unicode/std_string.h: Added.
2219         * icu/unicode/strenum.h: Added.
2220         * icu/unicode/stringpiece.h: Added.
2221         * icu/unicode/unistr.h: Added.
2222         * icu/unicode/uobject.h: Added.
2223
2224 2012-09-11  Michael Saboff  <msaboff@apple.com>
2225
2226         Build fixed for http://trac.webkit.org/changeset/128243
2227
2228         Rubber stamped by Stephanie Lewis.
2229
2230         Added missing include file needed by 96422.
2231
2232         * icu/unicode/unorm2.h: Added.
2233
2234 2012-09-11  Michael Saboff  <msaboff@apple.com>
2235
2236         Build fixed for http://trac.webkit.org/changeset/128243
2237
2238         Rubber stamped by Stephanie Lewis.
2239
2240         Added missing include file needed by 96422.
2241
2242         * icu/unicode/ptypes.h: Added.
2243
2244 2012-09-11  Michael Saboff  <msaboff@apple.com>
2245
2246         Update ICU header files to more recent version
2247         https://bugs.webkit.org/show_bug.cgi?id=96422
2248
2249         Reviewed by Geoff Garen.
2250
2251         Updated ICU header files to 4.6.1.  Modifications made as part of the merge are:
2252         platform.h - Changed ifndef / define / endif for U_HAVE_UINT8_T, U_HAVE_UINT16_T, U_HAVE_UINT32_T,
2253             U_HAVE_UINT64_T, U_IS_BIG_ENDIAN and U_ENABLE_TRACING to match the existing platform.h
2254         putil.h (line 132) - Changes defined(U_WINDOWS) to defined(WIN32) || defined(OS2) to match existing putil.h
2255         ustring.h (line 945) - Wrapped macro argument cs with { (const UChar *)cs } to match existing ustring.h
2256         utypes.h (line 545) - Changed defined(U_WINDOWS) to defined(WIN32) to match existing utypes.h
2257
2258         * icu/unicode/localpointer.h: Added.
2259         * icu/unicode/parseerr.h:
2260         * icu/unicode/platform.h:
2261         * icu/unicode/putil.h:
2262         * icu/unicode/uchar.h:
2263         * icu/unicode/ucnv.h:
2264         * icu/unicode/ucnv_err.h:
2265         * icu/unicode/ucol.h:
2266         * icu/unicode/uconfig.h:
2267         * icu/unicode/uenum.h:
2268         * icu/unicode/uiter.h:
2269         * icu/unicode/uloc.h:
2270         * icu/unicode/umachine.h:
2271         * icu/unicode/unorm.h:
2272         * icu/unicode/urename.h:
2273         * icu/unicode/uscript.h:
2274         * icu/unicode/uset.h:
2275         * icu/unicode/ustring.h:
2276         * icu/unicode/utf.h:
2277         * icu/unicode/utf16.h:
2278         * icu/unicode/utf8.h:
2279         * icu/unicode/utypes.h:
2280         * icu/unicode/uvernum.h: Added.
2281         * icu/unicode/uversion.h:
2282
2283 2012-09-11  Pratik Solanki  <psolanki@apple.com>
2284
2285         Add ObjcRuntimeExtras.h to the Xcode project file
2286         https://bugs.webkit.org/show_bug.cgi?id=96419
2287
2288         Reviewed by Alexey Proskuryakov.
2289
2290         * WTF.xcodeproj/project.pbxproj:
2291
2292 2012-09-11  Adrienne Walker  <enne@google.com>
2293
2294         Clang doesn't optimize away undefined OwnPtr copy constructor
2295         https://bugs.webkit.org/show_bug.cgi?id=74625
2296
2297         Reviewed by Anders Carlsson.
2298
2299         Original patch by Anders Carlsson, with a minor edit.
2300
2301         The publicly declared-but-not-defined copy constructor is a compiler
2302         optimization-dependent landmine. Clang often fails to optimize the use
2303         of this function out, leading to internal linkage errors for the missing
2304         definition. gcc doesn't have this problem and optimizes that function
2305         out, leading to code that inconsistently fails to link across platforms.
2306
2307         As a partial fix for this problem, on any compiler that supports C++11
2308         move semantics, replace the bogus copy constructor with the move
2309         constructors.  In the future, if all compilers support this, then the
2310         copy constructor can be removed.
2311
2312         This still leaves other compilers that don't support move semantics
2313         like Visual Studio vulnerable to linking inconsistencies.
2314
2315         * wtf/OwnPtr.h:
2316         (OwnPtr):
2317         (WTF):
2318         (WTF::::OwnPtr):
2319         (WTF::=):
2320
2321 2012-09-11  Raphael Kubo da Costa  <rakuco@webkit.org>
2322
2323         [EFL] Rewrite the EFL-related Find modules
2324         https://bugs.webkit.org/show_bug.cgi?id=95237
2325
2326         Reviewed by Kenneth Rohde Christiansen.
2327
2328         * CMakeLists.txt: Stop setting the LINK_FLAGS property.
2329         * PlatformEfl.cmake: Add libraries and include directories for
2330         each Enlightenment Foundation Library used by the port.
2331
2332 2012-09-11  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2333
2334         [Qt] Add a configure step to the Qt build system
2335
2336         This allows building the Qt port using just 'qmake WebKit.pro'. Using
2337         the build-webkit script is still supported, and will add slightly more
2338         logic to the build, such as detecting the need for clean or incremental
2339         builds.
2340
2341         Internally, the build system now uses a new variable, WEBKIT_CONFIG, for
2342         all things related to configuring the build, such as use/have/enable flags,
2343         and these are translated to defines in default_post. Project files should
2344         no longer check contains(DEFINES,...) to detect features, but use the new
2345         enable?(), use?(), and have?() functions. The no_webkit1 and no_webkit2
2346         options have been translated into WEBKIT_CONFIG options as well, and can
2347         be checked using build?().
2348
2349         Reviewed by Simon Hausmann.
2350
2351         * WTF.pri:
2352         * wtf/Platform.h:
2353
2354 2012-09-10  Ilya Tikhonovsky  <loislo@chromium.org>
2355
2356         Web Inspector: NMI: move MemoryInstrumentation.h to wtf
2357         https://bugs.webkit.org/show_bug.cgi?id=96356
2358
2359         Reviewed by Yury Semikhatsky.
2360
2361         It is necessary step because it helps us to remove dependency between platform and WebCore.
2362
2363         * GNUmakefile.list.am:
2364         * WTF.gypi:
2365         * WTF.pro:
2366         * WTF.vcproj/WTF.vcproj:
2367         * WTF.xcodeproj/project.pbxproj:
2368         * wtf/MemoryInstrumentation.h: Renamed from Source/WebCore/dom/MemoryInstrumentation.h.
2369         (WebCore):
2370         (GenericMemoryTypes):
2371         (MemoryInstrumentationTraits):
2372         (MemoryInstrumentation):
2373         (WebCore::MemoryInstrumentation::~MemoryInstrumentation):
2374         (WebCore::MemoryInstrumentation::addRootObject):
2375         (InstrumentedPointerBase):
2376         (WebCore::MemoryInstrumentation::InstrumentedPointerBase::~InstrumentedPointerBase):
2377         (InstrumentedPointer):
2378         (WebCore::MemoryInstrumentation::InstrumentedPointer::InstrumentedPointer):
2379         (WebCore::MemoryInstrumentation::addObject):
2380         (WebCore::MemoryInstrumentation::addInstrumentedObject):
2381         (WebCore::MemoryInstrumentation::addRawBuffer):
2382         (WebCore::MemoryInstrumentation::OwningTraits::addInstrumentedObject):
2383         (WebCore::MemoryInstrumentation::OwningTraits::addObject):
2384         (WebCore::MemoryInstrumentationTraits::addInstrumentedObject):
2385         (WebCore::MemoryInstrumentationTraits::addObject):
2386         (MemoryObjectInfo):
2387         (WebCore::MemoryObjectInfo::MemoryObjectInfo):
2388         (WebCore::MemoryObjectInfo::objectType):
2389         (WebCore::MemoryObjectInfo::objectSize):
2390         (WebCore::MemoryObjectInfo::memoryInstrumentation):
2391         (WebCore::MemoryObjectInfo::reportObjectInfo):
2392         (MemoryClassInfo):
2393         (WebCore::MemoryClassInfo::MemoryClassInfo):
2394         (WebCore::MemoryClassInfo::addInstrumentedMember):
2395         (WebCore::MemoryClassInfo::addMember):
2396         (WebCore::MemoryClassInfo::addHashMap):
2397         (WebCore::MemoryClassInfo::addHashSet):
2398         (WebCore::MemoryClassInfo::addHashCountedSet):
2399         (WebCore::MemoryClassInfo::addInstrumentedHashSet):
2400         (WebCore::MemoryClassInfo::addInstrumentedVector):
2401         (WebCore::MemoryClassInfo::addInstrumentedVectorPtr):
2402         (WebCore::MemoryClassInfo::addInstrumentedMapEntries):
2403         (WebCore::MemoryClassInfo::addInstrumentedMapValues):
2404         (WebCore::MemoryClassInfo::addListHashSet):
2405         (WebCore::MemoryClassInfo::addVector):
2406         (WebCore::MemoryClassInfo::addVectorPtr):
2407         (WebCore::MemoryClassInfo::addRawBuffer):
2408         (WebCore::MemoryInstrumentation::addInstrumentedObjectImpl):
2409         (WebCore::MemoryInstrumentation::addObjectImpl):
2410         (WebCore::MemoryInstrumentation::addHashMap):
2411         (WebCore::MemoryInstrumentation::addHashSet):
2412         (WebCore::MemoryInstrumentation::addInstrumentedCollection):
2413         (WebCore::MemoryInstrumentation::addInstrumentedMapEntries):
2414         (WebCore::MemoryInstrumentation::addInstrumentedMapValues):
2415         (WebCore::MemoryInstrumentation::addListHashSet):
2416         (WebCore::MemoryInstrumentation::addVector):
2417         (WebCore::MemoryInstrumentation::calculateContainerSize):
2418         (WebCore::::process):
2419
2420 2012-09-09  Mark Lam  <mark.lam@apple.com>
2421
2422         Fixed ASSERT() and ASSERT_AT() macros so that they can be used in
2423         comma expressions. Also, added UNUSED_LABEL().
2424         https://bugs.webkit.org/show_bug.cgi?id=96127.
2425
2426         Reviewed by Geoffrey Garen.
2427
2428         * wtf/Assertions.h:
2429         * wtf/UnusedParam.h: Added UNUSED_LABEL(). Removed an obsolete comment.
2430
2431 2012-09-09  Patrick Gansterer  <paroga@webkit.org>
2432
2433         Add StringBuilder::appendNumber() and use it
2434         https://bugs.webkit.org/show_bug.cgi?id=96030
2435
2436         Reviewed by Eric Seidel.
2437
2438         Also fix a bunch of append() vs. appendLiteral() issues in the surrounding code.
2439
2440         * wtf/DateMath.cpp:
2441         (WTF::makeRFC2822DateString):
2442         * wtf/text/StringBuilder.cpp:
2443         (WTF::StringBuilder::appendNumber):
2444         * wtf/text/StringBuilder.h:
2445         (StringBuilder):
2446
2447 2012-09-09  Patrick Gansterer  <paroga@webkit.org>
2448
2449         Make the String initialization on the function side of String::number()
2450         https://bugs.webkit.org/show_bug.cgi?id=95940
2451
2452         Reviewed by Benjamin Poulain.
2453
2454         Un-Inline String::number() to make the String initialization done on the function side
2455         instead of being on the caller side.
2456
2457         * GNUmakefile.list.am:
2458         * WTF.gypi:
2459         * WTF.pro:
2460         * WTF.vcproj/WTF.vcproj:
2461         * WTF.xcodeproj/project.pbxproj:
2462         * wtf/CMakeLists.txt:
2463         * wtf/text/IntegerToStringConversion.cpp: Removed.
2464         * wtf/text/IntegerToStringConversion.h:
2465         (WTF::numberToStringImpl):
2466         (WTF::numberToStringSigned):
2467         (WTF::numberToStringUnsigned):
2468         * wtf/text/WTFString.cpp:
2469         (WTF::String::number):
2470         * wtf/text/WTFString.h:
2471
2472 2012-09-08  Andreas Kling  <kling@webkit.org>
2473
2474         Give AtomicString SimpleClassVectorTraits.
2475         <http://webkit.org/b/96186>
2476
2477         Reviewed by Karl Anders Carlsson.
2478
2479         AtomicString can be initialized/moved/compared with memset/memcpy/memcmp,
2480         so add a VectorTraits<AtomicString> to make Vector<AtomicString> a little
2481         more efficient.
2482
2483         * wtf/VectorTraits.h:
2484
2485 2012-09-07  Sheriff Bot  <webkit.review.bot@gmail.com>
2486
2487         Unreviewed, rolling out r127938.
2488         http://trac.webkit.org/changeset/127938
2489         https://bugs.webkit.org/show_bug.cgi?id=96166
2490
2491         It broke the build (Requested by smfr on #webkit).
2492
2493         * wtf/Assertions.h:
2494
2495 2012-09-07  Mark Lam  <mark.lam@apple.com>
2496
2497         Fixed ASSERT() and ASSERT_AT() macros so that they can be used in
2498         comma expressions.
2499         https://bugs.webkit.org/show_bug.cgi?id=96127.
2500
2501         Reviewed by Filip Pizlo.
2502
2503         * wtf/Assertions.h:
2504         (wtfAssert):
2505
2506 2012-09-07  Michael Saboff  <msaboff@apple.com>
2507
2508         StringImpl::find(StringImpl*) doesn't handle cases where search and match strings are different bitness
2509         https://bugs.webkit.org/show_bug.cgi?id=96125
2510
2511         Reviewed by Benjamin Poulain.
2512
2513         Changed findInner and reverseFindInner to be templated on both search and match character types.
2514         Changed both find's and reverseFind to use all four bitness combinations of findInner and
2515         reverseFindInner.
2516
2517         * wtf/text/StringImpl.cpp:
2518         (WTF::findInner):
2519         (WTF::StringImpl::find):
2520         (WTF::reverseFindInner):
2521         (WTF::StringImpl::reverseFind):
2522
2523 2012-09-07  Michael Saboff  <msaboff@apple.com>
2524
2525         equalIgnoringCase of two StringImpls doesn't handle 8 bit strings
2526         https://bugs.webkit.org/show_bug.cgi?id=96028
2527
2528         Reviewed by Benjamin Poulain.
2529
2530         Added 8 bit checks and paths to CaseFoldingHash::equal.  Also cleaned up StringHash::equal(), removing
2531         obvious and in one case wrong comments.  Moved equalIgnoringCase(UChar*, UChar*) from StringImpl.cpp
2532         to StringImpl.h.
2533
2534         * wtf/text/StringHash.h:
2535         (WTF::StringHash::equal):
2536         (WTF::CaseFoldingHash::equal):
2537         * wtf/text/StringImpl.cpp:
2538         * wtf/text/StringImpl.h:
2539         (WTF::equalIgnoringCase):
2540
2541 2012-09-07  Patrick Gansterer  <paroga@webkit.org>
2542
2543         [WIN] Deprecate String += operator
2544         https://bugs.webkit.org/show_bug.cgi?id=96083
2545
2546         Reviewed by Adam Barth.
2547
2548         * wtf/Platform.h:
2549
2550 2012-09-06  Michael Saboff  <msaboff@apple.com>
2551
2552         StringBuilder::toAtomicString() can create an 16 bit string with 8 bit contents
2553         https://bugs.webkit.org/show_bug.cgi?id=96029
2554
2555         Reviewed by Benjamin Poulain.
2556
2557         Added 8 bit path when creating an AtomicString from a partial 8 bit buffer.
2558
2559         * wtf/text/StringBuilder.h:
2560         (WTF::StringBuilder::toAtomicString):
2561
2562 2012-09-06  Michael Saboff  <msaboff@apple.com>
2563
2564         16 bit JSRopeString up converts an 8 bit fibers to 16 bits during resolution
2565         https://bugs.webkit.org/show_bug.cgi?id=95810
2566
2567         Reviewed by Benjamin Poulain.
2568
2569         New copy routine that takes an 8 bit source and a 16 bit destination.  Used when copying
2570         the contents of an 8 bit fiber to the 16 bit buffer when resolving a 16 bit rope.
2571
2572         * wtf/text/StringImpl.h:
2573         (WTF::StringImpl::copyChars):
2574         (StringImpl):
2575
2576 2012-09-06  Michael Saboff  <msaboff@apple.com>
2577
2578         Unreviewed fix to r127799.
2579         https://bugs.webkit.org/show_bug.cgi?id=95807
2580
2581         Unreviewed fix.
2582
2583         Removed extraneous "static".  This code is hidden behind STRING_STATS define and 
2584         therefore is not enabled by default.
2585
2586         * wtf/text/StringImpl.cpp:
2587
2588 2012-09-06  Lauro Neto  <lauro.neto@openbossa.org>
2589
2590         [Qt] Deprecate String += operator
2591         https://bugs.webkit.org/show_bug.cgi?id=95895
2592
2593         Reviewed by Benjamin Poulain.
2594
2595         Remove Qt from WTF_DEPRECATED_STRING_OPERATORS guard.
2596
2597         * wtf/Platform.h:
2598
2599 2012-09-06  Michael Saboff  <msaboff@apple.com>
2600
2601         ENH: Add Logging to StringImpl to track String Types
2602         https://bugs.webkit.org/show_bug.cgi?id=95807
2603
2604         Reviewed by Benjamin Poulain.
2605
2606         Added StringsStats class that keeps track of the number of strings, number of 8 and 16 bit
2607         strings as well as the number of 8 bit strings up converted to 16 bits. The number of characrters
2608         for each type is also accumulated. These statistics are output via DataLog every 5000
2609         calls to StringImpl destructor. The 5000 can be adjusted via s_printStringStatsFrequency.
2610         This StringStats code is disabled by default and enabled by defining STRING_STATS in
2611         wtf/text/StringImpl.h.
2612
2613         * wtf/text/StringImpl.cpp:
2614         (WTF::StringStats::removeString):
2615         (WTF::StringStats::printStats):
2616         (WTF::StringImpl::~StringImpl):
2617         (WTF::StringImpl::getData16SlowCase):
2618         * wtf/text/StringImpl.h:
2619         (WTF::StringStats::add8BitString):
2620         (StringStats):
2621         (WTF::StringStats::add16BitString):
2622         (WTF::StringStats::addUpconvertedString):
2623         (WTF::StringImpl::StringImpl):
2624         (StringImpl):
2625         (WTF::StringImpl::isSubString):
2626         (WTF::StringImpl::stringStats):
2627
2628 2012-09-06  Patrick Gansterer  <paroga@webkit.org>
2629
2630         Fix export macros in IntegerToStringConversion.h
2631         https://bugs.webkit.org/show_bug.cgi?id=95900
2632
2633         Reviewed by Benjamin Poulain.
2634
2635         The WTF_EXPORT_STRING_API must be used only for symbols which are compiled
2636         on windows in "non-WTF" binaries too. Since this isn't valid for the
2637         IntegerToStringConversion function replace it with WTF_EXPORT_PRIVATE.
2638
2639         * wtf/text/IntegerToStringConversion.h:
2640
2641 2012-09-06  Simon Hausmann  <simon.hausmann@nokia.com>
2642
2643         [Qt] Various small Windows / MSVC build fixes
2644         https://bugs.webkit.org/show_bug.cgi?id=95934
2645
2646         Reviewed by Kenneth Rohde Christiansen.
2647
2648         For the Qt build on Windows, do not enable WTF_USE_UNIX_DOMAIN_SOCKETS for
2649         WebKit2 IPC.
2650
2651         * wtf/Platform.h:
2652
2653 2012-09-06  Adam Barth  <abarth@chromium.org>
2654
2655         Remove WTF::String::operator+=
2656         https://bugs.webkit.org/show_bug.cgi?id=95797
2657
2658         Reviewed by Sam Weinig.
2659
2660         This patch encloses WTF::String::operator+= in an ifdef so that we can
2661         gradually remove it from the various port-specific files. The ifdef
2662         lets us whitelist use of operator+= in individual files during the
2663         transition.
2664
2665         * wtf/Platform.h
2666         * wtf/text/WTFString.h:
2667
2668 2012-09-05  Gabor Rapcsanyi  <rgabor@webkit.org>
2669
2670         DFG JIT doesn't work properly on ARM hardfp
2671         https://bugs.webkit.org/show_bug.cgi?id=95684
2672
2673         Reviewed by Filip Pizlo.
2674
2675         Add hardfp support to DFG JIT. The patch is created with the
2676         help of Zoltan Herczeg.
2677
2678         * wtf/Platform.h:
2679
2680 2012-09-04  Zoltan Horvath  <zoltan@webkit.org>
2681
2682         Extend the coverage of the Custom Allocation Framework in WTF and in JavaScriptCore
2683         https://bugs.webkit.org/show_bug.cgi?id=95737
2684
2685         Reviewed by Eric Seidel.
2686
2687         Add WTF_MAKE_FAST_ALLOCATED macro to the following class declarations because these are instantiated by operator new.
2688
2689         * wtf/CryptographicallyRandomNumber.cpp: CryptographicallyRandomNumber is instantiated at wtf/CryptographicallyRandomNumber.cpp:162.
2690         * wtf/MediaTime.h: MediaTime is instantiated at wtf/MediaTime.cpp:288.
2691         * wtf/MetaAllocator.h:
2692         (MetaAllocatorTracker): MetaAllocatorTracker is instantiated at JavaScriptCore/tools/CodeProfiling.cpp:120.
2693         * wtf/ThreadingPthreads.cpp:
2694         (PthreadState): PthreadState is instantiated at wtf/ThreadingPthreads.cpp:165.
2695         * wtf/text/AtomicString.cpp:
2696         (AtomicStringTable): AtomicStringTable is instantiated at wtf/text/AtomicString.cpp:43.
2697
2698 2012-09-01  Mark Lam  <mark.lam@apple.com>
2699
2700         LLInt C loop backend.
2701         https://bugs.webkit.org/show_bug.cgi?id=91052.
2702
2703         Reviewed by Filip Pizlo.
2704
2705         Added configs for the llint C loop backend.
2706
2707         * wtf/Platform.h:
2708
2709 2012-08-31  Pratik Solanki  <psolanki@apple.com>
2710
2711         objc_msgSend and IMP should be cast appropriately before using
2712         https://bugs.webkit.org/show_bug.cgi?id=95242
2713
2714         Reviewed by Benjamin Poulain.
2715
2716         Fix for older compilers. Pass id as the return type to the template
2717         instead of relying on default type.
2718
2719         * wtf/Functional.h:
2720         (WTF::R):
2721         * wtf/ObjcRuntimeExtras.h:
2722
2723 2012-08-31  Michael Saboff  <msaboff@apple.com>
2724
2725         CSS Parser should directly parse 8 bit source strings
2726         https://bugs.webkit.org/show_bug.cgi?id=95207
2727
2728         Reviewed by Geoffrey Garen.
2729
2730         * wtf/text/StringImpl.h:
2731         (WTF::equalIgnoringCase): Added (const char*, const LChar*, unsigned) flavor to support
2732         8 bit CSS parser work.
2733
2734 2012-08-30  Benjamin Poulain  <bpoulain@apple.com>
2735
2736         AtomicString(ASCIILiteral) should not compile
2737         https://bugs.webkit.org/show_bug.cgi?id=95413
2738
2739         Reviewed by Adam Barth.
2740
2741         * wtf/text/AtomicString.h:
2742         (AtomicString): Declare the constructor from ASCIILiteral private to ensure it is
2743         not used by accident.
2744
2745 2012-08-30  Benjamin Poulain  <bpoulain@apple.com>
2746
2747         Ambiguous operator[]  after r127191 on some compiler
2748         https://bugs.webkit.org/show_bug.cgi?id=95509
2749
2750         Reviewed by Simon Fraser.
2751
2752         * wtf/text/WTFString.h:
2753         (WTF::String::characterAt): At this as a synonym to operator[] to attempt a build fix.
2754
2755 2012-08-30  Mark Lam  <mark.lam@apple.com>
2756
2757         Render unto #ifdef's that which belong to them.
2758         https://bugs.webkit.org/show_bug.cgi?id=95482.
2759
2760         Reviewed by Filip Pizlo.
2761
2762         * wtf/Platform.h: Added ENABLE(COMPUTED_GOTO_OPCODES).
2763
2764 2012-08-30  Pratik Solanki  <psolanki@apple.com>
2765
2766         objc_msgSend and IMP should be cast appropriately before using
2767         https://bugs.webkit.org/show_bug.cgi?id=95242
2768
2769         Reviewed by Benjamin Poulain.
2770
2771         Add new templates wtfObjcMsgSend and wtfCallIMP that do the appropriate
2772         casts to correctly typed function pointers before calling objc_msgSend
2773         and IMP methods directly.
2774
2775         * wtf/Functional.h:
2776         (WTF::R): Use wtfObjcMsgSend.
2777         * wtf/ObjcRuntimeExtras.h: Added.
2778         (wtfObjcMsgSend):
2779         (wtfCallIMP):
2780
2781 2012-08-30  Benjamin Poulain  <bpoulain@apple.com>
2782
2783         Replace JSC::UString by WTF::String
2784         https://bugs.webkit.org/show_bug.cgi?id=95271
2785
2786         Reviewed by Geoffrey Garen.
2787
2788         * wtf/Platform.h: Useless edit to force a full build. This is needed for some bots for some reason.
2789         * wtf/text/WTFString.h: Export a symbol that was exported on UString and needed in WebCore.
2790
2791         Add String::getCharactersWithUpconvert<>(), which is similar to String::getCharacters<>() but with the same
2792         behaviors as UString::getCharacters<>().
2793
2794         String::getCharactersWithUpconvert<>() is useful when manipulating multiple strings, it allow writting code
2795         using 16bits characters if any of the input String is not 8bit.
2796
2797 2012-08-30  Yong Li  <yoli@rim.com>
2798
2799         Vector::shrinkToFit should use realloc when suitable.
2800         https://bugs.webkit.org/show_bug.cgi?id=94810
2801
2802         Reviewed by Benjamin Poulain.
2803
2804         Only tested on BlackBerry. So it is wrapped with PLATFORM(BLACKBERRY) in the mean time.
2805         Use realloc to shrink buffer when inline buffer isn't involved and and canMoveWithMemcpy is true.
2806
2807         When running the test code attached to the bug, it gives 30-45% performance boost for the large blocks
2808         (Every test cycle includes an extra pair of malloc/free, so the boost on shrinkToFit() is even bigger)
2809         Performance impact on small blocks is not noticeable. (Tested on BlackBerry)
2810
2811         * wtf/Vector.h:
2812         (WTF::VectorBufferBase::shouldReallocateBuffer):
2813         (VectorBufferBase):
2814         (WTF::VectorBufferBase::reallocateBuffer):
2815         (VectorBuffer):
2816         (WTF::VectorBuffer::shouldReallocateBuffer):
2817         (WTF::VectorBuffer::reallocateBuffer):
2818         (WTF::VectorBuffer::inlineBuffer):
2819         (WTF::::shrinkCapacity):
2820
2821 2012-08-30  Patrick Gansterer  <paroga@webkit.org>
2822
2823         Build fix for COMPILER(MSVC) && !CPU(X86) after r127001.
2824
2825         * wtf/MathExtras.h:
2826         (lrint): Added additional parentheses to silence compiler warning.
2827
2828 2012-08-29  Benjamin Poulain  <bpoulain@apple.com>
2829
2830         REGRESSION(r126780): Crash using StringImpl::is8Bit before checking if there is an impl
2831         https://bugs.webkit.org/show_bug.cgi?id=95380
2832
2833         Reviewed by Michael Saboff.
2834
2835         Blindly copying code from UString in r126780 was stupid. I just brought over a bug.
2836         This patch adds the zero length branch back so that null strings are handled correctly.
2837
2838         * wtf/text/WTFString.cpp:
2839         (WTF::String::ascii): Return a empty CString if the String is null or empty.
2840
2841 2012-08-29  Dominik Röttsches  <dominik.rottsches@intel.com>
2842
2843         The 2d.imageData.object.round canvas test is failing
2844         https://bugs.webkit.org/show_bug.cgi?id=40272
2845
2846         Reviewed by Benjamin Poulain.
2847
2848         Updating previous patch to address Benjamin's comments.
2849         #ifdef in Uint8ClampedArray removed, fallback implementation for MSVC on non-X86 added.
2850
2851         * wtf/MathExtras.h:
2852         (lrint): Fallback implementation for non-X86 & MSVC case.
2853         * wtf/Uint8ClampedArray.h: Removed #ifdef.
2854
2855 2012-08-28  Sheriff Bot  <webkit.review.bot@gmail.com>
2856
2857         Unreviewed, rolling out r126914.
2858         http://trac.webkit.org/changeset/126914
2859         https://bugs.webkit.org/show_bug.cgi?id=95239
2860
2861         it breaks everything and fixes nothing (Requested by pizlo on
2862         #webkit).
2863
2864         * wtf/HashCountedSet.h:
2865         (WTF::::add):
2866         (WTF::::remove):
2867         (WTF::copyToVector):
2868         * wtf/HashIterators.h:
2869         (WTF::HashTableConstKeysIterator::get):
2870         (WTF::HashTableConstValuesIterator::get):
2871         (WTF::HashTableKeysIterator::get):
2872         (WTF::HashTableValuesIterator::get):
2873         * wtf/HashMap.h:
2874         (WTF::KeyValuePairKeyExtractor::extract):
2875         (WTF::HashMapValueTraits::isEmptyValue):
2876         (WTF::HashMapTranslator::translate):
2877         (WTF::HashMapTranslatorAdapter::translate):
2878         (WTF::::set):
2879         (WTF::::get):
2880         (WTF::::take):
2881         (WTF::operator==):
2882         (WTF):
2883         (WTF::deleteAllPairSeconds):
2884         (WTF::deleteAllValues):
2885         (WTF::deleteAllPairFirsts):
2886         (WTF::deleteAllKeys):
2887         * wtf/HashTable.h:
2888         (WTF::hashTableSwap):
2889         (WTF::::checkTableConsistencyExceptSize):
2890         * wtf/HashTraits.h:
2891         (WTF::KeyValuePair::KeyValuePair):
2892         (KeyValuePair):
2893         (WTF::KeyValuePairHashTraits::constructDeletedValue):
2894         (WTF::KeyValuePairHashTraits::isDeletedValue):
2895         * wtf/MetaAllocator.cpp:
2896         (WTF::MetaAllocator::addFreeSpace):
2897         (WTF::MetaAllocator::incrementPageOccupancy):
2898         (WTF::MetaAllocator::decrementPageOccupancy):
2899         * wtf/RefCountedLeakCounter.cpp:
2900         (WTF::RefCountedLeakCounter::~RefCountedLeakCounter):
2901         * wtf/RefPtrHashMap.h:
2902         (WTF::::set):
2903         (WTF::::get):
2904         (WTF::::inlineGet):
2905         (WTF::::take):
2906         * wtf/Spectrum.h:
2907         (WTF::Spectrum::add):
2908         (WTF::Spectrum::get):
2909         (WTF::Spectrum::buildList):
2910         * wtf/ThreadingPthreads.cpp:
2911         (WTF::identifierByPthreadHandle):
2912
2913 2012-08-28  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2914
2915         Rename first/second to key/value in HashMap iterators
2916         https://bugs.webkit.org/show_bug.cgi?id=82784
2917
2918         Reviewed by Eric Seidel.
2919
2920         * wtf/HashCountedSet.h:
2921         (WTF::::add):
2922         (WTF::::remove):
2923         (WTF::copyToVector):
2924         * wtf/HashIterators.h:
2925         (WTF::HashTableConstKeysIterator::get):
2926         (WTF::HashTableConstValuesIterator::get):
2927         (WTF::HashTableKeysIterator::get):
2928         (WTF::HashTableValuesIterator::get):
2929         * wtf/HashMap.h:
2930         (WTF::KeyValuePairKeyExtractor::extract):
2931         (WTF::HashMapValueTraits::isEmptyValue):
2932         (WTF::HashMapTranslator::translate):
2933         (WTF::HashMapTranslatorAdapter::translate):
2934         (WTF::::set):
2935         (WTF::::get):
2936         (WTF::::take):
2937         (WTF::operator==):
2938         (WTF::deleteAllValues):
2939         (WTF::deleteAllKeys):
2940         Remove deleteAllPairFirsts/Seconds.
2941
2942         * wtf/HashTable.h:
2943         (WTF::hashTableSwap):
2944         (WTF::::checkTableConsistencyExceptSize):
2945         * wtf/HashTraits.h:
2946         (WTF::KeyValuePair::KeyValuePair):
2947         (KeyValuePair):
2948         (WTF::KeyValuePairHashTraits::constructDeletedValue):
2949         (WTF::KeyValuePairHashTraits::isDeletedValue):
2950         * wtf/MetaAllocator.cpp:
2951         (WTF::MetaAllocator::addFreeSpace):
2952         (WTF::MetaAllocator::incrementPageOccupancy):
2953         (WTF::MetaAllocator::decrementPageOccupancy):
2954         * wtf/RefCountedLeakCounter.cpp:
2955         (WTF::RefCountedLeakCounter::~RefCountedLeakCounter):
2956         * wtf/RefPtrHashMap.h:
2957         (WTF::::set):
2958         (WTF::::get):
2959         (WTF::::inlineGet):
2960         (WTF::::take):
2961         * wtf/Spectrum.h:
2962         (WTF::Spectrum::add):
2963         (WTF::Spectrum::get):
2964         (WTF::Spectrum::buildList):
2965         * wtf/ThreadingPthreads.cpp:
2966         (WTF::identifierByPthreadHandle):
2967
2968 2012-08-27  Sheriff Bot  <webkit.review.bot@gmail.com>
2969
2970         Unreviewed, rolling out r126836.
2971         http://trac.webkit.org/changeset/126836
2972         https://bugs.webkit.org/show_bug.cgi?id=95163
2973
2974         Broke all Apple ports, EFL, and Qt. (Requested by tkent on
2975         #webkit).
2976
2977         * wtf/HashCountedSet.h:
2978         (WTF::::add):
2979         (WTF::::remove):
2980         (WTF::copyToVector):
2981         * wtf/HashIterators.h:
2982         (WTF::HashTableConstKeysIterator::get):
2983         (WTF::HashTableConstValuesIterator::get):
2984         (WTF::HashTableValuesIterator::get):
2985         * wtf/HashMap.h:
2986         (WTF::KeyValuePairKeyExtractor::extract):
2987         (WTF::HashMapValueTraits::isEmptyValue):
2988         (WTF::HashMapTranslator::translate):
2989         (WTF::HashMapTranslatorAdapter::translate):
2990         (WTF::::set):
2991         (WTF::::get):
2992         (WTF::::take):
2993         (WTF::operator==):
2994         (WTF):
2995         (WTF::deleteAllPairSeconds):
2996         (WTF::deleteAllValues):
2997         (WTF::deleteAllPairFirsts):
2998         (WTF::deleteAllKeys):
2999         * wtf/HashTable.h:
3000         (WTF::hashTableSwap):
3001         (WTF::::checkTableConsistencyExceptSize):
3002         * wtf/HashTraits.h:
3003         (WTF::KeyValuePair::KeyValuePair):
3004         (KeyValuePair):
3005         (WTF::KeyValuePairHashTraits::constructDeletedValue):
3006         (WTF::KeyValuePairHashTraits::isDeletedValue):
3007         * wtf/MetaAllocator.cpp:
3008         (WTF::MetaAllocator::addFreeSpace):
3009         (WTF::MetaAllocator::incrementPageOccupancy):
3010         (WTF::MetaAllocator::decrementPageOccupancy):
3011         * wtf/RefCountedLeakCounter.cpp:
3012         (WTF::RefCountedLeakCounter::~RefCountedLeakCounter):
3013         * wtf/RefPtrHashMap.h:
3014         (WTF::::set):
3015         (WTF::::get):
3016         (WTF::::inlineGet):
3017         (WTF::::take):
3018         * wtf/Spectrum.h:
3019         (WTF::Spectrum::add):
3020         (WTF::Spectrum::get):
3021         (WTF::Spectrum::buildList):
3022         * wtf/ThreadingPthreads.cpp:
3023         (WTF::identifierByPthreadHandle):
3024
3025 2012-08-27  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3026
3027         Rename first/second to key/value in HashMap iterators
3028         https://bugs.webkit.org/show_bug.cgi?id=82784
3029
3030         Reviewed by Eric Seidel.
3031
3032         * wtf/HashCountedSet.h:
3033         (WTF::::add):
3034         (WTF::::remove):
3035         (WTF::copyToVector):
3036         * wtf/HashIterators.h:
3037         (WTF::HashTableConstKeysIterator::get):
3038         (WTF::HashTableConstValuesIterator::get):
3039         (WTF::HashTableValuesIterator::get):
3040         * wtf/HashMap.h:
3041         (WTF::KeyValuePairKeyExtractor::extract):
3042         (WTF::HashMapValueTraits::isEmptyValue):
3043         (WTF::HashMapTranslator::translate):
3044         (WTF::HashMapTranslatorAdapter::translate):
3045         (WTF::::set):
3046         (WTF::::get):
3047         (WTF::::take):
3048         (WTF::operator==):
3049         (WTF::deleteAllValues):
3050         (WTF::deleteAllKeys):
3051         Remove deleteAllPairFirsts/Seconds.
3052
3053         * wtf/HashTable.h:
3054         (WTF::hashTableSwap):
3055         (WTF::::checkTableConsistencyExceptSize):
3056         * wtf/HashTraits.h:
3057         (WTF::KeyValuePair::KeyValuePair):
3058         (KeyValuePair):
3059         (WTF::KeyValuePairHashTraits::constructDeletedValue):
3060         (WTF::KeyValuePairHashTraits::isDeletedValue):
3061         * wtf/MetaAllocator.cpp:
3062         (WTF::MetaAllocator::addFreeSpace):
3063         (WTF::MetaAllocator::incrementPageOccupancy):
3064         (WTF::MetaAllocator::decrementPageOccupancy):
3065         * wtf/RefCountedLeakCounter.cpp:
3066         (WTF::RefCountedLeakCounter::~RefCountedLeakCounter):
3067         * wtf/RefPtrHashMap.h:
3068         (WTF::::set):
3069         (WTF::::get):
3070         (WTF::::inlineGet):
3071         (WTF::::take):
3072         * wtf/Spectrum.h:
3073         (WTF::Spectrum::add):
3074         (WTF::Spectrum::get):
3075         (WTF::Spectrum::buildList):
3076         * wtf/ThreadingPthreads.cpp:
3077         (WTF::identifierByPthreadHandle):
3078
3079 2012-08-27  Benjamin Poulain  <benjamin@webkit.org>
3080
3081         Add ECMAScript Number to String conversion to WTF::String
3082         https://bugs.webkit.org/show_bug.cgi?id=95016
3083
3084         Reviewed by Geoffrey Garen.
3085
3086         * wtf/text/WTFString.cpp:
3087         (WTF::String::numberToStringECMAScript):
3088         * wtf/text/WTFString.h:
3089         Add the implementation of numberToStringECMAScript(double) from UString to String.
3090         This will make it easier to replace UString in the future.
3091
3092 2012-08-27  Benjamin Poulain  <benjamin@webkit.org>
3093
3094         Even up WTF::String to CString functions
3095         https://bugs.webkit.org/show_bug.cgi?id=95008
3096
3097         Reviewed by Sam Weinig.
3098
3099         Apply advantages from UString to WTF::String.
3100
3101         * wtf/text/WTFString.cpp:
3102         (WTF::String::ascii): There is no need to special case the null length, both
3103         following branches use CString::newUninitialized(), which create empty string
3104         for null length.
3105         (WTF::String::latin1): Use characters16() instead of characters() to avoid
3106         testing is8Bit() a second time.
3107
3108 2012-08-24  Benjamin Poulain  <benjamin@webkit.org>
3109
3110         Touch Platform.h to solve a build dependency issue
3111
3112         Unreviewed.
3113
3114         * wtf/Platform.h:
3115
3116 2012-08-24  Benjamin Poulain  <bpoulain@apple.com>
3117
3118         Unify Number to StringImpl conversion
3119         https://bugs.webkit.org/show_bug.cgi?id=94879
3120
3121         Reviewed by Geoffrey Garen.
3122
3123         Previously, UString::number() and String::number() used different implementations.
3124
3125         WTF::String::number() was simply forwarding to String::format().
3126         UString::number() had an optimized version of the conversion.
3127
3128         This patch replace both implementation by a new version, faster than the two previous versions.
3129
3130         The new functions numberToStringImpl improvements are:
3131         -about 3 times faster than String::number().
3132         -14% faster than UString::number() on signed numbers.
3133         -9% faster than UString::number() on unsigned numbers.
3134
3135         * GNUmakefile.list.am:
3136         * WTF.gypi:
3137         * WTF.pro:
3138         * WTF.vcproj/WTF.vcproj:
3139         * WTF.xcodeproj/project.pbxproj:
3140         * wtf/CMakeLists.txt:
3141         * wtf/text/IntegerToStringConversion.cpp: Added.
3142         (WTF::numberToStringImplSigned):
3143         (WTF::numberToStringImpl):
3144         (WTF::numberToStringImplUnsigned):
3145         * wtf/text/IntegerToStringConversion.h: Added.
3146         * wtf/text/WTFString.cpp:
3147         (WTF::String::format):
3148         * wtf/text/WTFString.h:
3149         (WTF::String::number):
3150
3151 2012-08-24  Andras Becsi  <andras.becsi@nokia.com>
3152
3153         [Qt] Be more explicit about the ICU dependency in the error message
3154
3155         Rubber-stamped by Simon Hausmann.
3156
3157         When building QtWebKit with a Qt5 which was not configured with libICU support
3158         the error message is somewhat ambiguous about the indirect dependency.
3159
3160         * WTF.pri:
3161
3162 2012-08-23  Julien Chaffraix  <jchaffraix@webkit.org>
3163
3164         [Chromium] Enable AtomicString && CString && WTFString && StringImpl unit tests
3165         https://bugs.webkit.org/show_bug.cgi?id=94871
3166
3167         Reviewed by Benjamin Poulain.
3168
3169         * wtf/PassRefPtr.h:
3170         We need to include Assertions.h due to the COMPILE_ASSERT added in r89283.
3171         This matches other files in WTF though I am not sure why Chromium is the only
3172         platform complaining about that.
3173
3174 2012-08-23  Mark Rowe  <mrowe@apple.com>
3175
3176         Build fix for old, old versions of Clang.
3177
3178         * wtf/FastMalloc.cpp:
3179         (WTF): Rejigger things so that they parse correctly if __has_warning isn't defined.
3180
3181 2012-08-23  Emil A Eklund  <eae@chromium.org>
3182
3183         Add saturation arithmetic support to FractionalLayoutUnit
3184         https://bugs.webkit.org/show_bug.cgi?id=94364
3185
3186         Reviewed by Benjamin Poulain.
3187
3188         Add support functions for saturated addition and subtraction.
3189
3190         Test: TestWebKitAPI/Tests/WTF/SaturatedArithmeticOperations.cpp
3191
3192         * GNUmakefile.list.am:
3193         * WTF.gypi:
3194         * WTF.pro:
3195         * WTF.vcproj/WTF.vcproj:
3196         * WTF.xcodeproj/project.pbxproj:
3197         * WTF/wtf/CMakeLists.txt:
3198         Add SaturatedArithmetic.h to build files.
3199
3200         * wtf/SaturatedArithmetic.h: Added.
3201         (saturatedAddition):
3202         (saturatedSubtraction):
3203         Support functions for saturated addition/subtraction. Compares the signed
3204         bit of the values instead of using range checks to reduce branching.
3205
3206         * wtf/Platform.h:
3207         Add ENABLE_SATURATED_LAYOUT_ARITHMETIC flag.
3208
3209 2012-08-23  Mark Rowe  <mrowe@apple.com>
3210
3211         Roll back in the part of r126475 that I had rolled out.
3212
3213         * wtf/FastMalloc.cpp:
3214         (WTF): Disable the -Wunused-private-field warning around the declaration of
3215         TCMalloc_Central_FreeListPadded since the padding is intentionally unused.
3216         Only disable the warning if we detect it is enabled, since the warning may not
3217         be supported by the version of Clang that is being used.
3218
3219 2012-08-23  Mark Rowe  <mrowe@apple.com>
3220
3221         Roll out part of r126475 that breaks the build with older versions of Clang.
3222
3223         * wtf/FastMalloc.cpp:
3224
3225 2012-08-23  Mark Rowe  <mrowe@apple.com>
3226
3227         Make WTF build with the latest version of clang.
3228
3229         Reviewed by Dan Bernstein.
3230
3231         * wtf/FastMalloc.cpp:
3232         (WTF): Disable the -Wunused-private-field warning around the declaration of
3233         TCMalloc_Central_FreeListPadded since the padding is intentionally unused.
3234         (WTF::AdminRegionRecorder): Remove the unused m_reader member.
3235         (WTF::FastMallocZone::enumerate): Don't pass in the RemoteMemoryReader since
3236         it is no longer needed.
3237
3238 2012-08-22  Geoffrey Garen  <ggaren@apple.com>
3239
3240         Fixed a fastMallocForbid/Allow compile error for some compilers
3241         https://bugs.webkit.org/show_bug.cgi?id=94775
3242
3243         Reviewed by Gavin Barraclough.
3244
3245         * wtf/FastMalloc.h:
3246         (WTF::fastMallocForbid()):
3247         (WTF::fastMallocAllow()): Export, since these are called by JavaScriptCore.
3248
3249 2012-08-22  Geoffrey Garen  <ggaren@apple.com>
3250
3251         ThreadRestrictionVerifier should be opt-in, not opt-out
3252         https://bugs.webkit.org/show_bug.cgi?id=94761
3253
3254         Reviewed by Mark Hahnenberg.
3255
3256         WebKit's JavaScript engine supports use on multiple threads, so default-on
3257         is not appropriate for most of our objects, and it causes lots of suprious
3258         assertions.
3259
3260         * wtf/MetaAllocator.cpp:
3261         (WTF::MetaAllocatorHandle::MetaAllocatorHandle): No need to turn off
3262         explicitly, since it's off by default now.
3263
3264         * wtf/ThreadRestrictionVerifier.h:
3265         (WTF::ThreadRestrictionVerifier::ThreadRestrictionVerifier): Turn off by default.
3266
3267         (WTF::ThreadRestrictionVerifier::setMutexMode):
3268         (WTF::ThreadRestrictionVerifier::setDispatchQueueMode):
3269         (WTF::ThreadRestrictionVerifier::turnOffVerification): These assertions
3270         about state transitions were inconsistent with each other, and impossible
3271         to maintain with default off, so I removed them.
3272
3273 2012-08-22  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
3274
3275         [Qt] Optionally support smooth-scrolling on all platforms
3276         https://bugs.webkit.org/show_bug.cgi?id=74926
3277
3278         Reviewed by Simon Hausmann.
3279
3280         Initialize GESTURE_ANIMATION feature flag.
3281
3282         * wtf/Platform.h:
3283
3284 2012-08-21  Mark Hahnenberg  <mhahnenberg@apple.com>
3285
3286         WTF Threading leaks kernel objects on platforms that use pthreads
3287         https://bugs.webkit.org/show_bug.cgi?id=94636
3288
3289         Reviewed by Geoffrey Garen.
3290
3291         Creating lots of Web workers on Mac platforms leaks lots of Mach ports. Eventually, the 
3292         process can exhaust its allocation of Mach ports from the kernel, which can then cause 
3293         all sorts of badness, including the inability to allocate new virtual memory from the 
3294         kernel. ThreadingPthreads.cpp and ThreadIdentifierDataPthreads.cpp need to be refactored 
3295         so that we do not leak these kernel resources. I would assume that we also leak kernel 
3296         resources on other pthreads platforms as well.
3297
3298         * wtf/ThreadIdentifierDataPthreads.cpp:
3299         (WTF):
3300         (WTF::ThreadIdentifierData::~ThreadIdentifierData): Now calls the event threadDidExit, which 
3301         handles all relevant tear-down of the thread metadata in the thread map.
3302         * wtf/ThreadingPthreads.cpp: Added a new class called PthreadState that encapsulates the 
3303         state of a thread and the possible transitions between those states.
3304         (PthreadState):
3305         (WTF::PthreadState::PthreadState):
3306         (WTF::PthreadState::joinableState): Returns the current state of the pthread.
3307         (WTF::PthreadState::pthreadHandle): Returns the pthread_t for this particular thread. This needs to 
3308         remain valid even after the thread has exited because somebody could come along at any time in the 
3309         future and call join on the thread.
3310         (WTF::PthreadState::didBecomeDetached): Signals that the thread was detached.
3311         (WTF::PthreadState::didExit): Signals that the thread's exit destructor (~ThreadIdentifierData) has run.
3312         (WTF::PthreadState::didJoin): Signals that the thread has been joined on successfully.
3313         (WTF::PthreadState::hasExited): Returns whether or not the thread's exit destructor has run.
3314         (WTF):
3315         (WTF::identifierByPthreadHandle): Changed to also check hasExited() on the threads it finds in the map. We 
3316         should only have one valid pthread_t in the map, but there are other pthread_t's that need to remain in the 
3317         thread map for when somebody joins on that thread id later.
3318         (WTF::establishIdentifierForPthreadHandle): Changed to put the allocate the new PthreadState data structure and 
3319         put it in the map.
3320         (WTF::pthreadHandleForIdentifierWithLockAlreadyHeld):
3321         (WTF::wtfThreadEntryPoint):
3322         (WTF::waitForThreadCompletion): We now do the relevant cleanup after the specified thread has been 
3323         successfully joined on depending on if the joined thread has already exited.
3324         (WTF::detachThread): Performs relevant cleanup if the thread has already exited. Otherwise signals to the 
3325         PthreadState that the thread has been detached.
3326         (WTF::threadDidExit): Function called by ~ThreadIdentifierData to indicate that the thread has exited. 
3327         Only cleans up after itself if the thread isn't Joinable (i.e. Joined or Detached).
3328
3329 2012-08-21  Ulan Degenbaev  <ulan@chromium.org>
3330
3331         Call AdjustAmountOfExternalAllocatedMemory when V8ArrayBuffer constructed and destructed
3332         https://bugs.webkit.org/show_bug.cgi?id=92993
3333
3334         Reviewed by Kenneth Russell.
3335
3336         Call AdjustAmountOfExternalAllocatedMemory when V8ArrayBuffer
3337         is constructed and destructed so that V8's garbage collection
3338         heuristics can account for the memory held by these objects.
3339
3340         * wtf/ArrayBuffer.h:
3341         (WTF):
3342         (ArrayBufferDeallocationObserver):
3343         (WTF::ArrayBufferContents::ArrayBufferContents):
3344         (WTF::ArrayBufferContents::transfer):
3345         (ArrayBufferContents):
3346         (ArrayBuffer):
3347         (WTF::ArrayBuffer::setDeallocationObserver):
3348         (WTF::ArrayBufferContents::~ArrayBufferContents):
3349
3350 2012-08-21  Benjamin Poulain  <bpoulain@apple.com>
3351
3352         Store CString data in the CStringBuffer to avoid the double indirection
3353         https://bugs.webkit.org/show_bug.cgi?id=94562
3354
3355         Reviewed by Darin Adler.
3356
3357         Previously, any non-trivial CString would require two allocations:
3358         1) CStringBuffer (ref-counted container for CString's data).
3359         2) VectorBuffer's m_buffer (the actual char data).
3360
3361         This patches changes CStringBuffer to hold the data previously owned by
3362         WTF::Vector and WTF::VectorBuffer. This makes CString more efficient
3363         both in CPU time and memory use.
3364
3365         * wtf/text/CString.cpp:
3366         (WTF::CStringBuffer::createUninitialized): This new method allocate the memory
3367         for CStringBuffer and its data. We simply allocate more memory after CStringBuffer
3368         to hold the data.
3369
3370         The extra memory needed to store the terminating zero is now handled by design.
3371         (WTF::CString::CString): Move the test for "str" one level up the stack from CString::init().
3372         This avoid double checking the pointer when using the other constructor.
3373         (WTF::CString::init):
3374         (WTF::CString::newUninitialized):
3375         (WTF::CString::copyBufferIfNeeded):
3376         * wtf/text/CString.h:
3377         (WTF::CStringBuffer::data):
3378         (WTF::CStringBuffer::length):
3379         (CStringBuffer):
3380         (WTF::CStringBuffer::CStringBuffer):
3381         (WTF::CStringBuffer::mutableData):
3382         (WTF::CString::length):
3383
3384 2012-08-21  Patrick Gansterer  <paroga@webkit.org>
3385
3386         Build fix for COMPILER(MSVC) && !CPU(X86) after r126023.
3387
3388         * wtf/MathExtras.h:
3389         (lrint):
3390
3391 2012-08-20  Dominik Röttsches  <dominik.rottsches@intel.com>
3392
3393         The 2d.imageData.object.round canvas test is failing
3394         https://bugs.webkit.org/show_bug.cgi?id=40272
3395
3396         Reviewed by Kenneth Rohde Christiansen.
3397
3398         According to the Uint8ClampedArray spec (http://www.khronos.org/registry/typedarray/specs/latest/#7.1)
3399         which references WebIDL's clamping rules, with implications defined in http://www.w3.org/TR/WebIDL/#es-octet
3400         we need to round to nearest integer, and to the even one if exactly halfway in between.
3401         As a solution: applying C99's lrint which, in default rounding mode, does that.
3402
3403         The updated version of test 2d.imageData.object.round.html test passes now.
3404
3405         * wtf/MathExtras.h:
3406         (lrint): Assembly based implementation for MSVC under X86, otherwise falling back to casting.
3407         * wtf/Uint8ClampedArray.h:
3408         (WTF::Uint8ClampedArray::set): lrint instead of simple rounding.
3409
3410 2012-08-17  Michael Saboff  <msaboff@apple.com>
3411
3412         Add ability to create AtomicString using LChar* buffer and length
3413         https://bugs.webkit.org/show_bug.cgi?id=94381
3414
3415         Reviewed by Geoffrey Garen.
3416
3417         Allows the use of 8 bit string data directly without converting to 16 bits first.
3418
3419         * wtf/text/AtomicString.cpp:
3420         (WTF::LCharBufferTranslator::hash):
3421         (LCharBufferTranslator):
3422         (WTF::LCharBufferTranslator::equal):
3423         (WTF::LCharBufferTranslator::translate):
3424         (WTF::AtomicString::add):
3425         * wtf/text/AtomicString.h:
3426         (WTF::AtomicString::AtomicString):
3427         (AtomicString):
3428         * wtf/text/StringImpl.h:
3429         (StringImpl):
3430
3431 2012-08-17  Benjamin Poulain  <bpoulain@apple.com>
3432
3433         Make it easier to append a literal to StringBuilder
3434         https://bugs.webkit.org/show_bug.cgi?id=94273
3435
3436         Reviewed by Kentaro Hara.
3437
3438         * wtf/text/StringBuilder.h:
3439         (WTF::StringBuilder::appendLiteral): Add the method StringBuilder::appendLiteral() for efficiently
3440         adding a string literal to the StringBuilder.
3441
3442 2012-08-17  Yong Li  <yoli@rim.com>
3443
3444         [BlackBerry] Turn on a few macros for jpeg decoding and image interpolation
3445         https://bugs.webkit.org/show_bug.cgi?id=94244
3446
3447         Reviewed by Antonio Gomes.
3448
3449         Turn on these macros to get better performance.
3450
3451         * wtf/Platform.h:
3452
3453 2012-08-17  Milian Wolff  <milian.wolff@kdab.com>
3454
3455         [Qt] QNX build fails due to ctype usage in system headers
3456         https://bugs.webkit.org/show_bug.cgi?id=93849
3457
3458         Reviewed by Simon Hausmann.
3459
3460         Move the check for whether DisallowCType should be active or not
3461         to the DisallowCType.h header. This way, we can update the list
3462         of platforms or OSes which do not work with this header in a
3463         central place. All users can now safely include the header
3464         and do not need to place custom guards around it.
3465
3466         * config.h:
3467         * wtf/DisallowCType.h:
3468
3469 2012-08-17  Milian Wolff  <milian.wolff@kdab.com>
3470
3471         [Qt] QNX build fails due to missing timegm declaration
3472         https://bugs.webkit.org/show_bug.cgi?id=93842
3473
3474         Reviewed by Simon Hausmann.
3475
3476         On QNX, timegm is declared in nbutils.h and one must link against
3477         nbutils to use it.
3478
3479         * WTF.pri:
3480         * wtf/DateMath.cpp:
3481
3482 2012-08-16  Kent Tamura  <tkent@chromium.org>
3483
3484         Build fix for Chromium-mac.
3485
3486         * wtf/text/WTFString.cpp: Remove unnecessary includes.
3487
3488 2012-08-16  Michael Saboff  <msaboff@apple.com>
3489
3490         HTML Parser should produce 8bit substrings for inline style and script elements
3491         https://bugs.webkit.org/show_bug.cgi?id=93742
3492
3493         Reviewed by Benjamin Poulain.
3494
3495         Added 8 bit path to String::isAllSpecialCharacters(). Added new String creator
3496         that takes a pointer to a UChar array that is known to contain only 8 bit
3497         characters (LChar's). Added new helper method to copy contents of a
3498         UChar buffer to a LChar buffer. The helper method includes X86-64 intrinsics
3499         of SSE family instructions for performance.
3500
3501         * wtf/Alignment.h:
3502         (WTF::isAlignedTo):
3503         * wtf/text/ASCIIFastPath.h:
3504         (WTF::copyLCharsFromUCharSource):
3505         * wtf/text/WTFString.cpp:
3506         (WTF::String::make8BitFrom16BitSource):
3507         * wtf/text/WTFString.h:
3508         (String):
3509         (WTF::isAllSpecialCharacters):
3510         (WTF::String::isAllSpecialCharacters):
3511
3512 2012-08-16  Benjamin Poulain  <bpoulain@apple.com>
3513
3514         Use initialization from literals for StringStatics
3515         https://bugs.webkit.org/show_bug.cgi?id=94185
3516
3517         Reviewed by Geoffrey Garen.
3518
3519         * wtf/text/StringStatics.cpp:
3520         Remove the arguments for DEFINE_GLOBAL. They are no longer used by the macro.
3521         (WTF::AtomicString::init):
3522         Use ConstructFromLiteral to initialize the strings faster and to save memory.
3523
3524 2012-08-14  Milian Wolff  <milian.wolff@kdab.com>
3525
3526         [Qt] QNX build fails due to reference to MADV_FREE_REUSE and MADV_FREE_REUSABLE
3527         https://bugs.webkit.org/show_bug.cgi?id=93843
3528
3529         Reviewed by Simon Hausmann.
3530
3531         QNX does not implement MADV_FREE_REUSE nor MADV_FREE_REUSABLE.
3532         The Blackberry port already sets the define to use the system
3533         malloc, which is now also done for QNX in general.
3534
3535         * wtf/Platform.h:
3536
3537 2012-08-13  Raphael Kubo da Costa  <rakuco@webkit.org>
3538
3539         [CMake] Remove glib-related Find modules and write single new one instead.
3540         https://bugs.webkit.org/show_bug.cgi?id=93786
3541
3542         Reviewed by Rob Buis.
3543
3544         * wtf/PlatformEfl.cmake: Use GLIB_* instead of Glib_*, and link directly to GIO, as wtf/gobject uses functions from it.
3545
3546 2012-08-11  Sam Weinig  <sam@webkit.org>
3547
3548         Enable XPC Service based WebProcess with runtime flag
3549         https://bugs.webkit.org/show_bug.cgi?id=93773
3550
3551         Reviewed by Dan Bernstein.
3552
3553         * wtf/Platform.h:
3554         Define HAVE_XPC on 10.7 and later.
3555
3556 2012-08-11  Benjamin Poulain  <bpoulain@apple.com>
3557
3558         Do the DecimalNumber to String conversion on 8 bits
3559         https://bugs.webkit.org/show_bug.cgi?id=93683
3560
3561         Reviewed by Andreas Kling.
3562
3563         Modify DecimalNumber to do the conversion to string on LChar instead of UChar.
3564
3565         * wtf/DecimalNumber.cpp:
3566         (WTF::DecimalNumber::toStringDecimal):
3567         (WTF::DecimalNumber::toStringExponential):
3568         * wtf/DecimalNumber.h:
3569         (DecimalNumber):
3570         * wtf/dtoa.h:
3571         * wtf/text/StringBuffer.h:
3572         (WTF::StringBuffer::operator[]): StringBuffer::operator[] was incorrectly typed to UChar, making
3573         the method impossible to instanciate with LChar.
3574         * wtf/text/WTFString.h:
3575         (String):
3576         (WTF::String::adopt): String::adopt() is modified to work with both LChar and UChar. StringImpl
3577         already support that.
3578         (WTF::appendNumber): Add support for any type that can instanciate the template.
3579
3580 2012-08-11  Benjamin Poulain  <benjamin@webkit.org>
3581
3582         WebCore::findAtomicString(PropertyName) always convert the name to 16bits
3583         https://bugs.webkit.org/show_bug.cgi?id=93685
3584
3585         Reviewed by Geoffrey Garen.
3586
3587         Previously, WebCore::findAtomicString() was causing a conversion for the 8bit property name
3588         to a 16bits due to the call to StringImpl::character16().
3589
3590         This patch fixes the issue by adding support for both 8bits and 16bits string in AtomicString::find().
3591
3592         * wtf/text/AtomicString.cpp:
3593         (HashAndCharacters):
3594         (WTF::HashAndCharactersTranslator::hash):
3595         (WTF::HashAndCharactersTranslator::equal):
3596         (WTF::HashAndCharactersTranslator::translate):
3597         Use a template to make the struct and the translator independant of the CharacterType.
3598
3599         (WTF::AtomicString::add):
3600         (WTF::findString):
3601         (WTF::AtomicString::find): Change the API to take a StringImpl*. AtomicString can use
3602         it efficiently to find the right string.
3603         * wtf/text/AtomicString.h:
3604         (AtomicString):
3605         * wtf/text/StringImpl.h:
3606         (StringImpl): Adapt the friends translator to support the template.
3607
3608 2012-08-10  Benjamin Poulain  <bpoulain@apple.com>
3609
3610         Add support for String initialization from literal to WTFString
3611         https://bugs.webkit.org/show_bug.cgi?id=93426
3612
3613         Reviewed by Anders Carlsson.
3614
3615         This patch adds two constructor to WTF::String in order to support fast initialization from literal:
3616         -String(ASCIILiteral): Constructor similar to String(const char*) while being faster. This constructor
3617          does not incur any overhead over String(const char*).
3618         -String(char[], ConstructFromLiteralTag): Template constructor that encode explicitely the size of the
3619          string.
3620
3621         String(ASCIILiteral) is expected to be used in most cases to avoid regressions. This constructor was
3622         added because of what we have learned from r124922: inlining the string length in the code causes a code bloat
3623         that is not always welcome.
3624
3625         Regarding performance of string initialization, the constructors performance are (6 characters string):
3626         -String(ASCIILiteral): 16% faster.
3627         -String(char[], ConstructFromLiteralTag): 33% faster (the delta increases with the string length).
3628
3629         In addition, no memory is allocated for the characters.
3630
3631         * wtf/text/StringImpl.cpp:
3632         * wtf/text/StringImpl.h:
3633         (WTF::StringImpl: