1 2013-10-12 Anders Carlsson <andersca@apple.com>
3 Change callOnMainThread to take an std::function
4 https://bugs.webkit.org/show_bug.cgi?id=122698
6 Reviewed by Darin Adler.
8 This will let us pass anything that can be converted to an std::function (including lambdas and
9 WTF::Function objects) to callOnMainThread.
12 (WTF::callOnMainThread):
15 2013-09-06 Jessica Pease <jessica_n_pease@apple.com>
17 Replace bounds checking ASSERTs with ASSERT_WITH_SECURITY_IMPLICATION
18 https://bugs.webkit.org/show_bug.cgi?id=120893
20 Reviewed by Darin Adler.
22 * wtf/BumpPointerAllocator.h:
23 (WTF::BumpPointerPool::ensureCapacity):
24 (WTF::BumpPointerPool::alloc):
25 (WTF::BumpPointerPool::ensureCapacityCrossPool):
27 (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
28 * wtf/StringPrintStream.cpp:
29 (WTF::StringPrintStream::increaseSize):
31 (WTF::double_conversion::BufferReference::SubBufferReference):
32 * wtf/text/WTFString.cpp:
33 (WTF::String::fromUTF8):
35 2013-10-11 Darin Adler <darin@apple.com>
37 Change most call sites to call ICU directly instead of through WTF::Unicode
38 https://bugs.webkit.org/show_bug.cgi?id=122635
40 Reviewed by Alexey Proskuryakov.
42 * wtf/text/StringHash.h:
43 (WTF::CaseFoldingHash::foldCase): Use u_foldCase instead of WTF::Unicode::foldCase.
44 (WTF::CaseFoldingHash::hash): Added an overload for a StringImpl& because why not.
46 * wtf/text/StringImpl.cpp:
47 (WTF::StringImpl::lower): Use u_tolower rather than WTF::Unicode::toLower. Also added
48 an assertion to check that the lowercase version is also part of Latin-1. If this
49 is not guaranteed it would be good to know in a debug build at least. Use u_strToLower
50 rather than WTF::Unicode::toLower. Also removed #if USE(ICU_UNICODE) around the
51 locale-specific version.
52 (WTF::StringImpl::upper): Use u_toupper and u_strToUpper, as above.
53 (WTF::StringImpl::foldCase): Use u_tolower and u_strFoldCase, as above.
54 (WTF::equalIgnoringCase): Use u_foldCase instead of WTF::Unicode::foldCase.
55 (WTF::StringImpl::defaultWritingDirection): Use u_charDirection and UCharDirection
56 instead of WTF::Unicode::direction and WTF::Unicode::Direction.
58 * wtf/text/StringImpl.h:
59 (WTF::equalIgnoringCase): Use u_memcasecmp instead of WTF::Unicode::umemcasecmp.
60 (WTF::isSpaceOrNewline): Use u_charDirection instead of WTF::Unicode::direction.
62 * wtf/text/WTFString.h:
63 (WTF::String::defaultWritingDirection): Use UCharDirection instead of WTF::Unicode::Direction.
65 * wtf/unicode/icu/UnicodeIcu.h: Removed almost everything.
67 * wtf/unicode/wchar/UnicodeWchar.cpp: Tried to do the right thing in this file, but
68 I did not actually compile it. Also, the implementations here aren't really sufficient
69 to make WebKit work broadly. There are many things that just aren't working with this
70 implementation, such as parsing that uses u_charType to figure out which characters are valid.
71 (unorm_normalize): Added.
72 (u_charDirection): Added.
73 (u_charMirror): Added.
75 (u_getCombiningClass): Added.
76 (u_getIntPropertyValue): Added.
77 (u_memcasecmp): Added.
78 (convertWithFunction): Changed to work with ICU-style status code instead of error bool.
79 (u_strFoldCase): Added.
80 (u_strToLower): Added.
81 (u_strToUpper): Added.
82 * wtf/unicode/wchar/UnicodeWchar.h: Ditto. Later this file should just be named like the
83 real ICU headers so the code can include it the same way it would ICU. But that will be
86 2013-10-11 Anders Carlsson <andersca@apple.com>
88 Remove gesture event support from WebCore
89 https://bugs.webkit.org/show_bug.cgi?id=122650
91 Reviewed by Ryosuke Niwa.
93 * wtf/FeatureDefines.h:
94 * wtf/nix/FeatureDefinesNix.h:
96 2013-10-09 Filip Pizlo <fpizlo@apple.com>
98 FTL: Soft-link LLVM as a workaround for LLVM's static initializers and exit-time destructors
99 https://bugs.webkit.org/show_bug.cgi?id=122566
101 Reviewed by Mark Rowe.
103 Remove all LLVM stuff from WTF since to get LLVM you need to soft-link and it's
104 entirely the responsibility of JSC to do that.
106 Also fixed an export goof that I found after fixing the weak thingy script in JSC.
108 * WTF.xcodeproj/project.pbxproj:
109 * wtf/LLVMHeaders.h: Removed.
110 * wtf/text/CString.h:
111 (WTF::CStringHash::hash):
113 2013-10-10 Mark Rowe <mrowe@apple.com>
115 <rdar://problem/13341666> WebKit should always build against an SDK.
117 Have all projects default to building against the OS X Internal SDK for the Production
118 configuration. For the Debug and Release configurations, look for UseInternalSDK.xcconfig
119 to determine whether the OS X Internal SDK should be used. If not, use the normal OS X SDK.
121 Reviewed by Dan Bernstein.
123 * Configurations/Base.xcconfig:
124 * Configurations/DebugRelease.xcconfig:
126 2013-10-10 Hans Muller <hmuller@adobe.com>
128 [CSS Shapes] clampToUnsigned() should return unsigned, not int
129 https://bugs.webkit.org/show_bug.cgi?id=122601
131 Corrected the return type for clampToUnsigned() in MathExtras.h. It's now unsigned.
133 Reviewed by Andreas Kling.
138 2013-10-08 Filip Pizlo <fpizlo@apple.com>
140 FTL should be able to do simple OSR exits using llvm.webkit.stackmap
141 https://bugs.webkit.org/show_bug.cgi?id=122538
143 Reviewed by Oliver Hunt.
145 * wtf/PrintStream.cpp:
146 (WTF::printInternal):
148 * wtf/RefCountedArray.h:
149 (WTF::RefCountedArray::byteSize):
151 2013-10-09 Michael Saboff <msaboff@apple.com>
153 Change to std::unique_ptr breaks wtf/DataLog.cpp when DATA_LOG_TO_FILE set to 1
154 https://bugs.webkit.org/show_bug.cgi?id=122557
156 Reviewed by Filip Pizlo.
158 Changed the leakPtr() to release().
161 (WTF::initializeLogFileOnce):
163 2013-10-08 Tim Horton <timothy_horton@apple.com>
165 Turn threaded scrolling on for all Mac ports.
166 Rubber-stamped by Simon Fraser and Sam Weinig.
168 * wtf/FeatureDefines.h:
170 2013-10-06 Darin Adler <darin@apple.com>
172 Improve HashMap::add comment and other similar comments
173 https://bugs.webkit.org/show_bug.cgi?id=122432
175 Reviewed by Andreas Kling.
177 * wtf/HashCountedSet.h:
180 Updated comment wording. They were a bit old and out of date.
181 They also featured the word "interator".
183 2013-10-07 Darin Adler <darin@apple.com>
185 Make Vector::insert work for move-only types
186 https://bugs.webkit.org/show_bug.cgi?id=122429
188 Reviewed by Anders Carlsson.
191 (WTF::Vector::insert): Take an rvalue reference instead of a const reference.
192 (WTF::Vector::insertVector): Renamed to avoid overloading troubles, analogous
193 to what we did for appendVector.
195 2013-10-07 Anders Carlsson <andersca@apple.com>
199 * wtf/StdLibExtras.h:
202 2013-10-07 Roger Fong <roger_fong@apple.com>
204 Modify WTF makefile for x64 build.
205 https://bugs.webkit.org/show_bug.cgi?id=122467.
206 <rdar://problem/15169174>.
208 Reviewed by Brent Fulgham.
210 * WTF.vcxproj/WTF.make:
212 2013-10-07 Anders Carlsson <andersca@apple.com>
214 Remove passIn and passOut from HashTraits
215 https://bugs.webkit.org/show_bug.cgi?id=122452
217 Reviewed by Sam Weinig.
219 Change RefPtrHashMap to not use passOut (just like the regular HashMap) and get rid of the
220 passIn and passOut functions and related typedefs.
223 * wtf/RefPtrHashMap.h:
225 2013-10-06 Anders Carlsson <andersca@apple.com>
227 Add OVERRIDE and virtual where appropriate
228 https://bugs.webkit.org/show_bug.cgi?id=122439
230 Reviewed by Antti Koivisto.
233 * wtf/FilePrintStream.h:
234 * wtf/StringPrintStream.h:
236 2013-10-06 Andreas Kling <akling@apple.com>
238 Range constructors should take a Document&.
239 <https://webkit.org/b/122435>
241 Reviewed by Sam Weinig.
243 Give Ref an assignment operator.
245 2013-10-05 Anders Carlsson <andersca@apple.com>
247 Clean up MessageQueue.h
248 https://bugs.webkit.org/show_bug.cgi?id=122392
250 Reviewed by Andreas Kling.
252 Make MessageQueue use std::unique_ptr and change findIf and removeIf to take const references.
255 Change findIf to take an rvalue reference.
257 * wtf/MessageQueue.h:
259 (WTF::::appendAndKill):
260 (WTF::::appendAndCheckEmpty):
264 2013-10-05 Anders Carlsson <andersca@apple.com>
266 Try to #define final to sealed when building with MSVC
267 https://bugs.webkit.org/show_bug.cgi?id=122386
269 Reviewed by Darin Adler.
273 2013-10-05 Anders Carlsson <andersca@apple.com>
276 https://bugs.webkit.org/show_bug.cgi?id=122388
278 Reviewed by Darin Adler.
280 Since we're going with std::unique_ptr instead of OwnPtr, there's no need for makeOwned to exist.
281 Get rid of it and replace it with calls to std::make_unique.
283 * wtf/FilePrintStream.cpp:
284 (WTF::FilePrintStream::open):
285 * wtf/FilePrintStream.h:
289 (WTF::::ListHashSet):
292 (WTF::compatEntryPoint):
294 * wtf/ThreadingPthreads.cpp:
295 (WTF::wtfThreadEntryPoint):
296 (WTF::createThreadInternal):
297 * wtf/unicode/Collator.h:
298 * wtf/unicode/CollatorDefault.cpp:
299 (WTF::Collator::userDefault):
300 * wtf/unicode/icu/CollatorICU.cpp:
301 (WTF::Collator::userDefault):
303 2013-10-05 Darin Adler <darin@apple.com>
305 Remove COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES) since it's required now
306 https://bugs.webkit.org/show_bug.cgi?id=122387
308 Reviewed by Anders Carlsson.
313 * wtf/text/AtomicString.h:
314 * wtf/text/WTFString.h:
315 Take out conditionals.
317 2013-10-05 Darin Adler <darin@apple.com>
319 Add AtomicString::number and use it
320 https://bugs.webkit.org/show_bug.cgi?id=122384
322 Reviewed by Anders Carlsson.
324 * wtf/text/AtomicString.cpp:
325 (WTF::AtomicString::number): Added.
326 * wtf/text/AtomicString.h: Ditto.
328 * wtf/text/IntegerToStringConversion.h: Simplify includes, renamed ConversionTrait to
329 IntegerToStringConversionTrait. Changed String version to use String since we no longer
330 need to use PassRefPtr to efficiently handle return values. Replaced UnsignedIntegerTrait
331 with std::make_unsigned. Added AtomicString support. Use nullptr instead of 0.
333 2013-10-05 Darin Adler <darin@apple.com>
335 Cut down on use of String::number
336 https://bugs.webkit.org/show_bug.cgi?id=122382
338 Reviewed by Anders Carlsson.
341 (WTF::appendTwoDigitNumber): Added. Replaces twoDigitStringFromNumber, which returned a
342 String and also allocated a temporary string for any number 10 or higher.
343 (WTF::makeRFC2822DateString): Updated to use the new function.
345 2013-10-05 Anders Carlsson <andersca@apple.com>
347 Test the waters and begin using lambdas
348 https://bugs.webkit.org/show_bug.cgi?id=121809
350 Reviewed by Andreas Kling.
353 (WTF::sortedListDump):
354 Use std::less instead of a custom lessThan function.
356 2013-10-04 Darin Adler <darin@apple.com>
358 text-transform: lowercase is not lang-dependent (Turkish languages : tr,az)
359 https://bugs.webkit.org/show_bug.cgi?id=21312
361 Reviewed by Ryosuke Niwa.
363 * wtf/text/StringImpl.cpp:
364 (WTF::StringImpl::upper): Removed an extra call that would unnecessarily reallocate
365 a StringImpl in the general non-ASCII case. Added an overload that takes a locale identifier.
366 (WTF::StringImpl::lower): Ditto.
367 * wtf/text/StringImpl.h: Ditto.
368 * wtf/text/WTFString.cpp:
369 (WTF::String::lower): Ditto.
370 (WTF::String::upper): Ditto.
371 * wtf/text/WTFString.h: Ditto. Also deleted the makeLower and makeUpper functions since they
372 offer no advantages over the lower and upper functions. Also added a constructor that takes
373 a RefPtr<StringImpl> with move construction to help.
375 2013-10-04 Brent Fulgham <bfulgham@apple.com>
377 Remove Qt definitions from Platform.h
378 https://bugs.webkit.org/show_bug.cgi?id=122349
380 Reviewed by Anders Carlsson.
382 * wtf/Platform.h: Remove unused PLATFORM(QT) stanzas from file.
384 2013-10-04 Brent Fulgham <bfulgham@apple.com>
386 [Win] Turn off FastMalloc on Windows
387 https://bugs.webkit.org/show_bug.cgi?id=122352
389 Reviewed by Darin Adler.
391 * wtf/Platform.h: Enable USE_SYSTEM_MALLOC when building on
392 Windows to stick to the MSVCRT allocator/deallocator.
394 2013-10-04 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
396 Remove WTF smart pointers 'const_pointer_cast'
397 https://bugs.webkit.org/show_bug.cgi?id=122325
399 Reviewed by Darin Adler.
401 Removed WTF smart pointers 'const_pointer_cast' functions as:
403 - their implementation was wrong as they tried to cast to a different pointer type
409 2013-10-04 Oliver Hunt <oliver@apple.com>
411 Support for-of syntax
412 https://bugs.webkit.org/show_bug.cgi?id=122339
414 Reviewed by Geoffrey Garen.
416 Update assertions and add a helper function to StringImpl
417 to save repeated unique or identifier calls.
419 * wtf/text/StringImpl.h:
420 (WTF::StringImpl::isIdentifierOrUnique):
421 (WTF::StringImpl::setIsIdentifier):
422 (WTF::StringImpl::setIsAtomic):
424 2013-10-02 Brent Fulgham <bfulgham@apple.com>
426 [Win] Update solutions and projects to support 64-bit build.
427 https://bugs.webkit.org/show_bug.cgi?id=122225
429 Reviewed by Anders Carlsson.
431 * WTF.vcxproj/WTF.submit.sln: Add x64 architecture targets.
432 * WTF.vcxproj/WTF.vcxproj: Correct path to config.h file.
433 * WTF.vcxproj/WTF.vcxproj.filters: Correct path to config.h file.
436 2013-10-02 Nadav Rotem <nrotem@apple.com>
438 Eliminate a branch in FastBitVector setAndCheck, make it vectorizable.
439 https://bugs.webkit.org/show_bug.cgi?id=122229
441 Reviewed by Geoffrey Garen.
443 The CPU is unlikely to predict the branch in setAndCheck. I changed the code to use conditional instructions.
445 * wtf/FastBitVector.h:
446 (WTF::FastBitVector::setAndCheck):
448 2013-10-02 Anders Carlsson <andersca@apple.com>
450 Remove Qt code from WTF
451 https://bugs.webkit.org/show_bug.cgi?id=122221
453 Reviewed by Antti Koivisto.
455 I'm keeping the PLATFORM(QT) defines in Platform.h for now so we can assess if there are any
456 Qt only features that we can remove later.
460 * wtf/Assertions.cpp:
461 * wtf/CurrentTime.cpp:
462 * wtf/DisallowCType.h:
463 * wtf/FastMalloc.cpp:
464 * wtf/FeatureDefines.h:
465 * wtf/qt/MainThreadQt.cpp: Removed.
466 * wtf/qt/StringQt.cpp: Removed.
467 * wtf/text/AtomicString.h:
468 * wtf/text/StringImpl.cpp:
469 (WTF::StringImpl::~StringImpl):
470 * wtf/text/StringImpl.h:
471 * wtf/text/WTFString.cpp:
472 (WTF::String::format):
473 * wtf/text/WTFString.h:
475 2013-09-30 Sam Weinig <sam@webkit.org>
477 Remove support for DOMFileSystem
478 https://bugs.webkit.org/show_bug.cgi?id=122137
480 Reviewed by Anders Carlsson.
482 * wtf/FeatureDefines.h:
484 2013-09-30 Benjamin Poulain <benjamin@webkit.org>
486 Remove the code guarded by STYLE_SCOPED
487 https://bugs.webkit.org/show_bug.cgi?id=122123
489 Reviewed by Anders Carlsson.
491 * wtf/FeatureDefines.h:
493 2013-09-28 Mark Rowe <mrowe@apple.com>
495 Take Xcode's advice and enable some extra warnings.
497 Reviewed by Sam Weinig.
499 * Configurations/Base.xcconfig:
500 * WTF.xcodeproj/project.pbxproj:
502 2013-09-28 Mark Rowe <mrowe@apple.com>
504 <rdar://problem/15079224> WTF fails to build with newer versions of clang.
506 Reviewed by Sam Weinig.
508 * wtf/DateMath.cpp: Remove some unused constants.
509 * wtf/FastMalloc.cpp: #if some constants and functions that are unused in some configurations.
510 Remove a function that's unused on all platforms.
511 * wtf/TCSystemAlloc.cpp: Remove some unused constants.
512 (TCMalloc_SystemRelease): Remove an if whose body is never executed.
513 * wtf/dtoa.cpp: #if things such that storeInc is only defined when USE_LONG_LONG is undefined.
514 Remove an unused constant.
516 2013-09-27 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
518 [Nix] Updating Nix trunk files
519 https://bugs.webkit.org/show_bug.cgi?id=121752
521 Reviewed by Benjamin Poulain.
523 * wtf/nix/FeatureDefinesNix.h:
525 2013-09-06 Jer Noble <jer.noble@apple.com>
527 [Mac] Implement the media controls in JavaScript.
528 https://bugs.webkit.org/show_bug.cgi?id=120895
530 Reviewed by Dean Jackson.
532 Define and turn on ENABLE_MEDIA_CONTROLS_SCRIPT.
534 * wtf/FeatureDefines.h:
536 2013-09-27 Gustavo Noronha Silva <gns@gnome.org>
538 [GCC] Fix build with gcc < 4.8.1, which does not have is_trivially_destructible
539 https://bugs.webkit.org/show_bug.cgi?id=121999
541 Reviewed by Benjamin Poulain.
543 * wtf/StdLibExtras.h:
545 2013-09-26 Anders Carlsson <andersca@apple.com>
549 We can't use std::move. Explicitly destroy the old value and then construct the new in place.
553 2013-09-26 Anders Carlsson <andersca@apple.com>
555 Use the move assignment operator when reinserting values in the hash map
556 https://bugs.webkit.org/show_bug.cgi?id=122003
558 Reviewed by Alexey Proskuryakov.
560 Using the move assignment operator ensures that the existing values will be destroyed correctly.
564 2013-09-26 Brent Fulgham <bfulgham@apple.com>
566 [Windows] Work around missing C++11 features of MSVC by providing an implementation for
567 std::is_trivially_destructible based on the existing std::has_trivial_destructor.
569 Rubber-stamped by Anders Carlsson.
571 * wtf/StdLibExtras.h: Add implementation for is_trivially_destructable for MSVC 2010 and prior.
573 2013-09-26 Anders Carlsson <andersca@apple.com>
575 Remove needsDestruction from vector and hash traits
576 https://bugs.webkit.org/show_bug.cgi?id=121983
578 Reviewed by Sam Weinig.
580 For Vector, use std::is_trivially_destructible to determine whether to call the destructor.
581 For HashTable, always call the destructor; if it is trivial then no code will be generated for it and the loops will be folded away.
583 Removing this does break the ability to store objects with non-trivial destructors in vectors and hash maps
584 and have their destructors not be called when removed, but we've never used this feature in WebKit so the extra
585 code complexity is not worth it.
588 (WTF::::deallocateTable):
591 (WTF::VectorTypeOperations::destruct):
592 * wtf/VectorTraits.h:
594 2013-09-26 Anders Carlsson <andersca@apple.com>
600 * wtf/StdLibExtras.h:
603 2013-09-26 Anders Carlsson <andersca@apple.com>
605 Remove the hash table mover
606 https://bugs.webkit.org/show_bug.cgi?id=121980
608 Reviewed by Andreas Kling.
610 Use std::move instead.
614 2013-09-26 Anders Carlsson <andersca@apple.com>
616 Change a couple of HashMap value types from OwnPtr to std::unique_ptr
617 https://bugs.webkit.org/show_bug.cgi?id=121973
619 Reviewed by Andreas Kling.
621 * wtf/RefPtrHashMap.h:
622 Add a missing std::forward.
624 * wtf/StdLibExtras.h:
628 2013-09-26 Julien Brianceau <jbriance@cisco.com>
630 [Qt] Remove PassTraits.h from WTF.pro.
631 https://bugs.webkit.org/show_bug.cgi?id=121946
633 Reviewed by Andreas Kling.
635 * WTF.pro: Remove PassTraits.h as this file disappeared in r156298.
637 2013-09-25 Patrick Gansterer <paroga@webkit.org>
639 Fix compilation with new MSVC compiler for Windows CE
640 https://bugs.webkit.org/show_bug.cgi?id=121914
642 Reviewed by Darin Adler.
644 Remove code to support older Windows CE versions, since those old
645 versions do not support C+11, which is required in the meantime.
650 2013-09-25 Anders Carlsson <andersca@apple.com>
652 Move KeyValuePairTraits inside HashMap
653 https://bugs.webkit.org/show_bug.cgi?id=121931
655 Reviewed by Sam Weinig.
657 Also rename the ValueType typedef to KeyValuePairType since it's always a key value pair.
660 (WTF::HashMap::KeyValuePairTraits::isEmptyValue):
661 (WTF::HashMap::find):
662 (WTF::HashMap::contains):
664 2013-09-25 Anders Carlsson <andersca@apple.com>
668 Rubber-stamped by Andreas Kling.
672 2013-09-25 Anders Carlsson <andersca@apple.com>
674 Un-indent HashTraits.h.
676 Rubber-stamped by Andreas Kling.
680 2013-09-25 Patrick Gansterer <paroga@webkit.org>
682 Fix template deduction for CollatorDefault
684 * wtf/unicode/CollatorDefault.cpp:
685 (WTF::Collator::userDefault): Use nullptr instead of 0.
687 2013-09-24 Anders Carlsson <andersca@apple.com>
689 Remove encoder create functions
690 https://bugs.webkit.org/show_bug.cgi?id=121853
692 Reviewed by Sam Weinig.
694 Add a variadic version of createOwned.
699 2013-09-24 Mark Rowe <mrowe@apple.com>
701 <rdar://problem/14971518> WebKit should build against the Xcode default toolchain when targeting OS X 10.8
703 Reviewed by Dan Bernstein.
705 * Configurations/Base.xcconfig:
707 2013-09-23 Anders Carlsson <andersca@apple.com>
709 Remove WTF_USE_SCROLLBAR_PAINTER #define
710 https://bugs.webkit.org/show_bug.cgi?id=121819
712 Reviewed by Sam Weinig.
714 All our supported systems use the scrollbar painter now, so get rid of the #ifdef.
718 2013-09-23 Commit Queue <commit-queue@webkit.org>
720 Unreviewed, rolling out r156307.
721 http://trac.webkit.org/changeset/156307
722 https://bugs.webkit.org/show_bug.cgi?id=121817
724 Broke the build, and crashes the compiler (Requested by ap on
729 (WTF::sortedListDump):
731 2013-09-23 Anders Carlsson <andersca@apple.com>
733 Test the waters and begin using lambdas
734 https://bugs.webkit.org/show_bug.cgi?id=121809
736 Reviewed by Andreas Kling.
739 (WTF::sortedListDump):
740 Use std::less instead of a custom lessThan function.
742 2013-09-23 Anders Carlsson <andersca@apple.com>
744 ListHashSet::removeLast should only remove one element.
747 (WTF::ListHashSet::removeLast):
749 2013-09-23 Anders Carlsson <andersca@apple.com>
751 Add hash traits for std::unique_ptr
752 https://bugs.webkit.org/show_bug.cgi?id=121807
754 Reviewed by Antti Koivisto.
756 Also, convert the thread map over to using std::unique_ptr instead of OwnPtr.
759 Remove unnecessary typedefs and add missing calls to std::forward.
762 Add hash trait for std::unique_ptr.
764 * wtf/RefPtrHashMap.h:
765 Use std::add_lvalue_reference.
767 * wtf/ThreadingPthreads.cpp:
768 (WTF::establishIdentifierForPthreadHandle):
769 Change ThreadMap to be a hash map from ThreadIdentifier to std::unique_ptr<PthreadState>.
771 2013-09-23 Patrick Gansterer <paroga@webkit.org>
773 use NOMINMAX instead of #define min min
774 https://bugs.webkit.org/show_bug.cgi?id=73563
776 Reviewed by Brent Fulgham.
778 Use NOMINMAX instead of #define min/max as a cleaner
779 way of ensuring that Windows system header files don't
780 define min/max as macro in the first place.
784 2013-09-23 Anders Carlsson <andersca@apple.com>
787 https://bugs.webkit.org/show_bug.cgi?id=121805
789 Reviewed by Andreas Kling.
791 We no longer need PassTraits.h, get rid of it.
793 * GNUmakefile.list.am:
794 * WTF.vcxproj/WTF.vcxproj:
795 * WTF.vcxproj/WTF.vcxproj.filters:
796 * WTF.xcodeproj/project.pbxproj:
797 * wtf/CMakeLists.txt:
798 * wtf/PassTraits.h: Removed.
800 2013-09-23 Anders Carlsson <andersca@apple.com>
802 ListHashSet should work with move-only types
803 https://bugs.webkit.org/show_bug.cgi?id=121802
805 Reviewed by Andreas Kling.
807 Add rvalue reference overloads and calls to std::forward and std::move where appropriate.
810 (WTF::::removeFirst):
811 Implement this in terms of takeFirst.
814 Look up the iterator before we move out the value so we won't break the hash invariant.
817 Implement this in terms of takeLast.
820 Look up the iterator before we move out the value so we won't break the hash invariant.
822 2013-09-23 Anders Carlsson <andersca@apple.com>
825 https://bugs.webkit.org/show_bug.cgi?id=121797
827 Reviewed by Antti Koivisto.
831 2013-09-23 Anders Carlsson <andersca@apple.com>
833 ListHashSet should use std::reverse_iterator for reverse iterators
834 https://bugs.webkit.org/show_bug.cgi?id=121795
836 Reviewed by Antti Koivisto.
838 Get rid of the custom reverse iterators and just use std::reverse_iterator instead.
842 2013-09-23 Anders Carlsson <andersca@apple.com>
844 De-indent ListHashSet in preparation of more changes.
846 Rubber-stamped by Sam Weinig.
850 2013-09-23 Patrick Gansterer <paroga@webkit.org>
852 Cleanup CMake files in WTF
853 https://bugs.webkit.org/show_bug.cgi?id=121761
855 Reviewed by Gyuyoung Kim.
857 Sort files and unify the style.
859 * wtf/CMakeLists.txt:
860 * wtf/PlatformEfl.cmake:
861 * wtf/PlatformGTK.cmake:
863 2013-09-22 Andreas Kling <akling@apple.com>
865 Give purity hints to compiler to avoid penalizing repeated calls to some functions.
866 <https://webkit.org/b/121744>
868 Reviewed by Darin Adler.
870 Added a PURE_FUNCTION macro. This is supported on GCC and Clang for now.
871 Marking a function pure means that the compiler's CSE pass is free to coalesce
872 multiple calls to this function because it has no globally observable side
873 effects beyond the first call.
875 2013-09-20 Anders Carlsson <andersca@apple.com>
877 Add an implementation of std::index_sequence from C++14
878 https://bugs.webkit.org/show_bug.cgi?id=121718
880 Reviewed by Ryosuke Niwa.
882 This will make it easier to do things like pack expansion of tuple elements.
884 * wtf/StdLibExtras.h:
886 2013-09-20 Allan Sandfeld Jensen <allan.jensen@digia.com>
888 Atomics.h does not build on MinGW
889 https://bugs.webkit.org/show_bug.cgi?id=121663
891 Reviewed by Darin Adler.
893 MinGW does not have _ReadWriteBarrier() intrinsic, but does have GCC
894 inline assembler, so use the GCC definitions instead of MSVC ones.
897 (WTF::compilerFence):
899 2013-09-20 Patrick Gansterer <paroga@webkit.org>
901 [CMake] Use COMPILE_DEFINITIONS target property for setting BUILDING_* defines
902 https://bugs.webkit.org/show_bug.cgi?id=121672
904 Reviewed by Gyuyoung Kim.
906 Since the scope of add_definitions() is always a whole file, we need to use
907 target properties instead to set definitions only for specific targets.
909 * wtf/CMakeLists.txt:
911 2013-09-20 Patrick Gansterer <paroga@webkit.org>
913 Remove duplicated secondsPerDay variables
914 https://bugs.webkit.org/show_bug.cgi?id=121601
916 Reviewed by Andreas Kling.
918 Move secondsPerDay from the source into the header file
919 to make it accessible by other code too.
924 2013-09-19 Joseph Pecoraro <pecoraro@apple.com>
926 ASSERTs in isMainThread after USE(WEB_THREAD) MainThread changes
927 https://bugs.webkit.org/show_bug.cgi?id=121650
929 Reviewed by Benjamin Poulain.
931 * wtf/mac/MainThreadMac.mm:
932 (WTF::initializeMainThreadPlatform):
934 2013-09-19 Daniel Bates <dabates@apple.com>
936 [iOS] Define mainThreadEstablishedAsPthreadMain to be true in WTF::initializeMainThreadPlatform()
938 Reviewed by Joseph Pecoraro.
940 This change was inadvertently left out of <http://trac.webkit.org/changeset/155926>.
942 * wtf/mac/MainThreadMac.mm:
943 (WTF::initializeMainThreadPlatform):
945 2013-09-19 Sam Weinig <sam@webkit.org>
948 https://bugs.webkit.org/show_bug.cgi?id=121612
950 Reviewed by Anders Carlsson.
952 * GNUmakefile.list.am:
954 * WTF.vcxproj/WTF.vcxproj:
955 * WTF.vcxproj/WTF.vcxproj.filters:
956 * WTF.xcodeproj/project.pbxproj:
957 * wtf/Assertions.cpp:
958 * wtf/CMakeLists.txt:
960 * wtf/FastBitVector.h:
962 * wtf/OwnArrayPtr.h: Removed.
963 * wtf/VectorTraits.h:
965 2013-09-19 Daniel Bates <dabates@apple.com>
967 Substitute return type void for bool in function declaration for WTF::initializeWebThread()
969 Reviewed by Joseph Pecoraro.
971 Make the declaration of WTF::initializeWebThread() match the function prototype
976 2013-09-19 Andreas Kling <akling@apple.com>
978 Assume allocator success in Vector unless using try* functions.
979 <https://webkit.org/b/121629>
981 Reviewed by Anders Carlsson.
983 Turn some Vector::begin() null checking into assertions instead.
985 We have try* style functions for when an allocation request is so
986 large that it might actually fail. fastMalloc() will never return
987 null (it will just CRASH() instead.)
989 2013-09-18 Brent Fulgham <bfulgham@apple.com>
991 [Windows] Unreviewed build correction.
993 * WTF.vcxproj/WTFGeneratedCommon.props: Export PLATFORMARCHITECTURE macro for use in
994 Makefiles and shell scripts.
995 * WTF.vcxproj/build-generated-files.sh: Output header search path to identify when the build
996 is confused about build architecture.
998 2013-09-18 Anders Carlsson <andersca@apple.com>
1000 RefPtrHashMap should work with move only types
1001 https://bugs.webkit.org/show_bug.cgi?id=121564
1003 Reviewed by Andreas Kling.
1005 Add the same rvalue references and std::forward calls that already exist in HashMap.
1007 * wtf/RefPtrHashMap.h:
1009 2013-09-18 Filip Pizlo <fpizlo@apple.com>
1011 DFG should support Int52 for local variables
1012 https://bugs.webkit.org/show_bug.cgi?id=121064
1014 Reviewed by Oliver Hunt.
1016 * wtf/PrintStream.h:
1017 (WTF::ValueIgnoringContext::ValueIgnoringContext):
1018 (WTF::ValueIgnoringContext::dump):
1019 (WTF::ignoringContext):
1021 2013-09-18 Andreas Kling <akling@apple.com>
1023 Put constant CachedPower table in read-only memory.
1024 <https://webkit.org/b/121546>
1026 Reviewed by Anders Carlsson.
1028 * wtf/dtoa/cached-powers.cc:
1030 2013-09-18 Commit Queue <commit-queue@webkit.org>
1032 Unreviewed, rolling out r156019 and r156020.
1033 http://trac.webkit.org/changeset/156019
1034 http://trac.webkit.org/changeset/156020
1035 https://bugs.webkit.org/show_bug.cgi?id=121540
1037 Broke tests (Requested by ap on #webkit).
1039 * wtf/PrintStream.h:
1041 2013-09-16 Filip Pizlo <fpizlo@apple.com>
1043 DFG should support Int52 for local variables
1044 https://bugs.webkit.org/show_bug.cgi?id=121064
1046 Reviewed by Oliver Hunt.
1048 * wtf/PrintStream.h:
1049 (WTF::ValueIgnoringContext::ValueIgnoringContext):
1050 (WTF::ValueIgnoringContext::dump):
1051 (WTF::ignoringContext):
1053 2013-09-17 Anders Carlsson <andersca@apple.com>
1055 Stop explicitly using PassOwnPtr in WebCore/html
1056 https://bugs.webkit.org/show_bug.cgi?id=121511
1058 Reviewed by Andreas Kling.
1060 Make operator= work work for different types of OwnPtrs.
1064 2013-09-17 Sam Weinig <sam@webkit.org>
1066 Add make_unique and start using it
1067 https://bugs.webkit.org/show_bug.cgi?id=121523
1069 Reviewed by Anders Carlsson.
1071 * wtf/StdLibExtras.h:
1073 Add temporary implementation of std::make_unique that we can use until our standard
1074 libraries have support for it.
1076 2013-09-17 Darin Adler <darin@apple.com>
1078 Make SVGTransform::valueAsString use StringBuilder
1079 https://bugs.webkit.org/show_bug.cgi?id=121498
1081 Reviewed by Andreas Kling.
1083 * wtf/text/StringBuilder.cpp: Added appendNumber functions corresponding to all remaining
1084 String::number functions. If we find we don't need all of these we can delete them later,
1085 but I don't want to give clients a reason to prefer less-efficient API to StringBuilder.
1086 * wtf/text/StringBuilder.h: Ditto.
1088 2013-09-16 Anders Carlsson <andersca@apple.com>
1090 HashMap should work with move-only keys
1091 https://bugs.webkit.org/show_bug.cgi?id=121310
1093 Reviewed by Darin Adler.
1095 Add extra overloads for add and set where the key is an rvalue reference, but not a
1096 template parameter rvalue reference. This way we'll coerce the key parameter to have the expected
1097 type instead of the passed in type, causing map.add(StringImpl::create("Hello"), 123) work when the
1098 type of map is HashMap<String, unsigned>.
1100 Also, sprinkle && and std::forward where appropriate.
1105 2013-09-17 Sergio Martins <sergio.martins@kdab.com>
1107 Fix Windows CE build on ARM.
1108 https://bugs.webkit.org/show_bug.cgi?id=121490
1110 Reviewed by Darin Adler.
1114 2013-09-17 Mihnea Ovidenie <mihnea@adobe.com>
1116 REGRESSION(r155910): WebKit nightly builds don't load any page
1117 https://bugs.webkit.org/show_bug.cgi?id=121482
1119 Reviewed by Andreas Kling.
1121 Replaced C++ style comments with C style comments.
1125 2013-09-16 Joseph Pecoraro <pecoraro@apple.com>
1127 USE(WEB_THREAD): More explicit WebThread initialization
1128 https://bugs.webkit.org/show_bug.cgi?id=121454
1130 Reviewed by Benjamin Poulain.
1132 Be more explicit when initializing WebThread only data.
1135 * wtf/MainThread.cpp:
1136 (WTF::initializeWebThreadOnce):
1137 (WTF::initializeWebThread):
1138 Ensure one time initialization.
1140 * wtf/mac/MainThreadMac.mm:
1141 (WTF::initializeMainThreadPlatform):
1142 (WTF::initializeWebThreadPlatform):
1143 Move WebThread value initialization to its own function.
1145 (WTF::isMainThread):
1146 Remove no longer invalid assert if WebThread was not initialized.
1148 2013-09-16 Benjamin Poulain <benjamin@webkit.org>
1150 Fix WebKit1 build after r155910
1152 Reviewed by Anders Carlsson.
1154 * wtf/Platform.h: Some files in WebKit include system headers before
1155 WTF headers, causing the macro to be defined twice. #undef the macro
1156 to support that case.
1158 2013-09-16 Benjamin Poulain <benjamin@webkit.org>
1160 Disable OS X's unprefixed debug macro
1161 https://bugs.webkit.org/show_bug.cgi?id=121460
1163 Reviewed by Anders Carlsson.
1165 * wtf/Platform.h: OS X defines a series of platform macros for debugging.
1166 Some of them are really annoying because they use common names (e.g. check()).
1168 Disable those macros so that we are not limited in how we name methods and functions.
1170 2013-09-16 Anders Carlsson <andersca@apple.com>
1172 MessageQueue should use a Deque of OwnPtrs
1173 https://bugs.webkit.org/show_bug.cgi?id=121450
1175 Reviewed by Andreas Kling.
1177 * wtf/MessageQueue.h:
1179 2013-09-16 Anders Carlsson <andersca@apple.com>
1181 WTF::Deque should work with move only types
1182 https://bugs.webkit.org/show_bug.cgi?id=121446
1184 Reviewed by Andreas Kling.
1187 Use std::move and std::forward where appropriate and get rid of the PassTraits include.
1189 2013-09-16 Anders Carlsson <andersca@apple.com>
1191 Change a couple of COMPILE_ASSERTs to static_assert
1192 https://bugs.webkit.org/show_bug.cgi?id=121441
1194 Reviewed by Andreas Kling.
1196 * wtf/BloomFilter.h:
1197 * wtf/PackedIntVector.h:
1198 (WTF::PackedIntVector::PackedIntVector):
1199 * wtf/StdLibExtras.h:
1200 (WTF::bitwise_cast):
1202 (WTF::roundUpToMultipleOf):
1203 * wtf/StringHasher.h:
1204 (WTF::StringHasher::hashMemory):
1206 * wtf/text/AtomicString.cpp:
1207 * wtf/unicode/Unicode.h:
1209 2013-09-15 Gustavo Noronha Silva <gns@gnome.org>
1211 Unreviewed make distcheck fix.
1213 * GNUmakefile.list.am:
1215 2013-09-15 Patrick Gansterer <paroga@webkit.org>
1217 Fix build with Visual Studio 2012 after r153764.
1218 https://bugs.webkit.org/show_bug.cgi?id=121406
1220 Reviewed by Brent Fulgham.
1224 2013-09-15 Alberto Garcia <berto@igalia.com>
1226 Unreviewed GTK gardening.
1228 * GNUmakefile.list.am: remove FastAllocBase.h, this file disappeared
1231 2013-09-15 Patrick Gansterer <paroga@webkit.org>
1233 [WIN] Fix build without precompiled header after r155454.
1235 * wtf/win/GDIObject.h: Added missing windows.h include.
1237 2013-09-15 Andreas Kling <akling@apple.com>
1239 Remove Ref(const T&) constructor.
1240 <https://webkit.org/b/121384>
1242 Reviewed by Anders Carlsson.
1244 This constructor was added as a stopgap measure until we got better support
1245 for move semantics in Vector.
1249 2013-09-15 Andreas Kling <akling@apple.com>
1251 Unreviewed, fix ridiculous bug in WeakPtr.
1253 I made operator!() null check the pointer to the WeakReference. :|
1255 Caught by plugins/destroy-on-setwindow.html on bots.
1258 (WTF::WeakPtr::operator!):
1260 2013-09-14 Andreas Kling <akling@apple.com>
1262 Get rid of ref-counting on RenderWidget.
1263 <https://webkit.org/b/121357>
1265 Reviewed by Darin Adler.
1268 (WTF::WeakPtr::operator!):
1270 Add operator! to WeakPtr.
1272 2013-09-14 Darin Adler <darin@apple.com>
1274 Add NeverDestroyed::get
1275 https://bugs.webkit.org/show_bug.cgi?id=121358
1277 Reviewed by Anders Carlsson.
1279 * wtf/NeverDestroyed.h: Removed code to make this non-copyable, since we also
1280 use a macro to accomplish that.
1281 (WTF::NeverDestroyed::get): Added. Useful in conjuction with auto to avoid
1282 having to repeat the type when we want to put one of these into a reference.
1284 2013-09-13 Anders Carlsson <andersca@apple.com>
1286 Pick the correct overload when a const reference is passed to appendSlowCase.
1287 https://bugs.webkit.org/show_bug.cgi?id=121326
1289 Reviewed by Darin Adler.
1292 (WTF::Vector::appendSlowCase):
1293 Make sure that the pointer to the element isn't const so we'll pick the right expandCapacity overload.
1295 2013-09-13 Anders Carlsson <andersca@apple.com>
1297 Avoid a couple of zero-sized fastMalloc calls
1298 https://bugs.webkit.org/show_bug.cgi?id=121333
1300 Reviewed by Geoffrey Garen.
1302 * wtf/text/StringBuffer.h:
1303 (WTF::StringBuffer::StringBuffer):
1304 Initialize m_data to null if m_length is null, and use Checked<size_t> to check for
1305 overflow when multiplying m_length with the character size.
1307 2013-09-13 Brent Fulgham <bfulgham@apple.com>
1309 [Windows] Activate FastMalloc hardening
1310 https://bugs.webkit.org/show_bug.cgi?id=121307
1312 Reviewed by Oliver Hunt.
1314 * wtf/FastMalloc.cpp:
1315 (WTF::SLL_Next): Add workaround for MSVC compiler bug.
1317 2013-09-13 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
1319 OwnArrayPtr: Never allow implicit pointer conversion
1320 https://bugs.webkit.org/show_bug.cgi?id=121291
1322 Reviewed by Anders Carlsson.
1324 We should never allow implicit pointer conversion in OwnArrayPtr
1325 and remove its template copy constructor & template assignment operator, as:
1326 - these methods are never used
1327 - these methods are inappropriate to have in OwnArrayPtr as arrays do not
1328 interact well with polymorphism.
1330 * wtf/OwnArrayPtr.h:
1332 2013-09-13 Allan Sandfeld Jensen <allan.jensen@digia.com>
1334 Remove support for QXmlStream as the XML parser.
1335 https://bugs.webkit.org/show_bug.cgi?id=121229
1337 Reviewed by Andreas Kling.
1343 2013-09-12 Mark Hahnenberg <mhahnenberg@apple.com>
1345 Bitmap's WordType should be a template parameter
1346 https://bugs.webkit.org/show_bug.cgi?id=121238
1348 Reviewed by Darin Adler.
1350 The code is written as if it already is. We just need to lift it out of the class.
1351 This simplifies code that wants to load, for example, a single byte rather than an
1355 (WTF::Bitmap::Bitmap):
1358 (WTF::Bitmap::testAndSet):
1359 (WTF::Bitmap::testAndClear):
1360 (WTF::Bitmap::concurrentTestAndSet):
1361 (WTF::Bitmap::concurrentTestAndClear):
1362 (WTF::Bitmap::clear):
1363 (WTF::Bitmap::clearAll):
1364 (WTF::Bitmap::nextPossiblyUnset):
1365 (WTF::Bitmap::findRunOfZeros):
1366 (WTF::Bitmap::count):
1367 (WTF::Bitmap::isEmpty):
1368 (WTF::Bitmap::isFull):
1370 2013-09-12 Anders Carlsson <andersca@apple.com>
1372 Add rudimentary support for move-only types as values in HashMap
1373 https://bugs.webkit.org/show_bug.cgi?id=121226
1375 Reviewed by Andreas Kling.
1378 Change a bunch of functions to so they can take both rvalue and lvalue references and use std::forward.
1381 (WTF::KeyValuePair::KeyValuePair):
1382 Change constructors to accept both lvalues and rvalues.
1384 2013-09-12 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
1386 Remove home-brewed nullptr
1387 https://bugs.webkit.org/show_bug.cgi?id=119624
1389 Reviewed by Anders Carlsson.
1391 The standard C++11 nullptr and std::nullptr_t type should be used now.
1393 * GNUmakefile.list.am:
1395 * WTF.vcxproj/WTF.vcxproj:
1396 * WTF.vcxproj/WTF.vcxproj.filters:
1397 * WTF.xcodeproj/project.pbxproj:
1398 * wtf/CMakeLists.txt:
1399 * wtf/NullPtr.cpp: Removed.
1400 * wtf/NullPtr.h: Removed.
1401 * wtf/OwnArrayPtr.h:
1406 * wtf/win/GDIObject.h:
1408 2013-09-11 Anders Carlsson <andersca@apple.com>
1410 Use the new C++11 function declaration syntax throughout our hash collection classes
1411 https://bugs.webkit.org/show_bug.cgi?id=121195
1413 Reviewed by Andreas Kling.
1419 2013-09-11 Anders Carlsson <andersca@apple.com>
1422 https://bugs.webkit.org/show_bug.cgi?id=121192
1424 Reviewed by Darin Adler.
1426 This is mostly done to see if we can use the new C++11 function declaration syntax,
1427 and for parity with HashMap::take.
1432 2013-09-11 Anders Carlsson <andersca@apple.com>
1434 HashSet should work with move only types
1435 https://bugs.webkit.org/show_bug.cgi?id=121188
1437 Reviewed by Geoffrey Garen.
1440 (WTF::HashSet::add):
1441 Add a new rvalue reference overload and use std::move when calling HashTable::add.
1444 (WTF::IdentityHashTranslator::translate):
1445 Change this to take an rvalue reference for the value so we can invoke the move assignment operator.
1447 (WTF::HashTable::add):
1448 Call the add member function template, using std::move to move the value.
1450 (WTF::HashTable::add):
1451 Add std::forward so we'll potentially move extra.
1453 2013-09-11 Anders Carlsson <andersca@apple.com>
1455 Avoid copying a hash table bucket when inserting causes a rehash
1456 https://bugs.webkit.org/show_bug.cgi?id=121185
1458 Reviewed by Darin Adler.
1460 Allow rehashing to track a hash bucket and return the new pointer to it, thus avoiding
1461 having to do a copy of a hash table bucket as well as an extra hash lookup.
1465 2013-09-11 Brent Fulgham <bfulgham@apple.com>
1467 [Windows] Unreviewed build fix.
1469 * wtf/win/GDIObject.h:
1470 (WTF::GDIObject::GDIObject): I forgot to check in as part of
1471 r155557 by using webkit-patch land in a sub-directory!
1473 2013-09-11 Oliver Hunt <oliver@apple.com>
1475 Partial Information Leakage in Hash Table implementations (PrivateName)
1476 https://bugs.webkit.org/show_bug.cgi?id=120663
1478 Reviewed by Michael Saboff.
1480 Unique strings now just generate a completely random value as their
1481 hash, rather than using their this pointer.
1483 * wtf/text/StringImpl.h:
1484 (WTF::StringImpl::StringImpl):
1486 2013-09-11 Brent Fulgham <bfulgham@apple.com>
1488 Unreviewed build correction.
1490 * WTF.vcxproj/copy-files.cmd: Touch file to force WTFGenerated
1491 build to copy updated GDIObject.h header file on build machines.
1493 2013-09-11 Anders Carlsson <andersca@apple.com>
1495 Vector::append doesn't work if element type has overloaded operator&
1496 https://bugs.webkit.org/show_bug.cgi?id=121175
1498 Reviewed by Brent Fulgham.
1500 Use std::addressof to get the address of the given object.
1503 (WTF::::appendSlowCase):
1504 (WTF::::uncheckedAppend):
1506 2013-09-11 Anders Carlsson <andersca@apple.com>
1508 Vector::append doesn't work if element type has overloaded operator&
1509 https://bugs.webkit.org/show_bug.cgi?id=121175
1511 Reviewed by Brent Fulgham.
1513 Use std::addressof to get the address of the given object.
1516 (WTF::::appendSlowCase):
1517 (WTF::::uncheckedAppend):
1519 2013-09-11 Anders Carlsson <andersca@apple.com>
1521 VectorBuffer::swap doesn't need to use std::swap_ranges
1522 https://bugs.webkit.org/show_bug.cgi?id=121164
1524 Reviewed by Darin Adler.
1526 There's a std::swap overload for swapping arrays, just use it instead.
1529 (WTF::VectorBuffer::swap):
1531 2013-09-11 Anders Carlsson <andersca@apple.com>
1533 Implement Vector::append for move-only types
1534 https://bugs.webkit.org/show_bug.cgi?id=120805
1536 Reviewed by Andreas Kling.
1539 (WTF::::expandCapacity):
1540 Remove const from the pointer passed to expandCapacity, it can be non-const if we're moving.
1543 Change append to take U&& and use std::forward when constructing the element and when passing
1544 the element along to appendSlowCase if that's necessary.
1546 (WTF::::appendSlowCase):
1549 (WTF::::uncheckedAppend):
1550 Rename val to value.
1552 2013-09-11 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
1554 WTF::OwnPtr should behave similarly with the rest of WTF smart pointers
1555 https://bugs.webkit.org/show_bug.cgi?id=120773
1557 Reviewed by Anders Carlsson.
1559 Before the change OwnPtr could take either the pointer type or the pointed-to type, which was bad
1560 for the following reasons:
1561 - It distinguished OwnPtr behaviour from other WTF smart pointer classes behaviour (so it was confusing for the Client).
1562 - It was potential error-prone as it actually modified the type given by the Client in opaque way.
1567 2013-09-11 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
1569 OwnPtr: Use copy/move-and-swap for assignment operators
1570 https://bugs.webkit.org/show_bug.cgi?id=121154
1572 Reviewed by Anders Carlsson.
1575 - decrease of repeated code
1576 - consistency with RefPtr
1581 2013-09-11 Patrick Gansterer <paroga@webkit.org>
1583 [CMake] Split out generic Windows files into its own file
1584 https://bugs.webkit.org/show_bug.cgi?id=119514
1586 Reviewed by Gyuyoung Kim.
1588 This allows us to add smaller CMakeLists.txt files when
1589 adding additional Windows ports.
1591 * wtf/PlatformWin.cmake: Renamed from Source/WTF/wtf/PlatformWinCE.cmake.
1593 2013-09-10 Daniel Bates <dabates@apple.com>
1595 [iOS] Upstream text autosizing
1596 https://bugs.webkit.org/show_bug.cgi?id=121111
1598 Reviewed by Andy Estes and Sam Weinig.
1600 Define iOS text autosizing to be enabled on iOS unless otherwise defined.
1602 * wtf/FeatureDefines.h:
1604 2013-09-10 Anders Carlsson <andersca@apple.com>
1606 Remove wtf/Alignment.h
1607 https://bugs.webkit.org/show_bug.cgi?id=121077
1609 Reviewed by Andreas Kling.
1611 * GNUmakefile.list.am:
1613 * WTF.vcxproj/WTF.vcxproj:
1614 * WTF.vcxproj/WTF.vcxproj.filters:
1615 * WTF.xcodeproj/project.pbxproj:
1616 * wtf/Alignment.h: Removed.
1617 * wtf/CMakeLists.txt:
1618 * wtf/text/ASCIIFastPath.h:
1620 2013-09-10 Anders Carlsson <andersca@apple.com>
1622 More WTF/Alignment.h removal
1623 https://bugs.webkit.org/show_bug.cgi?id=121125
1625 Reviewed by Andreas Kling.
1629 (WTF::VectorBuffer::swap):
1630 (WTF::VectorBuffer::inlineBuffer):
1631 * wtf/text/ASCIIFastPath.h:
1633 (WTF::isAlignedToMachineWord):
1635 2013-09-10 Brent Fulgham <bfulgham@apple.com>
1637 Unreviewed build fix after r155476.
1639 * GNUmakefile.list.am: Remove reference to deleted OwnPtrWin.cpp file.
1641 * wtf/CMakeLists.txt: Ditto.
1643 2013-09-10 Brent Fulgham <bfulgham@apple.com>
1645 [Windows] Create SharedGDIObject Class Template
1646 https://bugs.webkit.org/show_bug.cgi?id=121037
1648 Reviewed by Anders Carlsson.
1650 Now that the SharedGDIObject class exists we can get rid of
1651 the Windows-specific code in OwnPtr.
1653 * WTF.vcxproj/WTF.vcxproj: Remove OwnPtrWin.cpp.
1654 * WTF.vcxproj/WTF.vcxproj.filters: Ditto.
1655 * wtf/OwnPtrCommon.h:
1656 (WTF::deleteOwnedPtr): Remove Windows declarations that
1657 are no longer needed.
1658 * wtf/win/GDIObject.h:
1659 (WTF::GDIObject::get): Change to 'const' to match
1660 signature (and use cases) elsewhere in the code base for
1661 our smart pointer classes.
1662 * wtf/win/OwnPtrWin.cpp: Removed.
1664 2013-09-10 Anders Carlsson <andersca@apple.com>
1666 Remove more uses of WTF::AlignedBuffer
1667 https://bugs.webkit.org/show_bug.cgi?id=121119
1669 Reviewed by Andreas Kling.
1672 * wtf/SizeLimits.cpp:
1674 2013-09-10 Anders Carlsson <andersca@apple.com>
1676 Clean up wtf/Noncopyable.h
1677 https://bugs.webkit.org/show_bug.cgi?id=121115
1679 Reviewed by Darin Adler.
1681 Use std::aligned_storage instead of WTF::AlignedBuffer.
1683 * wtf/NeverDestroyed.h:
1684 (WTF::NeverDestroyed::NeverDestroyed):
1686 2013-09-09 Brent Fulgham <bfulgham@apple.com>
1688 [Windows] Change from using OwnPtr<GDI Stuff> to new GDIObject template.
1689 https://bugs.webkit.org/show_bug.cgi?id=120778
1691 Reviewed by Anders Carlsson.
1693 * WTF.vcxproj/WTF.vcxproj: Add new GDIObject header file.
1694 * WTF.vcxproj/WTF.vcxproj.filters: Ditto.
1695 * WTF.vcxproj/copy-files.cmd: Copy new header file.
1696 * wtf/OwnPtrCommon.h: Remove some GDI specializations.
1697 * wtf/win/GDIObject.h: Added.
1698 (WTF::GDIObject::GDIObject):
1699 (WTF::GDIObject::~GDIObject):
1700 (WTF::GDIObject::get):
1701 (WTF::GDIObject::operator!):
1702 (WTF::GDIObject::operator UnspecifiedBoolType):
1703 (WTF::GDIObject::operator=):
1704 (WTF::GDIObject::swap):
1709 (WTF::adoptGDIObject):
1713 * wtf/win/OwnPtrWin.cpp:
1714 (WTF::deleteOwnedPtr): Remove some GDI specializations.
1716 2013-09-09 Anders Carlsson <andersca@apple.com>
1718 Introduce WTF::createOwned
1719 https://bugs.webkit.org/show_bug.cgi?id=121059
1721 Reviewed by Andreas Kling.
1723 WTF::createOwned is a function template that does adoptPtr + new in a single function call,
1724 with all the arguments being perfectly forwarded thanks to C++11.
1726 Being forward-looking, createOwned returns an OwnPtr rather than a PassOwnPtr since the plan is
1727 to get rid of PassOwnPtr and just use std::move instead.
1729 * wtf/FilePrintStream.cpp:
1730 * wtf/FilePrintStream.h:
1732 * wtf/ListHashSet.h:
1734 (WTF::OwnPtr::OwnPtr):
1736 (WTF::createThread):
1737 (WTF::establishIdentifierForPthreadHandle):
1738 (WTF::createThreadInternal):
1739 (WTF::Collator::userDefault):
1740 (WTF::Collator::userDefault):
1742 2013-09-09 Anders Carlsson <andersca@apple.com>
1744 Remove wtf/TypeTraits.h
1745 https://bugs.webkit.org/show_bug.cgi?id=121047
1747 Reviewed by Darin Adler.
1749 * GNUmakefile.list.am:
1751 * WTF.vcxproj/WTF.vcxproj:
1752 * WTF.vcxproj/WTF.vcxproj.filters:
1753 * WTF.xcodeproj/project.pbxproj:
1754 * wtf/CMakeLists.txt:
1755 * wtf/TypeTraits.cpp: Removed.
1756 * wtf/TypeTraits.h: Removed.
1757 * wtf/VectorTraits.h:
1759 2013-09-09 Luciano Wolf <luciano.wolf@openbossa.org>
1761 Nix upstreaming - Adding stubs and Nix specific platform files
1762 https://bugs.webkit.org/show_bug.cgi?id=118358
1764 Reviewed by Benjamin Poulain.
1766 Basically adding all files that have "Nix" in their names and
1767 are related to WebCore module.
1769 * wtf/nix/FeatureDefinesNix.h: Added.
1770 * wtf/nix/PlatformNix.h: Added.
1772 2013-09-08 Anders Carlsson <andersca@apple.com>
1774 Begin moving off of TypeTraits.h
1775 https://bugs.webkit.org/show_bug.cgi?id=121006
1777 Reviewed by Darin Adler.
1779 The C++11 has its own type traits implementation that is more complete and handles corner cases better
1780 since it ties into the compiler. Begin switching uses of WTF type traits to STL type traits.
1782 * wtf/CheckedArithmetic.h:
1784 * wtf/NeverDestroyed.h:
1790 2013-09-09 Julien Brianceau <jbriance@cisco.com>
1792 [Qt] Remove FastAllocBase.h from WTF.pro.
1793 https://bugs.webkit.org/show_bug.cgi?id=121024
1795 Reviewed by Jocelyn Turcotte.
1797 * WTF.pro: Remove FastAllocBase.h as this file disappeared in r155251.
1799 2013-09-08 Darin Adler <darin@apple.com>
1801 Deprecate AdoptCF and AdoptNS (on all platforms except iOS for now)
1802 https://bugs.webkit.org/show_bug.cgi?id=121017
1804 Reviewed by Andreas Kling.
1806 * wtf/RetainPtr.h: Use the preprocessor to rename AdoptCF and AdoptNS
1807 to DeprecatedAdoptCF and DeprecatedAdoptNS on all platforms except
1808 for iOS. Also removed an unneeded explicit conversion in the retainPtr
1809 function. Also re-sorted the using lines at the end of the file.
1811 2013-09-08 Anders Carlsson <andersca@apple.com>
1813 Move WTF::notFound to Vector.h and delete NotFound.h
1814 https://bugs.webkit.org/show_bug.cgi?id=120990
1816 Reviewed by Sam Weinig.
1818 * GNUmakefile.list.am:
1820 * WTF.vcxproj/WTF.vcxproj:
1821 * WTF.vcxproj/WTF.vcxproj.filters:
1822 * WTF.xcodeproj/project.pbxproj:
1823 * wtf/CMakeLists.txt:
1824 * wtf/NotFound.h: Removed.
1827 2013-09-07 David Kilzer <ddkilzer@apple.com>
1829 gtest fails to build due to integer type mismatch in WTF::insertIntoBoundedVector()
1830 <http://webkit.org/b/120983>
1832 Reviewed by Dan Bernstein.
1834 Fixes the following build failure:
1836 WebKitBuild/Debug/usr/local/include/wtf/StdLibExtras.h:266:23: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
1837 for (unsigned i = size; i-- > index + 1;)
1840 * wtf/StdLibExtras.h:
1841 (WTF::insertIntoBoundedVector): Use size_t instead of unsigned
1842 as for loop index variable.
1844 2013-09-07 Anders Carlsson <andersca@apple.com>
1846 Remove NonCopyableSort.h from WTF
1847 https://bugs.webkit.org/show_bug.cgi?id=120984
1849 Reviewed by Andreas Kling.
1851 std::sort as defined by C++11 moves elements when possible, so there's no need for nonCopyableSort anymore.
1853 * GNUmakefile.list.am:
1855 * WTF.vcxproj/WTF.vcxproj:
1856 * WTF.vcxproj/WTF.vcxproj.filters:
1857 * WTF.xcodeproj/project.pbxproj:
1858 * wtf/NonCopyingSort.h: Removed.
1860 2013-09-07 Anders Carlsson <andersca@apple.com>
1862 Get rid of PassOwnArrayPtr
1863 https://bugs.webkit.org/show_bug.cgi?id=120964
1865 Reviewed by Andreas Kling.
1867 Make OwnArrayPtr a proper move-only type and get rid of PassOwnArrayPtr.
1869 Ultimately I'd like to get rid of OwnArrayPtr as well and just have it be a specialization
1870 of OwnPtr<T[]>, but this is a step in the right direction.
1872 * GNUmakefile.list.am:
1874 * WTF.vcxproj/WTF.vcxproj:
1875 * WTF.vcxproj/WTF.vcxproj.filters:
1876 * WTF.xcodeproj/project.pbxproj:
1877 * wtf/Assertions.cpp:
1878 * wtf/CMakeLists.txt:
1880 * wtf/FastBitVector.h:
1882 * wtf/OwnArrayPtr.h:
1883 * wtf/PassOwnArrayPtr.h: Removed.
1885 2013-09-07 Anders Carlsson <andersca@apple.com>
1887 VectorMover should use std::move
1888 https://bugs.webkit.org/show_bug.cgi?id=120959
1890 Reviewed by Geoffrey Garen.
1892 This lets the compiler use move constructors when moving data, which can be a performance improvement.
1893 If the vector element type isn't movable it will be copied instead.
1896 (WTF::VectorTypeOperations::move):
1897 (WTF::VectorTypeOperations::moveOverlapping):
1899 2013-09-07 Anders Carlsson <andersca@apple.com>
1901 Get rid of FastAllocBase.h
1902 https://bugs.webkit.org/show_bug.cgi?id=120952
1904 Reviewed by Antti Koivisto.
1906 FastAllocBase.h now only contains the WTF_MAKE_FAST_ALLOCATED macro.
1907 Move that macro to FastMalloc.h instead and remove FastAllocBase.h.
1909 * WTF.vcxproj/WTF.vcxproj:
1910 * WTF.vcxproj/WTF.vcxproj.filters:
1911 * WTF.xcodeproj/project.pbxproj:
1912 * wtf/DeferrableRefCounted.h:
1913 * wtf/FastAllocBase.h: Removed.
1917 * wtf/PrintStream.h:
1920 * wtf/ThreadingPrimitives.h:
1922 * wtf/gobject/GMutexLocker.h:
1923 * wtf/unicode/Collator.h:
1925 2013-09-06 Anders Carlsson <andersca@apple.com>
1927 Add a new smart pointer type for fastMalloc'ed memory
1928 https://bugs.webkit.org/show_bug.cgi?id=120911
1930 Reviewed by Andreas Kling.
1932 Due to an oversight on my part, Vector::releaseBuffer() currently returns an OwnPtr
1933 which means that its data will be freed with operator delete instead of fastFree.
1935 Fix this by introducing a new MllocPtr smart pointer class and change Vector::releaseBuffer() to return it instead.
1938 * WTF.vcxproj/WTF.vcxproj:
1939 * WTF.vcxproj/WTF.vcxproj.filters:
1940 * WTF.xcodeproj/project.pbxproj:
1941 * wtf/CMakeLists.txt:
1942 * wtf/FastAllocBase.h:
1943 * wtf/MallocPtr.h: Added.
1945 * wtf/text/StringBuffer.h:
1946 * wtf/text/StringImpl.h:
1948 2013-09-06 Andreas Kling <akling@apple.com>
1950 Remove old workaround for Nokia's Harmattan GCC on Qt/ARM.
1951 <https://webkit.org/b/37253>
1953 Reviewed by Anders Carlsson.
1955 Apparently this was a workaround for GCC getting stuck in an infinite loop
1956 when building for ARM in a Nokia SDK over 2 years ago.
1958 I think it's safe to remove this now, but if I'm wrong, and you're reading
1959 this ChangeLog wondering why I did this to you, feel free to put it back in.
1962 (WTF::refIfNotNull):
1963 (WTF::derefIfNotNull):
1965 2013-09-06 Andreas Kling <akling@apple.com>
1967 Remove unused RefPtr(PlacementNewAdopt) constructor.
1968 <https://webkit.org/b/120914>
1970 Reviewed by Anders Carlsson.
1974 2013-09-06 David Kilzer <ddkilzer@apple.com>
1976 BUILD FIX (r155171): INSTALL_PATH_PREFIX should no longer be used beneath BUILT_PRODUCTS_DIR in HEADER_SEARCH_PATHS for iOS
1978 * Configurations/Base.xcconfig:
1979 (HEADER_SEARCH_PATHS): Change
1980 $(BUILT_PRODUCTS_DIR)/$(INSTALL_PATH_PREFIX)/usr/local/include to
1981 $(BUILT_PRODUCTS_DIR)/usr/local/include.
1983 2013-09-06 Anders Carlsson <andersca@apple.com>
1985 Remove fastNew/fastDelete
1986 https://bugs.webkit.org/show_bug.cgi?id=120904
1988 Reviewed by Andreas Kling.
1990 Remove the various variants of fastNew and fastDelete.
1992 * wtf/FastAllocBase.h:
1994 2013-09-06 Alberto Garcia <berto@igalia.com>
1996 [GTK] GlibUtilities: getCurrentExecutablePath() does not compile on GNU/Hurd
1997 https://bugs.webkit.org/show_bug.cgi?id=120793
1999 Reviewed by Gustavo Noronha Silva.
2001 Original patch by Svante Signell <svante.signell@telia.com>.
2003 PATH_MAX is not defined in GNU/Hurd, this patch adds a dummy
2004 implementation to make it compile.
2006 * wtf/gobject/GlibUtilities.cpp:
2007 (getCurrentExecutablePath):
2009 2013-09-05 Dan Bernstein <mitz@apple.com>
2011 INSTALL_PATH_PREFIX is used even when not installing
2012 https://bugs.webkit.org/show_bug.cgi?id=120810
2014 Reviewed by Andy Estes.
2016 * Configurations/CopyWTFHeaders.xcconfig: Removed INSTALL_PATH_PREFIX from
2017 the definition of PRIVATE_HEADERS_FOLDER_PATH. Also removed the leading
2018 slash, because the Xcode definition of this build setting is relative.
2019 * WTF.xcodeproj/project.pbxproj: Prepend INSTALL_PATH_PREFIX here when installing.
2021 2013-09-05 Anders Carlsson <andersca@apple.com>
2023 Fix build with older versions of clang from Xcode.
2027 2013-09-05 Anders Carlsson <andersca@apple.com>
2029 Make Vector::uncheckedAppend work with move-only types
2030 https://bugs.webkit.org/show_bug.cgi?id=120799
2032 Reviewed by Andreas Kling.
2035 (WTF::::uncheckedAppend):
2036 Use std::forward to invoke the move constructor when possible.
2038 2013-09-05 Anders Carlsson <andersca@apple.com>
2040 Add COMPILER_SUPPORTS(CXX_AUTO_TYPE) and #error if it's 0
2041 https://bugs.webkit.org/show_bug.cgi?id=120794
2043 Reviewed by Andreas Kling.
2045 People have already begun using C++11 auto in WebCore, so let's make it a prerequisite.
2049 2013-09-05 Anders Carlsson <andersca@apple.com>
2051 Clean up wtf/Compiler.h
2052 https://bugs.webkit.org/show_bug.cgi?id=120790
2054 Reviewed by Andreas Kling.
2056 - Get rid of the CLANG_PRAGMA define, it's not used anywhere.
2057 - Remove a workaround for a bug in the version of clang that came with Xcode 4.2.
2058 - Replace WTF_COMPILER_SUPPORTS_CXX_FINAL_CONTROL with a compiler quirk for versions of clang
2059 that have a buggy final implementation and fix a bug in the macro where final would be disabled
2060 for versions of clang where __clang_minor__ is less than 2, regardless of the major version.
2061 - Fail if someone tries to compile the WebKit stack with a compiler that doesn't support rvalue
2062 references or static_assert.
2066 2013-09-05 Anders Carlsson <andersca@apple.com>
2068 Change StringBuffer back to not use an OwnPtr in an attempt to fix ports.
2070 * wtf/text/StringBuffer.h:
2072 2013-09-04 Anders Carlsson <andersca@apple.com>
2074 Vector::releaseBuffer should return an OwnPtr
2075 https://bugs.webkit.org/show_bug.cgi?id=120718
2077 Reviewed by Andreas Kling.
2079 Change Vector::releaseBuffer() to return an OwnPtr. I intentionally chose
2080 to use an OwnPtr over a PassOwnPtr since we're trying to move away from PassOwnPtr objects.
2082 Fix fallout from this change by adopting OwnPtr/PassOwnPtr in StringBuffer and the two StringImpl
2083 constructors that adopt the passed in pointer.
2086 * wtf/text/StringBuffer.h:
2087 * wtf/text/StringImpl.h:
2089 2013-09-05 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
2091 Remove String(RefPtr<StringImpl>) constructor
2092 https://bugs.webkit.org/show_bug.cgi?id=120767
2094 Reviewed by Anders Carlsson.
2096 The String(RefPtr<StringImpl>) constructor should be removed for the following reasons:
2097 - It almost does not have clients, so it is unneeded.
2098 - RefPtr should never be passed by value
2100 * wtf/text/StringBuilder.cpp:
2101 (WTF::StringBuilder::shrinkToFit):
2102 * wtf/text/WTFString.h:
2104 2013-09-05 Jaehun Lim <ljaehun.lim@samsung.com>
2106 Unreviewed. Fix build after r155083
2108 Source/WTF/wtf/Vector.h:1210:48: error: ‘>>’ should be ‘> >’ within a nested template argument list
2110 * wtf/Vector.h: Add missing space.
2112 2013-09-04 Mark Rowe <mrowe@apple.com>
2114 Fix AutodrainedPool.h to compile without errors under ARC.
2116 Rubber-stamped by Anders Carlsson.
2118 * wtf/AutodrainedPool.h: Some versions of Clang complain about any use of NSAutoreleasePool under ARC.
2119 Change the type of the member variable to id to work around this. Since the implementation file is compiled
2120 under manual reference counting, everything will work fine.
2122 2013-09-04 Anders Carlsson <andersca@apple.com>
2126 Rubber-stamped by Andreas Kling.
2128 I'm cleaning up Vector and making it work with move-only objects, and the namespace WTF
2129 indentation is driving me crazy.
2133 2013-09-03 Filip Pizlo <fpizlo@apple.com>
2135 CodeBlock memory cost reporting should be rationalized
2136 https://bugs.webkit.org/show_bug.cgi?id=120615
2138 Reviewed by Darin Adler.
2140 * wtf/RefCountedArray.h:
2141 (WTF::RefCountedArray::refCount):
2143 2013-09-03 Enrica Casucci <enrica@apple.com>
2145 Follow up to http://trac.webkit.org/changeset/155014
2147 Reviewed by Alexey Proskuryakov.
2149 In the r155014 I renamed hasLineBreakingPropertyComplexContext
2150 to requiresComplexContextForWordBreaking but forgot to
2151 make the same change in UnicodeWchar.h.
2153 * wtf/unicode/wchar/UnicodeWchar.cpp:
2154 (WTF::Unicode::requiresComplexContextForWordBreaking):
2155 * wtf/unicode/wchar/UnicodeWchar.h:
2157 2013-09-03 Enrica Casucci <enrica@apple.com>
2159 Can't select Katakana word by double-clicking.
2160 <rdar://problem/14654926>
2162 Reviewed by Alexey Proskuryakov and Ryosuke Niwa.
2164 For some languages, like Japanese we need
2165 to use more context for word breaking.
2166 I've renamed the function to better reflect its use
2167 and remove the unused hasLineBreakingPropertyComplexContextOrIdeographic.
2169 * wtf/unicode/icu/UnicodeIcu.h:
2170 (WTF::Unicode::requiresComplexContextForWordBreaking):
2172 2013-09-03 Andreas Kling <akling@apple.com>
2174 Support Vector<Ref<T>>.
2175 <https://webkit.org/b/120637>
2177 Reviewed by Antti Koivisto.
2179 Add a Ref(const T&) constructor to enable Vector<Ref<T>>. This looks a bit awkward
2180 but is necessary for Vector::append(const T&) to find a constructor.
2182 An alternative would be to add something like std::vector::emplace_back, but I can't
2183 think of a good name for that, and it'd be nice if append() would "just work."
2185 Also add operator->(). I initially excluded this because I felt it made for
2186 unsafe-looking code. Things quickly got out of hand with .get() everywhere though.
2188 IMO -> looks OK as long as it's only used on the first link in a dereference chain,
2189 as that variable and its type will be "in context."
2194 (WTF::Ref::operator->):
2196 * wtf/VectorTraits.h:
2198 Add simple traits for Ref<T> so it can be moved around freely by Vector.
2200 2013-09-03 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
2202 Check WTF::VectorFiller template argument type size in compile time
2203 https://bugs.webkit.org/show_bug.cgi?id=120631
2205 Reviewed by Darin Adler.
2207 The template argument's type size in WTF::VectorFiller 'memset' specialization
2208 should be checked during compilation rather than in runtime.
2212 2013-09-02 Darin Adler <darin@apple.com>
2214 Cut down on double hashing and code needlessly using hash table iterators
2215 https://bugs.webkit.org/show_bug.cgi?id=120611
2217 Reviewed by Andreas Kling.
2219 Double hashing is common in code that needs to combine a remove with some
2220 action to only be done if the code is removed. The only way to avoid it is
2221 to write code using find and a hash table iterator. To help with this, add
2222 a boolean return value to remove functions to indicate if anything was removed.
2224 Double hashing also happens in code that does a get followed by a remove.
2225 The take function is helpful in this case. To help with this, add a takeFirst
2226 funciton to ListHashSet.
2228 * wtf/HashCountedSet.h:
2229 (WTF::HashCountedSet::removeAll): Added a boolean return value, analogous to the one
2230 that the HashCountedSet::remove function already has.
2233 (WTF::HashMap::remove): Added a boolean return value, true if something was removed.
2235 (WTF::HashSet::remove): Ditto.
2236 * wtf/RefPtrHashMap.h:
2237 (WTF::RefPtrHashMap::remove): Ditto.
2239 * wtf/ListHashSet.h:
2240 (WTF::ListHashSet::takeFirst): Added.
2241 (WTF::ListHashSet::takeLast): Added.
2242 (WTF::ListHashSet::remove): Added a boolean return value, true if something was removed.
2244 * wtf/WTFThreadData.h:
2245 (JSC::IdentifierTable::remove): Use the new remove return value to get rid of most of
2246 the code in this function.
2248 2013-09-02 David Kilzer <ddkilzer@apple.com>
2250 Remove duplicate entries found by Xcode in WTF project
2252 Platform.h was duplicated in r111778 after being added in
2255 A dangling reference to Ref.h was added in r154962.
2257 * WTF.xcodeproj/project.pbxproj: Remove duplicate entries for
2258 Platform.h and Ref.h.
2260 2013-09-02 Andreas Kling <akling@apple.com>
2264 2013-09-02 Darin Adler <darin@apple.com>
2266 [Mac] No need for HardAutorelease, which is same as CFBridgingRelease
2267 https://bugs.webkit.org/show_bug.cgi?id=120569
2269 Reviewed by Andy Estes.
2271 * wtf/ObjcRuntimeExtras.h: Added a FIXME about miscapitalization of ObjC.
2272 Deleted HardAutorelease.
2273 (wtfObjcMsgSend): Dropped the use of abbreviations in local class and argument names.
2274 (wtfCallIMP): Ditto.
2276 2013-09-01 Andreas Kling <akling@apple.com>
2278 Ref: A smart pointer for the reference age.
2279 <https://webkit.org/b/120570>
2281 Reviewed by Antti Koivisto.
2283 Add a very simple simple Ref<T> smart pointer class that is never null.
2284 It's initialized by passing a T& to the constructor and cannot be assigned to.
2286 operator-> is not overloaded, to prevent unsafe-looking code.
2287 The value is extracted by "T& get()", since C++ does not let you override operator.()
2291 2013-08-30 Oliver Hunt <oliver@apple.com>
2293 Make JSValue bool conversion less dangerous
2294 https://bugs.webkit.org/show_bug.cgi?id=120505
2296 Reviewed by Darin Adler.
2298 Make LIKELY and UNLIKELY macros coerce to bool before
2303 2013-08-30 Antti Koivisto <antti@apple.com>
2305 Remove code behind ENABLE(DIALOG_ELEMENT)
2306 https://bugs.webkit.org/show_bug.cgi?id=120467
2308 Reviewed by Darin Adler.
2310 * wtf/FeatureDefines.h:
2312 2013-08-29 Sam Weinig <sam@webkit.org>
2314 Add ENABLE guards for Promises
2315 https://bugs.webkit.org/show_bug.cgi?id=120488
2317 Reviewed by Andreas Kling.
2319 * wtf/FeatureDefines.h:
2321 2013-08-28 Zan Dobersek <zdobersek@igalia.com>
2323 [GTK] Add support for building JSC with FTL JIT enabled
2324 https://bugs.webkit.org/show_bug.cgi?id=120270
2326 Reviewed by Filip Pizlo.
2328 * wtf/Platform.h: Define ENABLE_FTL_JIT to the value of 1 for the GTK port if building for the x86-64
2329 architecture with LLVM present and the define not being previously defined. This is applicable when
2330 configuring the Automake build with '--enable-ftl-jit=auto'.
2332 2013-08-27 Arunprasad Rajkumar <arurajku@cisco.com>
2334 Replace currentTime() with monotonicallyIncreasingTime() in WebCore
2335 https://bugs.webkit.org/show_bug.cgi?id=119958
2337 Reviewed by Alexey Proskuryakov.
2339 WTF::currentTime() is prone to NTP and manual adjustments, so use
2340 WTF::monotonicallyIncreasingTime() to measure elapsed time.
2342 It is a continuation of r154201.
2344 * wtf/CurrentTime.h: Edited comment.
2346 2013-08-27 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
2348 [gstreamer] Make sure gstreamer source element is thread-safe
2349 https://bugs.webkit.org/show_bug.cgi?id=115352
2351 Reviewed by Philippe Normand.
2353 Add convenience class that simplifies locking and unlocking a GMutex.
2355 * GNUmakefile.list.am:
2356 * wtf/gobject/GMutexLocker.h: Added.
2357 (WebCore::GMutexLocker::GMutexLocker):
2358 (WebCore::GMutexLocker::~GMutexLocker):
2359 (WebCore::GMutexLocker::lock):
2360 (WebCore::GMutexLocker::unlock):
2361 (WebCore::GMutexLocker::mutex):
2363 2013-08-26 Andy Estes <aestes@apple.com>
2365 Don't leak objects in HardAutorelease when OBJC_NO_GC is undefined but
2366 Objective-C GC is disabled at runtime.
2368 Reviewed by Darin Adler.
2370 * wtf/ObjcRuntimeExtras.h:
2373 2013-08-23 Andy Estes <aestes@apple.com>
2375 Fix issues found by the Clang Static Analyzer
2376 https://bugs.webkit.org/show_bug.cgi?id=120230
2378 Reviewed by Darin Adler.
2380 * wtf/ObjcRuntimeExtras.h:
2381 (HardAutorelease): Added a canonical implementation of HardAutorelease.
2383 2013-08-26 Zan Dobersek <zdobersek@igalia.com>
2385 Undefine __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS before redefining them
2386 https://bugs.webkit.org/show_bug.cgi?id=120313
2388 Reviewed by Darin Adler.
2390 * wtf/LLVMHeaders.h: Undefine the two macros before they are defined again.
2391 This way we avoid the compilation-time warnings about the macros being invalidly redefined.
2393 2013-08-26 Oliver Hunt <oliver@apple.com>
2395 Building is so overrated.
2397 * wtf/Compression.cpp:
2398 (WTF::GenericCompressedData::decompress):
2400 2013-08-26 Oliver Hunt <oliver@apple.com>
2402 Disable compression under MSVC for now as we're getting
2403 weird release-only failures.
2405 * wtf/Compression.cpp:
2407 2013-08-24 Benjamin Poulain <benjamin@webkit.org>
2409 Save three bytes per CStringBuffer object
2410 https://bugs.webkit.org/show_bug.cgi?id=120040
2412 Reviewed by Darin Adler.
2414 Merge https://chromium.googlesource.com/chromium/blink/+/894ae8eafdb64912aefd8f9c809f4ccda84f3b89
2416 sizeof(CStringBuffer) was rounded up to 8 on account of struct size and
2417 alignment rules. This is clearly not what was intended.
2419 * wtf/text/CString.cpp:
2420 (WTF::CStringBuffer::createUninitialized):
2421 * wtf/text/CString.h:
2422 (WTF::CStringBuffer::data):
2423 (WTF::CStringBuffer::mutableData):
2425 2013-08-24 Darin Adler <darin@apple.com>
2427 RetainPtr lacks move constructor for case when argument is a RetainPtr of a different type
2428 https://bugs.webkit.org/show_bug.cgi?id=120255
2430 Reviewed by Andreas Kling.
2432 * wtf/RetainPtr.h: Added missing move constructor, modeled on the other move constructor,
2433 and the one from RetPtr.
2435 2013-08-24 Oliver Hunt <oliver@apple.com>
2437 Make the world build.
2439 * wtf/Compression.h:
2441 2013-08-24 Oliver Hunt <oliver@apple.com>
2443 REGRESSION(r154498): Crashes on EFL, GTK, Qt on release configurations
2444 https://bugs.webkit.org/show_bug.cgi?id=120246
2446 Reviewed by Antti Koivisto.
2448 Undestroy all the platforms that don't use the global new overload
2450 * wtf/Compression.h:
2452 2013-08-21 Mark Rowe <mrowe@apple.com>
2454 <https://webkit.org/b/120141> Make RetainPtr work with ARC.
2456 Have RetainPtr store the object its managing as a CFTypeRef and manage its lifetime with
2457 CFRetain / CFRelease. This is necessary to have explicit control over the lifetime of
2458 Objective-C objects when automatic reference counting is in use. Two helper methods are
2459 introduced to convert between the pointer type that the RetainPtr manages and the CFTypeRef
2460 that the pointer is stored as. For CF types and Objective-C types with ARC disabled,
2461 these methods are simply casts. For Objective-C types under ARC they need to use the
2462 special bridging casts to keep the compiler happy.
2464 Reviewed by Anders Carlsson.
2467 (WTF::RetainPtr::RetainPtr): Use the helper methods to convert to and from the storage
2468 types when necessary.
2469 (WTF::RetainPtr::~RetainPtr): Ditto.
2470 (WTF::RetainPtr::get): Ditto.
2471 (WTF::RetainPtr::operator->): Ditto.
2472 (WTF::RetainPtr::operator PtrType): Ditto.
2473 (WTF::::RetainPtr): Ditto.
2474 (WTF::::clear): Ditto.
2475 (WTF::::leakRef): Ditto.
2478 (WTF::RetainPtr::fromStorageTypeHelper): Use crazy template magic to determine whether to use
2479 a bridging cast or not depending on the desired return type.
2480 (WTF::RetainPtr::fromStorageType):
2481 (WTF::RetainPtr::toStorageType): Overloading is sufficient here.
2483 2013-08-21 Mark Rowe <mrowe@apple.com>
2487 It didn't work with ARC like it said it would. We'll need to take a slightly different approach.
2489 Rubber-stamped by Anders Carlsson.
2492 (WTF::RetainPtr::RetainPtr):
2493 (WTF::RetainPtr::~RetainPtr):
2494 (WTF::RetainPtr::operator UnspecifiedBoolType):
2501 2013-08-23 Brent Fulgham <bfulgham@apple.com>
2503 [Windows] Unreviewed build correction after r154513.
2505 * WTF.vcxproj/build-generated-files.sh: Variable was missing '$' character.
2507 2013-08-23 Darin Adler <darin@apple.com>
2509 Cut down repeated code in RefPtr and RetainPtr by using copy/move-and-swap for assignment operators
2510 https://bugs.webkit.org/show_bug.cgi?id=120223
2512 Reviewed by Anders Carlsson.
2514 * wtf/RefPtr.h: Switch to copy-and-swap in the assignment operators. The move ones already were done
2516 * wtf/RetainPtr.h: Ditto, except for the move ones too.
2518 2013-08-23 Oliver Hunt <oliver@apple.com>
2520 Add more validation logic to CompressibleVector
2521 https://bugs.webkit.org/show_bug.cgi?id=120227
2523 Reviewed by Brent Fulgham.
2525 Add a pile of assertions to try on catch whatever is going wrong
2526 in the windows environment or other platforms.
2528 * wtf/Compression.cpp:
2529 (WTF::GenericCompressedData::create):
2530 (WTF::GenericCompressedData::decompress):
2531 * wtf/Compression.h:
2532 (WTF::CompressedVector::decompress):
2534 2013-08-23 Alex Christensen <achristensen@apple.com>
2536 Re-separating Win32 and Win64 builds.
2537 https://bugs.webkit.org/show_bug.cgi?id=120178
2539 Reviewed by Brent Fulgham.
2541 * WTF.vcxproj/WTFGenerated.make:
2542 Pass PlatformArchitecture as a command line parameter to bash scripts.
2543 * WTF.vcxproj/build-generated-files.sh:
2544 Use PlatformArchitecture from command line to determine which object directory to use (obj32 or obj64).
2546 2013-08-22 Filip Pizlo <fpizlo@apple.com>
2548 build-jsc --ftl-jit should work
2549 https://bugs.webkit.org/show_bug.cgi?id=120194
2551 Reviewed by Oliver Hunt.
2553 * wtf/LLVMHeaders.h: I don't know what went wrong here. If HAVE(LLVM), then we need those headers!
2555 2013-08-23 Brent Fulgham <bfulgham@apple.com>
2557 [Windows] Unreviewed build correction after r154498.
2559 * WTF.vcxproj/WTF.vcxproj.filters: Adjust files so they show up
2560 in the proper folders.
2561 * WTF.vcxproj/WTFCommon.props: Add search path for zlib header and
2562 include link directive.
2564 2013-08-23 Oliver Hunt <oliver@apple.com>
2566 Attempt to appease windows bot.
2568 * wtf/Compression.h:
2570 2013-08-23 Oliver Hunt <oliver@apple.com>
2572 Re-sort xcode project file
2574 * WTF.xcodeproj/project.pbxproj:
2576 2013-08-23 Oliver Hunt <oliver@apple.com>
2578 Support in memory compression of rarely used data
2579 https://bugs.webkit.org/show_bug.cgi?id=120143
2581 Reviewed by Gavin Barraclough.
2583 Adds a set of utility functions to wrap the use of zlib over a generic
2584 type or a Vector<> as well as adding CompressibleVector that wraps
2585 either a Vector<> or compressed data.
2587 * GNUmakefile.list.am:
2589 * WTF.vcxproj/WTF.vcxproj:
2590 * WTF.xcodeproj/project.pbxproj:
2591 * wtf/CMakeLists.txt:
2592 * wtf/CheckedArithmetic.h:
2593 * wtf/Compression.cpp: Added.
2596 (WTF::GenericCompressedData::create):
2597 (WTF::GenericCompressedData::decompress):
2598 * wtf/Compression.h: Added.
2599 (WTF::GenericCompressedData::compressedSize):
2600 (WTF::GenericCompressedData::originalSize):
2601 (WTF::GenericCompressedData::GenericCompressedData):
2602 (WTF::CompressedVector::create):
2603 (WTF::CompressedVector::decompress):
2604 (WTF::CompressedVector::size):
2605 (WTF::CompressibleVector::CompressibleVector):
2606 (WTF::CompressibleVector::shrinkToFit):
2607 (WTF::CompressibleVector::size):
2608 (WTF::CompressibleVector::operator[]):
2609 (WTF::CompressibleVector::at):
2610 (WTF::CompressibleVector::begin):
2611 (WTF::CompressibleVector::end):
2612 (WTF::CompressibleVector::data):
2613 (WTF::CompressibleVector::decompressIfNecessary):
2615 2013-08-21 Commit Queue <commit-queue@webkit.org>
2617 Unreviewed, rolling out r154416.
2618 http://trac.webkit.org/changeset/154416
2619 https://bugs.webkit.org/show_bug.cgi?id=120147
2621 Broke Windows builds (Requested by rniwa on #webkit).
2623 * WTF.vcxproj/WTFGenerated.make:
2624 * WTF.vcxproj/build-generated-files.sh:
2626 2013-08-21 Alex Christensen <achristensen@apple.com>
2628 <https://webkit.org/b/120137> Separating Win32 and Win64 builds.
2630 Reviewed by Brent Fulgham.
2632 * WTF.vcxproj/WTFGenerated.make:
2633 Pass PlatformArchitecture as a command line parameter to bash scripts.
2634 * WTF.vcxproj/build-generated-files.sh:
2635 Use PlatformArchitecture from command line to determine which object directory to use (obj32 or obj64).
2637 2013-08-21 Allan Sandfeld Jensen <allan.jensen@digia.com>
2639 Disable maybe-uninitialized warning in GCC 4.8
2640 https://bugs.webkit.org/show_bug.cgi?id=119835
2642 Reviewed by Anders Carlsson.
2644 Disable the maybe-uninitialized warning.
2648 2013-08-20 Alex Christensen <achristensen@apple.com>
2650 Use PlatformArchitecture to distinguish between 32-bit and 64-bit builds on Windows.
2651 https://bugs.webkit.org/show_bug.cgi?id=119512
2653 Reviewed by Brent Fulgham.
2655 * WTF.vcxproj/WTFGeneratedCommon.props:
2656 Replaced obj32, bin32, and lib32 with macros for 64-bit build.
2658 2013-08-20 VÃctor Manuel Jáquez Leal <vjaquez@igalia.com>
2660 <https://webkit.org/b/120056> [GTK][ARM] enable DFG_JIT
2662 Reviewed by Martin Robinson.
2664 Enable DFG_JIT in GTK+ platform for ARM/Thumb architecture
2668 2013-08-19 Ryosuke Niwa <rniwa@webkit.org>
2670 <https://webkit.org/b/120049> Delete code for Snow Leopard
2672 Reviewed by Benjamin Poulain.
2674 * wtf/FastMalloc.cpp:
2675 (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
2676 * wtf/FeatureDefines.h:
2679 2013-08-19 Joseph Pecoraro <pecoraro@apple.com>
2681 <https://webkit.org/b/120036> [iOS] Upstream Source/WTF Xcode project for iOS
2683 Reviewed by David Kilzer.
2685 Include iOS only WebCoreThread.* files in an ios group, and clean up
2686 the included files a bit.
2688 * WTF.xcodeproj/project.pbxproj:
2689 * wtf/ios/WebCoreThread.cpp:
2690 * wtf/ios/WebCoreThread.h:
2692 2013-08-19 Joseph Pecoraro <pecoraro@apple.com>
2694 <https://webkit.org/b/119905> [iOS] Upstream Source/WTF
2696 Reviewed by Benjamin Poulain.
2698 Upstream iOS WebKit Source/WTF.
2700 * Configurations/Base.xcconfig:
2701 JavaScriptCore.framework is a public framework.
2704 Define an export macro for iOS projects just including <wtf/Assertions.h>.
2707 * wtf/FeatureDefines.h:
2708 iOS ENABLE and USE defines.
2711 * wtf/mac/MainThreadMac.mm:
2712 (WTF::initializeApplicationUIThreadIdentifier):
2713 (WTF::initializeWebThreadIdentifier):
2714 (WTF::canAccessThreadLocalDataForThread):
2716 (WTF::WeakReference::get):
2717 (WTF::WeakReference::clear):
2718 Shared WebThread and MainThread access to thread local data.
2720 * wtf/WTFThreadData.cpp:
2721 (WTF::WTFThreadData::WTFThreadData):
2722 Shared WebThread and MainThread identifier tables.
2724 * wtf/ThreadSpecific.h:
2726 Used later on so that WebThread can share the MainThread's thread global data.
2728 * wtf/text/StringStatics.cpp:
2729 (WTF::AtomicString::init):
2730 When USE(WEB_THREAD) assert AtomicString::init is initialized on the realMainThread.
2732 * wtf/unicode/CharacterNames.h:
2733 * wtf/unicode/icu/UnicodeIcu.h:
2734 (WTF::Unicode::hasLineBreakingPropertyComplexContextOrIdeographic):
2735 Minor iOS constants and functions used later by WebCore.
2737 2013-08-16 Arunprasad Rajkumar <arurajku@cisco.com>
2739 <https://webkit.org/b/119785> Replace currentTime() with monotonicallyIncreasingTime() in WebCore
2741 Reviewed by Alexey Proskuryakov.
2743 WTF::currentTime() is prone to DST changes and NTP adjustments, so use
2744 WTF::monotonicallyIncreasingTime() to measure elapsed time.
2746 * wtf/CurrentTime.h:
2747 (WTF::monotonicallyIncreasingTimeMS): Added mille second version of monotonic time API.
2749 2013-08-15 Filip Pizlo <fpizlo@apple.com>
2751 refCount() of a StringImpl could be zero if it's static; in that case we shouldn't report extra memory cost
2752 https://bugs.webkit.org/show_bug.cgi?id=119870
2754 Reviewed by Mark Hahnenberg.
2756 * wtf/text/StringImpl.h:
2757 (WTF::StringImpl::costDuringGC):
2758 (WTF::StringImpl::isStatic):
2759 (WTF::StringImpl::bufferOwnership):
2761 2013-08-14 Filip Pizlo <fpizlo@apple.com>
2763 Typed arrays should be rewritten
2764 https://bugs.webkit.org/show_bug.cgi?id=119064
2766 Reviewed by Oliver Hunt.
2768 - Added the notion of a reference counted object that can be marked Deferred,
2769 which is like a special-purpose upref.
2771 - Added a common byte flipper.
2773 Automake work courtesy of Zan Dobersek <zdobersek@igalia.com>.
2775 * GNUmakefile.list.am:
2776 * WTF.xcodeproj/project.pbxproj:
2777 * wtf/DeferrableRefCounted.h: Added.
2778 (WTF::DeferrableRefCountedBase::ref):
2779 (WTF::DeferrableRefCountedBase::hasOneRef):
2780 (WTF::DeferrableRefCountedBase::refCount):
2781 (WTF::DeferrableRefCountedBase::isDeferred):
2782 (WTF::DeferrableRefCountedBase::DeferrableRefCountedBase):
2783 (WTF::DeferrableRefCountedBase::~DeferrableRefCountedBase):
2784 (WTF::DeferrableRefCountedBase::derefBase):
2785 (WTF::DeferrableRefCountedBase::setIsDeferredBase):
2786 (WTF::DeferrableRefCounted::deref):
2787 (WTF::DeferrableRefCounted::setIsDeferred):
2788 (WTF::DeferrableRefCounted::DeferrableRefCounted):
2789 (WTF::DeferrableRefCounted::~DeferrableRefCounted):
2790 * wtf/FlipBytes.h: Added.
2791 (WTF::needToFlipBytesIfLittleEndian):
2793 (WTF::flipBytesIfLittleEndian):
2795 2013-08-14 Julien Brianceau <jbrianceau@nds.com>
2797 DFG_JIT implementation for sh4 architecture.
2798 https://bugs.webkit.org/show_bug.cgi?id=119737
2800 Reviewed by Oliver Hunt.
2804 2013-08-13 Arunprasad Rajkumar <arurajku@cisco.com>
2806 [WTF] [JSC] Replace currentTime() with monotonicallyIncreasingTime() in all possible places
2807 https://bugs.webkit.org/show_bug.cgi?id=119762
2809 Reviewed by Geoffrey Garen.
2811 * wtf/MainThread.cpp:
2812 (WTF::dispatchFunctionsFromMainThread):
2814 2013-08-12 Ragner Magalhaes <ranger.n@samsung.com>
2816 Broken build with build-webkit --no-webgl
2817 https://bugs.webkit.org/show_bug.cgi?id=119272
2819 Reviewed by Alexandru Chiculita.
2821 CSS_SHADERS requires WEBGL enabled.
2822 Add error message to dependency failure.
2824 * wtf/FeatureDefines.h:
2826 2013-08-12 Joseph Pecoraro <pecoraro@apple.com>
2828 [iOS] isMainThread implementation with USE(WEB_THREAD)
2829 https://bugs.webkit.org/show_bug.cgi?id=119644
2831 Reviewed by Benjamin Poulain.
2833 On iOS isMainThread() means that the current thread is either the
2834 MainThread or WebThread and the current thread has the WebThreadLock.
2836 * wtf/ios/WebCoreThread.cpp: Added.
2837 * wtf/ios/WebCoreThread.h: Added.
2838 * wtf/mac/MainThreadMac.mm:
2839 (WTF::isMainThread):
2841 2013-08-11 Carlos Garcia Campos <cgarcia@igalia.com>
2843 Unreviewed. Fix make distcheck.
2845 * GNUmakefile.list.am: Add missing header file.
2847 2013-08-09 Christophe Dumez <ch.dumez@sisa.samsung.com>
2849 Make atob() throw an InvalidCharacterError on excess padding characters
2850 https://bugs.webkit.org/show_bug.cgi?id=118898
2852 Reviewed by Darin Adler.
2854 Add a Base64FailOnInvalidCharacterOrExcessPadding value to the Base64DecodePolicy
2855 enumeration so that the caller can request strict padding validation in addition
2856 to strict character validation. This is needed so that we can use
2857 WTF::base64Decode() for window.atob().
2859 * wtf/text/Base64.cpp:
2860 (WTF::base64DecodeInternal):
2861 * wtf/text/Base64.h:
2863 2013-08-07 Alex Christensen <achristensen@apple.com>
2865 Fixed wrong definition for AppleWin port's WebGL after r153768.
2867 Rubberstamped by Benjamin Poulain.
2869 * wtf/Platform.h: Replaced WTF_USE_SURFACE with WTF_USE_GRAPHICS_SURFACE.
2871 2013-08-04 Sam Weinig <sam@webkit.org>
2873 Remove support for HTML5 MicroData
2874 https://bugs.webkit.org/show_bug.cgi?id=119480
2876 Reviewed by Anders Carlsson.
2878 * wtf/FeatureDefines.h:
2880 2013-08-06 Alex Christensen <achristensen@apple.com>
2882 Enabled WebGL on WinCairo port.
2883 https://bugs.webkit.org/show_bug.cgi?id=119502
2885 Reviewed by Benjamin Poulain.
2887 * wtf/FeatureDefines.h: Enabled WebGL.
2888 * wtf/Platform.h: Added definitions required for WebGL on Windows.
2890 2013-08-05 Mark Rowe <mrowe@apple.com>
2892 <rdar://problem/5927399> FastMalloc should support MallocStackLogging
2894 Call the malloc stack logging function from within the various entry points to FastMalloc
2895 when stack logging is enabled.
2897 Reviewed by Oliver Hunt and Geoff Garen.
2899 * wtf/FastMalloc.cpp:
2900 Call in to MallocHook::InvokeNewHook / MallocHook::InvokeDeleteHook at the appropriate entry
2901 points to FastMalloc. The naming comes from TCMalloc's existing, unused concept of malloc hooks.
2902 (WTF::MallocHook::record): Call the stack logging function with appropriate argument types.
2903 (WTF::MallocHook::recordAllocation): Out-of-line slow path for when stack logging is enabled
2904 that calls record with the values in the right arguments.
2905 (WTF::MallocHook::recordDeallocation): Ditto.
2906 (WTF::MallocHook::init): Stack logging is enabled if the system allocator has enabled stack logging.
2907 (WTF::MallocHook::InvokeNewHook): Call recordAllocation in the unlikely event that stack logging is
2909 (WTF::MallocHook::InvokeDeleteHook): Ditto for recordDeallocation.
2910 (WTF::TCMalloc_ThreadCache::InitModule): Initialize the malloc hook.
2912 2013-08-06 Brent Fulgham <bfulgham@apple.com>
2914 [Windows] Unreviewed build correction after r153754 and r153757.
2917 (remainder): Provide implementation of C99 remainder for VS2010 (and earlier).
2919 2013-07-23 David Farler <dfarler@apple.com>
2920 Provide optional OTHER_CFLAGS, OTHER_CPPFLAGS, OTHER_LDFLAGS additions for building with ASAN
2921 https://bugs.webkit.org/show_bug.cgi?id=117762
2923 Reviewed by Mark Rowe.
2925 * Configurations/DebugRelease.xcconfig:
2926 Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS.
2928 2013-08-05 Mark Rowe <mrowe@apple.com>
2930 Build fix for Qt Windows.
2932 * wtf/Assertions.cpp: Include StringExtras.h rather than StdLibExtras.h, since the former is where
2933 strncasecmp is declared.
2935 2013-07-26 Mark Rowe <mrowe@apple.com>
2937 Logging should be configurable using human-readable channel names rather than crazy bitmasks
2938 <http://webkit.org/b/119031>
2940 Implement shared logic for initializing logging channels based on human-readable channel names in WTF,
2941 and rework the WebCore, WebKit and WebKit2 logging initialization on top of it.
2943 Logging channels may now be enabled by providing a comma-separated list of channel names, with the special
2944 "all" name enabling all channels. Channel names prefixed with a leading "-" will result in the named channel
2945 being disabled. For instance, specifying "all,-history,-loading" will result in all logging channels except
2946 for history and loading being enabled.
2948 For OS X developers, this also changes the name of the user defaults used to enable logging. This is done to allow
2949 the old user defaults to remain set for those people that need to switch between version of WebKit before and
2950 after this change. Where the old user default keys were WebCoreLogLevel, WebKitLogLevel and WebKit2LogLevel,
2951 the new user default keys are WebCoreLogging, WebKitLogging and WebKit2Logging.
2953 For GTK developers, this changes the separator used in the WEBKIT_DEBUG environment variable to a comma for
2954 consistency with the other platforms and to enable more code sharing.
2956 While doing this work I've also taken the opportunity to eliminate the need to touch multiple files when
2957 adding a new logging channel. Now only the header in the relevant project needs to be updated.
2959 Reviewed by Sam Weinig.
2961 * wtf/Assertions.cpp:
2962 (WTFLogChannelByName): Iterate over the provided array of log channels, returning the first whose name
2963 matches case-insensitively.
2964 (setStateOfAllChannels): Helper function to set the state of all channels to a single value.
2965 (WTFInitializeLogChannelStatesFromString): Parse a string containing a case-insensitive, comma-separated list
2966 of channel names to enable or disable, with the latter being prefixed by a "-".
2967 * wtf/Assertions.h: Update the layout of WTFLogChannel to include only the state of the channel and its name.
2968 Declare WTFLogChannelByName and WTFInitializeLogChannelStatesFromString.
2969 * wtf/RefCountedLeakCounter.cpp: Update to the new format of WTFLogChannel.
2971 2013-08-05 Benjamin Poulain <bpoulain@apple.com>
2973 Disable <meter> by default on iOS, it is enabled through the xconfig files
2974 https://bugs.webkit.org/show_bug.cgi?id=119503
2976 Reviewed by Alexey Proskuryakov.
2978 * wtf/FeatureDefines.h:
2980 2013-08-05 Oliver Hunt <oliver@apple.com>
2982 Move TypedArray implementation into JSC
2983 https://bugs.webkit.org/show_bug.cgi?id=119489
2985 Reviewed by Filip Pizlo.
2987 Remove TypedArray implementation from WTF
2989 * GNUmakefile.list.am:
2990 * WTF.xcodeproj/project.pbxproj:
2993 2013-08-02 Benjamin Poulain <benjamin@webkit.org>
2995 Remove a bunch of redundant checks for empty string in StringImpl
2996 https://bugs.webkit.org/show_bug.cgi?id=118768
2998 Reviewed by Ryosuke Niwa.
3000 The first thing done by createUninitialized() is check if the length passed
3001 is zero. Internally, there are many cases for which we know the check will never succeed.
3003 Clang is usually really smart for those kind of things, but there are a few cases where
3004 the condition to avoid returning empty() is not simply a check for the length.
3005 This patch adds an internal initializer to deal with that.
3007 * wtf/text/StringImpl.cpp:
3008 (WTF::StringImpl::createUninitializedInternal):
3009 (WTF::StringImpl::createUninitializedInternalNonEmpty):
3010 (WTF::StringImpl::createInternal): Create internal has a special case for null pointer
3011 for the characters. The test also check length, the second check for length cannot fail.
3012 (WTF::StringImpl::create8BitIfPossible): ditto.
3013 (WTF::StringImpl::lower): 3 of the calls cannot be reached for empty length. On an empty length,
3014 the test for (noUpper && !(ored & ~0x7F)) would have caused the function to return "this".
3016 For the last createUninitialized(), there is no guarantee the realLength is not zero.
3018 (WTF::StringImpl::replace): The first thing we do in replace(UChar,UChar) is check if there is anything
3019 to replace. The check for length will never succeed as there must be a character to replace at that point.
3020 * wtf/text/StringImpl.h:
3022 2013-08-02 Mark Lam <mark.lam@apple.com>
3024 Gardening: Touched a line in Platform.h to get all bots to do a clean build.
3030 2013-08-02 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
3032 Check WTF::Vector size with '0' inline capacity
3033 https://bugs.webkit.org/show_bug.cgi?id=119397
3035 Reviewed by Andreas Kling.
3037 Putting in place the compile assertion that had been removed with r153514.
3039 * wtf/SizeLimits.cpp:
3041 2013-07-26 Mark Rowe <mrowe@apple.com>
3043 <http://webkit.org/b/119169> RetainPtr should support ARC for Objective-C objects.
3045 While RetainPtr is not necessary under ARC, having it available makes it easier to transition
3046 existing code from manual retain / release to ARC.
3048 Under ARC, the object member of RetainPtr is treated as a strong reference by the compiler.
3049 This means that merely assigning to the member variable is sufficient to retain the object,
3050 and clearing the member variable is sufficient to release it. We still need to explicitly
3051 CFRetain / CFRelease CoreFoundation types so the explicit calls to these functions are
3052 moved in to helper functions and overloading is used to have the Objective-C object versions
3053 of them be no-ops under ARC.
3055 Reviewed by Anders Carlsson.
3058 (WTF::retain): Continue to always CFRetain / CFRelease CoreFoundation objects. Only CFRetain / CFRelease
3059 Objective-C objects when using manual retain / release.
3060 (WTF::release): Ditto.
3061 (WTF::adoptNSReference): Adopting references will be handled automatically by the compiler
3062 when possible under ARC by eliminating redundant retain / release pairs.
3063 (WTF::RetainPtr::ImplicitConversionToBoolIsNotAllowed): A new method that exists only to be used by the
3064 conversion to the unspecified bool type.
3065 (WTF::RetainPtr::operator UnspecifiedBoolType): Switch to using a pointer to a member function as the
3066 unspecified bool type to avoid warnings from the compiler when casting Objective-C object types under ARC.
3068 (WTF::RetainPtr::RetainPtr): Switch to our retain / release helper functions.
3069 (WTF::RetainPtr::~RetainPtr): Ditto.
3070 (WTF::::RetainPtr): Ditto.
3071 (WTF::::clear): Ditto.
3073 (WTF::adoptCF): Annotate the argument with CF_RELEASES_ARGUMENT on both the declaration and the definition.
3074 (WTF::adoptNS): Ditto for NS_RELEASES_ARGUMENT.
3076 2013-08-01 Mark Rowe <mrowe@apple.com>
3078 <rdar://problem/14235491> FastMalloc zone enumerator responding to MALLOC_PTR_REGION_RANGE_TYPE with individual allocations
3080 Teach PageMapMemoryUsageRecorder::recordPendingRegions to only record data of the type that it's asked for.
3081 This also fixes the vmmap output to associate some regions with the FastMalloc malloc zone that were previously
3082 associated with it only via the VM tag, meaning they were incorrectly being omitted from the malloc statistics
3083 section of the report.
3085 Reviewed by Dan Bernstein.
3087 * wtf/FastMalloc.cpp:
3088 (WTF::PageMapMemoryUsageRecorder::recordPendingRegions): Report the individual allocations only when requested. Add
3089 the ability to report the regions containing pointers separately from the allocations.
3091 2013-08-01 Mark Rowe <mrowe@apple.com>
3093 <rdar://problem/14528244> False-positive leaks from FastMalloc.
3095 A logic error in the page map enumeration code within FastMalloc could result in a subset of the memory regions
3096 owned by FastMalloc being skipped by the malloc zone enumeration code used by leaks and other performance tools.
3097 If the only reference to an allocated object lived within one of the skipped memory regions, leaks would believe
3098 it had been leaked since it would not find any references to the object.
3100 The logic error manifested when a FastMalloc span owned a region of memory that crossed a 16MB address space boundary,
3101 and when there was one or more other spans immediately after it in the address space. Crossing the 16MB address space
3102 boundary means that the start and end points of the span are in different leaf nodes of the page map trie, and the
3103 code within the page map's visitValues method didn't correctly account this case when skipping to the end of the span
3104 after visiting it. It would resume iterating from the start of the next leaf node rather than continuing to skip values
3105 until the end of the span was passed. The value representing the end of the span would then be processed as if it were
3106 the start of a new span, and more values would be skipped even though they may contain actual spans.
3108 The solution is to rework the algorithm used in visitValues so that it will skip the correct number of values even when
3109 some of the values are in different leaf nodes. This is a more involved change than it may seem since it's also necessary
3110 to deal with the case where a memory region spans two separate root nodes, which can happen if the region happens to cross
3111 a 64GB boundary in the address space.
3113 Reviewed by Geoff Garen.
3116 (TCMalloc_PageMap3::visitValues): Use a single loop to iterate, with the loop index being the key in to the page map in the
3117 same form as used by get and set. This allows us to correctly deal with the index being skipped to a different intermediate or
3118 root node as a result of visiting a span that crosses a 16MB boundary in memory.
3119 (TCMalloc_PageMap2::visitValues): Ditto, but without having to deal with intermediate nodes.
3121 2013-08-01 Ruth Fong <ruth_fong@apple.com>
3123 [Forms: color] <input type='color'> popover color well implementation
3124 <rdar://problem/14411008> and https://bugs.webkit.org/show_bug.cgi?id=119356
3126 Reviewed by Benjamin Poulain.
3128 * wtf/FeatureDefines.h: Added and enabled INPUT_TYPE_COLOR_POPOVER.
3130 2013-08-01 Simon Fraser <simon.fraser@apple.com>
3132 REGRESSION(r145592): AutodrainedPool.h. RunLoopTimer.h, SchedulePair.h are being copied into the wrong location
3133 https://bugs.webkit.org/show_bug.cgi?id=112833
3135 Reviewed by Sam Weinig.
3137 AutodrainedPool.h and SchedulePair.h should just be project headers, not
3138 private headers, so they get copied into <build dir>/usr/local/include/wtf
3139 not <build dir>/usr/local/include
3141 * WTF.xcodeproj/project.pbxproj:
3143 2013-07-31 Ruth Fong <ruth_fong@apple.com>
3145 <input type=color> Mac UI behaviour
3146 <rdar://problem/10269922> and https://bugs.webkit.org/show_bug.cgi?id=61276
3148 Reviewed by Brady Eidson.
3150 * wtf/FeatureDefines.h: Enabled INPUT_TYPE_COLOR on Mac port.
3152 2013-07-31 Andreas Kling <akling@apple.com>
3154 Shrink Vectors with inline capacity.
3155 <http://webkit.org/b/119295>
3156 <rdar://problem/14598360>
3158 Reviewed by Anders Carlsson.
3160 Pack Vector::m_size next to VectorBufferBase::m_capacity so there's no space wasted
3161 on padding when sizeof(T) >= 8. Since m_size is not conceptually part of the buffer,
3162 I just using'ed it into Vector.
3164 * wtf/SizeLimits.cpp:
3166 (WTF::VectorBufferBase::VectorBufferBase):
3167 (WTF::VectorBuffer::VectorBuffer):
3168 (WTF::Vector::Vector):
3171 2013-07-30 Patrick Gansterer <paroga@webkit.org>
3173 Move WindowsExtras.h from WebCore to WTF
3174 https://bugs.webkit.org/show_bug.cgi?id=118125
3176 Reviewed by Anders Carlsson.
3178 Move it to WTF to be able to use the functions in WTF too.
3180 * wtf/WindowsExtras.h: Renamed from Source/WebCore/platform/win/WindowsExtras.h.
3181 (WTF::getRegistryValue):
3182 (WTF::getWindowPointer):
3183 (WTF::setWindowPointer):
3184 * wtf/win/MainThreadWin.cpp:
3185 (WTF::initializeMainThreadPlatform):
3187 2013-07-29 Carlos Garcia Campos <cgarcia@igalia.com>
3189 Unreviewed. Fix make distcheck.
3191 * GNUmakefile.list.am: Add missing files to compilation.
3193 2013-07-29 Mark Rowe <mrowe@apple.com>
3195 <rdar://problem/14528244> Tons of FastMalloc leaks reported by leaks of objects that have already been deallocated
3197 Reviewed by Sam Weinig.
3199 * wtf/FastMalloc.cpp:
3200 (WTF::TCMalloc_Central_FreeList::enumerateFreeObjects): Mark objects in the transfer cache as being free.
3202 2013-07-29 Zan Dobersek <zdobersek@igalia.com>
3204 Reintroduce convenience CheckedInt*, CheckedUint* types
3205 https://bugs.webkit.org/show_bug.cgi?id=119213
3207 Reviewed by Oliver Hunt.
3209 Reintroduce CheckedInt* and CheckedUint* types that were previously provided for convenience
3210 through the CheckedInt header that was removed in r153095. The types are now based on the
3211 Checked class, using the RecordOverflow class as the overflow handler.
3213 * wtf/CheckedArithmetic.h:
3215 2013-07-27 Ryosuke Niwa <rniwa@webkit.org>
3217 REGRESSION(r153380): Can't open messages on Gmail
3218 https://bugs.webkit.org/show_bug.cgi?id=119165
3220 Reviewed by Andreas Kling.
3222 This bug was caused by r153380. The bug doesn't reproduce as long as WebKit is built by clang 4.2 and later
3223 or final is disabled (it could be clang 4.1 and later but we don't have information about that).
3225 Fix the bug by disabling final on earlier versions of clang. Unfortunately we can only check versions of
3226 Apple clang since __clang_major__ and __clang_minor__ are vendor dependent.
3230 2013-07-26 Oliver Hunt <oliver@apple.com>
3232 ASSERT failure in wtf/CheckedBoolean.h line 43 on Windows
3233 https://bugs.webkit.org/show_bug.cgi?id=119170
3235 Reviewed by Michael Saboff.
3237 Added a copy constructor to CheckedBoolean.
3239 * wtf/CheckedBoolean.h:
3240 (CheckedBoolean::CheckedBoolean):
3242 2013-07-25 Brent Fulgham <bfulgham@apple.com>
3244 [Windows] Unreviewed build fix.
3246 * WTF.vcxproj/WTF.vcxproj: Add missing SixCharacterHash.h,.cpp files.
3247 * WTF.vcxproj/WTF.vcxproj.filters: Ditto.
3248 * wtf/NumberOfCores.h: Add export macro to numberOfProcessorCores.
3249 * wtf/PrintStream.h: Add export macro to dumpCharacter.
3250 * wtf/SixCharacterHash.h: Add export macro to sixCharacterHashStringToInteger
3251 and integerToSixCharacterHashString.
3252 * wtf/text/CString.h: Add export macro to hash and equal methods.
3253 (WTF::CStringHash::hash): Add export macro.
3255 2013-07-25 peavo@outlook.com <peavo@outlook.com>
3257 [Windows] Provide ASM implemenation of 8-bit compare-and-swap
3258 https://bugs.webkit.org/show_bug.cgi?id=119084
3260 Reviewed by Brent Fulgham.
3263 (WTF::weakCompareAndSwap): Add a 32-bit X86 Assembly path for
3266 2013-07-25 Brent Fulgham <bfulgham@apple.com>
3268 [Windows] Unreviewed build fix.
3270 * WTF.vcxproj/WTF.vcxproj: Add missing CompilationThread.h,.cpp
3271 * WTF.vcxproj/WTF.vcxproj.filters: Ditto.
3273 2013-07-25 Michael Brüning <michael.bruning@digia.com>
3275 Fix Windows build after r153134.
3276 https://bugs.webkit.org/show_bug.cgi?id=119090
3278 Reviewed by Oliver Hunt.
3280 Add USE(PTHREADS) guards around pthread specific code
3281 for now. This will cause isCompilationThread to always
3282 return false on non pthread platforms such as Windows.
3284 We might be able to use the Windows one-time initialization
3285 for this, but this is only available from Windows Vista on.
3287 * wtf/CompilationThread.cpp:
3288 (WTF::initializeCompilationThreads):
3290 2013-07-25 Allan Sandfeld Jensen <allan.jensen@digia.com>
3292 Fix windows build after FTL upstream
3294 Unreviewed build fix.
3297 (WTF::weakCompareAndSwap):
3299 2013-07-25 Ryuan Choi <ryuan.choi@samsung.com>
3301 Unreviewed, build fix on the EFL port.
3303 * wtf/CMakeLists.txt: Added SixCharacterHash.cpp
3305 2013-07-25 Gabor Rapcsanyi <rgabor@webkit.org>
3307 Unreviewed, build fix on the Qt port.
3309 * WTF.pro: Add additional build files for the FTL.
3311 2013-07-25 Zan Dobersek <zdobersek@igalia.com>
3313 Unreviewed, further GTK build fixing.
3315 * GNUmakefile.am: Make libWTF.la depend on any changes made to the build targets list.
3316 * GNUmakefile.list.am: Add SixCharacterHash source files to the build.
3318 2013-07-25 Csaba Osztrogonác <ossy@webkit.org>
3320 [GTK] Similar fix to r153304.
3322 * GNUmakefile.list.am:
3324 2013-07-25 Grzegorz Czajkowski <g.czajkowski@samsung.com>
3326 Build break in debug after r153134: StringImpl.h:640: undefined reference to `WTF::isCompilationThread()
3327 https://bugs.webkit.org/show_bug.cgi?id=119077
3329 Reviewed by Christophe Dumez.
3331 * wtf/CMakeLists.txt:
3332 Added CompilationThread.{h/cpp}.
3334 2013-07-24 Filip Pizlo <fpizlo@apple.com>
3336 fourthTier: DFG IR dumps should be easier to read
3337 https://bugs.webkit.org/show_bug.cgi?id=119050
3339 Reviewed by Mark Hahnenberg.
3341 Added support for dumping values within a context. By default, if you say
3342 print(inContext(value, context)) it calls value.dumpInContext(out, context)
3343 instead of value.dump(out).
3345 Hoisted the support for six-character hashes out of JSC::CodeBlockHash into
3346 WTF, in the form of SixCharacterHash.h.
3348 Added a helper for creating dump contexts where the inContext() dump will
3349 just use a short string hash to "name" the object being dumped, and then
3350 will print out the full dumps in an endnote to your dump.
3352 Added support for using CString as a hashtable key.
3354 * WTF.xcodeproj/project.pbxproj:
3355 * wtf/PrintStream.h:
3358 (WTF::ValueInContext::ValueInContext):
3359 (WTF::ValueInContext::dump):
3361 * wtf/SixCharacterHash.cpp: Added.
3363 (WTF::sixCharacterHashStringToInteger):
3364 (WTF::integerToSixCharacterHashString):
3365 * wtf/SixCharacterHash.h: Added.
3367 * wtf/StringHashDumpContext.h: Added.
3369 (StringHashDumpContext):
3370 (WTF::StringHashDumpContext::StringHashDumpContext):
3371 (WTF::StringHashDumpContext::getID):
3372 (WTF::StringHashDumpContext::dumpBrief):
3373 (WTF::StringHashDumpContext::brief):
3374 (WTF::StringHashDumpContext::isEmpty):
3375 (WTF::StringHashDumpContext::dump):
3376 * wtf/text/CString.cpp:
3377 (WTF::CString::hash):
3380 (WTF::CStringHash::equal):
3381 * wtf/text/CString.h:
3382 (WTF::CString::CString):
3384 (WTF::CString::isHashTableDeletedValue):
3386 (WTF::CStringHash::hash):
3389 2013-07-21 Filip Pizlo <fpizlo@apple.com>
3391 fourthTier: DFG Nodes should be able to abstractly tell you what they read and what they write
3392 https://bugs.webkit.org/show_bug.cgi?id=118910
3394 Reviewed by Sam Weinig.
3396 Fix compile goof in sortedListDump().
3399 (WTF::sortedListDump):
3401 2013-07-16 Filip Pizlo <fpizlo@apple.com>
3403 fourthTier: NaturalLoops should be able to quickly answer questions like "what loops own this basic block"
3404 https://bugs.webkit.org/show_bug.cgi?id=118750
3406 Reviewed by Mark Hahnenberg.
3408 Add a utility function for inserting an element into a vector that has bounded size,
3409 and where the insertion causes things to drop off the end.
3411 * wtf/StdLibExtras.h:
3413 (WTF::insertIntoBoundedVector):
3415 2013-07-12 Filip Pizlo <fpizlo@apple.com>
3417 fourthTier: DFG should have an SSA form for use by FTL
3418 https://bugs.webkit.org/show_bug.cgi?id=118338
3420 Reviewed by Mark Hahnenberg.
3422 - Extend variadicity of PrintStream and dataLog.
3424 - Give HashSet the ability to add a span of things.
3426 - Give HashSet the ability to == another HashSet.
3428 - Note FIXME's in HashTable concerning copying performance, that affects
3429 the way that the DFG now uses HashSets and HashMaps.
3431 - Factor out the bulk-insertion logic of JSC::DFG::InsertionSet into
3432 WTF::Insertion, so that it can be used in more places.
3434 - Create a dumper for lists and maps.
3436 * WTF.xcodeproj/project.pbxproj:
3448 * wtf/Insertion.h: Added.
3451 (WTF::Insertion::Insertion):
3452 (WTF::Insertion::index):
3453 (WTF::Insertion::element):
3454 (WTF::Insertion::operator<):
3455 (WTF::executeInsertions):
3456 * wtf/ListDump.h: Added.
3459 (WTF::ListDump::ListDump):
3460 (WTF::ListDump::dump):
3462 (WTF::MapDump::MapDump):
3463 (WTF::MapDump::dump):
3465 (WTF::sortedListDump):
3468 (WTF::sortedMapDump):
3469 * wtf/PrintStream.h:
3471 (WTF::PrintStream::print):
3473 2013-07-02 Filip Pizlo <fpizlo@apple.com>
3475 Unreviewed, fix 32-bit build.
3479 2013-07-02 Filip Pizlo <fpizlo@apple.com>
3481 fourthTier: FTL should use the equivalent of llvm opt -O2 by default
3482 https://bugs.webkit.org/show_bug.cgi?id=118311
3484 Reviewed by Mark Hahnenberg.
3486 * wtf/LLVMHeaders.h:
3488 2013-06-27 Filip Pizlo <fpizlo@apple.com>
3490 fourthTier: JSC's disassembly infrastructure should be able to disassemble the code that LLVM generates
3491 https://bugs.webkit.org/show_bug.cgi?id=118148
3493 Reviewed by Anders Carlsson.
3495 We now use LLVM for two things: disassembler and FTL. Separate out the question
3496 of whether we have LLVM (HAVE(LLVM)) from whether we want to use the LLVM
3497 disassembler (USE(LLVM_DISASSEMBLER)) and whether we enable the FTL
3500 Also move the cruft for including LLVM headers into WTF since now we use it in
3501 a bunch of places, not all related to FTL. There's no obvious place to put that
3502 file in JSC so I put it in WTF.
3504 * WTF.xcodeproj/project.pbxproj:
3505 * wtf/LLVMHeaders.h: Copied from Source/JavaScriptCore/ftl/FTLLLVMHeaders.h.
3508 2013-06-25 Filip Pizlo <fpizlo@apple.com>
3510 fourthTier: DFG should support switch_string
3511 https://bugs.webkit.org/show_bug.cgi?id=117967
3513 Reviewed by Sam Weinig.
3515 Make it possible to compare a RefPtr<StringImpl> and a StringImpl* without
3516 having to ref the StringImpl.
3518 * wtf/text/StringHash.h:
3519 (WTF::StringHash::equal):
3521 2013-06-24 Filip Pizlo <fpizlo@apple.com>
3523 fourthTier: Count external memory usage towards heap footprint
3524 https://bugs.webkit.org/show_bug.cgi?id=117948
3526 Reviewed by Geoffrey Garen.
3528 Expose some functionality needed for properly measuring StringImpl footprint.
3531 (WTF::weakCompareAndSwapSize):
3535 * wtf/text/StringImpl.h:
3536 (WTF::StringImpl::cost):
3538 (WTF::StringImpl::costDuringGC):
3539 (WTF::StringImpl::refCount):
3541 2013-06-23 Filip Pizlo <fpizlo@apple.com>
3543 fourthTier: DFG should optimize identifier string equality
3544 https://bugs.webkit.org/show_bug.cgi?id=117920
3546 Reviewed by Sam Weinig.
3548 Note that this ChangeLog was supposed to be committed in r151890.
3550 Expose the IsIdentifier bit to the JIT.
3552 * wtf/text/StringImpl.h:
3553 (WTF::StringImpl::flagIsIdentifier):
3555 2013-06-18 Filip Pizlo <fpizlo@apple.com>
3557 fourthTier: DFG should have switch_char
3558 https://bugs.webkit.org/show_bug.cgi?id=117710
3560 Reviewed by Michael Saboff.
3562 I wanted to be able to say stringImpl->at(index), and now I can!
3564 Also made it possible to convert a UChar to a utf8 CString without
3565 allocating a StringImpl.
3567 * wtf/text/StringImpl.cpp:
3568 (WTF::StringImpl::utf8Impl):
3570 (WTF::StringImpl::utf8ForCharacters):
3571 (WTF::StringImpl::utf8ForRange):
3572 * wtf/text/StringImpl.h:
3574 (WTF::StringImpl::at):
3575 (WTF::StringImpl::operator[]):
3577 2013-06-15 Filip Pizlo <fpizlo@apple.com>
3579 fourthTier: Add CFG simplification for Switch
3580 https://bugs.webkit.org/show_bug.cgi?id=117677
3582 Reviewed by Mark Hahnenberg.
3585 * wtf/text/StringImpl.h:
3587 2013-06-15 Filip Pizlo <fpizlo@apple.com>
3589 Printing a StringImpl* should really guard against NULL
3590 https://bugs.webkit.org/show_bug.cgi?id=117675
3592 Reviewed by Mark Hahnenberg.
3594 * wtf/PrintStream.cpp:
3595 (WTF::printInternal):
3597 2013-06-11 Filip Pizlo <fpizlo@apple.com>
3599 fourthTier: DFG should support op_in and it should use patching to make it fast
3600 https://bugs.webkit.org/show_bug.cgi?id=117385
3602 Reviewed by Geoffrey Garen.
3604 Now if you pass a null StringImpl* then something will still get printed instead
3605 of crashing. I figure that this is broadly useful for debug code, and I make use
3606 of it in the JSC portion of this patch.
3608 * wtf/PrintStream.cpp:
3609 (WTF::printInternal):
3611 2013-06-09 Filip Pizlo <fpizlo@apple.com>
3613 Unreviewed, fix build. On some compilers the automatic coercion from WTF::String to NSString*
3614 causes operator[] to appear ambiguous. One way around this is to make WTF::String behave like
3615 most of our other classes: at(unsigned) is&nb