1 2014-04-10 Brent Fulgham <bfulgham@apple.com>
3 [Win] Clean up some 64-bit warnings from Visual Studio analyzer
4 https://bugs.webkit.org/show_bug.cgi?id=131514
6 Reviewed by Tim Horton.
8 * WTF.vcxproj/WTF.vcxproj: Use correct platform settings for
11 * wtf/CurrentTime.cpp:
12 (WTF::highResUpTime): Resolve warning about deprecated API.
13 * wtf/StackBounds.cpp:
14 (WTF::StackBounds::initialize): Silence warning about
15 an uninitialized variable.
17 2014-04-09 Geoffrey Garen <ggaren@apple.com>
19 Rolled back in r166972.
21 This time, we conditionally exclude linking against bmalloc in Production
22 builds. Production builds will not be able to link against bmalloc
23 until the Production build system has been updated to build bmalloc.
25 WTF should link against bmalloc
26 https://bugs.webkit.org/show_bug.cgi?id=131403
28 Reviewed by Mark Rowe.
30 * Configurations/WTF.xcconfig:
31 * WTF.xcodeproj/project.pbxproj:
33 2014-04-09 Geoffrey Garen <ggaren@apple.com>
35 Put bmalloc headers in the right place
36 https://bugs.webkit.org/show_bug.cgi?id=131464
38 Reviewed by Mark Rowe.
40 * wtf/FastMalloc.cpp: Use "<bmalloc/...>" syntax so we can find our
41 headers in <header-root>/usr/local/include/bmalloc/.
43 2014-04-09 Geoffrey Garen <ggaren@apple.com>
45 Rolled back out r166972.
47 The production buildbots are still broken because the build-root script
48 doesn't build bmalloc.
50 * WTF.xcodeproj/project.pbxproj:
52 2014-04-09 Geoffrey Garen <ggaren@apple.com>
54 Rolled back in r166972.
56 The iOS buildbot's scripts have been updated to build bmalloc, so the
57 build should now succeed on the bot.
59 Also renamed "Frameworks" to "Libraries" as suggested in a review comment.
61 WTF should link against bmalloc
62 https://bugs.webkit.org/show_bug.cgi?id=131403
64 Reviewed by Michael Saboff.
66 This is required to build successfullly with bmalloc enabled.
68 * WTF.xcodeproj/project.pbxproj:
70 2014-04-08 Geoffrey Garen <ggaren@apple.com>
72 Stop linking WTF against bmalloc.
74 Reviewed by Enrica Casucci.
76 This seems to have broken an iOS buildbot script. Disable it for now
77 until we can fix the script.
79 * WTF.xcodeproj/project.pbxproj:
81 2014-04-08 Geoffrey Garen <ggaren@apple.com>
83 WTF should link against bmalloc
84 https://bugs.webkit.org/show_bug.cgi?id=131403
86 Reviewed by Michael Saboff.
88 This is required to build successfullly with bmalloc enabled.
90 * WTF.xcodeproj/project.pbxproj:
92 2014-04-08 Geoffrey Garen <ggaren@apple.com>
94 Added a bmalloc back-end for FastMalloc
95 https://bugs.webkit.org/show_bug.cgi?id=131387
97 Reviewed by Andreas Kling.
99 We'll need to rethink some things if we adopt this back-end. For example,
100 fastMallocSize() and fastMallocGoodSize() are no longer real things. But,
101 this is enough to test for now.
103 * wtf/FastMalloc.cpp:
108 (WTF::fastMallocSize):
109 (WTF::fastMallocGoodSize):
110 (WTF::tryFastMalloc):
111 (WTF::tryFastRealloc):
112 (WTF::tryFastCalloc):
113 (WTF::releaseFastMallocFreeMemory):
114 (WTF::fastMallocStatistics):
116 2014-04-08 Andres Gomez <agomez@igalia.com>
118 [GTK] [EFL] Build fails with GCC < 4.8.x
119 https://bugs.webkit.org/show_bug.cgi?id=130585
121 Reviewed by Martin Robinson.
123 The behavior in lower versions of GCC seem to be related to
124 http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#2132.
126 Provided explicit casts for the failing ambiguous overloads.
128 * wtf/gtk/MainThreadGtk.cpp:
129 (WTF::scheduleDispatchFunctionsOnMainThread):
130 * wtf/gtk/RunLoopGtk.cpp:
131 (WTF::RunLoop::wakeUp): Provided lambda with a RefPtr instead of
132 ref and de-referring.
134 2014-04-04 Mark Lam <mark.lam@apple.com>
136 Date object needs to check for ES5 15.9.1.14 TimeClip limit.
137 <https://webkit.org/b/131248>
139 Reviewed by Mark Hahnenberg.
142 - Moved the definition of maxECMAScriptTime to the .h file so that we
143 can use it in other files as well.
145 - Removed a stale comment for parseDateFromNullTerminatedCharacters().
148 2014-04-04 Mark Hahnenberg <mhahnenberg@apple.com>
151 https://bugs.webkit.org/show_bug.cgi?id=131246
153 Reviewed by Geoff Garen.
155 Remove OBJECT_MARK_LOGGING
157 * wtf/FeatureDefines.h:
160 2014-04-03 Zsolt Borbely <zsborbely.u-szeged@partner.samsung.com>
162 [EFL] Enable CSS JIT again, it works fine after r166666.
164 Reviewed by Csaba Osztrogonác.
168 2014-04-03 Javier Fernandez <jfernandez@igalia.com>
170 [GTK][Cmake] Enable CSS JIT
171 https://bugs.webkit.org/show_bug.cgi?id=131022
173 Reviewed by Martin Robinson.
175 * wtf/Platform.h: Enable CSS JIT for GTK port.
177 2014-04-02 Frédéric Wang <fred.wang@free.fr>
179 Operator stretching: read the Open Type MATH table
180 https://bugs.webkit.org/show_bug.cgi?id=130324
182 Reviewed by Chris Fleizach.
184 * wtf/Platform.h: enable OPENTYPE_MATH on platforms that can read OpenType tables.
186 2014-04-02 Alex Christensen <achristensen@webkit.org>
188 [WinCairo] Build fix with GMainLoopSource.
189 https://bugs.webkit.org/show_bug.cgi?id=131089
191 Reviewed by Carlos Garcia Campos.
193 * wtf/gobject/GMainLoopSource.cpp:
194 Only compile if glib is used, which fixes compile errors with video disabled in WinCairo.
195 * wtf/gobject/GMainLoopSource.h:
196 Export the GMainLoopSource functions to WTF.dll to link with where they are called in the GStreamer code.
197 Also removed spaces to appease style bot.
199 2014-04-01 Zsolt Borbely <zsborbely.u-szeged@partner.samsung.com>
201 [EFL] REGRESSION(166569): It made DoYouEvenBench/Full.html, CSS/QuerySelector.html and Dromaeo performance tests crash
202 https://bugs.webkit.org/show_bug.cgi?id=131039
204 Reviewed by Csaba Osztrogonác.
206 * wtf/Platform.h: Disable CSS JIT on EFL until proper fix.
208 2014-04-01 Commit Queue <commit-queue@webkit.org>
210 Unreviewed, rolling out r166583.
211 https://bugs.webkit.org/show_bug.cgi?id=131040
213 It's causing frequent crashes when running Layout Tests
214 (Requested by svillar on #webkit).
218 "[GTK][Cmake] Enable CSS JIT"
219 https://bugs.webkit.org/show_bug.cgi?id=131022
220 http://trac.webkit.org/changeset/166583
222 2014-04-01 Javier Fernandez <jfernandez@igalia.com>
224 [GTK][Cmake] Enable CSS JIT
225 https://bugs.webkit.org/show_bug.cgi?id=131022
227 Reviewed by Martin Robinson.
229 * wtf/Platform.h: Enable CSS JIT for GTK port.
231 2014-04-01 Gyuyoung Kim <gyuyoung.kim@samsung.com>
233 [CMake][EFL] Enable CSS JIT
234 https://bugs.webkit.org/show_bug.cgi?id=131010
236 Reviewed by Benjamin Poulain.
238 * wtf/Platform.h: Enable CSS JIT for EFL port.
240 2014-03-31 Dean Jackson <dino@apple.com>
242 Remove WEB_ANIMATIONS
243 https://bugs.webkit.org/show_bug.cgi?id=130989
245 Reviewed by Simon Fraser.
247 Remove this feature flag until we plan to implement.
249 * wtf/FeatureDefines.h:
251 2014-03-31 Alex Christensen <achristensen@webkit.org>
253 Preparation for using Soup on Windows.
254 https://bugs.webkit.org/show_bug.cgi?id=130615
256 Reviewed by Carlos Garcia Campos.
258 * WTF.vcxproj/WTF.vcxproj:
259 * WTF.vcxproj/WTF.vcxproj.filters:
260 Add all gobject source files in WinCairo build.
261 * wtf/gobject/GRefPtr.h:
262 Export refGPtr and derefGPtr overloads in WTF.dll to fix linker errors with WebKit.dll when using soup.
264 2014-03-31 Zan Dobersek <zdobersek@igalia.com>
266 Use std::unique_ptr in WTF::CompressedVector, WTF::GenericCompressedData
267 https://bugs.webkit.org/show_bug.cgi?id=130737
269 Switch to using std::unique_ptr instead of OwnPtr and PassOwnPtr
270 for the CompressedVector and GenericCompressedData classes.
272 * wtf/Compression.cpp:
273 (WTF::GenericCompressedData::create):
275 (WTF::CompressedVector::create):
276 (WTF::CompressibleVector::decompressIfNecessary):
278 2014-03-28 Alexey Proskuryakov <ap@apple.com>
280 [Mac] Enable async text input implementation
281 https://bugs.webkit.org/show_bug.cgi?id=130856
283 Reviewed by Sam Weinig.
285 * wtf/Platform.h: Added a USE macro definition.
287 2014-03-28 peavo@outlook.com <peavo@outlook.com>
289 Null pointer crash in String::append(UChar).
290 https://bugs.webkit.org/show_bug.cgi?id=130900
292 Reviewed by Michael Saboff.
294 * wtf/text/WTFString.cpp:
295 (WTF::String::append): Check and initialize m_impl member first, to avoid null pointer crash.
297 2014-03-27 Commit Queue <commit-queue@webkit.org>
299 Unreviewed, rolling out r166360.
300 https://bugs.webkit.org/show_bug.cgi?id=130869
302 Seems to have broken PLT (Requested by ap on #webkit).
306 "Connection::dispatchOneMessage() can be re-entered while
307 handling Cmd-key menu"
308 https://bugs.webkit.org/show_bug.cgi?id=130767
309 http://trac.webkit.org/changeset/166360
311 2014-03-27 Alexey Proskuryakov <ap@apple.com>
313 Connection::dispatchOneMessage() can be re-entered while handling Cmd-key menu
314 equivalents, ASSERT(!_data->_keyDownEventBeingResent)
315 https://bugs.webkit.org/show_bug.cgi?id=130767
316 <rdar://problem/16307487>
318 Reviewed by Darin Adler.
320 Changed RunLoop to wake up and fire timers only in default run loop mode by default,
321 and added an ability to add more modes (can't use AppKit symbols in WTF).
323 In addition to this bug, the change also blocks modal alerts from appearing under
324 menus during menu tracking.
327 * wtf/cf/RunLoopCF.cpp:
328 (WTF::RunLoop::RunLoop):
329 (WTF::RunLoop::addModeForWakeUpAndTimers):
330 (WTF::RunLoop::TimerBase::start):
332 2014-03-26 Zan Dobersek <zdobersek@igalia.com>
334 Unreviewed. Removing the remaining Automake cruft.
336 * GNUmakefile.list.am: Removed.
338 2014-03-25 Martin Robinson <mrobinson@igalia.com>
340 [GTK] Remove the autotools build
341 https://bugs.webkit.org/show_bug.cgi?id=130717
343 Reviewed by Anders Carlsson.
345 * GNUmakefile.am: Removed.
346 * config.h: Removed references to the autotools configure file.
348 2014-03-25 Gabor Rapcsanyi <rgabor@webkit.org>
350 [ARM64] GCC generates wrong code with -O2 flag in WTF::weakCompareAndSwap
351 https://bugs.webkit.org/show_bug.cgi?id=130500
353 Reviewed by Filip Pizlo.
355 Set the first operand to the exact register in the inline assembly with GCC.
358 (WTF::weakCompareAndSwap):
360 2014-03-25 Gabor Rapcsanyi <rgabor@webkit.org>
362 [EFL] Add ARM64 build support
363 https://bugs.webkit.org/show_bug.cgi?id=130506
365 Rubber stamped by Gyuyoung Kim.
367 * wtf/Platform.h: Set WTF_CPU_ARM64 when __aarch64__ is defined.
369 2014-03-24 Andy Estes <aestes@apple.com>
373 * wtf/ThreadingPthreads.cpp:
374 (WTF::createThreadInternal):
375 (WTF::setCurrentThreadQOSUtility):
377 2014-03-24 Gavin Barraclough <barraclough@apple.com>
379 Add support for thread QoS
380 https://bugs.webkit.org/show_bug.cgi?id=130688
382 Speculative EFL build fix.
384 * wtf/ThreadingPthreads.cpp:
385 (WTF::setCurrentThreadQOSUtility):
387 2014-03-24 Gavin Barraclough <barraclough@apple.com>
389 Add support for thread QoS
390 https://bugs.webkit.org/show_bug.cgi?id=130688
392 Reviewed by Andreas Kling.
394 * wtf/FastMalloc.cpp:
395 (WTF::TCMalloc_PageHeap::runScavengerThread):
396 - block freeing is a utility activity.
399 * wtf/ThreadingPthreads.cpp:
400 (WTF::createThreadInternal):
401 - default to interactive.
402 (WTF::setCurrentThreadQOSUtility):
404 * wtf/ThreadingWin.cpp:
405 (WTF::setCurrentThreadQOSUtility):
406 - no-op implementation.
408 2014-03-23 Hyowon Kim <hw1008.kim@samsung.com>
410 Move all EFL typedefs into EflTypedefs.h.
411 https://bugs.webkit.org/show_bug.cgi?id=130511
413 Reviewed by Gyuyoung Kim.
415 * wtf/Platform.h: include EflTypedefs.h.
416 * wtf/efl/EflTypedefs.h: Added.
417 * wtf/efl/RefPtrEfl.h: Remove EFL typedefs.
419 2014-03-22 Darin Adler <darin@apple.com>
421 Remove String::deprecatedCharacters
422 https://bugs.webkit.org/show_bug.cgi?id=126854
424 Reviewed by Sam Weinig.
426 * wtf/text/StringBuilder.cpp:
427 (WTF::StringBuilder::reifyString): Removed code to update 16-bit shadow.
429 * wtf/text/StringBuilder.h: Removed deprecatedCharacters.
430 (WTF::StringBuilder::StringBuilder): Removed m_valid16BitShadowLength.
431 (WTF::StringBuilder::clear): Removed code to clear m_valid16BitShadowLength.
432 (WTF::StringBuilder::swap): Removed code to swap m_valid16BitShadowLength.
434 * wtf/text/StringImpl.cpp:
435 (WTF::StringImpl::~StringImpl): Removed code to free m_copyData16.
436 (WTF::StringImpl::upper): Use StringView::upconvertedCharacters for slow case.
437 (WTF::StringImpl::lower): Ditto.
438 (WTF::StringImpl::find): Use characters8/16 rather than deprecatedCharacters.
439 Added an 8-bit code path to one of the overloads. Might want to revisit later
440 to decide whether to use templates instead of copy/paste, or even use StringView
441 to cut down on duplicate code paths.
442 (WTF::StringImpl::findIgnoringCase): Ditto.
443 (WTF::StringImpl::sizeInBytes): Remove code to handle has16BitShadow case.
444 (WTF::equalIgnoringNullity): Added. To be called by the Vector template in the header.
446 * wtf/text/StringImpl.h: Removed deprecatedCharacters, has16BitShadow,
447 upconvertCharacters, getData16SlowCase, s_hashFlagHas16BitShadow, and m_copyData16.
448 (WTF::equalIgnoringNullity): Changed the template function into an inline that calls
449 a non-inline helper function. The non-inline function handles both 8-bit and 16-bit
452 * wtf/text/StringView.h:
453 (WTF::StringView::StringView): Added an overload so we can make one of these directly
454 from a StringImpl without first wrapping it in a string. Added an adapter so we can
455 use StringView as part of string concatenation. Added an append function so we can
456 append to a Vector<UChar>.
458 * wtf/text/WTFString.cpp:
459 (WTF::String::append): Use StringView::getCharactersWithUpconvert. Also changed
460 single-character append so it won't always turn an 8-bit string into a 16-bit one.
461 (WTF::String::insert): Removed one insert overload and changed the other to use
462 StringView::getCharactersWithUpconvert.
463 (WTF::String::truncate): Changed to use StringImpl::substring.
464 (WTF::String::percentage): Added characters8/16 paths instead of using
465 deprecatedCharacters.
467 * wtf/text/WTFString.h: Removed deprecatedCharacters, getCharactersWithUpconvert,
468 insert(UChar*, unsigned, unsigned), and the append overload for Vector<UChar>.
470 2014-03-20 Darin Adler <darin@apple.com>
472 Fix a header guard mistake (harmless but clearly wrong)
473 https://bugs.webkit.org/show_bug.cgi?id=130559
475 Reviewed by Andreas Kling.
477 * wtf/text/StringConcatenate.h: Correct the macro name in the header guard.
479 2014-03-20 Hyowon Kim <hw1008.kim@samsung.com>
481 Move to using std::unique_ptr for EFL objects.
482 https://bugs.webkit.org/show_bug.cgi?id=129853
484 Reviewed by Gyuyoung Kim.
486 EflUniquePtr is a template alias of std::unique_ptr
487 with a custom deleter for each Efl Objects, which is motivated by GUniquePtr.
488 This patch replaces uses of OwnPtr and PassOwnPtr for Efl objects with EflUniquePtr.
490 * wtf/OwnPtrCommon.h:
491 * wtf/PlatformEfl.cmake:
493 * wtf/efl/MainThreadEfl.cpp:
495 (WTF::initializeMainThreadPlatform):
496 * wtf/efl/OwnPtrEfl.cpp: Removed.
497 * wtf/efl/RunLoopEfl.cpp:
498 (WTF::RunLoop::RunLoop):
499 * wtf/efl/UniquePtrEfl.h: Added.
500 (WTF::EflPtrDeleter::operator()):
502 2014-03-20 Gavin Barraclough <barraclough@apple.com>
504 Remove IdentifierTable typedef, isIdentifier()
505 https://bugs.webkit.org/show_bug.cgi?id=130533
507 Rubber stamped by Geoff Garen.
509 Code should use AtomicStringTable, isAtomic() directly.
511 * wtf/WTFThreadData.h:
512 (WTF::WTFThreadData::setCurrentAtomicStringTable):
513 (WTF::WTFThreadData::resetCurrentAtomicStringTable):
514 - removed IdentifierTypedef.
515 * wtf/text/StringImpl.h:
516 (WTF::StringImpl::flagIsAtomic):
517 - renamed flagIsIdentfier -> flagIsAtomic.
519 2014-03-20 Gavin Barraclough <barraclough@apple.com>
521 Merge AtomicString, Identifier
522 https://bugs.webkit.org/show_bug.cgi?id=128624
524 Reviewed by Geoff Garen.
526 WTF::StringImpl currently supports two uniquing mechanism - AtomicString and
527 Identifer - that is one too many.
529 Remove Identifier in favour of AtomicString. Identifier had two interesting
530 mechanisms that we preserve.
532 (1) JSC API VMs each get their own string table, switch the string table on
534 (2) JSC caches a pointer to the string table on the VM to avoid a thread
535 specific access. Adds a new AtomicString::add method to support this.
537 * wtf/WTFThreadData.cpp:
538 (WTF::WTFThreadData::WTFThreadData):
539 - remove allocation of IdentifierTable.
540 (WTF::WTFThreadData::~WTFThreadData):
541 - remove deletion of IdentifierTable.
542 * wtf/WTFThreadData.h:
543 (WTF::WTFThreadData::atomicStringTable):
544 - table is now switched by JSC API, return the current table.
545 (WTF::WTFThreadData::currentIdentifierTable):
546 - now returns the current AtomicStringTable.
547 (WTF::WTFThreadData::setCurrentIdentifierTable):
548 - now sets the current AtomicStringTable.
549 (WTF::WTFThreadData::resetCurrentIdentifierTable):
550 - now resets the AtomicStringTable.
551 * wtf/text/AtomicString.cpp:
552 (WTF::AtomicString::addSlowCase):
553 - add without thread-specific access to access string table.
554 * wtf/text/AtomicString.h:
555 (WTF::AtomicString::addWithStringTableProvider):
556 - add without thread-specific access (used by JSC, string table provided by VM or ExecState).
557 * wtf/text/AtomicStringTable.cpp:
558 (WTF::AtomicStringTable::create):
559 - renamed m_atomicStringTable -> m_defaultAtomicStringTable.
560 (WTF::AtomicStringTable::~AtomicStringTable):
561 (WTF::AtomicStringTable::destroy):
562 - clearing of table moved from AtomicStringTable::destroy to destructor.
563 * wtf/text/AtomicStringTable.h:
565 * wtf/text/StringImpl.cpp:
566 (WTF::StringImpl::~StringImpl):
567 - Identifers no longer exist; no need to remove them from IdentifierTable.
568 * wtf/text/StringImpl.h:
569 (WTF::StringImpl::StringImpl):
570 - removed s_hashFlagIsIdentifier.
571 (WTF::StringImpl::flagIsIdentifier):
572 - s_hashFlagIsIdentifier -> s_hashFlagIsAtomic.
573 (WTF::StringImpl::isIdentifier):
574 - now synonymous to isAtomic().
575 * wtf/text/StringStatics.cpp:
576 (WTF::StringImpl::hashAndFlagsForEmptyUnique):
577 - removed s_hashFlagIsIdentifier.
579 2014-03-20 Zan Dobersek <zdobersek@igalia.com>
581 Unreviewed Clang build fix for the GTK port after r165952.
583 * wtf/gobject/GMainLoopSource.h: Include the <functional> header for the std::function<> objects.
585 2014-03-18 Carlos Garcia Campos <cgarcia@igalia.com>
587 [GLIB] Add GMainLoopSource class to wrap idle and timeout sources
588 https://bugs.webkit.org/show_bug.cgi?id=130027
590 Reviewed by Martin Robinson.
592 GLib main loop sources like idle and timeouts are sometimes
593 unconvenient to use and it's very common to forget canceling the
594 source when the object is destroyed or reset the source ID in the
595 callback when called. GMainLoopSource is a wrapper class to make it
596 easier to handle sources and also to avoid those typical mistakes.
597 It forces to create sources with a name and the user doesn't have
598 to deal with the source ID anymore. The source is cancelled when
599 the object is deleted or when a new source is scheduled. It uses
600 std::function for callbacks so that we no longer need to use the
601 "proxy" static callbacks either. We can use std::bind to use a
602 function pointer or a member or even lambda functions. It also handles
603 repeating sources automatically depending on whether the given
604 function returns a bool or not.
606 * GNUmakefile.list.am:
607 * wtf/PlatformEfl.cmake:
608 * wtf/PlatformGTK.cmake:
610 * wtf/gobject/GMainLoopSource.cpp: Added.
611 (WTF::GMainLoopSource::createAndDeleteOnDestroy):
612 (WTF::GMainLoopSource::GMainLoopSource):
613 (WTF::GMainLoopSource::~GMainLoopSource):
614 (WTF::GMainLoopSource::cancel):
615 (WTF::GMainLoopSource::reset):
616 (WTF::GMainLoopSource::scheduleIdleSource):
617 (WTF::GMainLoopSource::schedule):
618 (WTF::GMainLoopSource::scheduleTimeoutSource):
619 (WTF::GMainLoopSource::scheduleAfterDelay):
620 (WTF::GMainLoopSource::voidCallback):
621 (WTF::GMainLoopSource::boolCallback):
622 (WTF::GMainLoopSource::socketCallback):
623 (WTF::GMainLoopSource::destroy):
624 (WTF::GMainLoopSource::voidSourceCallback):
625 (WTF::GMainLoopSource::boolSourceCallback):
626 (WTF::GMainLoopSource::socketSourceCallback):
627 * wtf/gobject/GMainLoopSource.h: Added.
628 (WTF::GMainLoopSource::isScheduled):
629 * wtf/gtk/MainThreadGtk.cpp:
630 (WTF::scheduleDispatchFunctionsOnMainThread):
631 * wtf/gtk/RunLoopGtk.cpp:
632 (WTF::RunLoop::wakeUp):
633 (WTF::RunLoop::TimerBase::TimerBase):
634 (WTF::RunLoop::TimerBase::start):
635 (WTF::RunLoop::TimerBase::stop):
636 (WTF::RunLoop::TimerBase::isActive):
638 2014-03-19 Gavin Barraclough <barraclough@apple.com>
640 https://bugs.webkit.org/show_bug.cgi?id=130494
641 EmptyUnique strings are Identifiers/Atomic
643 Reviewed by Geoff Garen.
645 EmptyUnique strings should set the Identifier/Atomic flag.
647 * wtf/text/AtomicString.h:
648 (WTF::AtomicString::add):
649 - Previously we assumed the only StringImpl that was validly allowed to claim to be
650 Atomic but not be in a table was the canonical empty string. Now that EmptyUniques
651 are also marked Atomic, all empty strings may pass this condition.
652 * wtf/text/StringImpl.cpp:
653 (WTF::StringImpl::~StringImpl):
654 - EmptyUnique strings are not in the Atomic/Identfiier tabels, so don't need removing.
655 * wtf/text/StringImpl.h:
656 (WTF::StringImpl::StringImpl):
657 - Change EmptyUnique constructor to call hashAndFlagsForEmptyUnique.
658 * wtf/text/StringStatics.cpp:
659 (WTF::StringImpl::hashAndFlagsForEmptyUnique):
660 - Allocate a sequential hash code (this should be just as good for distribution & better
661 for debugging than the random value) and set flags, now including Atomic & Identifier.
663 2014-03-19 Gavin Barraclough <barraclough@apple.com>
665 Small cleanup of empty string
666 https://bugs.webkit.org/show_bug.cgi?id=130438
668 Reviewed by Anders Carlson.
670 The empty string is weird becuase it is used as the impl for an AtomicString, but isAtomic()
672 Also, we set a valid pointer for the characters pointer due to an old PCRE bug; remove this.
673 Also, we currently only create one 'static' string, the empty string. Adding more might break
674 assumtions, inhibit the constructor from being used to create other static strings for now.
676 * wtf/text/AtomicString.h:
677 (WTF::AtomicString::add):
679 * wtf/text/StringImpl.h:
680 (WTF::StringImpl::StringImpl):
681 - Merge ConstructStaticString constructors, only allow the empty static string to be constructed.
682 * wtf/text/StringStatics.cpp:
683 (WTF::StringImpl::empty):
684 - ConstructStaticString -> ConstructEmptyString, remove arguments, DEPRECATED_DEFINE_STATIC_LOCAL -> NeverDestroyed.
686 2014-03-18 Darin Adler <darin@apple.com>
688 Reduce use of deprecatedCharacters in WebCore
689 https://bugs.webkit.org/show_bug.cgi?id=130318
691 Reviewed by Andreas Kling.
693 * wtf/text/WTFString.h: Export another overload of charactersToFloat since it's used
696 * wtf/text/cf/StringViewCF.cpp: Change so this can build on Windows.
698 * WTF.vcxproj/WTF.vcxproj: Added StringViewCF.cpp.
699 * WTF.vcxproj/WTF.vcxproj.filters: Added StringViewCF.cpp.
701 2014-03-18 Filip Pizlo <fpizlo@apple.com>
705 Rubber stamped by Dan Bernstein and Mark Hahnenberg.
709 2014-03-17 Darin Adler <darin@apple.com>
711 Remove most uses of deprecatedCharacter in WTF
712 https://bugs.webkit.org/show_bug.cgi?id=130317
714 Reviewed by Andreas Kling.
716 Re-landing after fixing the "80 instead of 0x80" typo in equalLatin1WithUTF8.
718 * wtf/text/AtomicString.cpp:
719 (WTF::HashAndUTF8CharactersTranslator::equal): Add an 8-bit code path to the
721 (WTF::SubstringTranslator8::hash): Added.
722 (WTF::SubstringTranslator8::equal): Added.
723 (WTF::SubstringTranslator16::hash): Renamed class.
724 (WTF::SubstringTranslator16::equal): Ditto.
725 (WTF::AtomicString::add): Added an 8-bit code path to the substring case.
727 * wtf/text/Base64.cpp:
728 (WTF::base64Decode): Added an 8 bit code path.
729 (WTF::base64URLDecode): Ditto.
731 * wtf/text/StringImpl.cpp:
732 (WTF::StringImpl::find): Fixed a case that was incorrectly using characters16
733 without first using is8Bit. Need to return later to remove use of deprecatedCharacters.
735 * wtf/unicode/UTF8.cpp:
736 (WTF::Unicode::equalUTF16WithUTF8): Added a case for when the UTF-16 characters
737 are ASCII. Also removed the aEnd argument, since the caller only calls this when the
739 (WTF::Unicode::equalLatin1WithUTF8): Added.
740 * wtf/unicode/UTF8.h: Updated as described above.
742 2014-03-17 Commit Queue <commit-queue@webkit.org>
744 Unreviewed, rolling out r165721.
745 https://bugs.webkit.org/show_bug.cgi?id=130367
747 It makes the debug bots flaky (Requested by benjaminp on
752 "Remove most uses of deprecatedCharacter in WTF"
753 https://bugs.webkit.org/show_bug.cgi?id=130317
754 http://trac.webkit.org/changeset/165721
756 2014-03-17 Zan Dobersek <zdobersek@igalia.com>
758 Use RunLoop objects through references instead of pointers
759 https://bugs.webkit.org/show_bug.cgi?id=130313
761 Reviewed by Andreas Kling.
763 Make RunLoop::current() and RunLoop::main() return a RunLoop reference instead
764 of a pointer. RunLoop::Holder now uses a Ref<RunLoop> member. Timer and TimerBase
765 constructors take in a RunLoop reference, with TimerBase now storing a RunLoop
766 reference member instead of a pointer. Platform-specific bits of the RunLoop
767 class are updated accordingly.
770 (WTF::RunLoop::Holder::Holder):
771 (WTF::RunLoop::Holder::runLoop):
772 (WTF::RunLoop::initializeMainRunLoop):
773 (WTF::RunLoop::current):
774 (WTF::RunLoop::main):
775 (WTF::RunLoop::isMain):
777 (WTF::RunLoop::Timer::Timer):
778 * wtf/cf/RunLoopCF.cpp:
780 (WTF::RunLoop::TimerBase::TimerBase):
781 (WTF::RunLoop::TimerBase::start):
782 * wtf/efl/RunLoopEfl.cpp:
783 (WTF::RunLoop::TimerBase::TimerBase):
784 * wtf/gtk/RunLoopGtk.cpp:
786 (WTF::RunLoop::TimerBase::TimerBase):
787 (WTF::RunLoop::TimerBase::start):
788 * wtf/win/RunLoopWin.cpp:
789 (WTF::RunLoop::TimerBase::TimerBase):
790 (WTF::RunLoop::TimerBase::start):
791 (WTF::RunLoop::TimerBase::stop):
792 (WTF::RunLoop::TimerBase::isActive):
794 2014-03-17 Tamas Gergely <tgergely.u-szeged@partner.samsung.com>
796 One more fix after r165725.
798 Reviewed by Csaba Osztrogonác.
800 * wtf/WTFThreadData.h:
802 2014-03-17 Tamas Gergely <tgergely.u-szeged@partner.samsung.com>
804 Buildfix after r165725 for non Mac platforms.
806 Reviewed by Csaba Osztrogonác.
808 * wtf/WTFThreadData.h:
810 2014-03-17 Andreas Kling <akling@apple.com>
812 [Mac] WTFThreadData should use _pthread_getspecific_direct().
813 <https://webkit.org/b/130320>
815 Hack WTFThreadData to use a direct key for TLS access when available.
816 This mechanism uses a dedicated segment register and is the same way
817 we implement the fast path in FastMalloc.
819 Reviewed by Darin Adler.
821 * wtf/FastMalloc.cpp:
822 * wtf/WTFThreadData.cpp:
823 (WTF::WTFThreadData::createAndRegisterForGetspecificDirect):
824 * wtf/WTFThreadData.h:
825 (WTF::wtfThreadData):
827 2014-03-16 Darin Adler <darin@apple.com>
829 Remove most uses of deprecatedCharacter in WTF
830 https://bugs.webkit.org/show_bug.cgi?id=130317
832 Reviewed by Andreas Kling.
834 * wtf/text/AtomicString.cpp:
835 (WTF::HashAndUTF8CharactersTranslator::equal): Add an 8-bit code path to the
837 (WTF::SubstringTranslator8::hash): Added.
838 (WTF::SubstringTranslator8::equal): Added.
839 (WTF::SubstringTranslator16::hash): Renamed class.
840 (WTF::SubstringTranslator16::equal): Ditto.
841 (WTF::AtomicString::add): Added an 8-bit code path to the substring case.
843 * wtf/text/Base64.cpp:
844 (WTF::base64Decode): Added an 8 bit code path.
845 (WTF::base64URLDecode): Ditto.
847 * wtf/text/StringImpl.cpp:
848 (WTF::StringImpl::find): Fixed a case that was incorrectly using characters16
849 without first using is8Bit. Need to return later to remove use of deprecatedCharacters.
851 * wtf/unicode/UTF8.cpp:
852 (WTF::Unicode::equalUTF16WithUTF8): Added a case for when the UTF-16 characters
853 are ASCII. Also removed the aEnd argument, since the caller only calls this when the
855 (WTF::Unicode::equalLatin1WithUTF8): Added.
856 * wtf/unicode/UTF8.h: Updated as described above.
858 2014-03-16 David Kilzer <ddkilzer@apple.com>
860 Follow-up: Fix undefined behavior in WTF::equal() in StringImpl.h for i386/x86_64
861 <http://webkit.org/b/130283>
862 <rdar://problem/16281477>
864 Reviewed by Darin Adler.
866 * wtf/text/StringImpl.h:
867 (WTF::loadUnaligned): Restore behavior prior to r165681 for
868 compilers other than clang.
870 2014-03-16 Darin Adler <darin@apple.com>
872 Remove all uses of deprecatedCharacters from JavaScriptCore
873 https://bugs.webkit.org/show_bug.cgi?id=130304
875 Reviewed by Anders Carlsson.
878 (WTF::parseDouble): Added an overload that takes a StringView.
880 2014-03-15 Darin Adler <darin@apple.com>
882 Remove all uses of deprecatedCharacters from WebKit2
883 https://bugs.webkit.org/show_bug.cgi?id=130197
885 Reviewed by Andreas Kling.
887 * wtf/text/StringView.h: Added new getCharactersWithUpconvert and upconvertedCharacters
888 functions. These are useful for callers that need UTF-16.
890 2014-03-15 Darin Adler <darin@apple.com>
892 Try to fix EFL build.
894 * wtf/ThreadingPthreads.cpp: (WTF::changeThreadPriority): Code in this function
895 was setting the priority of the current thread instead of the passed-in thread.
896 That was triggering an unused variable warning in the compiler used to build for
897 EFL. Fixed by using the thread handle instead of pthread_self.
899 2014-03-15 Michael Saboff <msaboff@apple.com>
901 It should be possible to adjust DFG and FTL compiler thread priorities
902 https://bugs.webkit.org/show_bug.cgi?id=130288
904 Reviewed by Filip Pizlo.
906 Added ability to change thread priorities relative to its current priority.
907 Created options to adjust the priority of the DFG and FTL compilation work thread
908 pools. For two core systems, there might be three runnable threads, the main thread,
909 the DFG compilation thread and the FTL compilation thread. With the same priority,
910 the scheduler is free to schedule whatever thread it wants. By lowering the
911 compilation threads, the main thread can run. Further tests may suggest better values
912 for the new options, priorityDeltaOfDFGCompilerThreads and priorityDeltaOfFTLCompilerThreads.
914 For a two-core device, this change has a net positive improvement of 1-3% across
915 SunSpider, Octane, Kraken and AsmBench.
918 * wtf/ThreadingPthreads.cpp:
919 (WTF::changeThreadPriority):
920 * wtf/ThreadingWin.cpp:
921 (WTF::changeThreadPriority):
923 2014-03-15 David Kilzer <ddkilzer@apple.com>
925 Fix undefined behavior in WTF::equal() in StringImpl.h for i386/x86_64
926 <http://webkit.org/b/130283>
927 <rdar://problem/16281477>
929 Reviewed by Geoff Garen.
931 * wtf/text/StringImpl.h:
932 (WTF::loadUnaligned): Add template method.
933 (WTF::equal): Switch to using loadUnaligned<>().
935 2014-03-14 Mark Rowe <mrowe@apple.com>
937 Fix the production build.
939 Don't rely on USE_INTERNAL_SDK being set for the Production configuration since UseInternalSDK.xcconfig won't
940 be at the expected relative path when working from installed source.
942 * Configurations/Base.xcconfig:
944 2014-03-14 Maciej Stachowiak <mjs@apple.com>
946 Replace "Apple Computer, Inc." with "Apple Inc." in copyright headers
947 https://bugs.webkit.org/show_bug.cgi?id=130276
948 <rdar://problem/16266927>
950 Reviewed by Simon Fraser.
954 * wtf/Assertions.cpp:
958 * wtf/AutodrainedPool.h:
959 * wtf/AutodrainedPoolMac.mm:
960 * wtf/BoundsCheckedPointer.h:
961 * wtf/CryptographicUtilities.cpp:
962 * wtf/CryptographicallyRandomNumber.h:
965 * wtf/DisallowCType.h:
966 * wtf/ExportMacros.h:
967 * wtf/FeatureDefines.h:
969 * wtf/HashIterators.h:
971 * wtf/MainThread.cpp:
976 * wtf/MessageQueue.h:
977 * wtf/MetaAllocator.cpp:
978 * wtf/MetaAllocator.h:
979 * wtf/MetaAllocatorHandle.h:
980 * wtf/OSRandomSource.cpp:
981 * wtf/OSRandomSource.h:
983 * wtf/RandomNumber.cpp:
984 * wtf/RandomNumber.h:
985 * wtf/RandomNumberSeed.h:
986 * wtf/RedBlackTree.h:
987 * wtf/RunLoopTimer.h:
988 * wtf/RunLoopTimerCF.cpp:
989 * wtf/SchedulePair.h:
990 * wtf/SchedulePairCF.cpp:
991 * wtf/SchedulePairMac.mm:
992 * wtf/SegmentedVector.h:
994 * wtf/StaticConstructors.h:
995 * wtf/StringExtras.h:
996 * wtf/ThreadFunctionInvocation.h:
997 * wtf/ThreadSafeRefCounted.h:
998 * wtf/ThreadSpecific.h:
1000 * wtf/ThreadingPrimitives.h:
1001 * wtf/ThreadingPthreads.cpp:
1002 * wtf/ThreadingWin.cpp:
1003 * wtf/WTFThreadData.cpp:
1004 * wtf/WTFThreadData.h:
1005 * wtf/efl/OwnPtrEfl.cpp:
1006 * wtf/mac/MainThreadMac.mm:
1007 * wtf/text/AtomicStringHash.h:
1008 * wtf/text/AtomicStringImpl.h:
1009 * wtf/text/Base64.h:
1010 * wtf/text/CString.cpp:
1011 * wtf/text/CString.h:
1013 * wtf/text/cf/StringCF.cpp:
1014 * wtf/text/mac/StringMac.mm:
1015 * wtf/unicode/CharacterNames.h:
1016 * wtf/unicode/Collator.h:
1017 * wtf/unicode/CollatorDefault.cpp:
1018 * wtf/unicode/UTF8.cpp:
1019 * wtf/unicode/UTF8.h:
1020 * wtf/unicode/icu/CollatorICU.cpp:
1021 * wtf/win/MainThreadWin.cpp:
1023 2014-03-14 Byungseon Shin <sun.shin@lge.com>
1025 Incorrect Date returned between March 1, 2034 and February 28, 2100.
1026 https://bugs.webkit.org/show_bug.cgi?id=130123
1028 Reviewed by Mark Lam.
1030 Fix logic by using predefined Date APIs.
1033 (WTF::ymdhmsToSeconds):
1035 2014-03-12 Sergio Villar Senin <svillar@igalia.com>
1037 Rename DEFINE_STATIC_LOCAL to DEPRECATED_DEFINE_STATIC_LOCAL
1038 https://bugs.webkit.org/show_bug.cgi?id=129612
1040 Reviewed by Darin Adler.
1042 For new code use static NeverDestroyed<T> instead.
1045 (WTF::RunLoop::current):
1046 * wtf/StdLibExtras.h:
1047 * wtf/ThreadingPthreads.cpp:
1048 (WTF::threadMapMutex):
1050 * wtf/efl/MainThreadEfl.cpp:
1052 * wtf/text/StringStatics.cpp:
1053 (WTF::StringImpl::empty):
1055 2014-03-13 Radu Stavila <stavila@adobe.com>
1057 Webkit not building on XCode 5.1 due to garbage collection no longer being supported
1058 https://bugs.webkit.org/show_bug.cgi?id=130087
1060 Reviewed by Mark Rowe.
1062 Disable garbage collection on macosx when not using internal SDK.
1064 * Configurations/Base.xcconfig:
1066 2014-03-12 Ryuan Choi <ryuan.choi@samsung.com>
1068 [EFL] Enable Parallel GC
1069 https://bugs.webkit.org/show_bug.cgi?id=130177
1071 Reviewed by Geoffrey Garen.
1073 * wtf/Platform.h: Turn on ENABLE_PARALLEL_GC for the EFL build.
1075 2014-03-12 Joseph Pecoraro <pecoraro@apple.com>
1077 Web Inspector: Disable REMOTE_INSPECTOR in earlier OS X releases
1078 https://bugs.webkit.org/show_bug.cgi?id=130118
1080 Reviewed by Timothy Hatcher.
1082 * wtf/FeatureDefines.h:
1084 2014-03-11 Brent Fulgham <bfulgham@apple.com>
1086 [Win] Unreviewed gardening.
1088 * wtf/MathExtras.h: VS2013 provides an lrint implementation. No need to implement
1091 2014-03-10 Jer Noble <jer.noble@apple.com>
1093 Improve WeakPtr operators.
1094 https://bugs.webkit.org/show_bug.cgi?id=130053
1096 Reviewed by Andreas Kling.
1098 Replace the "operator!()" with an explicit bool operator. Add an "operator->()".
1101 (WTF::WeakPtr::operator bool):
1102 (WTF::WeakPtr::operator->):
1104 2014-03-10 Brent Fulgham <bfulgham@apple.com>
1106 [Win] Pass environment to Pre-Build, Pre-Link, and Post-Build Stages.
1107 https://bugs.webkit.org/show_bug.cgi?id=130023.
1109 Reviewed by Dean Jackson.
1111 * WTF.vcxproj/WTF.proj: Avoid putting trailing slashes in system paths to avoid
1112 escaping during later string substitution.
1113 * WTF.vcxproj/build-generated-files.sh: Accept environment values passed by VS.
1115 2014-03-10 Mark Hahnenberg <mhahnenberg@apple.com>
1117 Turn on GenGC on other 64-bit platforms
1118 https://bugs.webkit.org/show_bug.cgi?id=129258
1120 Reviewed by Oliver Hunt.
1124 2014-03-07 peavo@outlook.com <peavo@outlook.com>
1126 [Win64] Compile error after r165128.
1127 https://bugs.webkit.org/show_bug.cgi?id=129807
1129 Reviewed by Mark Lam.
1131 * wtf/Platform.h: MSVC does not support computed goto.
1132 Also enabled COMPUTED_GOTO_OPCODES when !ENABLE(LLINT_C_LOOP). This is needed because the ASM LLINT operates like COMPUTED_GOTO_OPCODES,
1133 and relies on the related data structures being defined to support this. On Win32, the platform does not HAVE_COMPUTED_GOTO support,
1134 but does want ENABLE_COMPUTED_GOTO_OPCODES because it uses the ASM LLINT.
1136 2014-03-06 Michael Saboff <msaboff@apple.com>
1138 JSC should disable the JIT when building for ARMv7k
1139 https://bugs.webkit.org/show_bug.cgi?id=129829
1141 Reviewed by Oliver Hunt.
1143 Added WTF_CPU_APPLE_ARMV7K CPU define. Disabled the JITs when
1144 that feature define is set.
1148 2014-03-06 Filip Pizlo <fpizlo@apple.com>
1150 Use the LLVM disassembler on ARM64 if we are enabling the FTL
1151 https://bugs.webkit.org/show_bug.cgi?id=129785
1153 Reviewed by Geoffrey Garen.
1157 2014-03-05 peavo@outlook.com <peavo@outlook.com>
1159 [Win32][LLINT] Crash when running JSC stress tests.
1160 https://bugs.webkit.org/show_bug.cgi?id=129429
1162 Reviewed by Geoffrey Garen.
1164 * wtf/Platform.h: Enable LLINT on Win32.
1166 2014-03-04 Zan Dobersek <zdobersek@igalia.com>
1168 [GTK] Build the Udis86 disassembler
1169 https://bugs.webkit.org/show_bug.cgi?id=129679
1171 Reviewed by Michael Saboff.
1173 * wtf/Platform.h: Also enable the Udis86 disassembler for the GTK port on Linux.
1175 2014-03-02 Jaehun Lim <ljaehun.lim@samsung.com>
1177 [EFL] Remove m_initEfl from RunLoop.
1178 https://bugs.webkit.org/show_bug.cgi?id=129568
1180 Reviewed by Gyuyoung Kim.
1182 We don't use m_initEfl except RunLoop constructor.
1185 * wtf/efl/RunLoopEfl.cpp:
1186 (WTF::RunLoop::RunLoop):
1188 2014-03-02 Darin Adler <darin@apple.com>
1190 Cut down use of OwnPtr within WTF itself
1191 https://bugs.webkit.org/show_bug.cgi?id=129567
1193 Reviewed by Sam Weinig.
1195 * wtf/RefCounted.h: Removed OwnPtr includes.
1197 * wtf/StreamBuffer.h: Removed OwnPtr includes and switched to use
1198 std::make_unique and std::unique_ptr instead.
1200 * wtf/Threading.cpp: Removed OwnPtr includes.
1201 * wtf/ThreadingPthreads.cpp: Ditto.
1202 * wtf/Vector.h: Ditto.
1204 2014-02-26 Gavin Barraclough <barraclough@apple.com>
1206 FastMalloc should use vm_page_shift intead of PAGE_SHIFT.
1207 https://bugs.webkit.org/show_bug.cgi?id=129370
1209 Reviewed by Mark Rowe.
1211 "Doesn't this lead to the page map using fewer bits than it was before?
1212 It seems like this will cause some page addresses to no longer be
1213 representable in the map when using 4K pages. Am I missing something?"
1215 * wtf/FastMalloc.cpp:
1216 - bdash raises a valid point. This should make the TCMalloc_PageMap
1217 larger than absolutely necessary, rather than potentially too small.
1219 2014-02-25 Gavin Barraclough <barraclough@apple.com>
1221 FastMalloc should use vm_page_shift intead of PAGE_SHIFT.
1222 https://bugs.webkit.org/show_bug.cgi?id=129370
1224 Reviewed by Geoff Garen.
1226 Previously we used PAGE_SHIFT to initialize kPageShift.
1227 Since this was a constant, it could be used to calculate other
1228 contants used in the code. Some of these values are used in the
1229 definition of certain data structures (specifiying the length of
1230 some array members).
1232 Make kPageShift & dependent properties variables setup during
1233 initialization. Add upper bound values (K_PAGE_SHIFT_MAX,
1234 K_NUM_CLASSES_MAX) for use in cases where we need a constant.
1236 * wtf/FastMalloc.cpp:
1237 (WTF::InitSizeClasses):
1238 - initialize kPageShift, kNumClasses, kPageSize, kMaxValidPages.
1241 (WTF::AllocationSize):
1243 (WTF::TCMalloc_PageHeap::FreeBytes):
1245 (WTF::TCMalloc_PageHeap::init):
1246 - COMPILE_ASSERT -> ASSERT
1247 (WTF::TCMalloc_PageHeap::scavenge):
1249 (WTF::TCMalloc_PageHeap::Carve):
1251 (WTF::mergeDecommittedStates):
1253 (WTF::TCMalloc_PageHeap::IncrementalScavenge):
1255 (WTF::TCMalloc_PageHeap::ReturnedBytes):
1259 (WTF::TCMalloc_PageHeap::GrowHeap):
1261 (WTF::TCMalloc_PageHeap::ReleaseFreeList):
1262 - kNumClasses -> K_NUM_CLASSES_MAX
1263 (WTF::TCMalloc_ThreadCache::enumerateFreeObjects):
1265 (WTF::TCMalloc_Central_FreeList::Init):
1267 (WTF::TCMalloc_Central_FreeList::ReleaseToSpans):
1269 (WTF::TCMalloc_Central_FreeList::EvictRandomSizeClass):
1271 (WTF::TCMalloc_Central_FreeList::MakeCacheSpace):
1273 (WTF::TCMalloc_Central_FreeList::InsertRange):
1275 (WTF::TCMalloc_Central_FreeList::Populate):
1277 (WTF::TCMalloc_ThreadCache::Init):
1279 (WTF::TCMalloc_ThreadCache::Cleanup):
1281 (WTF::TCMalloc_ThreadCache::Scavenge):
1283 (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
1286 2014-02-24 Alex Christensen <achristensen@webkit.org>
1288 Disabled WebGL on WinCairo.
1292 * wtf/FeatureDefines.h:
1293 Removed ENABLE_WEBGL definition for WinCairo port.
1294 WebGL has not worked on WinCairo since r163079
1295 and it was not compiling with a recent ANGLE update.
1297 2014-02-24 Mark Hahnenberg <mhahnenberg@apple.com>
1299 Turn GenGC on for 32-bit systems
1300 https://bugs.webkit.org/show_bug.cgi?id=128824
1302 Reviewed by Geoffrey Garen.
1306 2014-02-21 Benjamin Poulain <benjamin@webkit.org>
1308 jsDocumentPrototypeFunctionGetElementById should not create an AtomicString for the function argument
1309 https://bugs.webkit.org/show_bug.cgi?id=128893
1311 Reviewed by Darin Adler.
1313 AtomicString::find() is a special case optimized for the JavaScript bindings. The method can only
1314 be called under specific conditions.
1315 The method is renamed to findStringWithHash().
1317 The new AtomicString::find is generic and does not require any propery on the input.
1319 * wtf/text/AtomicString.cpp:
1320 (WTF::AtomicString::findStringWithHash):
1321 (WTF::AtomicString::findSlowCase):
1322 * wtf/text/AtomicString.h:
1323 (WTF::AtomicString::find):
1325 2014-02-20 Csaba Osztrogonác <ossy@webkit.org>
1327 Add StackStats sources to cmake and autotools build files
1328 https://bugs.webkit.org/show_bug.cgi?id=129103
1330 Reviewed by Anders Carlsson.
1332 * GNUmakefile.list.am:
1333 * wtf/CMakeLists.txt:
1335 2014-02-20 Csaba Osztrogonác <ossy@webkit.org>
1337 Get rid of redundant Platform.h includes
1338 https://bugs.webkit.org/show_bug.cgi?id=128817
1340 Reviewed by Brent Fulgham.
1346 * wtf/DisallowCType.h:
1347 * wtf/DynamicAnnotations.h:
1348 * wtf/ExportMacros.h:
1352 * wtf/PrintStream.h:
1355 * wtf/ThreadingPrimitives.h:
1357 2014-02-19 Jon Honeycutt <jhoneycutt@apple.com>
1359 Crash in WTF::StringBuilder::append()
1361 https://bugs.webkit.org/show_bug.cgi?id=125817
1362 <rdar://problem/15671883>
1364 Reviewed by Oliver Hunt.
1366 * wtf/text/StringBuilder.cpp:
1367 (WTF::expandedCapacity):
1368 Ensure that we return a new capacity of at least 'requiredLength' in
1369 the case where requiredLength is large. Also, use unsigned rather than
1370 size_t for the parameters and the return value, as callers pass
1371 unsigned arguments and treat the result as an unsigned int.
1373 2014-02-19 Anders Carlsson <andersca@apple.com>
1375 Add WTF_MAKE_FAST_ALLOCATED to more classes
1376 https://bugs.webkit.org/show_bug.cgi?id=129064
1378 Reviewed by Andreas Kling.
1382 2014-02-19 Zan Dobersek <zdobersek@igalia.com>
1384 Make PrintStream::print() a variadic template
1385 https://bugs.webkit.org/show_bug.cgi?id=126388
1387 Reviewed by Brent Fulgham.
1389 PrintStream::print() can be converted into a variadic template, printing the value
1390 of the first parameter and recursively calling itself until the single parameter version
1391 is used for printing the last value.
1394 (WTF::dataLog): Convert the function to a variadic template as well.
1395 * wtf/PrintStream.h:
1396 (WTF::PrintStream::print):
1397 * wtf/StringPrintStream.h:
1398 (WTF::toCString): Ditto.
1399 (WTF::toString): Ditto.
1401 2014-02-19 Zan Dobersek <zdobersek@igalia.com>
1403 Use std::swap() in HashTable::swap()
1404 https://bugs.webkit.org/show_bug.cgi?id=128995
1406 Reviewed by Brent Fulgham.
1408 Use std::swap() to swap the member variable values of two HashTable objects in HashTable::swap().
1411 (WTF::KeyTraits>::swap):
1413 2014-02-19 Zan Dobersek <zdobersek@igalia.com>
1415 SegmentedVector::append() should take in rvalue reference, forward it to Vector::uncheckedAppend()
1416 https://bugs.webkit.org/show_bug.cgi?id=128996
1418 Reviewed by Brent Fulgham.
1420 * wtf/SegmentedVector.h:
1421 (WTF::SegmentedVector::append): Take in an rvalue reference of the object that's to be appended and
1422 then forward it to Vector::uncheckedAppend(). This avoids unnecessary copies in the current situation
1423 where a const lvalue is accepted and passed on.
1425 2014-02-19 Dan Bernstein <mitz@apple.com>
1427 Simplify PLATFORM(MAC) && !PLATFORM(IOS) and similar expressions
1428 https://bugs.webkit.org/show_bug.cgi?id=129029
1430 Reviewed by Mark Rowe.
1432 * wtf/FeatureDefines.h:
1434 * wtf/Threading.cpp:
1435 * wtf/text/cf/StringImplCF.cpp:
1436 (garbageCollectionEnabled):
1438 2014-02-18 Dan Bernstein <mitz@apple.com>
1440 PLATFORM(MAC) is true when building for iOS
1441 https://bugs.webkit.org/show_bug.cgi?id=129025
1443 Reviewed by Mark Rowe.
1445 * wtf/Platform.h: Changed to define WTF_PLATFORM_MAC only on when building for OS X (but
1446 still not when WTF_PLATFORM_GTK or WTF_PLATFORM_EFL are defined).
1448 2014-02-18 Joseph Pecoraro <pecoraro@apple.com>
1450 [iOS] Web Inspector: JSContext inspection crashes in isMainThread, uninitialized WebCoreWebThreadIsLockedOrDisabled
1451 https://bugs.webkit.org/show_bug.cgi?id=128959
1453 Reviewed by David Kilzer.
1455 When JavaScriptCore is used without WebCore on iOS (e.g. JSContext)
1456 the WebCoreWebThread* functions will not be initialized. Avoid
1457 calling the function pointer if it is uninitialized. This was
1458 happening with remote inspection via StringImpl::createCFString
1459 for implicit NSString / WTFString conversion which uses isMainThread.
1461 * wtf/mac/MainThreadMac.mm:
1462 (WTF::webThreadIsUninitializedOrLockedOrDisabled):
1463 (WTF::isMainThread):
1464 (WTF::canAccessThreadLocalDataForThread):
1466 2014-02-17 Filip Pizlo <fpizlo@apple.com>
1469 https://bugs.webkit.org/show_bug.cgi?id=128948
1471 Reviewed by Sam Weinig.
1475 2014-02-17 Anders Carlsson <andersca@apple.com>
1477 Remove ENABLE_GLOBAL_FASTMALLOC_NEW
1478 https://bugs.webkit.org/show_bug.cgi?id=127067
1480 Reviewed by Geoffrey Garen.
1482 Remove the global operator new/operator delete overrides. Having ALWAYS_INLINE operators
1483 like we do is really undefined behavior according to the C++ standard and we've been lucky enough
1484 to get away with it so far, but any code that calls operator new/operator delete inside from the C++ standard
1485 library (not from headers that are included) will be mismatched and potentially crash. libc++ calls
1486 delete in it's std::thread implementation for example.
1488 The only supported way to override operator new and operator delete globally is to not use inline
1489 functions, but that would mean that any application using WebKit would not be able to provide custom
1490 operator new/operator delete functions so we'll just reuse the already existing infrastructure consisting
1491 of the WTF_MAKE_FAST_ALLOCATED macro.
1493 * wtf/FastMalloc.cpp:
1494 (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
1498 2014-02-17 Ryan Lortie <desrt@desrt.ca>
1500 Enable DFG_JIT on FreeBSD
1501 https://bugs.webkit.org/show_bug.cgi?id=128898
1503 Reviewed by Csaba Osztrogonác.
1507 2014-02-15 Filip Pizlo <fpizlo@apple.com>
1509 FTL should inline polymorphic heap accesses
1510 https://bugs.webkit.org/show_bug.cgi?id=128795
1512 Reviewed by Oliver Hunt.
1514 * wtf/PrintStream.h:
1515 (WTF::PointerDumpInContext::PointerDumpInContext):
1516 (WTF::PointerDumpInContext::dump):
1517 (WTF::pointerDumpInContext):
1519 2014-02-16 Zan Dobersek <zdobersek@igalia.com>
1521 Reintroduce const qualifiers for return types of (Filter|Transform)Iterator::operator*()
1522 https://bugs.webkit.org/show_bug.cgi?id=126875
1524 The const qualifiers for the return types of FilterIterator::operator*() and TransformIterator::operator*()
1525 were removed in r161797 and r161802 because of compilation failures when using GCC and having an Iterator
1526 type that already had the const qualifier. std::remove_const is now used to appease GCC and enforce the const
1527 qualifier on the return type, regardless of the Iterator type and its qualifiers.
1529 * wtf/IteratorAdaptors.h:
1530 (WTF::FilterIterator::operator*):
1531 (WTF::TransformIterator::operator*):
1533 2014-02-15 Filip Pizlo <fpizlo@apple.com>
1535 Vector with inline capacity should work with non-PODs
1536 https://bugs.webkit.org/show_bug.cgi?id=128864
1538 Reviewed by Michael Saboff.
1540 Previously, we would copy the inline storage of a vector as if it was a bag of bits.
1541 This presumed that the element type was relocatable. In general this is only true for
1544 This patch changes this by introducing a swap operation over inline storage. This swap
1545 operation requires being told about the size that is in use.
1547 Deques would have required some cleverness to make this work, because the swap
1548 operation needs to know which subset of elements are in-use and assumes that a size is
1549 sufficient for this. That's not true for deques. Instead of trying to do very clever
1550 things, I just removed the inline capacity option from Deque. I believe that this is
1551 fine since there are only two users of Deque with inline capacity, and both of them
1552 appear to be allocated rarely enough that inline capacity probably doesn't help much.
1555 (WTF::DequeIterator::DequeIterator):
1556 (WTF::DequeConstIterator::DequeConstIterator):
1557 (WTF::Deque<T>::checkValidity):
1558 (WTF::Deque<T>::checkIndexValidity):
1559 (WTF::Deque<T>::invalidateIterators):
1560 (WTF::Deque<T>::Deque):
1562 (WTF::Deque<T>::destroyAll):
1563 (WTF::Deque<T>::~Deque):
1564 (WTF::Deque<T>::swap):
1565 (WTF::Deque<T>::clear):
1566 (WTF::Deque<T>::expandCapacityIfNeeded):
1567 (WTF::Deque<T>::expandCapacity):
1568 (WTF::Deque<T>::append):
1569 (WTF::Deque<T>::prepend):
1570 (WTF::Deque<T>::removeFirst):
1571 (WTF::Deque<T>::removeLast):
1572 (WTF::Deque<T>::remove):
1573 (WTF::DequeIteratorBase<T>::checkValidity):
1574 (WTF::DequeIteratorBase<T>::addToIteratorsList):
1575 (WTF::DequeIteratorBase<T>::removeFromIteratorsList):
1576 (WTF::DequeIteratorBase<T>::DequeIteratorBase):
1577 (WTF::DequeIteratorBase<T>::~DequeIteratorBase):
1578 (WTF::DequeIteratorBase<T>::isEqual):
1579 (WTF::DequeIteratorBase<T>::increment):
1580 (WTF::DequeIteratorBase<T>::decrement):
1581 (WTF::DequeIteratorBase<T>::after):
1582 (WTF::DequeIteratorBase<T>::before):
1584 (WTF::VectorBuffer::swap):
1585 (WTF::VectorBuffer::swapInlineBuffer):
1586 (WTF::VectorBuffer::swapInlineBuffers):
1587 (WTF::Vector::swap):
1589 2014-02-15 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
1591 Remove 'static' specifier from free inline functions in StringImpl.h
1592 https://bugs.webkit.org/show_bug.cgi?id=118554
1594 Reviewed by Darin Adler.
1596 At first 'static' does not bring any use here, secondly static free
1597 inline functions in headers is a bad practice in general as each instance
1598 of function defined as inline is treated as a separate function and each
1599 instance has its own copy of static locals and string literals.
1601 * wtf/text/StringImpl.h:
1602 (WTF::codePointCompare):
1603 (WTF::codePointCompare8):
1604 (WTF::codePointCompare16):
1605 (WTF::codePointCompare8To16):
1606 (WTF::isSpaceOrNewline):
1608 2014-02-14 Benjamin Poulain <bpoulain@apple.com>
1610 Improve the performance on mobile of FTPDirectoryDocument
1611 https://bugs.webkit.org/show_bug.cgi?id=128778
1613 Reviewed by Antti Koivisto.
1615 * wtf/text/WTFString.h:
1616 (WTF::String::endsWith): add a missing overload.
1618 2014-02-14 Wojciech Bielawski <w.bielawski@samsung.com>
1620 (try)append and insert operations don't need new operator for PODs
1621 https://bugs.webkit.org/show_bug.cgi?id=128185
1623 Reviewed by Darin Adler.
1625 Vector's methods use VectorCopier to copy data.
1626 VectorCopier for PODs exteded to be used with different types. For different types placement new copy approach is applied. For the same types memcpy is applied.
1629 (WTF::OverflowHandler>::append): use VectorCopier to copy data.
1630 (WTF::OverflowHandler>::tryAppend): use VectorCopier to copy data.
1631 (WTF::OverflowHandler>::insert): use VectorCopier to copy data.
1633 2014-02-13 Daniel Bates <dabates@apple.com>
1635 Fix the iOS build after <http://trac.webkit.org/changeset/164064
1639 2014-02-13 Daniel Bates <dabates@apple.com>
1641 [iOS] Disable HAVE_ARM_NEON_INTRINSICS
1643 For now, disable HAVE_ARM_NEON_INTRINSICS when building for iOS. We want
1644 to audit the applicable code before we enable this define.
1648 2014-02-11 Filip Pizlo <fpizlo@apple.com>
1650 Hoist and combine array bounds checks
1651 https://bugs.webkit.org/show_bug.cgi?id=125433
1653 Reviewed by Mark Hahnenberg.
1655 * GNUmakefile.list.am:
1656 * WTF.vcxproj/WTF.vcxproj:
1657 * WTF.xcodeproj/project.pbxproj:
1658 * wtf/CMakeLists.txt:
1659 * wtf/HashMethod.h: Added.
1660 (WTF::HashMethod::operator()):
1662 2014-02-13 Tamas Gergely <tgergely.u-szeged@partner.samsung.com>
1664 Code cleanup: remove gcc<4.7 guards.
1665 https://bugs.webkit.org/show_bug.cgi?id=128729
1667 Reviewed by Anders Carlsson.
1669 Remove GCC_VERSION_AT_LEAST guards when it checks for pre-4.7 versions,
1670 as WK does not compile with earlier gcc versions.
1672 * wtf/Assertions.cpp:
1675 2014-02-12 Mark Lam <mark.lam@apple.com>
1677 No need to save reservedZoneSize when dropping the JSLock.
1678 <https://webkit.org/b/128719>
1680 Reviewed by Geoffrey Garen.
1682 * wtf/WTFThreadData.cpp:
1683 (WTF::WTFThreadData::WTFThreadData):
1684 * wtf/WTFThreadData.h:
1685 - removed unnneeded m_savedReservedZoneSize.
1687 2014-02-11 Mark Hahnenberg <mhahnenberg@apple.com>
1689 32-bit LLInt writeBarrierOnGlobalObject is wrong
1690 https://bugs.webkit.org/show_bug.cgi?id=128556
1692 Reviewed by Geoffrey Garen.
1694 * wtf/Platform.h: Removed OBJECT_MARK_LOGGING from Platform.h since it already exists in FeatureDefines.h
1696 2014-02-11 peavo@outlook.com <peavo@outlook.com>
1698 [WinCairo] Compile error, deleted file in WTF.
1699 https://bugs.webkit.org/show_bug.cgi?id=128601
1701 Reviewed by Csaba Osztrogonác.
1703 * WTF.vcxproj/WTF.vcxproj: Removed reference to deleted file.
1704 * WTF.vcxproj/WTF.vcxproj.filters: Ditto.
1706 2014-02-10 Michael Saboff <msaboff@apple.com>
1708 Re-enable ARM Thumb2 disassembler
1709 https://bugs.webkit.org/show_bug.cgi?id=128577
1711 Reviewed by Filip Pizlo.
1713 Added definition of WTF_USE_ARMV7_DISASSEMBLER back to Platform.h
1717 2014-02-10 Benjamin Poulain <benjamin@webkit.org>
1719 Add the basic infrastructure to compile attributes matching in selectors
1720 https://bugs.webkit.org/show_bug.cgi?id=128484
1722 Reviewed by Gavin Barraclough.
1725 (WTF::VectorBufferBase::bufferMemoryOffset):
1726 (WTF::Vector::sizeMemoryOffset):
1727 (WTF::Vector::dataMemoryOffset):
1728 Expose the memory offsets of Vector::size() and the memory buffer pointer for the JIT.
1730 2014-02-10 Enrica Casucci <enrica@apple.com>
1732 copyShortASCIIString crashes on iOS after r163793.
1733 https://bugs.webkit.org/show_bug.cgi?id=128548.
1735 Reviewed by Alexey Proskuryakov.
1739 * wtf/unicode/icu/CollatorICU.cpp:
1740 (WTF::copyShortASCIIString):
1742 2014-02-10 Carlos Garcia Campos <cgarcia@igalia.com>
1744 [GLIB] Add GUniqueOutPtr and use it instead of GOwnPtr
1745 https://bugs.webkit.org/show_bug.cgi?id=127554
1747 Reviewed by Gustavo Noronha Silva.
1749 GUniqueOutPtr is a simplified version of GOwnPtr for the cases
1750 where we need the address of the contained pointer. GUniqueOutPtr
1751 uses GUniquePtr to free the contained object and to release the
1752 container pointer. The API is very simple to make sure this is
1753 only used when outPtr() is needed. It can't be constructed with a
1754 pointer, and there's not method to set a new pointer. Another
1755 difference with the old GOwnPtr is that outPtr() can be used
1756 multiple times, because it frees any pointer previously set.
1758 * GNUmakefile.list.am:
1759 * wtf/PlatformEfl.cmake:
1760 * wtf/PlatformGTK.cmake:
1761 * wtf/gobject/GOwnPtr.cpp: Removed.
1762 * wtf/gobject/GOwnPtr.h: Removed.
1763 * wtf/gobject/GUniquePtr.h:
1764 (WTF::GUniqueOutPtr::GUniqueOutPtr):
1765 (WTF::GUniqueOutPtr::~GUniqueOutPtr):
1766 (WTF::GUniqueOutPtr::outPtr):
1767 (WTF::GUniqueOutPtr::reset):
1768 (WTF::GUniqueOutPtr::release):
1769 (WTF::GUniqueOutPtr::operator*):
1770 (WTF::GUniqueOutPtr::operator->):
1771 (WTF::GUniqueOutPtr::get):
1772 (WTF::GUniqueOutPtr::operator!):
1773 (WTF::GUniqueOutPtr::operator UnspecifiedBoolType):
1775 2014-02-10 Darin Adler <darin@apple.com>
1777 Stop using String::deprecatedCharacters to call WTF::Collator
1778 https://bugs.webkit.org/show_bug.cgi?id=128517
1780 WTF passes ICU’s deprecated ULOC_REQUESTED_LOCALE to ucol_getLocaleByType()
1781 rdar://problem/15183390
1783 Reviewed by Alexey Proskuryakov.
1785 This patch fixes both bugs above by reworking WTF::Collator.
1787 * wtf/unicode/Collator.h: Fixed formatting. Got rid of the Collator::Result type,
1788 since the collator uses the same return value scheme as strcmp and as ICU; an int
1789 will do for the return type. Simplified the support for UCONFIG_NO_COLLATION by
1790 using a separate copy of the class definition. (We should check if anyone needs
1791 UCONFIG_NO_COLLATION support, and remove it if not.) Changed the lower-first flag
1792 from a separate function to a constructor argument. Changed the arguments to
1793 the collate function to StringView. Added a collate UTF8 function. Changed the
1794 m_collate data member to no longer be mutable since we no longer allocate it lazily.
1796 * wtf/unicode/CollatorDefault.cpp:
1797 (WTF::Collator::collate): Rewrote to be simpler.
1798 (WTF::Collator::collateUTF8): Added. Converts from UTF-8 to a String and then calls
1799 the collate function above.
1801 * wtf/unicode/icu/CollatorICU.cpp: Added a FIXME about the fact that this file
1802 has the wrong name and location. Since we always use ICU, there's no need to mention
1803 it in the file name.
1804 (WTF::copyASCIIString): Added.
1805 (WTF::copyDefaultLocale): Added.
1806 (WTF::resolveDefaultLocale): Added. Maps null locale to a default on Mac and iOS,
1807 since on those platforms ICU does not use the correct default locale when passed null.
1808 (WTF::localesMatch): Added.
1809 (WTF::Collator::Collator): Moved most of the code from createCollator here.
1810 Simplified it by storing the collator configuration along with the collator in globals.
1811 (WTF::Collator::~Collator): Moved most of the code from releaseCollator here.
1812 (WTF::getIndexLatin1): Added.
1813 (WTF::moveLatin1): Added.
1814 (WTF::hasNextLatin1): Added.
1815 (WTF::hasPreviousLatin1): Added.
1816 (WTF::currentLatin1): Added.
1817 (WTF::nextLatin1): Added.
1818 (WTF::previousLatin1): Added.
1819 (WTF::getStateLatin1): Added.
1820 (WTF::setStateLatin1): Added.
1821 (WTF::createLatin1Iterator): Added. Uses the functions above to make a UCharIterator
1822 that works for a WTF::StringView-style Latin-1 string.
1823 (WTF::createIterator): Added. Uses either createLatin1Iterator or uiter_setString to
1824 make a UCharIterator that works for a WTF::StringView.
1825 (WTF::Collator::collate): Changed to use ucol_strcollIter.
1826 (WTF::createIteratorUTF8): Added. Uses uiter_setUTF8.
1827 (WTF::Collator::collateUTF8): Added. Like collate, but for null-terminated UTF-8 strings.
1829 2014-02-10 Tamas Gergely <tgergely.u-szeged@partner.samsung.com>
1831 Code cleanup: Remove BUILDING_ON / TARGETING definitions.
1832 https://bugs.webkit.org/show_bug.cgi?id=128242
1834 Reviewed by Brent Fulgham.
1836 The BUILDING_ON_* and TARGETING_* macros have not been used for a while.
1837 According to the FIXME: they are removed.
1841 2014-02-09 Anders Carlsson <andersca@apple.com>
1843 Add WTF_MAKE_FAST_ALLOCATED to more classes
1844 https://bugs.webkit.org/show_bug.cgi?id=128506
1846 Reviewed by Andreas Kling.
1849 * wtf/ListHashSet.h:
1851 2014-02-08 Anders Carlsson <andersca@apple.com>
1853 Stop using getCharactersWithUpconvert in JavaScriptCore
1854 https://bugs.webkit.org/show_bug.cgi?id=128457
1856 Reviewed by Andreas Kling.
1858 * wtf/text/StringBuilder.h:
1859 (WTF::StringBuilder::append):
1860 Add a new overload that takes a StringView.
1862 * wtf/text/StringView.h:
1863 (WTF::StringView::find):
1864 Add new find member function.
1866 2014-02-08 Darin Adler <darin@apple.com>
1868 Change TextIterator to use StringView, preparing to wean it from deprecatedCharacters
1869 https://bugs.webkit.org/show_bug.cgi?id=128233
1871 Reviewed by Anders Carlsson.
1873 * WTF.xcodeproj/project.pbxproj: Added new source files.
1875 * wtf/text/StringView.h: Added operator[], createCFStringWithoutCopying, and
1876 createNSStringWithoutCopying.
1877 * wtf/text/cf/StringViewCF.cpp:
1878 (WTF::StringView::createCFStringWithoutCopying): Added.
1879 * wtf/text/mac/StringViewObjC.mm:
1880 (WTF::StringView::createNSString): Added.
1881 (WTF::StringView::createNSStringWithoutCopying): Added.
1883 2014-02-06 Andreas Kling <akling@apple.com>
1885 Remove unused ENABLE(REPAINT_THROTTLING) flag.
1886 <https://webkit.org/b/128329>
1888 Reviewed by Antti Koivisto.
1890 * wtf/FeatureDefines.h:
1892 2014-02-06 Filip Pizlo <fpizlo@apple.com>
1894 More FTL build scaffolding
1895 https://bugs.webkit.org/show_bug.cgi?id=128330
1897 Reviewed by Geoffrey Garen.
1901 2014-02-06 Anders Carlsson <andersca@apple.com>
1903 Use std::chrono functions in dispatchFunctionsFromMainThread()
1904 https://bugs.webkit.org/show_bug.cgi?id=128308
1906 Reviewed by Antti Koivisto.
1908 * wtf/MainThread.cpp:
1909 (WTF::dispatchFunctionsFromMainThread):
1911 2014-02-05 Zan Dobersek <zdobersek@igalia.com>
1913 Remove the WTF_COMPILER_SUPPORTS_CXX_GENERALIZED_INITIALIZERS macro
1914 https://bugs.webkit.org/show_bug.cgi?id=128267
1916 Reviewed by Andreas Kling.
1918 Remove the WTF_COMPILER_SUPPORTS_CXX_GENERALIZED_INITIALIZERS macro that was manually defined for compilers
1919 that support the C++11 initializer lists. The feature is well supported in Clang, MSVC and also GCC. It
1920 was actually already used unguarded in HashSet.
1924 (WTF::HashMap::HashMap):
1926 (WTF::Vector::Vector):
1928 2014-02-05 Andreas Kling <akling@apple.com>
1930 Remove ENABLE(DIRECTORY_UPLOAD).
1931 <https://webkit.org/b/128275>
1933 Rubber-stamped by Ryosuke Niwa.
1935 * wtf/FeatureDefines.h:
1937 2014-02-05 Carlos Garcia Campos <cgarcia@igalia.com>
1939 HashMap can't be used with std::unique_ptr as value when it has a custom deleter
1940 https://bugs.webkit.org/show_bug.cgi?id=128250
1942 Reviewed by Darin Adler.
1944 The problem is that the HashMap is using a unique_ptr with the
1945 default deleter, so that when trying to move the unique_ptr the
1946 deleters don't match.
1948 * wtf/HashTraits.h: Add the deleter also in the template
1949 definitation of the parent class for the HashTraits<std::unique_ptr<T, Deleter>>
1951 2014-02-05 Csaba Osztrogonác <ossy@webkit.org>
1953 Remove ENABLE(SVG) guards
1954 https://bugs.webkit.org/show_bug.cgi?id=127991
1956 Reviewed by Sam Weinig.
1958 * wtf/FeatureDefines.h:
1960 2014-02-04 Mark Lam <mark.lam@apple.com>
1962 The stack limit computation does not work for Windows.
1963 <https://webkit.org/b/128226>
1965 Reviewed by Geoffrey Garen.
1967 The current stack limit computation assumes that the stack is allocated
1968 in high memory. On Windows, the stack seems to be allocated very near
1969 address 0, and is smaller in size than our Options::maxPerThreadStackUsage().
1970 This combination triggers a bug where StackBounds::recursionLimit()
1971 underflows and computes a limit address that is ridiculously high in memory.
1972 The net effect is that the Windows port thinks its out of stack space all
1975 We now check for potential underflows in StackBounds and return an
1976 appropriate limit address.
1978 * wtf/StackBounds.h:
1979 (WTF::StackBounds::recursionLimit):
1981 2014-02-04 Andreas Kling <akling@apple.com>
1983 Remove <iframe seamless> support.
1984 <https://webkit.org/b/128213>
1986 Rubber-stamped by Antti Koivisto.
1988 * wtf/FeatureDefines.h:
1990 2014-02-04 Anders Carlsson <andersca@apple.com>
1992 Store StringImpl substring backpointers as tail data
1993 https://bugs.webkit.org/show_bug.cgi?id=128220
1995 Reviewed by Geoffrey Garen.
1997 This lets us get rid of m_substringBuffer from the union.
1999 * wtf/text/StringImpl.cpp:
2000 (WTF::StringImpl::~StringImpl):
2001 (WTF::StringImpl::getData16SlowCase):
2002 * wtf/text/StringImpl.h:
2003 (WTF::StringImpl::StringImpl):
2004 (WTF::StringImpl::createSubstringSharingImpl8):
2005 (WTF::StringImpl::createSubstringSharingImpl):
2006 (WTF::StringImpl::cost):
2007 (WTF::StringImpl::costDuringGC):
2008 (WTF::StringImpl::substringBuffer):
2010 2014-02-04 Anders Carlsson <andersca@apple.com>
2012 Rename the substring sharing StringImpl::create variants to better indicate what they do
2013 https://bugs.webkit.org/show_bug.cgi?id=128214
2015 Reviewed by Geoffrey Garen.
2017 * wtf/text/AtomicString.cpp:
2018 (WTF::SubstringTranslator::translate):
2019 * wtf/text/StringBuilder.cpp:
2020 (WTF::StringBuilder::reifyString):
2021 (WTF::StringBuilder::resize):
2022 * wtf/text/StringImpl.h:
2023 (WTF::StringImpl::createSubstringSharingImpl8):
2024 (WTF::StringImpl::createSubstringSharingImpl):
2025 * wtf/text/WTFString.cpp:
2026 (WTF::String::substringSharingImpl):
2028 2014-02-04 Alexey Proskuryakov <ap@apple.com>
2030 WebCrypto HMAC verification uses a non-constant-time memcmp
2031 https://bugs.webkit.org/show_bug.cgi?id=128198
2032 <rdar://problem/15976961>
2034 Reviewed by Oliver Hunt.
2036 Added a "constant time" memcmp that doesn't depend on data. The name is somewhat
2037 strange, as the function is of course O(length) and not constant time at all,
2038 but apparently this is how everyone calls such functions.
2040 * GNUmakefile.list.am:
2041 * WTF.vcxproj/WTF.vcxproj:
2042 * WTF.vcxproj/WTF.vcxproj.filters:
2043 * WTF.xcodeproj/project.pbxproj:
2044 * wtf/CMakeLists.txt:
2045 * wtf/CryptographicUtilities.cpp: Added. (WTF::constantTimeMemcmp):
2046 * wtf/CryptographicUtilities.h: Added.
2048 2014-02-04 Anders Carlsson <andersca@apple.com>
2050 Rename StringImpl::getCharacters to StringImpl::characters
2051 https://bugs.webkit.org/show_bug.cgi?id=128205
2053 Reviewed by Antti Koivisto.
2055 This lets us use StringImpl::getCharacters for the upconverting version.
2056 Also, change StringImpl::characters<UChar>() to call characters16() instead of deprecatedCharacters()
2057 and audit all call sites to make sure we weren't relying on upconversion anywhere.
2059 * wtf/text/AtomicString.cpp:
2061 * wtf/text/StringImpl.cpp:
2062 (WTF::StringImpl::simplifyMatchedCharactersToSpace):
2063 * wtf/text/StringImpl.h:
2064 (WTF::StringImpl::characters<LChar>):
2065 (WTF::StringImpl::characters<UChar>):
2067 2014-02-04 Anders Carlsson <andersca@apple.com>
2069 Rename equalNonNull to equal and make it take const StringImpl& instead
2070 https://bugs.webkit.org/show_bug.cgi?id=128206
2072 Reviewed by Andreas Kling.
2074 * wtf/text/StringHash.h:
2075 (WTF::StringHash::equal):
2076 * wtf/text/StringImpl.cpp:
2077 (WTF::stringImplContentEqual):
2079 * wtf/text/StringImpl.h:
2081 2014-02-04 Anders Carlsson <andersca@apple.com>
2083 Get rid of StringImpl::m_buffer
2084 https://bugs.webkit.org/show_bug.cgi?id=128200
2086 Reviewed by Michael Saboff.
2088 Trade one lousy hack for another by changing the CreateEmptyUnique StringImpl
2089 constructor to initialize its character buffer to point to m_length instead
2090 since it will always be null.
2092 Also change it to be an 8-bit string because why not.
2094 * wtf/text/StringImpl.h:
2095 (WTF::StringImpl::StringImpl):
2097 2014-02-04 Anders Carlsson <andersca@apple.com>
2099 Rename String::getCharacters to String::characters
2100 https://bugs.webkit.org/show_bug.cgi?id=128196
2102 Reviewed by Andreas Kling.
2104 This means String::characters() will end up calling either characters8() or characters16() which
2105 makes more logical sense. It also frees up the getCharacters name so we can use it for a new function
2106 that will do upconversion.
2108 * wtf/text/StringBuilder.cpp:
2109 (WTF::StringBuilder::appendUninitializedSlow):
2110 * wtf/text/WTFString.h:
2111 (WTF::String::characters<LChar>):
2112 (WTF::String::characters<UChar>):
2114 2014-02-03 Anders Carlsson <andersca@apple.com>
2118 * wtf/text/StringImpl.h:
2119 (WTF::StringImpl::tailOffset):
2121 2014-02-03 Anders Carlsson <andersca@apple.com>
2123 StringImpl::tailOffset() should return the offset right after m_hashAndFlags
2124 https://bugs.webkit.org/show_bug.cgi?id=128141
2126 Reviewed by Andreas Kling.
2128 * wtf/text/StringImpl.h:
2129 (WTF::StringImpl::tailOffset):
2131 2014-02-03 Anders Carlsson <andersca@apple.com>
2133 More tail pointer consolidation
2134 https://bugs.webkit.org/show_bug.cgi?id=128139
2136 Reviewed by Andreas Kling.
2138 Add a new tailOffset() function and reimplement allocationSize() and tailPointer()
2139 in terms of it. Use tailPointer() instead of reinterpret_cast-ing this + 1.
2141 * wtf/text/StringImpl.cpp:
2142 (WTF::StringImpl::createUninitializedInternalNonEmpty):
2143 * wtf/text/StringImpl.h:
2144 (WTF::StringImpl::StringImpl):
2145 (WTF::StringImpl::requiresCopy):
2146 (WTF::StringImpl::allocationSize):
2147 (WTF::StringImpl::tailOffset):
2148 (WTF::StringImpl::tailPointer):
2150 2014-02-03 Gustavo Noronha Silva <gns@gnome.org>
2152 [GTK][CMake] Enable SUBPIXEL_LAYOUT in FeatureDefines.h like EFL does
2153 https://bugs.webkit.org/show_bug.cgi?id=128136
2155 Reviewed by Martin Robinson.
2157 * wtf/FeatureDefines.h: enable SUBPIXEL_LAYOUT if it's not set, for GTK+.
2159 2014-02-03 Mark Hahnenberg <mhahnenberg@apple.com>
2162 https://bugs.webkit.org/show_bug.cgi?id=128109
2164 Reviewed by Oliver Hunt.
2166 * wtf/Platform.h: Initially it will only be enabled for X86-64.
2168 2014-02-03 Anders Carlsson <andersca@apple.com>
2170 Consolidate StringImpl tail handling into two functions
2171 https://bugs.webkit.org/show_bug.cgi?id=128122
2173 Reviewed by Andreas Kling.
2175 * wtf/text/StringImpl.cpp:
2176 (WTF::StringImpl::createUninitializedInternalNonEmpty):
2177 (WTF::StringImpl::reallocateInternal):
2178 * wtf/text/StringImpl.h:
2179 (WTF::StringImpl::tryCreateUninitialized):
2180 (WTF::StringImpl::allocationSize):
2181 (WTF::StringImpl::tailPointer):
2183 2014-02-03 Darin Adler <darin@apple.com>
2186 https://bugs.webkit.org/show_bug.cgi?id=128106
2188 Reviewed by Anders Carlsson.
2190 * GNUmakefile.list.am: Removed files.
2191 * WTF.vcxproj/WTF.vcxproj: Ditto.
2192 * WTF.vcxproj/WTF.vcxproj.filters: Ditto.
2193 * WTF.xcodeproj/project.pbxproj: Ditto.
2194 * wtf/CMakeLists.txt: Ditto.
2196 * wtf/unicode/ScriptCodesFromICU.h: Removed.
2197 * wtf/unicode/Unicode.h: Removed.
2198 * wtf/unicode/UnicodeMacrosFromICU.h: Removed.
2199 * wtf/unicode/icu/UnicodeIcu.h: Removed.
2200 * wtf/unicode/wchar/UnicodeWchar.cpp: Removed.
2201 * wtf/unicode/wchar/UnicodeWchar.h: Removed.
2203 2014-01-25 Darin Adler <darin@apple.com>
2205 Stop using Unicode.h
2206 https://bugs.webkit.org/show_bug.cgi?id=127633
2208 Reviewed by Anders Carlsson.
2210 * wtf/StringHasher.h:
2212 * wtf/text/ASCIIFastPath.h:
2214 * wtf/text/StringBuffer.h:
2215 * wtf/text/StringImpl.h:
2216 * wtf/text/WTFString.cpp:
2217 * wtf/unicode/CharacterNames.h:
2218 * wtf/unicode/Collator.h:
2219 * wtf/unicode/UTF8.h:
2220 Removed includes of <wtf/unicode/Unicode.h>, adding includes of
2221 ICU headers and <wtf/text/LChar.h> as needed to replace it.
2223 2014-02-02 Darin Adler <darin@apple.com>
2225 Obey "delete this" comments, including deleting String::characters and friends
2226 https://bugs.webkit.org/show_bug.cgi?id=126865
2228 Reviewed by Andreas Kling.
2230 * wtf/text/AtomicString.h: Deleted the characters function.
2231 * wtf/text/StringBuilder.h: Deleted the characters function, leaving behind the
2232 deprecatedCharacters function.
2233 * wtf/text/StringImpl.h: Ditto.
2234 * wtf/text/WTFString.h: Ditto. Also added a constructor that takes a StringImpl&,
2235 helpful for later string refactoring.
2237 2014-02-02 Dan Bernstein <mitz@apple.com>
2239 Stop using PLATFORM(MAC) in WTF except where it means “OS X but not iOS”
2240 https://bugs.webkit.org/show_bug.cgi?id=128089
2242 Reviewed by Darin Adler.
2244 Replaced all uses of PLATFORM(MAC) that weren’t accompanied by !PLATFORM(IOS) with
2245 equivalent(*) tests that are more idiomatic and will not change once PLATFORM(MAC) changes to
2246 be false when building for iOS.
2248 * - One exception noted below.
2250 * wtf/AutodrainedPool.h: Changed PLATFORM(MAC) to USE(FOUNDATION), because NSAutoreleasePool
2251 is a Foundation class.
2253 * wtf/CurrentTime.cpp:
2254 (WTF::monotonicallyIncreasingTime): Changed PLATFORM(MAC) to OS(DARWIN), because Mach is
2255 part of the Darwin kernel, but reordered such that the EFL and GLIB implementations continue
2256 to take precedence regardless of the OS.
2258 * wtf/MainThread.cpp: Changed PLATFORM(MAC) to OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK).
2259 * wtf/MainThread.h: Ditto.
2261 * wtf/Platform.h: Changed USE(CG) and USE(CA) to depend on COCOA, rather than MAC or IOS.
2262 Ditto for USE(CFURLCACHE), HAVE(ACCESSIBILITY), USE(PROTECTION_SPACE_AUTH_CALLBACK),
2263 USE(ACCESSIBILITY_CONTEXT_MENUS), USE(EXPORT_MACROS), USE(AVFOUNDATION),
2264 USE(REQUEST_ANIMATION_FRAME_TIMER), USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR),
2265 USE(CONTENT_FILTERING), USE(UNIFIED_TEXT_CHECKING), USE(MARKER_REMOVAL_UPON_EDITING),
2266 USE(AUDIO_SESSION), USE(IOSURFACE), and ENABLE(CSS3_TEXT_DECORATION_SKIP_INK). Changed
2267 PLATFORM(MAC) to OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK) in controlling various
2268 JavaScriptCore or JavaScriptCore-dependent behaviors.
2270 * wtf/RunLoop.h: Changed PLATFORM(MAC) to PLATFORM(COCOA).
2271 * wtf/RunLoopTimerCF.cpp: Ditto.
2273 * wtf/SchedulePair.h: Changed PLATFORM(MAC) to USE(FOUNDATION), since it was used to guard
2274 usage of Foundation API.
2276 * wtf/Threading.cpp: Added an explicit !PLATFORM(IOS) in a guard around something needed
2277 only on OS X and Windows.
2279 2014-01-31 Benjamin Poulain <bpoulain@apple.com>
2281 Remove LEGACY_VIEWPORT_ADAPTION
2282 https://bugs.webkit.org/show_bug.cgi?id=128028
2284 Reviewed by Anders Carlsson.
2286 * wtf/FeatureDefines.h:
2288 2014-01-31 Tim Horton <timothy_horton@apple.com>
2290 [wk2] PlatformCALayerRemoteCustom doesn't work on iOS
2291 https://bugs.webkit.org/show_bug.cgi?id=128025
2292 <rdar://problem/15950271>
2294 Reviewed by Simon Fraser.
2297 Rename HAVE_LAYER_HOSTING_IN_WINDOW_SERVER to HAVE_OUT_OF_PROCESS_LAYER_HOSTING
2298 and make it true on iOS.
2300 2014-01-31 Michael Saboff <msaboff@apple.com>
2302 REGRESSION: Crash in sanitizeStackForVMImpl when scrolling @ lifehacker.com.au
2303 https://bugs.webkit.org/show_bug.cgi?id=128017
2305 Reviewed by Filip Pizlo.
2307 Moved the setting and saving of VM::stackPointerAtVMEntry and the corresponding stack limit
2308 to JSLock and JSLock::DropAllLocks. The saved data is now stored in per-thread in
2311 * wtf/WTFThreadData.cpp:
2312 (WTF::WTFThreadData::WTFThreadData):
2313 * wtf/WTFThreadData.h:
2314 (WTF::WTFThreadData::savedStackPointerAtVMEntry):
2315 (WTF::WTFThreadData::setSavedStackPointerAtVMEntry):
2316 (WTF::WTFThreadData::savedLastStackTop):
2317 (WTF::WTFThreadData::setSavedLastStackTop):
2318 (WTF::WTFThreadData::savedReservedZoneSize):
2319 (WTF::WTFThreadData::setSavedReservedZoneSize):
2321 2014-01-30 Andrei Bucur <abucur@adobe.com>
2323 Remove the ACCELERATED_COMPOSITING flag
2324 https://bugs.webkit.org/show_bug.cgi?id=127833
2326 Reviewed by Antti Koivisto.
2328 Remove the USE(ACCELERATED_COMPOSITING) conditionals from the code base and make AC
2331 * wtf/OwnPtrCommon.h:
2333 * wtf/efl/OwnPtrEfl.cpp:
2334 (WTF::deleteOwnedPtr):
2336 2014-01-28 Michael Saboff <msaboff@apple.com>
2338 Merge the jsCStack branch
2339 https://bugs.webkit.org/show_bug.cgi?id=127763
2341 Reviewed by Mark Hahnenberg.
2343 Changes from http://svn.webkit.org/repository/webkit/branches/jsCStack
2344 up to changeset 162958.
2346 2014-01-29 Csaba Osztrogonác <ossy@webkit.org>
2348 Remove ENABLE(JAVASCRIPT_DEBUGGER) guards
2349 https://bugs.webkit.org/show_bug.cgi?id=127840
2351 Reviewed by Mark Lam.
2353 * wtf/FeatureDefines.h:
2355 2014-01-28 Anders Carlsson <andersca@apple.com>
2357 Actually turn stack stats back off.
2359 * wtf/StackStats.cpp:
2362 2014-01-28 Anders Carlsson <andersca@apple.com>
2364 Turn stack stats back off.
2366 * wtf/StackStats.cpp:
2368 2014-01-28 Anders Carlsson <andersca@apple.com>
2370 Use std::mutex instead of WTF::Mutex in WTF
2371 https://bugs.webkit.org/show_bug.cgi?id=127783
2373 Reviewed by Antti Koivisto.
2375 * wtf/CryptographicallyRandomNumber.cpp:
2376 * wtf/MainThread.cpp:
2377 (WTF::mainThreadFunctionQueueMutex):
2378 (WTF::functionQueue):
2379 (WTF::dispatchFunctionsFromMainThread):
2380 (WTF::callOnMainThread):
2381 (WTF::cancelCallOnMainThread):
2382 * wtf/StackStats.cpp:
2383 (WTF::StackStats::initialize):
2384 (WTF::StackStats::CheckPoint::CheckPoint):
2385 (WTF::StackStats::CheckPoint::~CheckPoint):
2386 (WTF::StackStats::probe):
2387 (WTF::StackStats::LayoutCheckPoint::LayoutCheckPoint):
2388 (WTF::StackStats::LayoutCheckPoint::~LayoutCheckPoint):
2391 2014-01-27 Joseph Pecoraro <pecoraro@apple.com>
2393 WebCore: Enable -Wimplicit-fallthrough and add FALLTHROUGH annotation where needed
2394 https://bugs.webkit.org/show_bug.cgi?id=127671
2396 Reviewed by Ryosuke Niwa.
2398 * wtf/text/WTFString.h:
2399 (WTF::appendNumber):
2401 2014-01-27 Jer Noble <jer.noble@apple.com>
2403 [WK2] callOnMainThread() from main thread sometimes results in ASSERTs.
2404 https://bugs.webkit.org/show_bug.cgi?id=127370
2406 Reviewed by Alexey Proskuryakov.
2408 When WEB_THREAD is enabled, and callOnMainThread() is called from the main
2409 thread, if the web thread is locked, a timer is set and the passed-in function
2410 is called on the next run-loop. However, by that time the web thread may have
2411 been unlocked, and isMainThread() will no longer return true, resulting in
2414 Instead, scheduleDispatchFunctionsOnMainThread() should check isWebThread(),
2415 which is equivalent to isMainThread() when the WEB_THREAD is disabled, but
2416 will do the correct thing when WEB_THREAD is enabled.
2418 * wtf/mac/MainThreadMac.mm:
2419 (WTF::scheduleDispatchFunctionsOnMainThread):
2421 2014-01-27 Dan Bernstein <mitz@apple.com>
2425 * wtf/ThreadSafeRefCounted.h: Added a necessary #include.
2427 2014-01-25 Sam Weinig <sam@webkit.org>
2429 Remove unused support for DRAGGABLE_REGION
2430 https://bugs.webkit.org/show_bug.cgi?id=127642
2432 Reviewed by Simon Fraser.
2434 * wtf/FeatureDefines.h:
2436 2014-01-25 Joseph Pecoraro <pecoraro@apple.com>
2438 Add FALLTHROUGH and -Wimplicit-fallthrough to warn about unannotated implicit fallthroughs in switches
2439 https://bugs.webkit.org/show_bug.cgi?id=127637
2441 Reviewed by Darin Adler.
2443 For information about [[clang::fallthrough]], see:
2444 <http://clang.llvm.org/docs/LanguageExtensions.html#the-clang-fallthrough-attribute>
2446 * Configurations/Base.xcconfig:
2447 Enable -Wimplicit-fallthrough warnings.
2450 Define FALLTHROUGH on clang and fallback to outputing nothing when unsupported.
2452 * wtf/dtoa/fast-dtoa.cc:
2453 * wtf/unicode/UTF8.cpp:
2454 (WTF::Unicode::convertLatin1ToUTF8):
2455 (WTF::Unicode::convertUTF16ToUTF8):
2456 (WTF::Unicode::isLegalUTF8):
2457 (WTF::Unicode::readUTF8Sequence):
2458 Explicitly annotate implicit fallthroughs with FALLTHROUGH.
2460 2014-01-25 Darin Adler <darin@apple.com>
2462 Call deprecatedCharacters instead of characters at more call sites
2463 https://bugs.webkit.org/show_bug.cgi?id=127631
2465 Reviewed by Sam Weinig.
2467 * wtf/text/StringImpl.cpp:
2468 (WTF::StringImpl::replace):
2469 * wtf/text/WTFString.h:
2470 (WTF::String::isAllSpecialCharacters):
2473 2014-01-25 Darin Adler <darin@apple.com>
2475 Add a new separate LChar.h header file, to be used after we remove Unicode.h
2476 https://bugs.webkit.org/show_bug.cgi?id=127630
2478 Reviewed by Sam Weinig.
2480 * GNUmakefile.list.am: Added the new file
2481 * WTF.vcxproj/WTF.vcxproj: Ditto.
2482 * WTF.vcxproj/WTF.vcxproj.filters: Ditto.
2483 * WTF.xcodeproj/project.pbxproj: Ditto.
2484 * wtf/CMakeLists.txt: Ditto.
2485 * wtf/text/LChar.h: Added.
2487 2014-01-25 Darin Adler <darin@apple.com>
2489 Get rid of ICU_UNICODE and WCHAR_UNICODE remnants
2490 https://bugs.webkit.org/show_bug.cgi?id=127623
2492 Reviewed by Anders Carlsson.
2494 * wtf/CMakeLists.txt: Removed WTF_USE_ICU_UNICODE and
2495 WTF_USE_WCHAR_UNICODE since they are true and false respectively.
2497 * wtf/Platform.h: Removed code to set WTF_USE_ICU_UNICODE.
2499 * wtf/unicode/Collator.h: Removed ifdefs.
2500 * wtf/unicode/CollatorDefault.cpp: Ditto.
2501 * wtf/unicode/Unicode.h: Ditto.
2502 * wtf/unicode/icu/CollatorICU.cpp: Ditto.
2504 2014-01-25 Anders Carlsson <andersca@apple.com>
2506 Remove atomicIncrement/atomicDecrement
2507 https://bugs.webkit.org/show_bug.cgi?id=127625
2509 Reviewed by Andreas Kling.
2511 Replace atomicIncrement/atomicDecrement with std::atomic.
2514 * wtf/RefCountedLeakCounter.cpp:
2515 (WTF::RefCountedLeakCounter::~RefCountedLeakCounter):
2516 (WTF::RefCountedLeakCounter::increment):
2517 (WTF::RefCountedLeakCounter::decrement):
2518 * wtf/RefCountedLeakCounter.h:
2519 * wtf/ThreadSafeRefCounted.h:
2520 (WTF::ThreadSafeRefCountedBase::ref):
2521 (WTF::ThreadSafeRefCountedBase::refCount):
2522 (WTF::ThreadSafeRefCountedBase::derefBase):
2524 2014-01-25 Anders Carlsson <andersca@apple.com>
2526 Modernize HashTable threading code
2527 https://bugs.webkit.org/show_bug.cgi?id=127621
2529 Reviewed by Darin Adler.
2531 Use std::mutex and std::atomic instead of WTF threading primitives.
2533 * wtf/DynamicAnnotations.h:
2534 Include Platform.h here since this file relies on USE macros.
2536 * wtf/HashTable.cpp:
2537 (WTF::HashTableStats::recordCollisionAtCount):
2538 Change this to take an unsigned.
2540 (WTF::HashTableStats::dumpStats):
2542 (WTF::KeyTraits>::HashTable):
2543 (WTF::KeyTraits>::remove):
2544 (WTF::KeyTraits>::invalidateIterators):
2545 Use a single probe counter.
2548 (WTF::removeIterator):
2550 2014-01-25 Darin Adler <darin@apple.com>
2552 Restore alphabetical order in Compiler.h
2553 https://bugs.webkit.org/show_bug.cgi?id=127620
2555 Reviewed by Sam Weinig.
2557 * wtf/Compiler.h: Resorted some things into alphabetical order
2559 2014-01-24 Brent Fulgham <bfulgham@apple.com>
2561 [Win] Convert some NMake files to MSBuild project files
2562 https://bugs.webkit.org/show_bug.cgi?id=127579
2564 Reviewed by Tim Horton.
2566 * WTF.vcxproj/WTF.make: Removed.
2567 * WTF.vcxproj/WTF.proj: Added.
2569 2014-01-24 Anders Carlsson <andersca@apple.com>
2571 Get rid of monotonicallyIncreasingTimeMS and start using std::chrono instead
2572 https://bugs.webkit.org/show_bug.cgi?id=127571
2574 Reviewed by Antti Koivisto.
2577 Add a CONSTEXPR define so we can still use constexpr on compilers that don't support them (MSVC).
2579 * wtf/CurrentTime.h:
2580 Remove monotonicallyIncreasingTimeMS().
2582 * wtf/StdLibExtras.h:
2583 (std::literals::chrono_literals::operator _s):
2584 (std::literals::chrono_literals::operator _ms):
2585 Add _s and _ms literals. Once we switch over to C++14, we can drop them and just use the built-in ones.
2587 2014-01-24 Anders Carlsson <andersca@apple.com>
2589 The CXX_EXPLICIT_CONVERSIONS COMPILER_SUPPORTS macro has been removed, and all
2590 compilers support explicit conversions now so simply remove the #ifdef.
2594 2014-01-24 Darin Adler <darin@apple.com>
2597 https://bugs.webkit.org/show_bug.cgi?id=127491
2599 Reviewed by Anders Carlsson.
2601 * wtf/Assertions.h: Remove COMPILER_SUPPORTS(CXX_STATIC_ASSERT), since
2602 we now have that for all compilers that can build WebKit.
2604 * wtf/Compiler.h: Removed always true feature flags, including:
2605 COMPILER_SUPPORTS(CXX_VARIADIC_TEMPLATES), COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES),
2606 COMPILER_SUPPORTS(CXX_DELETED_FUNCTIONS), COMPILER_SUPPORTS(CXX_NULLPTR),
2607 COMPILER_SUPPORTS(CXX_EXPLICIT_CONVERSIONS), COMPILER_SUPPORTS(CXX_STATIC_ASSERT),
2608 COMPILER_SUPPORTS(CXX_OVERRIDE_CONTROL), COMPILER_SUPPORTS(CXX_STRONG_ENUMS), and
2609 COMPILER_SUPPORTS(CXX_AUTO_TYPE). Sorted sections alphabetically. Separated out
2610 nested #if and #else into separate checks for greater readability. Removed obsolete
2611 check for COMPILER(RVCT). Removed unused COMPILER(GCCE) detection.
2613 * wtf/RefPtr.h: Remove COMPILER_SUPPORTS(CXX_NULLPTR), since we now have
2614 that for all compilers that can build WebKit.
2615 * wtf/RetainPtr.h: Ditto.
2617 2014-01-23 Max Vujovic <mvujovic@adobe.com>
2619 Remove CSS Custom Filters code and tests
2620 https://bugs.webkit.org/show_bug.cgi?id=127382
2622 Reviewed by Simon Fraser.
2624 * wtf/FeatureDefines.h:
2626 2014-01-22 Brent Fulgham <bfulgham@apple.com>
2628 [Win] Update project and solution files for 64-bit builds.
2629 https://bugs.webkit.org/show_bug.cgi?id=127457
2631 Reviewed by Eric Carlson.
2633 * WTF.vcxproj/WTF.submit.sln: Add x64 targets.
2634 * WTF.vcxproj/WTF.vcxproj: Update for VS2013
2636 2014-01-22 Myles C. Maxfield <mmaxfield@apple.com>
2638 Remove CSS3_TEXT_DECORATION define
2639 https://bugs.webkit.org/show_bug.cgi?id=127333
2641 Reviewed by Simon Fraser.
2643 This is required for unprefixing the text-decoration-* CSS properties.
2647 2014-01-22 Jae Hyun Park <jae.park@company100.net>
2649 Remove unnecessary include in Noncopyable.h
2650 https://bugs.webkit.org/show_bug.cgi?id=127406
2652 Reviewed by Anders Carlsson.
2654 * wtf/Noncopyable.h: We don't need Compiler.h as of r162198.
2656 2014-01-22 Carlos Garcia Campos <cgarcia@igalia.com>
2658 [GTK] Add GUniquePtr
2659 https://bugs.webkit.org/show_bug.cgi?id=127170
2661 Reviewed by Gustavo Noronha Silva.
2663 The idea is to replace GOwnPtr with a template alias of
2664 std:unique_ptr. Not everything can be replaced, though, because
2665 GOwnPtr::outPtr() doesn't seem to be possible to implement with
2666 unique_ptr. This smart pointer is more flexible than GOwnPtr and
2667 allows to transfer the ownership of the pointer using
2670 * GNUmakefile.list.am: Add new file to compilation.
2671 * wtf/gobject/GUniquePtr.h: Added.
2672 (WTF::GPtrDeleter::operator()):
2674 2014-01-20 Anders Carlsson <andersca@apple.com>
2676 Remove an unused member variable
2677 https://bugs.webkit.org/show_bug.cgi?id=127295
2679 Reviewed by Antti Koivisto.
2681 * wtf/MainThread.cpp:
2682 (WTF::FunctionWithContext::FunctionWithContext):
2683 (WTF::FunctionWithContext::operator == ):
2684 (WTF::dispatchFunctionsFromMainThread):
2686 2014-01-20 Anders Carlsson <andersca@apple.com>
2688 Remove MutexTryLocker
2689 https://bugs.webkit.org/show_bug.cgi?id=127294
2691 Reviewed by Antti Koivisto.
2693 MutexTryLocker has been replaced with std::unique_lock with std::try_to_lock everywhere now.
2695 * wtf/ThreadingPrimitives.h:
2697 2014-01-19 Carlos Garcia Campos <cgarcia@igalia.com>
2699 [GLIB] GVariant floating references are not correctly handled by GRefPtr
2700 https://bugs.webkit.org/show_bug.cgi?id=127246
2702 Reviewed by Martin Robinson.
2704 GRefPtr should always use g_variant_ref_sink to deal with GVariant
2705 floating references. In case of full references,
2706 g_variant_ref_sink calls g_variant_ref, so it's safe to use it always.
2708 * wtf/gobject/GRefPtr.cpp:
2709 (WTF::refGPtr): Use g_variant_ref_sink().
2711 2014-01-18 Anders Carlsson <andersca@apple.com>
2713 Remove support for the viewsource attribute
2714 https://bugs.webkit.org/show_bug.cgi?id=127232
2716 Reviewed by Andreas Kling.
2718 * wtf/FeatureDefines.h:
2720 2014-01-18 Anders Carlsson <andersca@apple.com>
2722 Remove ENABLE_THREADED_HTML_PARSER defines everywhere
2723 https://bugs.webkit.org/show_bug.cgi?id=127225
2725 Reviewed by Andreas Kling.
2727 This concludes the removal of over 8.8 million lines of threaded parser code.
2729 * wtf/FeatureDefines.h:
2731 2014-01-17 Anders Carlsson <andersca@apple.com>
2733 Add a callOnMainThreadAndWait variant in SocketStreamHandle
2734 https://bugs.webkit.org/show_bug.cgi?id=127180
2736 Reviewed by Geoffrey Garen.
2738 Remove callOnMainThreadAndWait from WTF.
2740 * wtf/MainThread.cpp:
2743 2014-01-17 Peter Molnar <pmolnar.u-szeged@partner.samsung.com>
2745 Remove workaround for compilers not supporting deleted functions
2746 https://bugs.webkit.org/show_bug.cgi?id=127166
2748 Reviewed by Andreas Kling.
2751 * wtf/Noncopyable.h:
2754 2014-01-16 Benjamin Poulain <bpoulain@apple.com>
2757 https://bugs.webkit.org/show_bug.cgi?id=127150
2759 Reviewed by Alexey Proskuryakov.
2761 * wtf/DisallowCType.h:
2762 * wtf/FeatureDefines.h:
2764 * wtf/PlatformNix.cmake: Removed.
2767 2014-01-16 Anders Carlsson <andersca@apple.com>
2770 https://bugs.webkit.org/show_bug.cgi?id=127149
2772 Reviewed by Tim Horton.
2776 2014-01-16 Peter Molnar <pmolnar.u-szeged@partner.samsung.com>
2778 Remove workaround for compilers not supporting explicit override control
2779 https://bugs.webkit.org/show_bug.cgi?id=127111
2781 Reviewed by Anders Carlsson.
2783 Now all compilers support explicit override control, this workaround can be removed.
2786 * wtf/FilePrintStream.h:
2788 * wtf/StringPrintStream.h:
2790 2014-01-16 Alberto Garcia <berto@igalia.com>
2792 Source/WTF/wtf/Atomics.h:300: Error: bad register name `%bpl'
2793 https://bugs.webkit.org/show_bug.cgi?id=126985
2795 Reviewed by Csaba Osztrogonác.
2797 Use the 'q' constraint to force using a register that allows
2798 access to its lower byte.
2801 (WTF::weakCompareAndSwap):
2803 2014-01-16 Peter Molnar <pmolnar.u-szeged@partner.samsung.com>
2805 Fix unnecessary checks for Clang compiler if the compiler is MSVC.
2806 https://bugs.webkit.org/show_bug.cgi?id=127037
2808 Reviewed by Csaba Osztrogonác.
2810 Inside the #if defined(_MSC_VER) there's no need for checking whether the compiler is not Clang.
2814 2014-01-16 Peter Molnar <pmolnar.u-szeged@partner.samsung.com>
2816 Require at least GCC version 4.7
2817 https://bugs.webkit.org/show_bug.cgi?id=127049
2819 Reviewed by Csaba Osztrogonác.
2821 r161770 added a template alias, so the minimum GCC version is 4.7 now.
2823 Also fixed a typo in the error message about old MSVC version.
2827 2014-01-15 Alberto Garcia <berto@igalia.com>
2829 [GTK] v2.3.3 fails to build in Debian / FreeBSD
2830 https://bugs.webkit.org/show_bug.cgi?id=126502
2832 Reviewed by Mark Lam.
2834 * wtf/Platform.h: Add LLINT support to FreeBSD.
2836 2014-01-15 Anders Carlsson <andersca@apple.com>
2838 Get rid of RefCountedCustomAllocated
2839 https://bugs.webkit.org/show_bug.cgi?id=127051
2841 Reviewed by Antti Koivisto.
2843 It's not used anywhere anymore, get rid of it.
2846 * wtf/SizeLimits.cpp:
2848 2014-01-14 Anders Carlsson <andersca@apple.com>
2850 And yet another build fix.
2852 * wtf/SizeLimits.cpp:
2854 2014-01-14 Anders Carlsson <andersca@apple.com>
2858 * wtf/SizeLimits.cpp:
2860 2014-01-14 Daniel Bates <dabates@apple.com>
2862 [iOS] Enable WTF_USE_UIKIT_EDITING
2866 2014-01-14 Daniel Bates <dabates@apple.com>
2868 [iOS] Enable QuickLook
2869 https://bugs.webkit.org/show_bug.cgi?id=126954
2871 Reviewed by David Kilzer.
2875 2014-01-14 Anders Carlsson <andersca@apple.com>
2877 Get rid of ThreadRestrictionVerifier
2878 https://bugs.webkit.org/show_bug.cgi?id=127004
2880 Reviewed by Sam Weinig.
2882 The ThreadRestrictionVerifier mechanism has been turned off for a while
2883 since it doesn't really have a good solution for objects that are passed between threads.
2884 Instead of having dead code in the tree, just get rid of it.
2886 * GNUmakefile.list.am:
2887 * WTF.vcxproj/WTF.vcxproj:
2888 * WTF.vcxproj/WTF.vcxproj.filters:
2889 * WTF.xcodeproj/project.pbxproj:
2890 * wtf/CMakeLists.txt:
2892 (WTF::RefCountedBase::ref):
2893 (WTF::RefCountedBase::hasOneRef):
2894 (WTF::RefCountedBase::refCount):
2895 (WTF::RefCountedBase::derefBase):
2896 * wtf/ThreadRestrictionVerifier.h: Removed.
2898 2014-01-14 Benjamin Poulain <benjamin@webkit.org>
2900 Enable the experimental selector code generator by default
2901 https://bugs.webkit.org/show_bug.cgi?id=126953
2903 Reviewed by Gavin Barraclough.
2906 Enable CSS_SELECTOR_JIT on OS X x86_64 by default.
2907 The feature is not ready to ship but it is stable enough to enable
2908 for the bots and nightly.
2910 2014-01-14 Brian J. Burg <burg@cs.washington.edu>
2912 Add ENABLE(WEB_REPLAY) feature flag to the build system
2913 https://bugs.webkit.org/show_bug.cgi?id=126949
2915 Reviewed by Joseph Pecoraro.
2917 * wtf/FeatureDefines.h: for now, disable the flag by default.
2919 2014-01-14 peavo@outlook.com <peavo@outlook.com>
2921 [Win] Application name in user agent string is truncated.
2922 https://bugs.webkit.org/show_bug.cgi?id=126810
2924 Reviewed by Anders Carlsson.
2926 * wtf/text/StringConcatenate.h:
2927 (WTF::tryMakeString): Add missing 8 bit check for last argument.
2929 2014-01-13 Anders Carlsson <andersca@apple.com>
2931 Move another deprecated symbol to DeprecatedSymbolsUsedBySafari.mm
2932 https://bugs.webkit.org/show_bug.cgi?id=126909
2934 Reviewed by Ryosuke Niwa.
2936 * wtf/MainThread.cpp:
2938 * wtf/mac/DeprecatedSymbolsUsedBySafari.mm:
2939 (WTF::callOnMainThread):
2941 2014-01-13 Anders Carlsson <andersca@apple.com>
2945 * wtf/ThreadingWin.cpp:
2946 (WTF::initializeThreading):
2948 2014-01-13 Anders Carlsson <andersca@apple.com>
2950 Remove AtomicallyInitializedStatic
2951 https://bugs.webkit.org/show_bug.cgi?id=126864
2953 Reviewed by Andreas Kling.
2955 Remove the lockAtomicallyInitializedStaticMutex and unlockAtomicallyInitializedStaticMutex functions
2956 everywhere except on Mac (where they unfortunately were used by Safari).
2958 On Mac, add them to a separate file which will hold functions and symbols that we would like
2959 to remove but that are used by Safari. Reimplement them in terms of std::call_once and std::mutex.
2961 * WTF.xcodeproj/project.pbxproj:
2963 * wtf/ThreadingPthreads.cpp:
2964 (WTF::initializeThreading):
2965 * wtf/ThreadingWin.cpp:
2966 (WTF::initializeThreading):
2967 * wtf/mac/DeprecatedSymbolsUsedBySafari.mm: Added.
2968 (WTF::atomicallyInitializedStaticMutex):
2969 (WTF::lockAtomicallyInitializedStaticMutex):
2970 (WTF::unlockAtomicallyInitializedStaticMutex):
2972 2014-01-13 Commit Queue <commit-queue@webkit.org>
2974 Unreviewed, rolling out r161855.
2975 http://trac.webkit.org/changeset/161855
2976 https://bugs.webkit.org/show_bug.cgi?id=126880
2978 Sister commit of r161852 (Requested by kling on #webkit).
2980 * wtf/ThreadingPthreads.cpp:
2981 (WTF::initializeThreading):
2983 2014-01-13 Commit Queue <commit-queue@webkit.org>
2985 Unreviewed, rolling out r161852.
2986 http://trac.webkit.org/changeset/161852
2987 https://bugs.webkit.org/show_bug.cgi?id=126877
2989 Broke ToT with system Safari (Requested by kling on #webkit).
2992 * wtf/ThreadingPthreads.cpp:
2993 (WTF::initializeThreading):
2994 (WTF::lockAtomicallyInitializedStaticMutex):
2995 (WTF::unlockAtomicallyInitializedStaticMutex):
2996 * wtf/ThreadingWin.cpp:
2997 (WTF::lockAtomicallyInitializedStaticMutex):
2998 (WTF::unlockAtomicallyInitializedStaticMutex):
2999 (WTF::initializeThreading):
3001 2014-01-12 Commit Queue <commit-queue@webkit.org>
3003 Unreviewed, rolling out r161840.
3004 http://trac.webkit.org/changeset/161840
3005 https://bugs.webkit.org/show_bug.cgi?id=126870
3007 Caused jsscore and layout test failures (Requested by smfr on
3010 * wtf/text/StringImpl.cpp:
3011 (WTF::StringImpl::replace):
3012 * wtf/text/WTFString.h:
3013 (WTF::String::isAllSpecialCharacters):
3015 2014-01-12 Dan Bernstein <mitz@apple.com>
3017 Fix an assertion failure in initializeDates() when launching Safari, which was introduced in r161852.
3019 Reviewed by Andy Estes.
3021 * wtf/ThreadingPthreads.cpp:
3022 (WTF::initializeThreading): Set isInitialized to true.
3024 2014-01-12 Darin Adler <darin@apple.com>
3026 Add PLATFORM(COCOA) and USE(FOUNDATION)
3027 https://bugs.webkit.org/show_bug.cgi?id=126859
3029 Reviewed by Anders Carlsson.
3031 * wtf/Platform.h: Added PLATFORM(COCOA), which for now is set at exactly the same
3032 times that PLATFORM(MAC) is. Added USE(FOUNDATION), which is set at the same times
3033 that PLATFORM(COCOA) is. Re-organize the PLATFORM(MAC) and PLATFORM(IOS) settings
3034 in the header so they are a bit easier to read. Put HAVE_LANGINFO_H in with the
3035 rest of the OS(UNIX) settings and put HAVE_READLINE in with the rest of the
3036 OS(DARWIN) settings. Tweak formatting a bit.
3038 2014-01-12 Anders Carlsson <andersca@apple.com>
3040 Remove AtomicallyInitializedStatic
3041 https://bugs.webkit.org/show_bug.cgi?id=126864
3043 Reviewed by Darin Adler.
3046 * wtf/ThreadingPthreads.cpp:
3047 (WTF::initializeThreading):
3048 * wtf/ThreadingWin.cpp:
3049 (WTF::initializeThreading):
3051 2014-01-12 Darin Adler <darin@apple.com>
3053 Add deprecatedCharacters as a synonym for characters and convert most call sites
3054 https://bugs.webkit.org/show_bug.cgi?id=126858
3056 Reviewed by Anders Carlsson.
3058 * wtf/text/AtomicString.cpp:
3059 (WTF::HashAndUTF8CharactersTranslator::equal):
3060 (WTF::SubstringTranslator::hash):
3061 (WTF::SubstringTranslator::equal):
3062 * wtf/text/AtomicString.h:
3063 (WTF::AtomicString::characters):
3064 * wtf/text/Base64.cpp:
3065 (WTF::base64Decode):
3066 (WTF::base64URLDecode):
3067 * wtf/text/StringBuilder.h:
3068 (WTF::StringBuilder::characters):
3069 (WTF::StringBuilder::deprecatedCharacters):
3070 * wtf/text/StringImpl.cpp:
3071 (WTF::StringImpl::getData16SlowCase):
3072 (WTF::StringImpl::upper):
3073 (WTF::StringImpl::lower):
3074 (WTF::StringImpl::find):
3075 (WTF::StringImpl::findIgnoringCase):
3076 * wtf/text/StringImpl.h:
3077 (WTF::StringImpl::characters):
3078 (WTF::StringImpl::deprecatedCharacters):
3079 (WTF::StringImpl::getCharacters<UChar>):
3080 (WTF::equalIgnoringNullity):
3081 * wtf/text/WTFString.cpp:
3082 (WTF::String::append):
3083 (WTF::String::appendInternal):
3084 (WTF::String::insert):
3085 (WTF::String::truncate):
3086 (WTF::String::percentage):
3087 * wtf/text/WTFString.h:
3088 (WTF::String::characters):
3089 (WTF::String::deprecatedCharacters):
3090 (WTF::String::getCharactersWithUpconvert<UChar>):
3092 Use deprecatedCharacters instead of characters.
3094 2014-01-12 Anders Carlsson <andersca@apple.com>
3096 Remove the last remaining uses of AtomicallyInitializedStatic
3097 https://bugs.webkit.org/show_bug.cgi?id=126863
3099 Reviewed by Darin Adler.
3101 * wtf/HashTable.cpp:
3102 (WTF::hashTableStatsMutex):
3103 (WTF::HashTableStats::recordCollisionAtCount):
3104 (WTF::HashTableStats::dumpStats):
3105 * wtf/unicode/icu/CollatorICU.cpp:
3106 (WTF::cachedCollatorMutex):
3107 (WTF::Collator::createCollator):
3108 (WTF::Collator::releaseCollator):
3110 2014-01-12 Darin Adler <darin@apple.com>
3112 Reduce use of String::characters
3113 https://bugs.webkit.org/show_bug.cgi?id=126854
3115 Reviewed by Sam Weinig.
3117 * wtf/text/StringImpl.cpp:
3118 (WTF::StringImpl::replace): Use characters16 here since is8Bit was already checked.
3119 * wtf/text/WTFString.h:
3120 (WTF::String::isAllSpecialCharacters): Use characters16 here since is8Bit was
3121 already checked. Also renamed "len" to "length".
3123 2014-01-12 Anders Carlsson <andersca@apple.com>
3125 Replace more uses of AtomicallyInitializedStatic with std::call_once
3126 https://bugs.webkit.org/show_bug.cgi?id=126847
3128 Reviewed by Sam Weinig.
3131 Forward declare NeverDestroyed.
3133 2014-01-11 Zan Dobersek <zdobersek@igalia.com>
3135 Unreviewed build fix for ports using GCC after r161770.
3137 * wtf/IteratorAdaptors.h:
3138 (WTF::FilterIterator::operator*): Replicating r161797, the const qualifier for
3139 FilterIterator::operator*() is removed since it clashes with some iterator types
3140 that are also const, causing compilation failures with GCC.
3142 2014-01-11 Anders Carlsson <andersca@apple.com>
3144 Use std::call_once instead of AtomicallyInitializedStatic when creating a HTTP header set
3145 https://bugs.webkit.org/show_bug.cgi?id=126837
3147 Reviewed by Sam Weinig.
3150 (WTF::HashSet::HashSet):
3151 Add a HashSet constructor that takes an initializer list.
3153 2014-01-11 Sam Weinig <sam@webkit.org>
3157 * wtf/IteratorAdaptors.h:
3158 (WTF::TransformIterator::operator*):
3160 2014-01-11 Sam Weinig <sam@webkit.org>
3162 Add support for null StringViews
3163 https://bugs.webkit.org/show_bug.cgi?id=126827
3165 Reviewed by Anders Carlsson.
3167 - Do some style cleanup while in the neighborhood.
3169 * wtf/text/StringView.h:
3170 (WTF::StringView::StringView):
3171 Add default constructor to create a null StringView.
3173 (WTF::StringView::isNull):
3174 Add isNull(), matching the semantics of String.
3176 (WTF::StringView::operator bool):
3177 Add an explicit operator bool() to allow use in if-statements.
3179 2014-01-11 Sam Weinig <sam@webkit.org>
3181 Clean up iterator filter / iterator range code
3182 https://bugs.webkit.org/show_bug.cgi?id=126817
3184 Reviewed by Anders Carlsson.
3186 - Renames IteratorPair to IteratorRange.
3187 - Splits FilterIterator into FilterIterator (which now only filters) and
3188 TransformIterator (which does the transform part of the old FilterIterator).
3189 Move both of these to IteratorAdaptors.h
3191 * GNUmakefile.list.am:
3192 * WTF.vcxproj/WTF.vcxproj:
3193 * WTF.vcxproj/WTF.vcxproj.filters:
3194 * WTF.xcodeproj/project.pbxproj:
3195 * wtf/CMakeLists.txt:
3196 * wtf/FilterIterator.h: Removed.
3200 (WTF::HashMap::keys):
3201 (WTF::HashMap::values):
3202 * wtf/RefPtrHashMap.h:
3203 Update for rename to IteratorRange. Simplify by using makeIteratorRange().
3205 * wtf/IteratorAdaptors.h: Copied from wtf/FilterIterator.h.
3206 (WTF::FilterIterator::FilterIterator):
3207 (WTF::FilterIterator::operator*):
3208 (WTF::makeFilterIterator):
3209 (WTF::TransformIterator::TransformIterator):
3210 (WTF::TransformIterator::operator++):
3211 (WTF::TransformIterator::operator*):
3212 (WTF::TransformIterator::operator==):
3213 (WTF::TransformIterator::operator!=):
3214 (WTF::makeTransformIterator):
3215 Split up filtering and transforming. Add makeFilterIterator() and makeTransformIterator()
3218 * wtf/IteratorPair.h: Removed.
3219 * wtf/IteratorRange.h: Copied from wtf/IteratorPair.h.
3220 (WTF::IteratorRange::IteratorRange):
3221 (WTF::makeIteratorRange):
3222 Renamed to IteratorRange and adds makeIteratorRange() helper.
3224 2014-01-10 David Kilzer <ddkilzer@apple.com>
3226 Clean up architectures in xcconfig files
3227 <http://webkit.org/b/126794>
3229 Reviewed by Andy Estes.
3231 * Configurations/Base.xcconfig:
3234 2014-01-10 Tamas Gergely <tgergely.u-szeged@partner.samsung.com>
3236 [EFL][JSC] Enable udis86 disassembler on efl.
3237 https://bugs.webkit.org/show_bug.cgi?id=125502
3239 Reviewed by Michael Saboff.
3241 Enable udis86 disassembler on efl and fix build warnings.
3244 Enable udis86 disassembler on EFL.
3246 2014-01-10 Hunseop Jeong <hs85.jeong@samsung.com>
3248 [EFL] Enable the DFG_JIT on ARMv7
3249 https://bugs.webkit.org/show_bug.cgi?id=126742
3251 Reviewed by Gyuyoung Kim.
3253 Turn on ENABLE_DFG_JIT on ARMv7 for EFL.
3257 2014-01-07 Mark Hahnenberg <mhahnenberg@apple.com>
3259 Marking should be generational
3260 https://bugs.webkit.org/show_bug.cgi?id=126552
3262 Reviewed by Geoffrey Garen.
3265 (WTF::WordType>::count): Added a cast that became necessary when Bitmap
3266 is used with smaller types than int32_t.
3268 2014-01-09 Simon Fraser <simon.fraser@apple.com>
3270 Enable async scrolling for iOS
3271 https://bugs.webkit.org/show_bug.cgi?id=126730
3273 Reviewed by Tim Horton.
3275 Turn on ENABLE_ASYNC_SCROLLING for iOS.
3277 * wtf/FeatureDefines.h:
3279 2014-01-09 Anders Carlsson <andersca@apple.com>
3281 Remove Blackberry and QNX bits from WTF
3282 https://bugs.webkit.org/show_bug.cgi?id=126726
3284 Reviewed by Benjamin Poulain.
3286 * wtf/Assertions.cpp:
3288 * wtf/CurrentTime.cpp:
3289 (WTF::currentCPUTime):
3291 * wtf/DisallowCType.h:
3292 * wtf/FeatureDefines.h:
3295 * wtf/NumberOfCores.cpp:
3296 (WTF::numberOfProcessorCores):
3297 * wtf/OSAllocatorPosix.cpp:
3298 (WTF::OSAllocator::reserveUncommitted):
3299 (WTF::OSAllocator::commit):
3300 (WTF::OSAllocator::decommit):
3302 * wtf/PlatformBlackBerry.cmake: Removed.
3304 (WTF::computeRAMSize):
3305 * wtf/StackBounds.cpp:
3306 * wtf/ThreadingPthreads.cpp:
3307 (WTF::initializeThreading):
3308 (WTF::initializeCurrentThreadInternal):
3309 * wtf/blackberry/MainThreadBlackBerry.cpp: Removed.
3310 * wtf/blackberry/RunLoopBlackBerry.cpp: Removed.
3311 * wtf/text/AtomicString.h:
3312 * wtf/text/StringImpl.h:
3313 * wtf/text/WTFString.h:
3315 2014-01-09 Daniel Bates <dabates@apple.com>
3317 [iOS] Upstream WebCore/platform changes
3318 https://bugs.webkit.org/show_bug.cgi?id=126654
3320 Rubber-stamped by David Kilzer.
3322 * wtf/MainThread.cpp:
3323 (WTF::canAccessThreadLocalDataForThread):
3326 2014-01-09 Commit Queue <commit-queue@webkit.org>
3328 Unreviewed, rolling out r161540.
3329 http://trac.webkit.org/changeset/161540
3330 https://bugs.webkit.org/show_bug.cgi?id=126704
3332 Caused assertion failures on multiple tests (Requested by ap
3336 (WTF::WordType>::count):
3338 2014-01-07 Mark Hahnenberg <mhahnenberg@apple.com>
3340 Marking should be generational
3341 https://bugs.webkit.org/show_bug.cgi?id=126552
3343 Reviewed by Geoffrey Garen.
3346 (WTF::WordType>::count): Added a cast that became necessary when Bitmap
3347 is used with smaller types than int32_t.
3349 2014-01-08 Anders Carlsson <andersca@apple.com>
3351 Add WTF::StringView and use it for grammar checking
3352 https://bugs.webkit.org/show_bug.cgi?id=126644
3354 Reviewed by Antti Koivisto.
3356 Add a new StringView class which is an immutable reference to either an 8-bit or a 16-bit string.
3358 This makes it easier to pass substrings around without having to either copy string data
3359 or upconvert and use UChar pointers.
3361 The StringView class is very loosely based on the std::string_view class which is proposed for a future version of C++,
3362 see http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3609.html for more details.
3364 * GNUmakefile.list.am:
3365 * WTF.vcxproj/WTF.vcxproj:
3366 * WTF.vcxproj/WTF.vcxproj.filters:
3367 * WTF.xcodeproj/project.pbxproj:
3368 * wtf/CMakeLists.txt:
3370 * wtf/text/StringView.h: Added.
3371 (WTF::StringView::StringView):
3372 (WTF::StringView::empty):
3373 (WTF::StringView::characters8):
3374 (WTF::StringView::characters16):
3375 (WTF::StringView::isEmpty):
3376 (WTF::StringView::length):
3377 (WTF::StringView::is8Bit):
3378 (WTF::StringView::substring):
3379 (WTF::StringView::toString):
3380 (WTF::StringView::toStringWithoutCopying):
3381 (WTF::StringView::encodedCharacters):
3383 2014-01-07 David Farler <dfarler@apple.com>
3385 [ASAN] Building with trunk clang corrupts sandbox profile with comment from Compiler.h
3386 https://bugs.webkit.org/show_bug.cgi?id=124532
3388 Reviewed by David Kilzer.
3391 Remove this quirk - it does nothing.
3393 2014-01-06 Filip Pizlo <fpizlo@apple.com>
3395 Get rid of ENABLE(VALUE_PROFILER). It's on all the time now.
3397 Rubber stamped by Mark Hahnenberg.
3401 2014-01-06 Zan Dobersek <zdobersek@igalia.com>
3403 Remove using directives for the std namespace from WTF
3404 https://bugs.webkit.org/show_bug.cgi?id=126524
3406 Reviewed by Alexey Proskuryakov.
3408 Remove the using directives for the std namespace throughout the WTF code.
3409 The more explicit std:: nested name specifier should be used instead.
3411 * wtf/MediaTime.cpp:
3412 (WTF::MediaTime::createWithFloat):
3413 (WTF::MediaTime::createWithDouble):
3414 * wtf/text/StringImpl.cpp:
3415 (WTF::StringImpl::create):
3416 (WTF::StringImpl::lower):
3417 (WTF::StringImpl::upper):
3418 (WTF::StringImpl::foldCase):
3419 (WTF::StringImpl::find):
3420 (WTF::StringImpl::findIgnoringCase):
3421 (WTF::reverseFindInner):
3422 (WTF::StringImpl::reverseFind):
3423 (WTF::reverseFindIgnoringCaseInner):
3424 (WTF::StringImpl::reverseFindIgnoringCase):
3425 (WTF::StringImpl::replace):
3426 (WTF::StringImpl::utf8ForCharacters):
3427 (WTF::StringImpl::utf8ForRange):
3428 * wtf/text/WTFString.cpp:
3429 (WTF::String::append):
3430 (WTF::String::appendInternal):
3431 (WTF::String::insert):
3432 (WTF::String::substringSharingImpl):
3433 (WTF::String::fromUTF8):
3434 (WTF::toIntegralType):
3435 * wtf/win/RunLoopWin.cpp:
3437 2014-01-03 Mark Hahnenberg <mhahnenberg@apple.com>
3439 DoublyLinkedLists can't be concatenated
3440 https://bugs.webkit.org/show_bug.cgi?id=125976
3442 Reviewed by Filip Pizlo.
3444 * wtf/DoublyLinkedList.h:
3445 (WTF::DoublyLinkedList<T>::append):
3447 2014-01-04 Zan Dobersek <zdobersek@igalia.com>
3449 Explicitly use the std:: nested name specifier when using std::pair, std::make_pair
3450 https://bugs.webkit.org/show_bug.cgi?id=126439
3452 Reviewed by Andreas Kling.
3454 * wtf/VectorTraits.h: Stop bringing std::pair into the current scope.
3456 2014-01-02 Gavin Barraclough <barraclough@apple.com>
3458 Refactor NSActivity handling code from ChildProcess to UserActivity
3459 https://bugs.webkit.org/show_bug.cgi?id=126330
3461 Reviewed by Sam Weinig.
3463 UserActivity is a mechanism to express to the operating system (where appropriate)
3464 that a user initiated activity is taking place, and as such that resources should be
3465 made available to the process accordingly.
3467 Currently we hold a single NSActivity, at the WebKit layer. This refactoring allows us
3468 to hold different activity tokens for different user actions (which simplifies the
3469 handling, and aides debugging since the token can more accurately express the activity
3470 taking place), and also will allow us to avoid the layering difficulty of calling back
3471 up the stack to WebKit to register that an activity is taking place.
3474 - added HAVE_NS_ACTIVITY.
3476 2013-12-30 Commit Queue <commit-queue@webkit.org>
3478 Unreviewed, rolling out r161157, r161158, r161160, r161161,
3479 r161163, and r161165.
3480 http://trac.webkit.org/changeset/161157
3481 http://trac.webkit.org/changeset/161158
3482 http://trac.webkit.org/changeset/161160
3483 http://trac.webkit.org/changeset/161161
3484 http://trac.webkit.org/changeset/161163
3485 http://trac.webkit.org/changeset/161165
3486 https://bugs.webkit.org/show_bug.cgi?id=126332
3488 Broke WebKit2 on Mountain Lion (Requested by ap on #webkit).
3490 * GNUmakefile.list.am:
3491 * WTF.vcxproj/WTF.vcxproj:
3492 * WTF.vcxproj/WTF.vcxproj.filters:
3493 * WTF.xcodeproj/project.pbxproj:
3494 * wtf/CMakeLists.txt:
3496 * wtf/PlatformWin.cmake:
3497 * wtf/threads/BinarySemaphore.cpp: Added.
3498 (WTF::BinarySemaphore::BinarySemaphore):
3499 (WTF::BinarySemaphore::~BinarySemaphore):
3500 (WTF::BinarySemaphore::signal):
3501 (WTF::BinarySemaphore::wait):
3502 * wtf/threads/BinarySemaphore.h: Added.
3503 (WTF::BinarySemaphore::event):
3504 * wtf/threads/win/BinarySemaphoreWin.cpp: Added.
3505 (WTF::BinarySemaphore::BinarySemaphore):
3506 (WTF::BinarySemaphore::~BinarySemaphore):
3507 (WTF::BinarySemaphore::signal):
3508 (WTF::BinarySemaphore::wait):
3510 2013-12-30 Anders Carlsson <andersca@apple.com>
3512 Replace yield() and pauseBriefly() with std::this_thread::yield()
3513 https://bugs.webkit.org/show_bug.cgi?id=126105
3515 Reviewed by Sam Weinig.
3517 * wtf/ByteSpinLock.h:
3518 (WTF::ByteSpinLock::lock):
3520 * wtf/ThreadingPrimitives.h:
3521 * wtf/ThreadingPthreads.cpp:
3522 * wtf/ThreadingWin.cpp:
3524 2013-12-30 Sam Weinig <sam@webkit.org>
3526 Remove unnecessary non-const overload in IteratorPair
3527 https://bugs.webkit.org/show_bug.cgi?id=126314
3529 Reviewed by Anders Carlsson.
3531 * wtf/IteratorPair.h:
3533 2013-12-30 Sam Weinig <sam@webkit.org>
3535 Remove WTF's BinarySemaphore
3536 https://bugs.webkit.org/show_bug.cgi?id=126310
3538 Reviewed by Anders Carlsson.
3540 It's unused. Also remove the now empty wtf/threads directory.
3542 * GNUmakefile.list.am:
3543 * WTF.vcxproj/WTF.vcxproj:
3544 * WTF.vcxproj/WTF.vcxproj.filters:
3545 * WTF.xcodeproj/project.pbxproj:
3546 * wtf/CMakeLists.txt:
3548 * wtf/PlatformWin.cmake:
3549 * wtf/threads: Removed.
3550 * wtf/threads/BinarySemaphore.cpp: Removed.
3551 * wtf/threads/BinarySemaphore.h: Removed.
3552 * wtf/threads/win: Removed.
3553 * wtf/threads/win/BinarySemaphoreWin.cpp: Removed.
3555 2013-12-30 Roger Fong <roger_fong@apple.com>
3557 [Windows] Unreviewed build fix following r160959.
3561 2013-12-30 Anders Carlsson <andersca@apple.com>
3563 Replace WTF::ThreadingOnce with std::call_once
3564 https://bugs.webkit.org/show_bug.cgi?id=126215
3566 Reviewed by Sam Weinig.
3568 * GNUmakefile.list.am:
3569 * wtf/CompilationThread.cpp:
3570 (WTF::initializeCompilationThreads):
3571 * wtf/ThreadingOnce.h: Removed.
3573 2013-12-26 Sam Weinig <sam@webkit.org>
3575 Move FilterIterator and IteratorPair to WTF and reimplement HashMap::keys() and HashMap::values() using IteratorPair
3576 https://bugs.webkit.org/show_bug.cgi?id=126253
3578 Reviewed by Anders Carlsson.
3580 * GNUmakefile.list.am:
3581 * WTF.vcxproj/WTF.vcxproj:
3582 * WTF.vcxproj/WTF.vcxproj.filters:
3583 * WTF.xcodeproj/project.pbxproj:
3584 * wtf/CMakeLists.txt:
3588 * wtf/RefPtrHashMap.h:
3589 Remove the old implementation of keys() and values() and replace it with one
3590 that uses IteratorPair.
3592 * wtf/FilterIterator.h: Copied from Source/WebKit2/Shared/FilterIterator.h.
3593 * wtf/IteratorPair.h: Copied from Source/WebKit2/Shared/IteratorPair.h.
3595 2013-12-27 Daniel Bates <dabates@apple.com>
3597 [iOS] Upstream WebCore/page changes
3598 https://bugs.webkit.org/show_bug.cgi?id=126180
3600 Reviewed by Darin Adler.
3602 * wtf/FeatureDefines.h: Define ENABLE_IOS_TOUCH_EVENTS to be enabled by default
3603 when building iOS with ENABLE(TOUCH_EVENTS).
3605 2013-12-25 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
3607 [Nix] Building with DRAG_SUPPORT enabled
3608 https://bugs.webkit.org/show_bug.cgi?id=126233
3610 Reviewed by Daniel Bates.
3612 * wtf/nix/FeatureDefinesNix.h:
3614 2013-12-24 Commit Queue <commit-queue@webkit.org>
3616 Unreviewed, rolling out r160959.
3617 http://trac.webkit.org/changeset/160959
3618 https://bugs.webkit.org/show_bug.cgi?id=126222
3620 Caused Windows build to fail (Requested by rfong on #webkit).
3622 * wtf/ByteSpinLock.h:
3623 (WTF::ByteSpinLock::lock):
3625 * wtf/ThreadingPrimitives.h:
3626 (WTF::pauseBriefly):
3627 * wtf/ThreadingPthreads.cpp:
3629 * wtf/ThreadingWin.cpp:
3632 2013-12-23 Benjamin Poulain <bpoulain@apple.com>
3634 Fix the build after r161031
3636 I enabled ENABLE_CSS_SELECTOR_JIT by accident.
3640 2013-12-23 Zan Dobersek <zdobersek@igalia.com>
3642 [GTK] Clean up compiler optimizations flags for libWTF, libJSC
3643 https://bugs.webkit.org/show_bug.cgi?id=126157
3645 Reviewed by Gustavo Noronha Silva.
3647 * GNUmakefile.am: Remove the -fstrict-aliasing and -O3 compiler flags for libWTF.la. -O3 gets
3648 overridden by -O2 that's listed in CXXFLAGS (or -O0 in case of debug builds) and -fstrict-aliasing
3649 is enabled when -O2 is used (and shouldn't be enabled in debug builds anyway).
3651 2013-12-20 Anders Carlsson <andersca@apple.com>
3653 Replace yield() and pauseBriefly() with std::this_thread::yield()
3654 https://bugs.webkit.org/show_bug.cgi?id=126105
3656 Reviewed by Sam Weinig.
3658 * wtf/ByteSpinLock.h:
3659 (WTF::ByteSpinLock::lock):
3661 * wtf/ThreadingPrimitives.h:
3662 * wtf/ThreadingPthreads.cpp:
3663 * wtf/ThreadingWin.cpp:
3665 2013-12-20 Anders Carlsson <andersca@apple.com>