blob: 4ddc48f54a91f809f22ad0a8982abb27e6be9859 [file] [log] [blame]
2013-10-12 Anders Carlsson <andersca@apple.com>
Change callOnMainThread to take an std::function
https://bugs.webkit.org/show_bug.cgi?id=122698
Reviewed by Darin Adler.
This will let us pass anything that can be converted to an std::function (including lambdas and
WTF::Function objects) to callOnMainThread.
* wtf/MainThread.cpp:
(WTF::callOnMainThread):
* wtf/MainThread.h:
2013-09-06 Jessica Pease <jessica_n_pease@apple.com>
Replace bounds checking ASSERTs with ASSERT_WITH_SECURITY_IMPLICATION
https://bugs.webkit.org/show_bug.cgi?id=120893
Reviewed by Darin Adler.
* wtf/BumpPointerAllocator.h:
(WTF::BumpPointerPool::ensureCapacity):
(WTF::BumpPointerPool::alloc):
(WTF::BumpPointerPool::ensureCapacityCrossPool):
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
* wtf/StringPrintStream.cpp:
(WTF::StringPrintStream::increaseSize):
* wtf/dtoa/utils.h:
(WTF::double_conversion::BufferReference::SubBufferReference):
* wtf/text/WTFString.cpp:
(WTF::String::fromUTF8):
2013-10-11 Darin Adler <darin@apple.com>
Change most call sites to call ICU directly instead of through WTF::Unicode
https://bugs.webkit.org/show_bug.cgi?id=122635
Reviewed by Alexey Proskuryakov.
* wtf/text/StringHash.h:
(WTF::CaseFoldingHash::foldCase): Use u_foldCase instead of WTF::Unicode::foldCase.
(WTF::CaseFoldingHash::hash): Added an overload for a StringImpl& because why not.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::lower): Use u_tolower rather than WTF::Unicode::toLower. Also added
an assertion to check that the lowercase version is also part of Latin-1. If this
is not guaranteed it would be good to know in a debug build at least. Use u_strToLower
rather than WTF::Unicode::toLower. Also removed #if USE(ICU_UNICODE) around the
locale-specific version.
(WTF::StringImpl::upper): Use u_toupper and u_strToUpper, as above.
(WTF::StringImpl::foldCase): Use u_tolower and u_strFoldCase, as above.
(WTF::equalIgnoringCase): Use u_foldCase instead of WTF::Unicode::foldCase.
(WTF::StringImpl::defaultWritingDirection): Use u_charDirection and UCharDirection
instead of WTF::Unicode::direction and WTF::Unicode::Direction.
* wtf/text/StringImpl.h:
(WTF::equalIgnoringCase): Use u_memcasecmp instead of WTF::Unicode::umemcasecmp.
(WTF::isSpaceOrNewline): Use u_charDirection instead of WTF::Unicode::direction.
* wtf/text/WTFString.h:
(WTF::String::defaultWritingDirection): Use UCharDirection instead of WTF::Unicode::Direction.
* wtf/unicode/icu/UnicodeIcu.h: Removed almost everything.
* wtf/unicode/wchar/UnicodeWchar.cpp: Tried to do the right thing in this file, but
I did not actually compile it. Also, the implementations here aren't really sufficient
to make WebKit work broadly. There are many things that just aren't working with this
implementation, such as parsing that uses u_charType to figure out which characters are valid.
(unorm_normalize): Added.
(u_charDirection): Added.
(u_charMirror): Added.
(u_charType): Added.
(u_getCombiningClass): Added.
(u_getIntPropertyValue): Added.
(u_memcasecmp): Added.
(convertWithFunction): Changed to work with ICU-style status code instead of error bool.
(u_strFoldCase): Added.
(u_strToLower): Added.
(u_strToUpper): Added.
* wtf/unicode/wchar/UnicodeWchar.h: Ditto. Later this file should just be named like the
real ICU headers so the code can include it the same way it would ICU. But that will be
in a future patch.
2013-10-11 Anders Carlsson <andersca@apple.com>
Remove gesture event support from WebCore
https://bugs.webkit.org/show_bug.cgi?id=122650
Reviewed by Ryosuke Niwa.
* wtf/FeatureDefines.h:
* wtf/nix/FeatureDefinesNix.h:
2013-10-09 Filip Pizlo <fpizlo@apple.com>
FTL: Soft-link LLVM as a workaround for LLVM's static initializers and exit-time destructors
https://bugs.webkit.org/show_bug.cgi?id=122566
Reviewed by Mark Rowe.
Remove all LLVM stuff from WTF since to get LLVM you need to soft-link and it's
entirely the responsibility of JSC to do that.
Also fixed an export goof that I found after fixing the weak thingy script in JSC.
* WTF.xcodeproj/project.pbxproj:
* wtf/LLVMHeaders.h: Removed.
* wtf/text/CString.h:
(WTF::CStringHash::hash):
2013-10-10 Mark Rowe <mrowe@apple.com>
<rdar://problem/13341666> WebKit should always build against an SDK.
Have all projects default to building against the OS X Internal SDK for the Production
configuration. For the Debug and Release configurations, look for UseInternalSDK.xcconfig
to determine whether the OS X Internal SDK should be used. If not, use the normal OS X SDK.
Reviewed by Dan Bernstein.
* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
2013-10-10 Hans Muller <hmuller@adobe.com>
[CSS Shapes] clampToUnsigned() should return unsigned, not int
https://bugs.webkit.org/show_bug.cgi?id=122601
Corrected the return type for clampToUnsigned() in MathExtras.h. It's now unsigned.
Reviewed by Andreas Kling.
* wtf/MathExtras.h:
(clampToUnsigned):
2013-10-08 Filip Pizlo <fpizlo@apple.com>
FTL should be able to do simple OSR exits using llvm.webkit.stackmap
https://bugs.webkit.org/show_bug.cgi?id=122538
Reviewed by Oliver Hunt.
* wtf/PrintStream.cpp:
(WTF::printInternal):
* wtf/PrintStream.h:
* wtf/RefCountedArray.h:
(WTF::RefCountedArray::byteSize):
2013-10-09 Michael Saboff <msaboff@apple.com>
Change to std::unique_ptr breaks wtf/DataLog.cpp when DATA_LOG_TO_FILE set to 1
https://bugs.webkit.org/show_bug.cgi?id=122557
Reviewed by Filip Pizlo.
Changed the leakPtr() to release().
* wtf/DataLog.cpp:
(WTF::initializeLogFileOnce):
2013-10-08 Tim Horton <timothy_horton@apple.com>
Turn threaded scrolling on for all Mac ports.
Rubber-stamped by Simon Fraser and Sam Weinig.
* wtf/FeatureDefines.h:
2013-10-06 Darin Adler <darin@apple.com>
Improve HashMap::add comment and other similar comments
https://bugs.webkit.org/show_bug.cgi?id=122432
Reviewed by Andreas Kling.
* wtf/HashCountedSet.h:
* wtf/HashMap.h:
* wtf/HashSet.h:
Updated comment wording. They were a bit old and out of date.
They also featured the word "interator".
2013-10-07 Darin Adler <darin@apple.com>
Make Vector::insert work for move-only types
https://bugs.webkit.org/show_bug.cgi?id=122429
Reviewed by Anders Carlsson.
* wtf/Vector.h:
(WTF::Vector::insert): Take an rvalue reference instead of a const reference.
(WTF::Vector::insertVector): Renamed to avoid overloading troubles, analogous
to what we did for appendVector.
2013-10-07 Anders Carlsson <andersca@apple.com>
Fix Windows build.
* wtf/StdLibExtras.h:
(std::make_unique):
2013-10-07 Roger Fong <roger_fong@apple.com>
Modify WTF makefile for x64 build.
https://bugs.webkit.org/show_bug.cgi?id=122467.
<rdar://problem/15169174>.
Reviewed by Brent Fulgham.
* WTF.vcxproj/WTF.make:
2013-10-07 Anders Carlsson <andersca@apple.com>
Remove passIn and passOut from HashTraits
https://bugs.webkit.org/show_bug.cgi?id=122452
Reviewed by Sam Weinig.
Change RefPtrHashMap to not use passOut (just like the regular HashMap) and get rid of the
passIn and passOut functions and related typedefs.
* wtf/HashTraits.h:
* wtf/RefPtrHashMap.h:
2013-10-06 Anders Carlsson <andersca@apple.com>
Add OVERRIDE and virtual where appropriate
https://bugs.webkit.org/show_bug.cgi?id=122439
Reviewed by Antti Koivisto.
* wtf/Compiler.h:
* wtf/FilePrintStream.h:
* wtf/StringPrintStream.h:
2013-10-06 Andreas Kling <akling@apple.com>
Range constructors should take a Document&.
<https://webkit.org/b/122435>
Reviewed by Sam Weinig.
Give Ref an assignment operator.
2013-10-05 Anders Carlsson <andersca@apple.com>
Clean up MessageQueue.h
https://bugs.webkit.org/show_bug.cgi?id=122392
Reviewed by Andreas Kling.
Make MessageQueue use std::unique_ptr and change findIf and removeIf to take const references.
* wtf/Deque.h:
Change findIf to take an rvalue reference.
* wtf/MessageQueue.h:
(WTF::::append):
(WTF::::appendAndKill):
(WTF::::appendAndCheckEmpty):
(WTF::::prepend):
(WTF::::removeIf):
2013-10-05 Anders Carlsson <andersca@apple.com>
Try to #define final to sealed when building with MSVC
https://bugs.webkit.org/show_bug.cgi?id=122386
Reviewed by Darin Adler.
* wtf/Compiler.h:
2013-10-05 Anders Carlsson <andersca@apple.com>
Remove createOwned
https://bugs.webkit.org/show_bug.cgi?id=122388
Reviewed by Darin Adler.
Since we're going with std::unique_ptr instead of OwnPtr, there's no need for makeOwned to exist.
Get rid of it and replace it with calls to std::make_unique.
* wtf/FilePrintStream.cpp:
(WTF::FilePrintStream::open):
* wtf/FilePrintStream.h:
* wtf/HashTable.h:
(WTF::::HashTable):
* wtf/ListHashSet.h:
(WTF::::ListHashSet):
* wtf/OwnPtr.h:
* wtf/Threading.cpp:
(WTF::compatEntryPoint):
(WTF::createThread):
* wtf/ThreadingPthreads.cpp:
(WTF::wtfThreadEntryPoint):
(WTF::createThreadInternal):
* wtf/unicode/Collator.h:
* wtf/unicode/CollatorDefault.cpp:
(WTF::Collator::userDefault):
* wtf/unicode/icu/CollatorICU.cpp:
(WTF::Collator::userDefault):
2013-10-05 Darin Adler <darin@apple.com>
Remove COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES) since it's required now
https://bugs.webkit.org/show_bug.cgi?id=122387
Reviewed by Anders Carlsson.
* wtf/RefPtr.h:
* wtf/RetainPtr.h:
* wtf/Vector.h:
* wtf/text/AtomicString.h:
* wtf/text/WTFString.h:
Take out conditionals.
2013-10-05 Darin Adler <darin@apple.com>
Add AtomicString::number and use it
https://bugs.webkit.org/show_bug.cgi?id=122384
Reviewed by Anders Carlsson.
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::number): Added.
* wtf/text/AtomicString.h: Ditto.
* wtf/text/IntegerToStringConversion.h: Simplify includes, renamed ConversionTrait to
IntegerToStringConversionTrait. Changed String version to use String since we no longer
need to use PassRefPtr to efficiently handle return values. Replaced UnsignedIntegerTrait
with std::make_unsigned. Added AtomicString support. Use nullptr instead of 0.
2013-10-05 Darin Adler <darin@apple.com>
Cut down on use of String::number
https://bugs.webkit.org/show_bug.cgi?id=122382
Reviewed by Anders Carlsson.
* wtf/DateMath.cpp:
(WTF::appendTwoDigitNumber): Added. Replaces twoDigitStringFromNumber, which returned a
String and also allocated a temporary string for any number 10 or higher.
(WTF::makeRFC2822DateString): Updated to use the new function.
2013-10-05 Anders Carlsson <andersca@apple.com>
Test the waters and begin using lambdas
https://bugs.webkit.org/show_bug.cgi?id=121809
Reviewed by Andreas Kling.
* wtf/ListDump.h:
(WTF::sortedListDump):
Use std::less instead of a custom lessThan function.
2013-10-04 Darin Adler <darin@apple.com>
text-transform: lowercase is not lang-dependent (Turkish languages : tr,az)
https://bugs.webkit.org/show_bug.cgi?id=21312
Reviewed by Ryosuke Niwa.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::upper): Removed an extra call that would unnecessarily reallocate
a StringImpl in the general non-ASCII case. Added an overload that takes a locale identifier.
(WTF::StringImpl::lower): Ditto.
* wtf/text/StringImpl.h: Ditto.
* wtf/text/WTFString.cpp:
(WTF::String::lower): Ditto.
(WTF::String::upper): Ditto.
* wtf/text/WTFString.h: Ditto. Also deleted the makeLower and makeUpper functions since they
offer no advantages over the lower and upper functions. Also added a constructor that takes
a RefPtr<StringImpl> with move construction to help.
2013-10-04 Brent Fulgham <bfulgham@apple.com>
Remove Qt definitions from Platform.h
https://bugs.webkit.org/show_bug.cgi?id=122349
Reviewed by Anders Carlsson.
* wtf/Platform.h: Remove unused PLATFORM(QT) stanzas from file.
2013-10-04 Brent Fulgham <bfulgham@apple.com>
[Win] Turn off FastMalloc on Windows
https://bugs.webkit.org/show_bug.cgi?id=122352
Reviewed by Darin Adler.
* wtf/Platform.h: Enable USE_SYSTEM_MALLOC when building on
Windows to stick to the MSVCRT allocator/deallocator.
2013-10-04 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Remove WTF smart pointers 'const_pointer_cast'
https://bugs.webkit.org/show_bug.cgi?id=122325
Reviewed by Darin Adler.
Removed WTF smart pointers 'const_pointer_cast' functions as:
- they were not used
- their implementation was wrong as they tried to cast to a different pointer type
* wtf/PassOwnPtr.h:
* wtf/PassRefPtr.h:
* wtf/RefPtr.h:
2013-10-04 Oliver Hunt <oliver@apple.com>
Support for-of syntax
https://bugs.webkit.org/show_bug.cgi?id=122339
Reviewed by Geoffrey Garen.
Update assertions and add a helper function to StringImpl
to save repeated unique or identifier calls.
* wtf/text/StringImpl.h:
(WTF::StringImpl::isIdentifierOrUnique):
(WTF::StringImpl::setIsIdentifier):
(WTF::StringImpl::setIsAtomic):
2013-10-02 Brent Fulgham <bfulgham@apple.com>
[Win] Update solutions and projects to support 64-bit build.
https://bugs.webkit.org/show_bug.cgi?id=122225
Reviewed by Anders Carlsson.
* WTF.vcxproj/WTF.submit.sln: Add x64 architecture targets.
* WTF.vcxproj/WTF.vcxproj: Correct path to config.h file.
* WTF.vcxproj/WTF.vcxproj.filters: Correct path to config.h file.
2013-10-02 Nadav Rotem <nrotem@apple.com>
Eliminate a branch in FastBitVector setAndCheck, make it vectorizable.
https://bugs.webkit.org/show_bug.cgi?id=122229
Reviewed by Geoffrey Garen.
The CPU is unlikely to predict the branch in setAndCheck. I changed the code to use conditional instructions.
* wtf/FastBitVector.h:
(WTF::FastBitVector::setAndCheck):
2013-10-02 Anders Carlsson <andersca@apple.com>
Remove Qt code from WTF
https://bugs.webkit.org/show_bug.cgi?id=122221
Reviewed by Antti Koivisto.
I'm keeping the PLATFORM(QT) defines in Platform.h for now so we can assess if there are any
Qt only features that we can remove later.
* WTF.pri: Removed.
* WTF.pro: Removed.
* wtf/Assertions.cpp:
* wtf/CurrentTime.cpp:
* wtf/DisallowCType.h:
* wtf/FastMalloc.cpp:
* wtf/FeatureDefines.h:
* wtf/qt/MainThreadQt.cpp: Removed.
* wtf/qt/StringQt.cpp: Removed.
* wtf/text/AtomicString.h:
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::~StringImpl):
* wtf/text/StringImpl.h:
* wtf/text/WTFString.cpp:
(WTF::String::format):
* wtf/text/WTFString.h:
2013-09-30 Sam Weinig <sam@webkit.org>
Remove support for DOMFileSystem
https://bugs.webkit.org/show_bug.cgi?id=122137
Reviewed by Anders Carlsson.
* wtf/FeatureDefines.h:
2013-09-30 Benjamin Poulain <benjamin@webkit.org>
Remove the code guarded by STYLE_SCOPED
https://bugs.webkit.org/show_bug.cgi?id=122123
Reviewed by Anders Carlsson.
* wtf/FeatureDefines.h:
2013-09-28 Mark Rowe <mrowe@apple.com>
Take Xcode's advice and enable some extra warnings.
Reviewed by Sam Weinig.
* Configurations/Base.xcconfig:
* WTF.xcodeproj/project.pbxproj:
2013-09-28 Mark Rowe <mrowe@apple.com>
<rdar://problem/15079224> WTF fails to build with newer versions of clang.
Reviewed by Sam Weinig.
* wtf/DateMath.cpp: Remove some unused constants.
* wtf/FastMalloc.cpp: #if some constants and functions that are unused in some configurations.
Remove a function that's unused on all platforms.
* wtf/TCSystemAlloc.cpp: Remove some unused constants.
(TCMalloc_SystemRelease): Remove an if whose body is never executed.
* wtf/dtoa.cpp: #if things such that storeInc is only defined when USE_LONG_LONG is undefined.
Remove an unused constant.
2013-09-27 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
[Nix] Updating Nix trunk files
https://bugs.webkit.org/show_bug.cgi?id=121752
Reviewed by Benjamin Poulain.
* wtf/nix/FeatureDefinesNix.h:
2013-09-06 Jer Noble <jer.noble@apple.com>
[Mac] Implement the media controls in JavaScript.
https://bugs.webkit.org/show_bug.cgi?id=120895
Reviewed by Dean Jackson.
Define and turn on ENABLE_MEDIA_CONTROLS_SCRIPT.
* wtf/FeatureDefines.h:
2013-09-27 Gustavo Noronha Silva <gns@gnome.org>
[GCC] Fix build with gcc < 4.8.1, which does not have is_trivially_destructible
https://bugs.webkit.org/show_bug.cgi?id=121999
Reviewed by Benjamin Poulain.
* wtf/StdLibExtras.h:
2013-09-26 Anders Carlsson <andersca@apple.com>
"Build fix".
We can't use std::move. Explicitly destroy the old value and then construct the new in place.
* wtf/HashTable.h:
2013-09-26 Anders Carlsson <andersca@apple.com>
Use the move assignment operator when reinserting values in the hash map
https://bugs.webkit.org/show_bug.cgi?id=122003
Reviewed by Alexey Proskuryakov.
Using the move assignment operator ensures that the existing values will be destroyed correctly.
* wtf/HashTable.h:
2013-09-26 Brent Fulgham <bfulgham@apple.com>
[Windows] Work around missing C++11 features of MSVC by providing an implementation for
std::is_trivially_destructible based on the existing std::has_trivial_destructor.
Rubber-stamped by Anders Carlsson.
* wtf/StdLibExtras.h: Add implementation for is_trivially_destructable for MSVC 2010 and prior.
2013-09-26 Anders Carlsson <andersca@apple.com>
Remove needsDestruction from vector and hash traits
https://bugs.webkit.org/show_bug.cgi?id=121983
Reviewed by Sam Weinig.
For Vector, use std::is_trivially_destructible to determine whether to call the destructor.
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.
Removing this does break the ability to store objects with non-trivial destructors in vectors and hash maps
and have their destructors not be called when removed, but we've never used this feature in WebKit so the extra
code complexity is not worth it.
* wtf/HashTable.h:
(WTF::::deallocateTable):
* wtf/HashTraits.h:
* wtf/Vector.h:
(WTF::VectorTypeOperations::destruct):
* wtf/VectorTraits.h:
2013-09-26 Anders Carlsson <andersca@apple.com>
Build fixes.
Fix a paste-o.
* wtf/StdLibExtras.h:
(std::make_unique):
2013-09-26 Anders Carlsson <andersca@apple.com>
Remove the hash table mover
https://bugs.webkit.org/show_bug.cgi?id=121980
Reviewed by Andreas Kling.
Use std::move instead.
* wtf/HashTable.h:
2013-09-26 Anders Carlsson <andersca@apple.com>
Change a couple of HashMap value types from OwnPtr to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=121973
Reviewed by Andreas Kling.
* wtf/RefPtrHashMap.h:
Add a missing std::forward.
* wtf/StdLibExtras.h:
(std::make_unique):
Add more overloads.
2013-09-26 Julien Brianceau <jbriance@cisco.com>
[Qt] Remove PassTraits.h from WTF.pro.
https://bugs.webkit.org/show_bug.cgi?id=121946
Reviewed by Andreas Kling.
* WTF.pro: Remove PassTraits.h as this file disappeared in r156298.
2013-09-25 Patrick Gansterer <paroga@webkit.org>
Fix compilation with new MSVC compiler for Windows CE
https://bugs.webkit.org/show_bug.cgi?id=121914
Reviewed by Darin Adler.
Remove code to support older Windows CE versions, since those old
versions do not support C+11, which is required in the meantime.
* wtf/Atomics.h:
* wtf/Platform.h:
2013-09-25 Anders Carlsson <andersca@apple.com>
Move KeyValuePairTraits inside HashMap
https://bugs.webkit.org/show_bug.cgi?id=121931
Reviewed by Sam Weinig.
Also rename the ValueType typedef to KeyValuePairType since it's always a key value pair.
* wtf/HashMap.h:
(WTF::HashMap::KeyValuePairTraits::isEmptyValue):
(WTF::HashMap::find):
(WTF::HashMap::contains):
2013-09-25 Anders Carlsson <andersca@apple.com>
Un-indent HashMap.h.
Rubber-stamped by Andreas Kling.
* wtf/HashMap.h:
2013-09-25 Anders Carlsson <andersca@apple.com>
Un-indent HashTraits.h.
Rubber-stamped by Andreas Kling.
* wtf/HashTraits.h:
2013-09-25 Patrick Gansterer <paroga@webkit.org>
Fix template deduction for CollatorDefault
* wtf/unicode/CollatorDefault.cpp:
(WTF::Collator::userDefault): Use nullptr instead of 0.
2013-09-24 Anders Carlsson <andersca@apple.com>
Remove encoder create functions
https://bugs.webkit.org/show_bug.cgi?id=121853
Reviewed by Sam Weinig.
Add a variadic version of createOwned.
* wtf/OwnPtr.h:
(WTF::createOwned):
2013-09-24 Mark Rowe <mrowe@apple.com>
<rdar://problem/14971518> WebKit should build against the Xcode default toolchain when targeting OS X 10.8
Reviewed by Dan Bernstein.
* Configurations/Base.xcconfig:
2013-09-23 Anders Carlsson <andersca@apple.com>
Remove WTF_USE_SCROLLBAR_PAINTER #define
https://bugs.webkit.org/show_bug.cgi?id=121819
Reviewed by Sam Weinig.
All our supported systems use the scrollbar painter now, so get rid of the #ifdef.
* wtf/Platform.h:
2013-09-23 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r156307.
http://trac.webkit.org/changeset/156307
https://bugs.webkit.org/show_bug.cgi?id=121817
Broke the build, and crashes the compiler (Requested by ap on
#webkit).
* wtf/ListDump.h:
(WTF::lessThan):
(WTF::sortedListDump):
2013-09-23 Anders Carlsson <andersca@apple.com>
Test the waters and begin using lambdas
https://bugs.webkit.org/show_bug.cgi?id=121809
Reviewed by Andreas Kling.
* wtf/ListDump.h:
(WTF::sortedListDump):
Use std::less instead of a custom lessThan function.
2013-09-23 Anders Carlsson <andersca@apple.com>
ListHashSet::removeLast should only remove one element.
* wtf/ListHashSet.h:
(WTF::ListHashSet::removeLast):
2013-09-23 Anders Carlsson <andersca@apple.com>
Add hash traits for std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=121807
Reviewed by Antti Koivisto.
Also, convert the thread map over to using std::unique_ptr instead of OwnPtr.
* wtf/HashMap.h:
Remove unnecessary typedefs and add missing calls to std::forward.
* wtf/HashTraits.h:
Add hash trait for std::unique_ptr.
* wtf/RefPtrHashMap.h:
Use std::add_lvalue_reference.
* wtf/ThreadingPthreads.cpp:
(WTF::establishIdentifierForPthreadHandle):
Change ThreadMap to be a hash map from ThreadIdentifier to std::unique_ptr<PthreadState>.
2013-09-23 Patrick Gansterer <paroga@webkit.org>
use NOMINMAX instead of #define min min
https://bugs.webkit.org/show_bug.cgi?id=73563
Reviewed by Brent Fulgham.
Use NOMINMAX instead of #define min/max as a cleaner
way of ensuring that Windows system header files don't
define min/max as macro in the first place.
* config.h:
2013-09-23 Anders Carlsson <andersca@apple.com>
Remove PassTraits.h
https://bugs.webkit.org/show_bug.cgi?id=121805
Reviewed by Andreas Kling.
We no longer need PassTraits.h, get rid of it.
* GNUmakefile.list.am:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/PassTraits.h: Removed.
2013-09-23 Anders Carlsson <andersca@apple.com>
ListHashSet should work with move-only types
https://bugs.webkit.org/show_bug.cgi?id=121802
Reviewed by Andreas Kling.
Add rvalue reference overloads and calls to std::forward and std::move where appropriate.
* wtf/ListHashSet.h:
(WTF::::removeFirst):
Implement this in terms of takeFirst.
(WTF::::takeFirst):
Look up the iterator before we move out the value so we won't break the hash invariant.
(WTF::::removeLast):
Implement this in terms of takeLast.
(WTF::::takeLast):
Look up the iterator before we move out the value so we won't break the hash invariant.
2013-09-23 Anders Carlsson <andersca@apple.com>
Clean up ListHashSet
https://bugs.webkit.org/show_bug.cgi?id=121797
Reviewed by Antti Koivisto.
* wtf/ListHashSet.h:
2013-09-23 Anders Carlsson <andersca@apple.com>
ListHashSet should use std::reverse_iterator for reverse iterators
https://bugs.webkit.org/show_bug.cgi?id=121795
Reviewed by Antti Koivisto.
Get rid of the custom reverse iterators and just use std::reverse_iterator instead.
* wtf/ListHashSet.h:
2013-09-23 Anders Carlsson <andersca@apple.com>
De-indent ListHashSet in preparation of more changes.
Rubber-stamped by Sam Weinig.
* wtf/ListHashSet.h:
2013-09-23 Patrick Gansterer <paroga@webkit.org>
Cleanup CMake files in WTF
https://bugs.webkit.org/show_bug.cgi?id=121761
Reviewed by Gyuyoung Kim.
Sort files and unify the style.
* wtf/CMakeLists.txt:
* wtf/PlatformEfl.cmake:
* wtf/PlatformGTK.cmake:
2013-09-22 Andreas Kling <akling@apple.com>
Give purity hints to compiler to avoid penalizing repeated calls to some functions.
<https://webkit.org/b/121744>
Reviewed by Darin Adler.
Added a PURE_FUNCTION macro. This is supported on GCC and Clang for now.
Marking a function pure means that the compiler's CSE pass is free to coalesce
multiple calls to this function because it has no globally observable side
effects beyond the first call.
2013-09-20 Anders Carlsson <andersca@apple.com>
Add an implementation of std::index_sequence from C++14
https://bugs.webkit.org/show_bug.cgi?id=121718
Reviewed by Ryosuke Niwa.
This will make it easier to do things like pack expansion of tuple elements.
* wtf/StdLibExtras.h:
2013-09-20 Allan Sandfeld Jensen <allan.jensen@digia.com>
Atomics.h does not build on MinGW
https://bugs.webkit.org/show_bug.cgi?id=121663
Reviewed by Darin Adler.
MinGW does not have _ReadWriteBarrier() intrinsic, but does have GCC
inline assembler, so use the GCC definitions instead of MSVC ones.
* wtf/Atomics.h:
(WTF::compilerFence):
2013-09-20 Patrick Gansterer <paroga@webkit.org>
[CMake] Use COMPILE_DEFINITIONS target property for setting BUILDING_* defines
https://bugs.webkit.org/show_bug.cgi?id=121672
Reviewed by Gyuyoung Kim.
Since the scope of add_definitions() is always a whole file, we need to use
target properties instead to set definitions only for specific targets.
* wtf/CMakeLists.txt:
2013-09-20 Patrick Gansterer <paroga@webkit.org>
Remove duplicated secondsPerDay variables
https://bugs.webkit.org/show_bug.cgi?id=121601
Reviewed by Andreas Kling.
Move secondsPerDay from the source into the header file
to make it accessible by other code too.
* wtf/DateMath.cpp:
* wtf/DateMath.h:
2013-09-19 Joseph Pecoraro <pecoraro@apple.com>
ASSERTs in isMainThread after USE(WEB_THREAD) MainThread changes
https://bugs.webkit.org/show_bug.cgi?id=121650
Reviewed by Benjamin Poulain.
* wtf/mac/MainThreadMac.mm:
(WTF::initializeMainThreadPlatform):
2013-09-19 Daniel Bates <dabates@apple.com>
[iOS] Define mainThreadEstablishedAsPthreadMain to be true in WTF::initializeMainThreadPlatform()
Reviewed by Joseph Pecoraro.
This change was inadvertently left out of <http://trac.webkit.org/changeset/155926>.
* wtf/mac/MainThreadMac.mm:
(WTF::initializeMainThreadPlatform):
2013-09-19 Sam Weinig <sam@webkit.org>
Remove OwnArrayPtr
https://bugs.webkit.org/show_bug.cgi?id=121612
Reviewed by Anders Carlsson.
* GNUmakefile.list.am:
* WTF.pro:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/Assertions.cpp:
* wtf/CMakeLists.txt:
* wtf/DateMath.h:
* wtf/FastBitVector.h:
* wtf/Forward.h:
* wtf/OwnArrayPtr.h: Removed.
* wtf/VectorTraits.h:
2013-09-19 Daniel Bates <dabates@apple.com>
Substitute return type void for bool in function declaration for WTF::initializeWebThread()
Reviewed by Joseph Pecoraro.
Make the declaration of WTF::initializeWebThread() match the function prototype
of its definition.
* wtf/MainThread.h:
2013-09-19 Andreas Kling <akling@apple.com>
Assume allocator success in Vector unless using try* functions.
<https://webkit.org/b/121629>
Reviewed by Anders Carlsson.
Turn some Vector::begin() null checking into assertions instead.
We have try* style functions for when an allocation request is so
large that it might actually fail. fastMalloc() will never return
null (it will just CRASH() instead.)
2013-09-18 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build correction.
* WTF.vcxproj/WTFGeneratedCommon.props: Export PLATFORMARCHITECTURE macro for use in
Makefiles and shell scripts.
* WTF.vcxproj/build-generated-files.sh: Output header search path to identify when the build
is confused about build architecture.
2013-09-18 Anders Carlsson <andersca@apple.com>
RefPtrHashMap should work with move only types
https://bugs.webkit.org/show_bug.cgi?id=121564
Reviewed by Andreas Kling.
Add the same rvalue references and std::forward calls that already exist in HashMap.
* wtf/RefPtrHashMap.h:
2013-09-18 Filip Pizlo <fpizlo@apple.com>
DFG should support Int52 for local variables
https://bugs.webkit.org/show_bug.cgi?id=121064
Reviewed by Oliver Hunt.
* wtf/PrintStream.h:
(WTF::ValueIgnoringContext::ValueIgnoringContext):
(WTF::ValueIgnoringContext::dump):
(WTF::ignoringContext):
2013-09-18 Andreas Kling <akling@apple.com>
Put constant CachedPower table in read-only memory.
<https://webkit.org/b/121546>
Reviewed by Anders Carlsson.
* wtf/dtoa/cached-powers.cc:
2013-09-18 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r156019 and r156020.
http://trac.webkit.org/changeset/156019
http://trac.webkit.org/changeset/156020
https://bugs.webkit.org/show_bug.cgi?id=121540
Broke tests (Requested by ap on #webkit).
* wtf/PrintStream.h:
2013-09-16 Filip Pizlo <fpizlo@apple.com>
DFG should support Int52 for local variables
https://bugs.webkit.org/show_bug.cgi?id=121064
Reviewed by Oliver Hunt.
* wtf/PrintStream.h:
(WTF::ValueIgnoringContext::ValueIgnoringContext):
(WTF::ValueIgnoringContext::dump):
(WTF::ignoringContext):
2013-09-17 Anders Carlsson <andersca@apple.com>
Stop explicitly using PassOwnPtr in WebCore/html
https://bugs.webkit.org/show_bug.cgi?id=121511
Reviewed by Andreas Kling.
Make operator= work work for different types of OwnPtrs.
* wtf/OwnPtr.h:
2013-09-17 Sam Weinig <sam@webkit.org>
Add make_unique and start using it
https://bugs.webkit.org/show_bug.cgi?id=121523
Reviewed by Anders Carlsson.
* wtf/StdLibExtras.h:
(std::make_unique):
Add temporary implementation of std::make_unique that we can use until our standard
libraries have support for it.
2013-09-17 Darin Adler <darin@apple.com>
Make SVGTransform::valueAsString use StringBuilder
https://bugs.webkit.org/show_bug.cgi?id=121498
Reviewed by Andreas Kling.
* wtf/text/StringBuilder.cpp: Added appendNumber functions corresponding to all remaining
String::number functions. If we find we don't need all of these we can delete them later,
but I don't want to give clients a reason to prefer less-efficient API to StringBuilder.
* wtf/text/StringBuilder.h: Ditto.
2013-09-16 Anders Carlsson <andersca@apple.com>
HashMap should work with move-only keys
https://bugs.webkit.org/show_bug.cgi?id=121310
Reviewed by Darin Adler.
Add extra overloads for add and set where the key is an rvalue reference, but not a
template parameter rvalue reference. This way we'll coerce the key parameter to have the expected
type instead of the passed in type, causing map.add(StringImpl::create("Hello"), 123) work when the
type of map is HashMap<String, unsigned>.
Also, sprinkle && and std::forward where appropriate.
* wtf/HashMap.h:
* wtf/HashTable.h:
2013-09-17 Sergio Martins <sergio.martins@kdab.com>
Fix Windows CE build on ARM.
https://bugs.webkit.org/show_bug.cgi?id=121490
Reviewed by Darin Adler.
* wtf/dtoa/utils.h:
2013-09-17 Mihnea Ovidenie <mihnea@adobe.com>
REGRESSION(r155910): WebKit nightly builds don't load any page
https://bugs.webkit.org/show_bug.cgi?id=121482
Reviewed by Andreas Kling.
Replaced C++ style comments with C style comments.
* wtf/Platform.h:
2013-09-16 Joseph Pecoraro <pecoraro@apple.com>
USE(WEB_THREAD): More explicit WebThread initialization
https://bugs.webkit.org/show_bug.cgi?id=121454
Reviewed by Benjamin Poulain.
Be more explicit when initializing WebThread only data.
* wtf/MainThread.h:
* wtf/MainThread.cpp:
(WTF::initializeWebThreadOnce):
(WTF::initializeWebThread):
Ensure one time initialization.
* wtf/mac/MainThreadMac.mm:
(WTF::initializeMainThreadPlatform):
(WTF::initializeWebThreadPlatform):
Move WebThread value initialization to its own function.
(WTF::isMainThread):
Remove no longer invalid assert if WebThread was not initialized.
2013-09-16 Benjamin Poulain <benjamin@webkit.org>
Fix WebKit1 build after r155910
Reviewed by Anders Carlsson.
* wtf/Platform.h: Some files in WebKit include system headers before
WTF headers, causing the macro to be defined twice. #undef the macro
to support that case.
2013-09-16 Benjamin Poulain <benjamin@webkit.org>
Disable OS X's unprefixed debug macro
https://bugs.webkit.org/show_bug.cgi?id=121460
Reviewed by Anders Carlsson.
* wtf/Platform.h: OS X defines a series of platform macros for debugging.
Some of them are really annoying because they use common names (e.g. check()).
Disable those macros so that we are not limited in how we name methods and functions.
2013-09-16 Anders Carlsson <andersca@apple.com>
MessageQueue should use a Deque of OwnPtrs
https://bugs.webkit.org/show_bug.cgi?id=121450
Reviewed by Andreas Kling.
* wtf/MessageQueue.h:
2013-09-16 Anders Carlsson <andersca@apple.com>
WTF::Deque should work with move only types
https://bugs.webkit.org/show_bug.cgi?id=121446
Reviewed by Andreas Kling.
* wtf/Deque.h:
Use std::move and std::forward where appropriate and get rid of the PassTraits include.
2013-09-16 Anders Carlsson <andersca@apple.com>
Change a couple of COMPILE_ASSERTs to static_assert
https://bugs.webkit.org/show_bug.cgi?id=121441
Reviewed by Andreas Kling.
* wtf/BloomFilter.h:
* wtf/PackedIntVector.h:
(WTF::PackedIntVector::PackedIntVector):
* wtf/StdLibExtras.h:
(WTF::bitwise_cast):
(WTF::safeCast):
(WTF::roundUpToMultipleOf):
* wtf/StringHasher.h:
(WTF::StringHasher::hashMemory):
* wtf/Vector.h:
* wtf/text/AtomicString.cpp:
* wtf/unicode/Unicode.h:
2013-09-15 Gustavo Noronha Silva <gns@gnome.org>
Unreviewed make distcheck fix.
* GNUmakefile.list.am:
2013-09-15 Patrick Gansterer <paroga@webkit.org>
Fix build with Visual Studio 2012 after r153764.
https://bugs.webkit.org/show_bug.cgi?id=121406
Reviewed by Brent Fulgham.
* wtf/MathExtras.h:
2013-09-15 Alberto Garcia <berto@igalia.com>
Unreviewed GTK gardening.
* GNUmakefile.list.am: remove FastAllocBase.h, this file disappeared
in r155251.
2013-09-15 Patrick Gansterer <paroga@webkit.org>
[WIN] Fix build without precompiled header after r155454.
* wtf/win/GDIObject.h: Added missing windows.h include.
2013-09-15 Andreas Kling <akling@apple.com>
Remove Ref(const T&) constructor.
<https://webkit.org/b/121384>
Reviewed by Anders Carlsson.
This constructor was added as a stopgap measure until we got better support
for move semantics in Vector.
* wtf/Ref.h:
2013-09-15 Andreas Kling <akling@apple.com>
Unreviewed, fix ridiculous bug in WeakPtr.
I made operator!() null check the pointer to the WeakReference. :|
Caught by plugins/destroy-on-setwindow.html on bots.
* wtf/WeakPtr.h:
(WTF::WeakPtr::operator!):
2013-09-14 Andreas Kling <akling@apple.com>
Get rid of ref-counting on RenderWidget.
<https://webkit.org/b/121357>
Reviewed by Darin Adler.
* wtf/WeakPtr.h:
(WTF::WeakPtr::operator!):
Add operator! to WeakPtr.
2013-09-14 Darin Adler <darin@apple.com>
Add NeverDestroyed::get
https://bugs.webkit.org/show_bug.cgi?id=121358
Reviewed by Anders Carlsson.
* wtf/NeverDestroyed.h: Removed code to make this non-copyable, since we also
use a macro to accomplish that.
(WTF::NeverDestroyed::get): Added. Useful in conjuction with auto to avoid
having to repeat the type when we want to put one of these into a reference.
2013-09-13 Anders Carlsson <andersca@apple.com>
Pick the correct overload when a const reference is passed to appendSlowCase.
https://bugs.webkit.org/show_bug.cgi?id=121326
Reviewed by Darin Adler.
* wtf/Vector.h:
(WTF::Vector::appendSlowCase):
Make sure that the pointer to the element isn't const so we'll pick the right expandCapacity overload.
2013-09-13 Anders Carlsson <andersca@apple.com>
Avoid a couple of zero-sized fastMalloc calls
https://bugs.webkit.org/show_bug.cgi?id=121333
Reviewed by Geoffrey Garen.
* wtf/text/StringBuffer.h:
(WTF::StringBuffer::StringBuffer):
Initialize m_data to null if m_length is null, and use Checked<size_t> to check for
overflow when multiplying m_length with the character size.
2013-09-13 Brent Fulgham <bfulgham@apple.com>
[Windows] Activate FastMalloc hardening
https://bugs.webkit.org/show_bug.cgi?id=121307
Reviewed by Oliver Hunt.
* wtf/FastMalloc.cpp:
(WTF::SLL_Next): Add workaround for MSVC compiler bug.
2013-09-13 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
OwnArrayPtr: Never allow implicit pointer conversion
https://bugs.webkit.org/show_bug.cgi?id=121291
Reviewed by Anders Carlsson.
We should never allow implicit pointer conversion in OwnArrayPtr
and remove its template copy constructor & template assignment operator, as:
- these methods are never used
- these methods are inappropriate to have in OwnArrayPtr as arrays do not
interact well with polymorphism.
* wtf/OwnArrayPtr.h:
2013-09-13 Allan Sandfeld Jensen <allan.jensen@digia.com>
Remove support for QXmlStream as the XML parser.
https://bugs.webkit.org/show_bug.cgi?id=121229
Reviewed by Andreas Kling.
Removed USE flags.
* wtf/Platform.h:
2013-09-12 Mark Hahnenberg <mhahnenberg@apple.com>
Bitmap's WordType should be a template parameter
https://bugs.webkit.org/show_bug.cgi?id=121238
Reviewed by Darin Adler.
The code is written as if it already is. We just need to lift it out of the class.
This simplifies code that wants to load, for example, a single byte rather than an
entire 32-bit word.
* wtf/Bitmap.h:
(WTF::Bitmap::Bitmap):
(WTF::Bitmap::get):
(WTF::Bitmap::set):
(WTF::Bitmap::testAndSet):
(WTF::Bitmap::testAndClear):
(WTF::Bitmap::concurrentTestAndSet):
(WTF::Bitmap::concurrentTestAndClear):
(WTF::Bitmap::clear):
(WTF::Bitmap::clearAll):
(WTF::Bitmap::nextPossiblyUnset):
(WTF::Bitmap::findRunOfZeros):
(WTF::Bitmap::count):
(WTF::Bitmap::isEmpty):
(WTF::Bitmap::isFull):
2013-09-12 Anders Carlsson <andersca@apple.com>
Add rudimentary support for move-only types as values in HashMap
https://bugs.webkit.org/show_bug.cgi?id=121226
Reviewed by Andreas Kling.
* wtf/HashMap.h:
Change a bunch of functions to so they can take both rvalue and lvalue references and use std::forward.
* wtf/HashTraits.h:
(WTF::KeyValuePair::KeyValuePair):
Change constructors to accept both lvalues and rvalues.
2013-09-12 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Remove home-brewed nullptr
https://bugs.webkit.org/show_bug.cgi?id=119624
Reviewed by Anders Carlsson.
The standard C++11 nullptr and std::nullptr_t type should be used now.
* GNUmakefile.list.am:
* WTF.pro:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/NullPtr.cpp: Removed.
* wtf/NullPtr.h: Removed.
* wtf/OwnArrayPtr.h:
* wtf/OwnPtr.h:
* wtf/PassOwnPtr.h:
* wtf/PassRefPtr.h:
* wtf/RetainPtr.h:
* wtf/win/GDIObject.h:
2013-09-11 Anders Carlsson <andersca@apple.com>
Use the new C++11 function declaration syntax throughout our hash collection classes
https://bugs.webkit.org/show_bug.cgi?id=121195
Reviewed by Andreas Kling.
* wtf/HashMap.h:
* wtf/HashSet.h:
* wtf/HashTable.h:
2013-09-11 Anders Carlsson <andersca@apple.com>
Add HashSet::take
https://bugs.webkit.org/show_bug.cgi?id=121192
Reviewed by Darin Adler.
This is mostly done to see if we can use the new C++11 function declaration syntax,
and for parity with HashMap::take.
* wtf/HashMap.h:
* wtf/HashSet.h:
2013-09-11 Anders Carlsson <andersca@apple.com>
HashSet should work with move only types
https://bugs.webkit.org/show_bug.cgi?id=121188
Reviewed by Geoffrey Garen.
* wtf/HashSet.h:
(WTF::HashSet::add):
Add a new rvalue reference overload and use std::move when calling HashTable::add.
* wtf/HashTable.h:
(WTF::IdentityHashTranslator::translate):
Change this to take an rvalue reference for the value so we can invoke the move assignment operator.
(WTF::HashTable::add):
Call the add member function template, using std::move to move the value.
(WTF::HashTable::add):
Add std::forward so we'll potentially move extra.
2013-09-11 Anders Carlsson <andersca@apple.com>
Avoid copying a hash table bucket when inserting causes a rehash
https://bugs.webkit.org/show_bug.cgi?id=121185
Reviewed by Darin Adler.
Allow rehashing to track a hash bucket and return the new pointer to it, thus avoiding
having to do a copy of a hash table bucket as well as an extra hash lookup.
* wtf/HashTable.h:
2013-09-11 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build fix.
* wtf/win/GDIObject.h:
(WTF::GDIObject::GDIObject): I forgot to check in as part of
r155557 by using webkit-patch land in a sub-directory!
2013-09-11 Oliver Hunt <oliver@apple.com>
Partial Information Leakage in Hash Table implementations (PrivateName)
https://bugs.webkit.org/show_bug.cgi?id=120663
Reviewed by Michael Saboff.
Unique strings now just generate a completely random value as their
hash, rather than using their this pointer.
* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl):
2013-09-11 Brent Fulgham <bfulgham@apple.com>
Unreviewed build correction.
* WTF.vcxproj/copy-files.cmd: Touch file to force WTFGenerated
build to copy updated GDIObject.h header file on build machines.
2013-09-11 Anders Carlsson <andersca@apple.com>
Vector::append doesn't work if element type has overloaded operator&
https://bugs.webkit.org/show_bug.cgi?id=121175
Reviewed by Brent Fulgham.
Use std::addressof to get the address of the given object.
* wtf/Vector.h:
(WTF::::appendSlowCase):
(WTF::::uncheckedAppend):
2013-09-11 Anders Carlsson <andersca@apple.com>
Vector::append doesn't work if element type has overloaded operator&
https://bugs.webkit.org/show_bug.cgi?id=121175
Reviewed by Brent Fulgham.
Use std::addressof to get the address of the given object.
* wtf/Vector.h:
(WTF::::appendSlowCase):
(WTF::::uncheckedAppend):
2013-09-11 Anders Carlsson <andersca@apple.com>
VectorBuffer::swap doesn't need to use std::swap_ranges
https://bugs.webkit.org/show_bug.cgi?id=121164
Reviewed by Darin Adler.
There's a std::swap overload for swapping arrays, just use it instead.
* wtf/Vector.h:
(WTF::VectorBuffer::swap):
2013-09-11 Anders Carlsson <andersca@apple.com>
Implement Vector::append for move-only types
https://bugs.webkit.org/show_bug.cgi?id=120805
Reviewed by Andreas Kling.
* wtf/Vector.h:
(WTF::::expandCapacity):
Remove const from the pointer passed to expandCapacity, it can be non-const if we're moving.
(WTF::::append):
Change append to take U&& and use std::forward when constructing the element and when passing
the element along to appendSlowCase if that's necessary.
(WTF::::appendSlowCase):
Use std::forward.
(WTF::::uncheckedAppend):
Rename val to value.
2013-09-11 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
WTF::OwnPtr should behave similarly with the rest of WTF smart pointers
https://bugs.webkit.org/show_bug.cgi?id=120773
Reviewed by Anders Carlsson.
Before the change OwnPtr could take either the pointer type or the pointed-to type, which was bad
for the following reasons:
- It distinguished OwnPtr behaviour from other WTF smart pointer classes behaviour (so it was confusing for the Client).
- It was potential error-prone as it actually modified the type given by the Client in opaque way.
* wtf/OwnPtr.h:
* wtf/PassOwnPtr.h:
2013-09-11 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
OwnPtr: Use copy/move-and-swap for assignment operators
https://bugs.webkit.org/show_bug.cgi?id=121154
Reviewed by Anders Carlsson.
Rationals:
- decrease of repeated code
- consistency with RefPtr
* wtf/OwnPtr.h:
(WTF::=):
2013-09-11 Patrick Gansterer <paroga@webkit.org>
[CMake] Split out generic Windows files into its own file
https://bugs.webkit.org/show_bug.cgi?id=119514
Reviewed by Gyuyoung Kim.
This allows us to add smaller CMakeLists.txt files when
adding additional Windows ports.
* wtf/PlatformWin.cmake: Renamed from Source/WTF/wtf/PlatformWinCE.cmake.
2013-09-10 Daniel Bates <dabates@apple.com>
[iOS] Upstream text autosizing
https://bugs.webkit.org/show_bug.cgi?id=121111
Reviewed by Andy Estes and Sam Weinig.
Define iOS text autosizing to be enabled on iOS unless otherwise defined.
* wtf/FeatureDefines.h:
2013-09-10 Anders Carlsson <andersca@apple.com>
Remove wtf/Alignment.h
https://bugs.webkit.org/show_bug.cgi?id=121077
Reviewed by Andreas Kling.
* GNUmakefile.list.am:
* WTF.pro:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/Alignment.h: Removed.
* wtf/CMakeLists.txt:
* wtf/text/ASCIIFastPath.h:
2013-09-10 Anders Carlsson <andersca@apple.com>
More WTF/Alignment.h removal
https://bugs.webkit.org/show_bug.cgi?id=121125
Reviewed by Andreas Kling.
* wtf/Alignment.h:
* wtf/Vector.h:
(WTF::VectorBuffer::swap):
(WTF::VectorBuffer::inlineBuffer):
* wtf/text/ASCIIFastPath.h:
(WTF::isAlignedTo):
(WTF::isAlignedToMachineWord):
2013-09-10 Brent Fulgham <bfulgham@apple.com>
Unreviewed build fix after r155476.
* GNUmakefile.list.am: Remove reference to deleted OwnPtrWin.cpp file.
* WTF.pro: Ditto.
* wtf/CMakeLists.txt: Ditto.
2013-09-10 Brent Fulgham <bfulgham@apple.com>
[Windows] Create SharedGDIObject Class Template
https://bugs.webkit.org/show_bug.cgi?id=121037
Reviewed by Anders Carlsson.
Now that the SharedGDIObject class exists we can get rid of
the Windows-specific code in OwnPtr.
* WTF.vcxproj/WTF.vcxproj: Remove OwnPtrWin.cpp.
* WTF.vcxproj/WTF.vcxproj.filters: Ditto.
* wtf/OwnPtrCommon.h:
(WTF::deleteOwnedPtr): Remove Windows declarations that
are no longer needed.
* wtf/win/GDIObject.h:
(WTF::GDIObject::get): Change to 'const' to match
signature (and use cases) elsewhere in the code base for
our smart pointer classes.
* wtf/win/OwnPtrWin.cpp: Removed.
2013-09-10 Anders Carlsson <andersca@apple.com>
Remove more uses of WTF::AlignedBuffer
https://bugs.webkit.org/show_bug.cgi?id=121119
Reviewed by Andreas Kling.
* wtf/HashTable.h:
* wtf/SizeLimits.cpp:
2013-09-10 Anders Carlsson <andersca@apple.com>
Clean up wtf/Noncopyable.h
https://bugs.webkit.org/show_bug.cgi?id=121115
Reviewed by Darin Adler.
Use std::aligned_storage instead of WTF::AlignedBuffer.
* wtf/NeverDestroyed.h:
(WTF::NeverDestroyed::NeverDestroyed):
2013-09-09 Brent Fulgham <bfulgham@apple.com>
[Windows] Change from using OwnPtr<GDI Stuff> to new GDIObject template.
https://bugs.webkit.org/show_bug.cgi?id=120778
Reviewed by Anders Carlsson.
* WTF.vcxproj/WTF.vcxproj: Add new GDIObject header file.
* WTF.vcxproj/WTF.vcxproj.filters: Ditto.
* WTF.vcxproj/copy-files.cmd: Copy new header file.
* wtf/OwnPtrCommon.h: Remove some GDI specializations.
* wtf/win/GDIObject.h: Added.
(WTF::GDIObject::GDIObject):
(WTF::GDIObject::~GDIObject):
(WTF::GDIObject::get):
(WTF::GDIObject::operator!):
(WTF::GDIObject::operator UnspecifiedBoolType):
(WTF::GDIObject::operator=):
(WTF::GDIObject::swap):
(WTF::::clear):
(WTF::::leak):
(WTF::::GDIObject):
(WTF::=):
(WTF::adoptGDIObject):
(WTF::swap):
(WTF::T):
(WTF::HDC):
* wtf/win/OwnPtrWin.cpp:
(WTF::deleteOwnedPtr): Remove some GDI specializations.
2013-09-09 Anders Carlsson <andersca@apple.com>
Introduce WTF::createOwned
https://bugs.webkit.org/show_bug.cgi?id=121059
Reviewed by Andreas Kling.
WTF::createOwned is a function template that does adoptPtr + new in a single function call,
with all the arguments being perfectly forwarded thanks to C++11.
Being forward-looking, createOwned returns an OwnPtr rather than a PassOwnPtr since the plan is
to get rid of PassOwnPtr and just use std::move instead.
* wtf/FilePrintStream.cpp:
* wtf/FilePrintStream.h:
* wtf/HashTable.h:
* wtf/ListHashSet.h:
* wtf/OwnPtr.h:
(WTF::OwnPtr::OwnPtr):
(WTF::createOwned):
(WTF::createThread):
(WTF::establishIdentifierForPthreadHandle):
(WTF::createThreadInternal):
(WTF::Collator::userDefault):
(WTF::Collator::userDefault):
2013-09-09 Anders Carlsson <andersca@apple.com>
Remove wtf/TypeTraits.h
https://bugs.webkit.org/show_bug.cgi?id=121047
Reviewed by Darin Adler.
* GNUmakefile.list.am:
* WTF.pro:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/TypeTraits.cpp: Removed.
* wtf/TypeTraits.h: Removed.
* wtf/VectorTraits.h:
2013-09-09 Luciano Wolf <luciano.wolf@openbossa.org>
Nix upstreaming - Adding stubs and Nix specific platform files
https://bugs.webkit.org/show_bug.cgi?id=118358
Reviewed by Benjamin Poulain.
Basically adding all files that have "Nix" in their names and
are related to WebCore module.
* wtf/nix/FeatureDefinesNix.h: Added.
* wtf/nix/PlatformNix.h: Added.
2013-09-08 Anders Carlsson <andersca@apple.com>
Begin moving off of TypeTraits.h
https://bugs.webkit.org/show_bug.cgi?id=121006
Reviewed by Darin Adler.
The C++11 has its own type traits implementation that is more complete and handles corner cases better
since it ties into the compiler. Begin switching uses of WTF type traits to STL type traits.
* wtf/CheckedArithmetic.h:
* wtf/HashTraits.h:
* wtf/NeverDestroyed.h:
* wtf/OwnPtr.h:
* wtf/PassOwnPtr.h:
(WTF::adoptPtr):
* wtf/RetainPtr.h:
2013-09-09 Julien Brianceau <jbriance@cisco.com>
[Qt] Remove FastAllocBase.h from WTF.pro.
https://bugs.webkit.org/show_bug.cgi?id=121024
Reviewed by Jocelyn Turcotte.
* WTF.pro: Remove FastAllocBase.h as this file disappeared in r155251.
2013-09-08 Darin Adler <darin@apple.com>
Deprecate AdoptCF and AdoptNS (on all platforms except iOS for now)
https://bugs.webkit.org/show_bug.cgi?id=121017
Reviewed by Andreas Kling.
* wtf/RetainPtr.h: Use the preprocessor to rename AdoptCF and AdoptNS
to DeprecatedAdoptCF and DeprecatedAdoptNS on all platforms except
for iOS. Also removed an unneeded explicit conversion in the retainPtr
function. Also re-sorted the using lines at the end of the file.
2013-09-08 Anders Carlsson <andersca@apple.com>
Move WTF::notFound to Vector.h and delete NotFound.h
https://bugs.webkit.org/show_bug.cgi?id=120990
Reviewed by Sam Weinig.
* GNUmakefile.list.am:
* WTF.pro:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/NotFound.h: Removed.
* wtf/Vector.h:
2013-09-07 David Kilzer <ddkilzer@apple.com>
gtest fails to build due to integer type mismatch in WTF::insertIntoBoundedVector()
<http://webkit.org/b/120983>
Reviewed by Dan Bernstein.
Fixes the following build failure:
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]
for (unsigned i = size; i-- > index + 1;)
~ ^~~~
* wtf/StdLibExtras.h:
(WTF::insertIntoBoundedVector): Use size_t instead of unsigned
as for loop index variable.
2013-09-07 Anders Carlsson <andersca@apple.com>
Remove NonCopyableSort.h from WTF
https://bugs.webkit.org/show_bug.cgi?id=120984
Reviewed by Andreas Kling.
std::sort as defined by C++11 moves elements when possible, so there's no need for nonCopyableSort anymore.
* GNUmakefile.list.am:
* WTF.pro:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/NonCopyingSort.h: Removed.
2013-09-07 Anders Carlsson <andersca@apple.com>
Get rid of PassOwnArrayPtr
https://bugs.webkit.org/show_bug.cgi?id=120964
Reviewed by Andreas Kling.
Make OwnArrayPtr a proper move-only type and get rid of PassOwnArrayPtr.
Ultimately I'd like to get rid of OwnArrayPtr as well and just have it be a specialization
of OwnPtr<T[]>, but this is a step in the right direction.
* GNUmakefile.list.am:
* WTF.pro:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/Assertions.cpp:
* wtf/CMakeLists.txt:
* wtf/DateMath.h:
* wtf/FastBitVector.h:
* wtf/Forward.h:
* wtf/OwnArrayPtr.h:
* wtf/PassOwnArrayPtr.h: Removed.
2013-09-07 Anders Carlsson <andersca@apple.com>
VectorMover should use std::move
https://bugs.webkit.org/show_bug.cgi?id=120959
Reviewed by Geoffrey Garen.
This lets the compiler use move constructors when moving data, which can be a performance improvement.
If the vector element type isn't movable it will be copied instead.
* wtf/Vector.h:
(WTF::VectorTypeOperations::move):
(WTF::VectorTypeOperations::moveOverlapping):
2013-09-07 Anders Carlsson <andersca@apple.com>
Get rid of FastAllocBase.h
https://bugs.webkit.org/show_bug.cgi?id=120952
Reviewed by Antti Koivisto.
FastAllocBase.h now only contains the WTF_MAKE_FAST_ALLOCATED macro.
Move that macro to FastMalloc.h instead and remove FastAllocBase.h.
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/DeferrableRefCounted.h:
* wtf/FastAllocBase.h: Removed.
* wtf/FastMalloc.h:
* wtf/HashSet.h:
* wtf/MediaTime.h:
* wtf/PrintStream.h:
* wtf/RefCounted.h:
* wtf/RefPtr.h:
* wtf/ThreadingPrimitives.h:
* wtf/Vector.h:
* wtf/gobject/GMutexLocker.h:
* wtf/unicode/Collator.h:
2013-09-06 Anders Carlsson <andersca@apple.com>
Add a new smart pointer type for fastMalloc'ed memory
https://bugs.webkit.org/show_bug.cgi?id=120911
Reviewed by Andreas Kling.
Due to an oversight on my part, Vector::releaseBuffer() currently returns an OwnPtr
which means that its data will be freed with operator delete instead of fastFree.
Fix this by introducing a new MllocPtr smart pointer class and change Vector::releaseBuffer() to return it instead.
* WTF.pro:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/FastAllocBase.h:
* wtf/MallocPtr.h: Added.
* wtf/Vector.h:
* wtf/text/StringBuffer.h:
* wtf/text/StringImpl.h:
2013-09-06 Andreas Kling <akling@apple.com>
Remove old workaround for Nokia's Harmattan GCC on Qt/ARM.
<https://webkit.org/b/37253>
Reviewed by Anders Carlsson.
Apparently this was a workaround for GCC getting stuck in an infinite loop
when building for ARM in a Nokia SDK over 2 years ago.
I think it's safe to remove this now, but if I'm wrong, and you're reading
this ChangeLog wondering why I did this to you, feel free to put it back in.
* wtf/PassRefPtr.h:
(WTF::refIfNotNull):
(WTF::derefIfNotNull):
2013-09-06 Andreas Kling <akling@apple.com>
Remove unused RefPtr(PlacementNewAdopt) constructor.
<https://webkit.org/b/120914>
Reviewed by Anders Carlsson.
* wtf/RefPtr.h:
2013-09-06 David Kilzer <ddkilzer@apple.com>
BUILD FIX (r155171): INSTALL_PATH_PREFIX should no longer be used beneath BUILT_PRODUCTS_DIR in HEADER_SEARCH_PATHS for iOS
* Configurations/Base.xcconfig:
(HEADER_SEARCH_PATHS): Change
$(BUILT_PRODUCTS_DIR)/$(INSTALL_PATH_PREFIX)/usr/local/include to
$(BUILT_PRODUCTS_DIR)/usr/local/include.
2013-09-06 Anders Carlsson <andersca@apple.com>
Remove fastNew/fastDelete
https://bugs.webkit.org/show_bug.cgi?id=120904
Reviewed by Andreas Kling.
Remove the various variants of fastNew and fastDelete.
* wtf/FastAllocBase.h:
2013-09-06 Alberto Garcia <berto@igalia.com>
[GTK] GlibUtilities: getCurrentExecutablePath() does not compile on GNU/Hurd
https://bugs.webkit.org/show_bug.cgi?id=120793
Reviewed by Gustavo Noronha Silva.
Original patch by Svante Signell <svante.signell@telia.com>.
PATH_MAX is not defined in GNU/Hurd, this patch adds a dummy
implementation to make it compile.
* wtf/gobject/GlibUtilities.cpp:
(getCurrentExecutablePath):
2013-09-05 Dan Bernstein <mitz@apple.com>
INSTALL_PATH_PREFIX is used even when not installing
https://bugs.webkit.org/show_bug.cgi?id=120810
Reviewed by Andy Estes.
* Configurations/CopyWTFHeaders.xcconfig: Removed INSTALL_PATH_PREFIX from
the definition of PRIVATE_HEADERS_FOLDER_PATH. Also removed the leading
slash, because the Xcode definition of this build setting is relative.
* WTF.xcodeproj/project.pbxproj: Prepend INSTALL_PATH_PREFIX here when installing.
2013-09-05 Anders Carlsson <andersca@apple.com>
Fix build with older versions of clang from Xcode.
* wtf/Compiler.h:
2013-09-05 Anders Carlsson <andersca@apple.com>
Make Vector::uncheckedAppend work with move-only types
https://bugs.webkit.org/show_bug.cgi?id=120799
Reviewed by Andreas Kling.
* wtf/Vector.h:
(WTF::::uncheckedAppend):
Use std::forward to invoke the move constructor when possible.
2013-09-05 Anders Carlsson <andersca@apple.com>
Add COMPILER_SUPPORTS(CXX_AUTO_TYPE) and #error if it's 0
https://bugs.webkit.org/show_bug.cgi?id=120794
Reviewed by Andreas Kling.
People have already begun using C++11 auto in WebCore, so let's make it a prerequisite.
* wtf/Compiler.h:
2013-09-05 Anders Carlsson <andersca@apple.com>
Clean up wtf/Compiler.h
https://bugs.webkit.org/show_bug.cgi?id=120790
Reviewed by Andreas Kling.
- Get rid of the CLANG_PRAGMA define, it's not used anywhere.
- Remove a workaround for a bug in the version of clang that came with Xcode 4.2.
- Replace WTF_COMPILER_SUPPORTS_CXX_FINAL_CONTROL with a compiler quirk for versions of clang
that have a buggy final implementation and fix a bug in the macro where final would be disabled
for versions of clang where __clang_minor__ is less than 2, regardless of the major version.
- Fail if someone tries to compile the WebKit stack with a compiler that doesn't support rvalue
references or static_assert.
* wtf/Compiler.h:
2013-09-05 Anders Carlsson <andersca@apple.com>
Change StringBuffer back to not use an OwnPtr in an attempt to fix ports.
* wtf/text/StringBuffer.h:
2013-09-04 Anders Carlsson <andersca@apple.com>
Vector::releaseBuffer should return an OwnPtr
https://bugs.webkit.org/show_bug.cgi?id=120718
Reviewed by Andreas Kling.
Change Vector::releaseBuffer() to return an OwnPtr. I intentionally chose
to use an OwnPtr over a PassOwnPtr since we're trying to move away from PassOwnPtr objects.
Fix fallout from this change by adopting OwnPtr/PassOwnPtr in StringBuffer and the two StringImpl
constructors that adopt the passed in pointer.
* wtf/Vector.h:
* wtf/text/StringBuffer.h:
* wtf/text/StringImpl.h:
2013-09-05 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Remove String(RefPtr<StringImpl>) constructor
https://bugs.webkit.org/show_bug.cgi?id=120767
Reviewed by Anders Carlsson.
The String(RefPtr<StringImpl>) constructor should be removed for the following reasons:
- It almost does not have clients, so it is unneeded.
- RefPtr should never be passed by value
* wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::shrinkToFit):
* wtf/text/WTFString.h:
2013-09-05 Jaehun Lim <ljaehun.lim@samsung.com>
Unreviewed. Fix build after r155083
Source/WTF/wtf/Vector.h:1210:48: error: ‘>>’ should be ‘> >’ within a nested template argument list
* wtf/Vector.h: Add missing space.
2013-09-04 Mark Rowe <mrowe@apple.com>
Fix AutodrainedPool.h to compile without errors under ARC.
Rubber-stamped by Anders Carlsson.
* wtf/AutodrainedPool.h: Some versions of Clang complain about any use of NSAutoreleasePool under ARC.
Change the type of the member variable to id to work around this. Since the implementation file is compiled
under manual reference counting, everything will work fine.
2013-09-04 Anders Carlsson <andersca@apple.com>
De-indent Vector.h.
Rubber-stamped by Andreas Kling.
I'm cleaning up Vector and making it work with move-only objects, and the namespace WTF
indentation is driving me crazy.
* wtf/Vector.h:
2013-09-03 Filip Pizlo <fpizlo@apple.com>
CodeBlock memory cost reporting should be rationalized
https://bugs.webkit.org/show_bug.cgi?id=120615
Reviewed by Darin Adler.
* wtf/RefCountedArray.h:
(WTF::RefCountedArray::refCount):
2013-09-03 Enrica Casucci <enrica@apple.com>
Follow up to http://trac.webkit.org/changeset/155014
Reviewed by Alexey Proskuryakov.
In the r155014 I renamed hasLineBreakingPropertyComplexContext
to requiresComplexContextForWordBreaking but forgot to
make the same change in UnicodeWchar.h.
* wtf/unicode/wchar/UnicodeWchar.cpp:
(WTF::Unicode::requiresComplexContextForWordBreaking):
* wtf/unicode/wchar/UnicodeWchar.h:
2013-09-03 Enrica Casucci <enrica@apple.com>
Can't select Katakana word by double-clicking.
<rdar://problem/14654926>
Reviewed by Alexey Proskuryakov and Ryosuke Niwa.
For some languages, like Japanese we need
to use more context for word breaking.
I've renamed the function to better reflect its use
and remove the unused hasLineBreakingPropertyComplexContextOrIdeographic.
* wtf/unicode/icu/UnicodeIcu.h:
(WTF::Unicode::requiresComplexContextForWordBreaking):
2013-09-03 Andreas Kling <akling@apple.com>
Support Vector<Ref<T>>.
<https://webkit.org/b/120637>
Reviewed by Antti Koivisto.
Add a Ref(const T&) constructor to enable Vector<Ref<T>>. This looks a bit awkward
but is necessary for Vector::append(const T&) to find a constructor.
An alternative would be to add something like std::vector::emplace_back, but I can't
think of a good name for that, and it'd be nice if append() would "just work."
Also add operator->(). I initially excluded this because I felt it made for
unsafe-looking code. Things quickly got out of hand with .get() everywhere though.
IMO -> looks OK as long as it's only used on the first link in a dereference chain,
as that variable and its type will be "in context."
* wtf/Ref.h:
(WTF::Ref::Ref):
(WTF::Ref::~Ref):
(WTF::Ref::operator->):
(WTF::Ref::get):
* wtf/VectorTraits.h:
Add simple traits for Ref<T> so it can be moved around freely by Vector.
2013-09-03 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Check WTF::VectorFiller template argument type size in compile time
https://bugs.webkit.org/show_bug.cgi?id=120631
Reviewed by Darin Adler.
The template argument's type size in WTF::VectorFiller 'memset' specialization
should be checked during compilation rather than in runtime.
* wtf/Vector.h:
2013-09-02 Darin Adler <darin@apple.com>
Cut down on double hashing and code needlessly using hash table iterators
https://bugs.webkit.org/show_bug.cgi?id=120611
Reviewed by Andreas Kling.
Double hashing is common in code that needs to combine a remove with some
action to only be done if the code is removed. The only way to avoid it is
to write code using find and a hash table iterator. To help with this, add
a boolean return value to remove functions to indicate if anything was removed.
Double hashing also happens in code that does a get followed by a remove.
The take function is helpful in this case. To help with this, add a takeFirst
funciton to ListHashSet.
* wtf/HashCountedSet.h:
(WTF::HashCountedSet::removeAll): Added a boolean return value, analogous to the one
that the HashCountedSet::remove function already has.
* wtf/HashMap.h:
(WTF::HashMap::remove): Added a boolean return value, true if something was removed.
* wtf/HashSet.h:
(WTF::HashSet::remove): Ditto.
* wtf/RefPtrHashMap.h:
(WTF::RefPtrHashMap::remove): Ditto.
* wtf/ListHashSet.h:
(WTF::ListHashSet::takeFirst): Added.
(WTF::ListHashSet::takeLast): Added.
(WTF::ListHashSet::remove): Added a boolean return value, true if something was removed.
* wtf/WTFThreadData.h:
(JSC::IdentifierTable::remove): Use the new remove return value to get rid of most of
the code in this function.
2013-09-02 David Kilzer <ddkilzer@apple.com>
Remove duplicate entries found by Xcode in WTF project
Platform.h was duplicated in r111778 after being added in
r111504.
A dangling reference to Ref.h was added in r154962.
* WTF.xcodeproj/project.pbxproj: Remove duplicate entries for
Platform.h and Ref.h.
2013-09-02 Andreas Kling <akling@apple.com>
Actually add Ref.h
2013-09-02 Darin Adler <darin@apple.com>
[Mac] No need for HardAutorelease, which is same as CFBridgingRelease
https://bugs.webkit.org/show_bug.cgi?id=120569
Reviewed by Andy Estes.
* wtf/ObjcRuntimeExtras.h: Added a FIXME about miscapitalization of ObjC.
Deleted HardAutorelease.
(wtfObjcMsgSend): Dropped the use of abbreviations in local class and argument names.
(wtfCallIMP): Ditto.
2013-09-01 Andreas Kling <akling@apple.com>
Ref: A smart pointer for the reference age.
<https://webkit.org/b/120570>
Reviewed by Antti Koivisto.
Add a very simple simple Ref<T> smart pointer class that is never null.
It's initialized by passing a T& to the constructor and cannot be assigned to.
operator-> is not overloaded, to prevent unsafe-looking code.
The value is extracted by "T& get()", since C++ does not let you override operator.()
* wtf/Ref.h:
2013-08-30 Oliver Hunt <oliver@apple.com>
Make JSValue bool conversion less dangerous
https://bugs.webkit.org/show_bug.cgi?id=120505
Reviewed by Darin Adler.
Make LIKELY and UNLIKELY macros coerce to bool before
passing to expect.
* wtf/Compiler.h:
2013-08-30 Antti Koivisto <antti@apple.com>
Remove code behind ENABLE(DIALOG_ELEMENT)
https://bugs.webkit.org/show_bug.cgi?id=120467
Reviewed by Darin Adler.
* wtf/FeatureDefines.h:
2013-08-29 Sam Weinig <sam@webkit.org>
Add ENABLE guards for Promises
https://bugs.webkit.org/show_bug.cgi?id=120488
Reviewed by Andreas Kling.
* wtf/FeatureDefines.h:
2013-08-28 Zan Dobersek <zdobersek@igalia.com>
[GTK] Add support for building JSC with FTL JIT enabled
https://bugs.webkit.org/show_bug.cgi?id=120270
Reviewed by Filip Pizlo.
* wtf/Platform.h: Define ENABLE_FTL_JIT to the value of 1 for the GTK port if building for the x86-64
architecture with LLVM present and the define not being previously defined. This is applicable when
configuring the Automake build with '--enable-ftl-jit=auto'.
2013-08-27 Arunprasad Rajkumar <arurajku@cisco.com>
Replace currentTime() with monotonicallyIncreasingTime() in WebCore
https://bugs.webkit.org/show_bug.cgi?id=119958
Reviewed by Alexey Proskuryakov.
WTF::currentTime() is prone to NTP and manual adjustments, so use
WTF::monotonicallyIncreasingTime() to measure elapsed time.
It is a continuation of r154201.
* wtf/CurrentTime.h: Edited comment.
2013-08-27 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
[gstreamer] Make sure gstreamer source element is thread-safe
https://bugs.webkit.org/show_bug.cgi?id=115352
Reviewed by Philippe Normand.
Add convenience class that simplifies locking and unlocking a GMutex.
* GNUmakefile.list.am:
* wtf/gobject/GMutexLocker.h: Added.
(WebCore::GMutexLocker::GMutexLocker):
(WebCore::GMutexLocker::~GMutexLocker):
(WebCore::GMutexLocker::lock):
(WebCore::GMutexLocker::unlock):
(WebCore::GMutexLocker::mutex):
2013-08-26 Andy Estes <aestes@apple.com>
Don't leak objects in HardAutorelease when OBJC_NO_GC is undefined but
Objective-C GC is disabled at runtime.
Reviewed by Darin Adler.
* wtf/ObjcRuntimeExtras.h:
(HardAutorelease):
2013-08-23 Andy Estes <aestes@apple.com>
Fix issues found by the Clang Static Analyzer
https://bugs.webkit.org/show_bug.cgi?id=120230
Reviewed by Darin Adler.
* wtf/ObjcRuntimeExtras.h:
(HardAutorelease): Added a canonical implementation of HardAutorelease.
2013-08-26 Zan Dobersek <zdobersek@igalia.com>
Undefine __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS before redefining them
https://bugs.webkit.org/show_bug.cgi?id=120313
Reviewed by Darin Adler.
* wtf/LLVMHeaders.h: Undefine the two macros before they are defined again.
This way we avoid the compilation-time warnings about the macros being invalidly redefined.
2013-08-26 Oliver Hunt <oliver@apple.com>
Building is so overrated.
* wtf/Compression.cpp:
(WTF::GenericCompressedData::decompress):
2013-08-26 Oliver Hunt <oliver@apple.com>
Disable compression under MSVC for now as we're getting
weird release-only failures.
* wtf/Compression.cpp:
2013-08-24 Benjamin Poulain <benjamin@webkit.org>
Save three bytes per CStringBuffer object
https://bugs.webkit.org/show_bug.cgi?id=120040
Reviewed by Darin Adler.
Merge https://chromium.googlesource.com/chromium/blink/+/894ae8eafdb64912aefd8f9c809f4ccda84f3b89
sizeof(CStringBuffer) was rounded up to 8 on account of struct size and
alignment rules. This is clearly not what was intended.
* wtf/text/CString.cpp:
(WTF::CStringBuffer::createUninitialized):
* wtf/text/CString.h:
(WTF::CStringBuffer::data):
(WTF::CStringBuffer::mutableData):
2013-08-24 Darin Adler <darin@apple.com>
RetainPtr lacks move constructor for case when argument is a RetainPtr of a different type
https://bugs.webkit.org/show_bug.cgi?id=120255
Reviewed by Andreas Kling.
* wtf/RetainPtr.h: Added missing move constructor, modeled on the other move constructor,
and the one from RetPtr.
2013-08-24 Oliver Hunt <oliver@apple.com>
Make the world build.
* wtf/Compression.h:
2013-08-24 Oliver Hunt <oliver@apple.com>
REGRESSION(r154498): Crashes on EFL, GTK, Qt on release configurations
https://bugs.webkit.org/show_bug.cgi?id=120246
Reviewed by Antti Koivisto.
Undestroy all the platforms that don't use the global new overload
* wtf/Compression.h:
2013-08-21 Mark Rowe <mrowe@apple.com>
<https://webkit.org/b/120141> Make RetainPtr work with ARC.
Have RetainPtr store the object its managing as a CFTypeRef and manage its lifetime with
CFRetain / CFRelease. This is necessary to have explicit control over the lifetime of
Objective-C objects when automatic reference counting is in use. Two helper methods are
introduced to convert between the pointer type that the RetainPtr manages and the CFTypeRef
that the pointer is stored as. For CF types and Objective-C types with ARC disabled,
these methods are simply casts. For Objective-C types under ARC they need to use the
special bridging casts to keep the compiler happy.
Reviewed by Anders Carlsson.
* wtf/RetainPtr.h:
(WTF::RetainPtr::RetainPtr): Use the helper methods to convert to and from the storage
types when necessary.
(WTF::RetainPtr::~RetainPtr): Ditto.
(WTF::RetainPtr::get): Ditto.
(WTF::RetainPtr::operator->): Ditto.
(WTF::RetainPtr::operator PtrType): Ditto.
(WTF::::RetainPtr): Ditto.
(WTF::::clear): Ditto.
(WTF::::leakRef): Ditto.
(WTF::=): Ditto.
(WTF::RetainPtr::fromStorageTypeHelper): Use crazy template magic to determine whether to use
a bridging cast or not depending on the desired return type.
(WTF::RetainPtr::fromStorageType):
(WTF::RetainPtr::toStorageType): Overloading is sufficient here.
2013-08-21 Mark Rowe <mrowe@apple.com>
Revert r153637.
It didn't work with ARC like it said it would. We'll need to take a slightly different approach.
Rubber-stamped by Anders Carlsson.
* wtf/RetainPtr.h:
(WTF::RetainPtr::RetainPtr):
(WTF::RetainPtr::~RetainPtr):
(WTF::RetainPtr::operator UnspecifiedBoolType):
(WTF::::RetainPtr):
(WTF::::clear):
(WTF::=):
(WTF::adoptCF):
(WTF::adoptNS):
2013-08-23 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build correction after r154513.
* WTF.vcxproj/build-generated-files.sh: Variable was missing '$' character.
2013-08-23 Darin Adler <darin@apple.com>
Cut down repeated code in RefPtr and RetainPtr by using copy/move-and-swap for assignment operators
https://bugs.webkit.org/show_bug.cgi?id=120223
Reviewed by Anders Carlsson.
* wtf/RefPtr.h: Switch to copy-and-swap in the assignment operators. The move ones already were done
that way.
* wtf/RetainPtr.h: Ditto, except for the move ones too.
2013-08-23 Oliver Hunt <oliver@apple.com>
Add more validation logic to CompressibleVector
https://bugs.webkit.org/show_bug.cgi?id=120227
Reviewed by Brent Fulgham.
Add a pile of assertions to try on catch whatever is going wrong
in the windows environment or other platforms.
* wtf/Compression.cpp:
(WTF::GenericCompressedData::create):
(WTF::GenericCompressedData::decompress):
* wtf/Compression.h:
(WTF::CompressedVector::decompress):
2013-08-23 Alex Christensen <achristensen@apple.com>
Re-separating Win32 and Win64 builds.
https://bugs.webkit.org/show_bug.cgi?id=120178
Reviewed by Brent Fulgham.
* WTF.vcxproj/WTFGenerated.make:
Pass PlatformArchitecture as a command line parameter to bash scripts.
* WTF.vcxproj/build-generated-files.sh:
Use PlatformArchitecture from command line to determine which object directory to use (obj32 or obj64).
2013-08-22 Filip Pizlo <fpizlo@apple.com>
build-jsc --ftl-jit should work
https://bugs.webkit.org/show_bug.cgi?id=120194
Reviewed by Oliver Hunt.
* wtf/LLVMHeaders.h: I don't know what went wrong here. If HAVE(LLVM), then we need those headers!
2013-08-23 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build correction after r154498.
* WTF.vcxproj/WTF.vcxproj.filters: Adjust files so they show up
in the proper folders.
* WTF.vcxproj/WTFCommon.props: Add search path for zlib header and
include link directive.
2013-08-23 Oliver Hunt <oliver@apple.com>
Attempt to appease windows bot.
* wtf/Compression.h:
2013-08-23 Oliver Hunt <oliver@apple.com>
Re-sort xcode project file
* WTF.xcodeproj/project.pbxproj:
2013-08-23 Oliver Hunt <oliver@apple.com>
Support in memory compression of rarely used data
https://bugs.webkit.org/show_bug.cgi?id=120143
Reviewed by Gavin Barraclough.
Adds a set of utility functions to wrap the use of zlib over a generic
type or a Vector<> as well as adding CompressibleVector that wraps
either a Vector<> or compressed data.
* GNUmakefile.list.am:
* WTF.pro:
* WTF.vcxproj/WTF.vcxproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/CheckedArithmetic.h:
* wtf/Compression.cpp: Added.
(WTF::zAlloc):
(WTF::zFree):
(WTF::GenericCompressedData::create):
(WTF::GenericCompressedData::decompress):
* wtf/Compression.h: Added.
(WTF::GenericCompressedData::compressedSize):
(WTF::GenericCompressedData::originalSize):
(WTF::GenericCompressedData::GenericCompressedData):
(WTF::CompressedVector::create):
(WTF::CompressedVector::decompress):
(WTF::CompressedVector::size):
(WTF::CompressibleVector::CompressibleVector):
(WTF::CompressibleVector::shrinkToFit):
(WTF::CompressibleVector::size):
(WTF::CompressibleVector::operator[]):
(WTF::CompressibleVector::at):
(WTF::CompressibleVector::begin):
(WTF::CompressibleVector::end):
(WTF::CompressibleVector::data):
(WTF::CompressibleVector::decompressIfNecessary):
2013-08-21 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r154416.
http://trac.webkit.org/changeset/154416
https://bugs.webkit.org/show_bug.cgi?id=120147
Broke Windows builds (Requested by rniwa on #webkit).
* WTF.vcxproj/WTFGenerated.make:
* WTF.vcxproj/build-generated-files.sh:
2013-08-21 Alex Christensen <achristensen@apple.com>
<https://webkit.org/b/120137> Separating Win32 and Win64 builds.
Reviewed by Brent Fulgham.
* WTF.vcxproj/WTFGenerated.make:
Pass PlatformArchitecture as a command line parameter to bash scripts.
* WTF.vcxproj/build-generated-files.sh:
Use PlatformArchitecture from command line to determine which object directory to use (obj32 or obj64).
2013-08-21 Allan Sandfeld Jensen <allan.jensen@digia.com>
Disable maybe-uninitialized warning in GCC 4.8
https://bugs.webkit.org/show_bug.cgi?id=119835
Reviewed by Anders Carlsson.
Disable the maybe-uninitialized warning.
* wtf/Compiler.h:
2013-08-20 Alex Christensen <achristensen@apple.com>
Use PlatformArchitecture to distinguish between 32-bit and 64-bit builds on Windows.
https://bugs.webkit.org/show_bug.cgi?id=119512
Reviewed by Brent Fulgham.
* WTF.vcxproj/WTFGeneratedCommon.props:
Replaced obj32, bin32, and lib32 with macros for 64-bit build.
2013-08-20 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
<https://webkit.org/b/120056> [GTK][ARM] enable DFG_JIT
Reviewed by Martin Robinson.
Enable DFG_JIT in GTK+ platform for ARM/Thumb architecture
* wtf/Platform.h:
2013-08-19 Ryosuke Niwa <rniwa@webkit.org>
<https://webkit.org/b/120049> Delete code for Snow Leopard
Reviewed by Benjamin Poulain.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
* wtf/FeatureDefines.h:
* wtf/Platform.h:
2013-08-19 Joseph Pecoraro <pecoraro@apple.com>
<https://webkit.org/b/120036> [iOS] Upstream Source/WTF Xcode project for iOS
Reviewed by David Kilzer.
Include iOS only WebCoreThread.* files in an ios group, and clean up
the included files a bit.
* WTF.xcodeproj/project.pbxproj:
* wtf/ios/WebCoreThread.cpp:
* wtf/ios/WebCoreThread.h:
2013-08-19 Joseph Pecoraro <pecoraro@apple.com>
<https://webkit.org/b/119905> [iOS] Upstream Source/WTF
Reviewed by Benjamin Poulain.
Upstream iOS WebKit Source/WTF.
* Configurations/Base.xcconfig:
JavaScriptCore.framework is a public framework.
* wtf/Assertions.h:
Define an export macro for iOS projects just including <wtf/Assertions.h>.
* wtf/Platform.h:
* wtf/FeatureDefines.h:
iOS ENABLE and USE defines.
* wtf/MainThread.h:
* wtf/mac/MainThreadMac.mm:
(WTF::initializeApplicationUIThreadIdentifier):
(WTF::initializeWebThreadIdentifier):
(WTF::canAccessThreadLocalDataForThread):
* wtf/WeakPtr.h:
(WTF::WeakReference::get):
(WTF::WeakReference::clear):
Shared WebThread and MainThread access to thread local data.
* wtf/WTFThreadData.cpp:
(WTF::WTFThreadData::WTFThreadData):
Shared WebThread and MainThread identifier tables.
* wtf/ThreadSpecific.h:
(WTF::::replace):
Used later on so that WebThread can share the MainThread's thread global data.
* wtf/text/StringStatics.cpp:
(WTF::AtomicString::init):
When USE(WEB_THREAD) assert AtomicString::init is initialized on the realMainThread.
* wtf/unicode/CharacterNames.h:
* wtf/unicode/icu/UnicodeIcu.h:
(WTF::Unicode::hasLineBreakingPropertyComplexContextOrIdeographic):
Minor iOS constants and functions used later by WebCore.
2013-08-16 Arunprasad Rajkumar <arurajku@cisco.com>
<https://webkit.org/b/119785> Replace currentTime() with monotonicallyIncreasingTime() in WebCore
Reviewed by Alexey Proskuryakov.
WTF::currentTime() is prone to DST changes and NTP adjustments, so use
WTF::monotonicallyIncreasingTime() to measure elapsed time.
* wtf/CurrentTime.h:
(WTF::monotonicallyIncreasingTimeMS): Added mille second version of monotonic time API.
2013-08-15 Filip Pizlo <fpizlo@apple.com>
refCount() of a StringImpl could be zero if it's static; in that case we shouldn't report extra memory cost
https://bugs.webkit.org/show_bug.cgi?id=119870
Reviewed by Mark Hahnenberg.
* wtf/text/StringImpl.h:
(WTF::StringImpl::costDuringGC):
(WTF::StringImpl::isStatic):
(WTF::StringImpl::bufferOwnership):
2013-08-14 Filip Pizlo <fpizlo@apple.com>
Typed arrays should be rewritten
https://bugs.webkit.org/show_bug.cgi?id=119064
Reviewed by Oliver Hunt.
- Added the notion of a reference counted object that can be marked Deferred,
which is like a special-purpose upref.
- Added a common byte flipper.
Automake work courtesy of Zan Dobersek <zdobersek@igalia.com>.
* GNUmakefile.list.am:
* WTF.xcodeproj/project.pbxproj:
* wtf/DeferrableRefCounted.h: Added.
(WTF::DeferrableRefCountedBase::ref):
(WTF::DeferrableRefCountedBase::hasOneRef):
(WTF::DeferrableRefCountedBase::refCount):
(WTF::DeferrableRefCountedBase::isDeferred):
(WTF::DeferrableRefCountedBase::DeferrableRefCountedBase):
(WTF::DeferrableRefCountedBase::~DeferrableRefCountedBase):
(WTF::DeferrableRefCountedBase::derefBase):
(WTF::DeferrableRefCountedBase::setIsDeferredBase):
(WTF::DeferrableRefCounted::deref):
(WTF::DeferrableRefCounted::setIsDeferred):
(WTF::DeferrableRefCounted::DeferrableRefCounted):
(WTF::DeferrableRefCounted::~DeferrableRefCounted):
* wtf/FlipBytes.h: Added.
(WTF::needToFlipBytesIfLittleEndian):
(WTF::flipBytes):
(WTF::flipBytesIfLittleEndian):
2013-08-14 Julien Brianceau <jbrianceau@nds.com>
DFG_JIT implementation for sh4 architecture.
https://bugs.webkit.org/show_bug.cgi?id=119737
Reviewed by Oliver Hunt.
* wtf/Platform.h:
2013-08-13 Arunprasad Rajkumar <arurajku@cisco.com>
[WTF] [JSC] Replace currentTime() with monotonicallyIncreasingTime() in all possible places
https://bugs.webkit.org/show_bug.cgi?id=119762
Reviewed by Geoffrey Garen.
* wtf/MainThread.cpp:
(WTF::dispatchFunctionsFromMainThread):
2013-08-12 Ragner Magalhaes <ranger.n@samsung.com>
Broken build with build-webkit --no-webgl
https://bugs.webkit.org/show_bug.cgi?id=119272
Reviewed by Alexandru Chiculita.
CSS_SHADERS requires WEBGL enabled.
Add error message to dependency failure.
* wtf/FeatureDefines.h:
2013-08-12 Joseph Pecoraro <pecoraro@apple.com>
[iOS] isMainThread implementation with USE(WEB_THREAD)
https://bugs.webkit.org/show_bug.cgi?id=119644
Reviewed by Benjamin Poulain.
On iOS isMainThread() means that the current thread is either the
MainThread or WebThread and the current thread has the WebThreadLock.
* wtf/ios/WebCoreThread.cpp: Added.
* wtf/ios/WebCoreThread.h: Added.
* wtf/mac/MainThreadMac.mm:
(WTF::isMainThread):
2013-08-11 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.list.am: Add missing header file.
2013-08-09 Christophe Dumez <ch.dumez@sisa.samsung.com>
Make atob() throw an InvalidCharacterError on excess padding characters
https://bugs.webkit.org/show_bug.cgi?id=118898
Reviewed by Darin Adler.
Add a Base64FailOnInvalidCharacterOrExcessPadding value to the Base64DecodePolicy
enumeration so that the caller can request strict padding validation in addition
to strict character validation. This is needed so that we can use
WTF::base64Decode() for window.atob().
* wtf/text/Base64.cpp:
(WTF::base64DecodeInternal):
* wtf/text/Base64.h:
2013-08-07 Alex Christensen <achristensen@apple.com>
Fixed wrong definition for AppleWin port's WebGL after r153768.
Rubberstamped by Benjamin Poulain.
* wtf/Platform.h: Replaced WTF_USE_SURFACE with WTF_USE_GRAPHICS_SURFACE.
2013-08-04 Sam Weinig <sam@webkit.org>
Remove support for HTML5 MicroData
https://bugs.webkit.org/show_bug.cgi?id=119480
Reviewed by Anders Carlsson.
* wtf/FeatureDefines.h:
2013-08-06 Alex Christensen <achristensen@apple.com>
Enabled WebGL on WinCairo port.
https://bugs.webkit.org/show_bug.cgi?id=119502
Reviewed by Benjamin Poulain.
* wtf/FeatureDefines.h: Enabled WebGL.
* wtf/Platform.h: Added definitions required for WebGL on Windows.
2013-08-05 Mark Rowe <mrowe@apple.com>
<rdar://problem/5927399> FastMalloc should support MallocStackLogging
Call the malloc stack logging function from within the various entry points to FastMalloc
when stack logging is enabled.
Reviewed by Oliver Hunt and Geoff Garen.
* wtf/FastMalloc.cpp:
Call in to MallocHook::InvokeNewHook / MallocHook::InvokeDeleteHook at the appropriate entry
points to FastMalloc. The naming comes from TCMalloc's existing, unused concept of malloc hooks.
(WTF::MallocHook::record): Call the stack logging function with appropriate argument types.
(WTF::MallocHook::recordAllocation): Out-of-line slow path for when stack logging is enabled
that calls record with the values in the right arguments.
(WTF::MallocHook::recordDeallocation): Ditto.
(WTF::MallocHook::init): Stack logging is enabled if the system allocator has enabled stack logging.
(WTF::MallocHook::InvokeNewHook): Call recordAllocation in the unlikely event that stack logging is
enabled.
(WTF::MallocHook::InvokeDeleteHook): Ditto for recordDeallocation.
(WTF::TCMalloc_ThreadCache::InitModule): Initialize the malloc hook.
2013-08-06 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build correction after r153754 and r153757.
* wtf/MathExtras.h:
(remainder): Provide implementation of C99 remainder for VS2010 (and earlier).
2013-07-23 David Farler <dfarler@apple.com>
Provide optional OTHER_CFLAGS, OTHER_CPPFLAGS, OTHER_LDFLAGS additions for building with ASAN
https://bugs.webkit.org/show_bug.cgi?id=117762
Reviewed by Mark Rowe.
* Configurations/DebugRelease.xcconfig:
Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS.
2013-08-05 Mark Rowe <mrowe@apple.com>
Build fix for Qt Windows.
* wtf/Assertions.cpp: Include StringExtras.h rather than StdLibExtras.h, since the former is where
strncasecmp is declared.
2013-07-26 Mark Rowe <mrowe@apple.com>
Logging should be configurable using human-readable channel names rather than crazy bitmasks
<http://webkit.org/b/119031>
Implement shared logic for initializing logging channels based on human-readable channel names in WTF,
and rework the WebCore, WebKit and WebKit2 logging initialization on top of it.
Logging channels may now be enabled by providing a comma-separated list of channel names, with the special
"all" name enabling all channels. Channel names prefixed with a leading "-" will result in the named channel
being disabled. For instance, specifying "all,-history,-loading" will result in all logging channels except
for history and loading being enabled.
For OS X developers, this also changes the name of the user defaults used to enable logging. This is done to allow
the old user defaults to remain set for those people that need to switch between version of WebKit before and
after this change. Where the old user default keys were WebCoreLogLevel, WebKitLogLevel and WebKit2LogLevel,
the new user default keys are WebCoreLogging, WebKitLogging and WebKit2Logging.
For GTK developers, this changes the separator used in the WEBKIT_DEBUG environment variable to a comma for
consistency with the other platforms and to enable more code sharing.
While doing this work I've also taken the opportunity to eliminate the need to touch multiple files when
adding a new logging channel. Now only the header in the relevant project needs to be updated.
Reviewed by Sam Weinig.
* wtf/Assertions.cpp:
(WTFLogChannelByName): Iterate over the provided array of log channels, returning the first whose name
matches case-insensitively.
(setStateOfAllChannels): Helper function to set the state of all channels to a single value.
(WTFInitializeLogChannelStatesFromString): Parse a string containing a case-insensitive, comma-separated list
of channel names to enable or disable, with the latter being prefixed by a "-".
* wtf/Assertions.h: Update the layout of WTFLogChannel to include only the state of the channel and its name.
Declare WTFLogChannelByName and WTFInitializeLogChannelStatesFromString.
* wtf/RefCountedLeakCounter.cpp: Update to the new format of WTFLogChannel.
2013-08-05 Benjamin Poulain <bpoulain@apple.com>
Disable <meter> by default on iOS, it is enabled through the xconfig files
https://bugs.webkit.org/show_bug.cgi?id=119503
Reviewed by Alexey Proskuryakov.
* wtf/FeatureDefines.h:
2013-08-05 Oliver Hunt <oliver@apple.com>
Move TypedArray implementation into JSC
https://bugs.webkit.org/show_bug.cgi?id=119489
Reviewed by Filip Pizlo.
Remove TypedArray implementation from WTF
* GNUmakefile.list.am:
* WTF.xcodeproj/project.pbxproj:
* wtf/Forward.h:
2013-08-02 Benjamin Poulain <benjamin@webkit.org>
Remove a bunch of redundant checks for empty string in StringImpl
https://bugs.webkit.org/show_bug.cgi?id=118768
Reviewed by Ryosuke Niwa.
The first thing done by createUninitialized() is check if the length passed
is zero. Internally, there are many cases for which we know the check will never succeed.
Clang is usually really smart for those kind of things, but there are a few cases where
the condition to avoid returning empty() is not simply a check for the length.
This patch adds an internal initializer to deal with that.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::createUninitializedInternal):
(WTF::StringImpl::createUninitializedInternalNonEmpty):
(WTF::StringImpl::createInternal): Create internal has a special case for null pointer
for the characters. The test also check length, the second check for length cannot fail.
(WTF::StringImpl::create8BitIfPossible): ditto.
(WTF::StringImpl::lower): 3 of the calls cannot be reached for empty length. On an empty length,
the test for (noUpper && !(ored & ~0x7F)) would have caused the function to return "this".
For the last createUninitialized(), there is no guarantee the realLength is not zero.
(WTF::StringImpl::replace): The first thing we do in replace(UChar,UChar) is check if there is anything
to replace. The check for length will never succeed as there must be a character to replace at that point.
* wtf/text/StringImpl.h:
2013-08-02 Mark Lam <mark.lam@apple.com>
Gardening: Touched a line in Platform.h to get all bots to do a clean build.
Not reviewed.
* wtf/Platform.h:
2013-08-02 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Check WTF::Vector size with '0' inline capacity
https://bugs.webkit.org/show_bug.cgi?id=119397
Reviewed by Andreas Kling.
Putting in place the compile assertion that had been removed with r153514.
* wtf/SizeLimits.cpp:
2013-07-26 Mark Rowe <mrowe@apple.com>
<http://webkit.org/b/119169> RetainPtr should support ARC for Objective-C objects.
While RetainPtr is not necessary under ARC, having it available makes it easier to transition
existing code from manual retain / release to ARC.
Under ARC, the object member of RetainPtr is treated as a strong reference by the compiler.
This means that merely assigning to the member variable is sufficient to retain the object,
and clearing the member variable is sufficient to release it. We still need to explicitly
CFRetain / CFRelease CoreFoundation types so the explicit calls to these functions are
moved in to helper functions and overloading is used to have the Objective-C object versions
of them be no-ops under ARC.
Reviewed by Anders Carlsson.
* wtf/RetainPtr.h:
(WTF::retain): Continue to always CFRetain / CFRelease CoreFoundation objects. Only CFRetain / CFRelease
Objective-C objects when using manual retain / release.
(WTF::release): Ditto.
(WTF::adoptNSReference): Adopting references will be handled automatically by the compiler
when possible under ARC by eliminating redundant retain / release pairs.
(WTF::RetainPtr::ImplicitConversionToBoolIsNotAllowed): A new method that exists only to be used by the
conversion to the unspecified bool type.
(WTF::RetainPtr::operator UnspecifiedBoolType): Switch to using a pointer to a member function as the
unspecified bool type to avoid warnings from the compiler when casting Objective-C object types under ARC.
(WTF::RetainPtr::RetainPtr): Switch to our retain / release helper functions.
(WTF::RetainPtr::~RetainPtr): Ditto.
(WTF::::RetainPtr): Ditto.
(WTF::::clear): Ditto.
(WTF::=): Ditto.
(WTF::adoptCF): Annotate the argument with CF_RELEASES_ARGUMENT on both the declaration and the definition.
(WTF::adoptNS): Ditto for NS_RELEASES_ARGUMENT.
2013-08-01 Mark Rowe <mrowe@apple.com>
<rdar://problem/14235491> FastMalloc zone enumerator responding to MALLOC_PTR_REGION_RANGE_TYPE with individual allocations
Teach PageMapMemoryUsageRecorder::recordPendingRegions to only record data of the type that it's asked for.
This also fixes the vmmap output to associate some regions with the FastMalloc malloc zone that were previously
associated with it only via the VM tag, meaning they were incorrectly being omitted from the malloc statistics
section of the report.
Reviewed by Dan Bernstein.
* wtf/FastMalloc.cpp:
(WTF::PageMapMemoryUsageRecorder::recordPendingRegions): Report the individual allocations only when requested. Add
the ability to report the regions containing pointers separately from the allocations.
2013-08-01 Mark Rowe <mrowe@apple.com>
<rdar://problem/14528244> False-positive leaks from FastMalloc.
A logic error in the page map enumeration code within FastMalloc could result in a subset of the memory regions
owned by FastMalloc being skipped by the malloc zone enumeration code used by leaks and other performance tools.
If the only reference to an allocated object lived within one of the skipped memory regions, leaks would believe
it had been leaked since it would not find any references to the object.
The logic error manifested when a FastMalloc span owned a region of memory that crossed a 16MB address space boundary,
and when there was one or more other spans immediately after it in the address space. Crossing the 16MB address space
boundary means that the start and end points of the span are in different leaf nodes of the page map trie, and the
code within the page map's visitValues method didn't correctly account this case when skipping to the end of the span
after visiting it. It would resume iterating from the start of the next leaf node rather than continuing to skip values
until the end of the span was passed. The value representing the end of the span would then be processed as if it were
the start of a new span, and more values would be skipped even though they may contain actual spans.
The solution is to rework the algorithm used in visitValues so that it will skip the correct number of values even when
some of the values are in different leaf nodes. This is a more involved change than it may seem since it's also necessary
to deal with the case where a memory region spans two separate root nodes, which can happen if the region happens to cross
a 64GB boundary in the address space.
Reviewed by Geoff Garen.
* wtf/TCPageMap.h:
(TCMalloc_PageMap3::visitValues): Use a single loop to iterate, with the loop index being the key in to the page map in the
same form as used by get and set. This allows us to correctly deal with the index being skipped to a different intermediate or
root node as a result of visiting a span that crosses a 16MB boundary in memory.
(TCMalloc_PageMap2::visitValues): Ditto, but without having to deal with intermediate nodes.
2013-08-01 Ruth Fong <ruth_fong@apple.com>
[Forms: color] <input type='color'> popover color well implementation
<rdar://problem/14411008> and https://bugs.webkit.org/show_bug.cgi?id=119356
Reviewed by Benjamin Poulain.
* wtf/FeatureDefines.h: Added and enabled INPUT_TYPE_COLOR_POPOVER.
2013-08-01 Simon Fraser <simon.fraser@apple.com>
REGRESSION(r145592): AutodrainedPool.h. RunLoopTimer.h, SchedulePair.h are being copied into the wrong location
https://bugs.webkit.org/show_bug.cgi?id=112833
Reviewed by Sam Weinig.
AutodrainedPool.h and SchedulePair.h should just be project headers, not
private headers, so they get copied into <build dir>/usr/local/include/wtf
not <build dir>/usr/local/include
* WTF.xcodeproj/project.pbxproj:
2013-07-31 Ruth Fong <ruth_fong@apple.com>
<input type=color> Mac UI behaviour
<rdar://problem/10269922> and https://bugs.webkit.org/show_bug.cgi?id=61276
Reviewed by Brady Eidson.
* wtf/FeatureDefines.h: Enabled INPUT_TYPE_COLOR on Mac port.
2013-07-31 Andreas Kling <akling@apple.com>
Shrink Vectors with inline capacity.
<http://webkit.org/b/119295>
<rdar://problem/14598360>
Reviewed by Anders Carlsson.
Pack Vector::m_size next to VectorBufferBase::m_capacity so there's no space wasted
on padding when sizeof(T) >= 8. Since m_size is not conceptually part of the buffer,
I just using'ed it into Vector.
* wtf/SizeLimits.cpp:
* wtf/Vector.h:
(WTF::VectorBufferBase::VectorBufferBase):
(WTF::VectorBuffer::VectorBuffer):
(WTF::Vector::Vector):
(WTF::::Vector):
2013-07-30 Patrick Gansterer <paroga@webkit.org>
Move WindowsExtras.h from WebCore to WTF
https://bugs.webkit.org/show_bug.cgi?id=118125
Reviewed by Anders Carlsson.
Move it to WTF to be able to use the functions in WTF too.
* wtf/WindowsExtras.h: Renamed from Source/WebCore/platform/win/WindowsExtras.h.
(WTF::getRegistryValue):
(WTF::getWindowPointer):
(WTF::setWindowPointer):
* wtf/win/MainThreadWin.cpp:
(WTF::initializeMainThreadPlatform):
2013-07-29 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.list.am: Add missing files to compilation.
2013-07-29 Mark Rowe <mrowe@apple.com>
<rdar://problem/14528244> Tons of FastMalloc leaks reported by leaks of objects that have already been deallocated
Reviewed by Sam Weinig.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_Central_FreeList::enumerateFreeObjects): Mark objects in the transfer cache as being free.
2013-07-29 Zan Dobersek <zdobersek@igalia.com>
Reintroduce convenience CheckedInt*, CheckedUint* types
https://bugs.webkit.org/show_bug.cgi?id=119213
Reviewed by Oliver Hunt.
Reintroduce CheckedInt* and CheckedUint* types that were previously provided for convenience
through the CheckedInt header that was removed in r153095. The types are now based on the
Checked class, using the RecordOverflow class as the overflow handler.
* wtf/CheckedArithmetic.h:
2013-07-27 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r153380): Can't open messages on Gmail
https://bugs.webkit.org/show_bug.cgi?id=119165
Reviewed by Andreas Kling.
This bug was caused by r153380. The bug doesn't reproduce as long as WebKit is built by clang 4.2 and later
or final is disabled (it could be clang 4.1 and later but we don't have information about that).
Fix the bug by disabling final on earlier versions of clang. Unfortunately we can only check versions of
Apple clang since __clang_major__ and __clang_minor__ are vendor dependent.
* wtf/Compiler.h:
2013-07-26 Oliver Hunt <oliver@apple.com>
ASSERT failure in wtf/CheckedBoolean.h line 43 on Windows
https://bugs.webkit.org/show_bug.cgi?id=119170
Reviewed by Michael Saboff.
Added a copy constructor to CheckedBoolean.
* wtf/CheckedBoolean.h:
(CheckedBoolean::CheckedBoolean):
2013-07-25 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build fix.
* WTF.vcxproj/WTF.vcxproj: Add missing SixCharacterHash.h,.cpp files.
* WTF.vcxproj/WTF.vcxproj.filters: Ditto.
* wtf/NumberOfCores.h: Add export macro to numberOfProcessorCores.
* wtf/PrintStream.h: Add export macro to dumpCharacter.
* wtf/SixCharacterHash.h: Add export macro to sixCharacterHashStringToInteger
and integerToSixCharacterHashString.
* wtf/text/CString.h: Add export macro to hash and equal methods.
(WTF::CStringHash::hash): Add export macro.
2013-07-25 peavo@outlook.com <peavo@outlook.com>
[Windows] Provide ASM implemenation of 8-bit compare-and-swap
https://bugs.webkit.org/show_bug.cgi?id=119084
Reviewed by Brent Fulgham.
* wtf/Atomics.h:
(WTF::weakCompareAndSwap): Add a 32-bit X86 Assembly path for
Windows build.
2013-07-25 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build fix.
* WTF.vcxproj/WTF.vcxproj: Add missing CompilationThread.h,.cpp
* WTF.vcxproj/WTF.vcxproj.filters: Ditto.
2013-07-25 Michael Brüning <michael.bruning@digia.com>
Fix Windows build after r153134.
https://bugs.webkit.org/show_bug.cgi?id=119090
Reviewed by Oliver Hunt.
Add USE(PTHREADS) guards around pthread specific code
for now. This will cause isCompilationThread to always
return false on non pthread platforms such as Windows.
We might be able to use the Windows one-time initialization
for this, but this is only available from Windows Vista on.
* wtf/CompilationThread.cpp:
(WTF::initializeCompilationThreads):
2013-07-25 Allan Sandfeld Jensen <allan.jensen@digia.com>
Fix windows build after FTL upstream
Unreviewed build fix.
* wtf/Atomics.h:
(WTF::weakCompareAndSwap):
2013-07-25 Ryuan Choi <ryuan.choi@samsung.com>
Unreviewed, build fix on the EFL port.
* wtf/CMakeLists.txt: Added SixCharacterHash.cpp
2013-07-25 Gabor Rapcsanyi <rgabor@webkit.org>
Unreviewed, build fix on the Qt port.
* WTF.pro: Add additional build files for the FTL.
2013-07-25 Zan Dobersek <zdobersek@igalia.com>
Unreviewed, further GTK build fixing.
* GNUmakefile.am: Make libWTF.la depend on any changes made to the build targets list.
* GNUmakefile.list.am: Add SixCharacterHash source files to the build.
2013-07-25 Csaba Osztrogonác <ossy@webkit.org>
[GTK] Similar fix to r153304.
* GNUmakefile.list.am:
2013-07-25 Grzegorz Czajkowski <g.czajkowski@samsung.com>
Build break in debug after r153134: StringImpl.h:640: undefined reference to `WTF::isCompilationThread()
https://bugs.webkit.org/show_bug.cgi?id=119077
Reviewed by Christophe Dumez.
* wtf/CMakeLists.txt:
Added CompilationThread.{h/cpp}.
2013-07-24 Filip Pizlo <fpizlo@apple.com>
fourthTier: DFG IR dumps should be easier to read
https://bugs.webkit.org/show_bug.cgi?id=119050
Reviewed by Mark Hahnenberg.
Added support for dumping values within a context. By default, if you say
print(inContext(value, context)) it calls value.dumpInContext(out, context)
instead of value.dump(out).
Hoisted the support for six-character hashes out of JSC::CodeBlockHash into
WTF, in the form of SixCharacterHash.h.
Added a helper for creating dump contexts where the inContext() dump will
just use a short string hash to "name" the object being dumped, and then
will print out the full dumps in an endnote to your dump.
Added support for using CString as a hashtable key.
* WTF.xcodeproj/project.pbxproj:
* wtf/PrintStream.h:
(WTF):
(ValueInContext):
(WTF::ValueInContext::ValueInContext):
(WTF::ValueInContext::dump):
(WTF::inContext):
* wtf/SixCharacterHash.cpp: Added.
(WTF):
(WTF::sixCharacterHashStringToInteger):
(WTF::integerToSixCharacterHashString):
* wtf/SixCharacterHash.h: Added.
(WTF):
* wtf/StringHashDumpContext.h: Added.
(WTF):
(StringHashDumpContext):
(WTF::StringHashDumpContext::StringHashDumpContext):
(WTF::StringHashDumpContext::getID):
(WTF::StringHashDumpContext::dumpBrief):
(WTF::StringHashDumpContext::brief):
(WTF::StringHashDumpContext::isEmpty):
(WTF::StringHashDumpContext::dump):
* wtf/text/CString.cpp:
(WTF::CString::hash):
(WTF):
(WTF::operator<):
(WTF::CStringHash::equal):
* wtf/text/CString.h:
(WTF::CString::CString):
(CString):
(WTF::CString::isHashTableDeletedValue):
(WTF):
(WTF::CStringHash::hash):
(CStringHash):
2013-07-21 Filip Pizlo <fpizlo@apple.com>
fourthTier: DFG Nodes should be able to abstractly tell you what they read and what they write
https://bugs.webkit.org/show_bug.cgi?id=118910
Reviewed by Sam Weinig.
Fix compile goof in sortedListDump().
* wtf/ListDump.h:
(WTF::sortedListDump):
2013-07-16 Filip Pizlo <fpizlo@apple.com>
fourthTier: NaturalLoops should be able to quickly answer questions like "what loops own this basic block"
https://bugs.webkit.org/show_bug.cgi?id=118750
Reviewed by Mark Hahnenberg.
Add a utility function for inserting an element into a vector that has bounded size,
and where the insertion causes things to drop off the end.
* wtf/StdLibExtras.h:
(WTF):
(WTF::insertIntoBoundedVector):
2013-07-12 Filip Pizlo <fpizlo@apple.com>
fourthTier: DFG should have an SSA form for use by FTL
https://bugs.webkit.org/show_bug.cgi?id=118338
Reviewed by Mark Hahnenberg.
- Extend variadicity of PrintStream and dataLog.
- Give HashSet the ability to add a span of things.
- Give HashSet the ability to == another HashSet.
- Note FIXME's in HashTable concerning copying performance, that affects
the way that the DFG now uses HashSets and HashMaps.
- Factor out the bulk-insertion logic of JSC::DFG::InsertionSet into
WTF::Insertion, so that it can be used in more places.
- Create a dumper for lists and maps.
* WTF.xcodeproj/project.pbxproj:
* wtf/DataLog.h:
(WTF):
(WTF::dataLog):
* wtf/HashSet.h:
(HashSet):
(WTF):
(WTF::::add):
(WTF::=):
* wtf/HashTable.h:
(WTF::::HashTable):
(WTF::=):
* wtf/Insertion.h: Added.
(WTF):
(Insertion):
(WTF::Insertion::Insertion):
(WTF::Insertion::index):
(WTF::Insertion::element):
(WTF::Insertion::operator<):
(WTF::executeInsertions):
* wtf/ListDump.h: Added.
(WTF):
(ListDump):
(WTF::ListDump::ListDump):
(WTF::ListDump::dump):
(MapDump):
(WTF::MapDump::MapDump):
(WTF::MapDump::dump):
(WTF::listDump):
(WTF::sortedListDump):
(WTF::lessThan):
(WTF::mapDump):
(WTF::sortedMapDump):
* wtf/PrintStream.h:
(PrintStream):
(WTF::PrintStream::print):
2013-07-02 Filip Pizlo <fpizlo@apple.com>
Unreviewed, fix 32-bit build.
* wtf/Platform.h:
2013-07-02 Filip Pizlo <fpizlo@apple.com>
fourthTier: FTL should use the equivalent of llvm opt -O2 by default
https://bugs.webkit.org/show_bug.cgi?id=118311
Reviewed by Mark Hahnenberg.
* wtf/LLVMHeaders.h:
2013-06-27 Filip Pizlo <fpizlo@apple.com>
fourthTier: JSC's disassembly infrastructure should be able to disassemble the code that LLVM generates
https://bugs.webkit.org/show_bug.cgi?id=118148
Reviewed by Anders Carlsson.
We now use LLVM for two things: disassembler and FTL. Separate out the question
of whether we have LLVM (HAVE(LLVM)) from whether we want to use the LLVM
disassembler (USE(LLVM_DISASSEMBLER)) and whether we enable the FTL
(ENABLE(FTL_JIT)).
Also move the cruft for including LLVM headers into WTF since now we use it in
a bunch of places, not all related to FTL. There's no obvious place to put that
file in JSC so I put it in WTF.
* WTF.xcodeproj/project.pbxproj:
* wtf/LLVMHeaders.h: Copied from Source/JavaScriptCore/ftl/FTLLLVMHeaders.h.
* wtf/Platform.h:
2013-06-25 Filip Pizlo <fpizlo@apple.com>
fourthTier: DFG should support switch_string
https://bugs.webkit.org/show_bug.cgi?id=117967
Reviewed by Sam Weinig.
Make it possible to compare a RefPtr<StringImpl> and a StringImpl* without
having to ref the StringImpl.
* wtf/text/StringHash.h:
(WTF::StringHash::equal):
2013-06-24 Filip Pizlo <fpizlo@apple.com>
fourthTier: Count external memory usage towards heap footprint
https://bugs.webkit.org/show_bug.cgi?id=117948
Reviewed by Geoffrey Garen.
Expose some functionality needed for properly measuring StringImpl footprint.
* wtf/Atomics.h:
(WTF::weakCompareAndSwapSize):
(WTF):
* wtf/MathExtras.h:
(divideRoundedUp):
* wtf/text/StringImpl.h:
(WTF::StringImpl::cost):
(StringImpl):
(WTF::StringImpl::costDuringGC):
(WTF::StringImpl::refCount):
2013-06-23 Filip Pizlo <fpizlo@apple.com>
fourthTier: DFG should optimize identifier string equality
https://bugs.webkit.org/show_bug.cgi?id=117920
Reviewed by Sam Weinig.
Note that this ChangeLog was supposed to be committed in r151890.
Expose the IsIdentifier bit to the JIT.
* wtf/text/StringImpl.h:
(WTF::StringImpl::flagIsIdentifier):
2013-06-18 Filip Pizlo <fpizlo@apple.com>
fourthTier: DFG should have switch_char
https://bugs.webkit.org/show_bug.cgi?id=117710
Reviewed by Michael Saboff.
I wanted to be able to say stringImpl->at(index), and now I can!
Also made it possible to convert a UChar to a utf8 CString without
allocating a StringImpl.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::utf8Impl):
(WTF):
(WTF::StringImpl::utf8ForCharacters):
(WTF::StringImpl::utf8ForRange):
* wtf/text/StringImpl.h:
(StringImpl):
(WTF::StringImpl::at):
(WTF::StringImpl::operator[]):
2013-06-15 Filip Pizlo <fpizlo@apple.com>
fourthTier: Add CFG simplification for Switch
https://bugs.webkit.org/show_bug.cgi?id=117677
Reviewed by Mark Hahnenberg.
* wtf/TriState.h:
* wtf/text/StringImpl.h:
2013-06-15 Filip Pizlo <fpizlo@apple.com>
Printing a StringImpl* should really guard against NULL
https://bugs.webkit.org/show_bug.cgi?id=117675
Reviewed by Mark Hahnenberg.
* wtf/PrintStream.cpp:
(WTF::printInternal):
2013-06-11 Filip Pizlo <fpizlo@apple.com>
fourthTier: DFG should support op_in and it should use patching to make it fast
https://bugs.webkit.org/show_bug.cgi?id=117385
Reviewed by Geoffrey Garen.
Now if you pass a null StringImpl* then something will still get printed instead
of crashing. I figure that this is broadly useful for debug code, and I make use
of it in the JSC portion of this patch.
* wtf/PrintStream.cpp:
(WTF::printInternal):
2013-06-09 Filip Pizlo <fpizlo@apple.com>
Unreviewed, fix build. On some compilers the automatic coercion from WTF::String to NSString*
causes operator[] to appear ambiguous. One way around this is to make WTF::String behave like
most of our other classes: at(unsigned) is always a valid synonym for operator[](unsigned).
* wtf/text/WTFString.h:
(WTF::String::at):
(WTF::String::operator[]):
2013-06-08 Filip Pizlo <fpizlo@apple.com>
fourthTier: Recursive deadlock in DFG::ByteCodeParser
https://bugs.webkit.org/show_bug.cgi?id=117376
Reviewed by Mark Hahnenberg.
I've often wanted to leave a lock early. Now I have that power!
* wtf/Locker.h:
(WTF::Locker::Locker):
(WTF::Locker::~Locker):
(Locker):
(WTF::Locker::unlockEarly):
(WTF::Locker::lock):
2013-05-27 Filip Pizlo <fpizlo@apple.com>
It should be possible to record heap operations (both FastMalloc and JSC GC)
https://bugs.webkit.org/show_bug.cgi?id=116848
Reviewed by Mark Hahnenberg.
* WTF.xcodeproj/project.pbxproj:
* wtf/DataLog.cpp:
(WTF):
(WTF::initializeLogFileOnce):
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
* wtf/Platform.h:
2013-05-21 Filip Pizlo <fpizlo@apple.com>
fourthTier: DFG should be able to run on a separate thread
https://bugs.webkit.org/show_bug.cgi?id=112839
Reviewed by Geoffrey Garen.
* wtf/ByteSpinLock.h:
Make it non-copyable. We previously had bugs where we used ByteSpinLock as a locker.
Clearly that's bad.
* wtf/MetaAllocatorHandle.h:
Make it thread-safe ref-counted, since we may now be passing them between the
concurrent JIT thread and the main thread.
* wtf/Vector.h:
(WTF::Vector::takeLast):
I've wanted this method for ages, and now I finally added.
2013-04-30 Filip Pizlo <fpizlo@apple.com>
fourthTier: DFG tries to ref/deref StringImpls in a ton of places
https://bugs.webkit.org/show_bug.cgi?id=115300
Reviewed by Geoffrey Garen.
Make it possible to do more things directly to StringImpl*'s, including being
able to directly do utf8 conversion on a substring without creating the
substring first.
Add assertions to StringImpl that it isn't being ref/deref'd from the
compilation thread.
* wtf/PrintStream.cpp:
(WTF::printInternal):
(WTF):
* wtf/PrintStream.h:
(WTF):
(WTF::printInternal):
* wtf/StringPrintStream.h:
(WTF):
(WTF::toCString):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::utf8ForRange):
(WTF::StringImpl::utf8):
(WTF):
* wtf/text/StringImpl.h:
(StringImpl):
(WTF::StringImpl::hasAtLeastOneRef):
(WTF::StringImpl::ref):
(WTF::StringImpl::deref):
2013-04-29 Filip Pizlo <fpizlo@apple.com>
fourthTier: String::utf8() should also be available as StringImpl::utf8() so that you don't have to ref() a StringImpl just to get its utf8()
https://bugs.webkit.org/show_bug.cgi?id=115393
Reviewed by Geoffrey Garen.
* WTF.xcodeproj/project.pbxproj:
* wtf/text/ConversionMode.h: Added.
(WTF):
* wtf/text/StringImpl.cpp:
(WTF):
(WTF::putUTF8Triple):
(WTF::StringImpl::utf8):
* wtf/text/StringImpl.h:
(StringImpl):
* wtf/text/WTFString.cpp:
(WTF):
(WTF::String::utf8):
* wtf/text/WTFString.h:
(String):
2013-07-16 Oliver Hunt <oliver@apple.com>
Merge dfgFourthTier r149301
2013-04-28 Filip Pizlo <fpizlo@apple.com>
fourthTier: ASSERT that commonly used not-thread-safe methods in the runtime are not being called during compilation
https://bugs.webkit.org/show_bug.cgi?id=115297
Reviewed by Geoffrey Garen.
Taught WTF the notion of compilation threads. This allows all parts of our stack
to assert that we're not being called from a JSC compilation thread. This is in
WTF because it will probably end up being used in StringImpl and WTFString.
* WTF.xcodeproj/project.pbxproj:
* wtf/CompilationThread.cpp: Added.
(WTF):
(WTF::initializeCompilationThreadsOnce):
(WTF::initializeCompilationThreads):
(WTF::isCompilationThread):
(WTF::exchangeIsCompilationThread):
* wtf/CompilationThread.h: Added.
(WTF):
(CompilationScope):
(WTF::CompilationScope::CompilationScope):
(WTF::CompilationScope::~CompilationScope):
(WTF::CompilationScope::leaveEarly):
2013-07-16 Oliver Hunt <oliver@apple.com>
Merge dfgFourthTier r148836
2013-04-21 Filip Pizlo <fpizlo@apple.com>
fourthTier: It should be possible to query WatchpointSets, and add Watchpoints, even if the compiler is running in another thread
https://bugs.webkit.org/show_bug.cgi?id=114909
Reviewed by Oliver Hunt.
Harden our notions of memory fences, now that we're doing racy algorithms.
* wtf/Atomics.h:
(WTF):
(WTF::compilerFence):
(WTF::armV7_dmb):
(WTF::armV7_dmb_st):
(WTF::loadLoadFence):
(WTF::loadStoreFence):
(WTF::storeLoadFence):
(WTF::storeStoreFence):
(WTF::memoryBarrierAfterLock):
(WTF::memoryBarrierBeforeUnlock):
(WTF::x86_mfence):
2013-07-16 Oliver Hunt <oliver@apple.com>
Merge dfgFourthTier r148804
2013-04-20 Filip Pizlo <fpizlo@apple.com>
fourthTier: value profiles and array profiles should be thread-safe enough to be accessible in a concurrent compilation thread
https://bugs.webkit.org/show_bug.cgi?id=114906
Reviewed by Oliver Hunt.
Add ability to abstract whether or not the CodeBlock requires locking at all,
since some platforms may not support the byte spin-locking and/or may not want
to, if they turn off concurrent JIT.
* WTF.xcodeproj/project.pbxproj:
* wtf/ByteSpinLock.h:
* wtf/NoLock.h: Added.
(WTF):
(NoLock):
(WTF::NoLock::lock):
(WTF::NoLock::unlock):
(WTF::NoLock::isHeld):
* wtf/Platform.h:
2013-04-17 Filip Pizlo <fpizlo@apple.com>
fourthTier: all inline caches should thread-safe enough to allow a concurrent compilation thread to read them safely
https://bugs.webkit.org/show_bug.cgi?id=114762
Reviewed by Mark Hahnenberg.
Implemented a new spinlock that is optimized for compactness, by using just a byte.
This will be useful as we start using fine-grained locking on a bunch of places.
At some point I'll make these byte-sized spinlocks into adaptive mutexes, but for
now I think it's fine to do the evil thing and use spinning particularly since we
only use them for short critical sections.
* WTF.xcodeproj/project.pbxproj:
* wtf/Atomics.h:
(WTF):
(WTF::weakCompareAndSwap):
* wtf/ByteSpinLock.h: Added.
(WTF):
(ByteSpinLock):
(WTF::ByteSpinLock::ByteSpinLock):
(WTF::ByteSpinLock::lock):
(WTF::ByteSpinLock::unlock):
(WTF::ByteSpinLock::isHeld):
* wtf/ThreadingPrimitives.h:
(WTF::pauseBriefly):
(WTF):
2013-04-12 Filip Pizlo <fpizlo@apple.com>
fourthTier: FTL should have OSR exit
https://bugs.webkit.org/show_bug.cgi?id=113623
Reviewed by Oliver Hunt.
Finally make toCString() somewhat variadic.
* wtf/StringPrintStream.h:
(WTF):
(WTF::toCString):
2013-03-31 Filip Pizlo <fpizlo@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=113656
Fix Sam's nits.
Unreviewed.
Forgot to land these as part of http://trac.webkit.org/changeset/147299.
* wtf/MathExtras.h:
(isGreaterThanNonZeroPowerOfTwo):
2013-03-29 Filip Pizlo <fpizlo@apple.com>
fourthTier: FTL JIT should be able run some simple function
https://bugs.webkit.org/show_bug.cgi?id=113481
Reviewed by Geoffrey Garen.
* wtf/Platform.h:
2013-07-22 Benjamin Poulain <benjamin@webkit.org>
String::lower() - Skip to slow path on the first failure
https://bugs.webkit.org/show_bug.cgi?id=118885
Reviewed by Andreas Kling.
In the 8 bits case, we don't need to know the state of the full string before changing characters
to their lowercase variant.
Just fail immediately and start transforming characters from the point of failure.
This avoid reading the string twice when the uppercase character is not at the end of the string.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::lower):
2013-07-22 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build fix.
* WTF.vcxproj/WTFGenerated.make: Stop triggering a "Build All" when things have not changed.
2013-07-19 Alex Christensen <achristensen@apple.com>
Added x64 configuration to Visual Studio build.
https://bugs.webkit.org/show_bug.cgi?id=118888
Reviewed by Brent Fulgham.
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.vcxproj/WTFGenerated.vcxproj:
2013-07-18 Benjamin Poulain <benjamin@webkit.org>
Fix the build after r152881
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::lower):
2013-07-18 Benjamin Poulain <benjamin@webkit.org>
Little cleaning of StringImpl::lower() and StringImpl::upper() for ARM
https://bugs.webkit.org/show_bug.cgi?id=118831
Reviewed by Gavin Barraclough.
Clean lower() and upper() before trying some optimizations:
-Prefix the code with the empty() case. Otherwise, each descending loop starts with
a check for length == 0.
-Change ored to a 32 bits registers. ARM only has 32 bits registers and access to full word.
To keep the value a UChar, the compiler is adding a bunch of useless value & 0xffff in the loops.
-Change the pointer based loops for index based loops. The compiler does a mighty job at optimizing
those for each architecture. No need to make the code more complex.
-Don't perform the check for int32 unless we need to. The only code limited to int is Unicode::toLower.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::lower):
(WTF::StringImpl::upper):
2013-07-18 Andreas Kling <akling@apple.com>
CodeBlock::m_argumentValueProfiles wastes a lot of memory.
<http://webkit.org/b/118852>
<rdar://problem/14481659>
Reviewed by Anders Carlsson.
Add Vector::resizeToFit(size), like resize() but without growth padding.
* wtf/Vector.h:
(WTF::::resizeToFit):
2013-07-17 Benjamin Poulain <benjamin@webkit.org>
Add a thread safety assertion when creating an AtomicString from a StringImpl
https://bugs.webkit.org/show_bug.cgi?id=118637
Reviewed by Sam Weinig.
The goal is to prevent this kind of use:
-Someone create a String from a StringImpl.
-At some point, the string becomes atomic.
-Later, when the string only has one ref, its ownership is 'passed' to an other thread
without checking String::isSafeToSendToAnotherThread().
-In the thread B, an AtomicString is created from the String.
->The AtomicString's StringImpl returned is not in the current thread string table.
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::isInAtomicStringTable):
* wtf/text/AtomicString.h:
(WTF::AtomicString::add):
2013-07-17 Benjamin Poulain <benjamin@webkit.org>
Simplify AtomicString::lower()
https://bugs.webkit.org/show_bug.cgi?id=118719
<rdar://problem/14452883>
Reviewed by Gavin Barraclough.
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::lower): Previously, the code was using a copy constructor for two path
and one regular construction in another path.
Just put the StringImpl where it needs to be instead.
2013-07-15 Benjamin Poulain <benjamin@webkit.org>
Add a threading assertion to AtomicString::remove
https://bugs.webkit.org/show_bug.cgi?id=118695
Reviewed by Sam Weinig.
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::remove): The destructor of StringImpl remove
the string from the string table if it is atomic. This needs to be done
on the same thread as the one on which the string was added (otherwise the original
table would keep a dangling pointer to a dead string).
2013-07-15 Benjamin Poulain <benjamin@webkit.org>
Minor cleaning of AtomicString::addSlowCase
https://bugs.webkit.org/show_bug.cgi?id=118615
Reviewed by Geoffrey Garen.
Give the variable a proper name.
Add assertions to clarify the in and out states.
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::addSlowCase):
2013-07-12 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Improve StringImpl::constructInternal() method
https://bugs.webkit.org/show_bug.cgi?id=118503
Reviewed by Benjamin Poulain.
StringImpl::constructInternal used 'if ()' statement to decide which constructor
to invoke hence compiler had to compile both branches even though optimizer would
have then removed one of those, and as the function is inline it could affect
slightly the compilation time.
The problem is solved via template specialization.
* wtf/text/StringImpl.h:
(WTF::LChar):
(WTF::UChar):
2013-07-11 Patrick Gansterer <paroga@webkit.org>
Remove unused Windows CE files
https://bugs.webkit.org/show_bug.cgi?id=118557
Reviewed by Andreas Kling.
* wtf/wince/FastMallocWinCE.h: Removed.
* wtf/wince/MemoryManager.cpp: Removed.
* wtf/wince/MemoryManager.h: Removed.
2013-07-10 Michael Brüning <michael.bruning@digia.com>
Workaround for x86 optimizer bug in MSVC 2012.
https://bugs.webkit.org/show_bug.cgi?id=118478
Reviewed by Benjamin Poulain.
This is a workaround for a bug in the x86 MSVC 2012 optimizer.
The problem is that the range comparison gets optimized out when
the templated inline function toASCIIUpper. Copying the methods
content fixes the problem.
This is unfortunately not the nicest fix, but the alternative would
be to turn off optimization for StringImpl::upper on the x86 MSVC 2012
build, which might impact overall performance negatively.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::upper):
2013-07-08 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.list.am: Add missing header files.
2013-07-08 Antti Koivisto <antti@apple.com>
Add Deque::removeLast
https://bugs.webkit.org/show_bug.cgi?id=118466
Reviewed by Andreas Kling.
Deque can remove both the first and the last element efficiently.
Test: TestWebKitAPI/Tests/WTF/Deque.cpp
* wtf/Deque.h:
(WTF::::takeLast):
(WTF::::removeLast):
2013-07-08 Zoltan Arvai <zarvai@inf.u-szeged.hu>
[Qt][Windows] Buildfix after r152426.
Reviewed by Csaba Osztrogonác.
* wtf/Platform.h: Do not include WTFHeaderDetection.h on Qt build.
2013-07-06 Benjamin Poulain <benjamin@webkit.org>
Fix the performance regressions introduced by r152418
https://bugs.webkit.org/show_bug.cgi?id=118438
Reviewed by Sam Weinig.
* wtf/text/StringImpl.h:
(WTF::equal):
Looping between two arbitrary pointers prevents important loop
optimizations.
2013-07-05 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build correction.
* WTF.vcxproj/WTFGenerated.make: Avoid syntax error in generated
file in cases where Legible Output support is not present.
2013-07-05 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build correction.
* WTF.vcxproj/WTFGenerated.make: Use space (rather than double
quotes) when handling the no-Legible-Output case.
2013-07-05 Brent Fulgham <bfulgham@apple.com>
[Windows] Identify OS-level at build-time.
https://bugs.webkit.org/show_bug.cgi?id=118428
Reviewed by Anders Carlsson.
* WTF.vcxproj/WTFGenerated.make: Check for Legible Output featurs
and set build environment as appropriate.
* wtf/Platform.h: Activate Legible Output features if present.
2013-07-05 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
A lot of code duplication within StringImpl 'equal' functions
https://bugs.webkit.org/show_bug.cgi?id=118415
Reviewed by Anders Carlsson.
There has been a lot of code duplication within StringImpl 'equal' functions:
the whole logic was copied to every overloaded 'equal' function.
Fixed now using templates and std::equal.
* wtf/text/StringImpl.cpp:
(WTF::equalInternal):
(WTF::equal):
* wtf/text/StringImpl.h:
(WTF::arraysEqual):
(WTF::equal):
2013-07-05 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Remove code duplication from StringImpl create()/reallocate() methods
https://bugs.webkit.org/show_bug.cgi?id=118355
Reviewed by Andreas Kling.
StringImpl create()/reallocate() methods accepting LChar and UChar used to have
duplicated code. The code duplication is removed now via used templates.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::constructInternal):
(WTF::LChar):
(WTF::StringImpl::createUninitializedInternal):
(WTF::StringImpl::createUninitialized):
(WTF::StringImpl::reallocateInternal):
(WTF::StringImpl::reallocate):
(WTF::StringImpl::createInternal):
(WTF::StringImpl::create):
* wtf/text/StringImpl.h:
2013-07-03 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build correction.
* WTF.vcxproj/copy-files.cmd: Limit path (for this file) to DOS-only to avoid
the Cygwin variant of rmdir from being used.
2013-07-03 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r152356.
http://trac.webkit.org/changeset/152356
https://bugs.webkit.org/show_bug.cgi?id=118361
Broke JSCore tests (Requested by andersca on #webkit).
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::createUninitialized):
(WTF::StringImpl::reallocate):
(WTF::StringImpl::create):
* wtf/text/StringImpl.h:
2013-07-03 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Remove code duplication from StringImpl create()/reallocate() methods
https://bugs.webkit.org/show_bug.cgi?id=118355
Reviewed by Anders Carlsson.
StringImpl create()/reallocate() methods accepting LChar and UChar used to have
duplicated code. The code duplication is removed now via used templates.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::constructInternal):
(WTF::LChar):
(WTF::StringImpl::createUninitializedInternal):
(WTF::StringImpl::createUninitialized):
(WTF::StringImpl::reallocateInternal):
(WTF::StringImpl::reallocate):
(WTF::StringImpl::createInternal):
(WTF::StringImpl::create):
* wtf/text/StringImpl.h:
2013-07-03 Csaba Osztrogonác <ossy@webkit.org>
Fix cast-align warnings in FastMalloc.cpp
https://bugs.webkit.org/show_bug.cgi?id=117991
Reviewed by Mark Hahnenberg.
* wtf/FastMalloc.cpp:
2013-07-02 Geoffrey Garen <ggaren@apple.com>
plainText() is O(N^2)
https://bugs.webkit.org/show_bug.cgi?id=118282
<rdar://problem/14284360>
Reviewed by Alexey Proskuryakov.
* wtf/text/StringBuilder.cpp:
(WTF::expandCapacity): Factored out this helper function to simplify
some code that was duplicated in four places.
(WTF::StringBuilder::appendUninitializedSlow):
(WTF::StringBuilder::append): Use expandCapacity(). One of the cases
was not doing anything special, and so was O(N^2).
Also, always call expandCapacity() it in a standard way, calling
capacity() first, so it's easy to tell at a glance that you got it right.
2013-07-02 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Avoid code duplication inside String::append()
https://bugs.webkit.org/show_bug.cgi?id=118290
Reviewed by Anders Carlsson.
The implementation of 'append(UChar)' had been repeated inside 'append(LChar)',
this duplication is obviated now.
* wtf/text/WTFString.cpp:
(WTF::String::appendInternal):
(WTF::String::append):
* wtf/text/WTFString.h:
2013-06-28 Anders Carlsson <andersca@apple.com>
Remove String::deprecatedCharactersWithNullTermination() and related code
https://bugs.webkit.org/show_bug.cgi?id=118211
Reviewed by Benjamin Poulain.
Remove String::deprecatedCharactersWithNullTermination, StringImpl::createWithTerminatingNullCharacter
and the s_hashFlagHasTerminatingNullCharacter flag. We no longer care about whether strings have a
terminating null character.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::createFromLiteral):
(WTF::StringImpl::createWithoutCopying):
(WTF::StringImpl::getData16SlowCase):
(WTF::StringImpl::sizeInBytes):
* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl):
(WTF::StringImpl::createFromLiteral):
(WTF::StringImpl::isolatedCopy):
* wtf/text/WTFString.cpp:
* wtf/text/WTFString.h:
2013-06-27 Anders Carlsson <andersca@apple.com>
Add a new String::charactersWithNullTermination() function that returns a vector
https://bugs.webkit.org/show_bug.cgi?id=118155
Reviewed by Andreas Kling.
This new String::charactersWithNullTermination() function returns a new Vector<UChar>
and does not modify the underlying string data.
* wtf/text/WTFString.cpp:
(WTF::String::charactersWithNullTermination):
* wtf/text/WTFString.h:
2013-06-26 Anders Carlsson <andersca@apple.com>
Deprecate StringImpl::charactersWithNullTermination
https://bugs.webkit.org/show_bug.cgi?id=118108
Reviewed by Beth Dakin.
The optimization in String and StringImpl to keep track of whether a string
has a null terminator isn't worth it; in most cases we call charactersWithNullTermination() on
temporary strings which ends up copying strings anyway.
A better solution is to have a charactersWithNullTermination() function that returns a Vector<UChar>,
which is similar to what we have for String::utf8() and String::ascii(). This will be done in a follow-up patch.
* wtf/text/WTFString.cpp:
(WTF::String::deprecatedCharactersWithNullTermination):
* wtf/text/WTFString.h:
2013-06-26 Anders Carlsson <andersca@apple.com>
Add JSStringCreateWithCharactersNoCopy SPI
https://bugs.webkit.org/show_bug.cgi?id=118074
<rdar://problem/14279905>
Reviewed by Geoffrey Garen.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::createFromLiteral):
Use the new ConstructWithoutCopying constructor, passing DoesHaveTerminatingNullCharacter to it.
Change the other createFromLiteral overload to just call the first.
(WTF::StringImpl::createWithoutCopying):
Add helper functions for creating strings that shouldn't copy their underlying data.
* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl):
Rename the ConstructFromLiteralTag constructor enum to ConstructWithoutCopyingTag. Change the constructor
to take an enum that states whether the string has a terminating null character or not.
(WTF::StringImpl::createFromLiteral):
Call createWithoutCopying.
(WTF::StringImpl::requiresCopy):
Rename this from isASCIILiteral() and make it more generic so it can handle 16-bit strings as well.
(WTF::StringImpl::isolatedCopy):
If this string doesn't have to be copied, just create a new StringImpl object that references the current data.
2013-06-26 Jer Noble <jer.noble@apple.com>
Potential use-after-free after neutering AudioBuffer's underlying ArrayBuffer.
https://bugs.webkit.org/show_bug.cgi?id=118040
Reviewed by Filip Pizlo.
Add support for 'unneuterable' ArrayBufferViews. Views marked as such will have their underlying
ArrayBuffer objects copied rather than transferred to a new view.
* wtf/ArrayBuffer.cpp:
(WTF::ArrayBuffer::transfer): Check whether the associated views are neuterable, and if not
clone the ArrayBuffer rather than transferring it.
* wtf/ArrayBuffer.h:
(WTF::ArrayBufferContents::copyTo): Added. Utility function.
* wtf/ArrayBufferView.cpp:
(WTF::ArrayBufferView::ArrayBufferView):
(WTF::ArrayBufferView::neuter):
* wtf/ArrayBufferView.h:
(WTF::ArrayBufferView::setNeuterable):
(WTF::ArrayBufferView::isNeuterable):
2013-06-26 Brent Fulgham <bfulgham@apple.com>
[Windows] Enable CaptionUserPreferenceMediaAF on Windows.
https://bugs.webkit.org/show_bug.cgi?id=118076
Reviewed by Eric Carlson.
* wtf/Platform.h: Enable Media Accessibility Framework in Windows build environments
that support it.
2013-06-24 Roger Fong <roger_fong@apple.com>
Unreviewed. AppleWin build fix, followup to r151915.
* WTF.vcxproj/WTFProduction.props:
2013-06-24 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
HashMap: reverse the order of the template arguments at alternate 'find', 'contains' and 'add' methods
https://bugs.webkit.org/show_bug.cgi?id=117911
Reviewed by Anders Carlsson.
The order of the template arguments at HashMap alternate 'find', 'contains' and
'add' methods is reversed so that callers can just pass the translator
and let the compiler deduce input argument type.
Another rational is consistency with HashSet class.
* wtf/HashMap.h:
2013-06-24 peavo@outlook.com <peavo@outlook.com>
[WinCairo] WTF.dll is linking with CoreFoundation.lib in VS2010.
https://bugs.webkit.org/show_bug.cgi?id=117294
Reviewed by Brent Fulgham.
WinCairo build should not use CoreFoundation.
* WTF.vcxproj/WTFCFLite.props: Added.
* WTF.vcxproj/WTFCommon.props: Remove CoreFoundation.lib from depencency list.
* WTF.vcxproj/WTFCoreFoundation.props: Added.
* WTF.vcxproj/WTFDebug.props: Import WTFCoreFoundation.props for WinApple.
* WTF.vcxproj/WTFDebugWinCairo.props: Import WTFCFLite.props for WinCairo.
* WTF.vcxproj/WTFRelease.props: Import WTFCoreFoundation.props for WinApple.
* WTF.vcxproj/WTFReleaseWinCairo.props: Import WTFCFLite.props for WinCairo.
2013-06-17 Darin Adler <darin@apple.com>
Sort all the Xcode project files
https://bugs.webkit.org/show_bug.cgi?id=117696
Reviewed by Anders Carlsson.
* WTF.xcodeproj/project.pbxproj: Ran the sort-Xcode-project-file script.
2013-06-20 Sergio Correia <sergio.correia@openbossa.org>
[WK2] Looping for EINTR on close() is incorrect for Linux, at least
https://bugs.webkit.org/show_bug.cgi?id=117266
Reviewed by Darin Adler.
Added file UniStdExtras with a closeWithRetry() function that works around
the EINTR behavior on Linux during a close() call: it closes the descriptor
unconditionally even when the call is interrupted.
* wtf/UniStdExtras.h: Added.
(WTF::closeWithRetry): Wrapper around POSIX close() that handles EINTR
correctly.
2013-06-20 Mark Lam <mark.lam@apple.com>
Refine the StackBounds computation for Windows.
https://bugs.webkit.org/show_bug.cgi?id=117854.
Reviewed by Brent Fulgham.
* wtf/StackBounds.cpp:
(WTF::StackBounds::initialize):
2013-06-20 Mark Lam <mark.lam@apple.com>
[Windows] Undoing r150621 to roll r150600 back in as the jsc test
failures have been fixed in r151808.
https://bugs.webkit.org/show_bug.cgi?id=116661.
Reviewed by Brent Fulgham.
* wtf/StackBounds.cpp:
(WTF::StackBounds::initialize):
2013-06-20 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
HashSet: reverse the order of the template arguments at alternate 'find', 'contains' and 'add' methods
https://bugs.webkit.org/show_bug.cgi?id=117830
Reviewed by Anders Carlsson.
The order of the template arguments at HashSet alternate 'find', 'contains' and
'add' methods is reversed so that callers can just pass the translator
and let the compiler deduce input argument type.
* wtf/HashSet.h:
* wtf/text/AtomicString.cpp:
(WTF::addToStringTable):
(WTF::findString):
2013-06-20 Roger Fong <roger_fong@apple.com>
Make Windows makefile copy build output to a different folder.
<rdar://problem/14219184>.
* WTF.vcxproj/WTF.make:
2013-06-19 Geoffrey Garen <ggaren@apple.com>
Remove the SegmentedVector inline segment to shrink CodeBlock by 6X
https://bugs.webkit.org/show_bug.cgi?id=117808
Reviewed by Oliver Hunt.
SegmentedVector allocation isn't super hot, but we do tend to have many
live SegmentedVectors at runtime, particularly in CodeBlocks, so the
right tradeoff is to allocate segments out-of-line as needed.
This reduces startup memory usage @ google.com by about 6MB.
No regression on SunSpider.
* wtf/SegmentedVector.h:
(WTF::SegmentedVector::SegmentedVector):
(WTF::SegmentedVector::at):
(WTF::SegmentedVector::append):
(WTF::SegmentedVector::removeLast):
(WTF::SegmentedVector::clear):
(WTF::SegmentedVector::deleteAllSegments): No more inline segment.
(WTF::SegmentedVector::ensureSegmentsFor): This code used to assume
that there was always a 0 segment, so the math would underflow if there
were no 0 segment. I udpated the math to account for having no segments.
2013-06-19 David Kilzer <ddkilzer@apple.com>
BUILD FIX (r151663): Fix build for iOS WebKit
* wtf/text/AtomicStringTable.cpp: Include MainThread.h.
(WTF::AtomicStringTable::create): Use AtomicStringTable::destroy
instead of non-existent destroyAtomicStringTable function.
2013-06-18 Roger Fong <roger_fong@apple.com>
Replace tools32 folder with tools and update WebKit Windows solution accordingly.
<rdar://problem/14118143>.
Rubberstamped by Brent Fulgham.
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTFDebug.props:
* WTF.vcxproj/WTFDebugWinCairo.props:
* WTF.vcxproj/WTFGenerated.vcxproj:
* WTF.vcxproj/WTFGeneratedDebug.props:
* WTF.vcxproj/WTFGeneratedProduction.props:
* WTF.vcxproj/WTFGeneratedRelease.props:
* WTF.vcxproj/WTFProduction.props:
* WTF.vcxproj/WTFRelease.props:
* WTF.vcxproj/WTFReleaseWinCairo.props:
* WTF.vcxproj/work-around-vs-dependency-tracking-bugs.py:
(react_to_vsprops_changes):
2013-06-18 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
PackedIntVector: check template arguments at compile time
https://bugs.webkit.org/show_bug.cgi?id=117737
Use 'COMPILE_ASSERT' instead of 'ASSERT' in PackedIntVector class
constructor.
Reviewed by Sam Weinig.
* wtf/PackedIntVector.h:
(WTF::PackedIntVector::PackedIntVector):
2013-06-17 Andy Estes <aestes@apple.com>
A static_assert() in RetainPtr.h sometimes causes the build to fail.
Wrap the first argument to a static_assert() in parentheses since it
contains a comma, which sometimes tricks the preprocessor into thinking
the macro is being passed three arguments rather than two.
Reviewed by Brian Weinstein.
* wtf/RetainPtr.h:
(WTF::RetainPtr::RetainPtr):
2013-06-17 Zan Dobersek <zdobersek@igalia.com>
REGRESSION (r149184): Build errors in RefPtr.h when building with Clang, C++98 standard
https://bugs.webkit.org/show_bug.cgi?id=116352
Reviewed by Anders Carlsson.
Use the __has_feature macro instead of the __has_extension one when detecting what features the Clang compiler
that's being used is capable to provide. With the project moving onto using C++11 throughout its components,
there currently exist cases where C++11-specific functionality (for instance std::move) is used despite being
guarded by compiler-specific feature guards that still get enabled even when compiling in C++98 with Clang.
The problematic features are enabled because they're available as C++98 language extensions by Clang.
Using __has_feature instead enables the feature guard only if the tested feature is actually standardized in
the currently used language standard.
* wtf/Compiler.h:
2013-06-17 Ryosuke Niwa <rniwa@webkit.org>
Initialize AtomicStringTable in WTFThreadData's constructor
https://bugs.webkit.org/show_bug.cgi?id=117671
Reviewed by Geoffrey Garen.
Extracted AtomicStringTable from AtomicString.cpp into AtomicStringTable.h/cpp
and made WTFThreadDada::WTFThreadData create the atomic string table for the thread.
This eliminates a branch from stringTable() in AtomicString.cpp.
* GNUmakefile.list.am:
* WTF.pro:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/WTFThreadData.cpp:
(WTF::WTFThreadData::WTFThreadData):
* wtf/text/AtomicString.cpp:
(WTF::stringTable):
* wtf/text/AtomicStringTable.cpp: Added.
(WTF::AtomicStringTable::create):
(WTF::AtomicStringTable::destroy):
* wtf/text/AtomicStringTable.h: Added.
(WTF::AtomicStringTable::table):
2013-06-17 Roger Fong <roger_fong@apple.com>
Modify Windows makefiles to copy some bin output into Program Files.
https://bugs.webkit.org/show_bug.cgi?id=117714.
<rdar://problem/14179054>
Reviewed by Brent Fulgham.
* WTF.vcxproj/WTF.make:
2013-06-17 Grzegorz Czajkowski <g.czajkowski@samsung.com>
Unreviewed, rolling out r151632.
http://trac.webkit.org/changeset/151632
https://bugs.webkit.org/show_bug.cgi?id=117585
Debug build error ASSERT(WTF_USE_GRAMMAR_CHECKING) for non MAC
platforms
* wtf/Platform.h:
2013-06-14 Grzegorz Czajkowski <g.czajkowski@samsung.com>
Context menu grammar checking items are available when GRAMMAR_CHECKING macro is off
https://bugs.webkit.org/show_bug.cgi?id=117585
Reviewed by Anders Carlsson.
Enable GRAMMAR_CHECKING for WebKit ports that use/implement it.
* wtf/Platform.h:
2013-06-14 Patrick Gansterer <paroga@webkit.org>
Introduce USE(WINGDI) for the Windows port
https://bugs.webkit.org/show_bug.cgi?id=116138
Reviewed by Ryosuke Niwa.
Using USE(WINGDI) instead of OS(WINCE) will allow us to
compile the GDI based Windows port on WinNT too.
* wtf/Platform.h:
2013-06-13 Ryosuke Niwa <rniwa@webkit.org>
Remove LiteralIdentifierTable
https://bugs.webkit.org/show_bug.cgi?id=117613
Reviewed by Geoffrey Garen.
Removed LiteralIdentifierTable since it doesn't seem to have any perf. impact now.
* wtf/WTFThreadData.h:
2013-06-13 Brent Fulgham <bfulgham@apple.com>
[WinCairo] Correct FeatureDefines.h Default for ENABLE_VIEW_MODE_CSS_MEDIA
https://bugs.webkit.org/show_bug.cgi?id=114396
Reviewed by Dean Jackson.
* wtf/FeatureDefines.h: The WinCairo port does not (currently) support Media elements,
so make sure we do not enable this feature by default for that port.
2013-06-13 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed gardening.
* WTF.vcxproj/WTF.vcxproj: Add FeatureDefines.h to visible files.
* WTF.vcxproj/WTF.vcxproj.filters: Ditto.
2013-06-13 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Optimize String::fromUTF8 for ASCII
https://bugs.webkit.org/show_bug.cgi?id=117586
Reviewed by Brent Fulgham.
From Blink r152243 by <abarth@chromium.org>
Current String::fromUTF8() implementation converts 8 bit ASCII character into 16 bit.
Instead of always trying to convert into a 16 bit buffer, we can add a call to charactersAreAllASCII.
In the common case when characters are ASCII, we directly copy it into an 8 bit string buffer.
* wtf/text/WTFString.cpp:
(WTF::String::fromUTF8):
2013-06-12 Brent Fulgham <bfulgham@apple.com>
[Windows] Activate supported C++11 Features for VS2010
https://bugs.webkit.org/show_bug.cgi?id=117569
Reviewed by Anders Carlsson.
* wtf/Compiler.h: Turn on rvalue references and static_assert
when compiling with VS2010 (or newer)
2013-06-07 Roger Fong <roger_fong@apple.com>
Unreviewed. Makefile fix. Copy WTF.dll over as well.
* WTF.vcxproj/WTF.make:
2013-06-07 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r151318.
http://trac.webkit.org/changeset/151318
https://bugs.webkit.org/show_bug.cgi?id=117356
Broke Windows Release Build (Requested by bfulgham on
#webkit).
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTFCommon.props:
* WTF.vcxproj/WTFCoreFoundation.props: Removed.
* WTF.vcxproj/WTFDebug.props:
* WTF.vcxproj/WTFRelease.props:
2013-06-07 peavo@outlook.com <peavo@outlook.com>
[WinCairo] WTF.dll is linking with CoreFoundation.lib in VS2010.
https://bugs.webkit.org/show_bug.cgi?id=117294
Reviewed by Darin Adler.
WinCairo build should not use CoreFoundation.
* WTF.vcxproj/WTF.vcxproj: Exclude unneeded file from WinCairo build.
* WTF.vcxproj/WTFCommon.props: Removed CoreFoundation.lib from common props.
* WTF.vcxproj/WTFCoreFoundation.props: Added.
* WTF.vcxproj/WTFDebug.props: Inherit from WTFCoreFoundations.props.
* WTF.vcxproj/WTFRelease.props: Inherit from WTFCoreFoundations.props.
2013-06-06 Roger Fong <roger_fong@apple.com>
Unreviewed. Fix typo with winmm linker input.
* WTF.vcxproj/WTFCommon.props:
2013-06-05 Benjamin Poulain <bpoulain@apple.com>
WebSQL forces 16-bit strings
https://bugs.webkit.org/show_bug.cgi?id=116935
Reviewed by Darin Adler.
Merge chromium 49c9632ac135f6f06e623a7a81d9da1f6bb7196f.
https://chromium.googlesource.com/chromium/blink/+/49c9632ac135f6f06e623a7a81d9da1f6bb7196f
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::create8BitIfPossible):
* wtf/text/StringImpl.h:
(WTF::lengthOfNullTerminatedString):
* wtf/text/WTFString.cpp:
(WTF::String::String):
2013-06-03 Roger Fong <roger_fong@apple.com>
Nuke VS2005 files from the tree.
<rdar://problem/14042021>.
Rubberstamped by Brent Fulgham.
* WTF.vcproj: Removed.
* WTF.vcproj/WTF.make: Removed.
* WTF.vcproj/WTF.sln: Removed.
* WTF.vcproj/WTF.vcproj: Removed.
* WTF.vcproj/WTFCommon.vsprops: Removed.
* WTF.vcproj/WTFDebug.vsprops: Removed.
* WTF.vcproj/WTFDebugAll.vsprops: Removed.
* WTF.vcproj/WTFDebugCairoCFLite.vsprops: Removed.
* WTF.vcproj/WTFGenerated.make: Removed.
* WTF.vcproj/WTFGenerated.vcproj: Removed.
* WTF.vcproj/WTFGeneratedCommon.vsprops: Removed.
* WTF.vcproj/WTFGeneratedDebug.vsprops: Removed.
* WTF.vcproj/WTFGeneratedDebugAll.vsprops: Removed.
* WTF.vcproj/WTFGeneratedDebugCairoCFLite.vsprops: Removed.
* WTF.vcproj/WTFGeneratedProduction.vsprops: Removed.
* WTF.vcproj/WTFGeneratedRelease.vsprops: Removed.
* WTF.vcproj/WTFGeneratedReleaseCairoCFLite.vsprops: Removed.
* WTF.vcproj/WTFPostBuild.cmd: Removed.
* WTF.vcproj/WTFPreBuild.cmd: Removed.
* WTF.vcproj/WTFProduction.vsprops: Removed.
* WTF.vcproj/WTFRelease.vsprops: Removed.
* WTF.vcproj/WTFReleaseCairoCFLite.vsprops: Removed.
* WTF.vcproj/build-generated-files.sh: Removed.
* WTF.vcproj/copy-files.cmd: Removed.
* WTF.vcproj/work-around-vs-dependency-tracking-bugs.py: Removed.
2013-06-03 Patrick Gansterer <paroga@webkit.org>
Unreviewed WinCE build fix after r150833.
* wtf/DateMath.cpp:
(WTF::calculateDSTOffset):
2013-06-03 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[WTF] Add OwnArrayPtr vectortraits template
https://bugs.webkit.org/show_bug.cgi?id=117131
Reviewed by Darin Adler.
To support Vector<OwnArrayPtr<P>>, which will be used by EFL port.
* wtf/VectorTraits.h:
2013-05-31 Rafael Brandao <rafael.lobo@openbossa.org>
Fix double hash lookup in PageMapMemoryUsageRecorder::visit
https://bugs.webkit.org/show_bug.cgi?id=117071
Reviewed by Andreas Kling.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
2013-05-31 Brent Fulgham <bfulgham@apple.com>
[Windows] Speculative build fix for pre-VS2010 compilers
* wtf/Platform.h: Only treat WTF as DLL for VS2010 builds
2013-05-31 Zan Dobersek <zdobersek@igalia.com>
Move MD5, SHA1 unit tests from WTF to TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=116445
Reviewed by Benjamin Poulain.
Remove the MD5 and SHA1 test cases from the WTF code. The same cases are now built and run under TestWebKitAPI.
* wtf/MD5.cpp:
(WTF::MD5::MD5):
* wtf/SHA1.cpp:
(WTF::SHA1::SHA1):
2013-05-30 Roger Fong <roger_fong@apple.com>
Another unreviewed build fix for Mac.
* wtf/text/WTFString.h:
(WTF::String::fromUTF8WithLatin1Fallback):
2013-05-30 Roger Fong <roger_fong@apple.com>
Unreviewed build fix for Mac.
* wtf/OSAllocator.h:
* wtf/text/WTFString.h:
(WTF::String::fromUTF8):
2013-05-30 Roger Fong <roger_fong@apple.com>
Get rid of JavaScript exports file on AppleWin port.
https://bugs.webkit.org/show_bug.cgi?id=117050.
Reviewed by Darin Adler.
This requires turning WTF into a shared library and adding the WTF_EXPORT_PRIVATE to some methods where it was missed.
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTFCommon.props:
* wtf/DateMath.h:
* wtf/ExportMacros.h:
* wtf/FilePrintStream.h:
* wtf/OSAllocator.h:
* wtf/PageAllocationAligned.h:
* wtf/Platform.h:
* wtf/PrintStream.h:
* wtf/StackBounds.h:
* wtf/StringPrintStream.h:
* wtf/ThreadSpecific.h:
* wtf/WTFThreadData.h:
* wtf/dtoa/cached-powers.h:
* wtf/dtoa/double-conversion.h:
* wtf/text/WTFString.h:
* wtf/unicode/Collator.h:
* wtf/unicode/UTF8.h:
2013-05-29 Kent Tamura <tkent@chromium.org>
Remove ENABLE_INPUT_MULTIPLE_FIELDS_UI.
https://bugs.webkit.org/show_bug.cgi?id=116796
Reviewed by Ryosuke Niwa.
* wtf/FeatureDefines.h:
2013-05-27 Gavin Barraclough <barraclough@apple.com>
String(new Date(2010,10,1)) is wrong in KRAT, YAKT
https://bugs.webkit.org/show_bug.cgi?id=106750
Reviewed by Darin Adler.
First part of a fix, simplfy date handling code, instead of operating separately
on the UTC-standard and standard-DST offsets, just generate a combined UTC-local
offset (this is what we actually need, and what the OS gives us).
* wtf/DateMath.cpp:
(WTF::calculateUTCOffset):
(WTF::calculateDSTOffset):
- made static, now not called from outside of this file.
(WTF::calculateLocalTimeOffset):
- This combines the 2038 related adjustment from calculateDSTOffset with the
maxUnixTime adjustment from calculateDSTOffsetSimple. Then, if HAVE(TM_GMTOFF)
just call getLocalTime, if not use calculateUTCOffset/calculateDSTOffset.
(WTF::parseDateFromNullTerminatedCharacters):
- call calculateLocalTimeOffset instead of calculateUTCOffset/calculateDSTOffset
* wtf/DateMath.h:
(WTF::LocalTimeOffset::LocalTimeOffset):
(LocalTimeOffset):
(WTF::LocalTimeOffset::operator==):
- new struct type, a tuple of UTC-local offset & isDST flag.
- replaced calculateUTCOffset/calculateDSTOffset with calculateLocalTimeOffset
* wtf/GregorianDateTime.cpp:
(WTF::GregorianDateTime::setToCurrentLocalTime):
- call calculateLocalTimeOffset instead of calculateUTCOffset/calculateDSTOffset
2013-05-27 Patrick Gansterer <paroga@webkit.org>
Use correct stack size on Solaris and OpenBSD
https://bugs.webkit.org/show_bug.cgi?id=114978
Recommit after wrong rollout in r150621.
* wtf/StackBounds.cpp:
(WTF):
(WTF::StackBounds::initialize):
2013-05-27 Patrick Gansterer <paroga@webkit.org>
Use ICU_INCLUDE_DIRS in BlackBerry CMake files
https://bugs.webkit.org/show_bug.cgi?id=116210
Reviewed by Rob Buis.
Set and use the ICU_INCLUDE_DIRS variable to avoid
duplicated adding of the ICU include directory.
* wtf/PlatformBlackBerry.cmake:
2013-05-27 Ádám Kallai <kadam@inf.u-szeged.hu>
[Qt] Enable parallel GC. Probably it has been fixed in r131791.
https://bugs.webkit.org/show_bug.cgi?id=90957
Reviewed by Csaba Osztrogonác.
* wtf/Platform.h:
2013-05-26 Patrick Gansterer <paroga@webkit.org>
[WINCE] Add wtf_bsearch()
https://bugs.webkit.org/show_bug.cgi?id=116528
Reviewed by Darin Adler.
r149833 introduced usage of ::bsearch(), which does not exist on Windwos CE.
Add our own implementation of this function as wtf_bsearch and define
bsearch as wtf_bsearch to fix compilation on Windwos CE.
* wtf/StdLibExtras.h:
(wtf_bsearch):
2013-05-26 Kent Tamura <tkent@chromium.org>
Remove ENABLE_CALENDAR_PICKER
https://bugs.webkit.org/show_bug.cgi?id=116795
Reviewed by Ryosuke Niwa.
* wtf/FeatureDefines.h:
2013-05-24 Benjamin Poulain <bpoulain@apple.com>
Inline TCMalloc_Central_FreeList's RemoveRange and FetchFromSpansSafe
https://bugs.webkit.org/show_bug.cgi?id=116700
Reviewed by Darin Adler.
The two functions only have one call site each.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_Central_FreeList::RemoveRange):
(WTF::TCMalloc_Central_FreeList::FetchFromSpansSafe):
2013-05-24 Filip Pizlo <fpizlo@apple.com>
We broke !(0/0)
https://bugs.webkit.org/show_bug.cgi?id=116736
Reviewed by Gavin Barraclough.
* wtf/MathExtras.h:
(isNotZeroAndOrdered):
(isZeroOrUnordered):
2013-05-24 Anders Carlsson <andersca@apple.com>
Remove PagePopup code
https://bugs.webkit.org/show_bug.cgi?id=116732
Reviewed by Andreas Kling.
Remove ENABLE_PAGE_POPUP.
* wtf/FeatureDefines.h:
2013-05-25 Jer Noble <jer.noble@apple.com>
Mac: Set the default audio buffer size to a large value for <video> elements.
https://bugs.webkit.org/show_bug.cgi?id=116342
Reviewed by Eric Carlson.
* wtf/Platform.h: Add a WTF_USE_AUDIO_SESSION setting.
2013-05-23 Brent Fulgham <bfulgham@apple.com>
[Windows] Rolling back r150600 as it breaks the VS2010 builds.
* wtf/StackBounds.cpp: Rollback.
2013-05-23 Patrick Gansterer <paroga@webkit.org>
Use correct stack size on Solaris and OpenBSD
https://bugs.webkit.org/show_bug.cgi?id=114978
Reviewed by Oliver Hunt.
Original patch by David Hill <david@wmol.com>.
Use stack_t.ss_size for getting the size of the stack.
* wtf/Platform.h:
* wtf/StackBounds.cpp:
(WTF):
(WTF::StackBounds::initialize):
2013-05-23 Patrick Gansterer <paroga@webkit.org>
[WIN] Implement correct detection of stack size
https://bugs.webkit.org/show_bug.cgi?id=116661
Reviewed by Oliver Hunt.
* wtf/StackBounds.cpp:
(WTF):
(WTF::StackBounds::initialize):
2013-05-22 Dean Jackson <dino@apple.com>
Rolling out r150555. It borked about 30 media tests.
* wtf/Platform.h:
2013-05-21 Anders Carlsson <andersca@apple.com>
Build fix.
* wtf/NeverDestroyed.h:
(NeverDestroyed):
2013-05-20 Anders Carlsson <andersca@apple.com>
Add WTF::NeverDestroyed and start using it in WTF
https://bugs.webkit.org/show_bug.cgi?id=116472
Reviewed by Benjamin Poulain.
NeverDestroyed is a class template that can be used for singletons and other objects that we never
want to destroy. It's intended as a replacement for WTF_STATIC_LOCAL with the advantage that it doesn't
fragment the heap.
* GNUmakefile.list.am:
* WTF.vcproj/WTF.vcproj:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
Add NeverDestroyed.h
* wtf/Compiler.h:
Add a helper macro, WTF_DELETED_FUNCTION.
* wtf/CryptographicallyRandomNumber.cpp:
Use NeverDestroyed.
* wtf/NeverDestroyed.h: Added.
* wtf/Noncopyable.h:
Use WTF_DELETED_FUNCTION.
* wtf/text/WTFString.cpp:
(WTF::emptyString):
Use
2013-05-20 Zan Dobersek <zdobersek@igalia.com>
Use '__typeof__' keyword to avoid problems when compiling in C++11 standard compliance
https://bugs.webkit.org/show_bug.cgi?id=116447
Reviewed by Darin Adler.
The 'typeof' keyword is a GNU C extension which becomes unavailable when compiling in ANSI or specific standard mode
(such as -std=c++11). The '__typeof__' keyword should be used instead as it's available in all modes both under GCC and Clang.
* wtf/FastMalloc.cpp:
(WTF): Replace the 'typeof' keyword with '__typeof__'.
2013-05-19 Anders Carlsson <andersca@apple.com>
Remove link prerendering code
https://bugs.webkit.org/show_bug.cgi?id=116415
Reviewed by Darin Adler.
This code was only used by Chromium and is dead now.
* wtf/FeatureDefines.h:
2013-05-18 Patrick Gansterer <paroga@webkit.org>
[CMake] Replace *_LIBRARY_NAME with *_OUTPUT_NAME
https://bugs.webkit.org/show_bug.cgi?id=114554
Reviewed by Gyuyoung Kim.
Using variables as target names is very uncommon in CMake.
The usual way to specify the name of the resulting binary
is to set the OUTPUT_NAME target property.
* wtf/CMakeLists.txt:
2013-05-17 Andreas Kling <akling@apple.com>
Re-align the OS(AIX) macro...
...in the hopes that the resulting world rebuild will fix failures after r150294.
* wtf/Platform.h:
2013-05-17 Anders Carlsson <andersca@apple.com>
WKKeyValueStorageManagerGetKeyValueStorageOrigins should get origins from the UI process
https://bugs.webkit.org/show_bug.cgi?id=116346
<rdar://problem/13852829>
Reviewed by Andreas Kling.
Add forward declaration for Function.
* wtf/Forward.h:
2013-05-17 Patrick Gansterer <paroga@webkit.org>
[CMake] Remove invalid include paths
https://bugs.webkit.org/show_bug.cgi?id=116213
Reviewed by Gyuyoung Kim.
Since "${JAVASCRIPTCORE_DIR}/wtf" does not exist, it is safe
to remove them from the list of include directories.
* wtf/PlatformEfl.cmake:
* wtf/PlatformGTK.cmake:
2013-05-16 Benjamin Poulain <bpoulain@apple.com>
Add the symbol WTFInvokeCrashHook back for binary compatibility.
Reviewed by Ryosuke Niwa.
* wtf/Assertions.cpp:
* wtf/Assertions.h:
2013-05-16 Seokju Kwon <seokju.kwon@gmail.com>
[CMAKE] Need to set WTF_LIBRARIES in wtf/CMakeLists.txt
https://bugs.webkit.org/show_bug.cgi?id=116209
Reviewed by Gyuyoung Kim.
* wtf/CMakeLists.txt: Replace list with set.
2013-05-16 Benjamin Poulain <benjamin@webkit.org>
Crash properly on iOS
https://bugs.webkit.org/show_bug.cgi?id=115782
Reviewed by Darin Adler.
Improve crash handling. <rdar://problem/13842771>
* wtf/Assertions.cpp:
* wtf/Assertions.h:
2013-05-15 Ryuan Choi <ryuan.choi@samsung.com>
Unreviewed build fix after r150123
* wtf/CMakeLists.txt:
2013-05-15 Oliver Hunt <oliver@apple.com>
RefCountedArray needs to use vector initialisers for its backing store
https://bugs.webkit.org/show_bug.cgi?id=116194
Reviewed by Gavin Barraclough.
Use VectorOperations to operate on the backing store
* wtf/RefCountedArray.h:
(WTF::RefCountedArray::RefCountedArray):
(WTF::RefCountedArray::operator=):
(WTF::RefCountedArray::~RefCountedArray):
2013-05-15 Nico Weber <thakis@chromium.org>
WebKit doesn't support MSVS2003 any more, remove preprocessor checks for older versions.
https://bugs.webkit.org/show_bug.cgi?id=116157
Reviewed by Anders Carlsson.
Also remove a gcc3.2 workaround.
Merges parts of these two commits by the talented Nico Weber:
https://chromium.googlesource.com/chromium/blink/+/3677e2f47348daeff405a40b6f90fbdf0654c2f5
https://chromium.googlesource.com/chromium/blink/+/0fcd96c448dc30be1416dcc15713c53710c1a312
* wtf/Alignment.h:
(WTF):
* wtf/Assertions.h:
* wtf/Atomics.h:
(WTF):
* wtf/Compiler.h:
* wtf/DateMath.cpp:
(WTF::getLocalTime):
* wtf/MathExtras.h:
* wtf/RefCountedLeakCounter.h:
(RefCountedLeakCounter):
* wtf/StaticConstructors.h:
2013-05-15 Patrick Gansterer <paroga@webkit.org>
Consolidate lists in WTF CMake files
https://bugs.webkit.org/show_bug.cgi?id=116142
Reviewed by Martin Robinson.
Move common files into the CMakeLists.txt to avoid duplicating the list of files.
Also rebase the recently added GTK files to match the other CMake ports, since
the submitted patch was based on an older version of the source tree.
* wtf/CMakeLists.txt:
* wtf/PlatformBlackBerry.cmake:
* wtf/PlatformEfl.cmake:
* wtf/PlatformGTK.cmake:
* wtf/PlatformWinCE.cmake:
2013-05-14 Carlos Garcia Campos <cgarcia@igalia.com>
Remove WTF_USE_PLATFORM_STRATEGIES
https://bugs.webkit.org/show_bug.cgi?id=114431
Reviewed by Darin Adler.
* wtf/Platform.h:
2013-05-14 Carlos Garcia Campos <cgarcia@igalia.com>
[BlackBerry] Use requestAnimationFrame for animations
https://bugs.webkit.org/show_bug.cgi?id=115896
Reviewed by Rob Buis.
* wtf/Platform.h: Disable REQUEST_ANIMATION_FRAME_TIMER and
WTF_USE_REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR for BlackBerry
port.
2013-05-14 Carlos Garcia Campos <cgarcia@igalia.com>
[BlackBerry] Implement platform strategies
https://bugs.webkit.org/show_bug.cgi?id=112162
Reviewed by Rob Buis.
* wtf/Platform.h: Add BlackBerry platform to the list of platforms
using platform strategies.
2013-05-13 Benjamin Poulain <benjamin@webkit.org>
Improve stringProtoFuncLastIndexOf for the prefix case
https://bugs.webkit.org/show_bug.cgi?id=115952
Reviewed by Geoffrey Garen.
Add an optimized version of StringImpl::startsWith() for JavaScriptCore.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::startsWith):
* wtf/text/StringImpl.h:
(StringImpl):
(WTF::StringImpl::startsWith):
* wtf/text/WTFString.h:
(WTF::String::startsWith):
2013-05-13 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix Qt Linux MIPS32R2 build after r149879.
Bring back GLIB_CHECK_VERSION for GBytes since Qt Linux MIPS32R2
depends on glib 2.24.2.
* wtf/gobject/GRefPtr.cpp:
(_GBytes):
(WTF::refGPtr):
(WTF::derefGPtr):
2013-05-13 Anders Carlsson <andersca@apple.com>
Remove UnusedParam.h
https://bugs.webkit.org/show_bug.cgi?id=116029
Reviewed by Andreas Kling.
Remove UnusedParam.h, it's empty now.
* GNUmakefile.list.am:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/UnusedParam.h: Removed.
2013-05-13 Zalan Bujtas <zalan@apple.com>
WebProcess consuming very high CPU on linkedin.com
https://bugs.webkit.org/show_bug.cgi?id=115601
Reviewed by Andreas Kling.
Disable WEB_TIMING_MINIMAL.
Turn off window.performance and performance.now(). Some JS frameworks expect
additional Web Timing APIs, when performance.now() is available.
* wtf/FeatureDefines.h:
2013-05-12 Anders Carlsson <andersca@apple.com>
Stop including UnusedParam.h
https://bugs.webkit.org/show_bug.cgi?id=116003
Reviewed by Sam Weinig.
UnusedParam.h is empty now so there's no need to include it anymore.
* wtf/Atomics.h:
* wtf/BoundsCheckedPointer.h:
* wtf/DateMath.h:
* wtf/FastMalloc.cpp:
* wtf/NumberOfCores.cpp:
* wtf/OSAllocator.h:
* wtf/OSAllocatorPosix.cpp:
* wtf/PageAllocation.h:
* wtf/RefCounted.h:
* wtf/TCSystemAlloc.cpp:
* wtf/ThreadingPthreads.cpp:
* wtf/Vector.h:
* wtf/dtoa/cached-powers.cc:
* wtf/dtoa/fixed-dtoa.cc:
2013-05-12 Anders Carlsson <andersca@apple.com>
Move UNUSED_PARAM and UNUSED_LABEL macros to Compiler.h
https://bugs.webkit.org/show_bug.cgi?id=115997
Reviewed by Benjamin Poulain.
UnusedParam.h predates Compiler.h and the macros defined there should just go into Compiler.h
* wtf/Compiler.h:
(unusedParam):
* wtf/UnusedParam.h:
2013-05-12 Anders Carlsson <andersca@apple.com>
Remove Complex.h from WTF
https://bugs.webkit.org/show_bug.cgi?id=115989
Reviewed by Beth Dakin.
Complex.h contains a typedef and a single function (that already has an equivalent in the STL).
The header is used by three files in WebCore, so just use std::complex<double> and std::polar directly.
* GNUmakefile.list.am:
* WTF.vcproj/WTF.vcproj:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/Complex.h: Removed.
2013-05-11 Martin Robinson <mrobinson@igalia.com>
[GTK] Add a basic cmake build for WTF and JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=115967
Reviewed by Laszlo Gombos.
* wtf/PlatformGTK.cmake: Added.
2013-05-11 Martin Robinson <mrobinson@igalia.com>
Move defines to platform
[GTK] Move defines that will never be configured to Platform.h
https://bugs.webkit.org/show_bug.cgi?id=115965
Reviewed by Andreas Kling.
* wtf/Platform.h: Add new defines that were previously in the autoconf header.
2013-05-12 Anders Carlsson <andersca@apple.com>
Simplify AutodrainedPool
https://bugs.webkit.org/show_bug.cgi?id=115986
Reviewed by Andreas Kling.
Remove the ability to cycle an AutodrainedPool, as well as the iteration count.
Creating and draining pools is fast enough now that we don't need to try to be clever about it.
* wtf/AutodrainedPool.h:
(AutodrainedPool):
(WTF::AutodrainedPool::AutodrainedPool):
* wtf/AutodrainedPoolMac.mm:
(WTF::AutodrainedPool::AutodrainedPool):
2013-05-12 Anders Carlsson <andersca@apple.com>
Move RemoteMemoryReader into FastMalloc.cpp
https://bugs.webkit.org/show_bug.cgi?id=115985
Reviewed by Andreas Kling.
RemoteMemoryReader is only used in FastMalloc.cpp, and even had one of its member functions
implemented there, so move the entire class template there and remove MallocZoneSupport.h.
* GNUmakefile.list.am:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/FastMalloc.cpp:
(WTF):
(PageHeapAllocator):
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
* wtf/MallocZoneSupport.h: Removed.
2013-05-10 Laszlo Gombos <l.gombos@samsung.com>
Remove USE(OS_RANDOMNESS)
https://bugs.webkit.org/show_bug.cgi?id=108095
Reviewed by Darin Adler.
Remove the USE(OS_RANDOMNESS) guard as it is turned on for all
ports.
* wtf/CryptographicallyRandomNumber.cpp:
(WTF::cryptographicallyRandomValues):
* wtf/CryptographicallyRandomNumber.h:
* wtf/OSRandomSource.cpp:
(WTF::cryptographicallyRandomValuesFromOS):
* wtf/OSRandomSource.h:
* wtf/Platform.h:
* wtf/RandomNumber.cpp:
(WTF::randomNumber):
* wtf/RandomNumber.h:
* wtf/RandomNumberSeed.h:
(WTF::initializeRandomNumberGenerator):
2013-05-10 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
https://bugs.webkit.org/show_bug.cgi?id=115904
Reviewed by Martin Robinson.
* wtf/gobject/GRefPtr.cpp:
2013-05-09 Darin Adler <darin@apple.com>
RenderQuote has giant function for language to quotes map
https://bugs.webkit.org/show_bug.cgi?id=115807
Reviewed by Anders Carlsson.
* wtf/unicode/CharacterNames.h: Added a couple of character names.
2013-05-08 Michael Saboff <msaboff@apple.com>
JSC: There should be a disassembler for ARM Thumb 2
https://bugs.webkit.org/show_bug.cgi?id=115827
Reviewed by Filip Pizlo.
Added a new disassembler for ARMv7 Thumb2 instructions for use by the JSC debugging
and profiling code. Enabled the disassembler for IOS bulds.
* wtf/Platform.h:
2013-05-08 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Simplify RetainPtrObjectHashTraits
https://bugs.webkit.org/show_bug.cgi?id=115822
Reviewed by Benjamin Poulain.
RetainPtrObjectHashTraits is inherited from SimpleClassHashTraits
instead of GenericHashTraits re-using more shared functionality.
* wtf/RetainPtr.h:
(WTF::RetainPtrObjectHashTraits::emptyValue):
2013-05-08 Anders Carlsson <andersca@apple.com>
Assert at compile time that we don't pass Objective-C object pointers to adoptCF
https://bugs.webkit.org/show_bug.cgi?id=115823
Reviewed by Geoffrey Garen.
static_assert in adoptCF that the object passed in is not an Objective-C object.
* wtf/RetainPtr.h:
2013-05-08 Anders Carlsson <andersca@apple.com>
Remove RetainPtr::adoptNS and RetainPtr::adoptCF
https://bugs.webkit.org/show_bug.cgi?id=115817
Reviewed by Jessie Berlin.
These functions are now unused so remove them. The preferred way to create a RetainPtr with an
adopted reference is to use the adoptNS/adoptCF free functions.
Rewrite the move assignment operators to just call CFRelease explicitly.
* wtf/RetainPtr.h:
2013-05-08 Anders Carlsson <andersca@apple.com>
Remove ThreadingNone.cpp
Rubber-stamped by Beth Dakin.
ThreadingNone.cpp is empty and not used anywhere.
* wtf/ThreadingNone.cpp: Removed.
2013-05-08 Anders Carlsson <andersca@apple.com>
Remove HashMap::deleteAllKeys
https://bugs.webkit.org/show_bug.cgi?id=115806
Reviewed by Brent Fulgham.
This function was not used anywhere so let's get rid of it.
* wtf/HashMap.h:
2013-05-08 Eric Carlson <eric.carlson@apple.com>
[Mac] Inband text tracks are not in track menu on Lion
https://bugs.webkit.org/show_bug.cgi?id=115740
Reviewed by Dean Jackson.
* wtf/Platform.h: AVFOUNDATION_TEXT_TRACK_SUPPORT -> AVFOUNDATION_MEDIA_SELECTION_GROUP
2013-05-08 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
HashTraits<RefPtr<P> >::peek should consider empty value
https://bugs.webkit.org/show_bug.cgi?id=115799
Reviewed by Darin Adler.
HashTraits<RefPtr<P> >::peek() should consider passing of empty value which is
raw pointer equal to '0', and return it right away instead of converting it to RefPtr
and invoking get().
* wtf/HashTraits.h:
2013-05-08 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Avoid unnecessary arguments copying inside GenericHashTraits methods
https://bugs.webkit.org/show_bug.cgi?id=115733
Reviewed by Darin Adler.
Before the change both WTF::GenericHashTraits::passOut and WTF::GenericHashTraits::passOut
used to return the given argument always by value and that caused implicit extra
copying of the argument. It was OK as long as argument type T was POD, as compiler
could optimize it, but in case T was a class having non-trivial copy constructor the
extra copying of the argument could not have been obviated.
The proposed solution is to provide overloaded functions that accept non-temporary
values and return them by reference thus avoiding extra copying.
The proposed solution made an impact on the size of libjavascriptcore_efl.so (EFL
release build): the size decreased from 6554992 bytes to 6554560 bytes.
* wtf/HashTraits.h:
(WTF::GenericHashTraits::passOut):
(WTF::GenericHashTraits::peek):
2013-05-07 Anders Carlsson <andersca@apple.com>
Remove AlwaysInline.h from WTF
https://bugs.webkit.org/show_bug.cgi?id=115727
Reviewed by Brent Fulgham.
The macro that used to be in AlwaysInline.h is now in Compiler.h so there's no reason
to keep AlwaysInline.h around anymore.
* WTF.vcproj/WTF.vcproj:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/AlwaysInline.h: Removed.
* wtf/BloomFilter.h:
* wtf/FastMalloc.cpp:
* wtf/PassRefPtr.h:
* wtf/dtoa.cpp:
* wtf/gobject/GRefPtr.h:
2013-05-07 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
HashTraits<RefPtr<P> >::PeekType should be raw pointer for better performance
https://bugs.webkit.org/show_bug.cgi?id=115646
Reviewed by Darin Adler.
HashTraits<RefPtr<P> >::PeekType should be raw pointer so that we
can obviate multiple RefPtr copying when invoking HashMap<.., RefPtr>::get()
method.
* wtf/HashTraits.h:
2013-05-06 Cosmin Truta <ctruta@blackberry.com>
Cherry-pick fixes to bignum from upstream
https://bugs.webkit.org/show_bug.cgi?id=115658
Reviewed by Darin Adler.
Cherry-picked the following change lists:
Fix bug in bignum implementation
http://codereview.chromium.org/13454019
Make VS2005 project files compile without errors
http://codereview.chromium.org/6286135
* wtf/dtoa/bignum.cc:
2013-05-06 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Change HashTraits<RefPtr<P> >::PassOutType to PassRefPtr for better performance
https://bugs.webkit.org/show_bug.cgi?id=115410
Reviewed by Darin Adler.
The type HashTraits<RefPtr<P> >::PassOutType is PassRefPtr now to
avoid extra ref/unrefing on return from HashMap methods that transfer
ownership, such as take.
* wtf/HashTable.h:
(WTF::IdentityHashTranslator::equal):
* wtf/HashTraits.h:
2013-05-05 Anders Carlsson <andersca@apple.com>
Remove Vector::prepend
https://bugs.webkit.org/show_bug.cgi?id=115618
Reviewed by Geoffrey Garen.
Given the performance characteristics of prepending something to a Vector, not having prepend
will hopefully make developers think about whether prepending is necessary at all. For example,
the functions in HexNumber.h were easily converted to using Vector::append and then Vector::reverse.
* wtf/HexNumber.h:
(WTF::appendUnsignedAsHex):
(WTF::appendUnsignedAsHexFixedSize):
* wtf/Vector.h:
(Vector):
2013-05-05 Anders Carlsson <andersca@apple.com>
Remove the Vector::append overload that takes a Vector
https://bugs.webkit.org/show_bug.cgi?id=115535
Reviewed by Andreas Kling.
The Vector::append overload that takes a Vector conflicts with rvalues in C++11, so remove it and
replace calls to it with calls to appendVector.
* wtf/Vector.h:
(Vector):
2013-05-04 Andreas Kling <akling@apple.com>
Unreviewed, rolling out r149563.
http://trac.webkit.org/changeset/149563
https://bugs.webkit.org/show_bug.cgi?id=115587
Broke LLInt build.
* wtf/text/StringImpl.h:
(StringImpl):
2013-05-04 Xan Lopez <xlopez@igalia.com>
No need to declare JSC::LLInt::Data as friend class of WTF::StringImpl
https://bugs.webkit.org/show_bug.cgi?id=115587
Reviewed by Andreas Kling.
No need to declare LLInt::Data as friend class of WTF::StringImpl,
it does not use any private method/data member of the latter.
* wtf/text/StringImpl.h:
(StringImpl):
2013-05-03 Brent Fulgham <bfulgham@webkit.org>
Make ThreadFunctionInvocation fast allocated.
https://bugs.webkit.org/show_bug.cgi?id=115552
Reviewed by Benjamin Poulain.
* wtf/ThreadFunctionInvocation.h:
(ThreadFunctionInvocation): Make Fast-allocated.
2013-05-03 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Remove WTF::ListRefPtr class
https://bugs.webkit.org/show_bug.cgi?id=115516
Reviewed by Anders Carlsson.
ListRefPtr was used only by FontFamily class, besides it strongly depended
on FontFamily class semantics which made it non-generic and inappropriate
for being present inside WTF.
This patch removes WTF::ListRefPtr class and moves its the functionality
into FontFamily class.
* GNUmakefile.list.am:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/Forward.h:
(WTF):
* wtf/ListRefPtr.h: Removed.
2013-05-02 Brent Fulgham <bfulgham@webkit.org>
[WinCairo] Unreviewed build fix.
* WTF.vcxproj/WTF.vcxproj: Use WinCairo FeatureDefines
* WTF.vcxproj/WTF.vcxproj.filters: Use WinCairo FeatureDefines
* WTF.vcxproj/WTFDebugWinCairo.props: Added.
* WTF.vcxproj/WTFReleaseWinCairo.props: Added.
2013-05-02 Brent Fulgham <bfulgham@webkit.org>
[Windows, WinCairo] Fix crash in fast/js/create-lots-of-workers.html
https://bugs.webkit.org/show_bug.cgi?id=115130
Reviewed by Tim Horton.
Windows is suffering from mismatched allocation/deallocation
between the system allocator and fastMalloc/fastFree. By turning
off the global switch to fastMalloc, only classes specified to
honor fastMalloc/fastFree are affected, and other memory allocation
and freeing is done with consistent library calls.
* wtf/Platform.h: Deactivate ENABLE_GLOBAL_FASTMALLOC_NEW for
the Windows build.
2013-05-02 Eric Carlson <eric.carlson@apple.com>
Caption menu does not include in-band captions
https://bugs.webkit.org/show_bug.cgi?id=111934
Reviewed by Dean Jackson.
* wtf/Platform.h: Define HAVE_AVFOUNDATION_TEXT_TRACK_SUPPORT on 10.8 and higher. Added
HAVE_AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT.
2013-05-02 Brent Fulgham <bfulgham@webkit.org>
Make BloomFilter fast allocated.
https://bugs.webkit.org/show_bug.cgi?id=115519
Reviewed by Benjamin Poulain.
* wtf/BloomFilter.h:
(BloomFilter): Make BloomFilter Fast-allocated.
2013-05-01 Michael Saboff <msaboff@apple.com>
FastMalloc.cpp should use system defined page size instead of literal constant
https://bugs.webkit.org/show_bug.cgi?id=115502
Reviewed by Geoffrey Garen.
Updated kPageShift to be PAGE_SHIFT for Mac. Changed kMaxSize to be fixed at 32K.
Updated kNumClasses for 4K and 16K page sizes.
* wtf/FastMalloc.cpp:
kPageShift: Changed this to be PAGE_SHIFT on mac.
2013-05-01 Roger Fong <roger_fong@apple.com>
Set Path in makefile for AppleWin.
* WTF.vcxproj/WTF.make:
2013-05-01 Anders Carlsson <andersca@apple.com>
Add FunctionDispatcher class and make RunLoop derive from it
https://bugs.webkit.org/show_bug.cgi?id=115480
Reviewed by Sam Weinig.
Add FunctionDispatcher files.
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.vcxproj/WTF.vcxproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/FunctionDispatcher.cpp: Added.
(WTF::FunctionDispatcher::FunctionDispatcher):
(WTF::FunctionDispatcher::~FunctionDispatcher):
* wtf/FunctionDispatcher.h: Added.
2013-05-01 Zoltan Arvai <zarvai@inf.u-szeged.hu>
[Qt][Win] Fix build after r149416.
https://bugs.webkit.org/show_bug.cgi?id=115474
Reviewed by Anders Carlsson.
* WTF.pro:
* wtf/threads/BinarySemaphore.h:
(BinarySemaphore):
2013-05-01 Zoltan Arvai <zarvai@inf.u-szeged.hu>
[Qt] Unreviewed buildfix after r149416.
* WTF.pro:
2013-04-30 Anders Carlsson <andersca@apple.com>
Remove the WebKit2 BinarySemaphore class
https://bugs.webkit.org/show_bug.cgi?id=115458
Reviewed by Benjamin Poulain.
* wtf/Forward.h:
Add BinarySemaphore forward declaration.
* wtf/threads/BinarySemaphore.h:
Add WTF_EXPORT_PRIVATE to declarations.
2013-04-30 Commit Queue <rniwa@webkit.org>
Unreviewed, rolling out r149408.
http://trac.webkit.org/changeset/149408
https://bugs.webkit.org/show_bug.cgi?id=115453
Broke Windows Build (Requested by bfulgham on #webkit).
* wtf/Platform.h:
2013-04-30 Brent Fulgham <bfulgham@webkit.org>
[Windows, WinCairo] Fix crash in fast/js/create-lots-of-workers.html
https://bugs.webkit.org/show_bug.cgi?id=115130
Reviewed by Tim Horton.
Windows is suffering from mismatched allocation/deallocation
between the system allocator and fastMalloc/fastFree. By turning
off the global switch to fastMalloc, only classes specified to
honor fastMalloc/fastFree are affected, and other memory allocation
and freeing is done with consistent library calls.
* wtf/Platform.h: Deactivate ENABLE_GLOBAL_FASTMALLOC_NEW for
the Windows build.
2013-04-30 Commit Queue <rniwa@webkit.org>
Unreviewed, rolling out r149349 and r149354.
http://trac.webkit.org/changeset/149349
http://trac.webkit.org/changeset/149354
https://bugs.webkit.org/show_bug.cgi?id=115444
The Thumb version of compileSoftModulo make invalid use of
registers (Requested by benjaminp on #webkit).
* wtf/Platform.h:
2013-04-30 Darin Adler <darin@apple.com>
[Mac] Make adoptNS faster on platforms without garbage collection by skipping a CFRetain/NSRelease pair
https://bugs.webkit.org/show_bug.cgi?id=115424
Reviewed by Eric Carlson.
* wtf/RetainPtr.h:
(WTF::adoptNSReference): When OBJC_NO_GC is set, make this an empty function, because in that case
CFRetain and -[NSObject retain] are the same thing and there is no need to call CFRetain and
-[NSObject release] to adopt an Objective-C object.
2013-04-30 Anders Carlsson <andersca@apple.com>
String::isolatedCopy() can avoid a copy if the original is a temporary
https://bugs.webkit.org/show_bug.cgi?id=115425
Reviewed by Darin Adler.
* wtf/Compiler.h:
Add WTF_COMPILER_SUPPORTS_CXX_REFERENCE_QUALIFIED_FUNCTIONS define.
* wtf/text/WTFString.cpp:
(WTF::String::isolatedCopy):
* wtf/text/WTFString.h:
If COMPILER_SUPPORTS(CXX_REFERENCE_QUALIFIED_FUNCTIONS) is true, add two overloads of String::isolatedCopy().
One is used if *this is an lvalue, and one is used if *this is an rvalue. In the latter case, we know that the original
String object is a temporary and will be going away, so if it's safe to send it to another thread (if it's not an AtomicString,
and if it's refcount is 1), then we can just steal the StringImpl from the original and avoid a copy altogether.
2013-04-30 Zalan Bujtas <zalan@apple.com>
Animations fail to start on http://www.google.com/insidesearch/howsearchworks/thestory/
https://bugs.webkit.org/show_bug.cgi?id=111244
Reviewed by David Kilzer.
Enable performance.now() as a minimal subset of Web Timing API.
It returns DOMHighResTimeStamp, a monotonically increasing value representing the
number of milliseconds from the start of the navigation of the current document.
JS libraries use this API to check against the requestAnimationFrame() timestamp.
* wtf/FeatureDefines.h:
2013-04-29 Cosmin Truta <ctruta@blackberry.com>
[ARM] Expand the use of integer division
https://bugs.webkit.org/show_bug.cgi?id=115138
Reviewed by Benjamin Poulain.
* wtf/Platform.h: Added ENABLE_ARM_INTEGER_DIV.
2013-04-29 Anders Carlsson <andersca@apple.com>
It should be an error to use adoptPtr with RefCounted subclasses
https://bugs.webkit.org/show_bug.cgi?id=115389
Reviewed by Benjamin Poulain.
* wtf/PassOwnPtr.h:
(WTF::adoptPtr):
Add COMPILE_ASSERTs.
2013-04-29 Patrick Gansterer <paroga@webkit.org>
[WIN] Add workaround for UNUSED_PARAM()
https://bugs.webkit.org/show_bug.cgi?id=115350
Reviewed by Andreas Kling.
r147882 added an workaround for the MSVC compiler on Windows CE.
Extend this workaround to whole MSVC compiler, since the same
problem occurs with the Visual Studio 10 compiler too.
* wtf/UnusedParam.h:
2013-04-29 Patrick Gansterer <paroga@webkit.org>
[WIN] Add WTF_USE_IMLANG_FONT_LINK2
https://bugs.webkit.org/show_bug.cgi?id=115198
Reviewed by Andreas Kling.
* wtf/Platform.h:
2013-04-29 Patrick Gansterer <paroga@webkit.org>
Define USE(ICU_UNICODE) if USE(WCHAR_UNICODE) is false
https://bugs.webkit.org/show_bug.cgi?id=115349
Reviewed by Andreas Kling.
Since we support only ICU and WCHAR as Unicode backend (ICU is the default)
automatically use ICU if WCHAR was not selected via compiler defines.
* wtf/Platform.h:
2013-04-29 Patrick Gansterer <paroga@webkit.org>
Build fix for WinCE after r148888 and r149097
https://bugs.webkit.org/show_bug.cgi?id=115168
Reviewed by Anders Carlsson.
When using compiler intrinsics on Windows CE the compiler complains
about wrong linkage specification of replaced CRT functions defined
in math.h. This is because the compiler has intrinsics for this
functions defined, and requires them to have extern "C" linkage.
* wtf/MathExtras.h:
(wtf_atan2): Added extern "C" to function signature.
(wtf_fmod): Ditto.
(wtf_pow): Ditto.
2013-04-29 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.list.am: Add missing header file to compilation.
2013-04-27 Darin Adler <darin@apple.com>
Move from constructor and member function adoptCF/NS to free function adoptCF/NS.
https://bugs.webkit.org/show_bug.cgi?id=115307
Reviewed by Geoffrey Garen.
* wtf/RunLoopTimerCF.cpp:
(WTF::RunLoopTimerBase::start):
* wtf/SchedulePair.h:
(WTF::SchedulePair::SchedulePair):
* wtf/SchedulePairMac.mm:
(WTF::SchedulePair::SchedulePair):
* wtf/unicode/icu/CollatorICU.cpp:
(WTF::Collator::userDefault):
Use adoptCF free function.
2013-04-26 Geoffrey Garen <ggaren@apple.com>
Filled out more cases of branch folding in bytecode when emitting expressions into a branching context
https://bugs.webkit.org/show_bug.cgi?id=115057
Reviewed by Filip Pizlo.
Added a helper constructor for TriState so clients can make one without
branching or making assumptions about the integer values of TriStates.
* wtf/TriState.h:
(WTF::triState):
(WTF):
2013-04-26 Roger Fong <roger_fong@apple.com>
Make Apple Windows VS2010 build results into and get dependencies from __32 suffixed folders.
Make the DebugSuffix configuration use _debug dependencies.
* WTF.vcxproj/WTF.make:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTFCommon.props:
* WTF.vcxproj/WTFDebug.props:
* WTF.vcxproj/WTFGenerated.make:
* WTF.vcxproj/WTFGenerated.vcxproj:
* WTF.vcxproj/WTFGeneratedCommon.props:
* WTF.vcxproj/WTFGeneratedDebug.props:
* WTF.vcxproj/WTFGeneratedProduction.props:
* WTF.vcxproj/WTFGeneratedRelease.props:
* WTF.vcxproj/WTFProduction.props:
* WTF.vcxproj/WTFRelease.props:
* WTF.vcxproj/build-generated-files.sh:
* WTF.vcxproj/work-around-vs-dependency-tracking-bugs.py:
(react_to_vsprops_changes):
2013-04-26 Martin Robinson <mrobinson@igalia.com>
Remove the remaining Skia #ifdefs
https://bugs.webkit.org/show_bug.cgi?id=114886
Reviewed by Benjamin Poulain.
* wtf/Platform.h:
2013-04-26 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Add move semantics to RefPtr
https://bugs.webkit.org/show_bug.cgi?id=115033
Reviewed by Anders Carlsson.
Add move constructors and move assignment operators to RefPtr when
COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES).
This obviates unnecessary reffing/ureffing when RefPtr is created
or assigned from rvalue references.
* wtf/RefPtr.h:
(RefPtr):
(WTF::RefPtr::RefPtr):
(WTF::RefPtr::operator=):
2013-04-26 Andreas Kling <akling@apple.com>
Remove wxWebKit from WTF.
<http://webkit.org/b/115249>
Reviewed by Antti Koivisto.
* wscript: Removed.
* wtf/ArrayBufferView.h:
(ArrayBufferView):
* wtf/CurrentTime.cpp:
* wtf/DisallowCType.h:
* wtf/ExportMacros.h:
* wtf/FeatureDefines.h:
* wtf/Platform.h:
* wtf/text/WTFString.h:
(String):
* wtf/wx/MainThreadWx.cpp: Removed.
* wtf/wx/StringWx.cpp: Removed.
2013-04-25 Filip Pizlo <fpizlo@apple.com>
Unreviewed, roll out http://trac.webkit.org/changeset/148999
It broke http://kripken.github.io/ammo.js/examples/new/ammo.html
* wtf/TriState.h:
2013-04-25 Oliver Hunt <oliver@apple.com>
Fix 32bit build
* wtf/StackBounds.cpp:
(WTF::StackBounds::initialize):
2013-04-25 Oliver Hunt <oliver@apple.com>
Stack guards are too conservative
https://bugs.webkit.org/show_bug.cgi?id=115147
Reviewed by Mark Hahnenberg.
Use getrlimit on darwin to get the stack size for the main thread.
* wtf/StackBounds.cpp:
(WTF::StackBounds::initialize):
2013-04-25 Andreas Kling <akling@apple.com>
Remove ENABLE(PARSED_STYLE_SHEET_CACHING) and make it always-on.
Rubber-stamped by Anders Koivisto.
* wtf/FeatureDefines.h:
2013-04-25 peavo@outlook.com <peavo@outlook.com>
[Windows] Compile fix.
https://bugs.webkit.org/show_bug.cgi?id=115170
Reviewed by Filip Pizlo.
Forward declare function, instead of including intrin.h.
* wtf/Atomics.h:
2013-04-25 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Use std::move in AtomicString
https://bugs.webkit.org/show_bug.cgi?id=115102
Reviewed by Anders Carlsson.
Use std::move in AtomicString instead of direct casting to rvalue references.
* wtf/text/AtomicString.h:
(AtomicString):
(WTF::AtomicString::AtomicString):
(WTF::AtomicString::operator=):
2013-04-25 Patrick Gansterer <paroga@webkit.org>
Unreviewed WinCE build fix after r148888.
* wtf/Atomics.h: WinCE version of intrin.h is called cmnintrin.h.
2013-04-24 Roger Fong <roger_fong@apple.com>
Have VS2010 WebKit solution look in WebKit_Libraries/lib32 for dependencies.
* WTF.vcxproj/build-generated-files.sh:
2013-04-24 Benjamin Poulain <benjamin@webkit.org>
Use post-branch store for RefCountedBase::derefBase
https://bugs.webkit.org/show_bug.cgi?id=115078
Reviewed by Andreas Kling.
* wtf/RefCounted.h:
(WTF::RefCountedBase::derefBase): This makes the assembly easier to follow.
2013-04-23 Geoffrey Garen <ggaren@apple.com>
Filled out more cases of branch folding in bytecode when emitting expressions into a branching context
https://bugs.webkit.org/show_bug.cgi?id=115057
Reviewed by Filip Pizlo.
Added a helper constructor for TriState so clients can make one without
branching or making assumptions about the integer values of TriStates.
* wtf/TriState.h:
(WTF::triState):
(WTF):
2013-04-23 Roger Fong <roger_fong@apple.com>
AppleWin build fix.
* WTF.vcproj/WTF.vcproj:
2013-04-23 Benjamin Poulain <bpoulain@apple.com>
Remove unused code of RefCounted after chromium removal
https://bugs.webkit.org/show_bug.cgi?id=115009
Reviewed by Ryosuke Niwa.
* wtf/RefCounted.h:
(WTF::RefCountedBase::refCount):
(RefCountedBase):
It looks like addressOfCount() is no longer needed.
Also change the type back to unsigned as it make more sense.
2013-04-23 David Kilzer <ddkilzer@apple.com>
RetainPtr.h should compile with -Wshorten-64-to-32
<http://webkit.org/b/115047>
Reviewed by Anders Carlsson.
Fixes the following warning:
RetainPtr.h:318:20: error: implicit conversion loses integer precision: 'CFHashCode' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
return CFHash(o.get());
~~~~~~ ^~~~~~~~~~~~~~~
* wtf/RetainPtr.h:
(WTF::RetainPtrObjectHash::hash): Cast return value of CFHash()
to unsigned. This has no effect on 32-bit architectures, but
takes the lower 32-bits of the CFHashCode (unsigned long) on
64-bit architectures, which is what happens implicitly now.
2013-04-22 Patrick Gansterer <paroga@webkit.org>
[CMake] Move NullPtr.cpp from PlatformWinCE.cmake to CMakeLists.txt
https://bugs.webkit.org/show_bug.cgi?id=114557
Reviewed by Laszlo Gombos.
This file is not specific to Windwos CE. Move it the the general
CMakeLists.txt so other ports can use it to. It does not affect
ports which do not need it, since it contains a preprocessor guard.
* wtf/CMakeLists.txt:
* wtf/PlatformWinCE.cmake:
2013-04-22 Benjamin Poulain <benjamin@webkit.org>
Remove the memory instrumentation code
https://bugs.webkit.org/show_bug.cgi?id=114931
Reviewed by Andreas Kling.
On Mac x86_64, the code removal cause the binary to be
9224 bytes smaller.
* GNUmakefile.list.am:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/Forward.h:
* wtf/ListHashSet.h:
(ListHashSet):
(ListHashSetNodeAllocator):
(WTF::ListHashSetNodeAllocator::pool):
(WTF::ListHashSetNodeAllocator::pastPool):
* wtf/MemoryInstrumentation.cpp: Removed.
* wtf/MemoryInstrumentation.h: Removed.
* wtf/MemoryInstrumentationArrayBufferView.h: Removed.
* wtf/MemoryInstrumentationHashCountedSet.h: Removed.
* wtf/MemoryInstrumentationHashMap.h: Removed.
* wtf/MemoryInstrumentationHashSet.h: Removed.
* wtf/MemoryInstrumentationListHashSet.h: Removed.
* wtf/MemoryInstrumentationSequence.h: Removed.
* wtf/MemoryInstrumentationString.h: Removed.
* wtf/MemoryInstrumentationVector.h: Removed.
* wtf/MemoryObjectInfo.h: Removed.
* wtf/text/AtomicString.h:
* wtf/text/StringImpl.h:
(WTF::StringImpl::isASCIILiteral):
* wtf/text/WTFString.h:
2013-04-22 David Kilzer <ddkilzer@apple.com>
StringImpl.h should compile with -Wshorten-64-to-32
<http://webkit.org/b/114970>
Reviewed by Darin Adler.
Fixes the following warnings with -Wshorten-64-to-32:
StringImpl.h:317:25: error: implicit conversion loses integer precision: 'uintptr_t' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
unsigned hash = reinterpret_cast<uintptr_t>(this);
~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl): Add static_cast<uint32_t>() to
formalize taking the lower 32-bits of the pointer value on
64-bit architectures.
2013-04-22 Andreas Kling <akling@apple.com>
Shrink baseline size of WTF::Vector on 64-bit by switching to unsigned capacity and size.
<http://webkit.org/b/97268>
<rdar://problem/12376519>
Reviewed by Sam Weinig.
Shrink Vector by 8 bytes on 64-bit by using 32-bit capacity and size.
Vector now inherits from VectorBuffer instead of having a VectorBuffer member;
this is necessary for m_size to fall into the padding after the base class members.
The WTF::Vector API still uses size_t.
Based on Blink r148313 by <cevans@chromium.org>.
* wtf/SizeLimits.cpp:
* wtf/Vector.h:
(WTF::VectorBufferBase::allocateBuffer):
(WTF::VectorBufferBase::tryAllocateBuffer):
(VectorBufferBase):
(WTF::VectorBuffer::shouldReallocateBuffer):
(Vector):
(WTF::Vector::Vector):
(WTF::Vector::capacity):
(WTF::Vector::at):
(WTF::Vector::data):
(WTF::Vector::swap):
(WTF::::Vector):
(WTF::::reserveCapacity):
(WTF::::tryReserveCapacity):
(WTF::::reserveInitialCapacity):
(WTF::::shrinkCapacity):
(WTF::::releaseBuffer):
2013-04-21 Filip Pizlo <fpizlo@apple.com>
Memory barrier support should also ensure that we always do a compiler fence
https://bugs.webkit.org/show_bug.cgi?id=114934
Reviewed by Michael Saboff.
This is a cherry-pick merge of the WTF part of r148836 from the dfgFourthTier
branch. It fixes a memory ordering bug that is likely asymptomatic, but
nonetheless real: TCSpinLock expects that using a memoryBarrierBeforeUnlock()
prior to setting lockword_ to 0 will ensure that the assignment to lockword_
won't get floated above any of the stores in the critical section. While that
memory barrier does indeed do the right thing on ARM, it doesn't do the right
thing on other architectures: it turns into empty code that the compiler blows
away, which is fine for the hardware since X86 won't reorder that store - but
it's not fine for the compiler, which may still do its own reorderings.
The WTF part of r148836 fixes this by using a compiler fence: an empty asm
volatile block that is marked as clobbering memory.
Instead of doing a separate surgical fix in trunk, I decided to merge the
whole WTF change over, to make merging easier in the future.
Performance testing of this change in dfgFourthTier showed no regression.
* wtf/Atomics.h:
(WTF::compilerFence):
(WTF::armV7_dmb):
(WTF::armV7_dmb_st):
(WTF::loadLoadFence):
(WTF::loadStoreFence):
(WTF::storeLoadFence):
(WTF::storeStoreFence):
(WTF::memoryBarrierAfterLock):
(WTF::memoryBarrierBeforeUnlock):
(WTF::x86_mfence):
2013-04-22 David Kilzer <ddkilzer@apple.com>
WTF::AtomicString::find() should take unsigned 'start' argument
<http://webkit.org/b/114958>
Reviewed by Darin Adler.
Fixes the following warnings with -Wshorten-64-to-32:
AtomicString.h:113:76: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
size_t find(UChar c, size_t start = 0) const { return m_string.find(c, start); }
~~~~~~~~ ^~~~~
AtomicString.h:115:35: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
{ return m_string.find(s, start, caseSentitive); }
~~~~~~~~ ^~~~~
AtomicString.h:117:35: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
{ return m_string.find(s, start, caseSentitive); }
~~~~~~~~ ^~~~~
* wtf/text/AtomicString.h:
(WTF::AtomicString::find): Change type of 'start' argument from
size_t to unsigned.
2013-04-21 Benjamin Poulain <benjamin@webkit.org>
Improve StringImpl code density for older ARM hardware
https://bugs.webkit.org/show_bug.cgi?id=114898
Reviewed by Geoffrey Garen.
Reduce the number of instructions needed for StringImpl::deref
on older ARM hardware.
The extra indirection should have a negligible impact on x86_64.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::destroy):
* wtf/text/StringImpl.h:
(StringImpl):
(WTF::StringImpl::deref):
2013-04-20 Allan Sandfeld Jensen <allan.jensen@digia.com>
LLint should be able to use x87 instead of SSE for floating pointer
https://bugs.webkit.org/show_bug.cgi?id=112239
Reviewed by Filip Pizlo.
Disable GTK workaround now that LLInt does not require SSE2.
* wtf/Platform.h:
2013-04-19 Roger Fong <roger_fong@apple.com>
Remove uses of WebKit_Source from AppleWin build in WTF.
* WTF.vcxproj/WTF.make:
* WTF.vcxproj/copy-files.cmd:
* WTF.vcxproj/work-around-vs-dependency-tracking-bugs.py:
(react_to_vsprops_changes):
(react_to_webkit1_interface_changes):
2013-04-19 Benjamin Poulain <benjamin@webkit.org>
Remove the declaration of MemoryObjectInfo from StringImpl
https://bugs.webkit.org/show_bug.cgi?id=114788
Reviewed by Andreas Kling.
* wtf/text/StringImpl.h: The declaration is an other left over from chromium.
2013-04-19 Benjamin Poulain <benjamin@webkit.org>
Make StringImpl::cost const
https://bugs.webkit.org/show_bug.cgi?id=114790
Reviewed by Andreas Kling.
* wtf/text/StringImpl.h:
(WTF::StringImpl::cost):
2013-04-19 Roger Fong <roger_fong@apple.com>
Unreviewed. WebKit_Source is incorrectly set.
* WTF.vcxproj/WTF.make:
2013-04-19 Alberto Garcia <agarcia@igalia.com>
OSAllocatorPosix: fix build warnings about unused parameters in QNX
https://bugs.webkit.org/show_bug.cgi?id=114859
Reviewed by Carlos Garcia Campos.
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveUncommitted):
2013-04-19 Dan Beam <dbeam@chromium.org>
Remove unmaintained feature REQUEST_AUTOCOMPLETE
https://bugs.webkit.org/show_bug.cgi?id=114846
Reviewed by Kent Tamura.
* wtf/FeatureDefines.h: Remove REQUEST_AUTOCOMPLETE as a feature definition.
2013-04-18 Zoltan Arvai <zarvai@inf.u-szeged.hu>
Speculative build fix for Qt Mountain Lion Release after r148639.
https://bugs.webkit.org/show_bug.cgi?id=114793
Reviewed by Michael Saboff.
* wtf/CurrentTime.cpp:
2013-04-17 Mark Lam <mark.lam@apple.com>
Added currentCPUTime() and currentCPUTimeMS().
https://bugs.webkit.org/show_bug.cgi?id=114577.
Reviewed by Geoffrey Garen.
The currentCPUTime() implementation came from the old TimeoutChecker.cpp.
* wtf/CurrentTime.cpp:
(WTF::currentCPUTime):
(WTF::currentCPUTimeMS):
* wtf/CurrentTime.h:
2013-04-17 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r148584): WebKit nightly builds don't load any page
https://bugs.webkit.org/show_bug.cgi?id=114752
Reviewed by Anders Carlsson.
We can't use C++ style (//) comments in Platform.h because WebKit2/DerivedSource.make doesn't know
how to strip it to be merged with *.sb.in to generate *.sb files. Specifically, we have:
# Some versions of clang incorrectly strip out // comments in c89 code.
# Use -traditional as a workaround, but only when needed since that causes
# other problems with later versions of clang.
ifeq ($(shell echo '//x' | $(CC) -E -P -x c -std=c89 - | grep x),)
TEXT_PREPROCESSOR_FLAGS=-E -P -x c -traditional -w
else
TEXT_PREPROCESSOR_FLAGS=-E -P -x c -std=c89 -w
endif
* wtf/Platform.h:
2013-04-17 Brent Fulgham <bfulgham@webkit.org>
[Windows, WinCairo] Remove Include Settings for Pthreads from WTF
https://bugs.webkit.org/show_bug.cgi?id=114694
Reviewed by Ryosuke Niwa.
* WTF.vcproj/WTFCommon.vsprops: Remove pthread search path.
* WTF.vcxproj/WTFCommon.props: Remove pthread search path.
* wtf/FastMalloc.cpp: Guard pthread.h include for non-pthread
builds.
2013-04-16 Oliver Hunt <oliver@apple.com>
Harden FastMalloc against partial pointer overflows
https://bugs.webkit.org/show_bug.cgi?id=114716
Reviewed by Gavin Barraclough.
Bite the bullet and perform object alignment checks on free.
malloc/free micro benchmark shows a regression, but real
benchmarks don't. There's a little code motion in this avoid
taking too much of a performance hit. In addition to the
alignment check we also validate the containing span as
we've already taken the hit of finding it.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
2013-04-16 Sam Weinig <sam@webkit.org>
Fix fallout after r148545.
* wtf/Platform.h:
Move Platform defines that were incorrectly in WebCore, into Platform.h
2013-04-15 Commit Queue <rniwa@webkit.org>
Unreviewed, rolling out r148488.
http://trac.webkit.org/changeset/148488
https://bugs.webkit.org/show_bug.cgi?id=114660
Roll back in r148462 since it was a false positive. (Requested
by rniwa on #webkit).
* wtf/FastMalloc.cpp:
(WTF):
(WTF::setThreadHeap):
(WTF::TCMalloc_ThreadCache::GetThreadHeap):
(WTF::TCMalloc_ThreadCache::InitTSD):
* wtf/ThreadSpecificWin.cpp:
(WTF::destructorsList):
(WTF::destructorsMutex):
(WTF::threadSpecificKeyCreate):
(WTF::threadSpecificKeyDelete):
2013-04-15 Commit Queue <rniwa@webkit.org>
Unreviewed, rolling out r148462.
http://trac.webkit.org/changeset/148462
https://bugs.webkit.org/show_bug.cgi?id=114658
Broke Windows builds (Requested by rniwa on #webkit).
* wtf/FastMalloc.cpp:
(WTF):
(WTF::setThreadHeap):
(WTF::TCMalloc_ThreadCache::GetThreadHeap):
(WTF::TCMalloc_ThreadCache::InitTSD):
* wtf/ThreadSpecificWin.cpp:
(WTF::destructorsList):
(WTF::destructorsMutex):
(WTF::threadSpecificKeyCreate):
(WTF::threadSpecificKeyDelete):
2013-04-15 Julien Brianceau <jbrianceau@nds.com>
LLInt SH4 backend implementation
https://bugs.webkit.org/show_bug.cgi?id=112886
Reviewed by Oliver Hunt.
* wtf/Platform.h:
2013-04-15 Patrick Gansterer <paroga@webkit.org>
[CMake] Add WTF_USE_*_UNICODE variables
https://bugs.webkit.org/show_bug.cgi?id=114556
Reviewed by Brent Fulgham.
WTF_USE_ICU_UNICODE and WTF_USE_WCHAR_UNICODE are used to
reduce duplication in the platform specific CMake files.
* wtf/CMakeLists.txt:
* wtf/PlatformBlackBerry.cmake:
* wtf/PlatformEfl.cmake:
* wtf/PlatformWinCE.cmake:
2013-04-15 Patrick Gansterer <paroga@webkit.org>
[WIN] Remove remaining calls to pthread from WTF
https://bugs.webkit.org/show_bug.cgi?id=114563
Reviewed by Brent Fulgham.
Replace pthread_key_create with threadSpecificKeyCreate and
pthread_setspecific with threadSpecificSet from ThreadSpecific.h.
These functions provide a windows-specific implementation for the pthread functions,
but require that the thread has been created with WTF::createThread(),
which is the case for all threads created within WebKit.
To call this function from fastMalloc we must not call fastMalloc in them.
To fulfill this constraint ThreadSpecificWin will allocated its memory through the
original malloc implementation and use the stack for local and static variables.
Keep the Darwin implementation as it is, since it contains some performance tweaks.
* wtf/FastMalloc.cpp:
* wtf/ThreadSpecificWin.cpp:
(WTF::destructorsList):
(WTF::destructorsMutex):
(WTF::threadSpecificKeyCreate):
(WTF::threadSpecificKeyDelete):
2013-04-14 Oliver Hunt <oliver@apple.com>
Try to fix non-apple windows builds
* wtf/Platform.h:
2013-04-14 David Kilzer <ddkilzer@apple.com>
Add EnumClass.h to project files
<http://webkit.org/b/114582>
Rubber-stamped by Dan Bernstein.
* WTF.pro: Add EnumClass.h to project.
* WTF.vcproj/WTF.vcproj: Ditto.
* WTF.vcxproj/WTF.vcxproj: Ditto.
* WTF.vcxproj/WTF.vcxproj.filters: Ditto.
* WTF.xcodeproj/project.pbxproj: Ditto.
2013-04-12 Oliver Hunt <oliver@apple.com>
Apologies to all, I have no idea what happened to cause this change.
* wtf/Platform.h:
2013-04-12 Oliver Hunt <oliver@apple.com>
[Qt][Win] r148257 broke the build
https://bugs.webkit.org/show_bug.cgi?id=114512
Build fix.
* wtf/Platform.h:
2013-04-11 Oliver Hunt <oliver@apple.com>
Add more type validation to debug builds
https://bugs.webkit.org/show_bug.cgi?id=114478
Reviewed by Mark Hahnenberg.
Add BINDING_VALIDATION flag and make RELEASE_ASSERT use UNLIKELY.
* wtf/Assertions.h:
* wtf/Platform.h:
2013-04-10 Thiago Marcos P. Santos <thiago.santos@intel.com>
[WTF] Get rid of truncated thread name warnings for non-Windows platforms
https://bugs.webkit.org/show_bug.cgi?id=114266
Reviewed by Ryosuke Niwa.
Hide the annoying message from ports that are not really interested
about it.
* wtf/Threading.cpp:
(WTF::createThread):
2013-04-10 Benjamin Poulain <bpoulain@apple.com>
Mass remove all the empty directories
Rubberstamped by Ryosuke Niwa.
* wtf/qt/compat: Removed.
* wtf/unicode/glib: Removed.
* wtf/unicode/qt4: Removed.
* wtf/unicode/wince: Removed.
2013-04-08 Anders Carlsson <andersca@apple.com>
Remove unneeded headers from FrameLoader.h
https://bugs.webkit.org/show_bug.cgi?id=114223
Reviewed by Geoffrey Garen.
* wtf/Forward.h:
Add PrintStream.
* wtf/HashTable.h:
Don't include DataLog.h unless DUMP_HASHTABLE_STATS_PER_TABLE is 1.
2013-04-10 Laszlo Gombos <l.gombos@samsung.com>
Remove ENABLE_3D_PLUGIN
https://bugs.webkit.org/show_bug.cgi?id=108002
Reviewed by Antti Koivisto.
Remove ENABLE_3D_PLUGIN, it was only used by Chromium.
* wtf/FeatureDefines.h:
2013-04-09 Patrick Gansterer <paroga@webkit.org>
[CMake] Remove conditional source file lists in WTF
https://bugs.webkit.org/show_bug.cgi?id=114250
Reviewed by Laszlo Gombos.
Use the #ifdef in the source file instead of conditional adding
files to the list of source files. This allows us to remove the
information of enabled features from CMake in next step.
* wtf/CMakeLists.txt:
2013-04-08 Ryosuke Niwa <rniwa@webkit.org>
Remove WTF.gyp/WTF.gypi
https://bugs.webkit.org/show_bug.cgi?id=114237
Reviewed by Maciej Stachowiak.
* WTF.gyp: Removed.
* WTF.gyp/.gitignore: Removed.
* WTF.gyp/WTF.gyp: Removed.
* WTF.gypi: Removed.
2013-04-08 Benjamin Poulain <benjamin@webkit.org>
Remove HTML Notification
https://bugs.webkit.org/show_bug.cgi?id=114231
Reviewed by Ryosuke Niwa.
* wtf/FeatureDefines.h:
2013-04-08 Benjamin Poulain <benjamin@webkit.org>
wtf/dtoa/* uses a confusing name to reference its buffers
https://bugs.webkit.org/show_bug.cgi?id=109709
Reviewed by Darin Adler.
The data structure Vector in wtf/dtoa has nothing to do with a traditional
vector, is it just a pointer and the length of the pointed buffer.
Rename it to BufferReference to avoid mistakes.
* wtf/dtoa/bignum-dtoa.cc:
* wtf/dtoa/bignum-dtoa.h:
* wtf/dtoa/bignum.cc:
* wtf/dtoa/bignum.h:
(Bignum):
* wtf/dtoa/double-conversion.cc:
* wtf/dtoa/fast-dtoa.cc:
* wtf/dtoa/fast-dtoa.h:
* wtf/dtoa/fixed-dtoa.cc:
* wtf/dtoa/fixed-dtoa.h:
(double_conversion):
* wtf/dtoa/strtod.cc:
* wtf/dtoa/strtod.h:
(double_conversion):
* wtf/dtoa/utils.h:
(double_conversion):
(WTF::double_conversion::BufferReference::BufferReference):
(WTF::double_conversion::BufferReference::SubBufferReference):
(StringBuilder):
2013-04-08 Alberto Garcia <agarcia@igalia.com>
[BlackBerry] MathExtras: macros defined in math.h conflict with the real functions
https://bugs.webkit.org/show_bug.cgi?id=112683
Reviewed by Darin Adler.
After calls to signbit and friends were prefixed with std:: in
r143232, the BlackBerry port no longer compiles.
The solution is to get rid of the macros defined in math.h and use
the real functions instead.
* wtf/MathExtras.h:
2013-04-08 Max Vujovic <mvujovic@adobe.com>
REGRESSION (r147502): Animations of CA filters broken
https://bugs.webkit.org/show_bug.cgi?id=114067
Reviewed by Dean Jackson.
Revert r147502 [1] because it broke CA filter animations.
[1]: http://trac.webkit.org/changeset/147502
* wtf/Platform.h:
2013-04-08 Andreas Kling <akling@apple.com>
REGRESSION(r147894): Broke WTFReportBacktrace() on Mac.
<http://webkit.org/b/114174>
Reviewed by Anders Carlsson.
An #elif !OS(ANDROID) block was erroneously removed, turn it into an #else instead since
that path will still be taken for OS(DARWIN).
* wtf/Assertions.cpp:
2013-04-08 Oliver Hunt <oliver@apple.com>
Build fix.
Remove unnecessary include of <wtf/Forward.h> from Vector.h
* wtf/Vector.h:
2013-04-08 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed trivial buildfix after r147799.
Add an ifdef guard to ensure Qt uses its own monotonicallyIncreasingTime()
implemenation instead of the GLIB based one.
* wtf/CurrentTime.cpp:
(WTF):
2013-04-07 Benjamin Poulain <benjamin@webkit.org>
Remove the android code from WebKit Template Framework
https://bugs.webkit.org/show_bug.cgi?id=114138
Reviewed by Dirk Schulze.
* wtf/Assertions.cpp:
* wtf/Atomics.h:
* wtf/MathExtras.h:
* wtf/Platform.h:
* wtf/ThreadIdentifierDataPthreads.cpp:
2013-04-07 Oliver Hunt <oliver@apple.com>
Add bounds checking for WTF::Vector::operator[]
https://bugs.webkit.org/show_bug.cgi?id=89600
Reviewed by Filip Pizlo.
Add a template parameter to Vector<> that controls whether
bounds checking is performed in release builds or not.
Defaults to crashing on overflow.
* wtf/Forward.h:
(WTF):
* wtf/Vector.h:
(WTF):
(Vector):
(WTF::Vector::at):
(WTF::Vector::removeLast):
(WTF::::Vector):
(WTF::=):
(WTF::::contains):
(WTF::::find):
(WTF::::reverseFind):
(WTF::::fill):
(WTF::::appendRange):
(WTF::::expandCapacity):
(WTF::::tryExpandCapacity):
(WTF::::resize):
(WTF::::shrink):
(WTF::::grow):
(WTF::::reserveCapacity):
(WTF::::tryReserveCapacity):
(WTF::::reserveInitialCapacity):
(WTF::::shrinkCapacity):
(WTF::::append):
(WTF::::tryAppend):
(WTF::::appendSlowCase):
(WTF::::uncheckedAppend):
(WTF::::appendVector):
(WTF::::insert):
(WTF::::prepend):
(WTF::::remove):
(WTF::::reverse):
(WTF::::releaseBuffer):
(WTF::::checkConsistency):
(WTF::deleteAllValues):
(WTF::swap):
(WTF::operator==):
(WTF::operator!=):
2013-04-07 Patrick Gansterer <paroga@webkit.org>
[WIN] Fix problems with export macros of AutodrainedPool
https://bugs.webkit.org/show_bug.cgi?id=114132
Reviewed by Geoffrey Garen.
Exporting an inline function results in an error with the MS compiler.
* wtf/AutodrainedPool.h:
(AutodrainedPool):
(WTF::AutodrainedPool::AutodrainedPool):
(WTF::AutodrainedPool::~AutodrainedPool):
(WTF::AutodrainedPool::cycle):
2013-04-07 Patrick Gansterer <paroga@webkit.org>
[WinCE] Add workaround for UNUSED_PARAM()
https://bugs.webkit.org/show_bug.cgi?id=113440
Reviewed by Benjamin Poulain.
The MSVC compiler for Windwos CE throws an error when
an function parameter is passed to UNUSED_PARAM() and
its type is only forward declared.
* wtf/UnusedParam.h:
2013-04-07 Patrick Gansterer <paroga@webkit.org>
Do not check if WTF_ARM_ARCH_VERSION is defined in WTF_ARM_ARCH_AT_LEAST macro
https://bugs.webkit.org/show_bug.cgi?id=114127
Reviewed by Benjamin Poulain.
Platform.h defines WTF_ARM_ARCH_VERSION for CPU(ARM) always and removing
the check works around a bug in older Microsoft compiler versions.
* wtf/Platform.h:
2013-04-07 David Kilzer <ddkilzer@apple.com>
Remove the rest of SVG_DOM_OBJC_BINDINGS
<http://webkit.org/b/114112>
Reviewed by Geoffrey Garen.
* wtf/FeatureDefines.h:
- Remove ENABLE_SVG_DOM_OBJC_BINDINGS macro.
2013-04-06 Geoffrey Garen <ggaren@apple.com>
Removed v8 bindings hooks from IDL files
https://bugs.webkit.org/show_bug.cgi?id=114091
Reviewed by Anders Carlsson and Sam Weinig.
* wtf/ArrayBuffer.h:
(WTF):
(WTF::ArrayBufferContents::ArrayBufferContents):
(WTF::ArrayBufferContents::transfer):
(ArrayBufferContents):
(ArrayBuffer):
(WTF::ArrayBufferContents::~ArrayBufferContents):
* wtf/Platform.h:
2013-04-05 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[GTK] Change from PLATFORM(GTK) to USE(GLIB) in WTF/CurrentTime.cpp
https://bugs.webkit.org/show_bug.cgi?id=114061
Reviewed by Gustavo Noronha Silva.
Now other ports using GLib can use the correct implementation
and not the fallback one without adding any other PLATFORM guards
here.
* wtf/CurrentTime.cpp:
(WTF):
2013-04-05 Geoffrey Garen <ggaren@apple.com>
Made USE(JSC) unconditional
https://bugs.webkit.org/show_bug.cgi?id=114058
Reviewed by Anders Carlsson.
* wtf/ThreadRestrictionVerifier.h:
(WTF):
* wtf/WTFThreadData.cpp:
(WTF::WTFThreadData::WTFThreadData):
(WTF::WTFThreadData::~WTFThreadData):
* wtf/WTFThreadData.h:
(WTFThreadData):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::~StringImpl):
2013-04-05 Roger Fong <roger_fong@apple.com>
More VS2010 solution makefile fixes.
<rdar://problem/13588964>
* WTF.vcxproj/WTF.make:
2013-04-05 Anders Carlsson <andersca@apple.com>
Remove more dead Chromium code from WTF
https://bugs.webkit.org/show_bug.cgi?id=114037
Reviewed by Allan Sandfeld Jensen.
* wtf/CurrentTime.cpp:
(WTF):
* wtf/DisallowCType.h:
* wtf/ExportMacros.h:
* wtf/MainThread.cpp:
* wtf/Platform.h:
2013-04-05 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
[EFL] Disable GLOBAL_FAST_MALLOC_NEW by default.
https://bugs.webkit.org/show_bug.cgi?id=114031
Reviewed by Alexis Menard.
Follow what some other ports already do and avoid globally overriding
the `new' and `delete' operators with the ones in FastMalloc.
In many cases, third-party or client code allocates memory with
standard library calls but the memory gets deleted by FastMalloc,
causing a crash. The reverse (ie. memory being allocated by FastMalloc
and freed by the system libraries) is also possible.
Commits 135666 and 121018 provide more information about this, as well
as comment 6 in bug 89358.
* wtf/Platform.h:
2013-04-05 Benjamin Poulain <bpoulain@apple.com>
Remove WTFURL from WebKit
https://bugs.webkit.org/show_bug.cgi?id=113994
Reviewed by Ryosuke Niwa.
Painful, but that is for the best now :(
* GNUmakefile.list.am:
* WTF.xcodeproj/project.pbxproj:
* wtf/MemoryInstrumentationParsedURL.h: Removed.
* wtf/url/api/ParsedURL.cpp: Removed.
* wtf/url/api/ParsedURL.h: Removed.
* wtf/url/api/URLBuffer.h: Removed.
* wtf/url/api/URLQueryCharsetConverter.h: Removed.
* wtf/url/api/URLString.cpp: Removed.
* wtf/url/api/URLString.h: Removed.
* wtf/url/src/RawURLBuffer.h: Removed.
* wtf/url/src/URLCanon.h: Removed.
* wtf/url/src/URLCanonEtc.cpp: Removed.
* wtf/url/src/URLCanonFilesystemurl.cpp: Removed.
* wtf/url/src/URLCanonFileurl.cpp: Removed.
* wtf/url/src/URLCanonHost.cpp: Removed.
* wtf/url/src/URLCanonICU.cpp: Removed.
* wtf/url/src/URLCanonIP.cpp: Removed.
* wtf/url/src/URLCanonInternal.cpp: Removed.
* wtf/url/src/URLCanonInternal.h: Removed.
* wtf/url/src/URLCanonMailto.cpp: Removed.
* wtf/url/src/URLCanonPath.cpp: Removed.
* wtf/url/src/URLCanonPathurl.cpp: Removed.
* wtf/url/src/URLCanonQuery.cpp: Removed.
* wtf/url/src/URLCanonRelative.cpp: Removed.
* wtf/url/src/URLCanonStdURL.cpp: Removed.
* wtf/url/src/URLCharacterTypes.cpp: Removed.
* wtf/url/src/URLCharacterTypes.h: Removed.
* wtf/url/src/URLComponent.h: Removed.
* wtf/url/src/URLFile.h: Removed.
* wtf/url/src/URLParse.cpp: Removed.
* wtf/url/src/URLParse.h: Removed.
* wtf/url/src/URLParseFile.cpp: Removed.
* wtf/url/src/URLParseInternal.h: Removed.
* wtf/url/src/URLSegments.cpp: Removed.
* wtf/url/src/URLSegments.h: Removed.
* wtf/url/src/URLUtil.cpp: Removed.
* wtf/url/src/URLUtil.h: Removed.
* wtf/url/src/URLUtilInternal.h: Removed.
2013-04-04 Geoffrey Garen <ggaren@apple.com>
Nixed the defunct chromium folder from WTF
https://bugs.webkit.org/show_bug.cgi?id=113992
Reviewed by Ryosuke Niwa.
* wtf/chromium: Removed.
* wtf/chromium/ChromiumThreading.h: Removed.
* wtf/chromium/MainThreadChromium.cpp: Removed.
2013-04-04 Martin Robinson <mrobinson@igalia.com>
[GTK] Remove the gyp build
https://bugs.webkit.org/show_bug.cgi?id=113942
Reviewed by Gustavo Noronha Silva.
* WTF.gyp/WTFGTK.gyp: Removed.
2013-04-04 Anders Carlsson <andersca@apple.com>
ObjcRuntimeExtras.h should use variadic templates
https://bugs.webkit.org/show_bug.cgi?id=113941
Reviewed by Andreas Kling.
Reimplement wtfObjcMsgSend and wtfCallIMP as variadic function templates.
* wtf/ObjcRuntimeExtras.h:
(wtfObjcMsgSend):
(wtfCallIMP):
2013-04-04 Andras Becsi <andras.becsi@digia.com>
Fix the build with GCC 4.8
https://bugs.webkit.org/show_bug.cgi?id=113147
Reviewed by Allan Sandfeld Jensen.
Disable diagnostic warning -Wunused-local-typedefs for GCC 4.8
since dummy typedefs are commonly used in the codebase.
* wtf/Compiler.h:
2013-04-03 Pratik Solanki <psolanki@apple.com>
Enable HAVE_MADV_FREE_REUSE on iOS
https://bugs.webkit.org/show_bug.cgi?id=113892
<rdar://problem/12787563>
Reviewed by Mark Rowe.
* wtf/Platform.h:
2013-04-02 Ryosuke Niwa <rniwa@webkit.org>
Remove code for Mac 10.5 and earlier from WTF and WebKit2
https://bugs.webkit.org/show_bug.cgi?id=113844
Reviewed by Benjamin Poulain.
Removed the code for 10.5 and removed if-def for 10.6.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
* wtf/Platform.h:
* wtf/ThreadingPthreads.cpp:
(WTF::initializeCurrentThreadInternal):
* wtf/unicode/icu/CollatorICU.cpp:
(WTF::Collator::userDefault):
2013-04-02 Max Vujovic <mvujovic@adobe.com>
[CSS Filters] Filter outsets clipped on composited layers when filter is applied after first layout
https://bugs.webkit.org/show_bug.cgi?id=109098
Reviewed by Dean Jackson.
* wtf/Platform.h:
Add flag for HAVE(COMPOSITOR_FILTER_OUTSETS) macro. This is used to check if a
platform's compositor expands layers internally for filter outsets when it applies
filters like drop-shadow and blur. Currently, only CoreAnimation does has this
capability.
2013-04-02 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: memory instrumentation for external arrays is broken
https://bugs.webkit.org/show_bug.cgi?id=113790
Reviewed by Pavel Feldman.
* wtf/MemoryInstrumentationArrayBufferView.h: report buffer pointer as retaining one as
we know that the pointer is not broken.
(WTF::reportMemoryUsage):
2013-04-01 Han Shen <shenhan@google.com>
Move definition of nested classes that inherit enclosing class outside class definition.
https://bugs.webkit.org/show_bug.cgi?id=113454
Reviewed by Benjamin Poulain.
HashMap.h does not build on GCC 4.8. Inside this file,
HashMapKeysProxy and HashMapValuesProxy are defined as nested
class inside HashMap - which is legal - the illegal part is that
these 2 classes inherit HashMap, that is the enclosing class, that
causes "reference to in-complete definition" error.
The fix is to move outside the definition of these 2 classes, and
leave only declaration part inside HashMap as is illustrated below -
template class <typename T>
class HashMap {
... ...
... ...
private:
class HashMapKeysProxy;
// ERROR - nested class inherits enclosing class.
class HashMapKeysProxy : private HashMap {
... ...
};
... ...
... ...
class HashMapKeysProxy : private HashMap {
... ...
};
... ...
... ...
};
Fixed as below:
template class <typename T>
class HashMap {
... ...
... ...
private:
class HashMapKeysProxy;
class HashMapValuesProxy;
... ...
... ...
};
template <typename T>
class HashMap<T>::HashMapKeysProxy : private HashMap<T> {
... ...
};
template <typename T>
class HashMap<T>::HashMapValuesProxy : private HashMap<T> {
... ...
};
* wtf/HashMap.h:
(HashMap):
(WTF): Factor out nested class definition from enclosing class.
2013-03-31 Mark Hahnenberg <mhahnenberg@apple.com>
Regions should be allocated from the same contiguous segment of virtual memory
https://bugs.webkit.org/show_bug.cgi?id=113662
Reviewed by Filip Pizlo.
Instead of letting the OS spread our Regions all over the place, we should allocate them all within
some range of each other. This change will open the door to some other optimizations, e.g. doing simple
range checks for our write barriers and compressing JSCell pointers to 32-bits.
* wtf/MetaAllocator.cpp: Changed the MetaAllocator to allow custom page sizes if the derived class wants to
use something other than the system page size.
(WTF::MetaAllocator::MetaAllocator):
* wtf/MetaAllocator.h:
(MetaAllocator):
2013-04-01 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: add memory instrumentation for StringBuffer
https://bugs.webkit.org/show_bug.cgi?id=113507
Reviewed by Pavel Feldman.
Added memory instrumentation for StringBuffer.
* wtf/MemoryInstrumentationString.h:
(WTF):
(WTF::reportMemoryUsage):
2013-03-30 Tom Sepez <tsepez@chromium.org>
View-source iframes are dangerous (and not very useful).
https://bugs.webkit.org/show_bug.cgi?id=113345
Reviewed by Adam Barth.
* wtf/FeatureDefines.h:
Default definition of ENABLE_VIEWSOURCE_ATTRIBUTE is enabled.
2013-03-27 Patrick Gansterer <paroga@webkit.org>
Set WTF_ARM_ARCH_VERSION to correct value when used with MSVC
https://bugs.webkit.org/show_bug.cgi?id=113436
Reviewed by Benjamin Poulain.
The Microsoft compiler defines _M_ARM with used ARM version.
* wtf/Platform.h:
2013-03-27 Allan Sandfeld Jensen <allan.jensen@digia.com>
Support C++11 static_assert
https://bugs.webkit.org/show_bug.cgi?id=113308
Reviewed by Alexey Proskuryakov.
Use the C++11 static_assert for COMPILE_ASSERT when it is available. Note that
even when compiling with C++11 support, static_assert will not always be available
since Assertions.h may also be used outside of C++.
C11 _Static_assert is enabled for GCC when it has C11 support (gcc>=4.7 -std=c11).
* wtf/Assertions.h:
* wtf/Compiler.h:
2013-03-25 Oliver Hunt <oliver@apple.com>
RefCountedArray needs a size based constructor
https://bugs.webkit.org/show_bug.cgi?id=113277
Reviewed by Benjamin Poulain.
Simple patch to add a size based constructor for RefCountedArray
so that we can create an sharable array without a copy.
* wtf/RefCountedArray.h:
(RefCountedArray):
(WTF::RefCountedArray::RefCountedArray):
2013-03-26 James Robinson <jamesr@chromium.org>
Compile fix - OS(WINDOWS), not OS(WIN).
* wtf/ProcessID.h:
(WTF::getCurrentProcessID):
2013-03-26 James Robinson <jamesr@chromium.org>
Fix compile for OS(WIN) != PLATFORM(WIN)
https://bugs.webkit.org/show_bug.cgi?id=113356
Reviewed by Tim Horton.
* wtf/ProcessID.h:
(WTF::getCurrentProcessID):
2013-03-23 Filip Pizlo <fpizlo@apple.com>
JSC_enableProfiler=true should also cause JSGlobalData to save the profiler output somewhere
https://bugs.webkit.org/show_bug.cgi?id=113144
Reviewed by Geoffrey Garen.
I got tired of the fact that getpid(2) is not a syscall on Windows (unless you do
_getpid() I believe), so I wrote a header that abstracts it. I also changed existing
code that uses getpid() to use WTF::getCurrentProcessID().
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/MetaAllocator.cpp:
(WTF::MetaAllocator::dumpProfile):
* wtf/ProcessID.h: Added.
(WTF):
(WTF::getCurrentProcessID):
* wtf/text/StringImpl.cpp:
(WTF::StringStats::printStats):
2013-03-25 Kent Tamura <tkent@chromium.org>
Rename ENABLE_INPUT_TYPE_DATETIME
https://bugs.webkit.org/show_bug.cgi?id=113254
Reviewed by Kentaro Hara.
Rename ENABLE_INPUT_TYPE_DATETIME to ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE.
Actually I'd like to remove the code, but we shouldn't remove it yet
because we shipped products with it on some platforms.
* wtf/FeatureDefines.h:
2013-03-25 David Kilzer <ddkilzer@apple.com>
WTF::binarySearchImpl() should compile with -Wshorten-64-to-32
<http://webkit.org/b/113170>
Reviewed by Dan Bernstein.
Fixes the following build failure:
/usr/local/include/wtf/StdLibExtras.h:190:30: error: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Werror,-Wshorten-64-to-32]
int pos = (size - 1) >> 1;
~~~ ~~~~~~~~~~~^~~~
1 error generated.
* wtf/StdLibExtras.h:
(WTF::binarySearchImpl): Switch type from int to size_t.
2013-03-22 Benjamin Poulain <bpoulain@apple.com>
Remove 2 bad branches from StringHash::equal() and CaseFoldingHash::equal()
https://bugs.webkit.org/show_bug.cgi?id=113003
Reviewed by Eric Seidel.
StringHash::equal() and CaseFoldingHash::equal() were both testing for
the nullity of the two input pointers. The catch is: neither traits handle
null pointers, and any client code would have crashed on hash(), before equal()
is called.
Consequently, the two branches had a pass rate of zero when called from a HashMap code.
The function is also never inlined because it is too big (the code of equal() for characters
is always inlined, causing the function to be quite big).
This patch introduces two new functions in the StringImpl API: equalNonNull() and
equalIgnoringCaseNonNull(). Those functions are similar to their equal() equivalent
but make the assumtion the input is never null.
The functions are used for StringHash to avoid the useless branches.
* wtf/text/StringHash.h:
(WTF::StringHash::equal):
(WTF::CaseFoldingHash::equal):
* wtf/text/StringImpl.cpp:
(WTF::stringImplContentEqual):
(WTF::equal):
(WTF::equalNonNull):
(WTF::equalIgnoringCase):
(WTF::equalIgnoringCaseNonNull):
(WTF::equalIgnoringNullity):
* wtf/text/StringImpl.h:
(WTF::equalIgnoringCase):
2013-03-22 Benjamin Poulain <bpoulain@apple.com>
Name correctly the argument of StringImpl::setIsAtomic()
https://bugs.webkit.org/show_bug.cgi?id=113000
Reviewed by Geoffrey Garen.
* wtf/text/StringImpl.h:
(WTF::StringImpl::setIsAtomic):
The argument was probably an unfortunate copy-paste from setIsIdentifier().
Fix the name.
2013-03-22 Hajime Morrita <morrita@google.com>
Custom Elements: "readyCallback" lifecycle callback should be called.
https://bugs.webkit.org/show_bug.cgi?id=112538
Reviewed by Elliott Sprehn.
* wtf/HashSet.h:
(WTF::copyToVector): Generalized to let it accept variants like ListHahsSet instead of only HashSet.
2013-03-22 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r146534 and r146565.
http://trac.webkit.org/changeset/146534
http://trac.webkit.org/changeset/146565
https://bugs.webkit.org/show_bug.cgi?id=113017
"r146534 caused perf regression on Chromium Linux x64"
(Requested by yurys on #webkit).
* wtf/HashSet.h:
(WTF):
(WTF::copyToVector):
2013-03-21 Hajime Morrita <morrita@google.com>
Custom Elements: "readyCallback" lifecycle callback should be called.
https://bugs.webkit.org/show_bug.cgi?id=112538
Reviewed by Elliott Sprehn.
* wtf/HashSet.h:
(WTF::copyToVector): Generalized to let it accept variants like ListHahsSet instead of only HashSet.
2013-03-21 Mark Lam <mark.lam@apple.com>
Introducing String::findNextLineStart().
https://bugs.webkit.org/show_bug.cgi?id=112957.
Reviewed by Geoffrey Garen.
This is replaces String::reverseFindLineTerminator() in the JSC
debugger's code for computing column numbers.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::findNextLineStart):
* wtf/text/StringImpl.h:
(WTF::findNextLineStart):
* wtf/text/WTFString.h:
(WTF::String::findNextLineStart):
2013-03-21 Adam Barth <abarth@webkit.org>
HTMLNames should construct strings at compile time
https://bugs.webkit.org/show_bug.cgi?id=112831
Reviewed by Darin Adler.
* wtf/text/StringImpl.h:
(StringImpl):
(StaticASCIILiteral):
- This struct lets us construct StringImpl objects at compile time.
(WTF::StringImpl::assertHashIsCorrect):
- This function lets us sanity check StringImpl objects created from StaticData.
(WTF::StringImpl::find): Remove a stray ;
(WTF::StringImpl::findIgnoringCase): ditto
(WTF::StringImpl::startsWith): ditto
(WTF::ValueCheck<StringImpl*>):
* wtf/text/AtomicStringImpl.h:
(WTF::ValueCheck<AtomicStringImpl*>):
2013-03-21 Gabor Rapcsanyi <rgabor@webkit.org>
Implement LLInt for CPU(ARM_TRADITIONAL)
https://bugs.webkit.org/show_bug.cgi?id=97589
Reviewed by Zoltan Herczeg.
Enable LLInt for ARMv5 and ARMv7 traditional as well.
* wtf/Platform.h:
2013-03-20 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r146419.
http://trac.webkit.org/changeset/146419
https://bugs.webkit.org/show_bug.cgi?id=112870
Broke many tests on debug builds (Requested by rniwa_ on
#webkit).
* wtf/text/StringImpl.h:
(StringImpl):
2013-03-20 Adam Barth <abarth@webkit.org>
HTMLNames should construct strings at compile time
https://bugs.webkit.org/show_bug.cgi?id=112831
Reviewed by Darin Adler.
* wtf/text/StringImpl.h:
(StringImpl):
(StaticASCIILiteral):
- This struct lets us construct StringImpl objects at compile time.
(WTF::StringImpl::assertValidHash):
- This function lets us sanity check StringImpl objects created from StaticData.
2013-03-20 Jessie Berlin <jberlin@apple.com>
REGRESSION(r145592): AutodrainedPool.h. RunLoopTimer.h, SchedulePair.h are being copied into
the wrong location
https://bugs.webkit.org/show_bug.cgi?id=112833
Reviewed by Darin Adler.
* WTF.xcodeproj/project.pbxproj:
Make sure those three headers are copied with the rest of the WTF headers.
2013-03-20 Mark Rowe <mrowe@apple.com>
FastMalloc scavenge timer specifies an overly narrow leeway value.
Reviewed by Alexey Proskuryakov.
There's no need to allow only 1ms of leeway on a 2s timer.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::initializeScavenger): Bump the leeway window
to 10% of the scavenge timer.
2013-03-20 JungJik Lee <jungjik.lee@samsung.com>
[EFL] Disable REQUEST_ANIMATION_FRAME_TIMER to render a new animation frame.
https://bugs.webkit.org/show_bug.cgi?id=112114
Reviewed by Kenneth Rohde Christiansen.
The issue is that if the animation starts outside of the area covered by keepRects,
the web process does not create tiles of the animation layer and the layer moves
without having any tiles. In order to fix this issue, CoordinatedLayerHost must call
scheduleLayerFlush to create new tiles when the layer enters the area covered by keepRect.
However EFL port didn't call scheduleLayerFlush periodically for animation.
We can tie scripted animations with synchronization of the layer and that already
has been implemented in r123786 by Qt port. This patch is for activating r123786 patch.
The testing is covered by ManualTests/animation/transition-on-and-offscreen-animation.html
* wtf/Platform.h: Disable REQUEST_ANIMATION_FRAME_TIMER.
2013-03-20 Mark Lam <mark.lam@apple.com>
Introducing String::reverseFindLineTerminator().
https://bugs.webkit.org/show_bug.cgi?id=112741.
Reviewed by Oliver Hunt.
This is needed by the JSC debugger code for computing column numbers.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::reverseFindLineTerminator):
* wtf/text/StringImpl.h:
(StringImpl):
(WTF::reverseFindLineTerminator):
* wtf/text/WTFString.h:
(WTF::String::reverseFindLineTerminator):
2013-03-19 Martin Robinson <mrobinson@igalia.com>
Fix the WTF gyp build for GTK+.
* WTF.gyp/WTFGTK.gyp: Skip files with CF in the name.
2013-03-19 Alberto Garcia <agarcia@igalia.com>
[BlackBerry] Enable USE_SYSTEM_MALLOC by default
https://bugs.webkit.org/show_bug.cgi?id=112365
Reviewed by Benjamin Poulain.
Enable USE_SYSTEM_MALLOC by default via FeatureList.pm instead of
harcoding it in wtf/Platform.h
* wtf/Platform.h:
2013-03-18 Benjamin Poulain <benjamin@webkit.org>
[iOS] Make a UChar string equal() based on the LChar version
https://bugs.webkit.org/show_bug.cgi?id=112495
Reviewed by David Kilzer.
* wtf/text/StringImpl.h:
(WTF::equal):
Create a equal() function for UChar based on the work done for LChar.
On A6, this is a speed up of about 40% for any string of 2 or more characters.
It is slower by 8% on a single UChar comparison.
2013-03-18 Brent Fulgham <bfulgham@webkit.org>
[WinCairo] Get build working under VS2010.
https://bugs.webkit.org/show_bug.cgi?id=112604
Reviewed by Tim Horton.
* WTF.vcxproj/WTF.vcxproj: Add Debug_WinCairo and Release_WinCairo
targets so headers get copied to appropriate build folder.
* WTF.vcxproj/WTFGenerated.vcxproj: Ditto.
2013-03-15 Benjamin Poulain <bpoulain@apple.com>
[iOS] Update StringImpl's equal to have a single version on all supported Apple CPUs
https://bugs.webkit.org/show_bug.cgi?id=112400
Reviewed by Michael Saboff.
* wtf/text/StringImpl.h:
(WTF::equal):
Tweak the code to make it work on older Apple CPUs:
-Use external "ouput" variable instead of the registers R9 and R12. This gets rid
of some register pressure previously imposed on the compiler. (Clang nicely
choose R9 and R12 when needed, following iOS ABI).
-Instead of using "R3" for storing the length / 4, update the length by -4 on
each iteration and work in the negative space for the tail. This frees one register
which is then used for isEqual.
-Get rid of the unconditional branch from the loop. By using subs and working in the
negative space, we can test for the Carry flag to jump back to the next LDR.
2013-03-15 Benjamin Poulain <bpoulain@apple.com>
[iOS] Fix the length pass to memcmp in the fallback versions of String's equal
https://bugs.webkit.org/show_bug.cgi?id=112463
Reviewed by Ryosuke Niwa.
* wtf/text/StringImpl.h:
(WTF::equal): It might be a good idea to compare the full UChar strings...
2013-03-15 Michael Saboff <msaboff@apple.com>
Add runtime check for improper register allocations in DFG
https://bugs.webkit.org/show_bug.cgi?id=112380
Reviewed by Geoffrey Garen.
* wtf/Platform.h: Added new ENABLE_DFG_REGISTER_ALLOCATION_VALIDATION compilation flag to
enable generation of register allocation checking. This is on for debug builds.
2013-03-13 Jessie Berlin <jberlin@apple.com>
Remove svn:executable from a file that isn't supposed to be executable.
Rubber-stamped by Geoff Garen.
* wtf/MediaTime.h:
2013-03-13 Oliver Hunt <oliver@apple.com>
Simplify Checked<> multiplication
https://bugs.webkit.org/show_bug.cgi?id=112286
Reviewed by James Robinson.
Trying to correctly identify multiplication by zero complicated the
unsigned * unsigned multiply, and still didn't handle all cases correctly.
Now we just do the normal division based approach to overflow detection
leading to much simpler reasoning.
Would be nice if we could have a jo style intrinsic one day.
* wtf/CheckedArithmetic.h:
2013-03-13 Dean Jackson <dino@apple.com>
Unreviewed attempted build fix for Windows. SchedulePair.cpp -> SchedulePairCF.cpp
* WTF.vcproj/WTF.vcproj:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
2013-03-13 Benjamin Poulain <bpoulain@apple.com>
[iOS] Add optimized version of StringImpl's equal(LChar*,LChar*) for Apple CPUs
https://bugs.webkit.org/show_bug.cgi?id=112202
Reviewed by Gavin Barraclough.
* Source/WTF/wtf/Platform.h:
Make the macro WTF_ARM_ARCH_VERSION valid on any architecture.
* wtf/text/StringImpl.h:
(WTF::equal):
On ARMv7S, the new version is about 11% percent faster than the simple loop.
On ARMv7 classic, memcmp is a little faster than the simple loop on Apple A5.
2013-03-13 James Robinson <jamesr@chromium.org>
SchedulePair.cpp is CF-specific
https://bugs.webkit.org/show_bug.cgi?id=112204
Reviewed by Oliver Hunt.
This renames SchedulePair.cpp SchedulePairCF.cpp, since it depends on CF, and excludes it from chromium's gyp
files.
* WTF.gyp/WTF.gyp:
Add CF to the exclusion filter for the Chromium port.
* WTF.gypi:
Add SchedulePairCF.cpp
* WTF.xcodeproj/project.pbxproj:
Update project file to point to new .cpp location
* wtf/SchedulePairCF.cpp: Renamed from Source/WTF/wtf/SchedulePair.cpp.
2013-03-13 Allan Sandfeld Jensen <allan.jensen@digia.com>
Support C++11 features in GCC <4.6
https://bugs.webkit.org/show_bug.cgi?id=111553
Reviewed by Simon Hausmann.
Enable support for rvalue references from gcc 4.3, deleted functions
from gcc 4.4, explicit conversion from gcc 4.5, and strongly typed
enums from gcc 4.6.
* wtf/Compiler.h:
2013-03-12 Geoffrey Garen <ggaren@apple.com>
Unreviewed attempted Windows build fix after http://trac.webkit.org/changeset/145592.
* wtf/SchedulePair.cpp:
* wtf/SchedulePair.h:
(WTF::SchedulePair::SchedulePair): Since linking is failing,
try inlining this function.
2013-03-12 Tim Horton <timothy_horton@apple.com>
Typo in earlier Windows build fix. Unreviewed.
* WTF.vcproj/WTF.vcproj:
2013-03-12 Tim Horton <timothy_horton@apple.com>
Unreviewed attempted Windows build fix after http://trac.webkit.org/changeset/145592.
* WTF.vcproj/WTF.vcproj:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
2013-03-12 James Robinson <jamesr@chromium.org>
Build fix for r145592 - update gyp files to refer to new file locations.
* WTF.gypi:
2013-03-12 Geoffrey Garen <ggaren@apple.com>
Moved RunLoopTimer and SchedulePair to WTF
https://bugs.webkit.org/show_bug.cgi?id=112171
Reviewed by Oliver Hunt.
This will allow us to use timers in lower level primitives without
duplicating all the code.
* WTF.xcodeproj/project.pbxproj:
* wtf/AutodrainedPool.h: Copied from Source/WebCore/platform/AutodrainedPool.h.
(AutodrainedPool):
* wtf/AutodrainedPoolMac.mm: Copied from Source/WebCore/platform/mac/AutodrainedPool.mm.
* wtf/RunLoopTimer.h: Copied from Source/WebCore/platform/RunLoopTimer.h.
* wtf/RunLoopTimerCF.cpp: Copied from Source/WebCore/platform/cf/RunLoopTimerCF.cpp.
* wtf/SchedulePair.cpp: Copied from Source/WebCore/platform/cf/SchedulePair.cpp.
* wtf/SchedulePair.h: Copied from Source/WebCore/platform/cf/SchedulePair.h.
(SchedulePair):
* wtf/SchedulePairMac.mm: Copied from Source/WebCore/platform/mac/SchedulePairMac.mm.
2013-03-12 Oliver Hunt <oliver@apple.com>
Add more Checked<> tests
https://bugs.webkit.org/show_bug.cgi?id=112190
Reviewed by Geoffrey Garen.
Export the CheckedState enum type
* wtf/CheckedArithmetic.h:
2013-03-12 Oliver Hunt <oliver@apple.com>
Make CheckedArithmetic slightly more sane
https://bugs.webkit.org/show_bug.cgi?id=112178
Reviewed by Geoffrey Garen.
Add an enum type for safeGet rather than using a bool,
and correctly handle unsigned * unsigned, when one value
is 0.
* wtf/CheckedArithmetic.h:
(WTF::ENUM_CLASS):
(WTF):
(WTF::operator+):
(WTF::operator-):
(WTF::operator*):
2013-03-11 Michael Saboff <msaboff@apple.com>
Unreviewed build fix. Rolling out inadvertent setting of DATA_LOG_TO_FILE.
2013-03-11 Oliver Hunt <oliver@apple.com>
Make SegmentedVector Noncopyable
https://bugs.webkit.org/show_bug.cgi?id=112059
Reviewed by Geoffrey Garen.
Copying a SegmentedVector can be extraordinarily expensive, so we beat
it with the Noncopyable stick - that way we can ensure that if anyone
wants an actual copy they know what they're doing.
* wtf/SegmentedVector.h:
(SegmentedVector):
2013-03-08 Benjamin Poulain <benjamin@webkit.org>
[Mac] Add a feature flag for 'view-mode' Media Feature, disable it on Mac
https://bugs.webkit.org/show_bug.cgi?id=111297
Reviewed by Kenneth Rohde Christiansen.
* wtf/FeatureDefines.h: Add a new feature flag for the view-mode
CSS media: ENABLE_VIEW_MODE_CSS_MEDIA.
2013-03-08 Roger Fong <roger_fong@apple.com>
Makefile fixes.
* WTF.vcxproj/WTF.make:
2013-03-08 Gabor Rapcsanyi <rgabor@webkit.org>
Cache flush problem on ARMv7 JSC
https://bugs.webkit.org/show_bug.cgi?id=111441
Reviewed by Zoltan Herczeg.
Not proper cache flush causing random crashes on ARMv7 Linux with V8 tests.
The problem is similar to https://bugs.webkit.org/show_bug.cgi?id=77712.
Change the cache fulsh mechanism similar to ARM traditinal and revert the
temporary fix.
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveUncommitted):
(WTF::OSAllocator::decommit):
2013-03-07 Andrew Bortz <andrew@abortz.net>
Replace Mersenne Twister random number generator with a simpler one.
https://bugs.webkit.org/show_bug.cgi?id=111533
Reviewed by Adam Barth.
The new generator is only a single line long, but passes all the Diehard
statistical tests and runs ~3x faster than the Mersenne Twister, with a
guaranteed cycle length of 2^64 and only 8 bytes of state.
* wtf/Platform.h: Mersenne Twister defines are no longer needed
* wtf/RandomNumber.cpp:
(WTF::Internal::initializeRandomNumber): State initialization
(WTF::Internal::randomNumber): Actual implementation
(WTF::randomNumber): We don't need to fall back on rand()-based generator anymore,
so this code is greatly simplified.
* wtf/RandomNumber.h:
* wtf/RandomNumberSeed.h:
(WTF::initializeRandomNumberGenerator): This code is no longer needed.
Additionally, the code had an error, since rand() returns 32-bits, so each
initializationBuffer's upper 16-bits has more bits set than random.
2013-03-06 Adenilson Cavalcanti <cavalcantii@gmail.com>
Build fix: PageAllocationAligned no longer has executable flag
https://bugs.webkit.org/show_bug.cgi?id=111659
Reviewed by Kentaro Hara.
Build fix: use false as parameter to execution flag.
* wtf/PageAllocationAligned.cpp:
(WTF::PageAllocationAligned::allocate):
2013-03-06 Eric Seidel <eric@webkit.org>
AtomicStringImpls are not safe to send between threads
https://bugs.webkit.org/show_bug.cgi?id=111652
Reviewed by Benjamin Poulain.
We don't have this problem yet, but it's good to be safe.
* wtf/text/WTFString.cpp:
(WTF::String::isSafeToSendToAnotherThread):
2013-03-06 Oliver Hunt <oliver@apple.com>
Don't give PageAllocationAligned the option to allocate executable memory
https://bugs.webkit.org/show_bug.cgi?id=111657
Reviewed by Geoffrey Garen.
* wtf/PageAllocationAligned.cpp:
(WTF::PageAllocationAligned::allocate):
* wtf/PageAllocationAligned.h:
(PageAllocationAligned):
2013-03-04 Jer Noble <jer.noble@apple.com>
Default mouse cursor behavior should be auto-hide for full screen video with custom controls
https://bugs.webkit.org/show_bug.cgi?id=107601
Reviewed by Beth Dakin.
Enable the CURSOR_VISIBILITY feature.
* wtf/FeatureDefines.h:
2013-03-04 Oliver Hunt <oliver@apple.com>
Make fastmalloc use guardpages
https://bugs.webkit.org/show_bug.cgi?id=111353
Reviewed by Anders Carlsson.
Add PROT_NONE pages at the beginning and end of every
mmap call made by fastmalloc.
* wtf/TCSystemAlloc.cpp:
(TryMmap):
2013-03-06 Paweł Forysiuk <tuxator@o2.pl>
Typo in inline function in ByteOrder.h
https://bugs.webkit.org/show_bug.cgi?id=111473
Reviewed by Benjamin Poulain.
* wtf/ByteOrder.h:
(ntohs):
2013-03-05 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Build break with latest EFL libraries
https://bugs.webkit.org/show_bug.cgi?id=111028
Reviewed by Dirk Pranke.
* wtf/PlatformEfl.cmake: Added ECORE_IMF_INCLUDE_DIRS.
2013-03-05 Csaba Osztrogonác <ossy@webkit.org>
Fix cast-align warning in ASCIIFastPath.h on ARM
https://bugs.webkit.org/show_bug.cgi?id=111436
Reviewed by Benjamin Poulain.
* wtf/text/ASCIIFastPath.h:
(WTF::charactersAreAllASCII):
2013-03-04 Laszlo Gombos <l.gombos@samsung.com>
JSC_OBJC_API_ENABLED should be removed from FeatureDefines.h
https://bugs.webkit.org/show_bug.cgi?id=111269
Reviewed by Mark Hahnenberg.
JSC_OBJC_API_ENABLED flag was added to FeatureDefines.h (r143637)
so that it could be used in WebCore.exp.in to determine whether
or not we should be exporting certain symbols based on whether
the WebKit-related portion of the JSC ObjC API was enabled.
It turned out conditionally including certain symbols didn't
work when building fat binaries, so it's not even necessary any more.
* wtf/FeatureDefines.h: Remove JSC_OBJC_API_ENABLED.
2013-03-04 Andreas Kling <akling@apple.com>
Deque: Free internal buffer in clear().
<http://webkit.org/b/111316>
<rdar://problem/13336675>
Reviewed by Antti Koivisto.
525 kB progression on Membuster3.
* wtf/Deque.h:
(WTF::::clear):
2013-03-04 Kunihiko Sakamoto <ksakamoto@chromium.org>
Add build flag for FontLoader
https://bugs.webkit.org/show_bug.cgi?id=111289
Reviewed by Benjamin Poulain.
Add ENABLE_FONT_LOAD_EVENTS build flag (disabled by default).
* wtf/FeatureDefines.h:
2013-02-27 Darin Adler <darin@apple.com>
StringHasher functions require alignment that call sites do not all guarantee
https://bugs.webkit.org/show_bug.cgi?id=110171
Reviewed by Benjamin Poulain.
The StringHasher class is optimized for clients who pass it two characters at
a time. However, the function named addCharacters did not make this clear to
clients, and one calculateStringHashAndLengthFromUTF8MaskingTop8Bits got it wrong.
Fix by making addCharacters work regardless of hasher alignment and adding a new
function, addCharactersAssumingAligned, for use when we want a faster path and can
guarantee we are adding characters two at a time.
* wtf/StringHasher.h:
(WTF::StringHasher::addCharactersAssumingAligned): Renamed the addCharacters function
addCharactersAssumingAligned, since it only works if the hasher is currently aligned,
meaning it contains an even number of characters. The function already asserts
that this is true, but the calculateStringHashAndLengthFromUTF8MaskingTop8Bits
function was using it in cases where the assertion could fire. Also updated to
call addCharactersInternal by its new name. Also added some new overloads that take
data pointers and lengths so callers can always use addCharactersAssumingAligned
instead of addCharacters if they know the hasher is aligned.
(WTF::StringHasher::addCharacter): Updated to call the public
addCharactersAssumingAligned function since that's simpler and a bit cleaner.
(WTF::StringHasher::addCharacters): Added functions with this name that handle
the case where the hasher is not aligned. These will be called by existing call sites
that were formerly using the function named addCharactersAssumingAligned above.
Also add an overload that works with the default converter automatically.
(WTF::StringHasher::computeHashAndMaskTop8Bits): Changed to call
addCharactersAssumingAligned to eliminate copied and pasted code. The hasher is empty,
so definitely aligned.
(WTF::StringHasher::computeHash): Ditto.
(WTF::StringHasher::addCharactersInternal): Renamed from addCharactersToHash, since
the former name did not make clear how this differs from the public functions.
The real difference is that this is like addCharactersAssumingAligned, but without
the assertion, so addCharactersAssumingAligned is called instead, even within the
class's implementation.
2013-03-01 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: Native Memory Instrumentation: do not visit raw pointers by default.
https://bugs.webkit.org/show_bug.cgi?id=110943
Reviewed by Yury Semikhatsky.
Unfortunately in many cases raw pointer may point to an object that has been deleted.
There is no working solution to solve this problem in general.
It could be solved only on case by case basis.
* wtf/MemoryInstrumentation.h:
(WTF::MemoryInstrumentation::addObject):
(WTF::MemoryInstrumentation::MemberTypeTraits::addObject):
(WTF::MemoryClassInfo::addMember):
(WTF::MemoryInstrumentation::addObjectImpl):
* wtf/MemoryInstrumentationString.h:
(WTF::reportMemoryUsage):
2013-03-01 Eric Seidel <eric@webkit.org>
Threaded HTML Parser has an extra copy of every byte from the network
https://bugs.webkit.org/show_bug.cgi?id=111135
Reviewed by Adam Barth.
The threaded html parser needs to accept ownership
of a string buffer. The easiest way to do this seemed
to be to use a PassRefPtr<StringImpl>, but there was no way
to generated one from a String (easily), so I added one.
* wtf/text/WTFString.h:
(WTF::String::releaseImpl):
2013-02-28 Oliver Hunt <oliver@apple.com>
Crash in JSC::MarkedBlock::FreeList JSC::MarkedBlock::sweepHelper
https://bugs.webkit.org/show_bug.cgi?id=111059
Reviewed by Ryosuke Niwa.
Sometimes C++'s implicit operator conversion rules suck.
Add explicit operator== and !=.
* wtf/FastMalloc.cpp:
(WTF::HardenedSLL::operator!=):
(WTF::HardenedSLL::operator==):
(HardenedSLL):
2013-02-28 Zeno Albisser <zeno@webkit.org>
Enable DFG JIT for Qt on Mac
https://bugs.webkit.org/show_bug.cgi?id=111095
Rubber-stamped by Simon Hausmann
* wtf/Platform.h:
2013-02-28 Eric Carlson <eric.carlson@apple.com>
[Mac] use HAVE() macro instead of version check
https://bugs.webkit.org/show_bug.cgi?id=111087
Reviewed by Dean Jackson.
* wtf/Platform.h: Define HAVE_MEDIA_ACCESSIBILITY_FRAMEWORK.
2013-02-27 Balazs Kilvady <kilvadyb@homejinni.com>
Bug in atomicIncrement implementation for MIPS GCC
https://bugs.webkit.org/show_bug.cgi?id=110969
Reviewed by Csaba Osztrogonác.
Fix of __sync_[add|sub]_and_fetch_8 for GCC patch.
* wtf/Atomics.cpp:
2013-02-27 Simon Hausmann <simon.hausmann@digia.com>
REGRESSION(r137994): It made JSC tests hang and layout tests fail on ARM Thumb2 / Linux
https://bugs.webkit.org/show_bug.cgi?id=108632
Reviewed by Csaba Osztrogonác.
It appears that mprotect() is very slow on ARM/Linux, so disable the
approach of unreserved mappings there and fall back to overcomitting
memory, based on Uli Schlachter's recommendation.
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveUncommitted):
(WTF::OSAllocator::decommit):
2013-02-26 Roger Fong <roger_fong@apple.com>
Unreviewed. Build fix for VS2010 solution, take 2.
* WTF.vcxproj/work-around-vs-dependency-tracking-bugs.py:
2013-02-26 Roger Fong <roger_fong@apple.com>
Unreviewed. Unreviewed build fix for VS2010 solution.
* WTF.vcxproj/work-around-vs-dependency-tracking-bugs.py:
2013-02-26 Balazs Kilvady <kilvadyb@homejinni.com>
Fix the atomicIncrement implementation for MIPS GCC
https://bugs.webkit.org/show_bug.cgi?id=106739
Reviewed by Oliver Hunt.
Implementation of missing __sync_[add|sub]_and_fetch_8 functions.
Some architectures, like MIPS32, don't have GCC implementation for
builtin __sync_* functions with 64 bits variable size. GCC answer
for the problem: If a target doesn't support atomic operations on
certain variable sizes, you are out of luck with atomicity in that
case (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56296). GCC >= 4.8
will support __atomic_* builtin functions for this purpose for all
the GCC targets, but for current compilers we have to include our
own implementation.
* GNUmakefile.list.am:
* WTF.pro:
* wtf/Atomics.cpp: Added.
(WTF):
(WTF::getSwapLock):
(WTF::atomicStep):
* wtf/CMakeLists.txt:
2013-02-26 Oliver Hunt <oliver@apple.com>
Appease the QT bots.
* wtf/FastMalloc.cpp:
2013-02-26 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Implement JIT on Windows 64 bits
https://bugs.webkit.org/show_bug.cgi?id=107965
Reviewed by Simon Hausmann.
* wtf/Platform.h:
2013-02-26 Oliver Hunt <oliver@apple.com>
Appease static analyzer warning about null string passed to strlen
https://bugs.webkit.org/show_bug.cgi?id=110658
Reviewed by Benjamin Poulain.
Add a null check before calling strlen
* wtf/Threading.cpp:
(WTF::createThread):
2013-02-25 Ryosuke Niwa <rniwa@webkit.org>
Build fix attempt after r143996.
* wtf/FastMalloc.cpp:
(WTF):
2013-02-25 Roger Fong <roger_fong@apple.com>
Unreviewed. Fix script to use WEBKIT_SOURCE for VS2010 property sheets instead of WEBKIT_LIBRARIES.
* WTF.vcxproj/work-around-vs-dependency-tracking-bugs.py:
2013-02-25 Oliver Hunt <oliver@apple.com>
Add cookies to FastMalloc spans
https://bugs.webkit.org/show_bug.cgi?id=110827
Reviewed by Michael Saboff.
Add a cookie to spans, and move some of the hardening around so
that it's more useful.
* wtf/FastMalloc.cpp:
(WTF::internalEntropyValue):
(WTF::spanInitializerCookie):
(WTF::Span::initCookie):
(WTF::Span::clearCookie):
(WTF::Span::isValid):
(Span):
(WTF::NewSpan):
(WTF::DeleteSpan):
(WTF::TCMalloc_ThreadCache_FreeList::Validate):
(WTF::TCMalloc_Central_FreeList::Populate):
(WTF::TCMalloc_ThreadCache::Deallocate):
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
2013-02-25 Jer Noble <jer.noble@apple.com>
Normalize ENABLE_ENCRYPTED_MEDIA definitions across all FeatureDefines files.
https://bugs.webkit.org/show_bug.cgi?id=110806
Reviewed by Alexey Proskuryakov.
Ensure both ENCRYPTED_MEDIA and ENCRYPTED_MEDIA_V2 are enabled on macosx_1090.
* wtf/FeatureDefines.h:
2013-02-23 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: Native Memory Instrumentation: replace String with const char* in MemoryObjectInfo
https://bugs.webkit.org/show_bug.cgi?id=110599
Reviewed by Yury Semikhatsky.
Due to potentially dynamic nature of names and classNames we need to make a copy of the strings
that were given us via MemoryInstrumentation calls.
So I extended client api with registerString method that pushes the strings
down to the serializer.
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentationClient):
* wtf/MemoryObjectInfo.h:
(WTF::MemoryObjectInfo::MemoryObjectInfo):
(WTF::MemoryObjectInfo::setClassName):
(WTF::MemoryObjectInfo::classNameId):
(WTF::MemoryObjectInfo::setName):
(WTF::MemoryObjectInfo::nameId):
(MemoryObjectInfo):
2013-02-21 Brady Eidson <beidson@apple.com>
Move fastlog2() to WTF/MathExtras.h so it can be used from multiple projects.
Rubberstamped by Geoff Garen.
* wtf/MathExtras.h:
(WTF::fastLog2):
2013-02-21 Andy Estes <aestes@apple.com>
TriState.h should be a Project header
https://bugs.webkit.org/show_bug.cgi?id=110543
Rubber-stamped by Dan Bernstein.
WTF uses a script to copy headers to the build destination, so it isn't
necessary to mark headers as Private/Public (and doing so can be problematic).
* WTF.xcodeproj/project.pbxproj: Mark TriState.h as a Project header.
2013-02-21 Roger Fong <roger_fong@apple.com>
Unreviewed. Add executable property to cmd file.
Required for executable files to maintain their executable permissions over svn.
* WTF.vcxproj/copy-files.cmd: Added property svn:executable.
2013-02-19 Mark Hahnenberg <mhahnenberg@apple.com>
Objective-C API: Need a way to use the Objective-C JavaScript API with WebKit
https://bugs.webkit.org/show_bug.cgi?id=106059
Reviewed by Geoffrey Garen.
* wtf/FeatureDefines.h: Added enable flag for JSC Objective-C API so it can be used in
export files.
2013-02-21 Martin Robinson <mrobinson@igalia.com>
A couple more 'make dist' fixes for WebKitGTK+.
* GNUmakefile.list.am: Add a missing file to the source list.
2013-02-20 Roger Fong <roger_fong@apple.com>
Get VS2010 Solution B&I ready.
<rdar://problem/1322988>
Rubberstamped by Timothy Horton.
Add Production configuration.
Add a WTF submit solution with a DebugSuffix configuration.
Modify WTF.make as necessary.
* WTF.vcxproj: Added property svn:eol-style. Modified property svn:ignore.
* WTF.vcxproj/WTF.make: Added.
* WTF.vcxproj/WTF.submit.sln: Added.
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTFCommon.props:
* WTF.vcxproj/WTFGenerated.vcxproj:
* WTF.vcxproj/WTFGeneratedProduction.props: Added.
* WTF.vcxproj/WTFGeneratedRelease.props:
* WTF.vcxproj/WTFProduction.props: Added.
* WTF.vcxproj/WTFRelease.props:
* WTF.vcxproj/copy-files.cmd:
2013-02-20 Oliver Hunt <oliver@apple.com>
Moar hardening
https://bugs.webkit.org/show_bug.cgi?id=110275
Reviewed by Mark Hahnenberg.
We now poison objects when they get freed, and verify that
any object that is being freed is not poisoned. If the
object looks like it's poisoned we validate the freelist,
and ensure the object is not already present. If it is
we crash.
On allocation, we ensure that the object being allocated
is poisoned, then clear the poisoning fields.
* wtf/FastMalloc.cpp:
(WTF::internalEntropyValue):
(WTF):
(WTF::freedObjectStartPoison):
(WTF::freedObjectEndPoison):
(TCMalloc_ThreadCache_FreeList):
(WTF::TCMalloc_ThreadCache_FreeList::Validate):
(WTF::TCMalloc_Central_FreeList::Populate):
(WTF::TCMalloc_ThreadCache::Allocate):
(WTF::TCMalloc_ThreadCache::Deallocate):
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
2013-02-19 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r143400.
http://trac.webkit.org/changeset/143400
https://bugs.webkit.org/show_bug.cgi?id=110290
breaks everything (instacrash launching Safari) (Requested by
thorton on #webkit).
* wtf/FastMalloc.cpp:
(WTF::internalEntropyValue):
(WTF):
(WTF::TCMalloc_Central_FreeList::Populate):
(WTF::TCMalloc_ThreadCache::Allocate):
(WTF::TCMalloc_ThreadCache::Deallocate):
2013-02-19 Oliver Hunt <oliver@apple.com>
Moar hardening
https://bugs.webkit.org/show_bug.cgi?id=110275
Reviewed by Anders Carlsson.
We now poison objects when they get freed, and verify that
any object that is being freed is not poisoned. If the
object looks like it's poisoned we validate the freelist,
and ensure the object is not already present. If it is
we crash.
On allocation, we ensure that the object being allocated
is poisoned, then clear the poisoning fields.
* wtf/FastMalloc.cpp:
(WTF::internalEntropyValue):
(WTF):
(WTF::freedObjectStartPoison):
(WTF::freedObjectEndPoison):
(TCMalloc_ThreadCache_FreeList):
(WTF::TCMalloc_ThreadCache_FreeList::Validate):
(WTF::TCMalloc_Central_FreeList::Populate):
(WTF::TCMalloc_ThreadCache::Allocate):
(WTF::TCMalloc_ThreadCache::Deallocate):
2013-02-18 Darin Adler <darin@apple.com>
Style tweaks to StringHasher.h
https://bugs.webkit.org/show_bug.cgi?id=110042
Reviewed by Alexey Proskuryakov.
I have a bug fix coming soon, but figured I'd separate out style tweaks and land them
first to make that patch easier to undrestand.
* wtf/StringHasher.h: Tweak and rearrange comments a bit.
(WTF::StringHasher::addCharacter): Use character instead of ch.
(WTF::StringHasher::addCharacters): Use remainder instead of rem. Also capitalize the U
that we use to make an unsigned 1 constant.
(WTF::StringHasher::computeHashAndMaskTop8Bits): Ditto.
(WTF::StringHasher::hashMemory): Change version that takes size as a template argument
to call the version that takes the size at runtime, since both generate the same code
anyway. Added a FIXME questioning why this function uses the "mask top 8 bits" version
of the hash. Fix incorrect compile assertion that required sizes that are multiples
of four. This function works on sizes that are multiples of two. Also fixed a spelling
error where we called it a "multible".
(WTF::StringHasher::defaultConverter): Use character instead of ch.
(WTF::StringHasher::addCharactersToHash): Eliminated unnecessary local variable.
2013-02-18 Alexey Proskuryakov <ap@apple.com>
Make HexNumber functions return 8-bit strings
https://bugs.webkit.org/show_bug.cgi?id=110152
Reviewed by Michael Saboff.
* wtf/HexNumber.h:
(Internal):
(WTF::Internal::hexDigitsForMode):
(WTF::appendByteAsHex):
(WTF::placeByteAsHexCompressIfPossible):
(WTF::placeByteAsHex):
(WTF::appendUnsignedAsHex):
(WTF::appendUnsignedAsHexFixedSize):
Use LChar everywhere.
2013-02-18 Benjamin Poulain <bpoulain@apple.com>
Remove Vector::dataSlot(), it has no implementation
https://bugs.webkit.org/show_bug.cgi?id=109999
Reviewed by Andreas Kling.
VectorBufferBase does not implement any function bufferSlot().
The file only compiles because that part of the template is never
instantiated.
* wtf/Vector.h:
2013-02-18 Laszlo Gombos <l.gombos@samsung.com>
Move ENABLE macros for WebCore out from Platform.h
https://bugs.webkit.org/show_bug.cgi?id=105735
Unreviewed, build fix when NETSCAPE_PLUGIN_API is disabled.
Enable ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH even if
NETSCAPE_PLUGIN_API is disabled (Qt, Efl, GTK, WX ports).
* wtf/FeatureDefines.h:
2013-02-18 Balazs Kilvady <kilvadyb@homejinni.com>
MIPS DFG implementation.
https://bugs.webkit.org/show_bug.cgi?id=101328
Reviewed by Oliver Hunt.
DFG implementation for MIPS.
* wtf/Platform.h:
2013-02-18 Zan Dobersek <zdobersek@igalia.com>
Stop placing std::isfinite and std::signbit inside the global scope
https://bugs.webkit.org/show_bug.cgi?id=109817
Reviewed by Darin Adler.
Prefix calls to the isfinite and signbit methods with std:: as the two
methods are no longer being imported into the global scope.
On Solaris and OpenBSD platforms or when using Visual C++ the two methods
are now defined (as incompatibility workarounds) inside the std namespace.
* wtf/DateMath.cpp:
(WTF::timeClip):
* wtf/DecimalNumber.h:
(WTF::DecimalNumber::DecimalNumber):
* wtf/MathExtras.h:
(std):
(std::isfinite):
(std::signbit):
(lrint):
(wtf_pow):
(decomposeDouble):
* wtf/MediaTime.cpp:
(WTF::MediaTime::createWithFloat):
(WTF::MediaTime::createWithDouble):
* wtf/dtoa.cpp:
(WTF::dtoa):
2013-02-18 Laszlo Gombos <l.gombos@samsung.com>
Move ENABLE macros for WebCore out from Platform.h
https://bugs.webkit.org/show_bug.cgi?id=105735
Reviewed by Darin Adler and Benjamin Poulain.
Introduce FeatureDefines.h by combining the existing rules from
Platform.h and adding new rules for all the ENABLE flags that are
listed in the FeatureFlags wiki.
The new rules are not used at the moment by any ports
as the port specific build systems already define these flags
so the !defined() guard will prevent redefinition of the macros.
* GNUmakefile.list.am: Add FeatureDefines.h.
* WTF.gypi: Ditto.
* WTF.pro: Ditto.
* WTF.vcproj/WTF.vcproj: Ditto.
* WTF.xcodeproj/project.pbxproj: Ditto.
* wtf/CMakeLists.txt: Ditto.
* wtf/FeatureDefines.h: Added.
* wtf/Platform.h: Move macro definitions to FeatureDefines.h.
2013-02-16 Darin Adler <darin@apple.com>
Remove redundant use of inline keyword in StringHasher.h
https://bugs.webkit.org/show_bug.cgi?id=110036
Reviewed by Geoffrey Garen.
I have some other improvements for StringHasher.h, but wanted to get the simplest ones
out of the way first.
* wtf/StringHasher.h: Remove inline keyword on functions inside the class definition,
since functions defined inside the class are automatically inline.
2013-02-15 Martin Robinson <mrobinson@igalia.com>
[GTK] Spread the gyp build files throughout the tree
https://bugs.webkit.org/show_bug.cgi?id=109960
Reviewed by Dirk Pranke.
* WTF.gyp/WTFGTK.gyp: Renamed from Source/WebKit/gtk/gyp/WTF.gyp.
2013-02-15 Anders Carlsson <andersca@apple.com>
Add HashMap::isValidKey and HashSet::isValidValue
https://bugs.webkit.org/show_bug.cgi?id=109977
Reviewed by Sam Weinig and Darin Adler.
Add helper functions for determining whether keys are valid, i.e. if
they are _not_ empty or deleted according to the hash traits.
* wtf/HashMap.h:
* wtf/HashSet.h:
2013-02-15 Laszlo Gombos <l.gombos@samsung.com>
Remove support for RVCT version less than 4.0
https://bugs.webkit.org/show_bug.cgi?id=109390
The 4.0 version of the RVCT compiler was
released in 2008.
Remove support for version older then 4.0 of RVCT,
and keep the support for newer RVCT versions.
Reviewed by Zoltan Herczeg.
* WTF.gypi: Remove StringExtras.cpp.
* WTF.vcproj/WTF.vcproj: Remove StringExtras.cpp.
* WTF.vcxproj/WTF.vcxproj: Remove StringExtras.cpp.
* WTF.vcxproj/WTF.vcxproj.filters: Remove StringExtras.cpp.
* WTF.xcodeproj/project.pbxproj: Remove StringExtras.cpp.
* wtf/CMakeLists.txt: Remove StringExtras.cpp.
* wtf/Compiler.h: Remove tests for RVCT_VERSION_AT_LEAST(3, 0, 0, 0).
* wtf/Float32Array.h: Remove a quirk introduced for RVCT version <=2.2 .
* wtf/Float64Array.h: Ditto.
* wtf/Int16Array.h: Ditto.
* wtf/Int32Array.h: Ditto.
* wtf/Int8Array.h: Ditto.
* wtf/MathExtras.h: Remove a quirk needed for RVCT version <= 3.0.
* wtf/Platform.h: Remove test for RVCT 4.0. Remove OS(RVCT).
* wtf/StringExtras.cpp: Removed.
* wtf/StringExtras.h: Remove a quirk introduced for RVCT version < 4.0.
* wtf/Uint16Array.h: Remove a quirk introduced for RVCT version <= 2.2.
* wtf/Uint32Array.h: Ditto.
* wtf/Uint8Array.h: Ditto.
* wtf/Uint8ClampedArray.h: Ditto.
2013-02-15 Christophe Dumez <ch.dumez@sisa.samsung.com>
Add CString operators for comparison with const char*
https://bugs.webkit.org/show_bug.cgi?id=109947
Reviewed by Darin Adler.
Add operators to WTF::CString for equality/inequality comparison
with const char* strings. This avoids constructing a CString
from a const char* in such cases, which is can be expensive as
it would copy it and call strlen().
* wtf/text/CString.cpp:
(WTF::operator==): Use memcmp instead of strncmp to compare the
CString buffers as we know they are the same size and we don't
want to scan for terminating null byte.
(WTF):
* wtf/text/CString.h:
(WTF):
(WTF::operator!=):
2013-02-15 Geoffrey Garen <ggaren@apple.com>
Merged the global function cache into the source code cache
https://bugs.webkit.org/show_bug.cgi?id=108660
Reviewed by Sam Weinig.
Responding to review comments by Darin Adler.
* wtf/HashTraits.h: Added a using directive to simplify client code.
2013-02-14 Dan Bernstein <mitz@apple.com>
No easy way to use a RetainPtr as a key in a HashMap using object (rather than pointer) equality
https://bugs.webkit.org/show_bug.cgi?id=109864
Reviewed by Sam Weinig and Benjamin Poulain.
Added RetainPtrObjectHashTraits and RetainPtrObjectHash, which use CFEqual
and CFHash.
* wtf/RetainPtr.h:
(RetainPtrObjectHashTraits):
(WTF::RetainPtrObjectHashTraits::emptyValue):
(WTF::RetainPtrObjectHashTraits::constructDeletedValue):
(WTF::RetainPtrObjectHashTraits::isDeletedValue):
(WTF):
(WTF::RetainPtrObjectHash::hash):
(WTF::RetainPtrObjectHash::equal):
(RetainPtrObjectHash):
2013-02-14 Tony Chang <tony@chromium.org>
Unreviewed, set svn:eol-style native for .sln, .vcproj, and .vsprops files.
https://bugs.webkit.org/show_bug.cgi?id=96934
* WTF.vcproj/WTF.sln: Modified property svn:eol-style.
2013-02-14 Tony Chang <tony@chromium.org>
Unreviewed, set svn:eol-style CRLF for .sln files.
* WTF.vcproj/WTF.sln: Added property svn:eol-style.
2013-02-14 David Kilzer <ddkilzer@apple.com>
[Mac] Clean up WARNING_CFLAGS
<http://webkit.org/b/109747>
<rdar://problem/13208373>
Reviewed by Mark Rowe.
* Configurations/Base.xcconfig: Use
GCC_WARN_64_TO_32_BIT_CONVERSION to enable and disable
-Wshorten-64-to-32 rather than WARNING_CFLAGS.
* WTF.vcproj/WTF.sln: Added property svn:eol-style.
2013-02-14 Eric Seidel <eric@webkit.org>
String(Vector) behaves differently from String(vector.data(), vector.size()) for vectors with inline capacity in the size=0 case
https://bugs.webkit.org/show_bug.cgi?id=109784
Reviewed by Darin Adler.
This makes String(Vector) never return null strings.
Which matches behavior of String(UChar*, size_t)
for vectors with inlineCapacity, but differs from
String(UChar*, size_t) in the no-inlineCapacity case.
This incidentally will fix a behavioral regression
in the html threaded parser which came from converting
many String(UChar*, size_t) callsites to using String(Vector).
* wtf/text/WTFString.h:
(String):
(WTF::String::String):
2013-02-14 Eric Seidel <eric@webkit.org>
REGRESSION(r142712): attribute values show up as "(null)" instead of null with the threaded parser
https://bugs.webkit.org/show_bug.cgi?id=109784
Reviewed by Benjamin Poulain.
When I changed many callsites to use the (existing) String(Vector) constructor
I inadvertantly made those callsites convert empty vectors to null strings
instead of empty strings (like String(UChar,size_t) does).
This is due to an oddity/bug in our Vector implementation where data()
will be 0 if the Vector is empty, but only if it doesn't have inline capacity.
https://bugs.webkit.org/show_bug.cgi?id=109792
This changes String(Vector) to exactly match the behavior of String(vector.data(), vector.size()).
This regression was easily detectable with the threaded parser, because we use String
instead of AtomicString in our CompactToken (used to send the Token data
between threads). The main-thread parser path uses AtomicHTMLToken which
uses AtomicString(Vector) and does not have this bug.
* wtf/text/WTFString.h:
(String):
(WTF::String::String):
2013-02-13 Zan Dobersek <zdobersek@igalia.com>
The 'global isinf/isnan' compiler quirk required when using clang with libstdc++
https://bugs.webkit.org/show_bug.cgi?id=109325
Reviewed by Anders Carlsson.
Prefix calls to the isinf and isnan methods with std::, declaring we want to use the
two methods as they're provided by the C++ standard library being used.
* wtf/Compiler.h: Remove the global isinf/isnan compiler quirk definitions. They're not required anymore.
* wtf/DateMath.cpp: Move the workaround for isinf on Solaris into the std namespace. Ditto for isinf and isnan
when using MSVC. Stop bringing the isinf and isnan methods into the global scope when using other configurations.
(WTF::parseDateFromNullTerminatedCharacters):
* wtf/IntegralTypedArrayBase.h:
(WTF::IntegralTypedArrayBase::set):
* wtf/MathExtras.h:
(std):
(std::isinf):
(wtf_fmod):
(wtf_pow):
(doubleToInteger):
* wtf/MediaTime.cpp:
(WTF::MediaTime::createWithFloat):
(WTF::MediaTime::createWithDouble):
* wtf/Uint8ClampedArray.h:
(WTF::Uint8ClampedArray::set):
2013-02-13 Eric Seidel <eric@webkit.org>
Don't copy Vector<UChar> when passing to new String methods from bug 109617
https://bugs.webkit.org/show_bug.cgi?id=109708
Reviewed by Tony Gentilcore.
Thanks for the catch Darin.
* wtf/text/AtomicString.h:
(WTF::AtomicString::AtomicString):
* wtf/text/StringImpl.h:
(WTF::StringImpl::create8BitIfPossible):
2013-02-13 Martin Robinson <mrobinson@igalia.com>
[GTK] Remove remaining dead code from the GLib unicode backend
https://bugs.webkit.org/show_bug.cgi?id=109707
Reviewed by Philippe Normand.
* wtf/unicode/Unicode.h:
2013-02-13 Andrew Wilson <atwilson@chromium.org>
Unreviewed Chromium gyp-file cleanup after glib backend removal.
https://bugs.webkit.org/show_bug.cgi?id=109672
Removed references to GLib unicode backend:
* WTF.gyp/WTF.gyp:
* WTF.gypi:
2013-02-12 Martin Robinson <mrobinson@igalia.com>
[GTK] Remove the GLib unicode backend
https://bugs.webkit.org/show_bug.cgi?id=109627
Reviewed by Benjamin Poulain.
Remove references to the GLib unicode backend from WTF.
* GNUmakefile.list.am: Remove GLib unicode files from the source list.
* wtf/unicode/glib/UnicodeGLib.cpp: Removed.
* wtf/unicode/glib/UnicodeGLib.h: Removed.
2013-02-12 Takeshi Yoshino <tyoshino@google.com>
Remove unnecessary and confusing includes from StreamBuffer.h.
https://bugs.webkit.org/show_bug.cgi?id=109652
Reviewed by Benjamin Poulain.
StreamBuffer.h is using OwnPtr for storing Vectors into a Deque.
FixedArray.h and PassOwnPtr.h are included but not used.
VectorTraits defines how to move OwnPtr in Vector. It's done by memcpy.
So, there's no need for PassOwnPtr (Deque<PassOwnPtr<Vector<char> > >
is even slower).
* wtf/StreamBuffer.h:
2013-02-12 Eric Seidel <eric@webkit.org>
Teach more WTF string classes about vectors with inline capacity
https://bugs.webkit.org/show_bug.cgi?id=109617
Reviewed by Benjamin Poulain.
The HTML and WebVTT parsers use constructions like:
AtomicString name(m_name.data(), m_name.size())
all over the place because they use inline capacity
on the parse vectors for performance.
This change just add the necessary template variants
to the related String constructors/methods in WTF so that
this parser code can just pass the vector directly instead.
I'll do the actual parser cleanups in follow-up patches to keep things simple.
* wtf/text/AtomicString.h:
(AtomicString):
(WTF::AtomicString::AtomicString):
* wtf/text/StringImpl.h:
(StringImpl):
(WTF::StringImpl::create8BitIfPossible):
* wtf/text/WTFString.h:
(String):
(WTF::String::make8BitFrom16BitSource):
(WTF):
(WTF::append):
2013-02-11 Oliver Hunt <oliver@apple.com>
Build fix.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::IncrementalScavenge):
2013-02-11 Ryosuke Niwa <rniwa@webkit.org>
Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
https://bugs.webkit.org/show_bug.cgi?id=109534
Reviewed by Anders Carlsson.
* wtf/Platform.h:
2013-02-11 David Kilzer <ddkilzer@apple.com>
[iOS] Upstream changes to Platform.h
<http://webkit.org/b/109459>
Reviewed by Benjamin Poulain.
* wtf/Platform.h:
- Changes for armv7s.
- Add ENABLE() definitions for DASHBOARD_SUPPORT and WEBGL.
- Re-sort ENABLE() and USE() macros.
- Remove ENABLE() macros for JIT, LLINT and YARR_JIT to enable
on iOS Simulator. They are already defined below.
- Turn off HAVE(HOSTED_CORE_ANIMATION) for iOS.
- Turn on USE(COREMEDIA) for iOS 6.0 and later.
2013-02-08 Oliver Hunt <oliver@apple.com>
Harden FastMalloc (again)
https://bugs.webkit.org/show_bug.cgi?id=109334
Reviewed by Mark Hahnenberg.
Re-implement hardening of linked lists in TCMalloc.
In order to keep heap introspection working, we need to thread the
heap entropy manually as the introspection process can't use the
address of a global in determining the mask. Given we now have to
thread a value through anyway, I've stopped relying on ASLR for entropy
and am simply using arc4random() on darwin, and time + ASLR everywhere
else.
I've also made an explicit struct type for the FastMalloc singly linked
lists, as it seemed like the only way to reliably distinguish between
void*'s that were lists vs. void* that were not. This also made it
somewhat easier to reason about things across processes.
Verified that all the introspection tools work as expected.
* wtf/FastMalloc.cpp:
(WTF::internalEntropyValue):
(WTF):
(HardenedSLL):
(WTF::HardenedSLL::create):
(WTF::HardenedSLL::null):
(WTF::HardenedSLL::setValue):
(WTF::HardenedSLL::value):
(WTF::HardenedSLL::operator!):
(WTF::HardenedSLL::operator UnspecifiedBoolType):
(TCEntry):
(WTF::SLL_Next):
(WTF::SLL_SetNext):
(WTF::SLL_Push):
(WTF::SLL_Pop):
(WTF::SLL_PopRange):
(WTF::SLL_PushRange):
(WTF::SLL_Size):
(PageHeapAllocator):
(WTF::PageHeapAllocator::Init):
(WTF::PageHeapAllocator::New):
(WTF::PageHeapAllocator::Delete):
(WTF::PageHeapAllocator::recordAdministrativeRegions):
(WTF::Span::next):
(WTF::Span::remoteNext):
(WTF::Span::prev):
(WTF::Span::setNext):
(WTF::Span::setPrev):
(Span):
(WTF::DLL_Init):
(WTF::DLL_Remove):
(WTF::DLL_IsEmpty):
(WTF::DLL_Length):
(WTF::DLL_Prepend):
(TCMalloc_Central_FreeList):
(WTF::TCMalloc_Central_FreeList::enumerateFreeObjects):
(WTF::TCMalloc_Central_FreeList::entropy):
(TCMalloc_PageHeap):
(WTF::TCMalloc_PageHeap::init):
(WTF::TCMalloc_PageHeap::scavenge):
(WTF::TCMalloc_PageHeap::New):
(WTF::TCMalloc_PageHeap::AllocLarge):
(WTF::TCMalloc_PageHeap::Carve):
(WTF::TCMalloc_PageHeap::Delete):
(WTF::TCMalloc_PageHeap::ReturnedBytes):
(WTF::TCMalloc_PageHeap::Check):
(WTF::TCMalloc_PageHeap::CheckList):
(WTF::TCMalloc_PageHeap::ReleaseFreeList):
(TCMalloc_ThreadCache_FreeList):
(WTF::TCMalloc_ThreadCache_FreeList::Init):
(WTF::TCMalloc_ThreadCache_FreeList::empty):
(WTF::TCMalloc_ThreadCache_FreeList::Push):
(WTF::TCMalloc_ThreadCache_FreeList::PushRange):
(WTF::TCMalloc_ThreadCache_FreeList::PopRange):
(WTF::TCMalloc_ThreadCache_FreeList::Pop):
(WTF::TCMalloc_ThreadCache_FreeList::enumerateFreeObjects):
(TCMalloc_ThreadCache):
(WTF::TCMalloc_Central_FreeList::Init):
(WTF::TCMalloc_Central_FreeList::ReleaseListToSpans):
(WTF::TCMalloc_Central_FreeList::ReleaseToSpans):
(WTF::TCMalloc_Central_FreeList::InsertRange):
(WTF::TCMalloc_Central_FreeList::RemoveRange):
(WTF::TCMalloc_Central_FreeList::FetchFromSpansSafe):
(WTF::TCMalloc_Central_FreeList::FetchFromSpans):
(WTF::TCMalloc_Central_FreeList::Populate):
(WTF::TCMalloc_ThreadCache::Init):
(WTF::TCMalloc_ThreadCache::Deallocate):
(WTF::TCMalloc_ThreadCache::FetchFromCentralCache):
(WTF::TCMalloc_ThreadCache::ReleaseToCentralCache):
(WTF::TCMalloc_ThreadCache::InitModule):
(WTF::TCMalloc_ThreadCache::NewHeap):
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
* wtf/MallocZoneSupport.h:
(RemoteMemoryReader):
2013-02-11 Enrica Casucci <enrica@apple.com>
Add ENABLE_DELETION_UI to control the use of the deletion UI.
https://bugs.webkit.org/show_bug.cgi?id=109463.
ENABLE_DELETION_UI is set to 1 by default for
all ports. It is explicitly enabled for MAC and disabled for iOS.
Reviewed by Ryosuke Niwa.
* wtf/Platform.h:
2013-02-11 Christophe Dumez <ch.dumez@sisa.samsung.com>
[EFL] Stop using smart pointers for Ecore_Timer
https://bugs.webkit.org/show_bug.cgi?id=109409
Reviewed by Kenneth Rohde Christiansen.
Remove support in OwnPtr for EFL's Ecore_Timer. It is a bad idea to use
OwnPtr for Ecore_Timer because the timer handle may become invalid.
* wtf/OwnPtrCommon.h:
(WTF):
* wtf/efl/OwnPtrEfl.cpp:
2013-02-11 Abhishek Arya <inferno@chromium.org>
Add ASSERT_WITH_SECURITY_IMPLICATION to detect out of bounds access
https://bugs.webkit.org/show_bug.cgi?id=108981
Reviewed by Eric Seidel.
* wtf/BitVector.h:
(WTF::BitVector::quickGet):
(WTF::BitVector::quickSet):
(WTF::BitVector::quickClear):
* wtf/DecimalNumber.h:
(WTF::DecimalNumber::DecimalNumber):
* wtf/SegmentedVector.h:
(WTF::SegmentedVector::ensureSegment):
* wtf/StringPrintStream.cpp:
(WTF::StringPrintStream::vprintf):
* wtf/Vector.h:
(WTF::::insert):
(WTF::::remove):
* wtf/dtoa/utils.h:
(WTF::double_conversion::StringBuilder::SetPosition):
(WTF::double_conversion::StringBuilder::AddSubstring):
2013-02-10 Laszlo Gombos <l.gombos@samsung.com>
Consolidate the way WTF_USE_PTHREADS is enabled
https://bugs.webkit.org/show_bug.cgi?id=108191
Reviewed by Benjamin Poulain.
Define WTF_USE_PTHREADS to 1 on all OS(UNIX) environments.
* WTF.gyp/WTF.gyp: Remove duplicated definition of WTF_USE_PTHREADS.
* wtf/Platform.h:
2013-02-10 Laszlo Gombos <l.gombos@samsung.com>
Refactor the way HAVE_XXX macros are set
https://bugs.webkit.org/show_bug.cgi?id=108132
Reviewed by Benjamin Poulain.
OS(WINDOWS) and OS(UNIX) are so broadly defined that for each
builds exactly one of them is enabled. Use this assumption to
cleanup Platform.h.
* wtf/Platform.h:
2013-02-10 Jae Hyun Park <jae.park08@gmail.com>
Rename ENABLE(GLIB_SUPPORT) to USE(GLIB)
https://bugs.webkit.org/show_bug.cgi?id=104266
Reviewed by Philippe Normand.
Using USE(GLIB) instead of ENABLE(GLIB_SUPPORT) is more consistent with
the existing macro naming conventions.
From Platform.h
USE() - use a particular third-party library or optional OS service
ENABLE() - turn on a specific feature of WebKit
* WTF.pri:
* wtf/Platform.h:
* wtf/gobject/GOwnPtr.cpp:
* wtf/gobject/GOwnPtr.h:
* wtf/gobject/GRefPtr.cpp:
* wtf/gobject/GRefPtr.h:
2013-02-08 Michael Saboff <msaboff@apple.com>
ARM_NEON Inline Assembly for copyLCharsFromUCharSource() inefficient for aligned destinations
https://bugs.webkit.org/show_bug.cgi?id=109335
Reviewed by Filip Pizlo.
Change a "do while" to a "while" so that we don't copy single characters to align the
destination when it is already aligned.
* wtf/text/ASCIIFastPath.h:
(WTF::copyLCharsFromUCharSource):
2013-02-08 Jer Noble <jer.noble@apple.com>
Bring WebKit up to speed with latest Encrypted Media spec.
https://bugs.webkit.org/show_bug.cgi?id=97037
Reviewed by Eric Carlson.
Define the ENABLE_ENCRYPTED_MEDIA_V2 setting.
* wtf/Platform.h:
2013-02-08 Adam Barth <abarth@webkit.org>
Use WeakPtrs to communicate between the HTMLDocumentParser and the BackgroundHTMLParser
https://bugs.webkit.org/show_bug.cgi?id=107190
Reviewed by Eric Seidel.
Add the ability to create an unbound weak reference. This facility lets
you start sending messages to a WeakPtr on another thread before the
object backing the WeakPtr has actually been created.
* wtf/WeakPtr.h:
(WTF::WeakReference::createUnbound):
(WTF::WeakReference::bindTo):
(WeakReference):
(WTF::WeakReference::WeakReference):
(WTF::WeakPtr::WeakPtr):
(WeakPtr):
(WTF::WeakPtrFactory::WeakPtrFactory):
(WeakPtrFactory):
(WTF::WeakPtrFactory::revokeAll):
2013-02-08 Martin Robinson <mrobinson@igalia.com>
[GTK] Add an experimental gyp build
https://bugs.webkit.org/show_bug.cgi?id=109003
Reviewed by Gustavo Noronha Silva.
* WTF.gyp/WTF.gyp: Filter out MetaAllocator.(cpp/h) from the Chromium
build. It's only necessary for GTK+.
* WTF.gypi: Add MetaAllocator to the build for WebKitGTK+.
2013-02-06 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: Native Memory Instrumentation: reportBaseAddress needs to be called after the reportNode. So it may reuse the node index for the real address.
https://bugs.webkit.org/show_bug.cgi?id=109051
Reviewed by Yury Semikhatsky.
* wtf/MemoryInstrumentation.cpp:
(WTF::MemoryInstrumentation::WrapperBase::processPointer):
2013-02-07 David Kilzer <ddkilzer@apple.com>
Fix #endif comment from r142163 and r142183
* wtf/MainThread.h:
(WTF): s/PLATFORM/USE/
2013-02-07 Benjamin Poulain <bpoulain@apple.com>
Fix an incorrect comment from r142163
Unreviewed.
* wtf/MainThread.h:
I accidentally copied PLATFORM(IOS) instead of USE(WEB_THREAD) for the #ifdef closing.
2013-02-07 Benjamin Poulain <bpoulain@apple.com>
Upstream iOS isWebThread() and isUIThread()
https://bugs.webkit.org/show_bug.cgi?id=109130
Reviewed by Sam Weinig.
On iOS, it is sometimes necessary to differenciate the thread running WebCore,
and the thread running the UI. This patch upstream those functions.
* wtf/MainThread.cpp:
* wtf/MainThread.h:
Disable the legacy initializer as it is incorrect when using the WebThread to run WebCore.
(WTF::isWebThread):
(WTF::isUIThread):
Return true when the current thread is the Web/UI thread.
* wtf/mac/MainThreadMac.mm:
(WTF::isUIThread):
(WTF::isWebThread):
* wtf/text/AtomicString.cpp:
(WTF::AtomicStringTable::create):
Use the newly added methods.
2013-02-07 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] Fix build without 3D_GRAPHICS
https://bugs.webkit.org/show_bug.cgi?id=109194
Reviewed by Noam Rosenthal.
Now that Coordinated Graphics was moved to WebCore, we need to explicitly enable
it when we have 3D_GRAPHICS. This dependency was implicitly by the fact that
3D_GRAPHICS is a dependency of WebKit2 and Coordinated Graphics was only
available there. This should fix build for Qt SH4 Linux.
* wtf/Platform.h:
2013-02-06 Zan Dobersek <zdobersek@igalia.com>
[WTFURL] Fix erroneous header inclusions in WTFURL code
https://bugs.webkit.org/show_bug.cgi?id=109040
Reviewed by Benjamin Poulain.
Include WTFURL API headers from files in Source/WTF/wtf/url/src
by specifying their relative path to Source/WTF.
* GNUmakefile.am: The changes make it possible to compile the WTF library
without specifying both Source/WTF/wtf/url/api and Source/WTF/wtf/url/src
as inclusion directories in CPPFLAGS, so remove these two entries.
* wtf/url/src/RawURLBuffer.h:
* wtf/url/src/URLCanon.h: Include the URLParse.h header by specifying
only the base name as it's located in the same directory.
* wtf/url/src/URLCanonQuery.cpp:
* wtf/url/src/URLUtil.h:
2013-02-06 Tony Gentilcore <tonyg@chromium.org>
Call XSSAuditor's didBlockScript() for the threaded HTML parser
https://bugs.webkit.org/show_bug.cgi?id=108726
Reviewed by Adam Barth.
This patch adds isSafeToSendToAnotherThread() methods to CString, String, ParsedURL and URLString.
These methods check to ensure there are 0 or 1 references.
* wtf/text/CString.cpp:
(WTF::CString::isSafeToSendToAnotherThread): Added.
(WTF):
* wtf/text/CString.h:
(CString):
* wtf/text/WTFString.cpp:
(WTF::String::isSafeToSendToAnotherThread): Added.
(WTF):
* wtf/text/WTFString.h:
(String):
* wtf/url/api/ParsedURL.h:
(WTF::ParsedURL::isSafeToSendToAnotherThread): Added.
* wtf/url/api/URLString.h:
(WTF::URLString::isSafeToSendToAnotherThread): Added.
2013-02-06 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: Native Memory Instrumentation: assign class name to the heap graph node automatically
https://bugs.webkit.org/show_bug.cgi?id=107262
Reviewed by Yury Semikhatsky.
We need a way to calculate class name for a pointer automatically.
Otherwise we need to write className manually in all the instrumentation methods.
And for all reported but not instrumented classes.
C++ can do that for us with help of typeid but unfortunatelly it requires rtti.
There is another way to do that. C++ preprocessor provides a define which has a function name.
For g++ and clang it is __PRETTY_FUNCTION__.
For MSVC it is __FUNCTION__.
The content of the string is a function signature.
We can use it because it has the name of the template argument.
The format is sligthly different. That's why I made two different parsers.
One for MSVC the other for GCC, Clang etc.
The other problem is the resulting binary size.
I made very simple function that does the only thing, returns the smallest possible function signature.
Unfortunatelly MSVC doesn't generate template argument name for functions.
It does this only for classes.
* wtf/MemoryInstrumentation.cpp:
(WTF):
(WTF::className):
(WTF::MemoryClassInfo::callReportObjectInfo):
(WTF::MemoryClassInfo::init):
* wtf/MemoryInstrumentation.h:
(WTF):
(WTF::FN::fn):
(WTF::fn):
(WTF::MemoryClassInfo::MemoryClassInfo):
(MemoryClassInfo):
(WTF::::reportObjectMemoryUsage):
2013-02-05 Mark Lam <mark.lam@apple.com>
Fix EnumClass so that it can be used with switch statements.
https://bugs.webkit.org/show_bug.cgi?id=109004.
Reviewed by Sam Weinig.
* wtf/EnumClass.h:
(WTF::EnumClass::operator==):
(WTF::EnumClass::operator!=):
(WTF::EnumClass::operator<):
(WTF::EnumClass::operator<=):
(WTF::EnumClass::operator>):
(WTF::EnumClass::operator>=):
(EnumClass):
(WTF::EnumClass::operator Value):
2013-02-05 Oliver Hunt <oliver@apple.com>
Disable TCMalloc hardening as it's breaking leaks.
Reviewed by Gavin Barraclough.
* wtf/FastMalloc.cpp:
2013-02-05 Mark Lam <mark.lam@apple.com>
Rename ENUM_CLASS_BEGIN() macro to ENUM_CLASS(), and make DatabaseType a strong enum.
https://bugs.webkit.org/show_bug.cgi?id=108988.
Reviewed by Alexey Proskuryakov.
* wtf/EnumClass.h:
2013-02-05 Roger Fong <roger_fong@apple.com>
Unreviewed build fix.
* wtf/FastMalloc.cpp:
2013-02-05 Benjamin Poulain <bpoulain@apple.com>
Tidy up StackBounds
https://bugs.webkit.org/show_bug.cgi?id=108889
Reviewed by Ryosuke Niwa.
* wtf/StackBounds.h:
(StackBounds):
(WTF::StackBounds::isSafeToRecurse):
(WTF::StackBounds::size):
Adopt a more conventional style for a multiline branch.
(WTF::StackBounds::StackBounds):
(WTF::StackBounds::current):
(WTF::StackBounds::recursionLimit):
Make those method private.
Making the constructor private ensure initialize() is alwasy called on any StackBounds.
2013-02-05 Zan Dobersek <zdobersek@igalia.com>
[WTFURL] Comparison between signed and unsigned integer expressions in URLUtil.cpp
https://bugs.webkit.org/show_bug.cgi?id=108955
Reviewed by Benjamin Poulain.
* wtf/url/src/URLUtil.cpp:
(URLUtilities): Make the counter variable a signed integer to get rid of the warning.
2013-02-05 Benjamin Poulain <bpoulain@apple.com>
Rationalize the use of iOS/Mac #defines in Assertions.cpp
https://bugs.webkit.org/show_bug.cgi?id=108870
Reviewed by David Kilzer.
* wtf/Assertions.cpp: Instead of using PLATFORM(MAC) and assume it works for iOS and OS X,
use CF as the guard for CFString. Similarily, USE_APPLE_SYSTEM_LOG guards code using ASL.
2013-02-05 Benjamin Poulain <bpoulain@apple.com>
Make StringBuilder::toAtomicString() consistent with StringBuilder::toString() for strings of length zero
https://bugs.webkit.org/show_bug.cgi?id=108894
Reviewed by Andreas Kling.
* wtf/text/StringBuilder.h:
(WTF::StringBuilder::toAtomicString): The function was returning the nullAtom for strings of length zero.
This is inconsistent with StringBuilder::toString() which always return an empty string.
This patch unifies the behavior.
2013-02-04 Mark Hahnenberg <mhahnenberg@apple.com>
Structure::m_outOfLineCapacity is unnecessary
https://bugs.webkit.org/show_bug.cgi?id=108206
Reviewed by Darin Adler.
Simplifying the utility functions that we use since we don't need a
bunch of fancy templates for this one specific call site.
* wtf/MathExtras.h:
(WTF::roundUpToPowerOfTwo):
2013-02-05 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r141905.
http://trac.webkit.org/changeset/141905
https://bugs.webkit.org/show_bug.cgi?id=108963
"Broke mac build" (Requested by tonyg-cr on #webkit).
* wtf/text/CString.cpp:
* wtf/text/CString.h:
* wtf/text/WTFString.cpp:
* wtf/text/WTFString.h:
(String):
* wtf/url/api/ParsedURL.h:
(ParsedURL):
* wtf/url/api/URLString.h:
2013-02-05 Tony Gentilcore <tonyg@chromium.org>
Call XSSAuditor's didBlockScript() for the threaded HTML parser
https://bugs.webkit.org/show_bug.cgi?id=108726
Reviewed by Adam Barth.
This patch adds isSafeToSendToAnotherThread() methods to CString, String, ParsedURL and URLString.
These methods check to ensure there are 0 or 1 references.
* wtf/text/CString.cpp:
(WTF::CString::isSafeToSendToAnotherThread): Added.
(WTF):
* wtf/text/CString.h:
(CString):
* wtf/text/WTFString.cpp:
(WTF::String::isSafeToSendToAnotherThread): Added.
(WTF):
* wtf/text/WTFString.h:
(String):
* wtf/url/api/ParsedURL.h:
(WTF::ParsedURL::isSafeToSendToAnotherThread): Added.
* wtf/url/api/URLString.h:
(WTF::URLString::isSafeToSendToAnotherThread): Added.
2013-02-04 Benjamin Poulain <bpoulain@apple.com>
Build fix for AtomicString on iOS
Unreviewed. The commit r141812 rely on isUIThread(), there is no such things
in the tree right now. Use pthread_main_np() until more thread handling is upstreamed.
* wtf/text/AtomicString.cpp:
(WTF::AtomicStringTable::create):
2013-02-04 Abhishek Arya <inferno@chromium.org>
Add ASSERT_WITH_SECURITY_IMPLICATION to detect out of bounds access
https://bugs.webkit.org/show_bug.cgi?id=108668
Reviewed by Eric Seidel.
* wtf/AVLTree.h:
(WTF::AVLTreeDefaultBSet::operator[]):
* wtf/BitArray.h:
(WTF::BitArray::set):
(WTF::BitArray::get):
* wtf/FastBitVector.h:
(WTF::FastBitVector::set):
(WTF::FastBitVector::clear):
(WTF::FastBitVector::get):
* wtf/FixedArray.h:
(WTF::FixedArray::operator[]):
* wtf/RefCountedArray.h:
(WTF::RefCountedArray::at):
* wtf/TypedArrayBase.h:
(WTF::TypedArrayBase::item):
* wtf/text/StringBuffer.h:
(WTF::StringBuffer::operator[]):
* wtf/text/StringBuilder.h:
(WTF::StringBuilder::operator[]):
* wtf/text/StringImpl.h:
(WTF::StringImpl::operator[]):
2013-02-04 Benjamin Poulain <benjamin@webkit.org>
Upstream iOS's AtomicString
https://bugs.webkit.org/show_bug.cgi?id=108139
Reviewed by David Kilzer.
On iOS, WebCore can be executed from two different threads. To maintain consistency,
a few changes had been made:
-The main UI thread and the WebThread share the same AtomicStringTable.
-A spin lock is needed before any access to prevent any concurrent modification of the string table.
The spin lock also prevent race on the static initialization of the shared table.
* wtf/Platform.h:
Introduce a new USE(WEB_THREAD) to scope changes related to iOS Web Thread.
* wtf/text/AtomicString.cpp:
(AtomicStringTableLocker):
(WTF::AtomicStringTableLocker::AtomicStringTableLocker):
(WTF::AtomicStringTableLocker::~AtomicStringTableLocker):
(WTF::AtomicStringTable::create):
wtfThreadData() is not necessarily inlined on ARM. When it is not inlined, the old code
causes two call to the function. Instead, we can keep the value in register and pass it
to AtomicStringTable::create().
(WTF::stringTable):
(WTF::addToStringTable):
(WTF::AtomicString::addSlowCase):
(WTF::AtomicString::find):
(WTF::AtomicString::remove):
2013-02-04 Martin Robinson <mrobinson@igalia.com>
Fix GTK+ 'make dist' in preparation for the 1.11.5 release.
* GNUmakefile.list.am:
2013-02-04 David Kilzer <ddkilzer@apple.com>
Sort WTF Xcode project file
* WTF.xcodeproj/project.pbxproj:
2013-02-02 Andreas Kling <akling@apple.com>
Vector should consult allocator about ideal size when choosing capacity.
<http://webkit.org/b/108410>
<rdar://problem/13124002>
Reviewed by Benjamin Poulain.
Added WTF::fastMallocGoodSize(), a workalike/wrapper for OS X's malloc_good_size().
It returns the actual size of the block that will get allocated for a given byte size.
Vector's internal buffer now checks with the allocator if the resulting allocation
could actually house more objects and updates its capacity to make use of the space.
* wtf/Deque.h:
(WTF::::expandCapacity):
* wtf/FastMalloc.cpp:
(WTF::fastMallocGoodSize):
* wtf/FastMalloc.h:
* wtf/Vector.h:
(WTF::VectorBufferBase::allocateBuffer):
(WTF::VectorBufferBase::tryAllocateBuffer):
(WTF::VectorBufferBase::reallocateBuffer):
2013-02-02 Mark Rowe <mrowe@apple.com>
<http://webkit.org/b/108745> WTF shouldn't use a script build phase to detect the presence of headers when the compiler can do it for us
Reviewed by Sam Weinig.
* WTF.xcodeproj/project.pbxproj: Remove the script phase that used to generate a header file
containing information about whether certain header files exist on the system.
* wtf/FastMalloc.cpp: Use Clang's __has_include to detect whether the header exists before including it.
2013-02-01 Roger Fong <roger_fong@apple.com>
Unreviewed. WTF VS2010 project cleanup.
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.vcxproj/WTFPreLink.cmd: Removed.
2013-02-01 Zan Dobersek <zdobersek@igalia.com>
[GTK] Add WTFURL source files to the build
https://bugs.webkit.org/show_bug.cgi?id=108215
Reviewed by Benjamin Poulain.
The WTFURL implementation sources are all still guarded by the USE(WTFURL) guard,
meaning that the GTK port still uses the default KURL backend. To use the WTFURL
backend instead, one would have to define WTF_USE_WTFURL in Platform.h.
* GNUmakefile.am: List the directories from which source headers will be included.
Plenty of WTFURL code currently just includes the required header by name rather
than specifying the header path as relative to Source/WTF. In the future all the inclusions
should probaby be changed to include the header through the path relative to Source/WTF.
* GNUmakefile.list.am: Add build targets for the WTFURL source files.
* wtf/url/api/ParsedURL.cpp: Specify the complete path to the required headers and
reorder the inclusions.
* wtf/url/src/URLCanon.h: Ditto.
2013-01-18 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: Native Memory Instrumentation: provide edge names and class names for WTF containers and strings
https://bugs.webkit.org/show_bug.cgi?id=107303
Reviewed by Yury Semikhatsky.
I'd like to use ValueType[] as className for the container data members
because class names of template parameters already present in the container class names.
* wtf/MemoryInstrumentationArrayBufferView.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashCountedSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashMap.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationListHashSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationSequence.h:
* wtf/MemoryInstrumentationString.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationVector.h:
(WTF::reportMemoryUsage):
2013-02-01 Geoffrey Garen <ggaren@apple.com>
Added TriState to WTF and started using it in one place
https://bugs.webkit.org/show_bug.cgi?id=108628
Reviewed by Beth Dakin.
Useful for expressing "maybe" conditions in a boolean context.
* WTF.xcodeproj/project.pbxproj:
* wtf/TriState.h: Added.
(WTF):
2013-02-01 Patrick Gansterer <paroga@webkit.org>
Build fix for WinCE after r137709
https://bugs.webkit.org/show_bug.cgi?id=105767
Do not pass functions as const references to
templated arguments to make the compiler happy.
* wtf/StdLibExtras.h:
(WTF::binarySearch):
(WTF::tryBinarySearch):
(WTF::approximateBinarySearch):
2013-01-31 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: Native Memory Instrumentation: replace nodeName argument with className
https://bugs.webkit.org/show_bug.cgi?id=107278
Reviewed by Yury Semikhatsky.
I replaced nodeName with className because we newer report node name for private and raw buffers
but need to report their class names.
* wtf/MemoryInstrumentation.cpp:
(WTF::MemoryInstrumentation::reportLinkToBuffer):
(WTF::MemoryClassInfo::addRawBuffer):
(WTF::MemoryClassInfo::addPrivateBuffer):
* wtf/MemoryInstrumentation.h:
(WTF::MemoryInstrumentation::addRawBuffer):
(MemoryClassInfo):
2013-01-31 Jessie Berlin <jberlin@apple.com>
Rolling out r141407 because it is causing crashes under
WTF::TCMalloc_Central_FreeList::FetchFromSpans() in Release builds.
* wtf/Deque.h:
(WTF::::expandCapacity):
* wtf/FastMalloc.cpp:
* wtf/FastMalloc.h:
(WTF):
* wtf/Vector.h:
(WTF::VectorBufferBase::allocateBuffer):
(WTF::VectorBufferBase::tryAllocateBuffer):
(WTF::VectorBufferBase::reallocateBuffer):
2013-01-31 Mark Lam <mark.lam@apple.com>
Abstraction for hiding enum class.
https://bugs.webkit.org/show_bug.cgi?id=108533
Reviewed by Anders Carlsson.
* wtf/Compiler.h:
* wtf/EnumClass.h: Copied from Source/WTF/wtf/TypeSafeEnum.h.
(WTF::EnumClass::EnumClass):
(WTF::EnumClass::operator==):
(WTF::EnumClass::operator!=):
(WTF::EnumClass::operator<):
(WTF::EnumClass::operator<=):
(WTF::EnumClass::operator>):
(WTF::EnumClass::operator>=):
* wtf/TypeSafeEnum.h: Removed.
2013-01-31 Andreas Kling <akling@apple.com>
Vector should consult allocator about ideal size when choosing capacity.
<http://webkit.org/b/108410>
<rdar://problem/13124002>
Reviewed by Benjamin Poulain.
Added WTF::fastMallocGoodSize(), a workalike/wrapper for OS X's malloc_good_size().
It returns the actual size of the block that will get allocated for a given byte size.
Vector's internal buffer now checks with the allocator if the resulting allocation
could actually house more objects and updates its capacity to make use of the space.
* wtf/Deque.h:
(WTF::::expandCapacity):
* wtf/FastMalloc.cpp:
(WTF::fastMallocGoodSize):
* wtf/FastMalloc.h:
* wtf/Vector.h:
(WTF::VectorBufferBase::allocateBuffer):
(WTF::VectorBufferBase::tryAllocateBuffer):
(WTF::VectorBufferBase::reallocateBuffer):
2013-01-30 Christophe Dumez <christophe.dumez@intel.com>
Add a StringTypeAdapter for ASCIILiteral
https://bugs.webkit.org/show_bug.cgi?id=108338
Reviewed by Benjamin Poulain.
Add StringTypeAdapter for ASCIILiteral type so that concatenation of an
ASCIILiteral and a String using + operator is efficiently handled.
* wtf/text/StringConcatenate.h:
* wtf/text/StringOperators.h:
(WTF::operator+): Inline some of the operator+ functions that were not
yet.
(WTF):
2013-01-30 David Kilzer <ddkilzer@apple.com>
Upstream iOS build file changes for WTF
<http://webkit.org/b/108221>
Reviewed by Mark Rowe.
* Configurations/Base.xcconfig:
- Import iOS.xcconfig.
- Remove VALID_ARCHS. Modern Xcodes define these correctly.
- Make HEADER_SEARCH_PATHS work with iOS Simulator builds.
- Add SUPPORTED_PLATFORMS so both Mac and iOS SDKs appear in
schemes.
- Define INSTALL_PATH when building for macosx SDK.
* Configurations/CopyWTFHeaders.xcconfig:
- Make PRIVATE_HEADERS_FOLDER_PATH work with iOS Simulator
builds.
* Configurations/DebugRelease.xcconfig:
- Simplify ARCHS. This works correctly on 32-bit-only SDKs.
* Configurations/WTF.xcconfig:
- Fix installation directory for iOS Simulator builds by
defining INSTALL_PATH_ACTUAL.
* Configurations/iOS.xcconfig: Add.
* WTF.xcodeproj/project.pbxproj:
- Add iOS.xcconfig to the project.
2013-01-29 Mark Hahnenberg <mhahnenberg@apple.com>
Structure::m_outOfLineCapacity is unnecessary
https://bugs.webkit.org/show_bug.cgi?id=108206
Reviewed by Geoffrey Garen.
We're adding a new function that gives us the ability to round a value up to the next power of a certain base.
* wtf/MathExtras.h:
(WTF::roundUpToPowerOf):
2013-01-30 Zeno Albisser <zeno@webkit.org>
[Qt] Fix Qt/Mac build after r141024 and r141037
https://bugs.webkit.org/show_bug.cgi?id=108318
Reviewed by Kentaro Hara.
* wtf/Functional.h:
Make sure Block.h is included and its functionality
is enabled for Qt on Mac.
2013-01-30 Simon Hausmann <simon.hausmann@digia.com>
[Qt] Remove QT4_UNICODE related code paths
https://bugs.webkit.org/show_bug.cgi?id=108316
Reviewed by Kenneth Rohde Christiansen.
Get rid of QT4_UNICODE and any related code paths. The Qt port
requires Qt5 and ICU these days.
* WTF.gypi:
* WTF.pro:
* wtf/unicode/Unicode.h:
* wtf/unicode/qt4/UnicodeQt4.h: Removed.
2013-01-29 Mark Lam <mark.lam@apple.com>
Introducing WTF::TypeSafeEnum and DatabaseError.
https://bugs.webkit.org/show_bug.cgi?id=108279.
Reviewed by Geoffrey Garen.
* WTF.xcodeproj/project.pbxproj:
* wtf/TypeSafeEnum.h: Added.
(WTF):
(TypeSafeEnum):
(WTF::TypeSafeEnum::TypeSafeEnum):
(WTF::TypeSafeEnum::value):
(WTF::TypeSafeEnum::operator==):
(WTF::TypeSafeEnum::operator!=):
(WTF::TypeSafeEnum::operator<):
(WTF::TypeSafeEnum::operator<=):
(WTF::TypeSafeEnum::operator>):
(WTF::TypeSafeEnum::operator>=):
2013-01-29 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r140983.
http://trac.webkit.org/changeset/140983
https://bugs.webkit.org/show_bug.cgi?id=108277
Unfortunately, this API has one last client (Requested by
abarth on #webkit).
* wtf/Platform.h:
2013-01-28 Benjamin Poulain <benjamin@webkit.org>
String constructed from Literals should be non-empty
https://bugs.webkit.org/show_bug.cgi?id=108103
Reviewed by Eric Carlson.
For efficiency, the construction from literal only works with valid non-empty strings.
One of the constructor was changed to fix an error from HTMLMediaElement.
This patch replaces the branch with an assertions.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::createFromLiteral):
2013-01-28 David Kilzer <ddkilzer@apple.com>
BUILD FIX: Platform.h:1212:22: error: '__MAC_OS_X_VERSION_MIN_REQUIRED' is not defined, evaluates to 0 [-Werror,-Wundef]
This fixes the following build error introduced in r140366 for
Bug 107098:
Platform.h:1212:22: error: '__MAC_OS_X_VERSION_MIN_REQUIRED' is not defined, evaluates to 0 [-Werror,-Wundef]
#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(IOS)
^
1 error generated.
* wtf/Platform.h: Check !PLATFORM(IOS) first so that iOS builds
do not try to evaluate __MAC_OS_X_VERSION_MIN_REQUIRED.
2013-01-28 Adam Barth <abarth@webkit.org>
Remove webkitNotifications.createHTMLNotification
https://bugs.webkit.org/show_bug.cgi?id=107598
Reviewed by Benjamin Poulain.
* wtf/Platform.h:
2013-01-27 Laszlo Gombos <l.gombos@samsung.com>
[ANDROID] Fix a typo
https://bugs.webkit.org/show_bug.cgi?id=108046
Reviewed by Adam Barth.
HAVE_NMAP -> HAVE_MMAP.
* wtf/Platform.h:
2013-01-27 Zoltan Arvai <zarvai@inf.u-szeged.hu>
Fixing atomicIncrement implementation for Windows by dropping support before XP SP2.
https://bugs.webkit.org/show_bug.cgi?id=106740
Reviewed by Benjamin Poulain.
Adding int64_t type atomicIncrement and atomicDecrement implementations for Windows
into Atomics.h required by WebKit2 after r139514. Separating WinCE implementation
that does not support WebKit2 and has no support for 64 bit interlocked methods.
Increasing WINVER and _WIN32_WINNT to XP SP2, because the 64 bit type interlocked methods
are not supported on previous versions on 32 bit target.
* config.h:
* wtf/Atomics.h:
(WTF):
(WTF::atomicIncrement):
(WTF::atomicDecrement):
2013-01-26 Andras Becsi <andras.becsi@digia.com>
Unreviewed fix after r140451 to make GIT-SVN repositories happy.
* WTF.vcproj/WTF.sln:
2013-01-26 Justin Schuh <jschuh@chromium.org>
[CHROMIUM] Suppress more c4267 build warnings for Win64 targets
https://bugs.webkit.org/show_bug.cgi?id=107993
Reviewed by Abhishek Arya.
* WTF.gyp/WTF.gyp:
2013-01-25 Eric Seidel <eric@webkit.org>
Support 4 and 5 argument bound static functions
https://bugs.webkit.org/show_bug.cgi?id=107973
Reviewed by Anders Carlsson.
Yummy copy/paste template code!
I'm about to use this in a BackgroundHTMLParser patch, but figured this should be landed separately.
* wtf/Functional.h:
(WTF):
(WTF::R):
2013-01-24 Martin Robinson <mrobinson@igalia.com>
Abstract the logic for appending a UChar32 onto StringBuilder
https://bugs.webkit.org/show_bug.cgi?id=107505
Reviewed by Darin Adler.
* wtf/text/StringBuilder.h:
(WTF::StringBuilder::append): Added a method for appending a UChar32 to a StringBuilder.
2013-01-24 Brent Fulgham <bfulgham@webkit.org>
Stipulate build order between WTFGenerated and WTF
https://bugs.webkit.org/show_bug.cgi?id=107844
Reviewed by Tim Horton.
* WTF.vcxproj/WTF.vcxproj: Use VS2010 project dependency
declaration so WTF depends on a completed WTFGenerated build.
2013-01-23 Abhishek Arya <inferno@chromium.org>
Add support for ASSERT_WITH_SECURITY_IMPLICATION.
https://bugs.webkit.org/show_bug.cgi?id=107699
Reviewed by Eric Seidel.
* wtf/Assertions.h: Add ASSERT_WITH_SECURITY_IMPLICATION to
indicate possible security vulnerabily and enable it by default
in fuzzing builds.
* wtf/Vector.h: Use ASSERT_WITH_SECURITY_IMPLICATION for
bounds check on [] operator.
2013-01-23 Tony Chang <tony@chromium.org>
Unreviewed, set svn:eol-style to CRLF on Windows .sln files.
* WTF.vcproj/WTF.sln: Added property svn:eol-style.
2013-01-23 Adam Barth <abarth@webkit.org>
BackgroundHTMLParser::sendTokensToMainThread should use bind
https://bugs.webkit.org/show_bug.cgi?id=107637
Reviewed by Eric Seidel.
* wtf/Functional.h:
- I had to re-work the approach to validating WeakPtr |this|
arguments a bit. Previously you couldn't pass a WeakPtr as a
non-|this| argument to a function because we would try to unwrap
it into a raw pointer.
* wtf/WeakPtr.h:
(WTF::WeakPtrFactory::revokeAll):
(WeakPtrFactory):
- Let clients revoke all outstanding WeakPtrs without needing to
destroy the WeakPtrFactory.
* wtf/chromium/MainThreadChromium.cpp:
(WTF::callFunctionObject):
(WTF::callOnMainThread):
- Implement callOnMainThread for Function objects. The non-Chromium
implementation of MainThread.cpp already implements this feature.
2013-01-23 Justin Schuh <jschuh@chromium.org>
[CHROMIUM] Suppress c4267 build warnings in WTF for Win64 targets
https://bugs.webkit.org/show_bug.cgi?id=107721
Reviewed by Abhishek Arya.
* WTF.gyp/WTF.gyp:
2013-01-23 Oliver Hunt <oliver@apple.com>
Add RELEASE_ASSERT (and a few friends)
https://bugs.webkit.org/show_bug.cgi?id=107725
Reviewed by Filip Pizlo.
Adding a few macros to make release mode assertions easier and more readable.
Also makes same assertions more useful in debug builds.
* wtf/Assertions.h:
2013-01-22 Joshua Bell <jsbell@chromium.org>
Prevent race condition during Worker shutdown
https://bugs.webkit.org/show_bug.cgi?id=107577
Reviewed by Dmitry Titov.
Add MessageQueue::appendAndKill() which wraps those two steps with a mutex so other
threads can't sneak a message in between.
* wtf/MessageQueue.h: Added appendAndKill() method.
2013-01-22 Roger Fong <roger_fong@apple.com>
WTF project files and property sheets for getting WebKit to compile in VS2010.
https://bugs.webkit.org/show_bug.cgi?id=106986
Reviewed by Timothy Horton and Brent Fulgham.
* WTF.vcproj/WTF.sln:
* WTF.vcxproj: Added.
* WTF.vcxproj/WTF.vcxproj: Added.
* WTF.vcxproj/WTF.vcxproj.filters: Added.
* WTF.vcxproj/WTF.vcxproj.user: Added.
* WTF.vcxproj/WTFCommon.props: Added.
* WTF.vcxproj/WTFDebug.props: Added.
* WTF.vcxproj/WTFGenerated.make: Added.
* WTF.vcxproj/WTFGenerated.vcxproj: Added.
* WTF.vcxproj/WTFGenerated.vcxproj.filters: Added.
* WTF.vcxproj/WTFGenerated.vcxproj.user: Added.
* WTF.vcxproj/WTFGeneratedCommon.props: Added.
* WTF.vcxproj/WTFGeneratedDebug.props: Added.
* WTF.vcxproj/WTFGeneratedRelease.props: Added.
* WTF.vcxproj/WTFPostBuild.cmd: Added.
* WTF.vcxproj/WTFPreBuild.cmd: Added.
* WTF.vcxproj/WTFPreLink.cmd: Added.
* WTF.vcxproj/WTFRelease.props: Added.
* WTF.vcxproj/build-generated-files.sh: Added.
* WTF.vcxproj/copy-files.cmd: Added.
* WTF.vcxproj/work-around-vs-dependency-tracking-bugs.py: Added.
* config.h:
2013-01-22 David Kilzer <ddkilzer@apple.com>
Fix DateMath.cpp to compile with -Wshorten-64-to-32
<http://webkit.org/b/107503>
Reviewed by Darin Adler.
Fixes the following build errors with -Wshorten-64-to-32:
DateMath.cpp:742:47: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
if (month == 2 && day > 28 && !isLeapYear(year))
~~~~~~~~~~ ^~~~
DateMath.cpp:757:48: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
double dateSeconds = ymdhmsToSeconds(year, month, day, hours, minutes, seconds) - timeZoneSeconds;
~~~~~~~~~~~~~~~ ^~~~~
DateMath.cpp:757:55: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
double dateSeconds = ymdhmsToSeconds(year, month, day, hours, minutes, seconds) - timeZoneSeconds;
~~~~~~~~~~~~~~~ ^~~
DateMath.cpp:757:60: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
double dateSeconds = ymdhmsToSeconds(year, month, day, hours, minutes, seconds) - timeZoneSeconds;
~~~~~~~~~~~~~~~ ^~~~~
DateMath.cpp:757:67: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
double dateSeconds = ymdhmsToSeconds(year, month, day, hours, minutes, seconds) - timeZoneSeconds;
~~~~~~~~~~~~~~~ ^~~~~~~
DateMath.cpp:996:59: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
offset = ((o / 100) * 60 + (o % 100)) * sgn;
~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
DateMath.cpp:998:37: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
offset = o * 60 * sgn;
~ ~~~~~~~^~~~~
DateMath.cpp:1005:40: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
offset = (o * 60 + o2) * sgn;
~ ~~~~~~~~~~~~~~^~~~~
DateMath.cpp:1041:40: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
return ymdhmsToSeconds(year, month + 1, day, hour, minute, second) * msPerSecond;
~~~~~~~~~~~~~~~ ~~~~~~^~~
DateMath.cpp:1041:45: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
return ymdhmsToSeconds(year, month + 1, day, hour, minute, second) * msPerSecond;
~~~~~~~~~~~~~~~ ^~~
DateMath.cpp:1041:50: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
return ymdhmsToSeconds(year, month + 1, day, hour, minute, second) * msPerSecond;
~~~~~~~~~~~~~~~ ^~~~
DateMath.cpp:1041:56: error: implicit conversion loses integer precision: 'long' to 'int' [-Werror,-Wshorten-64-to-32]
return ymdhmsToSeconds(year, month + 1, day, hour, minute, second) * msPerSecond;
~~~~~~~~~~~~~~~ ^~~~~~
12 errors generated.
* wtf/DateMath.cpp:
(WTF::ymdhmsToSeconds): Change year argument from long to int.
Change mon, day, hour, minute arguments from int to long.
(WTF::parseInt): Add. Identical to parseLong but bounds checks
for type int.
(WTF::parseLong): Switch to std::numeric_limits<long> instead of
macros.
(WTF::parseES5DatePortion): Change year argument from long to
int.
(WTF::parseES5DateFromNullTerminatedCharacters): Change year
local variable from long to int.
(WTF::parseDateFromNullTerminatedCharacters): Change year and
offset local variables from long to int. Switch from using
parseLong() to parseInt() as needed. Ditto for labs() to abs().
Add overflow check when switching from "MM/DD/YYYY" to
"YYYY/MM/DD" parsing.
2013-01-17 Andy Estes <aestes@apple.com>
Add a USE() macro for content filtering code
https://bugs.webkit.org/show_bug.cgi?id=107098
Reviewed by Mark Rowe.
* wtf/Platform.h: Define WTF_USE_CONTENT_FILTERING on Mac platforms
more recent than Lion.
2013-01-18 Laszlo Gombos <l.gombos@samsung.com>
Remove unnecessary PLATFORM() tests
https://bugs.webkit.org/show_bug.cgi?id=107360
Reviewed by Eric Seidel.
PLATFORM(WIN), PLATFORM(CHROMIUM) and PLATFORM(QT) are mutually
exclusive. Remove redundant PLATFORM() tests based on this
invariant.
* wtf/Platform.h:
2013-01-18 Laszlo Gombos <l.gombos@samsung.com>
Remove PLATFORM(TORCHMOBILE) from Assertions.h
https://bugs.webkit.org/show_bug.cgi?id=107355
Reviewed by Eric Seidel.
This appears to be the only place where PLATFORM(TORCHMOBILE) is
used. I don't believe this ifdef is needed anymore.
* wtf/Assertions.h:
2013-01-18 Michael Saboff <msaboff@apple.com>
Refactor isPowerOf2() and add getLSBSet()
https://bugs.webkit.org/show_bug.cgi?id=107306
Reviewed by Filip Pizlo.
Moved runtime/PropertyMapHashTable.h:PowerOf2() to new hasOneBitSet() and added getLSBSet().
* wtf/MathExtras.h:
(hasOneBitSet):
(getLSBSet):
2013-01-18 David Kilzer <ddkilzer@apple.com>
Fix WTF::copyLCharsFromUCharSource() to compile with -Wshorten-64-to-32
<http://webkit.org/b/107227>
Reviewed by Benjamin Poulain.
Fixes the following build error:
ASCIIFastPath.h:117:59: error: implicit conversion loses integer precision: 'unsigned long' to 'const unsigned int' [-Werror,-Wshorten-64-to-32]
const unsigned endLength = length - ucharsPerLoop + 1;
~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~^~~
1 error generated.
* wtf/text/ASCIIFastPath.h:
(WTF::copyLCharsFromUCharSource): Change local variables from
unsigned to size_t.
2013-01-14 Dominik Röttsches <dominik.rottsches@intel.com>
[EFL] Update freetype in jhbuild to 2.4.11 and activate subpixel layout
https://bugs.webkit.org/show_bug.cgi?id=106774
In order to fix a long standing linespacing/font ascent & descent issue
we found that FreeType commit b0962ac34e660 solves that problem.
Let's update FreeType accordingly, but bump it to 2.4.11 due to the
maintainer recommending several security updates after that said commit.
Also, in order to avoid extra rebaselining, let's activate subpixel
layout at the same time.
Reviewed by Martin Robinson.
* wtf/Platform.h: Activate Subpixel Layout for EFL.
2013-01-17 Adam Barth <abarth@webkit.org>
Teach Functional.h about WeakPtr
https://bugs.webkit.org/show_bug.cgi?id=107105
Reviewed by Anders Carlsson.
A common pattern in cross-thread communication is to call member
functions of an object on a remote thread. If the caller's reference to
the object on the remote thread is a WeakPtr, the caller usually wants
to validate that the object still exists when the call actually takes
place.
It's possible to do this manually for every cross-thread call, but that
is tiresome and error prone. Instead, we can teach bind to validate
WeakPtr arguments when passed as the "this" parameter to a member
function.
* wtf/Functional.h:
(WTF::ParamStorageTraits::validate):
2013-01-17 David Kilzer <ddkilzer@apple.com>
Fix vprintf_stderr_common() to compile with -Wshorten-64-to-32
<http://webkit.org/b/107126>
Reviewed by Darin Adler.
Fixes the following build error:
Assertions.cpp:92:22: error: implicit conversion loses integer precision: 'CFIndex' (aka 'long') to 'int' [-Werror,-Wshorten-64-to-32]
int length = CFStringGetMaximumSizeForEncoding(CFStringGetLength(str), kCFStringEncodingUTF8);
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
* wtf/Assertions.cpp:
(vprintf_stderr_common): Use CFIndex type instead of int for the
return value of CFStringGetMaximumSizeForEncoding().
2013-01-17 Zan Dobersek <zdobersek@igalia.com>
[Autotools] Unify WTF sources list regardless of the target OS, Unicode backend
https://bugs.webkit.org/show_bug.cgi?id=105886
Reviewed by Gustavo Noronha Silva.
Rather than including files in the sources list in an OS-specific way,
guard specific files with OS(UNIX|WINDOWS), USE((GLIB|ICU)_UNICODE) guards
and include all of them in the list.
Proper comments for namespace and #if guard closings are also added or adjusted
where necessary in the affected files.
* GNUmakefile.list.am:
* wtf/OSAllocatorPosix.cpp: Add OS(UNIX) guards.
* wtf/OSAllocatorWin.cpp: Add OS(WINDOWS) guards.
* wtf/ThreadSpecificWin.cpp: Ditto.
* wtf/ThreadingWin.cpp: Ditto.
* wtf/unicode/glib/UnicodeGLib.cpp: Add USE(GLIB_UNICODE) guards.
(WTF):
* wtf/unicode/glib/UnicodeGLib.h: Ditto.
(WTF):
* wtf/unicode/icu/CollatorICU.cpp: Style changes.
* wtf/unicode/icu/UnicodeIcu.h: Add USE(ICU_UNICODE) guards.
(WTF):
* wtf/win/OwnPtrWin.cpp: Add OS(WINDOWS) guards.
2013-01-16 Benjamin Poulain <benjamin@webkit.org>
Use GCC's implementation of atomicIncrement/Decrement on Mac
https://bugs.webkit.org/show_bug.cgi?id=106976
Reviewed by Filip Pizlo.
* wtf/Atomics.h:
GCC and LLVM have builtin for atomic ADD and SUB: __sync_add_and_fetch,
__sync_sub_and_fetch.
Using them let the compiler just generate the atomic operations inline
instead of generating a function call to LibC. It also simplify the
code a bit.
2013-01-15 Adam Barth <abarth@webkit.org>
Generalize DocumentWeakReference into WTF::WeakPtr
https://bugs.webkit.org/show_bug.cgi?id=106854
Reviewed by Darin Adler.
This patch adds a simple WeakPtr object to WTF. To use WeakPtr, objects
must hold a WeakPtrFactory member variable, which clears the WeakPtrs
when the object is destructed. The underlying storage is a
ThreadSafeRefCounted "WeakReference" object, which is shared by all the
WeakPtrs.
WeakPtr is a generalization of DocumentWeakReference, which is used to
check whether the Document object is alive when tasks arive on the main
thread from worker threads. We plan to use a similar pattern in the
threaded HTML parser, but we want to send tasks to objects other than
Document.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/WeakPtr.h: Added.
(WeakReference):
- The ThreadSafeRefCounted object shared by all the WeakPtr
instances. This patch uses ThreadSafeRefCounted so that we can
use WeakPtrs to cancel cross-thread messages.
(WTF::WeakReference::create):
(WTF::WeakReference::get):
(WTF::WeakReference::clear):
- When the object is destroyed, WeakPtrFactory calls this function
to clear all the WeakPtrs.
(WTF::WeakReference::WeakReference):
(WTF::WeakPtr::WeakPtr):
(WTF::WeakPtr::get):
- We might want to add implicit conversions and Boolean operators
in the future, but I've kept this class simple for now.
(WTF::WeakPtrFactory::WeakPtrFactory):
(WTF::WeakPtrFactory::~WeakPtrFactory):
(WTF::WeakPtrFactory::createWeakPtr):
2013-01-12 Csaba Osztrogonác <ossy@webkit.org>
Use __sync_add_and_fetch instead of __gnu_cxx::__exchange_and_add
https://bugs.webkit.org/show_bug.cgi?id=106729
After r139514 we need atomicIncrement(int64_t volatile*) for all platform. Now the
GCC implementation of atomicIncrement() is based on __gnu_cxx::__exchange_and_add,
which doesn't support int64_t type, but __sync_add_and_fetch does.
Reviewed by Benjamin Poulain.
* wtf/Atomics.h:
(WTF::atomicIncrement):
(WTF::atomicDecrement):
2013-01-11 Filip Pizlo <fpizlo@apple.com>
Add WTF_EXPORT_PRIVATE to printInternal() methods of PrintStream.h
Rubber stamped by Mark Hahnenberg.
This will make it easier to use dataLog() from WebCore.
* wtf/PrintStream.h:
(WTF):
2013-01-09 Antti Koivisto <antti@apple.com>
Release FastMalloc thread caches on memory warning
https://bugs.webkit.org/show_bug.cgi?id=106471
Reviewed by Geoff Garen.
Use TCMalloc_ThreadCache::Cleanup() instead of calling Scavenge() twice. This releases all the memory
and looks nicer too.
* wtf/FastMalloc.cpp:
(WTF::releaseFastMallocFreeMemory):
2013-01-09 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.list.am: Add missing header.
2013-01-07 Filip Pizlo <fpizlo@apple.com>
Rationalize closure call heuristics and profiling
https://bugs.webkit.org/show_bug.cgi?id=106270
Reviewed by Oliver Hunt.
Add a macro to add a method to a class that returns a dumper. Allows you to have
secondary dump() methods for dumping either more or less information.
* wtf/PrintStream.h:
(WTF):
2013-01-07 Ryosuke Niwa <rniwa@webkit.org>
Sorted the xcodeproj file.
* WTF.xcodeproj/project.pbxproj:
2013-01-07 Filip Pizlo <fpizlo@apple.com>
Unreviewed, it should be possible to build JSC on ARM.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::IncrementalScavenge):
2013-01-07 Balazs Kilvady <kilvadyb@homejinni.com>
MIPS LLInt implementation.
https://bugs.webkit.org/show_bug.cgi?id=99706
Reviewed by Filip Pizlo.
LLInt implementation for MIPS.
* wtf/Platform.h:
2013-01-05 Jonathan Liu <net147@gmail.com>
Only enable MinGW-w64 pow() workaround if needed
https://bugs.webkit.org/show_bug.cgi?id=106099
Reviewed by Filip Pizlo.
The pow() workaround is no longer needed in the latest version
of MinGW-w64.
* wtf/MathExtras.h:
2013-01-05 Jonathan Liu <net147@gmail.com>
Fix compilation of MathExtras.h with MinGW-w64
https://bugs.webkit.org/show_bug.cgi?id=106105
Reviewed by Simon Hausmann.
The isfinite and isinf functions are required by wtf_pow but
not defined until after wtf_pow. Move wtf_pow to after
"using std::isfinite" and "using std::isinf" to fix compilation.
* wtf/MathExtras.h:
(wtf_pow):
2013-01-03 Filip Pizlo <fpizlo@apple.com>
CallLinkStatus should be aware of closure calls, and the DFG bytecode parser should use that as its sole internal notion of how to optimize calls
https://bugs.webkit.org/show_bug.cgi?id=106027
Reviewed by Mark Hahnenberg.
I got tired of the various idioms for printing a list of things with comma in between, so I wrote a helper.
* WTF.xcodeproj/project.pbxproj:
* wtf/CommaPrinter.h: Added.
(WTF):
(CommaPrinter):
(WTF::CommaPrinter::CommaPrinter):
(WTF::CommaPrinter::dump):
2013-01-02 Simon Hausmann <simon.hausmann@digia.com>
[MinGW-w64] Centralize workaround for pow() implementation
https://bugs.webkit.org/show_bug.cgi?id=105925
Reviewed by Sam Weinig.
As suggested by Sam, move the MinGW-w64 workaround into MathExtras.h
away from the JSC usage.
* wtf/MathExtras.h:
(wtf_pow):
2013-01-02 Adam Barth <abarth@webkit.org>
WTF.gypi lists Platform.h twice
https://bugs.webkit.org/show_bug.cgi?id=105731
Reviewed by Tony Chang.
Once ought to be enough for everybody.
* WTF.gypi:
2012-12-31 Gavin Barraclough <barraclough@apple.com>
Objective-C API for JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=105889
Reviewed by Filip Pizlo.
* wtf/WTFThreadData.cpp:
(WTF::WTFThreadData::WTFThreadData):
* wtf/WTFThreadData.h:
(WTFThreadData):
- Added m_apiData - provide convenient storage for use by the API.
2012-12-28 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: Native Memory Instrumentation: instrument not instrumented members.
https://bugs.webkit.org/show_bug.cgi?id=105830
Reviewed by Vsevolod Vlasov.
In some cases we don't want to visit some class members.
As example we decided to skip pointers to interface classes such as GraphicLayerClient.
We could use addWeakPointer for them but it can't be used for nonpointer members.
In the offline discussion we came to a conclusion that we need a new instrumentation
method ignoreMember, which will be used for all the members which we won't like to visit/instrument.
DriveBy: Also I instrumented not yet instrumented members.
* wtf/MemoryInstrumentation.h:
(MemoryClassInfo):
(WTF::MemoryClassInfo::ignoreMember):
2012-12-26 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Fix build warning in OSAllocatorPosix.cpp
https://bugs.webkit.org/show_bug.cgi?id=105761
Reviewed by Kentaro Hara.
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveUncommitted): Fix unused param warnings.
2012-12-24 Yury Semikhatsky <yurys@chromium.org>
Memory instrumentation: provide a way to mark a node as a root
https://bugs.webkit.org/show_bug.cgi?id=105737
Reviewed by Alexander Pavlov.
Objects added using MemoryInstrumentation::addRootObject will be marked as roots.
* wtf/MemoryInstrumentation.cpp:
(WTF::MemoryInstrumentation::WrapperBase::process):
(WTF):
(WTF::MemoryInstrumentation::WrapperBase::processPointer):
(WTF::MemoryInstrumentation::WrapperBase::processRootObjectRef):
* wtf/MemoryInstrumentation.h:
(WrapperBase):
* wtf/MemoryObjectInfo.h: added root marker which can be used by the heap graph builder.
(WTF::MemoryObjectInfo::MemoryObjectInfo):
(WTF::MemoryObjectInfo::isRoot):
(WTF::MemoryObjectInfo::markAsRoot):
(MemoryObjectInfo):
2012-12-24 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: Native Memory Instrumentation: propagate member type as edge type to the serialized heap graph.
https://bugs.webkit.org/show_bug.cgi?id=105725
Reviewed by Yury Semikhatsky.
MemoryOwningType was renamed to MemberType.
Source argument were removed from reportEdge, reportLeaf and other edge related methods because it is not necessary.
MemberType argument was propagated from MemoryInstrumentation down to HeapGraphSerializer.
The changes covered by tests in TestWebKitAPI.
* wtf/MemoryInstrumentation.cpp:
(WTF::MemoryInstrumentation::reportEdge):
(WTF::MemoryInstrumentation::reportLinkToBuffer):
(WTF::MemoryClassInfo::addPrivateBuffer):
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentationClient):
(MemoryInstrumentation):
(WTF::MemoryInstrumentation::addRawBuffer):
(WTF::MemoryInstrumentation::MemberTypeTraits::addObject):
(WTF::MemoryInstrumentation::addObjectImpl):
2012-12-21 Ilya Tikhonovsky <loislo@chromium.org>
Unreviewed. Another try to fix Apple Win Release build.
* wtf/FastMalloc.cpp:
(WTF::ClassIndex):
2012-12-21 Ilya Tikhonovsky <loislo@chromium.org>
Unreviewed compilation fix for Apple Win Release after r138398.
* wtf/FastMalloc.cpp:
(WTF::ClassIndex):
2012-12-21 Oliver Hunt <oliver@apple.com>
Further harden FastMalloc
https://bugs.webkit.org/show_bug.cgi?id=105656
Reviewed by Gavin Barraclough.
This increases the degree to which we harden the FastMalloc
linked lists. We now also mask the previous and next pointers
in the doubly linked list implementation. I've also made
the masking itself somewhat more complex without a measurable
cost. We still use ASLR to provide some general entropy, but
we blind the pointers against each nodes 'this' pointer.
* wtf/FastMalloc.cpp:
(WTF::ClassIndex):
(WTF::SLL_Next):
(WTF::SLL_SetNext):
(WTF::Span::next):
(WTF::Span::prev):
(WTF::Span::setNext):
(WTF::Span::setPrev):
(Span):
As Span now has to do masking on the next and previous pointers,
I've updated the code to use accessors instead.
(WTF::DLL_Init):
(WTF::DLL_Remove):
(WTF::DLL_IsEmpty):
(WTF::DLL_Length):
(WTF::DLL_Prepend):
(WTF::TCMalloc_Central_FreeList::enumerateFreeObjects):
(WTF::TCMalloc_PageHeap::scavenge):
(WTF::TCMalloc_PageHeap::New):
(WTF::TCMalloc_PageHeap::AllocLarge):
(WTF::TCMalloc_PageHeap::ReturnedBytes):
(WTF::TCMalloc_PageHeap::Check):
(WTF::TCMalloc_PageHeap::CheckList):
(WTF::TCMalloc_PageHeap::ReleaseFreeList):
(WTF::TCMalloc_Central_FreeList::FetchFromSpans):
2012-12-20 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Build break with latest EFL libraries.
https://bugs.webkit.org/show_bug.cgi?id=104827
Reviewed by Laszlo Gombos.
The eo EFL package is introduced and evas and ecore use it since 1.8.
While introducing Eo, EFL changed several structures of Evas and Ecore
from own specific class to Eo.
So, this patch adds FindEo and changes declaration of Evas, Evas_Object,
Ecore_Timer to build with latest EFL libraries.
* wtf/OwnPtrCommon.h: Modified declaration of Evas_Object and Ecore_Timer.
* wtf/PlatformEfl.cmake: Includes eo EFL library.
* wtf/efl/RefPtrEfl.h: Modified declaration of Evas_Object.
2012-12-20 Oliver Hunt <oliver@apple.com>
Harden pointers in FastMalloc's singly linked list implementation
https://bugs.webkit.org/show_bug.cgi?id=105571
Reviewed by Gavin Barraclough.
Add simple xor based hardening of the next pointer in the
fast malloc singly linked list implementation. We rely on
ASLR to introduce the address randomness we want for the mask.
Happily this produces a very low cost random value to use.
* wtf/FastMalloc.cpp:
(WTF):
(WTF::SLL_Next):
(WTF::SLL_SetNext):
2012-12-19 Oliver Hunt <oliver@apple.com>
StringImpl isolatedCopy unnecessarily copies text-segment character data
https://bugs.webkit.org/show_bug.cgi?id=105376
Reviewed by Anders Carlsson.
This patch adds a new (private) helper to StringImpl that tests whether the StringImpl
is backed by an ASCII literal. This allows isolatedCopy() to safely use the createFromLiteral
constructor rather than making an unnecessary copy.
* wtf/text/StringImpl.h:
(StringImpl):
(WTF::StringImpl::isASCIILiteral):
(WTF::StringImpl::isolatedCopy):
2012-12-19 Oliver Hunt <oliver@apple.com>
WTF String from ASCIILiteral fails to correctly handle empty strings.
https://bugs.webkit.org/show_bug.cgi?id=105453
Reviewed by Anders Carlsson.
When we have an zero length literal we should return the empty StringImpl.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::createFromLiteral):
2012-12-18 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: show cached images under MemoryCache -> Images section
https://bugs.webkit.org/show_bug.cgi?id=105261
Reviewed by Pavel Feldman.
Use first provided name and class name. If one of the ancestors tries to overwrite
it just ignore the call.
* wtf/MemoryObjectInfo.h:
(WTF::MemoryObjectInfo::setClassName):
(WTF::MemoryObjectInfo::setName):
2012-12-18 Uli Schlachter <psychon@znc.in>
Implement uncommitted memory for Linux.
https://bugs.webkit.org/show_bug.cgi?id=65766
Reviewed by Simon Hausmann.
The old approach used MAP_NORESERVE to allocate address space without
committing it. However, that flag gets ignored if
/proc/sys/vm/overcommit_memory is set to 2. The new approach uses a
mapping with PROT_NONE. This works because mappings which aren't even
readable don't get accounted as committed on Linux.
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveUncommitted):
(WTF::OSAllocator::reserveAndCommit):
(WTF::OSAllocator::commit):
(WTF::OSAllocator::decommit):
2012-12-17 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: Native Memory Instrumentation: MemoryInstrumentation doesn't detect reportMemoryUsage method defined in a base class.
https://bugs.webkit.org/show_bug.cgi?id=105026
Reviewed by Yury Semikhatsky.
Old SFINAE test was replaced with new one based on this article:
http://stackoverflow.com/questions/1966362/sfinae-to-check-for-inherited-member-functions
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentation):
(yes):
(IsInstrumented):
(no):
(WTF::MemoryInstrumentation::IsInstrumented::BaseMixin::reportMemoryUsage):
(WTF::MemoryInstrumentation::selectInstrumentationMethod):
(InstrumentationSelector):
(WTF):
(WTF::::reportObjectMemoryUsage):
2012-12-17 Ilya Tikhonovsky <loislo@chromium.org>
Unreviewed, rolling out r137892.
http://trac.webkit.org/changeset/137892
https://bugs.webkit.org/show_bug.cgi?id=105026
it broke compilation on windows
* wtf/MemoryInstrumentation.h:
(WTF::MemoryInstrumentation::selectInstrumentationMethod):
(MemoryInstrumentation):
(WTF::MemoryInstrumentation::reportObjectMemoryUsage):
(WTF::reportMemoryUsage):
2012-12-14 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: Native Memory Instrumentation: MemoryInstrumentation doesn't detect reportMemoryUsage method defined in a base class.
https://bugs.webkit.org/show_bug.cgi?id=105026
Reviewed by Yury Semikhatsky.
Old SFINAE test was replaced with new one based on this article:
http://stackoverflow.com/questions/1966362/sfinae-to-check-for-inherited-member-functions
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentation):
(yes):
(IsInstrumented):
(no):
(WTF::MemoryInstrumentation::IsInstrumented::BaseMixin::reportMemoryUsage):
(WTF::MemoryInstrumentation::selectInstrumentationMethod):
(InstrumentationSelector):
(WTF):
(WTF::::reportObjectMemoryUsage):
2012-12-14 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: add data grid for exploring native heap graph
https://bugs.webkit.org/show_bug.cgi?id=105012
Reviewed by Pavel Feldman.
Do not report edges with null target.
* wtf/MemoryInstrumentation.h:
(WTF::MemoryInstrumentation::addObjectImpl):
2012-12-13 Filip Pizlo <fpizlo@apple.com>
Attempt to rationalize and simplify WTF::binarySearch
https://bugs.webkit.org/show_bug.cgi?id=104890
Reviewed by Maciej Stachowiak.
Binary search now has three modes:
The default: assert that the key was found, but return an adjacent element if it
wasn't found, if asserts are turned off.
tryBinarySearch: return 0 if the key wasn't found.
approximateBinarySearch: if the key is not found, return an adjacent element (either
the left or right; no guarantee which).
This also reduces the number of variants of binarySearch. The functor variant is now
gone because binarySearch now always uses a functor for the key extractor. The
generic variant is now gone because binarySearch always expects an array type that
can do operator[].
* wtf/StdLibExtras.h:
(WTF::binarySearchImpl):
(WTF::binarySearch):
(WTF::tryBinarySearch):
(WTF::approximateBinarySearch):
2012-12-13 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: Native Memory Instrumentation: do not validate pointers to objects in RenderArena agains tcmalloc data.
https://bugs.webkit.org/show_bug.cgi?id=104903
Reviewed by Yury Semikhatsky.
This is a simplest approach to do that with zero performance overhead.
* wtf/MemoryInstrumentation.cpp:
(WTF::MemoryClassInfo::setCustomAllocation):
(WTF):
* wtf/MemoryInstrumentation.h:
(MemoryClassInfo):
* wtf/MemoryObjectInfo.h:
(WTF::MemoryObjectInfo::MemoryObjectInfo):
(WTF::MemoryObjectInfo::customAllocation):
(WTF::MemoryObjectInfo::setCustomAllocations):
(MemoryObjectInfo):
2012-12-12 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: Native Memory Instrumentation: remove fake root MemoryObjectInfo.
https://bugs.webkit.org/show_bug.cgi?id=104796
Reviewed by Yury Semikhatsky.
It was not a good idea to introduce a fake root MemoryObjectInfo.
It makes a problem when we visit an object without its own MemoryObjectType.
Example: RenderBox has a global pointer to a hash map.
HashMap doesn't have its own object type because it is a generic container.
It will inherit object type from the fake root memory object info.
The same could happen for another container in another class with other MemoryObjectType.
This fact forces me to create custom process method for root objects
because they need to have their own MemoryObjectInfo with customisable memory object type.
Drive by fix: InstrumentedPointer* was replaced with Wrapper* because actually it is using
for instrumented and not instrumented object classes.
* wtf/MemoryInstrumentation.cpp:
(WTF::MemoryInstrumentation::MemoryInstrumentation):
(WTF::MemoryInstrumentation::WrapperBase::WrapperBase):
(WTF::MemoryInstrumentation::WrapperBase::process):
(WTF::MemoryInstrumentation::WrapperBase::processRootObjectRef):
(WTF):
* wtf/MemoryInstrumentation.h:
(WTF::MemoryInstrumentation::addRootObject):
(MemoryInstrumentation):
(WrapperBase):
(WTF::MemoryInstrumentation::WrapperBase::~WrapperBase):
(Wrapper):
(OwningTraits):
(WTF::MemoryInstrumentation::OwningTraits::addRootObject):
(WTF::MemoryInstrumentation::addObjectImpl):
(WTF::::Wrapper):
(WTF::::callReportMemoryUsage):
2012-12-12 Sergio Martins <sergio.martins@kdab.com>
Fix QNX Qt build by enabling JIT.
https://bugs.webkit.org/show_bug.cgi?id=102794
Reviewed by Simon Hausmann.
JIT is working, so enable it. Otherwise LLINT gets enabled, and
that doesn't compile.
YARR_JIT is crashing at this time though, so disable it.
* wtf/Platform.h:
2012-12-11 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: Native Memory Instrumentation: simplify Sequences processing code.
https://bugs.webkit.org/show_bug.cgi?id=104777
Reviewed by Yury Semikhatsky.
Redesign reportMemoryUsage for the sequences.
With the old schema we couldn't instrument HashMap<key, WebCore::LayoutUnit>
because LayoutUnit has overloaded conversion operators for double, int, etc.
I wrote an empty SequenceMemoryInstrumentationTraits for LayoutUnit class
but it doesn't help because the root of problem was hidden in the free template function reportSequenceMemoryUsage.
I could overload reportSequenceMemoryUsage too but in this case I need to fully specify all the types
for the iterators like HashMap<.....>::const_iterator. Too many letters.
I found a better solution. Free reportSequenceMemoryUsage can be converted into default implementation of static
reportMemoryUsage traits method. In this case the types of iterators will be inferred automaticaly. The old default
implementation becomes a custom implementation for the user defined types.
* wtf/MemoryInstrumentationHashCountedSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashMap.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationListHashSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationSequence.h:
(WTF):
(WTF::SequenceMemoryInstrumentationTraits::reportMemoryUsage):
(SequenceMemoryInstrumentationTraits):
* wtf/MemoryInstrumentationVector.h:
(WTF::reportMemoryUsage):
2012-12-10 Yury Semikhatsky <yurys@chromium.org>
Memory instrumentation: make sure each edge is reported only once
https://bugs.webkit.org/show_bug.cgi?id=104630
Reviewed by Pavel Feldman.
Make sure that outgoing edges are reported only once if we come to the same
object twice: first by an address of a base class and then by a real address
of the object.
* wtf/MemoryInstrumentation.cpp:
(WTF::MemoryInstrumentation::MemoryInstrumentation):
(WTF::MemoryInstrumentation::reportLinkToBuffer):
(WTF::MemoryInstrumentation::InstrumentedPointerBase::InstrumentedPointerBase):
(WTF::MemoryInstrumentation::InstrumentedPointerBase::process):
(WTF::MemoryClassInfo::init):
(WTF::MemoryClassInfo::addRawBuffer):
(WTF::MemoryClassInfo::addPrivateBuffer):
* wtf/MemoryInstrumentation.h:
(InstrumentedPointerBase):
(MemoryInstrumentation):
(InstrumentedPointer):
(WTF::MemoryClassInfo::MemoryClassInfo):
(WTF::MemoryClassInfo::addMember):
(MemoryClassInfo):
(WTF::::InstrumentedPointer):
(WTF::::callReportMemoryUsage):
* wtf/MemoryObjectInfo.h:
(WTF::MemoryObjectInfo::MemoryObjectInfo):
(WTF::MemoryObjectInfo::firstVisit):
(WTF::MemoryObjectInfo::className):
(WTF::MemoryObjectInfo::name):
(WTF::MemoryObjectInfo::setAlreadyVisited):
(MemoryObjectInfo):
2012-12-10 Benjamin Poulain <benjamin@webkit.org>
Add convenience methods to use ListHashSet for a LRU cache
https://bugs.webkit.org/show_bug.cgi?id=104499
Reviewed by Sam Weinig.
ListHashSet is a great abstract data type to implement caches.
Unfortunately, the class was missing methods to do that easily and
efficiently. This patch fixes that.
The names appendOrMoveToLast() and prependOrMoveToFirst() were chosen
in favor of append()/prepend() to ensure they are not used in place of
add() by accident.
* wtf/ListHashSet.h:
(ListHashSet):
(WTF::::removeFirst):
(WTF::::appendOrMoveToLast):
(WTF::::prependOrMoveToFirst):
(WTF::::unlink):
(WTF::::unlinkAndDelete):
(WTF::::prependNode):
2012-12-10 Eric Carlson <eric.carlson@apple.com>
Add support for in-band text tracks to Mac port
https://bugs.webkit.org/show_bug.cgi?id=103663
Reviewed by Sam Weinig.
* wtf/Platform.h: Define HAVE_AVFOUNDATION_TEXT_TRACK_SUPPORT.
2012-12-08 Patrick Gansterer <paroga@webkit.org>
Compiling WTF outside of WebKit failed on Windows
https://bugs.webkit.org/show_bug.cgi?id=100201
Reviewed by Darin Adler.
Explicitly use the Unicode variants of the Windows API to
allow building the WTF library without the UNICODE define.
* wtf/win/MainThreadWin.cpp:
(WTF::initializeMainThreadPlatform):
2012-12-08 Gustavo Noronha Silva <gns@gnome.org>
Unreviewed trivial space fix to silence an automake warning.
* GNUmakefile.list.am:
2012-12-05 Halton Huo <halton.huo@intel.com>
[CMake] Unify coding style for CMake files
https://bugs.webkit.org/show_bug.cgi?id=103605
Reviewed by Laszlo Gombos.
Update cmake files(.cmake, CMakeLists.txt) with following style rules:
1. Indentation
1.1 Use spaces, not tabs.
1.2 Four spaces as indent.
2. Spacing
2.1 Place one space between control statements and their parentheses.
For eg, if (), else (), elseif (), endif (), foreach (),
endforeach (), while (), endwhile (), break ().
2.2 Do not place spaces between function and macro statements and
their parentheses. For eg, macro(), endmacro(), function(),
endfunction().
2.3 Do not place spaces between a command or function or macro and its
parentheses, or between a parenthesis and its content. For eg,
message("testing") not message( "testing") or message ("testing" )
2.4 No space at line ending.
3. Lowercase when call commands macros and functions. For eg,
add_executable() not ADD_EXECUTABLE(), set() not SET().
* CMakeLists.txt:
* wtf/CMakeLists.txt:
* wtf/PlatformBlackBerry.cmake:
* wtf/PlatformEfl.cmake:
* wtf/PlatformWinCE.cmake:
2012-12-04 Jon Lee <jonlee@apple.com>
Extend StringHasher to take a stream of characters
https://bugs.webkit.org/show_bug.cgi?id=104076
<rdar://problem/12811887>
Reviewed by Darin Adler.
We essentially move computeHash() to a member function of StringHasher. This allows clients of the
hasher to append strings to the general hash, without having to first concatenate the strings.
* wtf/StringHasher.h:
(WTF::StringHasher::addCharacters): Same as computeHash(), except also take into account the possibility
that there is a pending character to hash. If this is the case, we align the word boundary by consuming the
first character in data, adjust the length, move the data pointer forward one, and update the hasher's
pending character state. Also add an early return so that we are guaranteed at least one character in case
we run into this situation.
(WTF::StringHasher::computeHash): Refactor into addCharacters().
2012-12-04 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: simplify reportMemoryUsage signature
https://bugs.webkit.org/show_bug.cgi?id=104028
Reviewed by Vsevolod Vlasov.
Removed const& modifier from instrumented pointer type. Was const T* const&,
now it is const T*
* wtf/MemoryInstrumentation.cpp:
(WTF::MemoryClassInfo::addRawBuffer):
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentation):
(WTF::MemoryInstrumentation::selectInstrumentationMethod):
(WTF::MemoryInstrumentation::reportObjectMemoryUsage):
(MemoryClassInfo):
(WTF::reportMemoryUsage):
(WTF::MemoryInstrumentation::addObjectImpl):
(WTF):
* wtf/MemoryInstrumentationArrayBufferView.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashCountedSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashMap.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationListHashSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationParsedURL.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationString.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationVector.h:
(WTF::reportMemoryUsage):
2012-12-01 Filip Pizlo <fpizlo@apple.com>
JSC should be able to report profiling data associated with the IR dumps and disassembly
https://bugs.webkit.org/show_bug.cgi?id=102999
Reviewed by Gavin Barraclough.
Made some minor changes to support the new profiler. FileOutputStream now has an
open() method, and DataLog uses it. StringPrintStream has a reset() method, which
allows you to reuse the same StringPrintStream for creating multiple strings.
SegmentedVector now has a const operator[]. And, WTFString now can do fromUTF8() on
a CString directly.
* wtf/DataLog.cpp:
(WTF::initializeLogFileOnce):
* wtf/FilePrintStream.cpp:
(WTF::FilePrintStream::open):
(WTF):
* wtf/FilePrintStream.h:
* wtf/SegmentedVector.h:
(WTF::SegmentedVector::at):
(SegmentedVector):
(WTF::SegmentedVector::operator[]):
* wtf/StringPrintStream.cpp:
(WTF::StringPrintStream::reset):
(WTF):
* wtf/StringPrintStream.h:
(StringPrintStream):
* wtf/text/WTFString.cpp:
(WTF::String::fromUTF8):
(WTF):
* wtf/text/WTFString.h:
(String):
2012-12-04 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r136597.
http://trac.webkit.org/changeset/136597
https://bugs.webkit.org/show_bug.cgi?id=104065
broke Windows compilation (Requested by yurys on #webkit).
* wtf/MemoryInstrumentation.cpp:
(WTF::MemoryClassInfo::addRawBuffer):
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentation):
(WTF::MemoryInstrumentation::selectInstrumentationMethod):
(WTF::MemoryInstrumentation::reportObjectMemoryUsage):
(MemoryClassInfo):
(WTF::reportMemoryUsage):
(WTF::MemoryInstrumentation::addObjectImpl):
(WTF):
* wtf/MemoryInstrumentationArrayBufferView.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashCountedSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashMap.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationListHashSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationParsedURL.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationString.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationVector.h:
(WTF::reportMemoryUsage):
2012-12-04 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: simplify reportMemoryUsage signature
https://bugs.webkit.org/show_bug.cgi?id=104028
Reviewed by Vsevolod Vlasov.
Removed const& modifier from instrumented pointer type. Was const T* const&,
now it is const T*
* wtf/MemoryInstrumentation.cpp:
(WTF::MemoryClassInfo::addRawBuffer):
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentation):
(WTF::MemoryInstrumentation::selectInstrumentationMethod):
(WTF::MemoryInstrumentation::reportObjectMemoryUsage):
(MemoryClassInfo):
(WTF::reportMemoryUsage):
(WTF::MemoryInstrumentation::addObjectImpl):
(WTF):
* wtf/MemoryInstrumentationArrayBufferView.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashCountedSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashMap.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationListHashSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationParsedURL.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationString.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationVector.h:
(WTF::reportMemoryUsage):
2012-12-03 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: NMI introduce heap graph recording API
https://bugs.webkit.org/show_bug.cgi?id=103232
Reviewed by Vsevolod Vlasov.
MemoryInstrumentationClient is extended with several methods for reporting
heap graph vertices and edges. Edge source is always idenfied by heap object
address. Target node might be either a destination object address(either real
or adjusted if the edge was retrieved from a pointer to a base class) or a
MemoryObjectInfo in case of internal buffers.
* wtf/MemoryInstrumentation.cpp:
(WTF::MemoryInstrumentation::reportEdge):
(WTF):
(WTF::MemoryInstrumentation::reportLinkToBuffer): report edge between the object
and a buffer which it owns.
(WTF::MemoryInstrumentation::InstrumentedPointerBase::process):
(WTF::MemoryClassInfo::addRawBuffer):
(WTF::MemoryClassInfo::addPrivateBuffer):
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentationClient):
(WTF::MemoryInstrumentationClient::reportNode):
(WTF::MemoryInstrumentationClient::reportEdge):
(WTF::MemoryInstrumentationClient::reportLeaf):
(WTF::MemoryInstrumentationClient::reportBaseAddress): if we found an object by a pointer
to base class it may have different value than real object address. Report both real and
adjusted addresses so that they both can be used for identifying corresponding heap graph
node.
(WTF::MemoryInstrumentation::addRootObject):
(MemoryInstrumentation):
(WTF::MemoryInstrumentation::addObject):
(WTF::MemoryInstrumentation::addRawBuffer):
(WTF::MemoryInstrumentation::OwningTraits::addObject):
(WTF::MemoryClassInfo::addMember):
(MemoryClassInfo):
(WTF::MemoryInstrumentation::addObjectImpl):
* wtf/MemoryObjectInfo.h: added methods for repoting class name and some name string.
(WTF::MemoryObjectInfo::setClassName):
(WTF::MemoryObjectInfo::setName):
(MemoryObjectInfo):
2012-12-03 Filip Pizlo <fpizlo@apple.com>
Replace JSValue::description() with JSValue::dump(PrintStream&)
https://bugs.webkit.org/show_bug.cgi?id=103866
Reviewed by Darin Adler.
Make it easier to get a String from a StringPrintStream.
* wtf/StringPrintStream.cpp:
(WTF::StringPrintStream::toString):
* wtf/StringPrintStream.h:
(StringPrintStream):
(WTF::toString):
2012-12-02 Filip Pizlo <fpizlo@apple.com>
It should be possible to build and run with DFG_ENABLE(PROPAGATION_VERBOSE)
https://bugs.webkit.org/show_bug.cgi?id=103848
Reviewed by Sam Weinig.
Increase the variadicity of dataLog() and print(), and add a pointerDump()
which allows passing a pointer to something that has a printInternal(). If
the pointer is null, it'll print "(null)"; otherwise it'll invoke the
printInternal() function.
* wtf/DataLog.h:
(WTF):
(WTF::dataLog):
* wtf/PrintStream.h:
(PrintStream):
(WTF::PrintStream::print):
(WTF):
(PointerDump):
(WTF::PointerDump::PointerDump):
(WTF::PointerDump::dump):
(WTF::pointerDump):
2012-11-30 Simon Hausmann <simon.hausmann@digia.com>, Pierre Rossi <pierre.rossi@digia.com>
[Qt] Separate Qt WebKit into Qt WebKit and Qt WebKit Widgets
https://bugs.webkit.org/show_bug.cgi?id=99314
Reviewed by Tor Arne Vestbø.
This big change separates QtWebKit into QtWebKit and QtWebKitWidgets as
shared libraries.
It's a big refactoring that mostly involves moving WebCore dependent
code into QtWebKit and accessing it through exported QWebFrameAdapter
and QWebPageAdapter classes.
* wtf/text/WTFString.h:
(String): Export the QString conversions also as WTF_STRING_API.
2012-11-29 Filip Pizlo <fpizlo@apple.com>
It should be easy to find code blocks in debug dumps
https://bugs.webkit.org/show_bug.cgi?id=103623
Reviewed by Geoffrey Garen.
Changed RawPointer to accept both const void* and void*, and use the former internally.
Cleaned up SHA1 so that the functionality already used internally for self-testing is
available via the API. This includes addBytes(CString) and computing hex digests.
* wtf/RawPointer.h:
(WTF::RawPointer::RawPointer):
(RawPointer):
(WTF::RawPointer::value):
* wtf/SHA1.cpp:
(WTF::expectSHA1):
(WTF::SHA1::hexDigest):
(WTF::SHA1::computeHexDigest):
* wtf/SHA1.h:
(WTF::SHA1::addBytes):
2012-11-29 Patrick Gansterer <paroga@webkit.org>
Build fix for WinCE after r136096.
* wtf/StringPrintStream.cpp: Added missing include file.
2012-11-28 Filip Pizlo <fpizlo@apple.com>
SpeculatedType dumping should not use the static char buffer[thingy] idiom
https://bugs.webkit.org/show_bug.cgi?id=103584
Reviewed by Michael Saboff.
Added a StringPrintStream, and made it easy to create dumpers for typedefs to primitives.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/PrintStream.cpp:
(WTF::dumpCharacter):
* wtf/PrintStream.h:
(WTF::printInternal):
* wtf/StringPrintStream.cpp: Added.
(WTF::StringPrintStream::StringPrintStream):
(WTF::StringPrintStream::~StringPrintStream):
(WTF::StringPrintStream::vprintf):
(WTF::StringPrintStream::toCString):
(WTF::StringPrintStream::increaseSize):
* wtf/StringPrintStream.h: Added.
(StringPrintStream):
(WTF::toCString):
2012-11-28 Michael Saboff <msaboff@apple.com>
Update String Stats for recent dataLog changes and add summary
https://bugs.webkit.org/show_bug.cgi?id=103583
Reviewed by Filip Pizlo.
Updated calls to dataLog() to dataLogF() as a results of r135469.
Added total savings from 8 bit strings in bytes and as a percentage.
* wtf/text/StringImpl.cpp:
(WTF::StringStats::printStats):
2012-11-28 Roger Fong <roger_fong@apple.com>
Make DataLog work/compile properly on Windows.
https://bugs.webkit.org/show_bug.cgi?id=103544
Reviewed by Filip Pizlo.
* wtf/DataLog.cpp:
(WTF::initializeLogFileOnce):
2012-11-28 Filip Pizlo <fpizlo@apple.com>
It should be possible to say dataLog("count = ", count, "\n") instead of dataLogF("count = %d\n", count)
https://bugs.webkit.org/show_bug.cgi?id=103009
Reviewed by Michael Saboff.
Added the ability to use out.print(...) and dataLog(...) variadically and with
WTF::printInternal(PrintStream&, const T&) overloads for any type T that you want
to be able to pass as an argument to out.print() or dataLog(). Also added one
example class for doing this: RawPointer, which can be used to force a pointer
to be printed as "%p" rather than matching any overloads that you might want to
introduce.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/DataLog.h:
(WTF):
(WTF::dataLog):
* wtf/PrintStream.cpp:
(WTF::printInternal):
(WTF):
* wtf/PrintStream.h:
(PrintStream):
(WTF::PrintStream::print):
(WTF):
* wtf/RawPointer.h: Added.
(WTF):
(RawPointer):
(WTF::RawPointer::RawPointer):
(WTF::RawPointer::value):
2012-11-27 Filip Pizlo <fpizlo@apple.com>
Convert some remaining uses of FILE* to PrintStream&.
Rubber stamped by Mark Hahnenberg.
* wtf/BitVector.cpp:
(WTF::BitVector::dump):
* wtf/BitVector.h:
(BitVector):
2012-11-27 Pratik Solanki <psolanki@apple.com>
objc/objc-runtime.h does not exist on all PLATFORM(MAC)
https://bugs.webkit.org/show_bug.cgi?id=101780
Reviewed by Brent Fulgham.
Clean up header includes so we don't include objc/objc-runtime.h.
* wtf/Functional.h:
* wtf/ObjcRuntimeExtras.h: Include objc/message.h here so we don't rely on proper ordering
of includes in files that include this header.
2012-11-27 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r135828.
http://trac.webkit.org/changeset/135828
https://bugs.webkit.org/show_bug.cgi?id=103405
[Chromium] Multiple ASAN errors after a WebKit roll due to
mismatched malloc/delete (not free) resulting from
StringImpl::deref() (Requested by apavlov on #webkit).
* wtf/FastAllocBase.h:
* wtf/Platform.h:
2012-11-26 Adam Barth <abarth@webkit.org>
[Chromium] fastMalloc has an extra branch on Windows
https://bugs.webkit.org/show_bug.cgi?id=103027
Reviewed by Eric Seidel.
There's no need to override the new/delete operators on non-Mac
platform because:
1) We use the system malloc anyway.
2) We've modified the system malloc to crash in out-of-memory conditions.
This patch removes a branch (and a call) from malloc, which will
hopefully improve performance. I haven't measured the performance
characteristics of this patch, but I will look at the graphs closely
when landing.
* wtf/FastAllocBase.h:
* wtf/Platform.h:
2012-11-26 Filip Pizlo <fpizlo@apple.com>
DataLog to a file should work if there are multiple processes using WTF
https://bugs.webkit.org/show_bug.cgi?id=103323
Reviewed by Mark Hahnenberg.
Whereas before DataLog would open a file with the name you specified, now it'll open a file with the
name plus the PID appended to it. So if you are dealing with multiple processes running with DataLog
to a file enabled, you'll get multiple separate log files.
* wtf/DataLog.cpp:
(WTF::initializeLogFileOnce):
2012-11-26 Zeno Albisser <zeno@webkit.org>
[Qt] Fix the LLInt build on Mac
https://bugs.webkit.org/show_bug.cgi?id=97587
Reviewed by Simon Hausmann.
* wtf/InlineASM.h:
Use OS(DARWIN) instead of PLATFORM(MAC),
in order to allow Qt to use the same code.
* wtf/Platform.h:
2012-11-26 Patrick Gansterer <paroga@webkit.org>
Build fix for WinCE after r135640.
* wtf/DataLog.cpp:
2012-11-24 Adam Barth <abarth@webkit.org>
Chromium should use TCMalloc on Mac to go fast
https://bugs.webkit.org/show_bug.cgi?id=102866
Reviewed by Eric Seidel.
This patch enables TCMalloc for some WebKit objects. It improves
dom-modify on Mac by 5-10%.
On non-Mac platforms, Chromium already uses TCMalloc throughout the
project. Unfortunately, we haven't yet figured out how to turn TCMalloc
on globally on Mac because the approach we use for other platforms makes
some OS X APIs sad.
The next best thing would be to enable TCMalloc for WebKit by
overriding the global new and delete operator, as is done on apple-mac
and other platforms. Unfortunately, we cannot use that approach either
because the Chromium WebKit API is not memory tight.
Fortunately, WebKit has a mechanism for selectively enabling TCMalloc
for a selection of objects by overriding the new and delete operators
on those objects. This patch opts chromium-mac into that scheme by
setting the appropriate preprocessor macros.
* WTF.gyp/WTF.gyp:
* wtf/Platform.h:
2012-11-21 Filip Pizlo <fpizlo@apple.com>
Any function that can log things should be able to easily log them to a memory buffer as well
https://bugs.webkit.org/show_bug.cgi?id=103000
Reviewed by Sam Weinig.
We have a number of places where we pass around a FILE* as a target to which to print
some logging information. But the purpose of passing FILE* instead of always assuming
that we should dump to stderr is that it may be sometimes useful to send the logging
information elsewhere. Unfortunately, FILE* isn't quite powerful enough: it's combersome
to use it to send logging to a string, for example.
We could get around this by using <iostream> and <sstream>, but so far this aspect of
C++ has not been part of the WebKit coding conventions. Personally I find <iostream>
awkward due to its abuse of operator overloading.
So this patch introduces the PrintStream abstract class, which offers printf-like
functionality while completely abstracting the destination and mechanism of the printing
output. It would be trivial to implement a StringPrintStream, for example. This will feed
into work on https://bugs.webkit.org/show_bug.cgi?id=102999.
This also sets us up for creating templatized print() and println() methods that will
allow us to say things like out.print("count = ", count, "\n"), but that is the topic
of https://bugs.webkit.org/show_bug.cgi?id=103009.
This patch also changes dataLog() to use FilePrintStream internally, and WTF::dataFile()
now returns a FilePrintStream&. Any previous users of WTF::dataFile() have been changed
to expect a PrintStream&.
* GNUmakefile.list.am:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/DataLog.cpp:
(WTF):
(WTF::initializeLogFileOnce):
(WTF::initializeLogFile):
(WTF::dataFile):
(WTF::dataLogV):
(WTF::dataLogString):
* wtf/DataLog.h:
(WTF):
* wtf/FilePrintStream.cpp: Added.
(WTF):
(WTF::FilePrintStream::FilePrintStream):
(WTF::FilePrintStream::~FilePrintStream):
(WTF::FilePrintStream::vprintf):
(WTF::FilePrintStream::flush):
* wtf/FilePrintStream.h: Added.
(WTF):
(FilePrintStream):
(WTF::FilePrintStream::file):
* wtf/PrintStream.cpp: Added.
(WTF):
(WTF::PrintStream::PrintStream):
(WTF::PrintStream::~PrintStream):
(WTF::PrintStream::printf):
(WTF::PrintStream::print):
(WTF::PrintStream::println):
(WTF::PrintStream::flush):
(WTF::print):
* wtf/PrintStream.h: Added.
(WTF):
(PrintStream):
(WTF::print):
(WTF::println):
2012-11-23 Robert Kroeger <rjkroege@chromium.org>
Remove unused ScrollByPixelVelocity
https://bugs.webkit.org/show_bug.cgi?id=102840
Reviewed by Sam Weinig.
The GESTURE_ANIMATION feature turns on code in WebCore is unused.
Remove it.
No new tests: code removal/cleanup.
* wtf/Platform.h:
2012-11-23 Laszlo Gombos <l.gombos@samsung.com>
[EFL] Define WTF_PLATFORM_EFL in Platform.h
https://bugs.webkit.org/show_bug.cgi?id=101482
Reviewed by Kenneth Rohde Christiansen.
Define WTF_PLATFORM_EFL in Platform.h to be consistent with
other ports.
* wtf/Platform.h:
2012-11-16 Yury Semikhatsky <yurys@chromium.org>
Memory instrumentation: extract MemoryObjectInfo declaration into a separate file
https://bugs.webkit.org/show_bug.cgi?id=102510
Reviewed by Pavel Feldman.
Moved MemoryObjectInfo into separate header. Moved definition of MemoryInstrumentation
methods that depend on MemoryObjectInfo declaration into MemoryInstrumentation.cpp to
make MemoryInstrumentation require only forward declaration of MemoryObjectInfo.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* wtf/CMakeLists.txt:
* wtf/MemoryInstrumentation.cpp: Added.
(WTF):
(WTF::MemoryInstrumentation::MemoryInstrumentation):
(WTF::MemoryInstrumentation::~MemoryInstrumentation):
(WTF::MemoryInstrumentation::getObjectType): this method allows to get object type without
pulling in MemoryObjectInfo.h and all its dependencies.
(WTF::MemoryInstrumentation::callReportObjectInfo):
(WTF::MemoryInstrumentation::InstrumentedPointerBase::InstrumentedPointerBase):
(WTF::MemoryInstrumentation::InstrumentedPointerBase::process):
(WTF::MemoryClassInfo::init):
(WTF::MemoryClassInfo::addRawBuffer):
(WTF::MemoryClassInfo::addPrivateBuffer):
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentation):
(WTF::MemoryInstrumentation::addRootObject):
(InstrumentedPointerBase):
(WTF::MemoryInstrumentation::reportObjectMemoryUsage):
(InstrumentedPointer):
(WTF::MemoryInstrumentation::addObject): we now pass owner's MemoryObjectInfo in all places
where we report objects pointed by the owner.
(WTF::MemoryInstrumentation::OwningTraits::addObject):
(WTF::MemoryClassInfo::MemoryClassInfo):
(WTF::MemoryClassInfo::addMember):
(MemoryClassInfo):
(WTF::MemoryInstrumentation::addObjectImpl):
(WTF::::InstrumentedPointer):
(WTF::::callReportMemoryUsage):
* wtf/MemoryObjectInfo.h: Added.
(WTF):
(MemoryObjectInfo):
(WTF::MemoryObjectInfo::MemoryObjectInfo):
(WTF::MemoryObjectInfo::objectType):
(WTF::MemoryObjectInfo::objectSize):
(WTF::MemoryObjectInfo::reportedPointer):
(WTF::MemoryObjectInfo::memoryInstrumentation):
(WTF::MemoryObjectInfo::reportObjectInfo):
2012-11-23 Krzysztof Czech <k.czech@samsung.com>
[EFL] Platform support for Accessibility feature.
https://bugs.webkit.org/show_bug.cgi?id=100848
Reviewed by Gyuyoung Kim.
Enable HAVE(ACCESSIBILITY) ifdefs so that EFL port can use it.
* wtf/Platform.h:
2012-11-22 Michael Saboff <msaboff@apple.com>
HTML integer parsing functions don't natively handle 8 bit strings
https://bugs.webkit.org/show_bug.cgi?id=102997
Reviewed by Filip Pizlo.
Added exports to the LChar* versions of charactersToIntStrict() and charactersToUIntStrict()
to support the changes made to parseHTMLInteger() and parseHTMLNonNegativeInteger().
* wtf/text/WTFString.h:
(WTF::charactersToIntStrict): Added export
(WTF::charactersToUIntStrict): Added export
2012-11-21 Filip Pizlo <fpizlo@apple.com>
Rename dataLog() and dataLogV() to dataLogF() and dataLogFV()
https://bugs.webkit.org/show_bug.cgi?id=103001
Rubber stamped by Dan Bernstein.
* wtf/DataLog.cpp:
(WTF::dataLogFV):
(WTF::dataLogF):
(WTF::dataLogFString):
* wtf/DataLog.h:
(WTF):
* wtf/HashTable.cpp:
(WTF::HashTableStats::dumpStats):
* wtf/HashTable.h:
(WTF::HashTable::Stats::dumpStats):
* wtf/MetaAllocator.cpp:
(WTF::MetaAllocator::dumpProfile):
* wtf/StackStats.cpp:
(WTF::StackStats::initialize):
(WTF::StackStats::PerThreadStats::PerThreadStats):
(WTF::StackStats::CheckPoint::CheckPoint):
(WTF::StackStats::CheckPoint::~CheckPoint):
(WTF::StackStats::probe):
(WTF::StackStats::LayoutCheckPoint::LayoutCheckPoint):
* wtf/text/WTFString.cpp:
(String::show):
2012-11-21 Anthony G. Basile <blueness@gentoo.org>
Source/WTF/wtf/Assertions.cpp: fix build on a uClibc system
https://bugs.webkit.org/show_bug.cgi?id=102946
Reviewed by Tony Chang.
Webkit-Gtk fails to build on a uClibc system because
Assertions.cpp assumes that all Linux systems have execinfo.h
and provide backtrace(). This is not necessarily the case for
uClibc which can be configured without these. This patch
refines the check for OS(LINUX) to prevent this breakage.
Originally reported at https://bugs.gentoo.org/441674
* wtf/Assertions.cpp:
2012-11-19 Filip Pizlo <fpizlo@apple.com>
DFG should be able to cache closure calls
https://bugs.webkit.org/show_bug.cgi?id=102662
Reviewed by Gavin Barraclough.
Added support to the meta allocator for easily querying whether an address falls within
a certain allocated chunk. Also added a useful debug routine to SentinelLinkedList,
which can be used to check if a node is on a particular list.
* wtf/MetaAllocatorHandle.h:
(MetaAllocatorHandle):
(WTF::MetaAllocatorHandle::containsIntegerAddress):
(WTF::MetaAllocatorHandle::contains):
* wtf/SentinelLinkedList.h:
(SentinelLinkedList):
(WTF::::isOnList):
(WTF):
2012-11-19 Laszlo Gombos <l.gombos@samsung.com>
Remove ReadWriteLock
https://bugs.webkit.org/show_bug.cgi?id=101637
Reviewed by Darin Adler.
Remove ReadWriteLock as it does not seems to be used.
* wtf/Platform.h: Remove the definition of HAVE_PTHREAD_RWLOCK.
* wtf/ThreadingPrimitives.h: Remove the PlatformReadWriteLock type
and the ReadWriteLock class.
* wtf/ThreadingPthreads.cpp: Remove the implementation of
the ReadWriteLock class using pthreads.
2012-11-19 Brady Eidson <beidson@apple.com>
Add 64-bit specializations for atomicIncrement and atomicDecrement
https://bugs.webkit.org/show_bug.cgi?id=102702
Reviewed by Eric Carlson.
* wtf/Atomics.h:
(WTF::atomicIncrement): Add A 64-bit version for Darwin.
(WTF::atomicDecrement): Ditto.
2012-11-18 Laszlo Gombos <l.gombos@samsung.com>
Remove non-existent directories from the make system
https://bugs.webkit.org/show_bug.cgi?id=102632
Reviewed by Adam Barth.
Remove (non-existent) symbian references from the exclude list in gyp project files.
* WTF.gyp/WTF.gyp:
2012-11-16 Michael Saboff <msaboff@apple.com>
String::fromUTF8() should take advantage of the ASCII check in convertUTF8ToUTF16()
https://bugs.webkit.org/show_bug.cgi?id=100577
Reviewed by Oliver Hunt.
Passed in ASCII flag to convertUTF8ToUTF16() and if try, create an 8 bit string from the original arguments.
Relanding after fix to https://bugs.webkit.org/show_bug.cgi?id=102482.
* wtf/text/WTFString.cpp:
(WTF::String::fromUTF8):
2012-11-15 Yury Semikhatsky <yurys@chromium.org>
Memory instrumentation: add code for reporting stack traces of unknown instrumented objects
https://bugs.webkit.org/show_bug.cgi?id=102384
Reviewed by Pavel Feldman.
Added an option to collect stack traces for instrumented pointers so that they
can be printed in case the check failed for the pointer. This code is hidden
behind a define.
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentationClient):
(WTF::MemoryInstrumentation::checkCountedObject): the method now returns false
in case the check has failed.
(InstrumentedPointer):
(WTF::::InstrumentedPointer):
(WTF):
(WTF::::process):
2012-11-15 Mark Hahnenberg <mhahnenberg@apple.com>
Windows Fibers can corrupt the cached StackBounds
https://bugs.webkit.org/show_bug.cgi?id=102411
Reviewed by Geoffrey Garen.
Windows has support for something called fibers, which are like lightweight versions of
threads. Multiple fibers can run within the context of a single thread and they have access
to the same thread local storage but have different stacks. If we create a new JSGlobalContext
on one fiber, then switch to another fiber and create a JSGlobalContext there, we will call
initializeThreading() once for each new JSGlobalContext created. However, since these fibers
are technically running inside the same thread, they will clobber each other's wtfThreadData(),
which is stored using thread local storage. This can lead to corruption of the WTFThreadData
structure for the fibers other than the last one to create a new JSGlobalContext, including
the StackBounds data structure which is used during conservative scanning, among other things.
This can lead to crashes during garbage collection on Windows if fibers are used.
A quick fix would be to always get a fresh StackBounds data structure when asking for it
instead of using the cached version from the thread local storage. There is a larger problem
in that these fibers can corrupt other WebKit data that uses thread local storage. We'll leave
those theoretical fixes for future theoretical bugs.
* wtf/WTFThreadData.h:
(WTF::WTFThreadData::stack): We now refresh the m_stackBounds field whenever somebody asks for
the StackBounds.
2012-11-15 Maciej Stachowiak <mjs@apple.com>
Fix an erroneous comment about the operators required by binarySearch
https://bugs.webkit.org/show_bug.cgi?id=102406
Reviewed by Anders Carlsson.
* wtf/StdLibExtras.h: binarySearch needs '==' and '<', not '--', '<' and '>'.
2012-11-14 Michael Saboff <msaboff@apple.com>
String::append() should handle two 8 bit strings without converting both to 16 bits
https://bugs.webkit.org/show_bug.cgi?id=102286
Reviewed by Oliver Hunt.
If both strings are 8 bit, then allocate and copy to a new 8 bit string. Since most strings are
8 bit, this will save up to 3x the resulting string length in bytes. 2x is due to the possible
surviving 16 bit source string upconversion and 1x for the 16 bit result now being 8 bit.
* wtf/text/WTFString.cpp:
(WTF::String::append):
2012-11-14 Csaba Osztrogonác <ossy@webkit.org>
[Qt][ARM] Enable the DFG JIT on ARMv7(Thumb2)
https://bugs.webkit.org/show_bug.cgi?id=101747
Reviewed by Simon Hausmann.
* wtf/Platform.h:
2012-11-13 Christophe Dumez <christophe.dumez@intel.com>
Use prefix form of increment / decrement operators in WTF String classes when possible
https://bugs.webkit.org/show_bug.cgi?id=101859
Reviewed by Benjamin Poulain.
Use prefix form of increment / decrement operators whenever possible in
WTF String classes as this seems to be the convention in WebKit.
* wtf/text/ASCIIFastPath.h:
(WTF::copyLCharsFromUCharSource):
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::add):
* wtf/text/Base64.cpp:
(WTF::base64Encode):
(WTF::base64DecodeInternal):
* wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::allocateBufferUpConvert):
* wtf/text/StringConcatenate.h:
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::getData16SlowCase):
(WTF::StringImpl::upconvertCharacters):
(WTF::StringImpl::containsOnlyWhitespace):
(WTF::StringImpl::lower):
(WTF::StringImpl::upper):
(WTF::StringImpl::foldCase):
(WTF::StringImpl::stripMatchedCharacters):
(WTF::StringImpl::removeCharacters):
(WTF::StringImpl::simplifyMatchedCharactersToSpace):
(WTF::reverseFindInner):
(WTF::reverseFindIgnoringCaseInner):
(WTF::StringImpl::replace):
(WTF::StringImpl::createWithTerminatingNullCharacter):
* wtf/text/StringImpl.h:
(WTF::codePointCompare):
* wtf/text/WTFString.cpp:
(WTF::String::String):
(WTF::toIntegralType):
2012-11-13 Ryosuke Niwa <rniwa@webkit.org>
Build fix after r134490.
* wtf/FastMalloc.cpp:
2012-11-13 Brent Fulgham <bfulgham@webkit.org> and Alex Christensen <alex.christensen@flexsim.com>
Fix FastMalloc.cpp compile error for MSVC in 64-bit.
https://bugs.webkit.org/show_bug.cgi?id=88344
Reviewed by Ryosuke Niwa.
MSVC will not compile array declarations of zero size. The existing
padding math for TCMalloc_Central_FreeListPadded would evaluate
to zero on 64-bit machines, preventing the compile from finishing.
* wtf/FastMalloc.cpp:
(TCMalloc_Central_FreeListPadded_Template): Add new template (and
zero-size specialization) to provide proper behavior under 64-bit
Windows build.
2012-11-13 Brent Fulgham <bfulgham@webkit.org> and Alex Christensen <alex.christensen@flexsim.com>
FastMalloc.cpp needs to be reordered before padding bug can be fixed
https://bugs.webkit.org/show_bug.cgi?id=89366
Note: This file violates Style rules. This change only moves
the TCMalloc_Central_FreeList class declaration and the various
FastMallocZone methods earlier in the file.
Reviewed by Ryosuke Niwa.
* wtf/FastMalloc.cpp:
Reordered definitions to prepare for adding specialized template
(WTF):
(TCMalloc_Central_FreeList):
(WTF::TCMalloc_Central_FreeList::length):
(WTF::TCMalloc_Central_FreeList::tc_length):
(WTF::TCMalloc_Central_FreeList::enumerateFreeObjects):
(TCMalloc_Central_FreeListPadded):
(FastMallocZone):
(WTF::FastMallocZone::goodSize):
(WTF::FastMallocZone::check):
(WTF::FastMallocZone::print):
(WTF::FastMallocZone::log):
(WTF::FastMallocZone::forceLock):
(WTF::FastMallocZone::forceUnlock):
(WTF::FastMallocZone::statistics):
(WTF::FastMallocZone::zoneValloc):
(WTF::FastMallocZone::zoneDestroy):
(WTF::KernelSupportsTLS):
(WTF::CheckIfKernelSupportsTLS):
(TCMalloc_ThreadCache):
2012-11-11 Kenichi Ishibashi <bashi@chromium.org>
WTFString::utf8() should have a mode of conversion to use replacement character
https://bugs.webkit.org/show_bug.cgi?id=101678
Reviewed by Alexander Pavlov.
Introduce conversion mode to String::utf8().
There are three conversion modes; lenient mode, strict mode, and
"replacing unpaired surrogates with the replacement character" (replacement) mode.
Lenient mode converts unpaired surrogates. Strict mode fails when there is an unpaired
surrogates and returns CString(). Replacement mode replaces unpaired surrogates with
the replacement character(U+FFFD). Replacement mode implements the algorithm defined at
http://dev.w3.org/2006/webapi/WebIDL/#dfn-obtain-unicode. WebSocket::send() requires
this algorithm to encode a string to utf-8.
* wtf/text/WTFString.cpp:
(WTF::String::utf8): Changed to take ConversionMode as the argument.
* wtf/text/WTFString.h:
(String):
2012-11-09 Alexei Filippov <alph@chromium.org>
Web Inspector: Fix heap snapshots counted several times by NMI
https://bugs.webkit.org/show_bug.cgi?id=101085
The fix moves snapshots size counting to V8PerIsolateData class. As long
as it has one instance per isolate its reportMemoryUsage should be
called once per isolate.
Reviewed by Yury Semikhatsky.
* wtf/MemoryInstrumentation.h:
(WTF::MemoryClassInfo::addPrivateBuffer):
2012-11-08 Michael Saboff <msaboff@apple.com>
HashAndUTF8CharactersTranslator should create an 8 bit string if possible
https://bugs.webkit.org/show_bug.cgi?id=101515
Reviewed by Darin Adler.
Added isAllASCII flag that's passed to convertUTF8ToUTF16(). If on return it is true, create an
8 bit string, otherwise use the 16 bit string.
* wtf/text/AtomicString.cpp:
(WTF::HashAndUTF8CharactersTranslator::translate):
2012-11-08 Simon Hausmann <simon.hausmann@digia.com>
[Qt] Fix build with MSVC 2012 and Angle
https://bugs.webkit.org/show_bug.cgi?id=101588
Reviewed by Tor Arne Vestbø.
Angle includes STL's <memory> header file, which with MSVC 2012 includes stdint.h. MSVC 2012
does ship stdint.h, but it's lacking other headers such as inttypes.h.
So for the rest of WebKit we have to continue to use our own versions of these files from
JavaScriptCore/os-win32. But for Angle we are just including a shipped STL header file (memory)
and so it's up to the compiler to make that work, i.e. using the stdint.h it ships.
This patch moves the addition of JavaScriptCore/os-win32 out of default_post.prf, so that it
doesn't apply to each and every target anymore. In particular it won't apply to Angle anymore,
because its presence causes a build issue where due to the addition of os-win32/ we end up
including our own stdint.h but are lacking WTF/ to be in the include search path (which our own
stdint.h requires). So out of default_post.prf and into WTF.pri, our own wrappers are now only
used where WTF is also needed, and since os-win32/stdint.h depends on wtf/Platform.h, it seems
like a logical location.
* WTF.pri:
2012-11-07 Hans Wennborg <hans@chromium.org>
Fix asm operand type for weakCompareAndSwap on ARM_THUMB2
https://bugs.webkit.org/show_bug.cgi?id=101238
Reviewed by Benjamin Poulain.
'result' was a bool, but the asm was expecting a 32-bit register. A
recent version of Clang warned about this:
WebKit/Source/WTF/wtf/Atomics.h:163:34: error: the size being stored
is truncated, use a modifier to specify the size [-Werror,-Wasm-operand-widths]
This patch fixes it by making 'result' an unsigned. It does not change
the functionality in practice ('result' would be in a 32-bit register
anyway), but it makes the code more correct and makes the warning go
away.
Also make 'result' for the X86 version an 'unsigned char' to make it
more clear that it is a byte.
* wtf/Atomics.h:
(WTF::weakCompareAndSwap):
2012-11-07 Remy Demarest <rdemarest@apple.com>
Function adoptNS and adoptCF should not generate memory leak diagnostic with Clang Static Analyzer.
https://bugs.webkit.org/show_bug.cgi?id=101420
Reviewed by Benjamin Poulain.
Add attributes to the adoptNS and adoptCF function arguments to remove Clang Static Analyzer diagnotics.
Define CF_RELEASES_ARGUMENT and NS_RELEASES_ARGUMENT if not available, use them in function declarations.
* wtf/RetainPtr.h:
(WTF::adoptCF): Adds CF_RELEASES_ARGUMENT attribute to the argument.
(WTF::adoptNS): Adds NS_RELEASES_ARGUMENT attribute to the argument.
2012-11-07 Christophe Dumez <christophe.dumez@intel.com>
Add replaceWithLiteral() method to WTF::String
https://bugs.webkit.org/show_bug.cgi?id=101257
Reviewed by Benjamin Poulain.
Add replaceWithLiteral() method to WTF::String that takes
replacement string as a literal to avoid uselessly constructing
a String object.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::replace):
(WTF):
* wtf/text/StringImpl.h:
(WTF::StringImpl::replace):
(StringImpl):
* wtf/text/WTFString.h:
(String):
(WTF::String::replaceWithLiteral):
2012-11-06 Michael Saboff <msaboff@apple.com>
StringBuilder::append(UChar) with an 8 bit quantity shouldn't change the contents to 16 bits
https://bugs.webkit.org/show_bug.cgi?id=101421
Reviewed by Anders Carlsson.
If the string builder contains only 8 bit data, check if the character being appended contains
8 bit data. If so, append it to the 8 bit buffer instead of converting the buffer to 16 bits.
* wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::append):
* wtf/text/StringBuilder.h:
(WTF::StringBuilder::append):
2012-11-06 Benjamin Poulain <benjamin@webkit.org>
Speed up TransformationMatrix::multiply() on modern ARM
https://bugs.webkit.org/show_bug.cgi?id=101084
Reviewed by Gavin Barraclough.
* wtf/Platform.h:
Add CPU(ARM_VFP) for detecting VFP availability.
Add CPU(APPLE_ARMV7S) for the Apple ARMv7S architecture.
2012-11-06 Laszlo Gombos <l.gombos@samsung.com>
Refactor setting TEXTURE_MAPPER_GL
https://bugs.webkit.org/show_bug.cgi?id=99758
Reviewed by Noam Rosenthal.
Make the rule that sets the default for USE(3D_GRAPHICS) port independent.
If not set, set USE(TEXTURE_MAPPER_GL) when USE(TEXTURE_MAPPER) and
USE(3D_GRAPHICS) is enabled.
* wtf/Platform.h:
2012-11-05 Philip Rogers <pdr@google.com>
Unblock SVG external references
https://bugs.webkit.org/show_bug.cgi?id=100635
Reviewed by Adam Barth.
This patch reverts r132849 and r132869 because the potential XSS issue
turned out to not be an issue after all.
Covered by existing tests, many of which are re-whitelisted with this patch.
* wtf/Platform.h:
2012-11-05 Dima Gorbik <dgorbik@apple.com>
Back out controversial changes from Bug 98665.
https://bugs.webkit.org/show_bug.cgi?id=101244
Reviewed by David Kilzer.
Backing out changes from Bug 98665 until further discussions take place on rules for including Platform.h in Assertions.h.
* wtf/Assertions.h:
2012-11-03 Alexey Proskuryakov <ap@apple.com>
Get rid of USE(CFURLSTORAGESESSIONS)
https://bugs.webkit.org/show_bug.cgi?id=101131
Reviewed by Sam Weinig.
* wtf/Platform.h:
2012-11-02 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI instrument NodeRareData::Map. It uses ~250k on nytimes.com
https://bugs.webkit.org/show_bug.cgi?id=101052
Reviewed by Yury Semikhatsky.
I noticed that in many cases cache structures are plain static HashMap, HashSet etc.
MemoryAgent can visit it but instrumentation for these containers report no objectType.
It means that addRootObject method needs to accept objectType property as an argument.
Otherwise I would have had to create a proxy class with proper objectType.
* wtf/MemoryInstrumentation.h:
(WTF::MemoryInstrumentation::addRootObject):
2012-11-01 Kent Tamura <tkent@chromium.org>
Introduce ENABLE_DATE_AND_TIME_INPUT_TYPES, and clarify usage of other related flags
https://bugs.webkit.org/show_bug.cgi?id=101007
Reviewed by Kentaro Hara.
* wtf/Platform.h:
Add ENABLE_DATE_AND_TIME_INPUT_TYPES. It's a union of
ENABLE_INPUT_TYPE_{DATE,DATETIME,DATETIMELOCAL,MONTH,TIME,WEEK}.
2012-11-01 Yury Semikhatsky <yurys@chromium.org>
Memory instrumentation: do not call checkCountedObject with wrong pointers
https://bugs.webkit.org/show_bug.cgi?id=100958
Reviewed by Alexander Pavlov.
Removed calls to checkCountedObject from places where the pointer may contain
an address of a base class which may differ from the actual object pointer. Instead
checkCountedObject is only called right after processing deferred pointer where
we know real address.
* wtf/MemoryInstrumentation.h:
(WTF::MemoryInstrumentation::addObjectImpl):
(WTF::::process):
2012-11-01 Alexey Proskuryakov <ap@apple.com>
Rename HAVE(NETWORK_CFDATA_ARRAY_CALLBACK) to USE(NETWORK_CFDATA_ARRAY_CALLBACK)
Rubber-stamped by Joe Pecoraro.
All CFNetwork based platforms have this now, but not all use it at the moment.
2012-11-01 Alexey Proskuryakov <ap@apple.com>
Fix HAVE(NETWORK_CFDATA_ARRAY_CALLBACK) build
https://bugs.webkit.org/show_bug.cgi?id=100979
Reviewed by Joseph Pecoraro.
* wtf/Platform.h: Added a FIXME about HAVE(NETWORK_CFDATA_ARRAY_CALLBACK).
2012-11-01 Yury Semikhatsky <yurys@chromium.org>
Memory instrumentation: report memory occupied by ResourceRequest instead of its base ResourceRequestBase
https://bugs.webkit.org/show_bug.cgi?id=100497
Reviewed by Alexander Pavlov.
* wtf/MemoryInstrumentation.h:
(WTF::MemoryClassInfo::addPrivateBuffer): do not report memory usage for empty buffer.
2012-10-31 Anders Carlsson <andersca@apple.com>
Fix build.
<rdar://problem/12612207>.
Reviewed by Sam Weinig.
* wtf/CheckedArithmetic.h:
2012-10-31 Benjamin Poulain <bpoulain@apple.com>
Add an optimized version of copyLCharsFromUCharSource for ARM
https://bugs.webkit.org/show_bug.cgi?id=94886
Reviewed by Gavin Barraclough.
Michael Saboff added a SIMD version of copyLCharsFromUCharSource() in r125846.
This patch a similar optimization for ARMv7 by using the interleaved load/store available
in the NEON extension.
The performance gains:
-10000 characters: ~3.5 times faster.
-20 characters (2 vectors): ~55% faster.
-15 characters (1 vector): ~21% faster.
-3 characters (no vector, pure overhead): ~10% slower.
* wtf/text/ASCIIFastPath.h:
(WTF::copyLCharsFromUCharSource):
2012-10-31 Christophe Dumez <christophe.dumez@intel.com>
[EFL][WK2][AC] Use smart pointers for Evas_GL types
https://bugs.webkit.org/show_bug.cgi?id=100745
Reviewed by Kenneth Rohde Christiansen.
Make OwnPtr usable with Evas_GL type to avoid handling
raw pointers in EFL port.
* wtf/OwnPtrCommon.h:
(WTF):
* wtf/efl/OwnPtrEfl.cpp:
(WTF):
(WTF::deleteOwnedPtr):
2012-10-29 Anders Carlsson <andersca@apple.com>
Build WebKit as C++11 on Mac
https://bugs.webkit.org/show_bug.cgi?id=100720
Reviewed by Daniel Bates.
* Configurations/Base.xcconfig:
Add CLANG_CXX_LANGUAGE_STANDARD=gnu++0x.
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::add):
Change the type of length to be unsigned to prevent implicit type conversions in non-constant initializer lists.
* wtf/unicode/UTF8.cpp:
(Unicode):
Add static_casts to prevent implicit type conversions in non-constant initializer lists.
2012-10-29 Anders Carlsson <andersca@apple.com>
String::createCFString should return a RetainPtr
https://bugs.webkit.org/show_bug.cgi?id=100419
Reviewed by Andreas Kling.
Make String::createCFString and StringImpl::createCFString return RetainPtrs.
* wtf/text/AtomicString.h:
* wtf/text/StringImpl.h:
* wtf/text/WTFString.h:
2012-10-30 Mark Rowe <mrowe@apple.com>
Fix WTF to not install a few header files in bogus locations.
* WTF.xcodeproj/project.pbxproj:
2012-10-28 Mark Rowe <mrowe@apple.com>
Simplify Xcode configuration settings that used to vary between OS versions.
Reviewed by Dan Bernstein.
* Configurations/Base.xcconfig:
* Configurations/DebugRelease.xcconfig:
2012-10-28 Mark Rowe <mrowe@apple.com>
Remove references to unsupported OS and Xcode versions.
Reviewed by Anders Carlsson.
* Configurations/Base.xcconfig:
* Configurations/CompilerVersion.xcconfig: Removed.
* Configurations/DebugRelease.xcconfig:
* WTF.xcodeproj/project.pbxproj:
2012-10-29 Anders Carlsson <andersca@apple.com>
AtomicString(CFStringRef) shouldn't unconditionally create a StringImpl
https://bugs.webkit.org/show_bug.cgi?id=100701
Reviewed by Dan Bernstein.
* wtf/text/AtomicString.h:
(WTF::AtomicString::AtomicString):
Change the constructors that take a CFStringRef and an NSString * to call AtomicString::add(CFStringRef)
and remove AtomicString::createCFString.
(WTF::AtomicString::add):
Add new member function declaration. The definition is in a new file in WebCore, AtomicStringCF.cpp.
Also, fix the overload of add that takes a const char* to call the right other overload instead of itself.
2012-10-29 Adam Barth <abarth@webkit.org>
Unreviewed. Correct my previous patch to disable external SVG
references only on PLATFORM(CHROMIUM).
* wtf/Platform.h:
2012-10-29 Adam Barth <abarth@webkit.org>
Block SVG external references pending a security review
https://bugs.webkit.org/show_bug.cgi?id=100635
Reviewed by Eric Seidel.
We need to do a security review of loading external SVG references
before we're sure that it is safe.
* wtf/Platform.h:
2012-10-29 Michael Saboff <msaboff@apple.com>
String::split(UChar, Vector<String>&) shouldn't create a temporary String
https://bugs.webkit.org/show_bug.cgi?id=100578
Reviewed by Anders Carlsson.
Changed split(UChar, Vector<String>&) to call split(UChar, bool, Vector<String>&) instead of creating a
string and calling the split(String,...) version and moved it to WTFString.h. Also moved
split(const String& separator, Vector<String>& result) to WTFString.h.
* wtf/text/WTFString.cpp:
(WTF::String::split):
* wtf/text/WTFString.h:
(WTF::String::split):
2012-10-29 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r132736.
http://trac.webkit.org/changeset/132736
https://bugs.webkit.org/show_bug.cgi?id=100652
It broke all plugin related tests on GTK and on Qt (Requested
by Ossy on #webkit).
* wtf/text/WTFString.cpp:
(WTF::String::fromUTF8):
2012-10-27 Michael Saboff <msaboff@apple.com>
Try to create AtomicString as 8 bit where possible
https://bugs.webkit.org/show_bug.cgi?id=100575
Reviewed by Oliver Hunt.
Added StringImpl::create8BitIfPossible() that first tries to create an 8 bit string. If it finds a 16 bit character
during processing, it calls the standard create() method. The assumption is that this will be used on mostly 8 bit
strings and ones that are shorter (in the tens of characters). Changed AtomicString to use the new creation method
for UChar based construction.
* wtf/text/AtomicString.cpp:
(WTF::UCharBufferTranslator::translate):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::create8BitIfPossible):
* wtf/text/StringImpl.h:
(WTF::StringImpl::create8BitIfPossible):
2012-10-27 Michael Saboff <msaboff@apple.com>
String::fromUTF8() should take advantage of the ASCII check in convertUTF8ToUTF16()
https://bugs.webkit.org/show_bug.cgi?id=100577
Reviewed by Oliver Hunt.
Passed is ASCII flag to convertUTF8ToUTF16() and if try, create an 8 bit string from the original arguments.
* wtf/text/WTFString.cpp:
(WTF::String::fromUTF8):
2012-10-27 Dan Bernstein <mitz@apple.com>
REAL_PLATFORM_NAME build setting is no longer needed
https://bugs.webkit.org/show_bug.cgi?id=100587
Reviewed by Mark Rowe.
Removed the definition of REAL_PLATFORM_NAME and replaced references to it with references
to PLATFORM_NAME.
* Configurations/Base.xcconfig:
* Configurations/CompilerVersion.xcconfig:
* Configurations/DebugRelease.xcconfig:
2012-10-26 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r132689.
http://trac.webkit.org/changeset/132689
https://bugs.webkit.org/show_bug.cgi?id=100574
Broke HashMaps containing RetainPtrs (Requested by andersca on
#webkit).
* wtf/RetainPtr.h:
2012-10-26 Anders Carlsson <andersca@apple.com>
Add an operator& to RetainPtr
https://bugs.webkit.org/show_bug.cgi?id=100549
Reviewed by Dan Bernstein.
This is useful for APIs that return references using out parameters.
* wtf/RetainPtr.h:
(WTF::RetainPtr::operator&):
2012-10-26 Gabor Ballabas <gaborb@inf.u-szeged.hu>
[Qt] Enable JSC's disassembler on x86, x86_64 Linux
https://bugs.webkit.org/show_bug.cgi?id=100386
Reviewed by Simon Hausmann.
It works fine on Linux x86, x86_64 just needs to be enabled in the
QtWebKit build system.
* wtf/Platform.h:
2012-10-25 Michael Saboff <msaboff@apple.com>
REGRESSION (r131836): failures in list styles tests on EFL, GTK
https://bugs.webkit.org/show_bug.cgi?id=99824
Reviewed by Oliver Hunt.
Fixed ASCII check.
Added placeholder argument for new argument added to convertUTF8ToUTF16() in http://trac.webkit.org/changeset/131836.
* wtf/unicode/UTF8.cpp:
(WTF::Unicode::convertUTF8ToUTF16):
* wtf/unicode/glib/UnicodeGLib.cpp:
(WTF::Unicode::convertCase):
2012-10-25 Christophe Dumez <christophe.dumez@intel.com>
[EFL][WK2] Remove some C'ism from EwkView
https://bugs.webkit.org/show_bug.cgi?id=100370
Reviewed by Kenneth Rohde Christiansen.
Make OwnPtr useable for Ecore_IMF_Context to avoid
using raw pointers in EFL port.
* wtf/OwnPtrCommon.h:
(WTF):
* wtf/PlatformEfl.cmake:
* wtf/efl/OwnPtrEfl.cpp:
(WTF::deleteOwnedPtr):
(WTF):
2012-09-27 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: provide memory instrumentation for ListHashSet
https://bugs.webkit.org/show_bug.cgi?id=97786
Reviewed by Vsevolod Vlasov.
Added memory instrumentation for ListHashSet.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/HashSet.h:
(WTF):
* wtf/ListHashSet.h:
(ListHashSet):
(ListHashSetNodeAllocator): changed visibility of inPool method to public
(WTF::ListHashSetNodeAllocator::pool):
(WTF::ListHashSetNodeAllocator::pastPool):
(WTF::::sizeInBytes): added a method that returns size of the set in bytes including
all its internals but not the content elements.
(WTF):
* wtf/MemoryInstrumentation.h: removed onsolete method. All clients were updated to
use generic addMember instead.
(MemoryInstrumentation):
(WTF::MemoryClassInfo::addPrivateBuffer):
* wtf/MemoryInstrumentationHashSet.h:
* wtf/MemoryInstrumentationListHashSet.h: Copied from Source/WTF/wtf/MemoryInstrumentationHashSet.h.
(WTF):
(WTF::reportMemoryUsage):
2012-10-23 Benjamin Poulain <benjamin@webkit.org>
WTFURL: Implement KURL::setPort()
https://bugs.webkit.org/show_bug.cgi?id=99898
Reviewed by Adam Barth.
Add an efficient implementation for remplacing the port component
in an URL. This will be the base for replacing other components
efficiently.
The testing is covered by fast/dom/HTMLAnchorElement/set-href-attribute-port.html
* wtf/url/api/ParsedURL.cpp:
(WTF::generateNewSpecWithPort):
(WTF::replacePortWithString):
(WTF::ParsedURL::replacePort):
* wtf/url/api/ParsedURL.h:
(ParsedURL):
2012-10-22 Michael Saboff <msaboff@apple.com>
Regression(r131655): Crash in StringImpl::findIgnoringCase
https://bugs.webkit.org/show_bug.cgi?id=99753
Reviewed by Geoffrey Garen.
Fixed to use the searchLength to take into account the start index.
Added LayoutTests/fast/js/find-ignoring-case-regress-99753.html
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::findIgnoringCase):
2012-10-22 Simon Hausmann <simon.hausmann@digia.com>
Unreviewed: Re-enable LLINT on Qt/Linux after r131932.
* wtf/Platform.h:
2012-10-22 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: do not double count memory of objects with multiple ancestors
https://bugs.webkit.org/show_bug.cgi?id=99958
Reviewed by Alexander Pavlov.
Make sure memory occupied by objects of classes with multiple inheritance is
not double counted.
* wtf/MemoryInstrumentation.h:
(WTF::MemoryObjectInfo::MemoryObjectInfo):
(WTF::MemoryObjectInfo::reportedPointer):
(WTF::MemoryObjectInfo::reportObjectInfo): 1) Store actual pointer to the instrumented
object as it may differ from the original pointer by which it was reported. 2) Make
the method non-template and calculate object size on the caller side.
(MemoryObjectInfo):
(WTF::MemoryInstrumentation::reportObjectMemoryUsage):
(WTF::MemoryClassInfo::MemoryClassInfo):
(WTF::MemoryInstrumentation::InstrumentedPointer::process): use adjusted pointer
returned by reportMemoryUsage to check if the object has already been visited when
the pointer differs from the orinal one(it may happen if the object was reported
by a pointer to one of its base classes).
2012-10-20 Martin Robinson <mrobinson@igalia.com>
Fix 'make dist' for the GTK+ port
* GNUmakefile.list.am: Add missing files to the source list.
2012-10-19 Mark Lam <mark.lam@apple.com>
Added WTF::StackStats mechanism.
https://bugs.webkit.org/show_bug.cgi?id=99805.
Reviewed by Geoffrey Garen.
Disabled by default. Should have no performance and memory cost when
disabled. To enable, #define ENABLE_STACK_STATS 1 in StackStats.h.
The output is currently hardcoded to be dumped in /tmp/stack-stats.log,
and is in the form of stack sample events. By default, it only logs
a sample event when a new high watermark value is encountered.
Also renamed StackBounds::recursiveCheck() to isSafeToRecurse().
* WTF.xcodeproj/project.pbxproj:
* wtf/StackBounds.h:
(StackBounds):
(WTF::StackBounds::size):
(WTF::StackBounds::isSafeToRecurse):
* wtf/StackStats.cpp: Added.
(WTF):
(WTF::StackStats::initialize):
(WTF::StackStats::PerThreadStats::PerThreadStats):
(WTF::StackStats::CheckPoint::CheckPoint):
(WTF::StackStats::CheckPoint::~CheckPoint):
(WTF::StackStats::probe):
(WTF::StackStats::LayoutCheckPoint::LayoutCheckPoint):
(WTF::StackStats::LayoutCheckPoint::~LayoutCheckPoint):
* wtf/StackStats.h: Added.
(WTF):
(StackStats):
(CheckPoint):
(WTF::StackStats::CheckPoint::CheckPoint):
(PerThreadStats):
(WTF::StackStats::PerThreadStats::PerThreadStats):
(LayoutCheckPoint):
(WTF::StackStats::LayoutCheckPoint::LayoutCheckPoint):
(WTF::StackStats::initialize):
(WTF::StackStats::probe):
* wtf/ThreadingPthreads.cpp:
(WTF::initializeThreading):
* wtf/WTFThreadData.cpp:
(WTF::WTFThreadData::WTFThreadData):
* wtf/WTFThreadData.h:
(WTFThreadData):
(WTF::WTFThreadData::stackStats):
2012-10-19 Anders Carlsson <andersca@apple.com>
Deque can use std::reverse_iterator for its reverse iterators
https://bugs.webkit.org/show_bug.cgi?id=99789
Reviewed by Andreas Kling.
Remove DequeReverseIterator and DequeConstReverseIterator and just use std::reverse_iterator directly.
Also, remove the DequeIteratorBase<T, inlineCapacity> to Base typedef - We can already use DequeIteratorBase since it's
equivalent to the full class template type.
* wtf/Deque.h:
(WTF::Deque::rbegin):
(WTF::Deque::rend):
(DequeIteratorBase):
(WTF::DequeIteratorBase::assign):
(DequeIterator):
(DequeConstIterator):
(WTF::::checkValidity):
(WTF::::DequeIteratorBase):
(WTF::=):
(WTF::::isEqual):
2012-10-19 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed buildfix, use C-style comment instead of C++
* wtf/Platform.h:
2012-10-19 Csaba Osztrogonác <ossy@webkit.org>
REGRESSION(r131822): It made 500+ tests crash on 32 bit platforms
https://bugs.webkit.org/show_bug.cgi?id=99814
Reviewed by Simon Hausmann.
* wtf/Platform.h: Disable LLINT on (PLATFORM(QT) && CPU(X86)) temporarily until proper fix.
2012-10-17 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI provide data for mixing with tcmalloc heap dumps.
https://bugs.webkit.org/show_bug.cgi?id=99457
Reviewed by Yury Semikhatsky.
countObjectSize now accepts ptr as the first argument and saves it into HashMap if the binary was ran with HEAPPROFILE env variable.
getProcessMemoryDistribution does snapshot and calls the downstream code with the map of counted objects.
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentationClient):
(WTF::MemoryInstrumentation::countObjectSize):
(WTF::MemoryInstrumentation::addRawBuffer):
(WTF::MemoryClassInfo::addPrivateBuffer):
(WTF::MemoryInstrumentation::addObjectImpl):
(WTF::MemoryInstrumentation::addListHashSet):
(WTF::::process):
2012-10-18 Michael Saboff <msaboff@apple.com>
convertUTF8ToUTF16() Should Check for ASCII Input
ihttps://bugs.webkit.org/show_bug.cgi?id=99739
Reviewed by Geoffrey Garen.
Added code to accumulate the "or" of all characters seen during the UTF8 to UTF16 conversion. This is
used to check to see if all characters are ASCII and is returned via a bool*.
* wtf/unicode/UTF8.cpp:
(WTF::Unicode::convertUTF8ToUTF16):
* wtf/unicode/UTF8.h:
2012-10-18 Michael Saboff <msaboff@apple.com>
Mac WTF build checks dependencies before copying header files
https://bugs.webkit.org/show_bug.cgi?id=99770
Reviewed by Mark Rowe.
Fixed up build rules per Mark Rowe. Made new target an Aggregate and removed "WTF copy".
* Configurations/CopyWTFHeaders.xcconfig: Added.
* Configurations/WTF.xcconfig:
* WTF.xcodeproj/project.pbxproj:
2012-10-18 Michael Saboff <msaboff@apple.com>
Mac WTF build checks dependencies before copying header files
https://bugs.webkit.org/show_bug.cgi?id=99770
Reviewed by Geoffrey Garen.
Added a new build target "Copy WTF HEaders" to copy the header files and made that new target a dependency
for the main WTF build target. Moved the "Copy WTF Headers" phase from WTF target to the new target.
* WTF.xcodeproj/project.pbxproj:
2012-10-17 Anders Carlsson <andersca@apple.com>
Clean up Vector.h
https://bugs.webkit.org/show_bug.cgi?id=99622
Reviewed by Benjamin Poulain.
Remove unused member functions from Vector and get rid of the std::max and std::min using declarations
(as per the WebKit coding style guidelines).
* WTF.xcodeproj/project.pbxproj:
Turns out StreamBuffer.h was never added to the Xcode project; add it. Also go ahead and sort the project file.
* wtf/Deque.h:
(WTF::::expandCapacity):
* wtf/StreamBuffer.h:
(WTF::StreamBuffer::append):
Add std:: prefixes to max and min.
* wtf/Vector.h:
Remove VectorBase::bufferSlot(), VectorReverseProxy and add std:: prefixes where needed.
2012-10-17 Michael Saboff <msaboff@apple.com>
Creating a String from an NSString should check for all 8 bit strings
https://bugs.webkit.org/show_bug.cgi?id=99392
Reviewed by Geoffrey Garen.
Exported the LChar* version of create().
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::create):
2012-10-17 Michael Saboff <msaboff@apple.com>
StringImpl::findIgnoringCase() and reverseFindIgnoringCase() don't optimally handle a mix of 8 and 16 bit strings
https://bugs.webkit.org/show_bug.cgi?id=99224
Reviewed by Geoffrey Garen.
Added helper templated functions and all four combinations similar to find() and reverseFind().
(WTF::findIgnoringCaseInner):
(WTF::StringImpl::findIgnoringCase):
(WTF::reverseFindIgnoringCaseInner):
(WTF::StringImpl::reverseFindIgnoringCase):
2012-10-17 Michael Saboff <msaboff@apple.com>
AtomicString::HashAndUTF8CharactersTranslator::equal() doesn't optimally handle 8 bit strings
https://bugs.webkit.org/show_bug.cgi?id=99223
Reviewed by Geoffrey Garen.
Added an 8 bit path.
* wtf/text/AtomicString.cpp:
(WTF::HashAndUTF8CharactersTranslator::equal):
2012-10-17 Anders Carlsson <andersca@apple.com>
Always use fastRealloc when growing or shrinking the Vector buffer
https://bugs.webkit.org/show_bug.cgi?id=99616
Reviewed by Andreas Kling.
Remove the pointless #if PLATFORM(BLACKBERRY) and always try to use fastRealloc to grow or shrink the
vector buffer when possible; realloc should always be at least as fast as free+malloc.
* wtf/Vector.h:
(WTF::VectorBufferBase::shouldReallocateBuffer):
2012-10-16 Michael Saboff <msaboff@apple.com>
Change WTF_USE_8BIT_TEXTRUN to ENABLE_8BIT_TEXTRUN
https://bugs.webkit.org/show_bug.cgi?id=99484
Reviewed by Eric Seidel.
Changed macro name to align with it's purpose.
* wtf/Platform.h:
2012-10-16 Michael Saboff <msaboff@apple.com>
StringImpl::reverseFind() with a single match character isn't optimal for mixed 8/16 bit cases
https://bugs.webkit.org/show_bug.cgi?id=99363
Reviewed by Benjamin Poulain.
Factored out the 8/16 bitness check of the match character from the subject character bitness
check. Did this for both find() and reverseFind(). Added all UChar/LChar combinations to the
inline reverseFind().
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::find):
(WTF::StringImpl::reverseFind):
* wtf/text/StringImpl.h:
(WTF::reverseFind):
2012-10-16 Dima Gorbik <dgorbik@apple.com>
Remove Platform.h include from the header files.
https://bugs.webkit.org/show_bug.cgi?id=98665
Reviewed by Eric Seidel.
We don't want other clients that include WebKit headers to know about Platform.h.
* wtf/Assertions.h:
* wtf/MainThread.h:
2012-10-16 Adrienne Walker <enne@google.com>
Remove unused WTF_NEW_HASHMAP_ITERATORS_INTERFACE #define
https://bugs.webkit.org/show_bug.cgi?id=99367
Reviewed by James Robinson.
Does what it says on the tin.
* wtf/HashTraits.h:
2012-10-15 Andreas Kling <kling@webkit.org>
Remove WTF::fastDeleteAllValues().
<http://webkit.org/b/99345>
Reviewed by Eric Seidel.
It was only used to fastDelete() a class that was already overriding operator delete
by way of WTF_MAKE_FAST_ALLOCATED anyway.
* wtf/HashSet.h:
(WTF):
(HashSet):
2012-10-15 Mark Hahnenberg <mhahnenberg@apple.com>
Parallel GC should not be disabled for all platforms
* wtf/Platform.h: D'oh!
2012-10-15 George Staikos <staikos@webkit.org>
[BlackBerry] Adapt to Platform API changes in string handling
https://bugs.webkit.org/show_bug.cgi?id=99248
Reviewed by Yong Li.
Convert usage of WebString, char* and std::string to BlackBerry::Platform::String.
* wtf/Assertions.cpp: Use proper log function.
* wtf/text/AtomicString.h: Add BlackBerry support
(AtomicString):
(WTF::AtomicString::AtomicString): Add BlackBerry Support
(WTF::AtomicString::operator BlackBerry::Platform::String):
* wtf/text/StringImpl.h: Conversion support.
* wtf/text/WTFString.h: Conversion support.
(Platform):
(String):
2012-10-15 Michael Saboff <msaboff@apple.com>
Update RenderText to use String instead of UChar* for text
https://bugs.webkit.org/show_bug.cgi?id=96979
Reviewed by Dan Bernstein.
Added WTF_USE_8BIT_TEXTRUN to encase code that creates 8 bit TextRun's. Enabled WTF_USE_8BIT_TEXTRUN
for PLATFORM(MAC). Other platform can update this setting in Platform.h when their platform specific use of
TextRun handle 8 bit data. Added a new Vector::appendVector to allow appending the contents of a vector
containing one type to the end of vector containing another. This is used to append a Vector<LChar> to
the end of a Vector<UChar>.
* wtf/Platform.h:
* wtf/Vector.h:
(Vector):
(WTF::Vector::appendVector):
2012-10-15 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: convert manual size calculation of different WebKit things into MemoryInstrumentation.
https://bugs.webkit.org/show_bug.cgi?id=99309
Reviewed by Yury Semikhatsky.
JSHeap, DOMStorage and HeapProfiler data were counted manually.
Now we count the sizes more generic way.
* wtf/MemoryInstrumentation.h: calculateContainerSize were removed.
* wtf/MemoryInstrumentationSequence.h: empty instrumentations were added for 'const char*' and 'const void*' sequences.
2012-10-12 Anders Carlsson <andersca@apple.com>
Move QDataStream functions into HistoryItemQt.cpp
https://bugs.webkit.org/show_bug.cgi?id=99203
Reviewed by Andreas Kling.
It seems like the QDataStream stream operators are only used from HistoryItemQt.cpp
inside WebCore, so move them there. If in the future they are required elsewhere, they should
be moved into a separate header instead of polluting headers unnecessarily.
* wtf/Vector.h:
* wtf/qt/StringQt.cpp:
* wtf/text/WTFString.h:
2012-10-12 Michael Saboff <msaboff@apple.com>
StringBuilder::append(StringBuilder&) doesn't take into account the bit size of the argument string
https://bugs.webkit.org/show_bug.cgi?id=99225
Reviewed by Benjamin Poulain.
Added 8 bit path.
* wtf/text/StringBuilder.h:
(WTF::StringBuilder::append):
2012-10-12 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r131224.
http://trac.webkit.org/changeset/131224
https://bugs.webkit.org/show_bug.cgi?id=99210
It broke the build (Requested by andersca on #webkit).
* wtf/Vector.h:
(WTF):
(WTF::operator<<):
(WTF::operator>>):
* wtf/qt/StringQt.cpp:
(WTF::operator<<):
(WTF):
(WTF::operator>>):
* wtf/text/WTFString.h:
(WTF):
2012-10-12 Anders Carlsson <andersca@apple.com>
Move QDataStream functions into HistoryItemQt.cpp
https://bugs.webkit.org/show_bug.cgi?id=99203
Reviewed by Andreas Kling.
It seems like the QDataStream stream operators are only used from HistoryItemQt.cpp
inside WebCore, so move them there. If in the future they are required elsewhere, they should
be moved into a separate header instead of polluting headers unnecessarily.
* wtf/Vector.h:
* wtf/qt/StringQt.cpp:
* wtf/text/WTFString.h:
2012-10-11 Mark Toller <mark.toller@samsung.com>
Removed incorrect pthread_mutex_trylock code in an ASSERT in TCMalloc_PageHeap::signalScavenger. This
branch is used by the Webkit GTK code.
https://bugs.webkit.org/show_bug.cgi?id=97539
Reviewed by Geoffrey Garen.
The code was never compiled in, and was functionally broken. There is no need for locking around the
m_scavengeThreadActive flag, however, we should lock pageheap_lock before calling 'shouldScavenge()', as we
only want to scavenge when really required, so it's better to wait for any current memory operation to
complete before checking.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::signalScavenger):
2012-10-10 Yong Li <yoli@rim.com>
[BlackBerry] Define WTF_USE_EXTRA_MACROS in cmake rather than Platform.h
https://bugs.webkit.org/show_bug.cgi?id=98819
Reviewed by Rob Buis.
And make it depend on SHARED_CORE
RIM PR# 221339.
* wtf/Platform.h:
2012-10-09 Filip Pizlo <fpizlo@apple.com>
JSC should infer when indexed storage is contiguous, and optimize for it
https://bugs.webkit.org/show_bug.cgi?id=97288
Reviewed by Mark Hahnenberg.
Moved out this helpful math utility to MathExtras, since we now use it in
multiple places.
* wtf/MathExtras.h:
(timesThreePlusOneDividedByTwo):
2012-10-08 Benjamin Poulain <benjamin@webkit.org>
Generalize moving URLComponent's begin position
https://bugs.webkit.org/show_bug.cgi?id=98626
Reviewed by Adam Barth.
The patch r130609 introduced moving URLComponents's position.
It turns out this concept is really useful in the parser so
this patch generalize the idea.
* wtf/url/api/ParsedURL.cpp:
(WTF::ParsedURL::removePort):
* wtf/url/src/URLCanonEtc.cpp:
* wtf/url/src/URLComponent.h:
(WTF::URLComponent::moveBy):
Rename URLComponent::move() to URLComponent::moveBy() for consistency
with some of WebCore types.
* wtf/url/src/URLParse.cpp:
* wtf/url/src/URLParseFile.cpp:
* wtf/url/src/URLSegments.cpp:
(WTF::URLSegments::moveFromComponentBy):
Change the semantic to everything from a certain component. This is
useful to move everything, including the scheme.
* wtf/url/src/URLSegments.h:
(URLSegments):
2012-10-08 Andreas Kling <kling@webkit.org>
Lower minimum table size of WTF::HashTable to reduce memory usage.
<http://webkit.org/b/98406>
<rdar://problem/12432140>
Reviewed by Anders Carlsson.
Lower the default minimumTableSize for WTF hash tables from 64 to 8 entries.
This reduces WebProcess memory consumption by ~16MB on Membuster3 (a 6% progression!)
No significant movement on PLT or JSC benchmarks on my machine. If there's a perf regression somewhere
from this, we can tweak individual tables to have a larger minimumTableSize.
* wtf/HashTraits.h:
2012-10-08 Andreas Kling <kling@webkit.org>
Using float/double as WTF hash table key is unreliable.
<http://webkit.org/b/98627>
Reviewed by Geoffrey Garen.
Change FloatHash::equal() to do a bitwise compare instead of a logical compare.
This fixes a problem where the keys with different binary representation but the
same logical value (e.g 0 and -0) could block each other from being found if they
ended up in the same hash bucket.
* wtf/HashFunctions.h:
(FloatHash):
(WTF::FloatHash::hash):
(WTF::FloatHash::equal):
2012-10-08 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r130619.
http://trac.webkit.org/changeset/130619
https://bugs.webkit.org/show_bug.cgi?id=98634
Causes many crashes on the EFL bots. (Requested by rakuco on
#webkit).
* wtf/efl/MainThreadEfl.cpp:
(WTF::pipeObject):
(WTF):
(WTF::monitorDispatchFunctions):
(WTF::initializeMainThreadPlatform):
(WTF::scheduleDispatchFunctionsOnMainThread):
2012-10-08 Byungwoo Lee <bw80.lee@samsung.com>
[EFL] Use ecore_main_loop_thread_safe_call_async() to wakeup main loop.
https://bugs.webkit.org/show_bug.cgi?id=98505
Reviewed by Kenneth Rohde Christiansen.
Instead of ecore_pipe_write(),
use ecore_main_loop_thread_safe_call_async() to wakeup ecore main loop.
According to the EFL API document, this function is designed to dispatch
a function on ecore main loop by avoiding dead lock or race condition.
With this function, webkit doesn't need to maintain ecore pipe also.
* wtf/efl/MainThreadEfl.cpp:
(WTF::monitorDispatchFunctions):
(WTF::initializeMainThreadPlatform):
(WTF::scheduleDispatchFunctionsOnMainThread):
2012-10-07 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Rename first/second to key/value in HashMap iterators
https://bugs.webkit.org/show_bug.cgi?id=82784
Reviewed by Eric Seidel.
Currently HashMap iterators follow the same interface in std::map: given an
iterator it, we use it->first to access the key and it->second to access the
value. This patch changes these accesses to it->key and it->value, improving the
readability at call sites.
One potential downside of this change would be the confusion between std::map and
HashMap interfaces. However, they are already different in other aspects and the
usage of std::map is more an exception than a rule in WebKit code, so we consider
the confusion will be less likely to happen.
* wtf/HashCountedSet.h:
(WTF::::add):
(WTF::::remove):
(WTF::copyToVector):
* wtf/HashIterators.h:
(WTF::HashTableConstKeysIterator::get):
(WTF::HashTableConstValuesIterator::get):
(WTF::HashTableKeysIterator::get):
(WTF::HashTableValuesIterator::get):
* wtf/HashMap.h:
(WTF::KeyValuePairKeyExtractor::extract):
(WTF::HashMapValueTraits::isEmptyValue):
(WTF::HashMapTranslator::translate):
(WTF::HashMapTranslatorAdapter::translate):
(WTF::::set):
(WTF::::get):
(WTF::::take):
(WTF::operator==):
(WTF::deleteAllValues):
(WTF::deleteAllKeys):
Removed deleteAllPairFirsts() and deleteAllPairSeconds() since they are now unused.
* wtf/HashTable.h:
(WTF::hashTableSwap):
(WTF::::checkTableConsistencyExceptSize):
* wtf/HashTraits.h:
(WTF):
(WTF::KeyValuePair::KeyValuePair):
(KeyValuePair):
(WTF::KeyValuePairHashTraits::constructDeletedValue):
(WTF::KeyValuePairHashTraits::isDeletedValue):
* wtf/MetaAllocator.cpp:
(WTF::MetaAllocator::addFreeSpace):
(WTF::MetaAllocator::incrementPageOccupancy):
(WTF::MetaAllocator::decrementPageOccupancy):
* wtf/RefCountedLeakCounter.cpp:
(WTF::RefCountedLeakCounter::~RefCountedLeakCounter):
* wtf/RefPtrHashMap.h:
(WTF::::set):
(WTF::::get):
(WTF::::inlineGet):
(WTF::::take):
* wtf/Spectrum.h:
(WTF::Spectrum::add):
(WTF::Spectrum::get):
(WTF::Spectrum::buildList):
* wtf/ThreadingPthreads.cpp:
(WTF::identifierByPthreadHandle):
2012-10-07 Benjamin Poulain <benjamin@webkit.org>
WTFURL: implement URL port removal for HTMLAnchorElement
https://bugs.webkit.org/show_bug.cgi?id=98604
Reviewed by Adam Barth.
Add hasStandardScheme() (similar to isStandard from Google URL),
hasPort() and removePort() to implement the port removal of KURL.
* wtf/url/api/ParsedURL.cpp:
(WTF::ParsedURL::hasStandardScheme):
(WTF::ParsedURL::hasPort):
(WTF::ParsedURL::removePort):
* wtf/url/api/ParsedURL.h:
(ParsedURL):
* wtf/url/src/URLComponent.h:
(WTF::URLComponent::move):
* wtf/url/src/URLSegments.cpp:
(WTF::URLSegments::moveComponentsAfter):
* wtf/url/src/URLSegments.h:
(URLSegments):
* wtf/url/src/URLUtil.cpp:
(URLUtilities):
(WTF::URLUtilities::isStandard):
* wtf/url/src/URLUtil.h:
(URLUtilities):
Remove LowerCaseEqualsASCII() from the interface, make it an internal template.
(WTF::URLUtilities::isStandard):
Since in WebKit, LChar is a superset of char, expose LChar and cast char* to LChar*.
2012-10-06 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI fix String instrumentation the way it was discussed in WK97964
https://bugs.webkit.org/show_bug.cgi?id=98500
Reviewed by Benjamin Poulain.
Current instrumentation incorrectly covers the case when StringImpl object has been created via StringImpl::createWithTerminatingNullCharacter().
Looks like the only way to detect the strings that has been created from literals is to compare the addresses of buffer and stringImpl + 1.
* wtf/MemoryInstrumentationString.h:
(WTF::reportMemoryUsage):
* wtf/text/StringImpl.h:
(WTF::StringImpl::hasInternalBuffer):
2012-10-06 Benjamin Poulain <benjamin@webkit.org>
Fix build of WTFURL after r130187
https://bugs.webkit.org/show_bug.cgi?id=98588
Reviewed by Kentaro Hara.
* wtf/MemoryInstrumentationParsedURL.h:
(WTF::reportMemoryUsage):
* wtf/url/api/ParsedURL.h:
(WTF::ParsedURL::spec):
2012-10-05 Simon Pena <spena@igalia.com>
[GTK] Add support for GBytes in GRefPtr
https://bugs.webkit.org/show_bug.cgi?id=98489
Reviewed by Carlos Garcia Campos.
Adding support for GBytes in GRefPtr makes it easier
for them to be used when adding GResources support,
and is more consistent with the rest of the port.
This calls g_bytes_ref and g_bytes_unref in the implementation
of the refPtr and derefPtr template functions, in case the GLib
version is met. Otherwise, it does nothing.
* wtf/gobject/GRefPtr.cpp: Implement templates for ref and deref.
(WTF::refGPtr):
(WTF):
(WTF::derefGPtr):
* wtf/gobject/GRefPtr.h:
(WTF):
* wtf/gobject/GTypedefs.h: Define the GBytes datatype.
2012-10-05 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r130478.
http://trac.webkit.org/changeset/130478
https://bugs.webkit.org/show_bug.cgi?id=98494
It broke the Qt build (Requested by Ossy on #webkit).
* wtf/gobject/GRefPtr.cpp:
* wtf/gobject/GRefPtr.h:
(WTF):
* wtf/gobject/GTypedefs.h:
2012-10-05 Simon Pena <spena@igalia.com>
[GTK] Add support for GBytes in GRefPtr
https://bugs.webkit.org/show_bug.cgi?id=98489
Reviewed by Carlos Garcia Campos.
Adding support for GBytes in GRefPtr makes it easier
for them to be used when adding GResources support,
and is more consistent with the rest of the port.
This calls g_bytes_ref and g_bytes_unref in the implementation
of the refPtr and derefPtr template functions.
* wtf/gobject/GRefPtr.cpp: Implement templates for ref and deref.
(WTF::refGPtr):
(WTF):
(WTF::derefGPtr):
* wtf/gobject/GRefPtr.h:
(WTF):
* wtf/gobject/GTypedefs.h: Define the GBytes datatype.
2012-10-04 Dirk Pranke <dpranke@chromium.org>
Unreviewed, rolling out r130419.
http://trac.webkit.org/changeset/130419
https://bugs.webkit.org/show_bug.cgi?id=98406
broke editing/pasteboard/data-transfer-items.html on chromium
* wtf/HashTraits.h:
2012-10-04 Andreas Kling <kling@webkit.org>
Lower minimum table size of WTF::HashTable to reduce memory usage.
<http://webkit.org/b/98406>
<rdar://problem/12432140>
Reviewed by Anders Carlsson.
Lower the default minimumTableSize for WTF hash tables from 64 to 8 entries.
This reduces WebProcess memory consumption by ~16MB on Membuster3 (a 6% progression!)
No significant movement on PLT or JSC benchmarks on my machine. If there's a perf regression somewhere
from this, we can tweak individual tables to have a larger minimumTableSize.
* wtf/HashTraits.h:
2012-10-04 Michael Saboff <msaboff@apple.com>
String::remove will convert an 8 bit string to a 16 bit string
https://bugs.webkit.org/show_bug.cgi?id=98299
Reviewed by Benjamin Poulain.
Added an 8 bit path to remove(). Added a private templated helper removeInternal.
* wtf/text/WTFString.cpp:
(WTF::String::removeInternal):
(WTF::String::remove):
* wtf/text/WTFString.h:
(String):
2012-10-03 Kangil Han <kangil.han@samsung.com>
[Refactoring] Tidy NDEBUG optioning in RefCountedBase.
https://bugs.webkit.org/show_bug.cgi?id=98252
Reviewed by Benjamin Poulain.
Fixed incomplete implementation for NDEBUG option.
Additionally, adopted CHECK_REF_COUNTED_LIFECYCLE definition to suppress abusing NDEBUG option.
* wtf/RefCounted.h:
(WTF):
(WTF::RefCountedBase::ref):
(WTF::RefCountedBase::hasOneRef):
(WTF::RefCountedBase::refCount):
(WTF::RefCountedBase::turnOffVerifier):
(WTF::RefCountedBase::relaxAdoptionRequirement):
(WTF::RefCountedBase::RefCountedBase):
(WTF::RefCountedBase::~RefCountedBase):
(WTF::RefCountedBase::derefBase):
(RefCountedBase):
(WTF::adopted):
(WTF::RefCountedBase::setMutexForVerifier):
(WTF::RefCountedBase::setDispatchQueueForVerifier):
2012-10-03 Yury Semikhatsky <yurys@chromium.org>
Remove MemoryInstrumentation::addCollectionElements
https://bugs.webkit.org/show_bug.cgi?id=98245
Reviewed by Vsevolod Vlasov.
Removed MemoryInstrumentation::addCollectionElements and switched all call sites
to reportSequenceMemoryUsage.
Drive-by fix: removed some unused methods on MemoryInstrumentation.
* wtf/MemoryInstrumentation.h:
* wtf/MemoryInstrumentationHashSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationSequence.h:
(WTF::SequenceMemoryInstrumentationTraits::reportMemoryUsage):
* wtf/MemoryInstrumentationVector.h:
(WTF::reportMemoryUsage):
2012-10-02 Yury Semikhatsky <yurys@chromium.org>
Provide memory instrumentation for HashCountedSet
https://bugs.webkit.org/show_bug.cgi?id=98138
Reviewed by Pavel Feldman.
Added memory instrumentation for HashCountedSet.
Extracted common routines for collecting memory info for an iterable sequence.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/MemoryInstrumentation.h:
(WTF):
* wtf/MemoryInstrumentationHashCountedSet.h: Copied from Source/WTF/wtf/MemoryInstrumentationHashSet.h.
(WTF):
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashMap.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashSet.h:
* wtf/MemoryInstrumentationSequence.h: Copied from Source/WTF/wtf/MemoryInstrumentationHashMap.h.
(WTF):
(WTF::SequenceMemoryInstrumentationTraits::reportMemoryUsage):
(WTF::reportSequenceMemoryUsage):
2012-10-02 Joshua Bell <jsbell@chromium.org>
Add htons/htonl definitions and implementations
https://bugs.webkit.org/show_bug.cgi?id=98054
Reviewed by Darin Adler.
For parsing or serializing binary data, byte order matters. The canonical htons/htonl/
ntohs/ntohl functions are not present everywhere, so implementations are proliferating in
parsers. Expose a new WTF header (wtf/ByteOrder.h) that includes the standard
implementations on UNIX-like OSs and provides basic inlined implementations on Windows.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/ByteOrder.h: Added.
(WTF::wswap32): Inline functions so arguments are only evaluated once.
(WTF::bswap32):
(WTF::bswap16):
(ntohs): Inline functions on OS(WINDOWS) to match macros on OS(UNIX)
(htons):
(ntohl):
(htonl):
* wtf/CMakeLists.txt:
2012-10-02 Michael Saboff <msaboff@apple.com>
HTMLConstructionSite::insertTextNode isn't optimized for 8 bit strings
https://bugs.webkit.org/show_bug.cgi?id=97740
Reviewed by Darin Adler.
Added an append method that takes an LChar source. Made both the UChar and LChar versions optimally handle
the appendee and appendend string bitness.
* wtf/text/WTFString.cpp:
(WTF::String::append):
* wtf/text/WTFString.h:
(String):
2012-10-02 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI: switch to non intrusive instrumentation of ParsedURL.
https://bugs.webkit.org/show_bug.cgi?id=98150
Reviewed by Yury Semikhatsky.
Memory instrumentation for ParsedURL was extracted into separate header MemoryInstrumentationParsedURL.h
Drive by fix: unnecessary include was removed from String*.cpp files.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.xcodeproj/project.pbxproj:
* wtf/MemoryInstrumentation.h:
(WTF):
* wtf/MemoryInstrumentationParsedURL.h: Added.
(WTF):
(WTF::reportMemoryUsage):
* wtf/text/AtomicString.cpp:
* wtf/text/StringImpl.cpp:
* wtf/text/WTFString.cpp:
* wtf/url/api/ParsedURL.cpp:
* wtf/url/api/ParsedURL.h:
* wtf/url/api/URLString.cpp:
* wtf/url/api/URLString.h:
2012-09-29 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI make String* instrumentation non intrusive
https://bugs.webkit.org/show_bug.cgi?id=97964
Reviewed by Yury Semikhatsky.
MemoryInstrumentationString.h was added.
Intrusive instrumentation was removed.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/MemoryInstrumentation.h:
(WTF):
* wtf/MemoryInstrumentationString.h: Added.
(WTF):
(WTF::reportMemoryUsage):
* wtf/text/AtomicString.cpp:
(WTF):
* wtf/text/AtomicString.h:
(AtomicString):
* wtf/text/CString.h:
(WTF::CStringBuffer::length):
* wtf/text/StringImpl.cpp:
* wtf/text/StringImpl.h:
(WTF::StringImpl::usesInternalBuffer):
(WTF::StringImpl::baseString):
(StringImpl):
2012-10-02 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r130129.
http://trac.webkit.org/changeset/130129
https://bugs.webkit.org/show_bug.cgi?id=98125
broke 4 webkit_unit_tests
(MemoryInstrumentationTest.hashMapWith*) (Requested by caseq
on #webkit).
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/MemoryInstrumentation.h:
(WTF):
* wtf/MemoryInstrumentationString.h: Removed.
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::reportMemoryUsage):
(WTF):
* wtf/text/AtomicString.h:
(AtomicString):
* wtf/text/CString.h:
(WTF::CStringBuffer::length):
(CStringBuffer):
(WTF::CStringBuffer::reportMemoryUsage):
(CString):
(WTF::CString::reportMemoryUsage):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::reportMemoryUsage):
(WTF):
* wtf/text/StringImpl.h:
(StringImpl):
* wtf/text/WTFString.cpp:
(WTF::String::reportMemoryUsage):
(WTF):
* wtf/text/WTFString.h:
(String):
2012-09-29 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI make String* instrumentation non intrusive
https://bugs.webkit.org/show_bug.cgi?id=97964
Reviewed by Yury Semikhatsky.
MemoryInstrumentationString.h was added.
Intrusive instrumentation was removed.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/MemoryInstrumentation.h:
(WTF):
* wtf/MemoryInstrumentationString.h: Added.
(WTF):
(WTF::reportMemoryUsage):
* wtf/text/AtomicString.cpp:
(WTF):
* wtf/text/AtomicString.h:
(AtomicString):
* wtf/text/CString.h:
(WTF::CStringBuffer::length):
* wtf/text/StringImpl.cpp:
* wtf/text/StringImpl.h:
(WTF::StringImpl::usesInternalBuffer):
(WTF::StringImpl::baseString):
(StringImpl):
2012-10-01 Daniel Drake <dsd@laptop.org>
Another SIGILL in JavaScriptCore on a Geode processor
https://bugs.webkit.org/show_bug.cgi?id=96286
Reviewed by Filip Pizlo.
Disable LLint for the GTK build where the build target does not
support SSE2 instructions. Restores support for non-SSE2 processors
such as the AMD Geode.
* wtf/Platform.h:
2012-10-01 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: provide memory instrumentation for HashMap
https://bugs.webkit.org/show_bug.cgi?id=98005
Reviewed by Pavel Feldman.
Extracted HashMap memory instrumentation into its own file. The map's content
elements will be automatically traversed if their types are supported
by the memory instrumentation. No need to call special method for hash map
fields any more.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentation):
(WTF):
* wtf/MemoryInstrumentationHashMap.h: Added.
(WTF):
(WTF::SequenceMemoryInstrumentationTraits::reportMemoryUsage):
(WTF::reportMemoryUsage):
2012-10-01 Alberto Garcia <agarcia@igalia.com>
Check that __cplusplus is defined before comparing its value
https://bugs.webkit.org/show_bug.cgi?id=98015
Reviewed by Xan Lopez.
If __cplusplus is not defined is interpreted as having the value
0, but it produces a compilation warning with -Wundef.
This is the case with some API tests that are written in C
(JSNode.c, JSNodeList.c, minidom.c).
* wtf/Compiler.h:
2012-10-01 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.list.am: Add missing header files to compilation.
2012-09-30 Mark Hahnenberg <mhahnenberg@apple.com>
Clean up HasTrivialConstructor/Destructor
https://bugs.webkit.org/show_bug.cgi?id=97754
Reviewed by Sam Weinig.
Mixed up the HasTrivialDestructor/Constructor case for VS2010 and later in the previous patch.
* wtf/TypeTraits.h:
2012-09-29 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r129982.
http://trac.webkit.org/changeset/129982
https://bugs.webkit.org/show_bug.cgi?id=97971
hit assert in fast/overflow/overflow-height-float-not-removed-
crash3.html (Requested by eae on #webkit).
* wtf/Platform.h:
2012-09-29 Emil A Eklund <eae@chromium.org>
Enable SATURATED_LAYOUT_ARITHMETIC for chromium
https://bugs.webkit.org/show_bug.cgi?id=95053
Reviewed by Abhishek Arya.
Enable the SATURATED_LAYOUT_ARITHMETIC flag for the chromium port.
This changes the behavior of FractionalLayoutUnit to clamp to the
max or min value instead of overflowing.
This may very well impact performance so the current plan is to enable
it for a couple of hours to a day to collect performance data and then
disable it again until we've had a chance to review the perf data.
* wtf/Platform.h:
2012-09-28 Anders Carlsson <andersca@apple.com>
Remove Java bridge
https://bugs.webkit.org/show_bug.cgi?id=97954
Reviewed by Sam Weinig.
The Java bridge is not used by any port; Mac now has a NPAPI Java plug-in.
* wtf/Platform.h:
2012-09-28 Kai Koehne <kai.koehne@digia.com>
Disable YARR_JIT for Windows 64 bit
https://bugs.webkit.org/show_bug.cgi?id=97772
Reviewed by Simon Hausmann.
Using YARR_JIT requires ASSEMBLER, which in turn enables the
executable fixed allocator, which is mmap based (not available on
Windows).
* wtf/Platform.h:
2012-09-28 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: make HashSet memory instrumentation non-intrusive
https://bugs.webkit.org/show_bug.cgi?id=97879
Reviewed by Vsevolod Vlasov.
Removed reportMemoryUsage declarations as a friend of HashSet and HashTable. Also
removed MemoryInstrumentationHashTable which is not needed if we don't have
access to HashSet's guts.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/HashSet.h:
(WTF):
(HashSet):
* wtf/HashTable.h:
(HashTable):
* wtf/MemoryInstrumentation.h:
(WTF::MemoryClassInfo::addPrivateBuffer):
* wtf/MemoryInstrumentationHashSet.h:
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashTable.h: Removed.
2012-09-27 Anders Carlsson <andersca@apple.com>
Remove the clang pragmas to disable warnings in Noncopyable.h
https://bugs.webkit.org/show_bug.cgi?id=97826
Reviewed by Beth Dakin.
Warnings about C++11 extensions are already disabled project-wide now so there's no need
to keep these pragmas.
* wtf/Noncopyable.h:
2012-09-26 Mark Hahnenberg <mhahnenberg@apple.com>
Clean up HasTrivialConstructor/Destructor
https://bugs.webkit.org/show_bug.cgi?id=97754
Reviewed by Darin Adler.
Cleaned up HasTrivialConstructor and HasTrivialDestructor by defining them in terms of
other type traits we have. Also moved some ifdefs and comments to make things more clear.
* wtf/TypeTraits.h:
2012-09-27 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI: move visited and countObjectSize methods implementation into separate class.
https://bugs.webkit.org/show_bug.cgi?id=97461
Reviewed by Yury Semikhatsky.
These methods and the data collected by them need to be used in the instrumentation code for other components.
As example when we are visiting bitmaps we need to visit platform specific objects.
These objects will be instrumented with help of component's own instrumentation code
but we have to keep the single set of visited objects and the map of counters.
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentationClient):
(WTF::MemoryInstrumentationClient::~MemoryInstrumentationClient):
(WTF):
(WTF::MemoryInstrumentation::MemoryInstrumentation):
(MemoryInstrumentation):
(WTF::MemoryInstrumentation::countObjectSize):
(WTF::MemoryInstrumentation::visited):
2012-09-27 Csaba Osztrogonác <ossy@webkit.org>, Tor Arne Vestbø <vestbo@webkit.org>
[Qt] Enable the LLInt on Linux
https://bugs.webkit.org/show_bug.cgi?id=95749
Reviewed by Simon Hausmann.
* wtf/Platform.h:
2012-09-26 Cosmin Truta <ctruta@rim.com>
[BlackBerry] Allow denormal floats in ARM VFP
https://bugs.webkit.org/show_bug.cgi?id=97008
Reviewed by Filip Pizlo.
Reviewed internally by Yong Li.
Cleared the Flush-to-Zero flag in the ARM FPSCR register on QNX.
* wtf/ThreadingPthreads.cpp:
(WTF::enableIEEE754Denormal): Added.
(WTF::initializeThreading):
(WTF::initializeCurrentThreadInternal):
2012-09-26 Michael Saboff <msaboff@apple.com>
Update ComplexTextController for 8 bit TextRun changes
https://bugs.webkit.org/show_bug.cgi?id=97378
Reviewed by Geoffrey Garen.
Add a new create method to make a 16 bit string from 8 bit source data. This is used in
ComplexTextController when we have LChar* + length text data, but we really want 16 bit
data for the complex text rendering code.
* wtf/text/WTFString.cpp:
(WTF::String::make16BitFrom8BitSource):
(WTF):
* wtf/text/WTFString.h:
(String):
2012-09-26 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI: replace manual JS external resources counting with MemoryInstrumentation
https://bugs.webkit.org/show_bug.cgi?id=97662
Reviewed by Yury Semikhatsky.
Old schema uses sizeInBytes method on StringImpl. This method works incorrect for substrings.
Also we'd like to know exact pointers to strings and buffers for verification purposes.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/MemoryInstrumentationArrayBufferView.h:
(WTF):
(WTF::reportMemoryUsage):
2012-09-25 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: extract HashSet instrumentation from core NMI code and put it into MemoryInstrumentationHashSet.h
https://bugs.webkit.org/show_bug.cgi?id=97198
Reviewed by Yury Semikhatsky.
Current implementation has overloads for HashSet.
This prevents us from instrumenting complex cases like Vector<HashSet<...> >.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/HashSet.h:
(WTF):
(HashSet):
* wtf/HashTable.h:
(WTF):
(HashTable):
* wtf/MemoryInstrumentation.h:
(WTF::MemoryClassInfo::addCollectionElements):
(WTF::MemoryClassInfo::addHashCountedSet):
* wtf/MemoryInstrumentationHashSet.h: Added.
(WTF):
(WTF::reportMemoryUsage):
* wtf/MemoryInstrumentationHashTable.h: Added.
(WTF):
(WTF::reportMemoryUsage):
2012-09-26 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: compare objects counted by the memory instrumentation with those allocated in the heap
https://bugs.webkit.org/show_bug.cgi?id=97641
Reviewed by Pavel Feldman.
Added a method for checking if reported object was actually allocated in the heap.
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentation):
(WTF::MemoryInstrumentation::addObjectImpl):
2012-09-26 Gavin Barraclough <barraclough@apple.com>
String.localeCompare should normalize input
https://bugs.webkit.org/show_bug.cgi?id=97639
Reviewed by Filip Pizlo.
From the spec: "It is strongly recommended that this function treat Strings that are
canonically equivalent according to the Unicode standard as identical (in other words,
compare the Strings as if they had both been converted to Normalised Form C or D first).
It is also recommended that this function not honour Unicode compatibility equivalences
or decompositions."
* wtf/unicode/icu/CollatorICU.cpp:
(WTF::Collator::createCollator):
- Enable normalization.
2012-09-25 Cosmin Truta <ctruta@rim.com>
[BlackBerry] Enable LLInt
https://bugs.webkit.org/show_bug.cgi?id=97604
Reviewed by Yong Li.
Set the prefix of LOCAL_LABEL_STRING to ".L" on QNX.
* wtf/InlineASM.h:
2012-09-25 Patrick Gansterer <paroga@webkit.org>
Do not enable DFG JIT for COMPILER(MSVC).
The current code does not support MSVC inline assembler, so disable it for now.
* wtf/Platform.h:
2012-09-25 Pratik Solanki <psolanki@apple.com>
Remove HAVE_SBRK since we never set use_sbrk to true
https://bugs.webkit.org/show_bug.cgi?id=97525
<rdar://problem/12363601>
Reviewed by Geoffrey Garen.
The code under HAVE(SBRK) has not been used since 2005. We use mmap not sbrk for FastMalloc
not sbrk. We can just remove the define and move all of this code inside #ifndef
WTF_CHANGES.
* wtf/Platform.h:
* wtf/TCSystemAlloc.cpp:
(TCMalloc_SystemAlloc):
2012-09-25 Mark Lam <mark.lam@apple.com>
#undef some symbols before redefining them.
https://bugs.webkit.org/show_bug.cgi?id=97568.
Reviewed by Michael Saboff.
* wtf/Platform.h:
2012-09-21 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: extract Vector instrumentation from core NMI code into MemoryInstrumentationVector.h header.
https://bugs.webkit.org/show_bug.cgi?id=96650
Reviewed by Vsevolod Vlasov.
Added reportMemoryUsage free template function with default body to core NMI code
and add custom version of reportMemoryUsage function for Vectors.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/MemoryInstrumentation.h:
(WTF):
(MemoryInstrumentation):
(WTF::MemoryInstrumentation::addObjectImpl):
* wtf/MemoryInstrumentationVector.h: Added.
(WTF):
(WTF::instrumentVectorValues):
(WTF::reportMemoryUsage):
2012-09-24 Mark Lam <mark.lam@apple.com>
Deleting the classic interpreter and cleaning up some build options.
https://bugs.webkit.org/show_bug.cgi?id=96969.
Reviewed by Geoffrey Garen.
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveAndCommit):
* wtf/Platform.h:
2012-09-24 Patrick Gansterer <paroga@webkit.org>
Remove String::operator+=()
https://bugs.webkit.org/show_bug.cgi?id=96172
Reviewed by Benjamin Poulain.
* wtf/Platform.h:
* wtf/text/WTFString.h:
2012-09-24 Benjamin Poulain <benjamin@webkit.org>
Add support for query encoding to WTFURL
https://bugs.webkit.org/show_bug.cgi?id=97422
Reviewed by Adam Barth.
Expose character conversion through the new abstract class URLQueryCharsetConverter.
URLQueryCharsetConverter is implemented by WebCore to expose the TextEncoding classes.
Unfortunatelly that forces us to bring over URLBuffer in the public API. We may be able
to mitigate that later when moving WTFURL to more templates.
The change fixes 2 of the URL layout tests.
* WTF.xcodeproj/project.pbxproj:
* wtf/url/api/ParsedURL.cpp:
(WTF::ParsedURL::ParsedURL):
* wtf/url/api/ParsedURL.h:
(ParsedURL):
ParsedURL was using the same constructor for ParsedURLString, and URL without a base.
That was a mistake on my part, I did not intend that, fixed it now :)
* wtf/url/api/URLBuffer.h: Renamed from Source/WTF/wtf/url/src/URLBuffer.h.
(URLBuffer):
(WTF::URLBuffer::URLBuffer):
(WTF::URLBuffer::~URLBuffer):
(WTF::URLBuffer::at):
(WTF::URLBuffer::set):
(WTF::URLBuffer::capacity):
(WTF::URLBuffer::length):
(WTF::URLBuffer::data):
(WTF::URLBuffer::setLength):
(WTF::URLBuffer::append):
(WTF::URLBuffer::grow):
* wtf/url/api/URLQueryCharsetConverter.h: Added.
(URLQueryCharsetConverter):
(WTF::URLQueryCharsetConverter::URLQueryCharsetConverter):
(WTF::URLQueryCharsetConverter::~URLQueryCharsetConverter):
* wtf/url/src/URLCanon.h:
(URLCanonicalizer):
* wtf/url/src/URLCanonFilesystemurl.cpp:
(WTF::URLCanonicalizer::canonicalizeFileSystemURL):
(WTF::URLCanonicalizer::ReplaceFileSystemURL):
* wtf/url/src/URLCanonFileurl.cpp:
(WTF::URLCanonicalizer::CanonicalizeFileURL):
(WTF::URLCanonicalizer::ReplaceFileURL):
* wtf/url/src/URLCanonInternal.h:
(URLCanonicalizer):
* wtf/url/src/URLCanonQuery.cpp:
(WTF::URLCanonicalizer::CanonicalizeQuery):
(WTF::URLCanonicalizer::ConvertUTF16ToQueryEncoding):
* wtf/url/src/URLCanonRelative.cpp:
(WTF::URLCanonicalizer::resolveRelativeURL):
* wtf/url/src/URLCanonStdURL.cpp:
(WTF::URLCanonicalizer::CanonicalizeStandardURL):
(WTF::URLCanonicalizer::ReplaceStandardURL):
* wtf/url/src/URLUtil.cpp:
(URLUtilities):
(WTF::URLUtilities::canonicalize):
(WTF::URLUtilities::resolveRelative):
(WTF::URLUtilities::ReplaceComponents):
* wtf/url/src/URLUtil.h:
(URLUtilities):
2012-09-24 Benjamin Poulain <benjamin@webkit.org>
Integrate most of GoogleURL in WTFURL
https://bugs.webkit.org/show_bug.cgi?id=97405
Reviewed by Adam Barth.
This patch brings almost all of the implementatation of Google-URL in WTFURL
with only minor changes.
The changes from the original code are mostly:
-Code cleaning.
-Replace url_parse::Parsed by URLSegments.
-Replace url_parse::Component by URLComponent
-More code cleaning.
-Adopt URLBuffer and RawURLBuffer instead of the CanonOutputT and RawCanonOutputT.
-Use URLCharacterTypes instead of the litany of characters functions.
-Some more code cleaning.
-Fix the style to match WebKit as much as possible.
-Rename the files to match WebKit style.
* WTF.xcodeproj/project.pbxproj:
* wtf/url/api/ParsedURL.cpp:
(WTF::ParsedURL::ParsedURL):
(WTF::ParsedURL::segment):
* wtf/url/api/ParsedURL.h:
(WTF::ParsedURL::isValid):
* wtf/url/src/RawURLBuffer.h:
* wtf/url/src/URLCanon.h: Added.
(URLCanonicalizer):
(CharsetConverter):
(WTF::URLCanonicalizer::CharsetConverter::CharsetConverter):
(WTF::URLCanonicalizer::CharsetConverter::~CharsetConverter):
(CanonHostInfo):
(WTF::URLCanonicalizer::CanonHostInfo::CanonHostInfo):
(WTF::URLCanonicalizer::CanonHostInfo::IsIPAddress):
(WTF::URLCanonicalizer::CanonHostInfo::AddressLength):
(URLComponentSource):
(WTF::URLCanonicalizer::URLComponentSource::URLComponentSource):
(Replacements):
(WTF::URLCanonicalizer::Replacements::Replacements):
(WTF::URLCanonicalizer::Replacements::SetScheme):
(WTF::URLCanonicalizer::Replacements::IsSchemeOverridden):
(WTF::URLCanonicalizer::Replacements::SetUsername):
(WTF::URLCanonicalizer::Replacements::ClearUsername):
(WTF::URLCanonicalizer::Replacements::IsUsernameOverridden):
(WTF::URLCanonicalizer::Replacements::SetPassword):
(WTF::URLCanonicalizer::Replacements::ClearPassword):
(WTF::URLCanonicalizer::Replacements::IsPasswordOverridden):
(WTF::URLCanonicalizer::Replacements::SetHost):
(WTF::URLCanonicalizer::Replacements::ClearHost):
(WTF::URLCanonicalizer::Replacements::IsHostOverridden):
(WTF::URLCanonicalizer::Replacements::SetPort):
(WTF::URLCanonicalizer::Replacements::ClearPort):
(WTF::URLCanonicalizer::Replacements::IsPortOverridden):
(WTF::URLCanonicalizer::Replacements::SetPath):
(WTF::URLCanonicalizer::Replacements::ClearPath):
(WTF::URLCanonicalizer::Replacements::IsPathOverridden):
(WTF::URLCanonicalizer::Replacements::SetQuery):
(WTF::URLCanonicalizer::Replacements::ClearQuery):
(WTF::URLCanonicalizer::Replacements::IsQueryOverridden):
(WTF::URLCanonicalizer::Replacements::SetRef):
(WTF::URLCanonicalizer::Replacements::ClearRef):
(WTF::URLCanonicalizer::Replacements::IsRefOverridden):
(WTF::URLCanonicalizer::Replacements::sources):
(WTF::URLCanonicalizer::Replacements::components):
(WTF::URLCanonicalizer::Replacements::Placeholder):
* wtf/url/src/URLCanonEtc.cpp: Added.
(WTF::URLCanonicalizer::removeURLWhitespace):
(URLCanonicalizer):
(WTF::URLCanonicalizer::canonicalSchemeChar):
(WTF::URLCanonicalizer::CanonicalizeScheme):
(WTF::URLCanonicalizer::CanonicalizeUserInfo):
(WTF::URLCanonicalizer::CanonicalizePort):
(WTF::URLCanonicalizer::CanonicalizeRef):
* wtf/url/src/URLCanonFilesystemurl.cpp: Added.
(WTF::URLCanonicalizer::CanonicalizeFileSystemURL):
(URLCanonicalizer):
(WTF::URLCanonicalizer::ReplaceFileSystemURL):
* wtf/url/src/URLCanonFileurl.cpp: Added.
(WTF::URLCanonicalizer::CanonicalizeFileURL):
(URLCanonicalizer):
(WTF::URLCanonicalizer::FileCanonicalizePath):
(WTF::URLCanonicalizer::ReplaceFileURL):
* wtf/url/src/URLCanonHost.cpp: Added.
(WTF::URLCanonicalizer::CanonicalizeHost):
(URLCanonicalizer):
(WTF::URLCanonicalizer::CanonicalizeHostVerbose):
* wtf/url/src/URLCanonICU.cpp: Added.
(WTF::URLCanonicalizer::IDNToASCII):
(URLCanonicalizer):
(WTF::URLCanonicalizer::readUTFChar):
* wtf/url/src/URLCanonIP.cpp: Added.
(WTF::URLCanonicalizer::CanonicalizeIPAddress):
(URLCanonicalizer):
* wtf/url/src/URLCanonInternal.cpp: Added.
(URLCanonicalizer):
(WTF::URLCanonicalizer::AppendInvalidNarrowString):
(WTF::URLCanonicalizer::ConvertUTF16ToUTF8):
(WTF::URLCanonicalizer::ConvertUTF8ToUTF16):
(WTF::URLCanonicalizer::SetupOverrideComponents):
(WTF::URLCanonicalizer::SetupUTF16OverrideComponents):
(WTF::URLCanonicalizer::_itoa_s):
(WTF::URLCanonicalizer::_itow_s):
* wtf/url/src/URLCanonInternal.h: Added.
(URLCanonicalizer):
(WTF::URLCanonicalizer::hexCharToValue):
(WTF::URLCanonicalizer::isDot):
(WTF::URLCanonicalizer::appendURLEscapedCharacter):
(WTF::URLCanonicalizer::doAppendUTF8):
(WTF::URLCanonicalizer::AppendCharToOutput):
(WTF::URLCanonicalizer::AppendUTF8Value):
(WTF::URLCanonicalizer::AppendUTF8EscapedValue):
(WTF::URLCanonicalizer::AppendUTF16Value):
(WTF::URLCanonicalizer::AppendUTF8EscapedChar):
(WTF::URLCanonicalizer::Is8BitChar):
(WTF::URLCanonicalizer::DecodeEscaped):
(WTF::URLCanonicalizer::_itoa_s):
(WTF::URLCanonicalizer::_itow_s):
(WTF::URLCanonicalizer::_strtoui64):
* wtf/url/src/URLCanonMailto.cpp: Added.
(WTF::URLCanonicalizer::CanonicalizeMailtoURL):
(URLCanonicalizer):
(WTF::URLCanonicalizer::ReplaceMailtoURL):
* wtf/url/src/URLCanonPath.cpp: Added.
(WTF::URLCanonicalizer::CanonicalizePath):
(URLCanonicalizer):
(WTF::URLCanonicalizer::CanonicalizePartialPath):
* wtf/url/src/URLCanonPathurl.cpp: Added.
(WTF::URLCanonicalizer::canonicalizePathURL):
(URLCanonicalizer):
(WTF::URLCanonicalizer::ReplacePathURL):
* wtf/url/src/URLCanonQuery.cpp: Added.
(WTF::URLCanonicalizer::CanonicalizeQuery):
(URLCanonicalizer):
(WTF::URLCanonicalizer::ConvertUTF16ToQueryEncoding):
* wtf/url/src/URLCanonRelative.cpp: Added.
(WTF::URLCanonicalizer::isRelativeURL):
(URLCanonicalizer):
(WTF::URLCanonicalizer::resolveRelativeURL):
* wtf/url/src/URLCanonStdURL.cpp: Added.
(WTF::URLCanonicalizer::DefaultPortForScheme):
(URLCanonicalizer):
(WTF::URLCanonicalizer::CanonicalizeStandardURL):
(WTF::URLCanonicalizer::ReplaceStandardURL):
* wtf/url/src/URLCharacterTypes.cpp:
* wtf/url/src/URLCharacterTypes.h:
(WTF::URLCharacterTypes::isComponentChar):
(WTF::URLCharacterTypes::isHexChar):
(WTF::URLCharacterTypes::isIPv4Char):
(WTF::URLCharacterTypes::isQueryChar):
(WTF::URLCharacterTypes::isCharacterOfType):
(URLCharacterTypes):
* wtf/url/src/URLEscape.cpp: Removed.
* wtf/url/src/URLFile.h: Added.
(URLParser):
(WTF::URLParser::isWindowsDriveSeparator):
(WTF::URLParser::isWindowsDriveLetter):
(WTF::URLParser::findNextSlash):
(WTF::URLParser::doesBeginWindowsDriveSpec):
(WTF::URLParser::doesBeginUNCPath):
* wtf/url/src/URLParse.cpp: Added.
(WTF::URLParser::ExtractScheme):
(URLParser):
(WTF::URLParser::IsAuthorityTerminator):
(WTF::URLParser::ExtractFileName):
(WTF::URLParser::ExtractQueryKeyValue):
(WTF::URLParser::ParseAuthority):
(WTF::URLParser::ParsePort):
(WTF::URLParser::ParseStandardURL):
(WTF::URLParser::ParsePathURL):
(WTF::URLParser::ParseFileSystemURL):
(WTF::URLParser::ParseMailtoURL):
(WTF::URLParser::parsePathInternal):
(WTF::URLParser::ParseAfterScheme):
* wtf/url/src/URLParse.h: Added.
(URLParser):
* wtf/url/src/URLParseFile.cpp: Added.
(WTF):
(WTF::URLParser::ParseFileURL):
(URLParser):
* wtf/url/src/URLParseInternal.h: Added.
(URLParser):
(WTF::URLParser::isURLSlash):
(WTF::URLParser::shouldTrimFromURL):
(WTF::URLParser::trimURL):
(WTF::URLParser::countConsecutiveSlashes):
* wtf/url/src/URLParser.h: Removed.
* wtf/url/src/URLQueryCanonicalizer.h: Removed.
* wtf/url/src/URLSegments.cpp:
* wtf/url/src/URLSegments.h:
(WTF::URLSegments::URLSegments):
(URLSegments):
(WTF::URLSegments::operator=):
(WTF::URLSegments::innerURLSegments):
(WTF::URLSegments::setInnerURLSegments):
(WTF::URLSegments::clearInnerURLSegments):
* wtf/url/src/URLUtil.cpp: Added.
(URLUtilities):
(WTF::URLUtilities::IsStandard):
(WTF::URLUtilities::FindAndCompareScheme):
(WTF::URLUtilities::Canonicalize):
(WTF::URLUtilities::resolveRelative):
(WTF::URLUtilities::ReplaceComponents):
(WTF::URLUtilities::LowerCaseEqualsASCII):
(WTF::URLUtilities::DecodeURLEscapeSequences):
(WTF::URLUtilities::EncodeURIComponent):
(WTF::URLUtilities::CompareSchemeComponent):
* wtf/url/src/URLUtil.h: Added.
(URLUtilities):
* wtf/url/src/URLUtilInternal.h: Renamed from Source/WTF/wtf/url/src/URLEscape.h.
(URLUtilities):
2012-09-24 Joone Hur <joone.hur@intel.com>
[GTK] Implement GraphicsLayer using Clutter
https://bugs.webkit.org/show_bug.cgi?id=73767
Reviewed by Martin Robinson.
Add ClutterActor and GraphicsLayerActor to GTypedefs.h.
* wtf/gobject/GTypedefs.h:
2012-09-23 Byungwoo Lee <bw80.lee@gmail.com>
Fix build warnings : -Wunused-parameter, -Wparentheses, -Wuninitialized.
https://bugs.webkit.org/show_bug.cgi?id=97306
Reviewed by Benjamin Poulain.
Fix build warning about -Wunused-parameter on FastMalloc.cpp,
OSAllocatorPosix.cpp by using UNUSED_PARAM() macro.
Fix header including order of FastMalloc.cpp.
* wtf/FastMalloc.cpp:
(WTF::fastMallocSize):
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveAndCommit):
2012-09-22 Sam Weinig <sam@webkit.org>
Add explicit conversion operator to RetainPtr for easier use in C++11 environments
https://bugs.webkit.org/show_bug.cgi?id=97403
Reviewed by Dan Bernstein.
* wtf/Compiler.h:
Add support for COMPILER_SUPPORTS(CXX_EXPLICIT_CONVERSIONS)
* wtf/RetainPtr.h:
(RetainPtr):
(WTF::RetainPtr::get):
(WTF::RetainPtr::operator PtrType):
Add the explicit conversion operator and group all the underlying
pointer accessors together.
2012-09-21 Simon Hausmann <simon.hausmann@digia.com>
[Qt] Error out early if we don't have ICU available
Reviewed by Tor Arne Vestbø.
* WTF.pri:
2012-09-20 Patrick Gansterer <paroga@webkit.org>
Add String::numberToStringFixedWidth()
https://bugs.webkit.org/show_bug.cgi?id=96330
Reviewed by Benjamin Poulain.
Add this new function as replacement for the ShouldRoundDecimalPlaces flag of String::number()
and remove the now unnecessary branch in String::number() for the old flags.
* wtf/text/WTFString.cpp:
(WTF::String::number):
(WTF::String::numberToStringFixedWidth):
* wtf/text/WTFString.h:
2012-09-19 Geoffrey Garen <ggaren@apple.com>
OSR exit sometimes neglects to create the arguments object
https://bugs.webkit.org/show_bug.cgi?id=97162
Reviewed by Filip Pizlo.
* wtf/HashTraits.h:
(NullableHashTraits):
(WTF::NullableHashTraits::emptyValue):
(WTF):
2012-09-18 Glenn Adams <glenn@skynav.com>
WTFString::show doesn't dump non-ASCII characters in a readable manner
https://bugs.webkit.org/show_bug.cgi?id=96749
Reviewed by Benjamin Poulain.
Dump non-ASCII characters in a useful form for debugging.
* wtf/text/WTFString.cpp:
(asciiDebug):
Dump non-ASCII characters (i.e., UTF-16 code elements) as well as non-printable ASCII characters
using \uXXXX format. Also escape \ as \\ in order to remove ambiguity.
2012-09-18 Mark Hahnenberg <mhahnenberg@apple.com>
Use WTF::HasTrivialDestructor instead of compiler-specific versions in JSC::NeedsDestructor
https://bugs.webkit.org/show_bug.cgi?id=96980
Reviewed by Benjamin Poulain.
* wtf/TypeTraits.h:
(WTF):
2012-09-17 Glenn Adams <glenn@skynav.com>
Including HexNumber.h fails build if hexDigitsForMode is not referenced
https://bugs.webkit.org/show_bug.cgi?id=96873
Reviewed by Benjamin Poulain.
Ensure release build is possible when hexDigitsForMode is not referenced by
template expansion.
* wtf/HexNumber.h:
(WTF::Internal::hexDigitsForMode):
Change hexDigitsForMode to inline (rather than static). Make string literals
{lower,upper}HexDigits non-local and non-static, but const, to which the linker
should merge references in the RO data segment.
2012-09-17 Filip Pizlo <fpizlo@apple.com>
The ThreadRescrictionVerifier should be more forcibly disabled on systems that use threads
https://bugs.webkit.org/show_bug.cgi?id=96957
Reviewed by Oliver Hunt.
* wtf/ThreadRestrictionVerifier.h:
(WTF):
(WTF::ThreadRestrictionVerifier::ThreadRestrictionVerifier):
(ThreadRestrictionVerifier):
(WTF::ThreadRestrictionVerifier::setMutexMode):
(WTF::ThreadRestrictionVerifier::setDispatchQueueMode):
(WTF::ThreadRestrictionVerifier::turnOffVerification):
(WTF::ThreadRestrictionVerifier::setShared):
(WTF::ThreadRestrictionVerifier::isSafeToUse):
2012-09-17 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r128796.
http://trac.webkit.org/changeset/128796
https://bugs.webkit.org/show_bug.cgi?id=96966
It broke everything (Requested by Ossy_NIGHT on #webkit).
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveUncommitted):
(WTF::OSAllocator::reserveAndCommit):
(WTF::OSAllocator::commit):
(WTF::OSAllocator::decommit):
2012-09-17 Uli Schlachter <psychon@znc.in>
Implement uncommitted memory for Linux.
https://bugs.webkit.org/show_bug.cgi?id=65766
Reviewed by Gavin Barraclough.
The old approach used MAP_NORESERVE to allocate address space without
committing it. However, that flag gets ignored if
/proc/sys/vm/overcommit_memory is set to 2. The new approach uses a
mapping with PROT_NONE. This works because mappings which aren't even
readable don't get accounted as committed on Linux.
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveUncommitted):
(WTF::OSAllocator::reserveAndCommit):
(WTF::OSAllocator::commit):
(WTF::OSAllocator::decommit):
2012-09-17 Filip Pizlo <fpizlo@apple.com>
Array profiling has convergence issues
https://bugs.webkit.org/show_bug.cgi?id=96891
Reviewed by Gavin Barraclough.
Added functions for testing if something is a power of 2.
* wtf/MathExtras.h:
(hasZeroOrOneBitsSet):
(hasTwoOrMoreBitsSet):
2012-09-17 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI: now when we can detect instrumented classes we can
remove addInstrumentedMember and use addMember for everything.
https://bugs.webkit.org/show_bug.cgi?id=96913
Reviewed by Yury Semikhatsky.
* wtf/MemoryInstrumentation.h:
(WTF::MemoryInstrumentation::addRootObject):
(WTF::MemoryInstrumentation::addObject):
(WTF::MemoryInstrumentation::addObjectImpl):
(WTF):
(WTF::MemoryInstrumentation::addInstrumentedCollection):
(WTF::MemoryInstrumentation::addInstrumentedMapEntries):
(WTF::MemoryInstrumentation::addInstrumentedMapValues):
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::reportMemoryUsage):
* wtf/text/CString.h:
(WTF::CString::reportMemoryUsage):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::reportMemoryUsage):
* wtf/text/WTFString.cpp:
(WTF::String::reportMemoryUsage):
* wtf/url/api/ParsedURL.cpp:
(WTF::ParsedURL::reportMemoryUsage):
* wtf/url/api/URLString.cpp:
(WTF::URLString::reportMemoryUsage):
2012-09-17 Ilya Tikhonovsky <loislo@chromium.org>
Unreviewed compilation fix.
* wtf/MemoryInstrumentation.h:
(WTF::MemoryInstrumentation::reportObjectMemoryUsage):
2012-09-15 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: automatically detect if class has reportMemoryUsage method
https://bugs.webkit.org/show_bug.cgi?id=96756
Reviewed by Alexander Pavlov.
Implemeted automatic selector of the memory reporting method. If
an object has reportMemoryUsage method then call it. Otherwise
count only object's self size. As the next step we will delete
addInstrumentedMember and addInstrumentedObjectImpl and will
have only addMember and addObjectImpl that would automatically
call reportMemoryUsage if it is present.
* wtf/MemoryInstrumentation.h:
(WTF::MemoryInstrumentation::selectInstrumentationMethod):
(MemoryInstrumentation):
(WTF::MemoryInstrumentation::reportObjectMemoryUsage):
(WTF::MemoryInstrumentation::addInstrumentedObjectImpl):
(WTF::MemoryInstrumentation::addObjectImpl):
(WTF::::process):
2012-09-14 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: OwnPtr and RefPtr reported by pointer can be double counted by the memory instrumentation
https://bugs.webkit.org/show_bug.cgi?id=96791
Reviewed by Alexander Pavlov.
* wtf/MemoryInstrumentation.h:
(WTF::MemoryInstrumentation::addObjectImpl): check if the smart pointer has already
been visited before counting its size.
2012-09-15 Benjamin Poulain <benjamin@webkit.org>
Fix the build with WTF URL
https://bugs.webkit.org/show_bug.cgi?id=96875
Reviewed by Adam Barth.
Add support for MemoryInstrumentation to WTF's URL classes.
* wtf/url/api/ParsedURL.cpp:
(WTF::ParsedURL::reportMemoryUsage):
* wtf/url/api/ParsedURL.h:
(ParsedURL):
* wtf/url/api/URLString.cpp:
(WTF::URLString::reportMemoryUsage):
* wtf/url/api/URLString.h:
(URLString):
2012-09-15 Raphael Kubo da Costa <rakuco@FreeBSD.org>
llint: Implement LOCAL_LABEL_STRING for the BSD platforms.
https://bugs.webkit.org/show_bug.cgi?id=96870
Reviewed by Filip Pizlo.
* wtf/InlineASM.h: Extend the definition of LOCAL_LABEL_STRING
currently used for OS(LINUX) to the BSDs, since they also normally
use GNU as, and clang/llvm seems to parse that syntax just fine as
well.
2012-09-14 Alexey Proskuryakov <ap@apple.com>
Minimize collisions when hashing pairs
https://bugs.webkit.org/show_bug.cgi?id=96022
Build fix (with newer clang?)
* wtf/HashFunctions.h: (WTF::pairIntHash): Be explicit about casting from
64 bit to 32 bit.
2012-09-14 Dana Jansens <danakj@chromium.org>
Minimize collisions when hashing pairs
https://bugs.webkit.org/show_bug.cgi?id=96022
Reviewed by Adrienne Walker.
The current hash function for pairs has poor performance as it does a
nice hash function on 64 bits, but then just drops the top 32 bits. The
hash method for pairs tries to use Thomas Wang's 64 bit Mix Function,
but this requires not dropping any bits in order to retain the
characteristics mentioned by Thomas.
A better method of hashing sets of 32-bit integers is to use
multiplication in 64 bits with random integers. This method is a
provably almost-universal hash function. Testing shows that this
method decreases the time required, when compared with the current
method, by more than 20% due to better hashing characteristics.
* wtf/HashFunctions.h:
(WTF):
(WTF::pairIntHash):
Implments the hashing method for a pair of unsigned integers.
(WTF::PairHash::hash):
Use pairIntHash() on the hash results of each object in the pair.
(WTF::IntPairHash::hash):
Implement an integer-specific PairHash class that does not need to
hash each object in the pair. It uses pairIntHash on the two
integers in the pair directly.
(WTF::IntPairHash::equal):
(IntPairHash):
2012-09-14 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Make force_static_libs_as_shared work on Mac OS
We had to move a few LIBS += around that were in the wrong place,
and not caught when everything was just linked into the final
QtWebKit library.
Reviewed by Simon Hausmann.
* WTF.pri:
2012-09-14 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI: convert template versions of String*::reportMemoryUsage functions to normal functions.
https://bugs.webkit.org/show_bug.cgi?id=96759
Reviewed by Yury Semikhatsky.
Now when MemoryInstrumentation.h is a part of WTF we can move reportMemoryUsage functions to cpp file.
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::reportMemoryUsage):
(WTF):
* wtf/text/AtomicString.h:
(WTF):
(AtomicString):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::reportMemoryUsage):
(WTF):
* wtf/text/StringImpl.h:
(WTF):
(StringImpl):
* wtf/text/WTFString.cpp:
(WTF::String::reportMemoryUsage):
(WTF):
* wtf/text/WTFString.h:
(WTF):
(String):
2012-09-14 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI: remove current traits helper class because it is customizing the instrumentation at a wrong place and is not necessary at the moment.
https://bugs.webkit.org/show_bug.cgi?id=96737
Reviewed by Yury Semikhatsky.
* wtf/MemoryInstrumentation.h:
(MemoryInstrumentation):
WTF::MemoryInstrumentationTraits): removed
(WTF::MemoryInstrumentation::OwningTraits::addInstrumentedObject): direct call inserted
(WTF::MemoryInstrumentation::OwningTraits::addObject):direct call inserted
2012-09-13 Kenneth Rohde Christiansen <kenneth@webkit.org>
Evas_Object* is a ref'ed structure, so tread it as such
https://bugs.webkit.org/show_bug.cgi?id=96659
Reviewed by Gyuyoung Kim.
Remove OwnPtr support for Evas_Object* and add support for it
with RefPtr instead (the latter moved from WebCore).
* wtf/PlatformEfl.cmake:
* wtf/efl/OwnPtrEfl.cpp:
* wtf/efl/RefPtrEfl.cpp: Renamed from Source/WebCore/platform/efl/RefPtrEfl.cpp.
(WTF):
(WTF::refIfNotNull):
(WTF::derefIfNotNull):
* wtf/efl/RefPtrEfl.h: Renamed from Source/WebCore/platform/efl/RefPtrEfl.h.
(WTF):
2012-09-14 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed, rolling out r128507.
http://trac.webkit.org/changeset/128507
https://bugs.webkit.org/show_bug.cgi?id=96659
Revert. r128507 makes too many crash in EFL layout test bots.
* wtf/PlatformEfl.cmake:
* wtf/efl/OwnPtrEfl.cpp:
(WTF::deleteOwnedPtr):
(WTF):
2012-09-13 Kevin Funk <kevin.funk@kdab.com>
Make compile with both OS(WINCE) and PLATFORM(QT) support
https://bugs.webkit.org/show_bug.cgi?id=95536
Reviewed by Simon Hausmann.
Fixes for Windows CE.
* WTF.pri:
Also include path for mt19937ar.c
* wtf/unicode/icu/CollatorICU.cpp:
Fix undeclared strdup() on CE7
* wtf/Platform.h:
2012-09-13 Byungseon Shin <xingri@gmail.com>
Fix for WTF fails to compile in thumb mode when llint is enabled.
https://bugs.webkit.org/show_bug.cgi?id=96400
Reviewed by Filip Pizlo.
When using "+m" with Armv7 cross compiler assume offset range between +/- 4095
(the largest possible offset range).
However, ldrex/strex can only use offset range of 0~1020, so "+m" needed to be changed to "+Q".
Ref. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54480
* wtf/Atomics.h:
(WTF::weakCompareAndSwap):
2012-09-13 Kenneth Rohde Christiansen <kenneth@webkit.org>
Evas_Object* is a ref'ed structure, so tread it as such
https://bugs.webkit.org/show_bug.cgi?id=96659
Reviewed by Adam Barth.
Remove OwnPtr support for Evas_Object* and add support for it
with RefPtr instead (the latter moved from WebCore).
* wtf/PlatformEfl.cmake:
* wtf/efl/OwnPtrEfl.cpp:
* wtf/efl/RefPtrEfl.cpp: Renamed from Source/WebCore/platform/efl/RefPtrEfl.cpp.
(WTF):
(WTF::refIfNotNull):
(WTF::derefIfNotNull):
* wtf/efl/RefPtrEfl.h: Renamed from Source/WebCore/platform/efl/RefPtrEfl.h.
(WTF):
2012-09-13 Michael Saboff <msaboff@apple.com>
Added 8 bit path to WidthIterator::advance()
https://bugs.webkit.org/show_bug.cgi?id=96590
Reviewed by Geoffrey Garen.
Added new character constant for Hiragana Letter Small A.
* wtf/unicode/CharacterNames.h:
(Unicode):
2012-09-13 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI: instrument KURL directly.
https://bugs.webkit.org/show_bug.cgi?id=96624
Reviewed by Yury Semikhatsky.
I replaced traits based instrumentation of KURL with reportMemoryUsage functions.
CString* were also instrumented.
Drive by fix: Instrumentation code in QualifiedName was moved to cpp.
* wtf/text/CString.h:
(CStringBuffer):
(WTF::CStringBuffer::reportMemoryUsage):
(CString):
(WTF::CString::reportMemoryUsage):
2012-09-12 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI: migrate core instrumentation code to WTF namespace
https://bugs.webkit.org/show_bug.cgi?id=96511
Reviewed by Yury Semikhatsky.
After moving core NMI code to WTF namespace I removed forward declarations
of MemoryObjectInfo and MemoryInstrumentation from WebCore headers and add
forward declaration into wtf/Forward.h
* wtf/Forward.h:
(WTF):
* wtf/MemoryInstrumentation.h:
2012-09-12 Dan Bernstein <mitz@apple.com>
Removed a reference to a file that doesn’t participate in any target.
* WTF.xcodeproj/project.pbxproj: Removed the reference to
CONTRIBUTORS.pthreads-win32.
2012-09-11 Michael Saboff <msaboff@apple.com>
Element::classAttributeChanged should use characters8/16 to find first non-whitespace
https://bugs.webkit.org/show_bug.cgi?id=96446
Reviewed by Benjamin Poulain.
Added bit size related string accessors to AtomicString to support change.
* wtf/text/AtomicString.h:
(AtomicString):
(WTF::AtomicString::is8Bit):
(WTF::AtomicString::characters8):
(WTF::AtomicString::characters16):
2012-09-12 Michael Saboff <msaboff@apple.com>
Build fixed for http://trac.webkit.org/changeset/128243
Unreviewed build fix.
Removed temporarily added function signature.
* icu/unicode/unistr.h:
(UnicodeString::extract):
2012-09-12 Michael Saboff <msaboff@apple.com>
Build fixed for http://trac.webkit.org/changeset/128243
Unreviewed build fix.
Change UnicodeString::extract for gcc based on ICU fix described in
http://bugs.icu-project.org/trac/ticket/8197.
* icu/unicode/unistr.h:
(UnicodeString::extract):
2012-09-12 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI move String* instrumentation to wtf.
https://bugs.webkit.org/show_bug.cgi?id=96405
Reviewed by Yury Semikhatsky.
This instrumentation is solving the problem with substrings and removes traits based code which is hard to upstream.
Tested by webkit_unit_tests.
* wtf/text/AtomicString.h:
(AtomicString):
(WTF::AtomicString::reportMemoryUsage):
* wtf/text/StringImpl.h:
(StringImpl):
(WTF::StringImpl::reportMemoryUsage):
* wtf/text/WTFString.h:
(String):
(WTF::String::reportMemoryUsage):
2012-09-12 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r128279.
http://trac.webkit.org/changeset/128279
https://bugs.webkit.org/show_bug.cgi?id=96487
"Snow Leopard compilation broken" (Requested by yurys on
#webkit).
* wtf/MemoryInstrumentation.h:
(GenericMemoryTypes):
(WebCore):
(WebCore::MemoryInstrumentation::addRootObject):
(WebCore::MemoryObjectInfo::reportObjectInfo):
(WebCore::MemoryClassInfo::MemoryClassInfo):
* wtf/text/AtomicString.h:
(AtomicString):
* wtf/text/StringImpl.h:
* wtf/text/WTFString.h:
2012-09-12 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: Persistent handle referenced from ScriptWrappable is double counted
https://bugs.webkit.org/show_bug.cgi?id=96483
Reviewed by Alexander Pavlov.
* wtf/MemoryInstrumentation.h:
(WebCore::MemoryClassInfo::addWeakPointer): this method is expected to be
used on fields that are pointers to objects which are parts of bigger memory
blocks (field of another object, element in an array, object allocated in a
memory arena etc.). We don't want to count such objects' memory separately
from their owners but in order to be able to validates the memory instrumentation
with clang plugin we need to make sure all fields in instrumented objects
are reported.
(MemoryClassInfo):
2012-09-12 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI move String* instrumentation to wtf.
https://bugs.webkit.org/show_bug.cgi?id=96405
Reviewed by Yury Semikhatsky.
This instrumentation is solving the problem with substrings and removes traits based code which is hard to upstream.
Tested by webkit_unit_tests.
* wtf/MemoryInstrumentation.h:
(WebCore):
(WebCore::MemoryInstrumentation::addRootObject):
(WebCore::MemoryObjectInfo::reportObjectInfo):
(WebCore::MemoryClassInfo::MemoryClassInfo):
* wtf/text/AtomicString.h:
(AtomicString):
(WTF::AtomicString::reportMemoryUsage):
* wtf/text/StringImpl.h:
(StringImpl):
(WTF::StringImpl::reportMemoryUsage):
* wtf/text/WTFString.h:
(String):
(WTF::String::reportMemoryUsage):
2012-09-11 Michael Saboff <msaboff@apple.com>
Build fixed for http://trac.webkit.org/changeset/128243
Unreviewed build fix.
Added missing include file needed by 96422 for C++ ICU APIs.
* icu/unicode/bytestream.h: Added.
* icu/unicode/rep.h: Added.
* icu/unicode/std_string.h: Added.
* icu/unicode/strenum.h: Added.
* icu/unicode/stringpiece.h: Added.
* icu/unicode/unistr.h: Added.
* icu/unicode/uobject.h: Added.
2012-09-11 Michael Saboff <msaboff@apple.com>
Build fixed for http://trac.webkit.org/changeset/128243
Rubber stamped by Stephanie Lewis.
Added missing include file needed by 96422.
* icu/unicode/unorm2.h: Added.
2012-09-11 Michael Saboff <msaboff@apple.com>
Build fixed for http://trac.webkit.org/changeset/128243
Rubber stamped by Stephanie Lewis.
Added missing include file needed by 96422.
* icu/unicode/ptypes.h: Added.
2012-09-11 Michael Saboff <msaboff@apple.com>
Update ICU header files to more recent version
https://bugs.webkit.org/show_bug.cgi?id=96422
Reviewed by Geoff Garen.
Updated ICU header files to 4.6.1. Modifications made as part of the merge are:
platform.h - Changed ifndef / define / endif for U_HAVE_UINT8_T, U_HAVE_UINT16_T, U_HAVE_UINT32_T,
U_HAVE_UINT64_T, U_IS_BIG_ENDIAN and U_ENABLE_TRACING to match the existing platform.h
putil.h (line 132) - Changes defined(U_WINDOWS) to defined(WIN32) || defined(OS2) to match existing putil.h
ustring.h (line 945) - Wrapped macro argument cs with { (const UChar *)cs } to match existing ustring.h
utypes.h (line 545) - Changed defined(U_WINDOWS) to defined(WIN32) to match existing utypes.h
* icu/unicode/localpointer.h: Added.
* icu/unicode/parseerr.h:
* icu/unicode/platform.h:
* icu/unicode/putil.h:
* icu/unicode/uchar.h:
* icu/unicode/ucnv.h:
* icu/unicode/ucnv_err.h:
* icu/unicode/ucol.h:
* icu/unicode/uconfig.h:
* icu/unicode/uenum.h:
* icu/unicode/uiter.h:
* icu/unicode/uloc.h:
* icu/unicode/umachine.h:
* icu/unicode/unorm.h:
* icu/unicode/urename.h:
* icu/unicode/uscript.h:
* icu/unicode/uset.h:
* icu/unicode/ustring.h:
* icu/unicode/utf.h:
* icu/unicode/utf16.h:
* icu/unicode/utf8.h:
* icu/unicode/utypes.h:
* icu/unicode/uvernum.h: Added.
* icu/unicode/uversion.h:
2012-09-11 Pratik Solanki <psolanki@apple.com>
Add ObjcRuntimeExtras.h to the Xcode project file
https://bugs.webkit.org/show_bug.cgi?id=96419
Reviewed by Alexey Proskuryakov.
* WTF.xcodeproj/project.pbxproj:
2012-09-11 Adrienne Walker <enne@google.com>
Clang doesn't optimize away undefined OwnPtr copy constructor
https://bugs.webkit.org/show_bug.cgi?id=74625
Reviewed by Anders Carlsson.
Original patch by Anders Carlsson, with a minor edit.
The publicly declared-but-not-defined copy constructor is a compiler
optimization-dependent landmine. Clang often fails to optimize the use
of this function out, leading to internal linkage errors for the missing
definition. gcc doesn't have this problem and optimizes that function
out, leading to code that inconsistently fails to link across platforms.
As a partial fix for this problem, on any compiler that supports C++11
move semantics, replace the bogus copy constructor with the move
constructors. In the future, if all compilers support this, then the
copy constructor can be removed.
This still leaves other compilers that don't support move semantics
like Visual Studio vulnerable to linking inconsistencies.
* wtf/OwnPtr.h:
(OwnPtr):
(WTF):
(WTF::::OwnPtr):
(WTF::=):
2012-09-11 Raphael Kubo da Costa <rakuco@webkit.org>
[EFL] Rewrite the EFL-related Find modules
https://bugs.webkit.org/show_bug.cgi?id=95237
Reviewed by Kenneth Rohde Christiansen.
* CMakeLists.txt: Stop setting the LINK_FLAGS property.
* PlatformEfl.cmake: Add libraries and include directories for
each Enlightenment Foundation Library used by the port.
2012-09-11 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Add a configure step to the Qt build system
This allows building the Qt port using just 'qmake WebKit.pro'. Using
the build-webkit script is still supported, and will add slightly more
logic to the build, such as detecting the need for clean or incremental
builds.
Internally, the build system now uses a new variable, WEBKIT_CONFIG, for
all things related to configuring the build, such as use/have/enable flags,
and these are translated to defines in default_post. Project files should
no longer check contains(DEFINES,...) to detect features, but use the new
enable?(), use?(), and have?() functions. The no_webkit1 and no_webkit2
options have been translated into WEBKIT_CONFIG options as well, and can
be checked using build?().
Reviewed by Simon Hausmann.
* WTF.pri:
* wtf/Platform.h:
2012-09-10 Ilya Tikhonovsky <loislo@chromium.org>
Web Inspector: NMI: move MemoryInstrumentation.h to wtf
https://bugs.webkit.org/show_bug.cgi?id=96356
Reviewed by Yury Semikhatsky.
It is necessary step because it helps us to remove dependency between platform and WebCore.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/MemoryInstrumentation.h: Renamed from Source/WebCore/dom/MemoryInstrumentation.h.
(WebCore):
(GenericMemoryTypes):
(MemoryInstrumentationTraits):
(MemoryInstrumentation):
(WebCore::MemoryInstrumentation::~MemoryInstrumentation):
(WebCore::MemoryInstrumentation::addRootObject):
(InstrumentedPointerBase):
(WebCore::MemoryInstrumentation::InstrumentedPointerBase::~InstrumentedPointerBase):
(InstrumentedPointer):
(WebCore::MemoryInstrumentation::InstrumentedPointer::InstrumentedPointer):
(WebCore::MemoryInstrumentation::addObject):
(WebCore::MemoryInstrumentation::addInstrumentedObject):
(WebCore::MemoryInstrumentation::addRawBuffer):
(WebCore::MemoryInstrumentation::OwningTraits::addInstrumentedObject):
(WebCore::MemoryInstrumentation::OwningTraits::addObject):
(WebCore::MemoryInstrumentationTraits::addInstrumentedObject):
(WebCore::MemoryInstrumentationTraits::addObject):
(MemoryObjectInfo):
(WebCore::MemoryObjectInfo::MemoryObjectInfo):
(WebCore::MemoryObjectInfo::objectType):
(WebCore::MemoryObjectInfo::objectSize):
(WebCore::MemoryObjectInfo::memoryInstrumentation):
(WebCore::MemoryObjectInfo::reportObjectInfo):
(MemoryClassInfo):
(WebCore::MemoryClassInfo::MemoryClassInfo):
(WebCore::MemoryClassInfo::addInstrumentedMember):
(WebCore::MemoryClassInfo::addMember):
(WebCore::MemoryClassInfo::addHashMap):
(WebCore::MemoryClassInfo::addHashSet):
(WebCore::MemoryClassInfo::addHashCountedSet):
(WebCore::MemoryClassInfo::addInstrumentedHashSet):
(WebCore::MemoryClassInfo::addInstrumentedVector):
(WebCore::MemoryClassInfo::addInstrumentedVectorPtr):
(WebCore::MemoryClassInfo::addInstrumentedMapEntries):
(WebCore::MemoryClassInfo::addInstrumentedMapValues):
(WebCore::MemoryClassInfo::addListHashSet):
(WebCore::MemoryClassInfo::addVector):
(WebCore::MemoryClassInfo::addVectorPtr):
(WebCore::MemoryClassInfo::addRawBuffer):
(WebCore::MemoryInstrumentation::addInstrumentedObjectImpl):
(WebCore::MemoryInstrumentation::addObjectImpl):
(WebCore::MemoryInstrumentation::addHashMap):
(WebCore::MemoryInstrumentation::addHashSet):
(WebCore::MemoryInstrumentation::addInstrumentedCollection):
(WebCore::MemoryInstrumentation::addInstrumentedMapEntries):
(WebCore::MemoryInstrumentation::addInstrumentedMapValues):
(WebCore::MemoryInstrumentation::addListHashSet):
(WebCore::MemoryInstrumentation::addVector):
(WebCore::MemoryInstrumentation::calculateContainerSize):
(WebCore::::process):
2012-09-09 Mark Lam <mark.lam@apple.com>
Fixed ASSERT() and ASSERT_AT() macros so that they can be used in
comma expressions. Also, added UNUSED_LABEL().
https://bugs.webkit.org/show_bug.cgi?id=96127.
Reviewed by Geoffrey Garen.
* wtf/Assertions.h:
* wtf/UnusedParam.h: Added UNUSED_LABEL(). Removed an obsolete comment.
2012-09-09 Patrick Gansterer <paroga@webkit.org>
Add StringBuilder::appendNumber() and use it
https://bugs.webkit.org/show_bug.cgi?id=96030
Reviewed by Eric Seidel.
Also fix a bunch of append() vs. appendLiteral() issues in the surrounding code.
* wtf/DateMath.cpp:
(WTF::makeRFC2822DateString):
* wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::appendNumber):
* wtf/text/StringBuilder.h:
(StringBuilder):
2012-09-09 Patrick Gansterer <paroga@webkit.org>
Make the String initialization on the function side of String::number()
https://bugs.webkit.org/show_bug.cgi?id=95940
Reviewed by Benjamin Poulain.
Un-Inline String::number() to make the String initialization done on the function side
instead of being on the caller side.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/text/IntegerToStringConversion.cpp: Removed.
* wtf/text/IntegerToStringConversion.h:
(WTF::numberToStringImpl):
(WTF::numberToStringSigned):
(WTF::numberToStringUnsigned):
* wtf/text/WTFString.cpp:
(WTF::String::number):
* wtf/text/WTFString.h:
2012-09-08 Andreas Kling <kling@webkit.org>
Give AtomicString SimpleClassVectorTraits.
<http://webkit.org/b/96186>
Reviewed by Karl Anders Carlsson.
AtomicString can be initialized/moved/compared with memset/memcpy/memcmp,
so add a VectorTraits<AtomicString> to make Vector<AtomicString> a little
more efficient.
* wtf/VectorTraits.h:
2012-09-07 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r127938.
http://trac.webkit.org/changeset/127938
https://bugs.webkit.org/show_bug.cgi?id=96166
It broke the build (Requested by smfr on #webkit).
* wtf/Assertions.h:
2012-09-07 Mark Lam <mark.lam@apple.com>
Fixed ASSERT() and ASSERT_AT() macros so that they can be used in
comma expressions.
https://bugs.webkit.org/show_bug.cgi?id=96127.
Reviewed by Filip Pizlo.
* wtf/Assertions.h:
(wtfAssert):
2012-09-07 Michael Saboff <msaboff@apple.com>
StringImpl::find(StringImpl*) doesn't handle cases where search and match strings are different bitness
https://bugs.webkit.org/show_bug.cgi?id=96125
Reviewed by Benjamin Poulain.
Changed findInner and reverseFindInner to be templated on both search and match character types.
Changed both find's and reverseFind to use all four bitness combinations of findInner and
reverseFindInner.
* wtf/text/StringImpl.cpp:
(WTF::findInner):
(WTF::StringImpl::find):
(WTF::reverseFindInner):
(WTF::StringImpl::reverseFind):
2012-09-07 Michael Saboff <msaboff@apple.com>
equalIgnoringCase of two StringImpls doesn't handle 8 bit strings
https://bugs.webkit.org/show_bug.cgi?id=96028
Reviewed by Benjamin Poulain.
Added 8 bit checks and paths to CaseFoldingHash::equal. Also cleaned up StringHash::equal(), removing
obvious and in one case wrong comments. Moved equalIgnoringCase(UChar*, UChar*) from StringImpl.cpp
to StringImpl.h.
* wtf/text/StringHash.h:
(WTF::StringHash::equal):
(WTF::CaseFoldingHash::equal):
* wtf/text/StringImpl.cpp:
* wtf/text/StringImpl.h:
(WTF::equalIgnoringCase):
2012-09-07 Patrick Gansterer <paroga@webkit.org>
[WIN] Deprecate String += operator
https://bugs.webkit.org/show_bug.cgi?id=96083
Reviewed by Adam Barth.
* wtf/Platform.h:
2012-09-06 Michael Saboff <msaboff@apple.com>
StringBuilder::toAtomicString() can create an 16 bit string with 8 bit contents
https://bugs.webkit.org/show_bug.cgi?id=96029
Reviewed by Benjamin Poulain.
Added 8 bit path when creating an AtomicString from a partial 8 bit buffer.
* wtf/text/StringBuilder.h:
(WTF::StringBuilder::toAtomicString):
2012-09-06 Michael Saboff <msaboff@apple.com>
16 bit JSRopeString up converts an 8 bit fibers to 16 bits during resolution
https://bugs.webkit.org/show_bug.cgi?id=95810
Reviewed by Benjamin Poulain.
New copy routine that takes an 8 bit source and a 16 bit destination. Used when copying
the contents of an 8 bit fiber to the 16 bit buffer when resolving a 16 bit rope.
* wtf/text/StringImpl.h:
(WTF::StringImpl::copyChars):
(StringImpl):
2012-09-06 Michael Saboff <msaboff@apple.com>
Unreviewed fix to r127799.
https://bugs.webkit.org/show_bug.cgi?id=95807
Unreviewed fix.
Removed extraneous "static". This code is hidden behind STRING_STATS define and
therefore is not enabled by default.
* wtf/text/StringImpl.cpp:
2012-09-06 Lauro Neto <lauro.neto@openbossa.org>
[Qt] Deprecate String += operator
https://bugs.webkit.org/show_bug.cgi?id=95895
Reviewed by Benjamin Poulain.
Remove Qt from WTF_DEPRECATED_STRING_OPERATORS guard.
* wtf/Platform.h:
2012-09-06 Michael Saboff <msaboff@apple.com>
ENH: Add Logging to StringImpl to track String Types
https://bugs.webkit.org/show_bug.cgi?id=95807
Reviewed by Benjamin Poulain.
Added StringsStats class that keeps track of the number of strings, number of 8 and 16 bit
strings as well as the number of 8 bit strings up converted to 16 bits. The number of characrters
for each type is also accumulated. These statistics are output via DataLog every 5000
calls to StringImpl destructor. The 5000 can be adjusted via s_printStringStatsFrequency.
This StringStats code is disabled by default and enabled by defining STRING_STATS in
wtf/text/StringImpl.h.
* wtf/text/StringImpl.cpp:
(WTF::StringStats::removeString):
(WTF::StringStats::printStats):
(WTF::StringImpl::~StringImpl):
(WTF::StringImpl::getData16SlowCase):
* wtf/text/StringImpl.h:
(WTF::StringStats::add8BitString):
(StringStats):
(WTF::StringStats::add16BitString):
(WTF::StringStats::addUpconvertedString):
(WTF::StringImpl::StringImpl):
(StringImpl):
(WTF::StringImpl::isSubString):
(WTF::StringImpl::stringStats):
2012-09-06 Patrick Gansterer <paroga@webkit.org>
Fix export macros in IntegerToStringConversion.h
https://bugs.webkit.org/show_bug.cgi?id=95900
Reviewed by Benjamin Poulain.
The WTF_EXPORT_STRING_API must be used only for symbols which are compiled
on windows in "non-WTF" binaries too. Since this isn't valid for the
IntegerToStringConversion function replace it with WTF_EXPORT_PRIVATE.
* wtf/text/IntegerToStringConversion.h:
2012-09-06 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Various small Windows / MSVC build fixes
https://bugs.webkit.org/show_bug.cgi?id=95934
Reviewed by Kenneth Rohde Christiansen.
For the Qt build on Windows, do not enable WTF_USE_UNIX_DOMAIN_SOCKETS for
WebKit2 IPC.
* wtf/Platform.h:
2012-09-06 Adam Barth <abarth@chromium.org>
Remove WTF::String::operator+=
https://bugs.webkit.org/show_bug.cgi?id=95797
Reviewed by Sam Weinig.
This patch encloses WTF::String::operator+= in an ifdef so that we can
gradually remove it from the various port-specific files. The ifdef
lets us whitelist use of operator+= in individual files during the
transition.
* wtf/Platform.h
* wtf/text/WTFString.h:
2012-09-05 Gabor Rapcsanyi <rgabor@webkit.org>
DFG JIT doesn't work properly on ARM hardfp
https://bugs.webkit.org/show_bug.cgi?id=95684
Reviewed by Filip Pizlo.
Add hardfp support to DFG JIT. The patch is created with the
help of Zoltan Herczeg.
* wtf/Platform.h:
2012-09-04 Zoltan Horvath <zoltan@webkit.org>
Extend the coverage of the Custom Allocation Framework in WTF and in JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=95737
Reviewed by Eric Seidel.
Add WTF_MAKE_FAST_ALLOCATED macro to the following class declarations because these are instantiated by operator new.
* wtf/CryptographicallyRandomNumber.cpp: CryptographicallyRandomNumber is instantiated at wtf/CryptographicallyRandomNumber.cpp:162.
* wtf/MediaTime.h: MediaTime is instantiated at wtf/MediaTime.cpp:288.
* wtf/MetaAllocator.h:
(MetaAllocatorTracker): MetaAllocatorTracker is instantiated at JavaScriptCore/tools/CodeProfiling.cpp:120.
* wtf/ThreadingPthreads.cpp:
(PthreadState): PthreadState is instantiated at wtf/ThreadingPthreads.cpp:165.
* wtf/text/AtomicString.cpp:
(AtomicStringTable): AtomicStringTable is instantiated at wtf/text/AtomicString.cpp:43.
2012-09-01 Mark Lam <mark.lam@apple.com>
LLInt C loop backend.
https://bugs.webkit.org/show_bug.cgi?id=91052.
Reviewed by Filip Pizlo.
Added configs for the llint C loop backend.
* wtf/Platform.h:
2012-08-31 Pratik Solanki <psolanki@apple.com>
objc_msgSend and IMP should be cast appropriately before using
https://bugs.webkit.org/show_bug.cgi?id=95242
Reviewed by Benjamin Poulain.
Fix for older compilers. Pass id as the return type to the template
instead of relying on default type.
* wtf/Functional.h:
(WTF::R):
* wtf/ObjcRuntimeExtras.h:
2012-08-31 Michael Saboff <msaboff@apple.com>
CSS Parser should directly parse 8 bit source strings
https://bugs.webkit.org/show_bug.cgi?id=95207
Reviewed by Geoffrey Garen.
* wtf/text/StringImpl.h:
(WTF::equalIgnoringCase): Added (const char*, const LChar*, unsigned) flavor to support
8 bit CSS parser work.
2012-08-30 Benjamin Poulain <bpoulain@apple.com>
AtomicString(ASCIILiteral) should not compile
https://bugs.webkit.org/show_bug.cgi?id=95413
Reviewed by Adam Barth.
* wtf/text/AtomicString.h:
(AtomicString): Declare the constructor from ASCIILiteral private to ensure it is
not used by accident.
2012-08-30 Benjamin Poulain <bpoulain@apple.com>
Ambiguous operator[] after r127191 on some compiler
https://bugs.webkit.org/show_bug.cgi?id=95509
Reviewed by Simon Fraser.
* wtf/text/WTFString.h:
(WTF::String::characterAt): At this as a synonym to operator[] to attempt a build fix.
2012-08-30 Mark Lam <mark.lam@apple.com>
Render unto #ifdef's that which belong to them.
https://bugs.webkit.org/show_bug.cgi?id=95482.
Reviewed by Filip Pizlo.
* wtf/Platform.h: Added ENABLE(COMPUTED_GOTO_OPCODES).
2012-08-30 Pratik Solanki <psolanki@apple.com>
objc_msgSend and IMP should be cast appropriately before using
https://bugs.webkit.org/show_bug.cgi?id=95242
Reviewed by Benjamin Poulain.
Add new templates wtfObjcMsgSend and wtfCallIMP that do the appropriate
casts to correctly typed function pointers before calling objc_msgSend
and IMP methods directly.
* wtf/Functional.h:
(WTF::R): Use wtfObjcMsgSend.
* wtf/ObjcRuntimeExtras.h: Added.
(wtfObjcMsgSend):
(wtfCallIMP):
2012-08-30 Benjamin Poulain <bpoulain@apple.com>
Replace JSC::UString by WTF::String
https://bugs.webkit.org/show_bug.cgi?id=95271
Reviewed by Geoffrey Garen.
* wtf/Platform.h: Useless edit to force a full build. This is needed for some bots for some reason.
* wtf/text/WTFString.h: Export a symbol that was exported on UString and needed in WebCore.
Add String::getCharactersWithUpconvert<>(), which is similar to String::getCharacters<>() but with the same
behaviors as UString::getCharacters<>().
String::getCharactersWithUpconvert<>() is useful when manipulating multiple strings, it allow writting code
using 16bits characters if any of the input String is not 8bit.
2012-08-30 Yong Li <yoli@rim.com>
Vector::shrinkToFit should use realloc when suitable.
https://bugs.webkit.org/show_bug.cgi?id=94810
Reviewed by Benjamin Poulain.
Only tested on BlackBerry. So it is wrapped with PLATFORM(BLACKBERRY) in the mean time.
Use realloc to shrink buffer when inline buffer isn't involved and and canMoveWithMemcpy is true.
When running the test code attached to the bug, it gives 30-45% performance boost for the large blocks
(Every test cycle includes an extra pair of malloc/free, so the boost on shrinkToFit() is even bigger)
Performance impact on small blocks is not noticeable. (Tested on BlackBerry)
* wtf/Vector.h:
(WTF::VectorBufferBase::shouldReallocateBuffer):
(VectorBufferBase):
(WTF::VectorBufferBase::reallocateBuffer):
(VectorBuffer):
(WTF::VectorBuffer::shouldReallocateBuffer):
(WTF::VectorBuffer::reallocateBuffer):
(WTF::VectorBuffer::inlineBuffer):
(WTF::::shrinkCapacity):
2012-08-30 Patrick Gansterer <paroga@webkit.org>
Build fix for COMPILER(MSVC) && !CPU(X86) after r127001.
* wtf/MathExtras.h:
(lrint): Added additional parentheses to silence compiler warning.
2012-08-29 Benjamin Poulain <bpoulain@apple.com>
REGRESSION(r126780): Crash using StringImpl::is8Bit before checking if there is an impl
https://bugs.webkit.org/show_bug.cgi?id=95380
Reviewed by Michael Saboff.
Blindly copying code from UString in r126780 was stupid. I just brought over a bug.
This patch adds the zero length branch back so that null strings are handled correctly.
* wtf/text/WTFString.cpp:
(WTF::String::ascii): Return a empty CString if the String is null or empty.
2012-08-29 Dominik Röttsches <dominik.rottsches@intel.com>
The 2d.imageData.object.round canvas test is failing
https://bugs.webkit.org/show_bug.cgi?id=40272
Reviewed by Benjamin Poulain.
Updating previous patch to address Benjamin's comments.
#ifdef in Uint8ClampedArray removed, fallback implementation for MSVC on non-X86 added.
* wtf/MathExtras.h:
(lrint): Fallback implementation for non-X86 & MSVC case.
* wtf/Uint8ClampedArray.h: Removed #ifdef.
2012-08-28 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r126914.
http://trac.webkit.org/changeset/126914
https://bugs.webkit.org/show_bug.cgi?id=95239
it breaks everything and fixes nothing (Requested by pizlo on
#webkit).
* wtf/HashCountedSet.h:
(WTF::::add):
(WTF::::remove):
(WTF::copyToVector):
* wtf/HashIterators.h:
(WTF::HashTableConstKeysIterator::get):
(WTF::HashTableConstValuesIterator::get):
(WTF::HashTableKeysIterator::get):
(WTF::HashTableValuesIterator::get):
* wtf/HashMap.h:
(WTF::KeyValuePairKeyExtractor::extract):
(WTF::HashMapValueTraits::isEmptyValue):
(WTF::HashMapTranslator::translate):
(WTF::HashMapTranslatorAdapter::translate):
(WTF::::set):
(WTF::::get):
(WTF::::take):
(WTF::operator==):
(WTF):
(WTF::deleteAllPairSeconds):
(WTF::deleteAllValues):
(WTF::deleteAllPairFirsts):
(WTF::deleteAllKeys):
* wtf/HashTable.h:
(WTF::hashTableSwap):
(WTF::::checkTableConsistencyExceptSize):
* wtf/HashTraits.h:
(WTF::KeyValuePair::KeyValuePair):
(KeyValuePair):
(WTF::KeyValuePairHashTraits::constructDeletedValue):
(WTF::KeyValuePairHashTraits::isDeletedValue):
* wtf/MetaAllocator.cpp:
(WTF::MetaAllocator::addFreeSpace):
(WTF::MetaAllocator::incrementPageOccupancy):
(WTF::MetaAllocator::decrementPageOccupancy):
* wtf/RefCountedLeakCounter.cpp:
(WTF::RefCountedLeakCounter::~RefCountedLeakCounter):
* wtf/RefPtrHashMap.h:
(WTF::::set):
(WTF::::get):
(WTF::::inlineGet):
(WTF::::take):
* wtf/Spectrum.h:
(WTF::Spectrum::add):
(WTF::Spectrum::get):
(WTF::Spectrum::buildList):
* wtf/ThreadingPthreads.cpp:
(WTF::identifierByPthreadHandle):
2012-08-28 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Rename first/second to key/value in HashMap iterators
https://bugs.webkit.org/show_bug.cgi?id=82784
Reviewed by Eric Seidel.
* wtf/HashCountedSet.h:
(WTF::::add):
(WTF::::remove):
(WTF::copyToVector):
* wtf/HashIterators.h:
(WTF::HashTableConstKeysIterator::get):
(WTF::HashTableConstValuesIterator::get):
(WTF::HashTableKeysIterator::get):
(WTF::HashTableValuesIterator::get):
* wtf/HashMap.h:
(WTF::KeyValuePairKeyExtractor::extract):
(WTF::HashMapValueTraits::isEmptyValue):
(WTF::HashMapTranslator::translate):
(WTF::HashMapTranslatorAdapter::translate):
(WTF::::set):
(WTF::::get):
(WTF::::take):
(WTF::operator==):
(WTF::deleteAllValues):
(WTF::deleteAllKeys):
Remove deleteAllPairFirsts/Seconds.
* wtf/HashTable.h:
(WTF::hashTableSwap):
(WTF::::checkTableConsistencyExceptSize):
* wtf/HashTraits.h:
(WTF::KeyValuePair::KeyValuePair):
(KeyValuePair):
(WTF::KeyValuePairHashTraits::constructDeletedValue):
(WTF::KeyValuePairHashTraits::isDeletedValue):
* wtf/MetaAllocator.cpp:
(WTF::MetaAllocator::addFreeSpace):
(WTF::MetaAllocator::incrementPageOccupancy):
(WTF::MetaAllocator::decrementPageOccupancy):
* wtf/RefCountedLeakCounter.cpp:
(WTF::RefCountedLeakCounter::~RefCountedLeakCounter):
* wtf/RefPtrHashMap.h:
(WTF::::set):
(WTF::::get):
(WTF::::inlineGet):
(WTF::::take):
* wtf/Spectrum.h:
(WTF::Spectrum::add):
(WTF::Spectrum::get):
(WTF::Spectrum::buildList):
* wtf/ThreadingPthreads.cpp:
(WTF::identifierByPthreadHandle):
2012-08-27 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r126836.
http://trac.webkit.org/changeset/126836
https://bugs.webkit.org/show_bug.cgi?id=95163
Broke all Apple ports, EFL, and Qt. (Requested by tkent on
#webkit).
* wtf/HashCountedSet.h:
(WTF::::add):
(WTF::::remove):
(WTF::copyToVector):
* wtf/HashIterators.h:
(WTF::HashTableConstKeysIterator::get):
(WTF::HashTableConstValuesIterator::get):
(WTF::HashTableValuesIterator::get):
* wtf/HashMap.h:
(WTF::KeyValuePairKeyExtractor::extract):
(WTF::HashMapValueTraits::isEmptyValue):
(WTF::HashMapTranslator::translate):
(WTF::HashMapTranslatorAdapter::translate):
(WTF::::set):
(WTF::::get):
(WTF::::take):
(WTF::operator==):
(WTF):
(WTF::deleteAllPairSeconds):
(WTF::deleteAllValues):
(WTF::deleteAllPairFirsts):
(WTF::deleteAllKeys):
* wtf/HashTable.h:
(WTF::hashTableSwap):
(WTF::::checkTableConsistencyExceptSize):
* wtf/HashTraits.h:
(WTF::KeyValuePair::KeyValuePair):
(KeyValuePair):
(WTF::KeyValuePairHashTraits::constructDeletedValue):
(WTF::KeyValuePairHashTraits::isDeletedValue):
* wtf/MetaAllocator.cpp:
(WTF::MetaAllocator::addFreeSpace):
(WTF::MetaAllocator::incrementPageOccupancy):
(WTF::MetaAllocator::decrementPageOccupancy):
* wtf/RefCountedLeakCounter.cpp:
(WTF::RefCountedLeakCounter::~RefCountedLeakCounter):
* wtf/RefPtrHashMap.h:
(WTF::::set):
(WTF::::get):
(WTF::::inlineGet):
(WTF::::take):
* wtf/Spectrum.h:
(WTF::Spectrum::add):
(WTF::Spectrum::get):
(WTF::Spectrum::buildList):
* wtf/ThreadingPthreads.cpp:
(WTF::identifierByPthreadHandle):
2012-08-27 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Rename first/second to key/value in HashMap iterators
https://bugs.webkit.org/show_bug.cgi?id=82784
Reviewed by Eric Seidel.
* wtf/HashCountedSet.h:
(WTF::::add):
(WTF::::remove):
(WTF::copyToVector):
* wtf/HashIterators.h:
(WTF::HashTableConstKeysIterator::get):
(WTF::HashTableConstValuesIterator::get):
(WTF::HashTableValuesIterator::get):
* wtf/HashMap.h:
(WTF::KeyValuePairKeyExtractor::extract):
(WTF::HashMapValueTraits::isEmptyValue):
(WTF::HashMapTranslator::translate):
(WTF::HashMapTranslatorAdapter::translate):
(WTF::::set):
(WTF::::get):
(WTF::::take):
(WTF::operator==):
(WTF::deleteAllValues):
(WTF::deleteAllKeys):
Remove deleteAllPairFirsts/Seconds.
* wtf/HashTable.h:
(WTF::hashTableSwap):
(WTF::::checkTableConsistencyExceptSize):
* wtf/HashTraits.h:
(WTF::KeyValuePair::KeyValuePair):
(KeyValuePair):
(WTF::KeyValuePairHashTraits::constructDeletedValue):
(WTF::KeyValuePairHashTraits::isDeletedValue):
* wtf/MetaAllocator.cpp:
(WTF::MetaAllocator::addFreeSpace):
(WTF::MetaAllocator::incrementPageOccupancy):
(WTF::MetaAllocator::decrementPageOccupancy):
* wtf/RefCountedLeakCounter.cpp:
(WTF::RefCountedLeakCounter::~RefCountedLeakCounter):
* wtf/RefPtrHashMap.h:
(WTF::::set):
(WTF::::get):
(WTF::::inlineGet):
(WTF::::take):
* wtf/Spectrum.h:
(WTF::Spectrum::add):
(WTF::Spectrum::get):
(WTF::Spectrum::buildList):
* wtf/ThreadingPthreads.cpp:
(WTF::identifierByPthreadHandle):
2012-08-27 Benjamin Poulain <benjamin@webkit.org>
Add ECMAScript Number to String conversion to WTF::String
https://bugs.webkit.org/show_bug.cgi?id=95016
Reviewed by Geoffrey Garen.
* wtf/text/WTFString.cpp:
(WTF::String::numberToStringECMAScript):
* wtf/text/WTFString.h:
Add the implementation of numberToStringECMAScript(double) from UString to String.
This will make it easier to replace UString in the future.
2012-08-27 Benjamin Poulain <benjamin@webkit.org>
Even up WTF::String to CString functions
https://bugs.webkit.org/show_bug.cgi?id=95008
Reviewed by Sam Weinig.
Apply advantages from UString to WTF::String.
* wtf/text/WTFString.cpp:
(WTF::String::ascii): There is no need to special case the null length, both
following branches use CString::newUninitialized(), which create empty string
for null length.
(WTF::String::latin1): Use characters16() instead of characters() to avoid
testing is8Bit() a second time.
2012-08-24 Benjamin Poulain <benjamin@webkit.org>
Touch Platform.h to solve a build dependency issue
Unreviewed.
* wtf/Platform.h:
2012-08-24 Benjamin Poulain <bpoulain@apple.com>
Unify Number to StringImpl conversion
https://bugs.webkit.org/show_bug.cgi?id=94879
Reviewed by Geoffrey Garen.
Previously, UString::number() and String::number() used different implementations.
WTF::String::number() was simply forwarding to String::format().
UString::number() had an optimized version of the conversion.
This patch replace both implementation by a new version, faster than the two previous versions.
The new functions numberToStringImpl improvements are:
-about 3 times faster than String::number().
-14% faster than UString::number() on signed numbers.
-9% faster than UString::number() on unsigned numbers.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/text/IntegerToStringConversion.cpp: Added.
(WTF::numberToStringImplSigned):
(WTF::numberToStringImpl):
(WTF::numberToStringImplUnsigned):
* wtf/text/IntegerToStringConversion.h: Added.
* wtf/text/WTFString.cpp:
(WTF::String::format):
* wtf/text/WTFString.h:
(WTF::String::number):
2012-08-24 Andras Becsi <andras.becsi@nokia.com>
[Qt] Be more explicit about the ICU dependency in the error message
Rubber-stamped by Simon Hausmann.
When building QtWebKit with a Qt5 which was not configured with libICU support
the error message is somewhat ambiguous about the indirect dependency.
* WTF.pri:
2012-08-23 Julien Chaffraix <jchaffraix@webkit.org>
[Chromium] Enable AtomicString && CString && WTFString && StringImpl unit tests
https://bugs.webkit.org/show_bug.cgi?id=94871
Reviewed by Benjamin Poulain.
* wtf/PassRefPtr.h:
We need to include Assertions.h due to the COMPILE_ASSERT added in r89283.
This matches other files in WTF though I am not sure why Chromium is the only
platform complaining about that.
2012-08-23 Mark Rowe <mrowe@apple.com>
Build fix for old, old versions of Clang.
* wtf/FastMalloc.cpp:
(WTF): Rejigger things so that they parse correctly if __has_warning isn't defined.
2012-08-23 Emil A Eklund <eae@chromium.org>
Add saturation arithmetic support to FractionalLayoutUnit
https://bugs.webkit.org/show_bug.cgi?id=94364
Reviewed by Benjamin Poulain.
Add support functions for saturated addition and subtraction.
Test: TestWebKitAPI/Tests/WTF/SaturatedArithmeticOperations.cpp
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* WTF/wtf/CMakeLists.txt:
Add SaturatedArithmetic.h to build files.
* wtf/SaturatedArithmetic.h: Added.
(saturatedAddition):
(saturatedSubtraction):
Support functions for saturated addition/subtraction. Compares the signed
bit of the values instead of using range checks to reduce branching.
* wtf/Platform.h:
Add ENABLE_SATURATED_LAYOUT_ARITHMETIC flag.
2012-08-23 Mark Rowe <mrowe@apple.com>
Roll back in the part of r126475 that I had rolled out.
* wtf/FastMalloc.cpp:
(WTF): Disable the -Wunused-private-field warning around the declaration of
TCMalloc_Central_FreeListPadded since the padding is intentionally unused.
Only disable the warning if we detect it is enabled, since the warning may not
be supported by the version of Clang that is being used.
2012-08-23 Mark Rowe <mrowe@apple.com>
Roll out part of r126475 that breaks the build with older versions of Clang.
* wtf/FastMalloc.cpp:
2012-08-23 Mark Rowe <mrowe@apple.com>
Make WTF build with the latest version of clang.
Reviewed by Dan Bernstein.
* wtf/FastMalloc.cpp:
(WTF): Disable the -Wunused-private-field warning around the declaration of
TCMalloc_Central_FreeListPadded since the padding is intentionally unused.
(WTF::AdminRegionRecorder): Remove the unused m_reader member.
(WTF::FastMallocZone::enumerate): Don't pass in the RemoteMemoryReader since
it is no longer needed.
2012-08-22 Geoffrey Garen <ggaren@apple.com>
Fixed a fastMallocForbid/Allow compile error for some compilers
https://bugs.webkit.org/show_bug.cgi?id=94775
Reviewed by Gavin Barraclough.
* wtf/FastMalloc.h:
(WTF::fastMallocForbid()):
(WTF::fastMallocAllow()): Export, since these are called by JavaScriptCore.
2012-08-22 Geoffrey Garen <ggaren@apple.com>
ThreadRestrictionVerifier should be opt-in, not opt-out
https://bugs.webkit.org/show_bug.cgi?id=94761
Reviewed by Mark Hahnenberg.
WebKit's JavaScript engine supports use on multiple threads, so default-on
is not appropriate for most of our objects, and it causes lots of suprious
assertions.
* wtf/MetaAllocator.cpp:
(WTF::MetaAllocatorHandle::MetaAllocatorHandle): No need to turn off
explicitly, since it's off by default now.
* wtf/ThreadRestrictionVerifier.h:
(WTF::ThreadRestrictionVerifier::ThreadRestrictionVerifier): Turn off by default.
(WTF::ThreadRestrictionVerifier::setMutexMode):
(WTF::ThreadRestrictionVerifier::setDispatchQueueMode):
(WTF::ThreadRestrictionVerifier::turnOffVerification): These assertions
about state transitions were inconsistent with each other, and impossible
to maintain with default off, so I removed them.
2012-08-22 Allan Sandfeld Jensen <allan.jensen@nokia.com>
[Qt] Optionally support smooth-scrolling on all platforms
https://bugs.webkit.org/show_bug.cgi?id=74926
Reviewed by Simon Hausmann.
Initialize GESTURE_ANIMATION feature flag.
* wtf/Platform.h:
2012-08-21 Mark Hahnenberg <mhahnenberg@apple.com>
WTF Threading leaks kernel objects on platforms that use pthreads
https://bugs.webkit.org/show_bug.cgi?id=94636
Reviewed by Geoffrey Garen.
Creating lots of Web workers on Mac platforms leaks lots of Mach ports. Eventually, the
process can exhaust its allocation of Mach ports from the kernel, which can then cause
all sorts of badness, including the inability to allocate new virtual memory from the
kernel. ThreadingPthreads.cpp and ThreadIdentifierDataPthreads.cpp need to be refactored
so that we do not leak these kernel resources. I would assume that we also leak kernel
resources on other pthreads platforms as well.
* wtf/ThreadIdentifierDataPthreads.cpp:
(WTF):
(WTF::ThreadIdentifierData::~ThreadIdentifierData): Now calls the event threadDidExit, which
handles all relevant tear-down of the thread metadata in the thread map.
* wtf/ThreadingPthreads.cpp: Added a new class called PthreadState that encapsulates the
state of a thread and the possible transitions between those states.
(PthreadState):
(WTF::PthreadState::PthreadState):
(WTF::PthreadState::joinableState): Returns the current state of the pthread.
(WTF::PthreadState::pthreadHandle): Returns the pthread_t for this particular thread. This needs to
remain valid even after the thread has exited because somebody could come along at any time in the
future and call join on the thread.
(WTF::PthreadState::didBecomeDetached): Signals that the thread was detached.
(WTF::PthreadState::didExit): Signals that the thread's exit destructor (~ThreadIdentifierData) has run.
(WTF::PthreadState::didJoin): Signals that the thread has been joined on successfully.
(WTF::PthreadState::hasExited): Returns whether or not the thread's exit destructor has run.
(WTF):
(WTF::identifierByPthreadHandle): Changed to also check hasExited() on the threads it finds in the map. We
should only have one valid pthread_t in the map, but there are other pthread_t's that need to remain in the
thread map for when somebody joins on that thread id later.
(WTF::establishIdentifierForPthreadHandle): Changed to put the allocate the new PthreadState data structure and
put it in the map.
(WTF::pthreadHandleForIdentifierWithLockAlreadyHeld):
(WTF::wtfThreadEntryPoint):
(WTF::waitForThreadCompletion): We now do the relevant cleanup after the specified thread has been
successfully joined on depending on if the joined thread has already exited.
(WTF::detachThread): Performs relevant cleanup if the thread has already exited. Otherwise signals to the
PthreadState that the thread has been detached.
(WTF::threadDidExit): Function called by ~ThreadIdentifierData to indicate that the thread has exited.
Only cleans up after itself if the thread isn't Joinable (i.e. Joined or Detached).
2012-08-21 Ulan Degenbaev <ulan@chromium.org>
Call AdjustAmountOfExternalAllocatedMemory when V8ArrayBuffer constructed and destructed
https://bugs.webkit.org/show_bug.cgi?id=92993
Reviewed by Kenneth Russell.
Call AdjustAmountOfExternalAllocatedMemory when V8ArrayBuffer
is constructed and destructed so that V8's garbage collection
heuristics can account for the memory held by these objects.
* wtf/ArrayBuffer.h:
(WTF):
(ArrayBufferDeallocationObserver):
(WTF::ArrayBufferContents::ArrayBufferContents):
(WTF::ArrayBufferContents::transfer):
(ArrayBufferContents):
(ArrayBuffer):
(WTF::ArrayBuffer::setDeallocationObserver):
(WTF::ArrayBufferContents::~ArrayBufferContents):
2012-08-21 Benjamin Poulain <bpoulain@apple.com>
Store CString data in the CStringBuffer to avoid the double indirection
https://bugs.webkit.org/show_bug.cgi?id=94562
Reviewed by Darin Adler.
Previously, any non-trivial CString would require two allocations:
1) CStringBuffer (ref-counted container for CString's data).
2) VectorBuffer's m_buffer (the actual char data).
This patches changes CStringBuffer to hold the data previously owned by
WTF::Vector and WTF::VectorBuffer. This makes CString more efficient
both in CPU time and memory use.
* wtf/text/CString.cpp:
(WTF::CStringBuffer::createUninitialized): This new method allocate the memory
for CStringBuffer and its data. We simply allocate more memory after CStringBuffer
to hold the data.
The extra memory needed to store the terminating zero is now handled by design.
(WTF::CString::CString): Move the test for "str" one level up the stack from CString::init().
This avoid double checking the pointer when using the other constructor.
(WTF::CString::init):
(WTF::CString::newUninitialized):
(WTF::CString::copyBufferIfNeeded):
* wtf/text/CString.h:
(WTF::CStringBuffer::data):
(WTF::CStringBuffer::length):
(CStringBuffer):
(WTF::CStringBuffer::CStringBuffer):
(WTF::CStringBuffer::mutableData):
(WTF::CString::length):
2012-08-21 Patrick Gansterer <paroga@webkit.org>
Build fix for COMPILER(MSVC) && !CPU(X86) after r126023.
* wtf/MathExtras.h:
(lrint):
2012-08-20 Dominik Röttsches <dominik.rottsches@intel.com>
The 2d.imageData.object.round canvas test is failing
https://bugs.webkit.org/show_bug.cgi?id=40272
Reviewed by Kenneth Rohde Christiansen.
According to the Uint8ClampedArray spec (http://www.khronos.org/registry/typedarray/specs/latest/#7.1)
which references WebIDL's clamping rules, with implications defined in http://www.w3.org/TR/WebIDL/#es-octet
we need to round to nearest integer, and to the even one if exactly halfway in between.
As a solution: applying C99's lrint which, in default rounding mode, does that.
The updated version of test 2d.imageData.object.round.html test passes now.
* wtf/MathExtras.h:
(lrint): Assembly based implementation for MSVC under X86, otherwise falling back to casting.
* wtf/Uint8ClampedArray.h:
(WTF::Uint8ClampedArray::set): lrint instead of simple rounding.
2012-08-17 Michael Saboff <msaboff@apple.com>
Add ability to create AtomicString using LChar* buffer and length
https://bugs.webkit.org/show_bug.cgi?id=94381
Reviewed by Geoffrey Garen.
Allows the use of 8 bit string data directly without converting to 16 bits first.
* wtf/text/AtomicString.cpp:
(WTF::LCharBufferTranslator::hash):
(LCharBufferTranslator):
(WTF::LCharBufferTranslator::equal):
(WTF::LCharBufferTranslator::translate):
(WTF::AtomicString::add):
* wtf/text/AtomicString.h:
(WTF::AtomicString::AtomicString):
(AtomicString):
* wtf/text/StringImpl.h:
(StringImpl):
2012-08-17 Benjamin Poulain <bpoulain@apple.com>
Make it easier to append a literal to StringBuilder
https://bugs.webkit.org/show_bug.cgi?id=94273
Reviewed by Kentaro Hara.
* wtf/text/StringBuilder.h:
(WTF::StringBuilder::appendLiteral): Add the method StringBuilder::appendLiteral() for efficiently
adding a string literal to the StringBuilder.
2012-08-17 Yong Li <yoli@rim.com>
[BlackBerry] Turn on a few macros for jpeg decoding and image interpolation
https://bugs.webkit.org/show_bug.cgi?id=94244
Reviewed by Antonio Gomes.
Turn on these macros to get better performance.
* wtf/Platform.h:
2012-08-17 Milian Wolff <milian.wolff@kdab.com>
[Qt] QNX build fails due to ctype usage in system headers
https://bugs.webkit.org/show_bug.cgi?id=93849
Reviewed by Simon Hausmann.
Move the check for whether DisallowCType should be active or not
to the DisallowCType.h header. This way, we can update the list
of platforms or OSes which do not work with this header in a
central place. All users can now safely include the header
and do not need to place custom guards around it.
* config.h:
* wtf/DisallowCType.h:
2012-08-17 Milian Wolff <milian.wolff@kdab.com>
[Qt] QNX build fails due to missing timegm declaration
https://bugs.webkit.org/show_bug.cgi?id=93842
Reviewed by Simon Hausmann.
On QNX, timegm is declared in nbutils.h and one must link against
nbutils to use it.
* WTF.pri:
* wtf/DateMath.cpp:
2012-08-16 Kent Tamura <tkent@chromium.org>
Build fix for Chromium-mac.
* wtf/text/WTFString.cpp: Remove unnecessary includes.
2012-08-16 Michael Saboff <msaboff@apple.com>
HTML Parser should produce 8bit substrings for inline style and script elements
https://bugs.webkit.org/show_bug.cgi?id=93742
Reviewed by Benjamin Poulain.
Added 8 bit path to String::isAllSpecialCharacters(). Added new String creator
that takes a pointer to a UChar array that is known to contain only 8 bit
characters (LChar's). Added new helper method to copy contents of a
UChar buffer to a LChar buffer. The helper method includes X86-64 intrinsics
of SSE family instructions for performance.
* wtf/Alignment.h:
(WTF::isAlignedTo):
* wtf/text/ASCIIFastPath.h:
(WTF::copyLCharsFromUCharSource):
* wtf/text/WTFString.cpp:
(WTF::String::make8BitFrom16BitSource):
* wtf/text/WTFString.h:
(String):
(WTF::isAllSpecialCharacters):
(WTF::String::isAllSpecialCharacters):
2012-08-16 Benjamin Poulain <bpoulain@apple.com>
Use initialization from literals for StringStatics
https://bugs.webkit.org/show_bug.cgi?id=94185
Reviewed by Geoffrey Garen.
* wtf/text/StringStatics.cpp:
Remove the arguments for DEFINE_GLOBAL. They are no longer used by the macro.
(WTF::AtomicString::init):
Use ConstructFromLiteral to initialize the strings faster and to save memory.
2012-08-14 Milian Wolff <milian.wolff@kdab.com>
[Qt] QNX build fails due to reference to MADV_FREE_REUSE and MADV_FREE_REUSABLE
https://bugs.webkit.org/show_bug.cgi?id=93843
Reviewed by Simon Hausmann.
QNX does not implement MADV_FREE_REUSE nor MADV_FREE_REUSABLE.
The Blackberry port already sets the define to use the system
malloc, which is now also done for QNX in general.
* wtf/Platform.h:
2012-08-13 Raphael Kubo da Costa <rakuco@webkit.org>
[CMake] Remove glib-related Find modules and write single new one instead.
https://bugs.webkit.org/show_bug.cgi?id=93786
Reviewed by Rob Buis.
* wtf/PlatformEfl.cmake: Use GLIB_* instead of Glib_*, and link directly to GIO, as wtf/gobject uses functions from it.
2012-08-11 Sam Weinig <sam@webkit.org>
Enable XPC Service based WebProcess with runtime flag
https://bugs.webkit.org/show_bug.cgi?id=93773
Reviewed by Dan Bernstein.
* wtf/Platform.h:
Define HAVE_XPC on 10.7 and later.
2012-08-11 Benjamin Poulain <bpoulain@apple.com>
Do the DecimalNumber to String conversion on 8 bits
https://bugs.webkit.org/show_bug.cgi?id=93683
Reviewed by Andreas Kling.
Modify DecimalNumber to do the conversion to string on LChar instead of UChar.
* wtf/DecimalNumber.cpp:
(WTF::DecimalNumber::toStringDecimal):
(WTF::DecimalNumber::toStringExponential):
* wtf/DecimalNumber.h:
(DecimalNumber):
* wtf/dtoa.h:
* wtf/text/StringBuffer.h:
(WTF::StringBuffer::operator[]): StringBuffer::operator[] was incorrectly typed to UChar, making
the method impossible to instanciate with LChar.
* wtf/text/WTFString.h:
(String):
(WTF::String::adopt): String::adopt() is modified to work with both LChar and UChar. StringImpl
already support that.
(WTF::appendNumber): Add support for any type that can instanciate the template.
2012-08-11 Benjamin Poulain <benjamin@webkit.org>
WebCore::findAtomicString(PropertyName) always convert the name to 16bits
https://bugs.webkit.org/show_bug.cgi?id=93685
Reviewed by Geoffrey Garen.
Previously, WebCore::findAtomicString() was causing a conversion for the 8bit property name
to a 16bits due to the call to StringImpl::character16().
This patch fixes the issue by adding support for both 8bits and 16bits string in AtomicString::find().
* wtf/text/AtomicString.cpp:
(HashAndCharacters):
(WTF::HashAndCharactersTranslator::hash):
(WTF::HashAndCharactersTranslator::equal):
(WTF::HashAndCharactersTranslator::translate):
Use a template to make the struct and the translator independant of the CharacterType.
(WTF::AtomicString::add):
(WTF::findString):
(WTF::AtomicString::find): Change the API to take a StringImpl*. AtomicString can use
it efficiently to find the right string.
* wtf/text/AtomicString.h:
(AtomicString):
* wtf/text/StringImpl.h:
(StringImpl): Adapt the friends translator to support the template.
2012-08-10 Benjamin Poulain <bpoulain@apple.com>
Add support for String initialization from literal to WTFString
https://bugs.webkit.org/show_bug.cgi?id=93426
Reviewed by Anders Carlsson.
This patch adds two constructor to WTF::String in order to support fast initialization from literal:
-String(ASCIILiteral): Constructor similar to String(const char*) while being faster. This constructor
does not incur any overhead over String(const char*).
-String(char[], ConstructFromLiteralTag): Template constructor that encode explicitely the size of the
string.
String(ASCIILiteral) is expected to be used in most cases to avoid regressions. This constructor was
added because of what we have learned from r124922: inlining the string length in the code causes a code bloat
that is not always welcome.
Regarding performance of string initialization, the constructors performance are (6 characters string):
-String(ASCIILiteral): 16% faster.
-String(char[], ConstructFromLiteralTag): 33% faster (the delta increases with the string length).
In addition, no memory is allocated for the characters.
* wtf/text/StringImpl.cpp:
* wtf/text/StringImpl.h:
(WTF::StringImpl::createFromLiteral): Extend StringImpl::createFromLiteral to have a version
with strlen() which avoids loading one extra argument.
* wtf/text/WTFString.cpp:
(WTF::String::String):
* wtf/text/WTFString.h:
(WTF::String::String):
(ASCIILiteral): This class is aimed at making the construction of WTFString from a literal very easy.
By using the explicit constructor ASCIILiteral(char *), one can expect the implicit conversion to String
when needed.
(WTF::ASCIILiteral::ASCIILiteral):
(WTF::ASCIILiteral::operator const char*):
2012-08-08 Benjamin Poulain <bpoulain@apple.com>
Use char* instead of LChar* for the public interface of String construction from literals
https://bugs.webkit.org/show_bug.cgi?id=93402
Reviewed by Michael Saboff.
When the initialization from literal was added, some constructor/initialization function were
using LChar for convenience.
Since those function should only take ASCII characters, using LChar* could cause confusion. This
patch intents to clarify this by using char* for all those APIs.
* wtf/text/AtomicString.cpp:
(WTF::CharBufferFromLiteralDataTranslator::hash):
(WTF::CharBufferFromLiteralDataTranslator::equal):
(WTF::CharBufferFromLiteralDataTranslator::translate):
(WTF::AtomicString::addFromLiteralData):
* wtf/text/AtomicString.h:
(WTF::AtomicString::AtomicString):
(AtomicString):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::createFromLiteral):
* wtf/text/StringImpl.h:
(StringImpl):
(WTF::StringImpl::StringImpl):
(WTF::StringImpl::createFromLiteral):
2012-08-08 Patrick Gansterer <paroga@webkit.org>
Remove ce_time.(cpp|h) from list of source files
https://bugs.webkit.org/show_bug.cgi?id=93446
Reviewed by Simon Hausmann.
r125004 removed the last dependency on functions defined in ce_time.cpp.
* wtf/PlatformWinCE.cmake:
2012-08-08 Alvaro Lopez Ortega <alvaro@alobbs.com>
Atomics.h has incorrect GCC test for ext/atomicity.h when using LSB compilers
https://bugs.webkit.org/show_bug.cgi?id=51974
Reviewed by Simon Hausmann.
* wtf/Atomics.h: Inhibits the inclusion of the atomicity.h GNU C++
extension when compiling with a LSB compliant compiler. Thanks to
Craig Scott for the new precompiler check code.
2012-08-07 Yoshifumi Inoue <yosin@chromium.org>
[WTF] Add using WTF::msPerHour into DateMath.h
https://bugs.webkit.org/show_bug.cgi?id=93428
Reviewed by Kent Tamura.
This patch adds "using WTF::msPerHour" into DateMath.h for some codes
which will use it, e.g. bug 92960. Note: DateMath.h already has had
using statements for msPerDay, msPerMinute and msPerSecond.
* wtf/DateMath.h: Added "using WTF::msPerHour".
2012-08-07 Benjamin Poulain <benjamin@webkit.org>
Use the initialization from literal for JSC's Identifiers
https://bugs.webkit.org/show_bug.cgi?id=93193
Reviewed by Geoffrey Garen.
* wtf/text/StringImpl.h: Update the names for the HashTranslator used by Identifier.
2012-07-19 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Remove Qt 4 specific code paths
https://bugs.webkit.org/show_bug.cgi?id=88161
Reviewed by Kenneth Rohde Christiansen.
* WTF.pri:
* WTF.pro:
* wtf/qt/StringQt.cpp:
(WTF::String::String):
(WTF::String::operator QString):
* wtf/qt/UtilsQt.h: Removed.
* wtf/qt/compat/QGuiApplication: Removed.
* wtf/qt/compat/qguiapplication.h: Removed.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::~StringImpl):
(WTF):
* wtf/text/StringImpl.h:
(StringImpl):
2012-08-06 Patrick Gansterer <paroga@webkit.org>
[WIN] Remove dependency on pthread from MachineStackMarker
https://bugs.webkit.org/show_bug.cgi?id=68429
Reviewed by Geoffrey Garen.
Windows has no support for calling a destructor for thread specific data.
Since we need more control over creating and deleting thread specific keys
we can not simply extend WTF::ThreadSpecific with this functionality.
All thread specific keys created via the new API get stored in a list.
After a thread function finished we iterate over this list and call
the registered destructor for every item if needed.
* wtf/ThreadSpecific.h:
(WTF):
(WTF::threadSpecificKeyCreate): Added wrapper around pthread_key_create.
(WTF::threadSpecificKeyDelete): Added wrapper around pthread_key_delete.
(WTF::threadSpecificSet): Added wrapper around pthread_setspecific.
(WTF::threadSpecificGet): Added wrapper around pthread_getspecific.
* wtf/ThreadSpecificWin.cpp:
2012-08-04 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt] UI_SIDE_COMPOSITING code has confusing names
https://bugs.webkit.org/show_bug.cgi?id=93164
Reviewed by Kenneth Rohde Christiansen.
Renamed UI_SIDE_COMPOSITING to COORDINATED_GRAPHICS.
* wtf/Platform.h:
2012-08-03 Michael Saboff <msaboff@apple.com>
Convert HTML parser to handle 8-bit resources without converting to UChar*
https://bugs.webkit.org/show_bug.cgi?id=90321
Reviewed by Adam Barth.
* wtf/text/WTFString.h:
(WTF::String::dataSize): New method to return the number of bytes
the string requires. This replaces a harcoded calculation based on
length and sizeof(UChar).
2012-08-03 Benjamin Poulain <benjamin@webkit.org>
StringImpl created from literal should be BufferInternal
https://bugs.webkit.org/show_bug.cgi?id=92940
Reviewed by Anders Carlsson.
The ownership of string created from literal should be BufferInternal so that
StringImpl never tries to delete the characters.
The ownership was accidentaly set to BufferOwned in r123689.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::createFromLiteral): Update to use the new constructor.
* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl):
Add a new constructor making the construction from literal explicit.
Add the flag s_hashFlagHasTerminatingNullCharacter since the data has the terminating
null character.
2012-08-02 Patrick Gansterer <paroga@webkit.org>
Move getLocalTime() as static inline function to DateMath
https://bugs.webkit.org/show_bug.cgi?id=92955
Reviewed by Ryosuke Niwa.
getCurrentLocalTime() and getLocalTime() has been superseded with the
GregorianDateTime class. So we can move it into DateMath.cpp as an static inline
function. This allows us to remove the dependecy on time() and localtime()
for Windows CE, where this functions require the ce_time library to work.
* wtf/CurrentTime.cpp:
(WTF):
* wtf/CurrentTime.h:
* wtf/DateMath.cpp:
(WTF):
(WTF::getLocalTime):
2012-08-02 Patrick Gansterer <paroga@webkit.org>
[WINCE] Return 0 at calculateDSTOffset(double, double)
https://bugs.webkit.org/show_bug.cgi?id=92953
Reviewed by Ryosuke Niwa.
localtime() is implemented as a call to gmtime() in ce_time.c.
Since this will never return correct values, returning 0 instead
does not remove any existing functionality, but decreases the
dependency on the (external) ce_time implementation.
* wtf/DateMath.cpp:
(WTF::calculateDSTOffsetSimple):
2012-08-02 Arnaud Renevier <a.renevier@sisa.samsung.com>
TypedArray set method is slow when called with another typed array
https://bugs.webkit.org/show_bug.cgi?id=92556
Reviewed by Kenneth Russell.
Add an checkInboundData function to TypedArrayBase to check if a
position will be not be out of bound or overflow from the typed array.
* wtf/TypedArrayBase.h:
(WTF::TypedArrayBase::checkInboundData):
(TypedArrayBase):
2012-08-01 Patrick Gansterer <paroga@webkit.org>
Replace WTF::getCurrentLocalTime() with GregorianDateTime::setToCurrentLocalTime()
https://bugs.webkit.org/show_bug.cgi?id=92286
Reviewed by Geoffrey Garen.
Add a method to GregorianDateTime to set its values to the current locale time.
Replacing all occurrences of getCurrentLocalTime with the new function allows
us to remove getCurrentLocalTime in a next step.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/DateMath.cpp:
(WTF::dayInYear):
* wtf/DateMath.h:
(WTF):
* wtf/GregorianDateTime.cpp: Added.
(WTF):
(WTF::GregorianDateTime::setToCurrentLocalTime):
* wtf/GregorianDateTime.h:
(GregorianDateTime):
2012-08-01 Patrick Gansterer <paroga@webkit.org>
Fix FastMalloc build with assertions enabled.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_PageHeap::isScavengerSuspended):
(WTF::TCMalloc_PageHeap::scheduleScavenger):
(WTF::TCMalloc_PageHeap::suspendScavenger):
2012-08-01 Patrick Gansterer <paroga@webkit.org>
Export StringImpl::sizeInBytes() with WTF_EXPORT_STRING_API
https://bugs.webkit.org/show_bug.cgi?id=92851
Reviewed by Hajime Morita.
r124069 missed to change one export macro, which is needed
to make the windows port with USE(EXPORT_MACROS).
* wtf/text/StringImpl.h:
(StringImpl):
2012-08-01 Patrick Gansterer <paroga@webkit.org>
[WIN] Add missing WTF export macros to functions
https://bugs.webkit.org/show_bug.cgi?id=92842
Reviewed by Hajime Morita.
When we switch the windows port to USE(EXPORT_MACROS) we
need to export all functions referenced by WebKit.dll.
* wtf/ThreadingPrimitives.h:
(WTF):
* wtf/dtoa.h:
(WTF):
* wtf/dtoa/double-conversion.h:
(StringToDoubleConverter):
* wtf/unicode/UTF8.h:
2012-07-31 Sam Weinig <sam@webkit.org>
Stop masking 8 bits off of the visited link hash. We need all the bits!
https://bugs.webkit.org/show_bug.cgi?id=92799
Reviewed by Anders Carlsson.
* wtf/StringHasher.h:
(WTF::StringHasher::hashWithTop8BitsMasked):
(WTF::StringHasher::hash):
(StringHasher):
(WTF::StringHasher::computeHashAndMaskTop8Bits):
(WTF::StringHasher::hashMemory):
(WTF::StringHasher::avalancheBits):
Rename existing computeHash and hash functions to computeHashAndMaskTop8Bits
and hashWithTop8BitsMasked respectively. Add new computeHash and hash functions
that do the StringHash without the masking.
* wtf/text/AtomicString.cpp:
(WTF::CStringTranslator::hash):
(WTF::UCharBufferTranslator::hash):
(WTF::HashAndCharactersTranslator::hash):
(WTF::SubstringTranslator::hash):
(WTF::LCharBufferFromLiteralDataTranslator::hash):
(WTF::AtomicString::fromUTF8Internal):
* wtf/text/StringHash.h:
(WTF::CaseFoldingHash::hash):
* wtf/text/StringImpl.h:
(WTF::StringImpl::setHash):
* wtf/text/StringStatics.cpp:
(WTF::StringImpl::hashSlowCase):
* wtf/unicode/UTF8.cpp:
(WTF::Unicode::calculateStringHashAndLengthFromUTF8MaskingTop8Bits):
* wtf/unicode/UTF8.h:
Update for new function names.
2012-07-31 Thiago Marcos P. Santos <thiago.santos@intel.com>
Add a mechanism to dump the stack trace in case of a crash
https://bugs.webkit.org/show_bug.cgi?id=92666
Reviewed by Csaba Osztrogonác.
Unix based ports can make use of signal handlers to dump the stack
trace in case of a crash. This is specially handy when a test crashes on
the bot without hitting an assertion, we might have a chance to see
some insightful information at the reports.
* wtf/Assertions.cpp:
* wtf/Assertions.h:
2012-07-31 Stephen Chenney <schenney@chromium.org>
xmlserializer strips xlink from xlink:html svg image tag
https://bugs.webkit.org/show_bug.cgi?id=79586
Reviewed by Nikolas Zimmermann.
Add WTF::xlinkAtom as a global AtomicString constant.
* wtf/text/AtomicString.h:
(WTF): Add xlinkAtom.
* wtf/text/StringStatics.cpp:
(WTF): Add xlinkAtom.
(WTF::AtomicString::init): Add xlinkAtom.
2012-07-30 Patrick Gansterer <paroga@webkit.org>
Add WTF_EXPORT_PRIVATE to deleteOwnedPtr()
https://bugs.webkit.org/show_bug.cgi?id=92668
Reviewed by Hajime Morita.
When using export macros all non-inlined deleteOwnedPtr()
functions need to be declared with WTF_EXPORT_PRIVATE.
* wtf/OwnPtrCommon.h:
(WTF):
2012-07-30 Wei James <james.wei@intel.com>
atomicDecrement() never reach 0 on Android so no deref() will be called
https://bugs.webkit.org/show_bug.cgi?id=92635
Reviewed by Adam Barth.
With Android NDK 7b and later, __atomic_dec() is implemented by
__sync_fetch_and_sub(), which will result in that atomicDecrement()
returns the old value instead of new one.
* wtf/Atomics.h:
(WTF):
(WTF::atomicIncrement):
(WTF::atomicDecrement):
2012-07-30 Patrick Gansterer <paroga@webkit.org>
Add function to calculate the day in year from a date
https://bugs.webkit.org/show_bug.cgi?id=92671
Reviewed by Ryosuke Niwa.
Replace monthToDayInYear() with dayInYear() which takes a whole
date for calculation and will be used for bug 92286 later.
* wtf/DateMath.cpp:
(WTF::dayInYear):
(WTF::dateToDaysFrom1970):
2012-07-30 Patrick Gansterer <paroga@webkit.org>
Add special export macro for string related functions
https://bugs.webkit.org/show_bug.cgi?id=92624
Reviewed by Hajime Morita.
The windows port compiles string related code into every binary for performance reasons (see r59187).
Add the WTF_EXPORT_STRING_API define to allow this behaviour with export macros too.
* wtf/ExportMacros.h:
* wtf/text/AtomicString.h:
(AtomicString):
* wtf/text/StringImpl.h:
(StringImpl):
(WTF):
* wtf/text/WTFString.h:
(WTF):
(String):
2012-07-30 Patrick Gansterer <paroga@webkit.org>
Replace UnicodeWinCE with UnicodeWchar
https://bugs.webkit.org/show_bug.cgi?id=92539
Reviewed by Ryosuke Niwa.
UnicodeWinCE never contained WinCE specific code. UnicodeWchar
is a replacement for it, which is mainly based on the functions
from <wchar.h>. It is ment as a minimal Unicode backend, which
can be used very easy and has no external dependencies.
* WTF.gyp/WTF.gyp:
* WTF.gypi:
* wtf/Platform.h:
* wtf/PlatformWinCE.cmake:
* wtf/unicode/Unicode.h:
* wtf/unicode/wchar/UnicodeWchar.cpp: Added.
(Unicode):
(WTF::Unicode::category):
(WTF::Unicode::combiningClass):
(WTF::Unicode::direction):
(WTF::Unicode::decompositionType):
(WTF::Unicode::hasLineBreakingPropertyComplexContext):
(WTF::Unicode::mirroredChar):
(WTF::Unicode::convertWithFunction):
(WTF::Unicode::foldCase):
(WTF::Unicode::toLower):
(WTF::Unicode::toUpper):
* wtf/unicode/wchar/UnicodeWchar.h: Added.
(Unicode):
(WTF::Unicode::isAlphanumeric):
(WTF::Unicode::isDigit):
(WTF::Unicode::isLetter):
(WTF::Unicode::isLower):
(WTF::Unicode::isPrintableChar):
(WTF::Unicode::isPunct):
(WTF::Unicode::isSpace):
(WTF::Unicode::isUpper):
(WTF::Unicode::isArabicChar):
(WTF::Unicode::isSeparatorSpace):
(WTF::Unicode::foldCase):
(WTF::Unicode::toLower):
(WTF::Unicode::toUpper):
(WTF::Unicode::toTitleCase):
(WTF::Unicode::umemcasecmp):
* wtf/unicode/wince/UnicodeWinCE.cpp: Removed.
* wtf/unicode/wince/UnicodeWinCE.h: Removed.
2012-07-26 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: move StringImpl size calculation to StringImpl
https://bugs.webkit.org/show_bug.cgi?id=92359
Reviewed by Pavel Feldman.
Moved stringSize(StringImpl*) implementation from InspectorMemoryAgent to
StringImpl::sizeInBytes();
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::sizeInBytes):
(WTF):
* wtf/text/StringImpl.h:
(StringImpl):
2012-07-28 Patrick Gansterer <paroga@webkit.org>
[WIN] Add missing export macro to friend decleration.
Since the __declspec is part of the function signature
on windows, we need it at all friend declerations too.
* wtf/MediaTime.h:
2012-07-28 Patrick Gansterer <paroga@webkit.org>
[CMake] Add missing MediaTime files after r123878.
* wtf/CMakeLists.txt:
2012-07-28 Patrick Gansterer <paroga@webkit.org>
Remove obsolete functions from WTF::Unicode
https://bugs.webkit.org/show_bug.cgi?id=92571
Reviewed by Kentaro Hara.
Remove hasLineBreakingPropertyComplexContextOrIdeographic() and digitValue(),
since they are never used and defined for a few Unicode backends only.
* wtf/unicode/glib/UnicodeGLib.h:
* wtf/unicode/icu/UnicodeIcu.h:
2012-07-27 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r123679.
http://trac.webkit.org/changeset/123679
https://bugs.webkit.org/show_bug.cgi?id=92565
Slowed down HTML parsing by 3.6% (Requested by abarth on
#webkit).
* wtf/text/WTFString.h:
2012-07-27 Arnaud Renevier <a.renevier@sisa.samsung.com>
use createUninitialized when creating TypedArray from another array
https://bugs.webkit.org/show_bug.cgi?id=92518
Reviewed by Kenneth Russell.
Expose a createUninitialized static method on TypedArray classes.
* wtf/Float32Array.h:
(Float32Array):
(WTF::Float32Array::createUninitialized):
(WTF):
* wtf/Float64Array.h:
(Float64Array):
(WTF::Float64Array::createUninitialized):
(WTF):
* wtf/Int16Array.h:
(Int16Array):
(WTF::Int16Array::createUninitialized):
(WTF):
* wtf/Int32Array.h:
(Int32Array):
(WTF::Int32Array::createUninitialized):
(WTF):
* wtf/Int8Array.h:
(Int8Array):
(WTF::Int8Array::createUninitialized):
(WTF):
* wtf/Uint16Array.h:
(Uint16Array):
(WTF::Uint16Array::createUninitialized):
(WTF):
* wtf/Uint32Array.h:
(Uint32Array):
(WTF::Uint32Array::createUninitialized):
(WTF):
* wtf/Uint8Array.h:
(Uint8Array):
(WTF::Uint8Array::createUninitialized):
(WTF):
* wtf/Uint8ClampedArray.h:
(Uint8ClampedArray):
2012-07-27 Patrick Gansterer <paroga@webkit.org>
[WINCE] Use macros from ICU instead of defining the same functionality again
https://bugs.webkit.org/show_bug.cgi?id=92530
Reviewed by Ryosuke Niwa.
Replace isHighSurrogate() with U16_IS_LEAD(), isLowSurrogate() with
U16_IS_TRAIL() and surrogateToUcs4() with U16_GET_SUPPLEMENTARY().
* wtf/unicode/wince/UnicodeWinCE.h:
2012-07-27 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
[Qt] Fix build after r123917
https://bugs.webkit.org/show_bug.cgi?id=92555
Unreviewed.
* wtf/GregorianDateTime.h: Needs string.h for memset().
2012-07-27 Paweł Forysiuk <tuxator@o2.pl>
MinGW build fails because of missing header in GregorianDateTime.h
https://bugs.webkit.org/show_bug.cgi?id=92531
* wtf/GregorianDateTime.h: Include time.h
2012-07-27 Jer Noble <jer.noble@apple.com>
Unreviewed build fix.
Use MathExtras.h and the non std:: versions of isnan and signbit.
* wtf/MediaTime.cpp:
(WTF::MediaTime::createWithFloat):
(WTF::MediaTime::createWithDouble):
2012-07-27 Jer Noble <jer.noble@apple.com>
Support a rational time class for use by media elements.
https://bugs.webkit.org/show_bug.cgi?id=88787
Reviewed by Eric Carlson.
Add a new MediaTime class which implements rational math operations.
Add common constructors and assignment operators:
* wtf/MediaTime.cpp: Added.
(WTF::MediaTime::MediaTime):
(WTF::MediaTime::~MediaTime):
(WTF::MediaTime::operator=):
Add common math operators:
* wtf/MediaTime.cpp:
(WTF::MediaTime::operator+):
(WTF::MediaTime::operator-):
(WTF::MediaTime::operator<):
(WTF::MediaTime::operator>):
(WTF::MediaTime::operator==):
(WTF::MediaTime::operator>=):
(WTF::MediaTime::operator<=):
Add functions to check the MeiaTime time type flags:
* wtf/MediaTime.h:
(WTF::MediaTime::isValid):
(WTF::MediaTime::isInvalid):
(WTF::MediaTime::hasBeenRounde):
(WTF::MediaTime::isPositiveInfinite):
(WTF::MediaTime::isNegativeInfinite):
(WTF::MediaTime::isIndefinite):
Add constants for commonly used MediaTime values:
(WTF::MediaTime::zeroTime):
(WTF::MediaTime::invalidTime):
(WTF::MediaTime::positiveInfiniteTime):
(WTF::MediaTime::negativeInfiniteTime):
(WTF::MediaTime::indefiniteTime):
Add explicit conversion functions to convert to and from floating point values.
* wtf/MediaTime.cpp:
(WTF::MediaTime::createWithFloat):
(WTF::MediaTime::createWithDouble):
(WTF::MediaTime::toFloat):
(WTF::MediaTime::toDouble):
Add some useful exported functions:
* wtf/MediaTime.cpp:
(WTF::MediaTime::compare): Master function for the comparison operators above.
(WTF::MediaTime::setTimeScale): Rescale the time value to a new time scale.
(WTF::abs): Return an absolute value for the current MediaTime.
Static utility functions to implement the above:
* wtf/MediaTime.cpp:
(WTF::greatestCommonDivisor):
(WTF::leastCommonMultiple):
(WTF::signum):
Windows-only implementations of isinf and signbit:
* wtf/MediaTime.cpp:
(std::isinf):
(std::signbit):
Add the new class to platform build files:
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
2012-07-27 Wei James <james.wei@intel.com>
set WTF_USE_LOCKFREE_THREADSAFEREFCOUNTED for chromium android
https://bugs.webkit.org/show_bug.cgi?id=91746
Reviewed by Adam Barth.
This patch is part of efforts to enable web audio for chromium android.
Web audio component needs to use atomicIncrement and atomicDecrement,
which are enabled by this MACRO.
As mentioned in https://bugs.webkit.org/show_bug.cgi?id=89428#c19, make
this patch standalone.
* wtf/Atomics.h:
(WTF):
2012-07-27 Wei James <james.wei@intel.com>
set WTF_USE_LOCKFREE_THREADSAFEREFCOUNTED for chromium android
https://bugs.webkit.org/show_bug.cgi?id=91746
Reviewed by Adam Barth.
This patch is part of efforts to enable web audio for chromium android.
Web audio component needs to use atomicIncrement and atomicDecrement,
which are enabled by this MACRO.
As mentioned in https://bugs.webkit.org/show_bug.cgi?id=89428#c19, make
this patch standalone.
* wtf/Atomics.h:
(WTF):
2012-07-26 Arnaud Renevier <a.renevier@sisa.samsung.com>
constructing TypedArray from another TypedArray is slow
https://bugs.webkit.org/show_bug.cgi?id=90838
Reviewed by Kenneth Russell.
Introduce virtual method getType on ArrayBufferView. It returns the actual
type of the view. This method replaces previous is<Type>Array() methods.
* wtf/ArrayBufferView.h:
* wtf/Float32Array.h:
(WTF::Float32Array::getType):
(Float32Array):
* wtf/Float64Array.h:
(WTF::Float64Array::getType):
(Float64Array):
* wtf/Int16Array.h:
(WTF::Int16Array::getType):
(Int16Array):
* wtf/Int32Array.h:
(WTF::Int32Array::getType):
(Int32Array):
* wtf/Int8Array.h:
(WTF::Int8Array::getType):
(Int8Array):
* wtf/IntegralTypedArrayBase.h:
* wtf/TypedArrayBase.h:
(TypedArrayBase):
(WTF::TypedArrayBase::item):
* wtf/Uint16Array.h:
(WTF::Uint16Array::getType):
(Uint16Array):
* wtf/Uint32Array.h:
(WTF::Uint32Array::getType):
(Uint32Array):
* wtf/Uint8Array.h:
(WTF::Uint8Array::getType):
(Uint8Array):
* wtf/Uint8ClampedArray.h:
(WTF::Uint8ClampedArray::getType):
(Uint8ClampedArray):
2012-07-26 Zeno Albisser <zeno@webkit.org>
[Qt] requestAnimationFrame should only trigger when a new frame can be displayed.
https://bugs.webkit.org/show_bug.cgi?id=88638
Disable REQUEST_ANIMATION_FRAME_TIMER for the Qt port and tie
the servicing of scripted animations to layer syncing for WK2.
For WK1 we rely on the RefreshAnimation that is based on QAbstractAnimation.
Reviewed by Jocelyn Turcotte.
* wtf/Platform.h:
2012-07-26 Yury Semikhatsky <yurys@chromium.org>
Unreviewed. Revert r123740 as it breaks AppleMac compilation.
* wtf/text/StringImpl.cpp:
* wtf/text/StringImpl.h:
2012-07-26 Yury Semikhatsky <yurys@chromium.org>
Web Inspector: move StringImpl size calculation to StringImpl
https://bugs.webkit.org/show_bug.cgi?id=92359
Reviewed by Pavel Feldman.
Moved stringSize(StringImpl*) implementation from InspectorMemoryAgent to
StringImpl::sizeInBytes();
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::sizeInBytes):
(WTF):
* wtf/text/StringImpl.h:
(StringImpl):
2012-07-25 Benjamin Poulain <bpoulain@apple.com>
Initialize QualifiedName's strings from the read only data segment
https://bugs.webkit.org/show_bug.cgi?id=92226
Reviewed by Anders Carlsson.
Add constructors for StringImpl and AtomicString to be able to create
the strings from the literal in read only memory.
* wtf/text/AtomicString.cpp:
(HashTranslatorCharBuffer):
(WTF::LCharBufferFromLiteralDataTranslator::hash):
(LCharBufferFromLiteralDataTranslator):
(WTF::LCharBufferFromLiteralDataTranslator::equal):
(WTF::LCharBufferFromLiteralDataTranslator::translate):
(WTF::AtomicString::addFromLiteralData):
* wtf/text/AtomicString.h:
(WTF::AtomicString::AtomicString):
(AtomicString):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::createFromLiteral):
* wtf/text/StringImpl.h:
(WTF):
(StringImpl):
(WTF::StringImpl::createFromLiteral):
2012-07-25 Michael Saboff <msaboff@apple.com>
Convert HTML parser to handle 8-bit resources without converting to UChar*
https://bugs.webkit.org/show_bug.cgi?id=90321
Reviewed by Geoffrey Garen.
* wtf/text/WTFString.h:
(WTF::String::dataSize): New method to return the number of bytes
the string requires. This replaces a harcoded calculation based on
length and sizeof(UChar).
2012-07-25 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Create a specialized pair for use in HashMap iterators
https://bugs.webkit.org/show_bug.cgi?id=92137
Reviewed by Ryosuke Niwa.
The type used for internal storage in HashMap is exposed in its interface as iterator
"contents". Currently HashMap uses std::pair<>, which this patch replaces with
KeyValuePair.
Having this specialized structure will allow us to customize the members to be called
key/value, improving readability in code using HashMap iterators. They are still called
first/second to separate this change from the mechanical change of updating callsites.
* wtf/HashIterators.h:
(HashTableConstKeysIterator):
(HashTableConstValuesIterator):
(HashTableKeysIterator):
(HashTableValuesIterator):
Use KeyValuePair instead of std::pair when defining the iterators.
* wtf/HashMap.h:
(WTF):
(WTF::KeyValuePairKeyExtractor::extract):
(HashMap):
Remove PairFirstExtractor. Add and use the KeyValuePair corresponding extractor.
(WTF::HashMapValueTraits::isEmptyValue): Use KeyValuePairHashTraits for HashMaps.
(WTF::HashMapTranslator::translate):
(WTF::HashMapTranslatorAdapter::translate):
The traits of the mapped value is now called ValueTraits instead of SecondTraits.
* wtf/HashTable.h:
(WTF::hashTableSwap): Add specialization for swapping KeyValuePairs.
(WTF): Remove now unneeded specialization for std::pairs.
* wtf/HashTraits.h:
(KeyValuePair):
(WTF::KeyValuePair::KeyValuePair):
(WTF):
Specialized pair. In the future difference from pair should be the member names.
(KeyValuePairHashTraits):
(WTF::KeyValuePairHashTraits::emptyValue):
(WTF::KeyValuePairHashTraits::constructDeletedValue):
(WTF::KeyValuePairHashTraits::isDeletedValue):
These traits are analogous to PairHashTraits but for KeyValuePair.
* wtf/RefPtrHashMap.h: Use KeyValuePairHashTraits.
2012-07-25 Andrew Wilson <atwilson@chromium.org>
Unreviewed, rolling out r123560.
http://trac.webkit.org/changeset/123560
https://bugs.webkit.org/show_bug.cgi?id=90321
Breaks chromium valgrind tests.
* wtf/text/WTFString.h:
2012-07-25 Csaba Osztrogonác <ossy@webkit.org>
[Qt] There are parallel GC related crashes regularly
https://bugs.webkit.org/show_bug.cgi?id=90957
Rubber-stamped by Zoltan Herczeg.
* wtf/Platform.h: Disable parallel GC temporarily on Qt until proper fix.
2012-07-24 Benjamin Poulain <bpoulain@apple.com> && Joseph Pecoraro <pecoraro@apple.com>
QualifiedName's HashSet should be big enough to hold at least all the static names
https://bugs.webkit.org/show_bug.cgi?id=91891
Reviewed by Darin Adler.
Add a static struct to compute the HashTable capacity for any given size at compile time.
This allow us to create HashTraits giving the minimumSize without hardcoding the values.
* wtf/HashTable.h:
(OneifyLowBits):
(UpperPowerOfTwoBound):
(HashTableCapacityForSize): Compute the HashTable capacity at compile time.
2012-07-24 Michael Saboff <msaboff@apple.com>
Convert HTML parser to handle 8-bit resources without converting to UChar*
https://bugs.webkit.org/show_bug.cgi?id=90321
Reviewed by Geoffrey Garen.
* wtf/text/WTFString.h:
(WTF::String::dataSize): New method to return the number of bytes
the string requires. This replaces a harcoded calculation based on
length and sizeof(UChar).
2012-07-24 Sam Weinig <sam@webkit.org>
Add per-HashTable stats
https://bugs.webkit.org/show_bug.cgi?id=92185
Reviewed by Anders Carlsson.
Add per-HashTable stats, so we can look at the effectiveness of an individual HashTable.
* wtf/HashTable.h:
(WTF::HashTable::Stats::Stats):
Add a HashTable::Stats to hold the stats.
(WTF::HashTable::Stats::recordCollisionAtCount):
(WTF::HashTable::Stats::dumpStats):
Add versions of recordCollisionAtCount and dumpStats for per-HashTable version.
(WTF::HashTable):
Keep the stats, if enabled, in an OwnPtr, to not blow JSCell max size restrictions.
(WTF::lookup):
(WTF::lookupForWriting):
(WTF::fullLookupForWriting):
(WTF::add):
(WTF::reinsert):
(WTF::remove):
(WTF::rehash):
Keep track of the stats as the table is used.
2012-07-24 Patrick Gansterer <paroga@webkit.org>
Store the full year in GregorianDateTime
https://bugs.webkit.org/show_bug.cgi?id=92067
Reviewed by Geoffrey Garen.
Use the full year instead of the offset from year 1900
for the year member variable of GregorianDateTime.
* wtf/GregorianDateTime.h:
(WTF::GregorianDateTime::operator tm):
2012-07-23 Patrick Gansterer <paroga@webkit.org>
Move GregorianDateTime from JSC to WTF namespace
https://bugs.webkit.org/show_bug.cgi?id=91948
Reviewed by Geoffrey Garen.
Moving GregorianDateTime into the WTF namespace allows us to us to
use it in WebCore too. The new class has the same behaviour as the
old struct. Only the unused timeZone member has been removed.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/GregorianDateTime.h: Added.
(GregorianDateTime):
2012-07-23 Rob Buis <rbuis@rim.com>
[BlackBerry] Merge createThreadInternal implementations
https://bugs.webkit.org/show_bug.cgi?id=91899
Reviewed by Yong Li.
PR 111675
Remove our implementation since the default thread stack size on QNX is fine.
* wtf/ThreadingPthreads.cpp:
(WTF::createThreadInternal):
(WTF::initializeCurrentThreadInternal): make sure we set the thread name.
2012-07-23 Patrick Gansterer <paroga@webkit.org>
[WINCE] Define NOMINMAX in the build system instead of Platform.h
https://bugs.webkit.org/show_bug.cgi?id=91938
Reviewed by Ryosuke Niwa.
* wtf/Platform.h:
2012-07-23 Patrick Gansterer <paroga@webkit.org>
Build fix for Windows after r123317.
* wtf/DateMath.cpp: Added missing header include.
2012-07-23 Patrick Gansterer <paroga@webkit.org>
[WIN] Use GetTimeZoneInformation() for calculateUTCOffset()
https://bugs.webkit.org/show_bug.cgi?id=91935
Reviewed by Ryosuke Niwa.
GetTimeZoneInformation() returns the offset directly. Using it
avoids unnecessary calculations and remove dependencies on
other time related function, which do not exist on WinCE.
* wtf/DateMath.cpp:
(WTF::calculateUTCOffset):
2012-07-20 Han Shen <shenhan@google.com>
[Chromium] Compilation fails under gcc 4.7
https://bugs.webkit.org/show_bug.cgi?id=90227
Reviewed by Tony Chang.
Disable warnings about c++0x compatibility in gcc newer than 4.6.
* WTF.gyp/WTF.gyp:
2012-07-19 Dan Bernstein <mitz@apple.com>
The ATSUI-based complex text code is unused
https://bugs.webkit.org/show_bug.cgi?id=91816
Reviewed by Sam Weinig.
Removed definitions of WTF_USE_ATSUI and WTF_USE_CORE_TEXT.
* wtf/Platform.h:
2012-07-19 Wei James <james.wei@intel.com>
enable Web Audio for chromium android port
https://bugs.webkit.org/show_bug.cgi?id=89428
Reviewed by Kenneth Russell.
* wtf/MathExtras.h:
(log2):
(log2f):
2012-07-19 Scott Graham <scottmg@chromium.org>
[Chromium] disable warning on Windows from gcc-only pragma in Assertions.cpp"
https://bugs.webkit.org/show_bug.cgi?id=91776
Reviewed by Ryosuke Niwa.
Avoids:
...\source\wtf\wtf\assertions.cpp(31) : warning C4068: unknown pragma
* WTF.gyp/WTF.gyp:
2012-07-19 Robert Sesek <rsesek@chromium.org>
[chromium][Mac] Switch the MACOSX_DEPLOYMENT_TARGET to 10.6
https://bugs.webkit.org/show_bug.cgi?id=91752
Reviewed by Eric Seidel.
When building CHROMIUM && DARWIN, do not enable ATSUI support.
* wtf/Platform.h:
2012-07-18 Yong Li <yoli@rim.com>
[BlackBerry] Implement currentTime() and monotonicallyIncreasingTime() for OS(QNX)
https://bugs.webkit.org/show_bug.cgi?id=91659
Reviewed by Rob Buis.
Implement currentTime() and monotonicallyIncreasingTime() for OS(QNX) with clock_gettime().
* wtf/CurrentTime.cpp:
(WTF):
(WTF::currentTime):
(WTF::monotonicallyIncreasingTime):
2012-07-18 Tom Sepez <tsepez@chromium.org>
OOB read of stack buffer below DoubleToStringConverter::CreateExponentialRepresentation() in debug builds
https://bugs.webkit.org/show_bug.cgi?id=91642
Reviewed by Abhishek Arya.
* wtf/dtoa/double-conversion.cc:
(DoubleToStringConverter::CreateExponentialRepresentation): NUL-terminate string buffer before passing it to StringBuilder::AddSubstring()
2012-07-18 Michael Saboff <msaboff@apple.com>
Make TextCodecLatin1 handle 8 bit data without converting to UChar's
https://bugs.webkit.org/show_bug.cgi?id=90319
Reviewed by Oliver Hunt.
* wtf/text/StringImpl.h:
(StringImpl): Exported LChar variant of adopt().
* wtf/text/WTFString.h:
(WTF::String::createUninitialized): Exported LChar variant.
2012-07-18 Rob Buis <rbuis@rim.com>
Alignment crash in MIMESniffer
https://bugs.webkit.org/show_bug.cgi?id=89787
Reviewed by Yong Li.
PR 169064
Change isPointerTypeAlignmentOkay so calling it does not require ifdefs.
* wtf/StdLibExtras.h:
(isPointerTypeAlignmentOkay):
2012-07-17 Gabor Ballabas <gaborb@inf.u-szeged.hu>
[Qt][V8] Remove the V8 related codepaths and configuration
https://bugs.webkit.org/show_bug.cgi?id=90863
Reviewed by Simon Hausmann.
* WTF.pri:
2012-07-17 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r122834.
http://trac.webkit.org/changeset/122834
https://bugs.webkit.org/show_bug.cgi?id=91492
it broke the chromium (Requested by kkristof on #webkit).
* WTF.pri:
2012-07-17 Gabor Ballabas <gaborb@inf.u-szeged.hu>
[Qt][V8] Remove the V8 related codepaths and configuration
https://bugs.webkit.org/show_bug.cgi?id=90863
Reviewed by Simon Hausmann.
* WTF.pri:
2012-07-16 Hajime Morrita <morrita@chromium.org>
WebCore needs WEBCORE_TESTING macro to mark methods being exported for testing.
https://bugs.webkit.org/show_bug.cgi?id=90764
Reviewed by Adam Barth.
Added USE(EXPORT_MACROS_FOR_TESTING) and enabled it on GTK and Windows.
* wtf/ExportMacros.h:
* wtf/Platform.h:
2012-07-16 Filip Pizlo <fpizlo@apple.com>
Unreviewed build fix.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
2012-07-16 Adam Treat <atreat@rim.com>
[BlackBerry] Use newer version of platform API to implement callOnMainThread
https://bugs.webkit.org/show_bug.cgi?id=91404
Reviewed by Yong Li.
Right now we're using an outdated API that involves a virtual function call for no reason.
Use the new API that is much more direct and to the point.
* wtf/blackberry/MainThreadBlackBerry.cpp:
(WTF::scheduleDispatchFunctionsOnMainThread):
2012-07-14 Filip Pizlo <fpizlo@apple.com>
Unreviewed, build fix.
* wtf/Assertions.cpp:
* wtf/Platform.h:
* wtf/unicode/icu/CollatorICU.cpp:
(WTF::Collator::userDefault):
2012-07-13 Xianzhu Wang <wangxianzhu@chromium.org>
Move WebCore/platform/text/Base64 to WTF/wtf/text
https://bugs.webkit.org/show_bug.cgi?id=91162
Reviewed by Adam Barth.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/text/Base64.cpp: Renamed from Source/WebCore/platform/text/Base64.cpp.
(WTF):
(WTF::base64Encode):
(WTF::base64Decode):
(WTF::base64DecodeInternal):
* wtf/text/Base64.h: Renamed from Source/WebCore/platform/text/Base64.h.
(WTF):
(WTF::base64Encode):
2012-07-12 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add API to get HTTPS status to WebKit2 GTK+
https://bugs.webkit.org/show_bug.cgi?id=91100
Reviewed by Martin Robinson.
Add support for GByteArray.
* wtf/gobject/GRefPtr.cpp:
(WTF::refGPtr):
(WTF):
(WTF::derefGPtr):
* wtf/gobject/GRefPtr.h:
(WTF):
* wtf/gobject/GTypedefs.h:
2012-07-12 Maciej Stachowiak <mjs@apple.com>
Document ListHashSet iteration guarantees
https://bugs.webkit.org/show_bug.cgi?id=91106
Reviewed by Eric Seidel.
* wtf/ListHashSet.h:
(WTF): Expand class comment to document this.
2012-07-11 Mark Rowe <mrowe@apple.com>
<http://webkit.org/b/91024> Build against the latest SDK when targeting older OS X versions.
Reviewed by Dan Bernstein.
The deployment target is already set to the version that we're targeting, and it's that setting
which determines which functionality from the SDK is available to us.
* Configurations/Base.xcconfig:
2012-07-11 Mark Rowe <mrowe@apple.com>
Replace definitions of BUILDING_ON / TARGETING macros with macros that will error when used.
Part of <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros.
Reviewed by Anders Carlsson.
* wtf/Platform.h:
2012-07-11 Mark Rowe <mrowe@apple.com>
Switch a few cases that care about the SDK over to checking __MAC_OS_X_VERSION_MAX_ALLOWED so that things build.
Part of <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros
Reviewed by Filip Pizlo.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary): The SDK we're building against determines how many elements
the structure is declared as having.
2012-07-11 Mark Rowe <mrowe@apple.com>
<http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros
This removal was handled by a script that translates the relevant macros in to the equivalent checks
using the system availability macros.
Reviewed by Filip Pizlo.
* wtf/Assertions.cpp:
* wtf/FastMalloc.cpp:
* wtf/Platform.h:
* wtf/ThreadingPthreads.cpp:
* wtf/unicode/icu/CollatorICU.cpp:
2012-07-11 Anders Carlsson <andersca@apple.com>
Add -Wtautological-compare and -Wsign-compare warning flags
https://bugs.webkit.org/show_bug.cgi?id=90994
Reviewed by Mark Rowe.
* Configurations/Base.xcconfig:
2012-07-10 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
Re-enable __declspec(dl{import,export}) for MinGW when using EXPORT_MACROS
https://bugs.webkit.org/show_bug.cgi?id=90612
Reviewed by Csaba Osztrogonác.
MinGW was switched to use auto import/export of symbols on r44184.
From my understanding of the documentation, MinGW will not auto-export symbols
unless there are no explicit __declspec(dlexport) in the DLL already.
The issues that originally made us rely on the auto-import feature of MinGW
should now be resolved with the EXPORT_MACROS work. This patch re-enables them.
It also removes the GCC check for internal symbols hiding as the visibility should
already be hidden by default for both MSVC and GCC on Windows anyway.
* wtf/ExportMacros.h:
2012-07-09 No'am Rosenthal <noam.rosenthal@nokia.com>
Shared code that is guarded with ENABLE(WEBGL) should be guarded with USE()
https://bugs.webkit.org/show_bug.cgi?id=90506
Reviewed by Martin Robinson.
Made USE(3D_GRAPHICS) default to true when ENABLE(WEBGL) is true.
Also updated the Qt default to always use TEXTURE_MAPPER, and to use TEXTURE_MAPPER_GL when
3D_GRAPHICS is used.
* wtf/Platform.h:
2012-07-08 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Introduce a build flag for low quality JPEG images
https://bugs.webkit.org/show_bug.cgi?id=90748
Reviewed by Adam Barth.
Turn on the newly introduced flags for android.
* wtf/Platform.h:
2012-07-05 Filip Pizlo <fpizlo@apple.com>
INLINE_ARM_FUNCTION(thingy) should make thingy be thumb2 if we're using thumb2
https://bugs.webkit.org/show_bug.cgi?id=90644
Reviewed by Mark Hahnenberg.
Fix breakage introduced in http://trac.webkit.org/changeset/121885
* wtf/InlineASM.h:
2012-07-05 Zoltan Herczeg <zherczeg@webkit.org>
Port DFG JIT to traditional ARM
https://bugs.webkit.org/show_bug.cgi?id=90198
Reviewed by Filip Pizlo.
Enabling DFG JIT on ARM systems with 32 bit instruction set.
* wtf/InlineASM.h:
* wtf/Platform.h:
2012-07-04 Andy Wingo <wingo@igalia.com>
[GTK] Enable parallel GC
https://bugs.webkit.org/show_bug.cgi?id=90568
Reviewed by Martin Robinson.
* wtf/Platform.h: Add GTK to the ENABLE_PARALLEL_GC party.
2012-07-04 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Get rid of un-needed QT += declarative for Qt 5
The declarative module has been renamed to quick1 in Qt 5, and the
engine-only module for Qt 5 is named 'qml'. For many of the instances
we could just remove 'declarative', since the project file was only
used for Qt5/WebKit2 builds. In the other cases the module was wrapped
in a haveQt(4) scope.
Reviewed by Csaba Osztrogonác.
* WTF.pri:
2012-07-03 Yong Li <yoli@rim.com>
[BlackBerry] Turn on DFGJIT in Platform.h
https://bugs.webkit.org/show_bug.cgi?id=90482
Set ENABLE_DFG_JIT for PLATFORM(BLACKBERRY).
Reviewed by Rob Buis.
* wtf/Platform.h:
2012-07-03 Tony Chang <tony@chromium.org>
[chromium] Unreviewed, update .gitignore to handle VS2010 files.
* WTF.gyp/.gitignore:
2012-07-03 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Make use of .qmake.cache for caching features
Instead of loading() features from the files that need them (and re-running
a bunch of checks), we now run feature detection as part of configure.pro,
and have build-webkit write the computed feature-defines and CONFIG to
.qmake.cache, which is then loaded by qmake _before_ even defaults_pre
when building WebKit.pro.
At some point we'll be able to selectivly prevent running of config tests
in configure.pro, which means we don't need a separate code-path for
the build-webkit --help case.
We should also move the code in build-webkit that now uses .webkit.config
to detect clean builds, to use .qmake.cache, since we now store the same
thing there.
Original patch by Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed by Tor Arne Vestbø.
* WTF.pri:
2012-07-03 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r121766.
http://trac.webkit.org/changeset/121766
https://bugs.webkit.org/show_bug.cgi?id=90465
It caused flakey build errors on the bots (Requested by Ossy
on #webkit).
* WTF.pri:
2012-07-03 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Make use of .qmake.cache for caching features
Instead of loading() features from the files that need them (and re-running
a bunch of checks), we now run feature detection as part of configure.pro,
and have build-webkit write the computed feature-defines and CONFIG to
.qmake.cache, which is then loaded by qmake _before_ even defaults_pre
when building WebKit.pro.
At some point we'll be able to selectivly prevent running of config tests
in configure.pro, which means we don't need a separate code-path for
the build-webkit --help case.
We should also move the code in build-webkit that now uses .webkit.config
to detect clean builds, to use .qmake.cache, since we now store the same
thing there.
Original patch by Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed by Tor Arne Vestbø.
* WTF.pri:
2012-07-03 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> Joel Dillon <joel.dillon@codethink.co.uk>
[Qt][Win] Fix broken QtWebKit5.lib linking
https://bugs.webkit.org/show_bug.cgi?id=88321
Reviewed by Kenneth Rohde Christiansen.
Instead of letting a module's headers know which other modules depend on them,
have depending modules define explicitely that they want its symbols exported too.
JavaScriptCore should then be compiled with both BUILDING_JavaScriptCore and
STATICALLY_LINKED_WITH_WTF.
* wtf/ExportMacros.h:
2012-06-29 Tony Chang <tony@chromium.org>
Unreviewed, rolling out r121572.
http://trac.webkit.org/changeset/121572
https://bugs.webkit.org/show_bug.cgi?id=90249
Breaks Mac build since it depends on r121547, which was rolled
out
* wtf/ThreadingPthreads.cpp:
(WTF::initializeCurrentThreadInternal):
2012-06-29 Eric Seidel <eric@webkit.org>
Remove BUILDING_ON_LEOPARD now that no ports build on Leopard
https://bugs.webkit.org/show_bug.cgi?id=90249
Reviewed by Ryosuke Niwa.
* wtf/ThreadingPthreads.cpp:
(WTF::initializeCurrentThreadInternal):
2012-06-29 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r121529.
http://trac.webkit.org/changeset/121529
https://bugs.webkit.org/show_bug.cgi?id=90260
Failed to compile on Chromium WebKitMacBuilder (Requested by
keishi on #webkit).
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
* wtf/unicode/icu/CollatorICU.cpp:
(WTF::Collator::userDefault):
2012-06-29 Eric Seidel <eric@webkit.org>
Remove more BUILDING_ON_LEOPARD branches now that no port builds on Leopard
https://bugs.webkit.org/show_bug.cgi?id=90252
Reviewed by Ryosuke Niwa.
* wtf/FastMalloc.cpp:
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
* wtf/unicode/icu/CollatorICU.cpp:
(WTF::Collator::userDefault):
2012-06-29 Eric Seidel <eric@webkit.org>
Remove more BUILDING_ON_LEOPARD usage in PLATFORM(MAC) code
https://bugs.webkit.org/show_bug.cgi?id=85846
Reviewed by Adam Barth.
PLATFORM(MAC) has not supported Leopard for several months now.
This change removes about 1/3 of the remaining BUILDING_ON_LEOPARD
uses in the PLATFORM(MAC) codepaths. PLATFORM(CHROMIUM) still
supports BUILDING_ON_LEOPARD for now.
* wtf/Platform.h:
2012-06-28 Kalev Lember <kalevlember@gmail.com>
ThreadingWin: Silence GCC compiler warnings
https://bugs.webkit.org/show_bug.cgi?id=89491
Reviewed by Adam Roben.
* wtf/ThreadingWin.cpp:
(WTF::createThreadInternal):
(WTF::PlatformCondition::timedWait):
(WTF::PlatformCondition::signal): Fix unused-but-set-variable
warnings.
2012-06-26 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Add missing heades to HEADERS
For JavaScriptCore there aren't any Qt specific files, so we include all
headers for easy editing in Qt Creator.
Reviewed by Simon Hausmann.
* WTF.pro:
2012-06-25 Kent Tamura <tkent@chromium.org>
Unreviewed, rolling out r121145.
http://trac.webkit.org/changeset/121145
https://bugs.webkit.org/show_bug.cgi?id=89847
Had an objection for the change.
* wtf/text/StringBuilder.h:
2012-06-25 Yong Li <yoli@rim.com>
[BlackBerry] Add JSC statistics into about:memory
https://bugs.webkit.org/show_bug.cgi?id=89779
Reviewed by Rob Buis.
Turn on WTF_USE_EXPORT_MACROS for BlackBerry port.
This will make macros like JS_EXPORT_PRIVATE work without
extra porting.
* wtf/Platform.h:
2012-06-25 Adam Barth <abarth@webkit.org>
Use InterpolationLow on chromium-android
https://bugs.webkit.org/show_bug.cgi?id=89849
Reviewed by Daniel Bates.
Introduce a USE macro to control image interpolation quality.
* wtf/Platform.h:
2012-06-25 Kent Tamura <tkent@chromium.org>
Change the serialization format of form control state to make the code simple
https://bugs.webkit.org/show_bug.cgi?id=89847
Reviewed by Hajime Morita.
* wtf/text/StringBuilder.h:
(WTF::StringBuilder::appendEscaped): Added. This function adds the
escaped form of the input string. e.g. if stiring="foo,bar" escape='\'
special=',', the appended string is foo\,bar.
2012-06-24 Adam Barth <abarth@webkit.org>
Remove USE(CHROMIUM_NET) because it is unused
https://bugs.webkit.org/show_bug.cgi?id=89850
Reviewed by Eric Seidel.
I didn't see any mentions of CHROMIUM_NET when I grepped the Source
directory. Also, this USE macro isn't defined on OS(DARWIN) or
OS(ANDROID), which seems a bit odd given that Chromium uses the same
network stack on all platforms.
* wtf/Platform.h:
2012-06-22 Peter Beverloo <peter@chromium.org>
[Chromium] Disable c++0x compatibility warnings in JavaScriptCore.gyp when building for Android
https://bugs.webkit.org/show_bug.cgi?id=88853
Reviewed by Steve Block.
The Android exclusions were necessary to fix a gyp generation error, as
the gcc_version variable wasn't being defined for Android. Remove these
exceptions when Chromium is able to define the gcc_version variable.
* WTF.gyp/WTF.gyp:
2012-06-18 Gustavo Noronha Silva <gustavo.noronha@collabora.com>
Causes crashes in LLVMPipe
https://bugs.webkit.org/show_bug.cgi?id=89358
Reviewed by Martin Robinson.
Change suggested by Dave Airlie and Xan Lopez.
* wtf/Platform.h: disable global fastMalloc for GTK+
2012-06-22 Mario Sanchez Prada <msanchez@igalia.com>
Memory corruption on HashTable.h
https://bugs.webkit.org/show_bug.cgi?id=88419
Reviewed by Martin Robinson.
Simplify definition of WTF_USE_PTHREADS and HAVE_PTHREAD_RWLOCK
for the GTK platform using OS(LINUX) instead of HAVE(PTHREAD_H).
* wtf/Platform.h:
2012-06-21 Parth Patel <parpatel@rim.com>
[Blackberry] BlackBerry::Platform::Settings::get() rename to BlackBerry::Platform::Settings::instance() to make it consistent with our other singletons
https://bugs.webkit.org/show_bug.cgi?id=89684
Reviewed by Yong Li.
Update setting instance access to use instance() instead of get().
* wtf/ThreadingPthreads.cpp:
(WTF::createThreadInternal):
2012-06-21 Kalev Lember <kalevlember@gmail.com>
[GTK] Fix NPAPI plugins on Windows
https://bugs.webkit.org/show_bug.cgi?id=54531
Reviewed by Martin Robinson.
Define ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH for the GTK+ port, and
include OwnPtrWin.cpp in the list of files built on Windows.
* GNUmakefile.am:
* GNUmakefile.list.am:
* wtf/Platform.h:
2012-06-21 Balazs Kelemen <kbalazs@webkit.org>
Compile error: 'bool std::isinf(float)' is not 'constexpr' with GCC 4.6 in C++11 mode
https://bugs.webkit.org/show_bug.cgi?id=88721
Reviewed by Csaba Osztrogonác.
Don't define these as consexpr because with gcc 4.6
they call non constexpr functions.
* wtf/MathExtras.h:
(std::wtf_isinf):
(std::wtf_isnan):
2012-06-17 Filip Pizlo <fpizlo@apple.com>
It should be possible to look at disassembly
https://bugs.webkit.org/show_bug.cgi?id=89319
Reviewed by Sam Weinig.
Made changes to Assertions.h to make it friendly to C code again.
Added ENABLE(DISASSEMBLER) and USE(UDIS86) logic to Platform.h.
* wtf/Assertions.h:
* wtf/Platform.h:
2012-06-19 Jon Honeycutt <jhoneycutt@apple.com>
REGRESSION(r120552): Many tests timing out on Windows
https://bugs.webkit.org/show_bug.cgi?id=89433
Reviewed by Andy Estes.
* wtf/CurrentTime.cpp:
(WTF::lowResUTCTime):
It looks like there were two bugs:
1) the function was converting from 100ths of nanoseconds to seconds
rather than 100s of nanoseconds to seconds by dividing by
(nsPerSecond * 100) rather than (nsPerSecond / 100)
2) the function should've been returning milliseconds, not seconds
2012-06-18 Tony Payne <tpayne@chromium.org>
[chromium] Add iccjpeg and qcms to chromium port.
https://bugs.webkit.org/show_bug.cgi?id=81974
* wtf/Platform.h: Add Chromium USE defines for ICCJPEG and QCMSLIB
to each Chromium platform, excluding Android.
Reviewed by Adam Barth.
2012-06-18 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r120485 and r120582.
http://trac.webkit.org/changeset/120485
http://trac.webkit.org/changeset/120582
https://bugs.webkit.org/show_bug.cgi?id=89345
chromeos tree breakage (Requested by morrita on #webkit).
* wtf/Platform.h:
2012-06-17 Patrick Gansterer <paroga@webkit.org>
[WIN] Simplify implementation of currentTime()
https://bugs.webkit.org/show_bug.cgi?id=83156
Reviewed by Brent Fulgham.
Use GetSystemTimeAsFileTime() instead of ftime().
This avoids an unneeded call to the MS CRT and
brings the Win/WinCE code closer together.
* wtf/CurrentTime.cpp:
(WTF::lowResUTCTime):
(WTF::currentTime):
2012-06-15 Tony Payne <tpayne@chromium.org>
[chromium] Add iccjpeg and qcms to chromium port.
https://bugs.webkit.org/show_bug.cgi?id=81974
* wtf/Platform.h: Add Chromium USE defines for ICCJPEG and QCMSLIB
to each Chromium platform, excluding Android.
Reviewed by Adam Barth.
2012-06-14 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r120393.
http://trac.webkit.org/changeset/120393
https://bugs.webkit.org/show_bug.cgi?id=89163
breaks cr-mac build (Requested by morrita on #webkit).
* wtf/Platform.h:
2012-06-14 Tony Payne <tpayne@chromium.org>
[chromium] Add iccjpeg and qcms to chromium port.
https://bugs.webkit.org/show_bug.cgi?id=81974
* wtf/Platform.h: Add Chromium USE defines for ICCJPEG and QCMSLIB
to each Chromium platform, excluding Android.
Reviewed by Adam Barth.
2012-06-14 Yong Li <yoli@rim.com>
[BlackBerry] Implement computeRAMSize for QNX
https://bugs.webkit.org/show_bug.cgi?id=89110
Reviewed by Rob Buis.
* wtf/RAMSize.cpp:
(WTF::computeRAMSize):
2012-06-14 Geoffrey Garen <ggaren@apple.com>
ARMv7 should support spinlocks
https://bugs.webkit.org/show_bug.cgi?id=88957
Reviewed by Darin Adler.
More info @ http://infocenter.arm.com/help/topic/
com.arm.doc.genc007826/Barrier_Litmus_Tests_and_Cookbook_A08.pdf
* wtf/Atomics.h:
(WTF::memoryBarrierAfterLock):
(WTF::memoryBarrierBeforeUnlock): Added memory barrier primitives since
ARMv7 has a weakly ordered memory model.
* wtf/Platform.h: Enabled compare-and-swap on Windows so our spinlock
implementation would continue working on Windows.
* wtf/TCSpinLock.h:
(TCMalloc_SpinLock::Lock):
(TCMalloc_SpinLock::Unlock):
(TCMalloc_SpinLock): Use our compare-and-swap helper function to avoid
rewriting it in assembly here.
Added memory barriers since ARMv7 needs them.
Removed PPC support because our helper function doesn't support PPC.
2012-06-13 Arnaud Renevier <arno@renevier.net>
make sure headers are included only once per file
https://bugs.webkit.org/show_bug.cgi?id=88929
Reviewed by Kentaro Hara.
* wtf/FastMalloc.cpp:
* wtf/MathExtras.h:
* wtf/OSAllocator.h:
2012-06-13 Benjamin Poulain <benjamin@webkit.org>
Implement the simple constructors WTFURL's KURL
https://bugs.webkit.org/show_bug.cgi?id=85724
Reviewed by Adam Barth.
This patch extends WTFURL with:
-support basic debugging using print() methods
-parsing in the incomming string character set (8bits or 16bits)
-add a function for parsing of relative URL (but no implementation yet)
* WTF.xcodeproj/project.pbxproj:
* wtf/text/WTFString.h:
(String):
* wtf/url/api/ParsedURL.cpp:
(WTF::ParsedURL::ParsedURL):
(WTF):
(WTF::ParsedURL::hasFragment): Add this method to query the framgent availability without
allocating a new String.
(WTF::ParsedURL::withoutFragment): This method is added to implement KURL::removeFragmentIdentifier() and
the parsing of empty relative URL (where we return the base without fragment).
(WTF::ParsedURL::print):
* wtf/url/api/ParsedURL.h:
(ParsedURL):
(WTF::ParsedURL::spec):
* wtf/url/api/URLString.h:
(URLString):
* wtf/url/src/URLParser.h:
(WTF):
(URLParser):
(WTF::URLParser::parseURLWithBase):
* wtf/url/src/URLSegments.cpp:
(WTF::URLSegments::length):
(WTF::URLSegments::charactersBefore):
* wtf/url/src/URLSegments.h:
(URLSegments):
Change the boolean argument includeDelimiter in favor of an enum to improve readability.
2012-06-13 Filip Pizlo <fpizlo@apple.com>
DFG should be able to set watchpoints on global variables
https://bugs.webkit.org/show_bug.cgi?id=88692
Reviewed by Geoffrey Garen.
Added ability to set the inline capacity of segmented vectors.
Also added the ability ot ASSERT_NOT_REACHED() without having to
propagate NO_RETURN macros, which would be a show-stopper for code
that is conditionally unreachable.
* wtf/Assertions.h:
(UNREACHABLE_FOR_PLATFORM):
* wtf/SegmentedVector.h:
(WTF):
(SegmentedVectorIterator):
(WTF::SegmentedVectorIterator::operator=):
(WTF::SegmentedVectorIterator::SegmentedVectorIterator):
(SegmentedVector):
2012-06-13 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r120172.
http://trac.webkit.org/changeset/120172
https://bugs.webkit.org/show_bug.cgi?id=88976
The patch causes compilation failures on Gtk, Qt and Apple Win
bots (Requested by zdobersek on #webkit).
* wtf/SegmentedVector.h:
(WTF):
(SegmentedVectorIterator):
(WTF::SegmentedVectorIterator::operator=):
(WTF::SegmentedVectorIterator::SegmentedVectorIterator):
(SegmentedVector):
2012-06-10 Filip Pizlo <fpizlo@apple.com>
DFG should be able to set watchpoints on global variables
https://bugs.webkit.org/show_bug.cgi?id=88692
Reviewed by Geoffrey Garen.
Added ability to set the inline capacity of segmented vectors.
* wtf/SegmentedVector.h:
(WTF):
(SegmentedVectorIterator):
(WTF::SegmentedVectorIterator::operator=):
(WTF::SegmentedVectorIterator::SegmentedVectorIterator):
(SegmentedVector):
2012-06-12 Geoffrey Garen <ggaren@apple.com>
Try to fix the build.
Maybe don't export inlined functions.
* wtf/ThreadingPrimitives.h:
(WTF::MutexTryLocker::MutexTryLocker):
(WTF::MutexTryLocker::~MutexTryLocker):
(WTF::MutexTryLocker::locked):
2012-06-11 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
Using extrernal ICU library on case unsensitive drives will not work
https://bugs.webkit.org/show_bug.cgi?id=70913
Reviewed by Csaba Osztrogonác.
Properly set the include path for the WTF module and for modules using it.
The path should include Source/WTF/wtf only when building WTF itself. Other
modules are expected to include the headers as #include <wtf/Header.h>, so
only add Source/WTF to their include path.
"unicode/utf8.h" should now then always reference to ICU in the include path
and "wtf/unicode/UTF8.h" reference to the WTF version.
This will work as long as WTF object files don't depend on ICU themselves.
Removed gobject, qt and unicode from the include path as those directories
don't exist anymore.
* WTF.pri:
* WTF.pro:
2012-06-11 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck issues.
* GNUmakefile.list.am: Add missing header file.
2012-06-09 Dominic Cooney <dominicc@chromium.org>
[Chromium] Remove JavaScriptCore dependencies from gyp
https://bugs.webkit.org/show_bug.cgi?id=88510
Reviewed by Adam Barth.
Chromium doesn't support JSC any more and there doesn't seem to be
a strong interest in using GYP as the common build system in other
ports.
* WTF.gyp/WTF.gyp:
2012-06-08 Andy Wingo <wingo@igalia.com>
Explictly mark stubs called by JIT as being internal
https://bugs.webkit.org/show_bug.cgi?id=88552
Reviewed by Filip Pizlo.
* wtf/ExportMacros.h (WTF_INTERNAL, HAVE_INTERNAL_VISIBILITY): New
defines. Regardless of what the port does about visibility in
general, for code referenced only from assembly it is useful to
give it internal visibility.
* wtf/InlineASM.h: Split SYMBOL_STRING_RELOCATION into
LOCAL_REFERENCE and GLOBAL_REFERENCE; the former will try to avoid
indirection if HAVE(INTERNAL_VISIBILITY).
2012-06-07 Csaba Osztrogonác <ossy@webkit.org>
[Qt][Win] Fix linking WTF with ICU
https://bugs.webkit.org/show_bug.cgi?id=88302
Reviewed by Simon Hausmann.
* WTF.pri: Use proper library names on win32 platforms.
2012-06-06 Michael Saboff <msaboff@apple.com>
ENH: Add Logging to GC Marking Phase
https://bugs.webkit.org/show_bug.cgi?id=88364
Reviewed by Filip Pizlo.
* wtf/DataLog.cpp:
(WTF::dataLogString): Additional method to support GC Mark logging.
* wtf/DataLog.h:
* wtf/Platform.h: New ENABLE_OBJECT_MARK_LOGGING flag macro.
2012-06-06 Andy Wingo <wingo@igalia.com>
[GTK] Enable the LLInt
https://bugs.webkit.org/show_bug.cgi?id=88315
Reviewed by Filip Pizlo.
* wtf/InlineASM.h: Add an implementation of LOCAL_LABEL_STRING for
OS(LINUX).
* wtf/Platform.h: Add OS(LINUX) to the set of operating systems
for ENABLE_LLINT. Add a specific check for PLATFORM(MAC) or
PLATFORM(IOS), and add to that a check for PLATFORM(GTK).
2012-06-05 Roland Takacs <takacs.roland@stud.u-szeged.hu>
[Qt] Use GraphicsContext3DOpenGLES.cpp when using OpenGL ES
https://bugs.webkit.org/show_bug.cgi?id=78720
Reviewed by Noam Rosenthal.
Defined a global Opengl ES macro to check OpenGL ES on every platforms.
* wtf/Platform.h:
2012-06-04 Takashi Toyoshima <toyoshim@chromium.org>
[WebSocket] Send requires super linear time against data size
https://bugs.webkit.org/show_bug.cgi?id=87383
Reviewed by Kent Tamura.
* wtf/StreamBuffer.h: Added.
(WTF):
(StreamBuffer):
(WTF::StreamBuffer::StreamBuffer):
(WTF::StreamBuffer::~StreamBuffer):
(WTF::StreamBuffer::isEmpty):
(WTF::StreamBuffer::append):
(WTF::StreamBuffer::consume):
(WTF::StreamBuffer::size):
(WTF::StreamBuffer::firstBlockData):
(WTF::StreamBuffer::firstBlockSize):
2012-06-04 Patrick Gansterer <paroga@webkit.org>
Port RAMSize to WinCE
https://bugs.webkit.org/show_bug.cgi?id=87854
Reviewed by Geoffrey Garen.
WinCE has no GlobalMemoryStatusEx() function. Use GlobalMemoryStatus() instead.
* wtf/RAMSize.cpp:
(WTF::computeRAMSize):
2012-06-01 Xianzhu Wang <wangxianzhu@chromium.org>
Remove dependency from ImageDiff to WTF
https://bugs.webkit.org/show_bug.cgi?id=88147
Reviewed by Adam Barth.
* WTF.gyp/WTF.gyp:
2012-06-01 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Save one copy when going from 8-bit WTF::String to QString
Asking for characters() of an 8-bit string will make a 16-bit copy internally
in WTF::String. Since we're going to copy the data to QStringData anyways, which
is 16-bit, we can do the conversion ourselves and save one copy.
Reviewed by Simon Hausmann.
* wtf/qt/StringQt.cpp:
(WTF::String::operator QString):
2012-05-30 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Make conversion from QString to WTF::String (and back again) ~free
https://bugs.webkit.org/show_bug.cgi?id=87847
Instead of copying the QString data when converting to a WTF::String we
make the WTF::String adopt the QString data by introducing a new buffer
ownership type, and pointing the internal WTF::StringImpl 16-bit data
member to the string data managed by QStringData.
We make sure to reference the QStringData when adopting, so that the
data will stay alive, and then dereference it when the WTF::StringImpl
is deleted, which will free the QStringData (either straight away, if
we're the only one holding a reference still, or later, when the ref
count goes to 0).
In the case of going back from a WTF::String to a QString we can cheat
a bit (avoid a copy), if we know that the WTF::String was adopted from
a QString, since it's then just a matter of having the QString adopt
the existing QStringData (just like a regular QString copy).
If the WTF::String buffer is not owned by QStringData, eg a regular
8-bit or 16-bit string/substring, we have to fall back to copying,
as before (though there are potential optimization tricks we can
apply here later on).
Reviewed by Gavin Barraclough.
* wtf/qt/StringQt.cpp:
* wtf/text/StringImpl.cpp:
* wtf/text/StringImpl.h:
2012-06-01 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com>
[EFL] Implement PlatformStrategies
https://bugs.webkit.org/show_bug.cgi?id=86946
Reviewed by Carlos Garcia Campos.
* wtf/Platform.h: Enable PLATFORM_STRATEGIES for EFL platform.
2012-05-31 Anders Carlsson <andersca@apple.com>
Enable support for rvalue references when building with a version of clang that supports them
https://bugs.webkit.org/show_bug.cgi?id=88018
Re-enable support for rvalue references when building with a version of Xcode newer than 4.2.
* wtf/Compiler.h:
2012-05-31 Filip Pizlo <fpizlo@apple.com>
DataLog should be usable outside of JSC
https://bugs.webkit.org/show_bug.cgi?id=88015
Reviewed by Oliver Hunt.
* wtf/DataLog.h:
(WTF):
2012-05-31 Anders Carlsson <andersca@apple.com>
Disable support for rvalue references until I figure out why this is breaking the Xcode 4.2 build.
* wtf/Compiler.h:
2012-05-31 Anders Carlsson <andersca@apple.com>
Vector should have a move constructor and move assignment operator
https://bugs.webkit.org/show_bug.cgi?id=87997
Reviewed by Andreas Kling.
* wtf/Compiler.h:
Use __has_extension so we can use move semantics and other C++11 features even when building as C++98.
* wtf/Vector.h:
Add a move constructor and a move assignment operator to Vector.
2012-05-31 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Simplify QT_VERSION_CHECKS for Qt5 by introducing HAVE(QT5)
https://bugs.webkit.org/show_bug.cgi?id=87955
Reviewed by Simon Hausmann.
* wtf/qt/UtilsQt.h:
2012-05-30 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
HashTable.h has using directives for std::pair and std::make_pair
https://bugs.webkit.org/show_bug.cgi?id=29919
Reviewed by Darin Adler.
* wtf/HashTraits.h:
(WTF): Remove the directives.
2012-05-30 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
HashTable.h has using directives for std::pair and std::make_pair
https://bugs.webkit.org/show_bug.cgi?id=29919
Reviewed by Darin Adler.
Change code to use std::pair and std::make_pair. Later patch will remove the
'using' directives.
* wtf/HashTable.h:
(WTF::hashTableSwap):
(HashTable):
* wtf/HashTraits.h:
(PairHashTraits):
(WTF::PairHashTraits::emptyValue):
2012-05-30 Patrick Gansterer <paroga@webkit.org>
Build fix for WinCE after r118603.
* wtf/Atomics.h:
(WTF::weakCompareAndSwap):
2012-05-29 Anders Carlsson <andersca@apple.com>
String should be move enabled/optimized
https://bugs.webkit.org/show_bug.cgi?id=87596
Reviewed by Andreas Kling.
Add move constructors and move assignment operators to String and AtomicString when building with
compilers that support rvalue references. This gets rid of ref-churn when the source of the
constructor or assignment is a temporary object.
* wtf/text/AtomicString.h:
(AtomicString):
(WTF::AtomicString::AtomicString):
(WTF::AtomicString::operator=):
* wtf/text/WTFString.h:
(String):
(WTF::String::String):
(WTF::String::operator=):
2012-05-29 Alexandre Elias <aelias@google.com>
Support WebKit log messages on Android
https://bugs.webkit.org/show_bug.cgi?id=87773
Reviewed by Darin Adler.
This sends WebKit log messages to the Android "logcat" facility, as
Android sends stderr to /dev/null.
* wtf/Assertions.cpp:
2012-05-29 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
[Qt] Remove duplication of logic for disabling selected warnings related to C++11
This is already handled in unix/default_post.prf
Reviewed by Simon Hausmann.
* WTF.pro:
2012-05-27 Darin Adler <darin@apple.com>
Fix an incorrect assertion in Vector::remove
https://bugs.webkit.org/show_bug.cgi?id=87612
Reviewed by Dan Bernstein.
* wtf/Vector.h: There's no good reason to disallow calling remove
with a size of 0, even when the position is at the end of the vector,
so changed the two-argument Vector::remove assertion to assert that
the position is <= size rather than < size.
2012-05-27 Yoshifumi Inoue <yosin@chromium.org>
[WTF] Introduce UINT64_C to MathExtras.h
https://bugs.webkit.org/show_bug.cgi?id=87485
Reviewed by Kent Tamura.
* wtf/MathExtras.h:
2012-05-25 Filip Pizlo <fpizlo@apple.com>
weakCompareAndSwap should work on Windows
https://bugs.webkit.org/show_bug.cgi?id=87549
Reviewed by Jessie Berlin.
* wtf/Atomics.h:
(WTF):
(WTF::weakCompareAndSwap):
2012-05-24 Allan Sandfeld Jensen <allan.jensen@nokia.com>
cti_vm_throw gets kicked out by gcc 4.6 -flto
https://bugs.webkit.org/show_bug.cgi?id=56088
Reviewed by Darin Adler.
Define REFERENCED_FROM_ASM to __attribute__((used)) on GCC.
* wtf/Compiler.h:
2012-05-23 Darin Adler <darin@apple.com>
Optimize iteration of empty hash tables
https://bugs.webkit.org/show_bug.cgi?id=87215
Reviewed by Geoffrey Garen.
Iteration of empty hash tables was showing up on simple page loading
profiles due to the use of hash tables in the
NodeListsNodeData::invalidateCaches and
NodeListsNodeData::invalidateCachesThatDependOnAttributes functions.
It's worth optimizing the case of an empty table.
* wtf/HashTable.h:
(WTF::HashTable::begin): Return the known-good end iterator when the
table is empty. This makes iterating an empty table faster because we
avoid skipping empty and deleted buckets.
2012-05-22 Geoffrey Garen <ggaren@apple.com>
Build fix.
* wtf/RAMSize.cpp:
(WTF::computeRAMSize): sysctl expects a uint64_t, so use that and then
cast back to size_t. Since it's coneivable that a 32bit process would
run on a system with more than 4GB RAM, I added a paranoid check for
that condition.
2012-05-22 Jessie Berlin <jberlin@apple.com>
Build fix.
* wtf/RAMSize.cpp:
(WTF::computeRAMSize):
If you say you are going to return a size_t, actually return a size_t.
2012-05-21 Geoffrey Garen <ggaren@apple.com>
GC allocation trigger should be tuned to system RAM
https://bugs.webkit.org/show_bug.cgi?id=87039
Reviewed by Darin Adler.
Added a helper function for measuring system RAM.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/AmountOfRAM.cpp: Added.
(WTF):
(WTF::computeAmountOfRAM):
(WTF::amountOfRAM):
* wtf/AmountOfRAM.h: Added.
(WTF):
* wtf/CMakeLists.txt:
* wtf/StdLibExtras.h:
(WTF):
2012-05-22 Allan Sandfeld Jensen <allan.jensen@nokia.com>
GCC 4.7 and C++11 support.
https://bugs.webkit.org/show_bug.cgi?id=86465
Reviewed by Darin Adler.
Detect C++11 mode in GCC 4.7 and set appropiate compiler feature flags.
Turn C++11 override control into a compiler feature flag.
Fix non-clang support of compiler feature CXX_DELETED_FUNCTIONS.
* wtf/Compiler.h:
* wtf/Noncopyable.h:
2012-05-22 Filip Pizlo <fpizlo@apple.com>
REGRESSION(r117861): It made almost all tests crash on Qt
https://bugs.webkit.org/show_bug.cgi?id=87082
Reviewed by Csaba Osztrogonác.
Using OwnArrayPtr is a bad idea if you allocate array with fastCalloc.
* wtf/FastBitVector.h:
(WTF::FastBitVector::FastBitVector):
(WTF::FastBitVector::~FastBitVector):
(FastBitVector):
(WTF::FastBitVector::operator=):
(WTF::FastBitVector::resize):
(WTF::FastBitVector::setAll):
(WTF::FastBitVector::clearAll):
(WTF::FastBitVector::set):
2012-05-21 Filip Pizlo <fpizlo@apple.com>
DFG should be able to compute dominators
https://bugs.webkit.org/show_bug.cgi?id=85269
Reviewed by Oliver Hunt.
Merged r115754 from dfgopt.
Added a bitvector class suitable for cheap static analysis. This class
differs from BitVector in that instead of optimizing for space, it
optimizes for execution time. Its API is also somewhat less friendly,
which is intentional; it's meant to be used in places where you know
up front how bit your bitvectors are going to be.
* GNUmakefile.list.am:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/FastBitVector.h: Added.
(WTF):
(FastBitVector):
(WTF::FastBitVector::FastBitVector):
(WTF::FastBitVector::operator=):
(WTF::FastBitVector::numBits):
(WTF::FastBitVector::resize):
(WTF::FastBitVector::setAll):
(WTF::FastBitVector::clearAll):
(WTF::FastBitVector::set):
(WTF::FastBitVector::setAndCheck):
(WTF::FastBitVector::equals):
(WTF::FastBitVector::merge):
(WTF::FastBitVector::filter):
(WTF::FastBitVector::exclude):
(WTF::FastBitVector::clear):
(WTF::FastBitVector::get):
(WTF::FastBitVector::arrayLength):
2012-05-15 Gavin Barraclough <barraclough@apple.com>
Add support for private names
https://bugs.webkit.org/show_bug.cgi?id=86509
Reviewed by Oliver Hunt.
The spec isn't final, but we can start adding support to allow property maps
to contain keys that aren't identifiers.
* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl):
(StringImpl):
(WTF::StringImpl::createEmptyUnique):
(WTF::StringImpl::isEmptyUnique):
- Allow empty string impls to be allocated, which can be used as unique keys.
2012-05-21 Emil A Eklund <eae@chromium.org> and Levi Weintraub <leviw@chromium.org>
Enable SUBPIXEL_LAYOUT feature flag on Chromium
https://bugs.webkit.org/show_bug.cgi?id=85555
Reviewed by Eric Seidel.
Enabling sub-pixel layout on Chromium port.
* wtf/Platform.h:
2012-05-21 Andreas Kling <kling@webkit.org>
CSS: Move duplicate property elimination to parser.
<http://webkit.org/b/86948>
Reviewed by Antti Koivisto.
Add WTF::BitArray, a simple, malloc free, fixed-size bit array class.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/BitArray.h: Added.
(WTF):
(BitArray):
(WTF::BitArray::BitArray):
(WTF::BitArray::set):
(WTF::BitArray::get):
* wtf/CMakeLists.txt:
2012-05-21 Allan Sandfeld Jensen <allan.jensen@nokia.com>
Colliding isinf/isnan between C99 and C++11 with GCC >=4.6
https://bugs.webkit.org/show_bug.cgi?id=59249
Reviewed by Darin Adler.
Workaround the isinf and isnan conflict in GCC C++11.
* wtf/Compiler.h:
* wtf/MathExtras.h:
(std::wtf_isinf):
(std::wtf_isnan):
2012-05-21 Andreas Kling <kling@webkit.org>
REGRESSION(r117501): IconDatabase asserts on startup in synchronousIconForPageURL().
<http://webkit.org/b/86935>
<rdar://problem/11480012>
Reviewed by Anders Carlsson.
Added a swap() to HashCountedSet.
* wtf/HashCountedSet.h:
(HashCountedSet::swap):
2012-05-16 Geoffrey Garen <ggaren@apple.com>
This is not a joke: 3.7X speedup from removing a call to sleep
https://bugs.webkit.org/show_bug.cgi?id=86702
Reviewed by Eric Seidel.
The speedup was on a GC benchmark, with a custom VM caching layer
not in TOT yet.
Instruments showed most GC threads spending the majority of their
time sleeping instead of doing useful work. Removing the call to
sleep sped up the benchmark.
* wtf/TCSpinLock.h:
(TCMalloc_SlowLock): Since a spin lock is only ever held for a short
amount of time, don't sleep for a long amount of time waiting for it
to unlock -- yielding to the scheduler is sufficient.
If we find a case where someone is sitting on a spin lock for over 2ms,
we should fix the spin lock holder, not the spin lock.
2012-05-16 Simon Fraser <simon.fraser@apple.com>
Make things build with DUMP_HASHTABLE_STATS=1
https://bugs.webkit.org/show_bug.cgi?id=86571
Reviewed by Geoffrey Garen.
DUMP_HASHTABLE_STATS bitrotted after the WTF separation. This patch
makes it build.
Added WTF_EXPORTDATA to the global data, and WTF_EXPORT_PRIVATE to
the static HashTableStats methods. Added a dumpStats() method
that is not yet called anywhere; we can no longer rely on destroying
a global object to dump the stats because global destructors are
disallowed.
* wtf/HashTable.cpp:
(WTF):
(WTF::HashTableStats::recordCollisionAtCount):
(WTF::HashTableStats::dumpStats):
* wtf/HashTable.h:
(HashTableStats):
2012-05-15 Filip Pizlo <fpizlo@apple.com>
shrinkToFit() is often not called for Vectors in CodeBlock
https://bugs.webkit.org/show_bug.cgi?id=86436
Reviewed by Oliver Hunt.
Gave SegmentedVector a shrinkToFit() method. This only shrinks the segment
lookup table, which is likely to not be hugely profitable, but it is better
than nothing.
* wtf/SegmentedVector.h:
(SegmentedVector):
(WTF::SegmentedVector::shrinkToFit):
2012-05-15 Andy Estes <aestes@apple.com>
Add WTF_USE_SECURITY_FRAMEWORK and use it in place of the less specific PLATFORM(MAC)
https://bugs.webkit.org/show_bug.cgi?id=86508
Reviewed by Sam Weinig.
* wtf/Platform.h:
2012-05-15 Zoltan Herczeg <zherczeg@webkit.org>
NEONizing forceValidPreMultipliedPixels
https://bugs.webkit.org/show_bug.cgi?id=86468
Reviewed by Nikolas Zimmermann.
Allow to disable all intrinsics with a single macro.
* wtf/Platform.h:
2012-05-14 Andy Estes <aestes@apple.com>
Add WTF_USE_APPKIT to differentiate platforms that use AppKit.framework from other Darwin platforms
https://bugs.webkit.org/show_bug.cgi?id=86432
Reviewed by Maciej Stachowiak.
* wtf/Platform.h:
2012-05-14 Mark Rowe <mrowe@apple.com>
<http://webkit.org/b/86320> WTF.xcodeproj builds with -O3 in debug builds
Reviewed by Simon Fraser.
* WTF.xcodeproj/project.pbxproj: Ensure that the debug configuration uses the
same settings as the debug variant would.
2012-05-14 Wei James <james.wei@intel.com>
[Chromium] ImageDiff should be build for host on Android
https://bugs.webkit.org/show_bug.cgi?id=82039
Reviewed by Adam Barth.
* WTF.gyp/WTF.gyp:
2012-05-14 Yong Li <yoli@rim.com>
DFG JIT is not ARM EABI compatible
https://bugs.webkit.org/show_bug.cgi?id=84449
Reviewed by Filip Pizlo.
Add COMPILER_SUPPORTS(EABI) when __ARM_EABI__
or __EABI__ is defined.
* wtf/Compiler.h:
2012-05-10 Michał Pakuła vel Rutka <m.pakula@samsung.com>
[EFL] Add OwnPtr specialization for Eina_Hash.
https://bugs.webkit.org/show_bug.cgi?id=85046
Reviewed by Andreas Kling.
Add an override for Eina_Hash for EFL port.
* wtf/OwnPtrCommon.h:
(WTF):
* wtf/efl/OwnPtrEfl.cpp:
(WTF::deleteOwnedPtr):
(WTF):
2012-05-09 Filip Pizlo <fpizlo@apple.com>
It should be possible to get useful debug logging from the JIT memory allocator
https://bugs.webkit.org/show_bug.cgi?id=86042
Reviewed by Geoff Garen.
* wtf/MetaAllocator.cpp:
(WTF::MetaAllocator::findAndRemoveFreeSpace):
(WTF::MetaAllocator::addFreeSpace):
(WTF::MetaAllocator::dumpProfile):
2012-05-08 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r116440.
http://trac.webkit.org/changeset/116440
https://bugs.webkit.org/show_bug.cgi?id=85904
Broke the Chromium Android bot (Requested by beverloo on
#webkit).
* WTF.gyp/WTF.gyp:
2012-05-08 Adam Barth <abarth@webkit.org>
[Chromium] OS(ANDROID) ImageDiff requires us to build WTF for both host and target
https://bugs.webkit.org/show_bug.cgi?id=85897
Reviewed by Tony Chang.
* WTF.gyp/WTF.gyp:
2012-05-08 Adam Barth <abarth@webkit.org>
[Chromium] Assertions.cpp should work on OS(ANDROID)
https://bugs.webkit.org/show_bug.cgi?id=85867
Reviewed by Eric Seidel.
Some minor ifdefs for OS(ANDROID) on PLATFORM(CHROMIUM).
* wtf/Assertions.cpp:
2012-05-07 Adam Barth <abarth@webkit.org>
[Chromium] Android wishes to use an empty implementation if AXObjectCache
https://bugs.webkit.org/show_bug.cgi?id=85842
Reviewed by Eric Seidel.
Disable accessibility on OS(ANDROID) for PLATFORM(CHROMIUM).
* wtf/Platform.h:
2012-05-04 Jeff Rogers <jrogers@rim.com>
[BlackBerry] Implement numberOfProcessorCores() for QNX
https://bugs.webkit.org/show_bug.cgi?id=85638
Reviewed by Antonio Gomes.
* wtf/NumberOfCores.cpp:
(WTF::numberOfProcessorCores):
2012-05-03 Yong Li <yoli@rim.com>
Mutex failure when HashTable is memory moved in debug build
https://bugs.webkit.org/show_bug.cgi?id=84970
Reviewed by Rob Buis.
1. Replace m_mutex with OwnPtr<m_mutex> so HashTable is still
memory movable in debug build.
2. Assert successes of pthread_mutex_init() and pthread_mutex_destroy().
* wtf/HashTable.h:
(HashTable):
(WTF::::HashTable):
(WTF::::invalidateIterators):
(WTF::addIterator):
(WTF::removeIterator):
* wtf/ThreadingPthreads.cpp:
(WTF::Mutex::Mutex):
(WTF::Mutex::~Mutex):
2012-05-02 Antti Koivisto <antti@apple.com>
Add temporary feature define for parsed stylesheet caching
https://bugs.webkit.org/show_bug.cgi?id=85413
Rubber-stamped by Nikolas Zimmermann.
While not an externally visible feature this is still a significant internal change.
It is good to have define in case someone has an urgent need to turn it off.
Caching is enabled by default on all platforms. The define should be removed after some bake time.
* wtf/Platform.h:
2012-05-02 Lauro Neto <lauro.neto@openbossa.org>
[Qt]r57240 broke Qt build (gcc bug)
https://bugs.webkit.org/show_bug.cgi?id=37253
Reviewed by Csaba Osztrogonác.
Add back the inline hack just for ARM due to old version of
gcc still being used on Harmattan SDK. Thanks to Ossy for the
suggestion.
* wtf/PassRefPtr.h:
(WTF):
2012-05-02 Nico Weber <thakis@chromium.org>
Let WebKit parse with clang on windows with -std=c++11
https://bugs.webkit.org/show_bug.cgi?id=85398
Reviewed by Ryosuke Niwa.
See http://trac.webkit.org/changeset/85945 for background on the line
I'm changing. With clang, __GXX_EXPERIMENTLAL_CXX0X__ is set in c++11
mode, but MSVC's c++ library doesn't have a tr1/memory header. So also
check for __GLIBCXX__, like it's done in the rest of this file.
* wtf/TypeTraits.h:
2012-05-02 Adenilson Cavalcanti <cavalcantii@gmail.com>
[Qt]r57240 broke Qt build (gcc bug)
https://bugs.webkit.org/show_bug.cgi?id=37253
Reviewed by Noam Rosenthal.
Removing workaround macro since current gcc/Qt doesn't require it to compile.
* wtf/PassRefPtr.h:
(WTF):
2012-04-30 Oliver Hunt <oliver@apple.com>
Investigate overflows in Canvas putImageData routine
https://bugs.webkit.org/show_bug.cgi?id=61373
Reviewed by Gavin Barraclough.
Allow floating point multiplies of checked types (complete with
bounds checks).
* wtf/CheckedArithmetic.h:
(Checked):
(WTF::Checked::operator*=):
2012-04-30 Benjamin Poulain <benjamin@webkit.org>
Add String::startsWith() and endsWith() for string literals
https://bugs.webkit.org/show_bug.cgi?id=85154
Reviewed by Darin Adler.
When invoking StringImpl::startsWidth() or StringImpl::endsWith() with
a string literal, a new String was constructed implicitly, allocating
a new StringImpl and copying the characters for the operation.
This patch adds a version of those methods for single characters and
string literals.
This allows us to avoid allocating memory and use the characters in place,
and it permits some extra shortcuts in the implementation.
* wtf/text/AtomicString.h:
(WTF::AtomicString::startsWith):
(AtomicString):
(WTF::AtomicString::endsWith):
* wtf/text/StringImpl.cpp:
(WTF::equalInner):
(WTF):
(WTF::StringImpl::startsWith):
(WTF::StringImpl::endsWith):
* wtf/text/StringImpl.h:
(WTF::StringImpl::startsWith):
(StringImpl):
(WTF::StringImpl::endsWith):
* wtf/text/WTFString.h:
(WTF::String::startsWith):
(String):
(WTF::String::endsWith):
2012-04-30 Anders Carlsson <andersca@apple.com>
WTF::bind should work with blocks
https://bugs.webkit.org/show_bug.cgi?id=85227
Reviewed by Sam Weinig.
Add a block type FunctionWrapper specialization.
* wtf/Functional.h:
2012-04-28 Emil A Eklund <eae@chromium.org>
Add ENABLE_SUBPIXEL_LAYOUT controlling FractionalLayoutUnit denominator
https://bugs.webkit.org/show_bug.cgi?id=85146
Reviewed by Eric Seidel.
Add a new flag for controlling the fixed point denominator in
FractionalLayoutUnit. Controls whether the denominator is set to 60 or 1.
Until we change the LayoutUnit typedef this change will have no effect.
* wtf/Platform.h:
2012-04-29 Kent Tamura <tkent@chromium.org>
[Mac] Add LocalizedDateMac
https://bugs.webkit.org/show_bug.cgi?id=85039
Reviewed by Kentaro Hara.
* wtf/DateMath.h:
(WTF): Add monthFullName[]. It is useful to make fallback month
names for calendar/date related features.
2012-04-26 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Add a way to register custom uri schemes in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=84130
Reviewed by Martin Robinson.
Add GPtrArray template to be able to use GRefPtr with GPtrArrays.
* wtf/gobject/GRefPtr.cpp:
(WTF::refGPtr):
(WTF):
(WTF::derefGPtr):
* wtf/gobject/GRefPtr.h:
(WTF):
* wtf/gobject/GTypedefs.h:
2012-04-26 Nico Weber <thakis@chromium.org>
Don't define WTF_COMPILER_SUPPORTS_CXX_NULLPTR twice when building with clang on windows.
https://bugs.webkit.org/show_bug.cgi?id=85018
Reviewed by Anders Carlsson.
Clang sets _MSC_VER when compiling for a -pc-win32 target (just like it sets __GNUC__ on unix).
As a result, WTF_COMPILER_SUPPORTS_CXX_NULLPTR gets currently set twice, once for clang and
once for _MSC_VER. Guard the second instance with !COMPILER(CLANG). This matches the gcc code
for WTF_COMPILER_SUPPORTS_CXX_NULLPTR in the same file.
* wtf/Compiler.h:
2012-04-26 Antonio Gomes <agomes@rim.com>
[BlackBerry] properly disable DRAG_SUPPORT
https://bugs.webkit.org/show_bug.cgi?id=84952
Reviewed by Daniel Bates.
* wtf/Platform.h: Remove the line that disables drag support from here
for the BlackBerry port.
2012-04-25 Benjamin Poulain <benjamin@webkit.org>
Add a version of StringImpl::find() without offset
https://bugs.webkit.org/show_bug.cgi?id=83968
Reviewed by Sam Weinig.
This patch add a version of StringImpl::find() without offset, Instead of using the default
value for the index.
By not having the index, we can skip a couple of branches and a few instructions. This gives
significant gains when the strings are short-ish.
The case of empty string is moved below (matchLength == 1) since it is a less common operation.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::find):
(WTF):
* wtf/text/StringImpl.h:
(StringImpl):
* wtf/text/WTFString.h:
(String):
(WTF::String::find):
2012-04-25 Darin Adler <darin@apple.com>
Iterating a HashMap<String, X> involves a string equality comparison to check for the empty value
https://bugs.webkit.org/show_bug.cgi?id=84524
Reviewed by Antti Koivisto.
* wtf/HashMap.h: Added a struct template, HashMapValueTraits, that derives from
PairHashTraits, adds an isEmptyValue function that looks only at the key, not
the mapped value, in the hash table value, and uses the isHashTraitsEmptyValue
function template to check if the key is empty.
2012-04-25 Landry Breuil <landry@openbsd.org>
Include <sys/param.h>, needed for sysctl() on OpenBSD/NetBSD
https://bugs.webkit.org/show_bug.cgi?id=82585
Reviewed by Zoltan Herczeg.
* wtf/NumberOfCores.cpp: include <sys/param.h> on the BSDs
2012-04-25 Kenneth Russell <kbr@google.com>
Delete CanvasPixelArray, ByteArray, JSByteArray and JSC code once unreferenced
https://bugs.webkit.org/show_bug.cgi?id=83655
Reviewed by Oliver Hunt.
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/ByteArray.cpp: Removed.
* wtf/ByteArray.h: Removed.
* wtf/CMakeLists.txt:
2012-04-25 Philippe Normand <pnormand@igalia.com>
Webkit build fails due to missing gstreamer include file on Kubuntu 8.04
https://bugs.webkit.org/show_bug.cgi?id=81913
Reviewed by Tor Arne Vestbø.
* WTF.pri: GStreamer build support implies GLib support, as it's
done in WebCore.pri.
2012-04-24 Benjamin Poulain <bpoulain@apple.com>
Generalize the single character optimization of r114072
https://bugs.webkit.org/show_bug.cgi?id=83961
Reviewed by Eric Seidel.
This patch makes some improvment over String::find() in the case of lookup for a single
character.
The two function find(UChar|LChar) are replaced by a template.
The case of searching a UChar in a 8bit string has a shortcut if the UChar cannot
possibly match any character in the range of the type LChar.
The slow case StringImpl::find(StringImpl*) is modified to
-Do not allocate in the fast case if only one string is 8bit.
-Use the shortcut for searching UChar in LChar.
This speed up the function by about 7% when avoiding string conversion.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::find):
* wtf/text/StringImpl.h:
(StringImpl):
(WTF):
(WTF::find):
(WTF::StringImpl::find):
2012-04-24 Darin Adler <darin@apple.com>
Iterating a HashMap<String, X> involves a string equality comparison to check for the empty value
https://bugs.webkit.org/show_bug.cgi?id=84524
Reviewed by Antti Koivisto.
Added a new algorithm for checking for empty buckets that can be specialized.
Specialized it for String. We may later want to do the same thing for KURL.
It's not important to do it for AtomicString, since AtomicString's == function
is already a simple pointer equality compare. We may also later want to do
something similar for pairs that have String objects in them.
* wtf/HashTable.h:
(WTF::HashTable::isEmptyBucket): Call the new isHashTraitsEmptyValue function, which
will do something more efficient for String.
* wtf/HashTraits.h: Added hasIsEmptyValueFunction to hash traits, with a default value
of false. This allows us to continue to get automatic comparison with the appropriate
emptyValue result for all existing traits, but supply a custom isEmptyValue function
for HashTraits<String>. Putting an isEmptyValue function into the traits would require
overriding it in every class that has a custom value for emptyValue. Specialized
HashTraits for String to add hasIsEmptyValueFunction and declare, but not define, the
isEmptyValue function.
(WTF::isHashTraitsEmptyValue): Added a function that uses the HashTraitsEmptyValueChecker
struct to use either == combined with the emptyValue function or the isEmptyValue function.
* wtf/text/StringHash.h: Removed unneeded includes and sorted the using statements at
the bottom of the file.
(WTF::HashTraits<String>::isEmptyValue): Define this function here, since here we have
included the WTFString.h header; the HashTraits.h header compiles without WTFString.h.
2012-04-23 Kenneth Russell <kbr@google.com>
Change ImageData to reference Uint8ClampedArray rather than CanvasPixelArray
https://bugs.webkit.org/show_bug.cgi?id=73011
Reviewed by Oliver Hunt.
* wtf/ArrayBuffer.h:
(ArrayBuffer):
(WTF::ArrayBuffer::create):
(WTF::ArrayBuffer::createUninitialized):
(WTF):
(WTF::ArrayBufferContents::tryAllocate):
* wtf/TypedArrayBase.h:
(WTF::TypedArrayBase::createUninitialized):
(TypedArrayBase):
* wtf/Uint8ClampedArray.h:
(Uint8ClampedArray):
(WTF::Uint8ClampedArray::createUninitialized):
(WTF):
(WTF::Uint8ClampedArray::zeroFill):
2012-04-23 George Staikos <staikos@webkit.org>
Enable parallel GC for BlackBerry.
https://bugs.webkit.org/show_bug.cgi?id=84633
Reviewed by Antonio Gomes.
* wtf/Platform.h:
2012-04-23 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r114914.
http://trac.webkit.org/changeset/114914
https://bugs.webkit.org/show_bug.cgi?id=84615
Causing infinite hangs on some tests involving HashMaps with
integer keys (Requested by dimich on #webkit).
* wtf/HashTable.h:
(WTF::HashTable::isEmptyBucket):
* wtf/HashTraits.h:
* wtf/text/StringHash.h:
2012-04-23 Darin Adler <darin@apple.com>
Iterating a HashMap<String, X> involves a string equality comparison to check for the empty value
https://bugs.webkit.org/show_bug.cgi?id=84524
Reviewed by Antti Koivisto.
Added a new algorithm for checking for empty buckets that can be specialized.
Specialized it for String. We may later want to do the same thing for KURL.
It's not important to do it for AtomicString, since AtomicString's == function
is already a simple pointer equality compare.
* wtf/HashTable.h:
(WTF::HashTable::isEmptyBucket): Call the new isHashTraitsEmptyValue function, which
will do something more efficient for String.
* wtf/HashTraits.h: Added hasIsEmptyValueFunction to hash traits, with a default value
of false. This allows us to continue to get automatic comparison with the appropriate
emptyValue result for all existing traits, but supply a custom isEmptyValue function
for HashTraits<String>. Putting an isEmptyValue function into the traits would require
overriding it in every class that has a custom value for emptyValue. Specialized
HashTraits for String to add hasIsEmptyValueFunction and declare, but not define, the
isEmptyValue function.
(WTF::isHashTraitsEmptyValue): Added a function that uses the HashTraitsEmptyValueChecker
struct to use either == combined with the emptyValue function or the isEmptyValue function.
(PairHashTraits): Define hasIsEmptyValueFunction and isEmptyValue.
* wtf/text/StringHash.h: Removed unneeded includes and sorted the using statements at
the bottom of the file.
(WTF::HashTraits<String>::isEmptyValue): Define this function here, since here we have
included the WTFString.h header; the HashTraits.h header compiles without WTFString.h.
2012-04-18 Myles Maxfield <mmaxfield@google.com>
Somehow, there's an errant backslash in my last WTF patch
https://bugs.webkit.org/show_bug.cgi?id=84290
Reviewed by Andreas Kling.
* wtf/StdLibExtras.h:
(WTF::roundUpToMultipleOf):
2012-04-16 Nico Weber <thakis@chromium.org>
Make NullPtr.h compile with clang -std=c++11 and libstdc++4.2
https://bugs.webkit.org/show_bug.cgi?id=83999
Reviewed by Sam Weinig.
Before this patch, NullPtr.h assumed that a working |nullptr| implied
a working |std::nullptr_t| as well. With clang and libstdc++4.2, this
is not true.
I tested (-stdlib=libc++, -stdlib=libstdc++) x (-std=c++11, -std=c++03)
with clang.
* wtf/NullPtr.h:
(std):
2012-04-14 Sam Weinig <sam@webkit.org>
Harden WTF::ByteArray::create()
https://bugs.webkit.org/show_bug.cgi?id=83318
Reviewed by Maciej Stachowiak.
* wtf/ByteArray.cpp:
(WTF::ByteArray::create):
Add overflow check. I don't believe there is anyway to trigger this currently,
hence no tests, so this should be considered hardening.
2012-04-12 Benjamin Poulain <bpoulain@apple.com>
Inline StringImpl::find(UChar, ...)
https://bugs.webkit.org/show_bug.cgi?id=83737
Reviewed by Geoffrey Garen.
The implementation of StringImpl::find() is a simple branch before invoking one of
two inline functions. The overhead of having a function for StringImpl::find() is significant.
It is better to let the compiler decide if that should be inlined or not.
* wtf/text/StringImpl.cpp:
* wtf/text/StringImpl.h:
(StringImpl):
(WTF::find):
(WTF):
(WTF::reverseFind):
(WTF::StringImpl::find):
* wtf/text/WTFString.h:
2012-04-12 Balazs Kelemen <kbalazs@webkit.org>
[Qt] Fix WebKit1 build with V8
https://bugs.webkit.org/show_bug.cgi?id=83322
Reviewed by Adam Barth.
* wtf/StdLibExtras.h:
(WTF):
2012-04-12 Jer Noble <jer.noble@apple.com>
ThreadingWin: Mutex::unlock() can be "over-unlocked".
https://bugs.webkit.org/show_bug.cgi?id=83725
Reviewed by David Levin.
In order to support the behavior of pthread_mutex_trylock(), the Windows Mutex class includes
a recursion counter which is incremented in Mutex::lock(), decremented in Mutex::unlock(),
and checked in Mutex::tryLock(). If the mutex is "over-unlocked", the counter wraps around to
MAX_INT, and subsequent calls to Mutex::trylock() will fail. Raise an ASSERT in this situation
so the "over-unlock" will be caught.
* wtf/ThreadingWin.cpp:
(WTF::Mutex::unlock): ASSERT if unlocking a non-locked mutex.
2012-04-10 Mark Rowe <mrowe@apple.com>
<rdar://problem/10583749> WebKit2 should log to both ASL and stderr
Reviewed by Sam Weinig.
* wtf/Assertions.cpp: Add a WTFLogAlways function that unconditionally logs the given message.
* wtf/Assertions.h:
2012-04-10 Patrick Gansterer <paroga@webkit.org>
Cleanup wtf/Platform.h and config.h files
https://bugs.webkit.org/show_bug.cgi?id=83431
Reviewed by Eric Seidel.
The ENABLE() and USE() macros take care about the case when the flag
isn't defined. So there is no need to define anything with 0.
Also move duplicated code from the config.h files to Platform.h and
merge a few preprocessor commands to make the file more readable.
* config.h:
* wtf/Platform.h:
2012-04-10 Filip Pizlo <fpizlo@apple.com>
DFG should flush SetLocals to arguments
https://bugs.webkit.org/show_bug.cgi?id=83554
Reviewed by Gavin Barraclough.
Added an isRoot() method that is a faster shorthand for saying
find() == this.
* wtf/UnionFind.h:
(WTF::UnionFind::isRoot):
(UnionFind):
2012-04-10 Adam Klein <adamk@chromium.org>
Remove unused NonNullPassRefPtr from WTF
https://bugs.webkit.org/show_bug.cgi?id=82389
Reviewed by Kentaro Hara.
NonNullPassRefPtr seems to be unused since JSC allocation was
restructured in r84052.
If someone decides they need this later, they can always revert this patch.
* wtf/PassRefPtr.h:
* wtf/RefPtr.h:
(RefPtr):
2012-04-10 Patrick Gansterer <paroga@webkit.org>
[CMake] Enable USE_FOLDERS property
https://bugs.webkit.org/show_bug.cgi?id=83571
Reviewed by Daniel Bates.
Setting the FOLDER property on targets gives more structure
to the generated Visual Studio solutions.
This does not affect other CMake generators.
* wtf/CMakeLists.txt:
2012-04-09 Patrick Gansterer <paroga@webkit.org>
Port BinarySemaphoreWin.cpp to WinCE
https://bugs.webkit.org/show_bug.cgi?id=83502
Reviewed by Daniel Bates.
Replace WaitForSingleObjectEx with WaitForSingleObject since
the additonal parameter supported by the extended function
is not used anyway and the function does not exist on WinCE.
* wtf/CMakeLists.txt:
* wtf/PlatformWinCE.cmake:
* wtf/threads/win/BinarySemaphoreWin.cpp:
(WTF::BinarySemaphore::wait):
2012-04-09 Patrick Gansterer <paroga@webkit.org>
[CMake] Build fix for USE_SYSTEM_MALLOC after r113570.
* wtf/CMakeLists.txt:
2012-04-09 Patrick Gansterer <paroga@webkit.org>
Remove HAVE_STDINT_H
https://bugs.webkit.org/show_bug.cgi?id=83434
Reviewed by Kentaro Hara.
HAVE_STDINT_H is defined with 1 all the time and we us stdint.h without HAVE(STDINT_H) already.
* config.h:
* wtf/FastMalloc.cpp:
* wtf/TCPageMap.h:
* wtf/TCSpinLock.h:
* wtf/TCSystemAlloc.cpp:
2012-04-06 Benjamin Poulain <bpoulain@apple.com>
Get rid of the useless flag PREEMPT_GEOLOCATION_PERMISSION
https://bugs.webkit.org/show_bug.cgi?id=83325
Reviewed by Ryosuke Niwa.
* wtf/Platform.h: Remove the flag.
2012-04-06 Darin Adler <darin@apple.com>
Streamline strtod and fix some related problems
https://bugs.webkit.org/show_bug.cgi?id=82857
Reviewed by Geoffrey Garen.
Replaced the strtod function template with a parseDouble function, eliminating
the following unneeded features:
- need for a trailing null character and a call to strlen
- needless conversion of string lengths from size_t to int and back that created
the possibility of incorrect truncation
- one level of function call; use inlining instead
- construction of the StringToDoubleConverter object; it was used to pass
arguments that are known at compile time
- most of the StringToDoubleConverter::StringToDouble function's body; it was
code we did not need
- parsing of Infinity and NaN at the strtod level; added recently when we moved
from the old strtod to the new one, and not needed or helpful at this level
- multiple copies of code to narrow to single byte strings; in many cases
this was done even when starting with an LChar string that is already
single-byte, now we handle this with an overload of parseDouble
* wtf/dtoa.cpp:
Removed a long comment about the original strtod function that no longer
applies since we deleted that function long ago. Removed a lot of includes.
Removed the strtod function templates and its instantiations, since they
are now replaced by the parseDouble function.
(WTF::Internal::parseDoubleFromLongString): Added.
* wtf/dtoa.h:
Added an include of ASCIICType.h so we can use isASCII in a function in this
header. Left the heretofore unneeded include of double-conversion.h, since we
now want to use it in a function in this header. Removed the AllowTrailingJunkTag
and AllowTrailingSpacesTag enumerations and the strtod function template. Added
new parseDouble function, and inline implementation of it.
* wtf/dtoa/double-conversion.cc: Removed quite a bit of unused code, hardcoding
all the StringToDouble function arguments that come from data members so it can
be a much smaller static member function. Also changed the types of arguments
from int to size_t.
* wtf/dtoa/double-conversion.h: Removed most of the StringToDoubleConverter
class, leaving only the conversion function as a static member function.
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::toDouble): Got rid of didReadNumber.
(WTF::StringImpl::toFloat): Ditto.
* wtf/text/StringImpl.h: Ditto.
* wtf/text/WTFString.cpp:
(WTF::String::toDouble): Got rid of didReadNumber.
(WTF::String::toFloat): Ditto.
(WTF::toDoubleType): Rewrote this function to use parseDouble. Moved the code
to skip leading spaces here, because other callers of parseDouble don't want
to do that. Repurposed the check for an empty string so it's now the same
code shared by all the "parsed nothing" cases. Removed the code to convert
the buffer to ASCII for two reasons: (1) We don't need that code at all when
CharType is LChar, and (2) We now handle this through the two overloads for
the parseDouble function. Disallowing trailing junk is now handled here,
rather than inside parseDouble.
(WTF::charactersToDouble): Updated for changes to toDoubleType. Removed the
didReadNumber argument.
(WTF::charactersToFloat): Ditto. Also added overloads that return the parsed
length. These are a slightly more powerful way to do what didReadNumber was
used for before.
* wtf/text/WTFString.h: Added comments, eliminated didReadNumber, and added
overloads of charactersToFloat that replace charactersToFloatIgnoringJunk.
2012-04-05 Patrick Gansterer <paroga@webkit.org>
[WinCE] Remove unnecessary function decleration
https://bugs.webkit.org/show_bug.cgi?id=83155
Reviewed by Kentaro Hara.
* wtf/DateMath.cpp:
* wtf/Platform.h:
2012-04-04 Patrick Gansterer <paroga@webkit.org>
Add WTF::getCurrentLocalTime()
https://bugs.webkit.org/show_bug.cgi?id=83164
Reviewed by Alexey Proskuryakov.
Replace the calls to WTF::getLocalTime() with time(0) with the new function.
This allows us to use Win32 API on windows to get the same result in a next step.
Also remove the inline keyword from WTF::getLocalTime(), since there is no need for
it and it will make the later Win32 API changes easier.
* WTF.gyp/WTF.gyp:
* wtf/CurrentTime.cpp:
(WTF::getLocalTime):
(WTF::getCurrentLocalTime):
* wtf/CurrentTime.h:
2012-04-04 Chris Rogers <crogers@google.com>
Web Audio should use MutexTryLocker class
https://bugs.webkit.org/show_bug.cgi?id=83194
Reviewed by Kenneth Russell.
Add MutexTryLocker class which can be used as a stack-based object wrapping a Mutex.
It will automatically unlock the Mutex in its destructor if the tryLock() succeeded.
* wtf/ThreadingPrimitives.h:
(MutexTryLocker):
(WTF::MutexTryLocker::MutexTryLocker):
(WTF::MutexTryLocker::~MutexTryLocker):
(WTF::MutexTryLocker::locked):
Check if the tryLock() on the Mutex succeeded.
(WTF):
2012-04-04 Kausalya Madhusudhanan <kmadhusu@chromium.org>
[Coverity] Address some uninit constructor values.
https://bugs.webkit.org/show_bug.cgi?id=82424
Reviewed by Stephen White.
New tests are not required since I did not modify any code behavior. I just initialized the class member variables in the constructor.
* wtf/ArrayBufferView.cpp:
(WTF::ArrayBufferView::ArrayBufferView):
2012-03-30 David Barr <davidbarr@chromium.org>
Split up top-level .gitignore and .gitattributes
https://bugs.webkit.org/show_bug.cgi?id=82687
Reviewed by Tor Arne Vestbø.
* WTF.gyp/.gitignore: Added.
2012-03-29 Kevin Ollivier <kevino@theolliviers.com>
[wx] Unreviewed build fix. Add export symbols needed to
build wx under Windows.
* wtf/NullPtr.h:
* wtf/ParallelJobsGeneric.h:
(ParallelEnvironment):
* wtf/ThreadSpecific.h:
(WTF):
2012-03-29 Kevin Ollivier <kevino@theolliviers.com>
[wx] Unreviewed build fix. Add WTF_EXPORT_PRIVATE_NO_RTTI
so that ports not using RTTI can add symbol exports to
classes that RTTI ports export with WTF_EXPORT_PRIVATE_RTTI.
* wtf/ArrayBufferView.h:
* wtf/ExportMacros.h:
2012-03-29 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
HashMap<>::add should return a more descriptive object
https://bugs.webkit.org/show_bug.cgi?id=71063
Reviewed by Ryosuke Niwa.
Make HashTable<>::add() and derivate functions return an AddResult struct instead
of a pair. This struct contains contains 'iterator' and 'isNewEntry' members, that are
more readable at callsites than previous 'first' and 'second'.
* wtf/HashCountedSet.h:
(HashCountedSet):
(WTF::::add):
* wtf/HashMap.h:
(HashMap):
(WTF):
(WTF::::set):
* wtf/HashSet.h:
(HashSet):
(WTF::::add):
(WTF):
* wtf/HashTable.h:
(WTF::HashTableAddResult::HashTableAddResult):
(HashTableAddResult):
(WTF):
(HashTable):
(WTF::HashTable::add):
(WTF::::add):
(WTF::::addPassingHashCode):
* wtf/ListHashSet.h:
(ListHashSet):
(WTF::::add):
(WTF::::insertBefore):
* wtf/RefPtrHashMap.h:
(WTF):
(WTF::::set):
* wtf/Spectrum.h:
(WTF::Spectrum::add):
* wtf/WTFThreadData.cpp:
(JSC::IdentifierTable::add):
* wtf/WTFThreadData.h:
(IdentifierTable):
* wtf/text/AtomicString.cpp:
(WTF::addToStringTable):
(WTF::AtomicString::addSlowCase):
2012-03-29 Andreas Kling <kling@webkit.org>
String: Subscript operator shouldn't force conversion to 16-bit characters.
<http://webkit.org/b/82613>
Reviewed by Anders Carlsson.
Forward String::operator[] to StringImpl::operator[] instead of indexing into characters().
This avoid implicit conversion of 8-bit strings to 16-bit, and as an example, reduces memory
usage on http://www.allthingsd.com/ by 360kB.
* wtf/text/WTFString.h:
(WTF::String::operator[]):
2012-03-28 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Implement PlatformStrategies
https://bugs.webkit.org/show_bug.cgi?id=82454
Reviewed by Xan Lopez.
* wtf/Platform.h: Define WTF_USE_PLATFORM_STRATEGIES for GTK+
platform too.
2012-03-26 Ryosuke Niwa <rniwa@webkit.org>
Set eol-style: native on WTF.sln per Ryan Sleevi's request.
* WTF.vcproj/WTF.sln: Added property svn:eol-style.
2012-03-26 Ryosuke Niwa <rniwa@webkit.org>
Chromium build fix; add BitVector.h/cpp to gypi.
* WTF.gypi:
2012-03-26 Ryosuke Niwa <rniwa@webkit.org>
Touch BitVector as a speculative fix for Chromium Linux.
* wtf/BitVector.h:
(BitVector):
2012-03-23 Ryosuke Niwa <rniwa@webkit.org>
cssText should use shorthand notations
https://bugs.webkit.org/show_bug.cgi?id=81737
Reviewed by Enrica Casucci.
* wtf/BitVector.h:
(BitVector):
(WTF::BitVector::ensureSizeAndSet): Added.
2012-03-26 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.list.am: Add config.h to the source file list.
2012-03-25 Kevin Ollivier <kevino@theolliviers.com>
[wx] Unreviewed build fix. Move WTF to its own static lib build.
* wscript: Added.
2012-03-23 Tony Chang <tony@chromium.org>
[chromium] Unreviewed, move a comment closer to where it matters and
make it more specific.
* WTF.gyp/WTF.gyp:
2012-03-23 Steve Falkenburg <sfalken@apple.com>
Update Apple Windows build files for WTF move
https://bugs.webkit.org/show_bug.cgi?id=82069
Reviewed by Jessie Berlin.
* WTF.vcproj/WTF.make: Added.
* WTF.vcproj/WTF.sln: Added.
2012-03-23 Dean Jackson <dino@apple.com>
Disable CSS_SHADERS in Apple builds
https://bugs.webkit.org/show_bug.cgi?id=81996
Reviewed by Simon Fraser.
Put ENABLE_CSS_SHADERS into Platform.h, but disable for
Apple builds.
* wtf/Platform.h:
2012-03-23 Tony Chang <tony@chromium.org>
[chromium] rename newwtf target back to wtf
https://bugs.webkit.org/show_bug.cgi?id=82064
Reviewed by Adam Barth.
* WTF.gyp/WTF.gyp:
2012-03-22 Jessie Berlin <jberlin@apple.com>
Windows build fix after r111778.
* WTF.vcproj/WTF.vcproj:
DateMath.h and DateMath.cpp should be built by WTF, since they are part of WTF.
2012-03-22 Raphael Kubo da Costa <rakuco@FreeBSD.org>
[CMake] Unreviewed build fix after r111778.
* CMakeLists.txt: Added.
* wtf/CMakeLists.txt: Add ${CMAKE_BINARY_DIR} to the include paths
for cmakeconfig.h to be found.
2012-03-22 Tony Chang <tony@chromium.org>
Unreviewed, attempt to fix the chromium-win build and another attempt
at fixing the chromium-android build.
* WTF.gyp/WTF.gyp:
2012-03-22 Tony Chang <tony@chromium.org>
Unreviewed, attempt to fix chromium-android build.
* WTF.gyp/WTF.gyp:
2012-03-22 Tony Chang <tony@chromium.org>
Unreviewed, fix chromium build after wtf move.
Move wtf_config and wtf settings to newwtf.
* WTF.gyp/WTF.gyp:
2012-03-22 Martin Robinson <mrobinson@igalia.com>
One more GTK+ build fix after r111778.
* GNUmakefile.am: Adding missing include path.
2012-03-22 Martin Robinson <mrobinson@igalia.com>
Fixed the GTK+ WTF/JavaScriptCore build after r111778.
* GNUmakefile.am: Remove some extra trailing backslashes and a few uncessary
variables.
* GNUmakefile.list.am: Ditto.
2012-03-22 Dan Bernstein <mitz@apple.com>
Fixed the JavaScriptCore debug build after r111778.
* WTF.xcodeproj/project.pbxproj: Use debug DEBUG_DEFINES when building
the Debug configuration.
2012-03-22 Csaba Osztrogonác <ossy@webkit.org>
Actually move WTF files to their new home
https://bugs.webkit.org/show_bug.cgi?id=81844
[Qt] Unreviewed buildfix after r111778.
* WTF.pri:
2012-03-22 Eric Seidel <eric@webkit.org>
Actually move WTF files to their new home
https://bugs.webkit.org/show_bug.cgi?id=81844
Unreviewed attempt to fix AppleWin.
* WTF.vcproj/WTFCommon.vsprops:
2012-03-22 Eric Seidel <eric@webkit.org>
Actually move WTF files to their new home
https://bugs.webkit.org/show_bug.cgi?id=81844
Unreviewed. The 5MB file move is not very reviewable,
but various port representatives have OK'd changes to the
individual build systems.
* Configurations/WTF.xcconfig:
* GNUmakefile.list.am:
* Stub.cpp: Removed.
* Stub.h: Removed.
* WTF.gypi:
* WTF.pri:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.vcproj/copy-files.cmd:
* WTF.xcodeproj/project.pbxproj:
* config.h:
* wtf/ASCIICType.h: Renamed from Source/JavaScriptCore/wtf/ASCIICType.h.
(WTF):
(WTF::isASCII):
(WTF::isASCIIAlpha):
(WTF::isASCIIDigit):
(WTF::isASCIIAlphanumeric):
(WTF::isASCIIHexDigit):
(WTF::isASCIILower):
(WTF::isASCIIOctalDigit):
(WTF::isASCIIPrintable):
(WTF::isASCIISpace):
(WTF::isASCIIUpper):
(WTF::toASCIILower):
(WTF::toASCIILowerUnchecked):
(WTF::toASCIIUpper):
(WTF::toASCIIHexValue):
(WTF::lowerNibbleToASCIIHexDigit):
(WTF::upperNibbleToASCIIHexDigit):
(WTF::isASCIIAlphaCaselessEqual):
* wtf/AVLTree.h: Renamed from Source/JavaScriptCore/wtf/AVLTree.h.
(WTF):
(AVLTreeDefaultBSet):
(WTF::AVLTreeDefaultBSet::operator[]):
(WTF::AVLTreeDefaultBSet::set):
(WTF::AVLTreeDefaultBSet::reset):
(AVLTree):
(WTF::AVLTree::abstractor):
(WTF::AVLTree::purge):
(WTF::AVLTree::is_empty):
(WTF::AVLTree::AVLTree):
(Iterator):
(WTF::AVLTree::Iterator::Iterator):
(WTF::AVLTree::Iterator::start_iter):
(WTF::AVLTree::Iterator::start_iter_least):
(WTF::AVLTree::Iterator::start_iter_greatest):
(WTF::AVLTree::Iterator::operator*):
(WTF::AVLTree::Iterator::operator++):
(WTF::AVLTree::Iterator::operator--):
(WTF::AVLTree::Iterator::cmp_k_n):
(WTF::AVLTree::Iterator::cmp_n_n):
(WTF::AVLTree::Iterator::get_lt):
(WTF::AVLTree::Iterator::get_gt):
(WTF::AVLTree::Iterator::null):
(WTF::AVLTree::build):
(abs_plus_root):
(WTF::AVLTree::get_lt):
(WTF::AVLTree::set_lt):
(WTF::AVLTree::get_gt):
(WTF::AVLTree::set_gt):
(WTF::AVLTree::get_bf):
(WTF::AVLTree::set_bf):
(WTF::AVLTree::cmp_k_n):
(WTF::AVLTree::cmp_n_n):
(WTF::AVLTree::null):
(WTF::AVLTree::balance):
(WTF::::insert):
(WTF::::search):
(WTF::::search_least):
(WTF::::search_greatest):
(WTF::::remove):
(WTF::::subst):
* wtf/Alignment.h: Renamed from Source/JavaScriptCore/wtf/Alignment.h.
(WTF):
(WTF::swap):
* wtf/AlwaysInline.h: Renamed from Source/JavaScriptCore/wtf/AlwaysInline.h.
* wtf/ArrayBuffer.cpp: Renamed from Source/JavaScriptCore/wtf/ArrayBuffer.cpp.
(WTF):
(WTF::ArrayBuffer::transfer):
(WTF::ArrayBuffer::addView):
(WTF::ArrayBuffer::removeView):
* wtf/ArrayBuffer.h: Renamed from Source/JavaScriptCore/wtf/ArrayBuffer.h.
(WTF):
(ArrayBufferContents):
(WTF::ArrayBufferContents::ArrayBufferContents):
(WTF::ArrayBufferContents::data):
(WTF::ArrayBufferContents::sizeInBytes):
(WTF::ArrayBufferContents::transfer):
(ArrayBuffer):
(WTF::ArrayBuffer::isNeutered):
(WTF::ArrayBuffer::~ArrayBuffer):
(WTF::ArrayBuffer::clampValue):
(WTF::ArrayBuffer::create):
(WTF::ArrayBuffer::ArrayBuffer):
(WTF::ArrayBuffer::data):
(WTF::ArrayBuffer::byteLength):
(WTF::ArrayBuffer::slice):
(WTF::ArrayBuffer::sliceImpl):
(WTF::ArrayBuffer::clampIndex):
(WTF::ArrayBufferContents::tryAllocate):
(WTF::ArrayBufferContents::~ArrayBufferContents):
* wtf/ArrayBufferView.cpp: Renamed from Source/JavaScriptCore/wtf/ArrayBufferView.cpp.
(WTF):
(WTF::ArrayBufferView::ArrayBufferView):
(WTF::ArrayBufferView::~ArrayBufferView):
(WTF::ArrayBufferView::neuter):
* wtf/ArrayBufferView.h: Renamed from Source/JavaScriptCore/wtf/ArrayBufferView.h.
(WTF):
(WTF::ArrayBufferView::setImpl):
(WTF::ArrayBufferView::setRangeImpl):
(WTF::ArrayBufferView::zeroRangeImpl):
(WTF::ArrayBufferView::calculateOffsetAndLength):
* wtf/Assertions.cpp: Renamed from Source/JavaScriptCore/wtf/Assertions.cpp.
* wtf/Assertions.h: Renamed from Source/JavaScriptCore/wtf/Assertions.h.
(assertUnused):
(assertWithMessageUnused):
* wtf/Atomics.h: Renamed from Source/JavaScriptCore/wtf/Atomics.h.
(WTF):
(WTF::atomicIncrement):
(WTF::atomicDecrement):
(WTF::weakCompareAndSwap):
(WTF::weakCompareAndSwapUIntPtr):
* wtf/BitVector.cpp: Renamed from Source/JavaScriptCore/wtf/BitVector.cpp.
(WTF):
(WTF::BitVector::setSlow):
(WTF::BitVector::resize):
(WTF::BitVector::clearAll):
(WTF::BitVector::OutOfLineBits::create):
(WTF::BitVector::OutOfLineBits::destroy):
(WTF::BitVector::resizeOutOfLine):
(WTF::BitVector::dump):
* wtf/BitVector.h: Renamed from Source/JavaScriptCore/wtf/BitVector.h.
(WTF):
(BitVector):
(WTF::BitVector::BitVector):
(WTF::BitVector::~BitVector):
(WTF::BitVector::operator=):
(WTF::BitVector::size):
(WTF::BitVector::ensureSize):
(WTF::BitVector::quickGet):
(WTF::BitVector::quickSet):
(WTF::BitVector::quickClear):
(WTF::BitVector::get):
(WTF::BitVector::set):
(WTF::BitVector::clear):
(WTF::BitVector::bitsInPointer):
(WTF::BitVector::maxInlineBits):
(WTF::BitVector::byteCount):
(WTF::BitVector::makeInlineBits):
(OutOfLineBits):
(WTF::BitVector::OutOfLineBits::numBits):
(WTF::BitVector::OutOfLineBits::numWords):
(WTF::BitVector::OutOfLineBits::bits):
(WTF::BitVector::OutOfLineBits::OutOfLineBits):
(WTF::BitVector::isInline):
(WTF::BitVector::outOfLineBits):
(WTF::BitVector::bits):
* wtf/Bitmap.h: Renamed from Source/JavaScriptCore/wtf/Bitmap.h.
(WTF):
(Bitmap):
(WTF::::Bitmap):
(WTF::::get):
(WTF::::set):
(WTF::::testAndSet):
(WTF::::testAndClear):
(WTF::::concurrentTestAndSet):
(WTF::::concurrentTestAndClear):
(WTF::::clear):
(WTF::::clearAll):
(WTF::::nextPossiblyUnset):
(WTF::::findRunOfZeros):
(WTF::::count):
(WTF::::isEmpty):
(WTF::::isFull):
* wtf/BlockStack.h: Renamed from Source/JavaScriptCore/wtf/BlockStack.h.
(WTF):
(BlockStack):
(WTF::::BlockStack):
(WTF::::~BlockStack):
(WTF::::blocks):
(WTF::::grow):
(WTF::::shrink):
* wtf/BloomFilter.h: Renamed from Source/JavaScriptCore/wtf/BloomFilter.h.
(WTF):
(BloomFilter):
(WTF::BloomFilter::maximumCount):
(WTF::BloomFilter::BloomFilter):
(WTF::BloomFilter::mayContain):
(WTF::BloomFilter::add):
(WTF::BloomFilter::remove):
(WTF::BloomFilter::firstSlot):
(WTF::BloomFilter::secondSlot):
(WTF::::add):
(WTF::::remove):
(WTF::::clear):
(WTF::::likelyEmpty):
(WTF::::isClear):
* wtf/BoundsCheckedPointer.h: Renamed from Source/JavaScriptCore/wtf/BoundsCheckedPointer.h.
(WTF):
(BoundsCheckedPointer):
(WTF::BoundsCheckedPointer::BoundsCheckedPointer):
(WTF::BoundsCheckedPointer::operator=):
(WTF::BoundsCheckedPointer::operator+=):
(WTF::BoundsCheckedPointer::operator-=):
(WTF::BoundsCheckedPointer::operator+):
(WTF::BoundsCheckedPointer::operator-):
(WTF::BoundsCheckedPointer::operator++):
(WTF::BoundsCheckedPointer::operator--):
(WTF::BoundsCheckedPointer::operator<):
(WTF::BoundsCheckedPointer::operator<=):
(WTF::BoundsCheckedPointer::operator>):
(WTF::BoundsCheckedPointer::operator>=):
(WTF::BoundsCheckedPointer::operator==):
(WTF::BoundsCheckedPointer::operator!=):
(WTF::BoundsCheckedPointer::operator!):
(WTF::BoundsCheckedPointer::get):
(WTF::BoundsCheckedPointer::operator*):
(WTF::BoundsCheckedPointer::operator[]):
(WTF::BoundsCheckedPointer::strcat):
(WTF::BoundsCheckedPointer::validate):
* wtf/BumpPointerAllocator.h: Renamed from Source/JavaScriptCore/wtf/BumpPointerAllocator.h.
(WTF):
(BumpPointerPool):
(WTF::BumpPointerPool::ensureCapacity):
(WTF::BumpPointerPool::alloc):
(WTF::BumpPointerPool::dealloc):
(WTF::BumpPointerPool::operator new):
(WTF::BumpPointerPool::BumpPointerPool):
(WTF::BumpPointerPool::create):
(WTF::BumpPointerPool::shrink):
(WTF::BumpPointerPool::destroy):
(WTF::BumpPointerPool::ensureCapacityCrossPool):
(WTF::BumpPointerPool::deallocCrossPool):
(BumpPointerAllocator):
(WTF::BumpPointerAllocator::BumpPointerAllocator):
(WTF::BumpPointerAllocator::~BumpPointerAllocator):
(WTF::BumpPointerAllocator::startAllocator):
(WTF::BumpPointerAllocator::stopAllocator):
* wtf/ByteArray.cpp: Renamed from Source/JavaScriptCore/wtf/ByteArray.cpp.
(WTF):
(WTF::ByteArray::create):
* wtf/ByteArray.h: Renamed from Source/JavaScriptCore/wtf/ByteArray.h.
(ByteArray):
(WTF::ByteArray::length):
(WTF::ByteArray::set):
(WTF::ByteArray::get):
(WTF::ByteArray::data):
(WTF::ByteArray::clear):
(WTF::ByteArray::deref):
(WTF::ByteArray::offsetOfSize):
(WTF::ByteArray::offsetOfData):
(WTF::ByteArray::ByteArray):
* wtf/CMakeLists.txt: Renamed from Source/JavaScriptCore/wtf/CMakeLists.txt.
* wtf/CONTRIBUTORS.pthreads-win32: Renamed from Source/JavaScriptCore/wtf/CONTRIBUTORS.pthreads-win32.
* wtf/CheckedArithmetic.h: Renamed from Source/JavaScriptCore/wtf/CheckedArithmetic.h.
(WTF):
(CrashOnOverflow):
(WTF::CrashOnOverflow::overflowed):
(WTF::CrashOnOverflow::clearOverflow):
(WTF::CrashOnOverflow::hasOverflowed):
(RecordOverflow):
(WTF::RecordOverflow::RecordOverflow):
(WTF::RecordOverflow::overflowed):
(WTF::RecordOverflow::clearOverflow):
(WTF::RecordOverflow::hasOverflowed):
(WTF::isInBounds):
(RemoveChecked):
(WTF::safeAdd):
(WTF::safeSub):
(WTF::safeMultiply):
(WTF::safeEquals):
(WTF::workAroundClangBug):
(Checked):
(WTF::Checked::Checked):
(WTF::Checked::operator=):
(WTF::Checked::operator++):
(WTF::Checked::operator--):
(WTF::Checked::operator!):
(WTF::Checked::operator UnspecifiedBoolType*):
(WTF::Checked::unsafeGet):
(WTF::Checked::operator+=):
(WTF::Checked::operator-=):
(WTF::Checked::operator*=):
(WTF::Checked::operator==):
(WTF::Checked::operator!=):
(WTF::operator+):
(WTF::operator-):
(WTF::operator*):
* wtf/CheckedBoolean.h: Renamed from Source/JavaScriptCore/wtf/CheckedBoolean.h.
(CheckedBoolean):
(CheckedBoolean::CheckedBoolean):
(CheckedBoolean::~CheckedBoolean):
(CheckedBoolean::operator bool):
* wtf/Compiler.h: Renamed from Source/JavaScriptCore/wtf/Compiler.h.
* wtf/Complex.h: Renamed from Source/JavaScriptCore/wtf/Complex.h.
(WTF):
(WTF::complexFromMagnitudePhase):
* wtf/CryptographicallyRandomNumber.cpp: Renamed from Source/JavaScriptCore/wtf/CryptographicallyRandomNumber.cpp.
(WTF::cryptographicallyRandomNumber):
(WTF):
(WTF::cryptographicallyRandomValues):
* wtf/CryptographicallyRandomNumber.h: Renamed from Source/JavaScriptCore/wtf/CryptographicallyRandomNumber.h.
(WTF):
* wtf/CurrentTime.cpp: Renamed from Source/JavaScriptCore/wtf/CurrentTime.cpp.
(WTF):
(WTF::highResUpTime):
(WTF::lowResUTCTime):
(WTF::qpcAvailable):
(WTF::currentTime):
(WTF::currentSystemTime):
(WTF::monotonicallyIncreasingTime):
* wtf/CurrentTime.h: Renamed from Source/JavaScriptCore/wtf/CurrentTime.h.
(WTF):
(WTF::currentTimeMS):
(WTF::getLocalTime):
* wtf/DataLog.cpp: Renamed from Source/JavaScriptCore/wtf/DataLog.cpp.
(WTF):
(WTF::initializeLogFileOnce):
(WTF::initializeLogFile):
(WTF::dataFile):
(WTF::dataLogV):
(WTF::dataLog):
* wtf/DataLog.h: Renamed from Source/JavaScriptCore/wtf/DataLog.h.
(WTF):
* wtf/DateMath.cpp: Renamed from Source/JavaScriptCore/wtf/DateMath.cpp.
(WTF):
(WTF::isLeapYear):
(WTF::daysInYear):
(WTF::daysFrom1970ToYear):
(WTF::msToDays):
(WTF::twoDigitStringFromNumber):
(WTF::msToYear):
(WTF::dayInYear):
(WTF::msToMilliseconds):
(WTF::msToMinutes):
(WTF::msToHours):
(WTF::monthFromDayInYear):
(WTF::checkMonth):
(WTF::dayInMonthFromDayInYear):
(WTF::monthToDayInYear):
(WTF::dateToDaysFrom1970):
(WTF::maximumYearForDST):
(WTF::minimumYearForDST):
(WTF::equivalentYearForDST):
(WTF::calculateUTCOffset):
(WTF::calculateDSTOffsetSimple):
(WTF::calculateDSTOffset):
(WTF::initializeDates):
(WTF::ymdhmsToSeconds):
(KnownZone):
(WTF::skipSpacesAndComments):
(WTF::findMonth):
(WTF::parseLong):
(WTF::parseES5DatePortion):
(WTF::parseES5TimePortion):
(WTF::parseES5DateFromNullTerminatedCharacters):
(WTF::parseDateFromNullTerminatedCharacters):
(WTF::timeClip):
(WTF::makeRFC2822DateString):
* wtf/DateMath.h: Renamed from Source/JavaScriptCore/wtf/DateMath.h.
(WTF):
(WTF::jsCurrentTime):
* wtf/DecimalNumber.cpp: Renamed from Source/JavaScriptCore/wtf/DecimalNumber.cpp.
(WTF):
(WTF::DecimalNumber::bufferLengthForStringDecimal):
(WTF::DecimalNumber::bufferLengthForStringExponential):
(WTF::DecimalNumber::toStringDecimal):
(WTF::DecimalNumber::toStringExponential):
* wtf/DecimalNumber.h: Renamed from Source/JavaScriptCore/wtf/DecimalNumber.h.
(WTF):
(DecimalNumber):
(WTF::DecimalNumber::DecimalNumber):
(WTF::DecimalNumber::sign):
(WTF::DecimalNumber::exponent):
(WTF::DecimalNumber::significand):
(WTF::DecimalNumber::precision):
* wtf/Decoder.h: Renamed from Source/JavaScriptCore/wtf/Decoder.h.
(WTF):
(Decoder):
(WTF::Decoder::Decoder):
(WTF::Decoder::~Decoder):
* wtf/Deque.h: Renamed from Source/JavaScriptCore/wtf/Deque.h.
(WTF):
(Deque):
(WTF::Deque::size):
(WTF::Deque::isEmpty):
(WTF::Deque::begin):
(WTF::Deque::end):
(WTF::Deque::rbegin):
(WTF::Deque::rend):
(WTF::Deque::first):
(WTF::Deque::last):
(DequeIteratorBase):
(WTF::DequeIteratorBase::assign):
(DequeIterator):
(WTF::DequeIterator::DequeIterator):
(WTF::DequeIterator::operator=):
(WTF::DequeIterator::operator*):
(WTF::DequeIterator::operator->):
(WTF::DequeIterator::operator==):
(WTF::DequeIterator::operator!=):
(WTF::DequeIterator::operator++):
(WTF::DequeIterator::operator--):
(DequeConstIterator):
(WTF::DequeConstIterator::DequeConstIterator):
(WTF::DequeConstIterator::operator=):
(WTF::DequeConstIterator::operator*):
(WTF::DequeConstIterator::operator->):
(WTF::DequeConstIterator::operator==):
(WTF::DequeConstIterator::operator!=):
(WTF::DequeConstIterator::operator++):
(WTF::DequeConstIterator::operator--):
(DequeReverseIterator):
(WTF::DequeReverseIterator::DequeReverseIterator):
(WTF::DequeReverseIterator::operator=):
(WTF::DequeReverseIterator::operator*):
(WTF::DequeReverseIterator::operator->):
(WTF::DequeReverseIterator::operator==):
(WTF::DequeReverseIterator::operator!=):
(WTF::DequeReverseIterator::operator++):
(WTF::DequeReverseIterator::operator--):
(DequeConstReverseIterator):
(WTF::DequeConstReverseIterator::DequeConstReverseIterator):
(WTF::DequeConstReverseIterator::operator=):
(WTF::DequeConstReverseIterator::operator*):
(WTF::DequeConstReverseIterator::operator->):
(WTF::DequeConstReverseIterator::operator==):
(WTF::DequeConstReverseIterator::operator!=):
(WTF::DequeConstReverseIterator::operator++):
(WTF::DequeConstReverseIterator::operator--):
(WTF::::checkValidity):
(WTF::::checkIndexValidity):
(WTF::::invalidateIterators):
(WTF::::Deque):
(WTF::deleteAllValues):
(WTF::=):
(WTF::::destroyAll):
(WTF::::~Deque):
(WTF::::swap):
(WTF::::clear):
(WTF::::findIf):
(WTF::::expandCapacityIfNeeded):
(WTF::::expandCapacity):
(WTF::::takeFirst):
(WTF::::append):
(WTF::::prepend):
(WTF::::removeFirst):
(WTF::::remove):
(WTF::::addToIteratorsList):
(WTF::::removeFromIteratorsList):
(WTF::::DequeIteratorBase):
(WTF::::~DequeIteratorBase):
(WTF::::isEqual):
(WTF::::increment):
(WTF::::decrement):
(WTF::::after):
(WTF::::before):
* wtf/DisallowCType.h: Renamed from Source/JavaScriptCore/wtf/DisallowCType.h.
* wtf/DoublyLinkedList.h: Renamed from Source/JavaScriptCore/wtf/DoublyLinkedList.h.
(WTF):
(DoublyLinkedListNode):
(WTF::::DoublyLinkedListNode):
(WTF::::setPrev):
(WTF::::setNext):
(WTF::::prev):
(WTF::::next):
(DoublyLinkedList):
(WTF::::DoublyLinkedList):
(WTF::::isEmpty):
(WTF::::size):
(WTF::::clear):
(WTF::::head):
(WTF::::tail):
(WTF::::push):
(WTF::::append):
(WTF::::remove):
(WTF::::removeHead):
* wtf/DynamicAnnotations.cpp: Renamed from Source/JavaScriptCore/wtf/DynamicAnnotations.cpp.
(WTFAnnotateBenignRaceSized):
(WTFAnnotateHappensBefore):
(WTFAnnotateHappensAfter):
* wtf/DynamicAnnotations.h: Renamed from Source/JavaScriptCore/wtf/DynamicAnnotations.h.
* wtf/Encoder.h: Renamed from Source/JavaScriptCore/wtf/Encoder.h.
(WTF):
(Encoder):
(WTF::Encoder::Encoder):
(WTF::Encoder::~Encoder):
* wtf/ExportMacros.h: Renamed from Source/JavaScriptCore/wtf/ExportMacros.h.
* wtf/FastAllocBase.h: Renamed from Source/JavaScriptCore/wtf/FastAllocBase.h.
(WTF):
(WTF::fastNew):
(Internal):
(WTF::Internal::NewArrayImpl::fastNewArray):
(WTF::fastNewArray):
(WTF::fastDelete):
(WTF::fastDeleteSkippingDestructor):
(WTF::Internal::DeleteArrayImpl::fastDeleteArray):
(WTF::fastDeleteArray):
(WTF::fastNonNullDelete):
(WTF::Internal::NonNullDeleteArrayImpl::fastNonNullDeleteArray):
(WTF::fastNonNullDeleteArray):
* wtf/FastMalloc.cpp: Renamed from Source/JavaScriptCore/wtf/FastMalloc.cpp.
(WTF):
(WTF::isForbidden):
(WTF::fastMallocForbid):
(WTF::fastMallocAllow):
(WTF::initializeIsForbiddenKey):
(Internal):
(WTF::Internal::fastMallocMatchFailed):
(WTF::fastZeroedMalloc):
(WTF::fastStrDup):
(WTF::tryFastZeroedMalloc):
(WTF::tryFastMalloc):
(WTF::fastMalloc):
(WTF::tryFastCalloc):
(WTF::fastCalloc):
(WTF::fastFree):
(WTF::tryFastRealloc):
(WTF::fastRealloc):
(WTF::releaseFastMallocFreeMemory):
(WTF::fastMallocStatistics):
(WTF::fastMallocSize):
(FastMallocZone):
(WTF::FastMallocZone::goodSize):
(WTF::FastMallocZone::check):
(WTF::FastMallocZone::print):
(WTF::FastMallocZone::log):
(WTF::FastMallocZone::forceLock):
(WTF::FastMallocZone::forceUnlock):
(WTF::FastMallocZone::statistics):
(WTF::FastMallocZone::zoneValloc):
(WTF::FastMallocZone::zoneDestroy):
(WTF::KernelSupportsTLS):
(WTF::CheckIfKernelSupportsTLS):
(WTF::ClassIndex):
(TCEntry):
(WTF::LgFloor):
(WTF::SLL_Next):
(WTF::SLL_SetNext):
(WTF::SLL_Push):
(WTF::SLL_Pop):
(WTF::SLL_PopRange):
(WTF::SLL_PushRange):
(WTF::SLL_Size):
(WTF::SizeClass):
(WTF::ByteSizeForClass):
(WTF::NumMoveSize):
(WTF::InitSizeClasses):
(WTF::MetaDataAlloc):
(PageHeapAllocator):
(WTF::PageHeapAllocator::Init):
(WTF::PageHeapAllocator::New):
(WTF::PageHeapAllocator::Delete):
(WTF::PageHeapAllocator::inuse):
(WTF::PageHeapAllocator::recordAdministrativeRegions):
(WTF::pages):
(WTF::AllocationSize):
(Span):
(WTF::Event):
(WTF::NewSpan):
(WTF::DeleteSpan):
(WTF::DLL_Init):
(WTF::DLL_Remove):
(WTF::DLL_IsEmpty):
(WTF::DLL_Length):
(WTF::DLL_Print):
(WTF::DLL_Prepend):
(StackTrace):
(MapSelector):
(TCMalloc_PageHeap):
(WTF::TCMalloc_PageHeap::GetDescriptor):
(WTF::TCMalloc_PageHeap::GetDescriptorEnsureSafe):
(WTF::TCMalloc_PageHeap::SystemBytes):
(WTF::TCMalloc_PageHeap::FreeBytes):
(WTF::TCMalloc_PageHeap::GetSizeClassIfCached):
(WTF::TCMalloc_PageHeap::CacheSizeClass):
(SpanList):
(WTF::TCMalloc_PageHeap::RecordSpan):
(WTF::TCMalloc_PageHeap::init):
(WTF::TCMalloc_PageHeap::initializeScavenger):
(WTF::TCMalloc_PageHeap::isScavengerSuspended):
(WTF::TCMalloc_PageHeap::scheduleScavenger):
(WTF::TCMalloc_PageHeap::rescheduleScavenger):
(WTF::TCMalloc_PageHeap::suspendScavenger):
(WTF::TCMalloc_PageHeap::scavengerTimerFired):
(WTF::TCMalloc_PageHeap::runScavengerThread):
(WTF::TCMalloc_PageHeap::signalScavenger):
(WTF::TCMalloc_PageHeap::scavenge):
(WTF::TCMalloc_PageHeap::shouldScavenge):
(WTF::TCMalloc_PageHeap::New):
(WTF::TCMalloc_PageHeap::AllocLarge):
(WTF::TCMalloc_PageHeap::Split):
(WTF::TCMalloc_PageHeap::Carve):
(WTF::mergeDecommittedStates):
(WTF::TCMalloc_PageHeap::Delete):
(WTF::TCMalloc_PageHeap::IncrementalScavenge):
(WTF::TCMalloc_PageHeap::RegisterSizeClass):
(WTF::TCMalloc_PageHeap::ReturnedBytes):
(WTF::PagesToMB):
(WTF::TCMalloc_PageHeap::Dump):
(WTF::TCMalloc_PageHeap::GrowHeap):
(WTF::TCMalloc_PageHeap::Check):
(WTF::TCMalloc_PageHeap::CheckList):
(WTF::TCMalloc_PageHeap::ReleaseFreeList):
(WTF::TCMalloc_PageHeap::ReleaseFreePages):
(TCMalloc_ThreadCache_FreeList):
(WTF::TCMalloc_ThreadCache_FreeList::Init):
(WTF::TCMalloc_ThreadCache_FreeList::length):
(WTF::TCMalloc_ThreadCache_FreeList::empty):
(WTF::TCMalloc_ThreadCache_FreeList::lowwatermark):
(WTF::TCMalloc_ThreadCache_FreeList::clear_lowwatermark):
(WTF::TCMalloc_ThreadCache_FreeList::Push):
(WTF::TCMalloc_ThreadCache_FreeList::PushRange):
(WTF::TCMalloc_ThreadCache_FreeList::PopRange):
(WTF::TCMalloc_ThreadCache_FreeList::Pop):
(WTF::TCMalloc_ThreadCache_FreeList::enumerateFreeObjects):
(TCMalloc_ThreadCache):
(WTF::TCMalloc_ThreadCache::freelist_length):
(WTF::TCMalloc_ThreadCache::Size):
(WTF::TCMalloc_ThreadCache::enumerateFreeObjects):
(TCMalloc_Central_FreeList):
(WTF::TCMalloc_Central_FreeList::length):
(WTF::TCMalloc_Central_FreeList::tc_length):
(WTF::TCMalloc_Central_FreeList::enumerateFreeObjects):
(TCMalloc_Central_FreeListPadded):
(WTF::getPageHeap):
(WTF::TCMalloc_PageHeap::periodicScavenge):
(WTF::TCMalloc_PageHeap::scavengerThread):
(WTF::setThreadHeap):
(WTF::TCMalloc_Central_FreeList::Init):
(WTF::TCMalloc_Central_FreeList::ReleaseListToSpans):
(WTF::TCMalloc_Central_FreeList::ReleaseToSpans):
(WTF::TCMalloc_Central_FreeList::EvictRandomSizeClass):
(WTF::TCMalloc_Central_FreeList::MakeCacheSpace):
(WTF::TCMalloc_Central_FreeList::ShrinkCache):
(WTF::TCMalloc_Central_FreeList::InsertRange):
(WTF::TCMalloc_Central_FreeList::RemoveRange):
(WTF::TCMalloc_Central_FreeList::FetchFromSpansSafe):
(WTF::TCMalloc_Central_FreeList::FetchFromSpans):
(WTF::TCMalloc_Central_FreeList::Populate):
(WTF::TCMalloc_ThreadCache::SampleAllocation):
(WTF::TCMalloc_ThreadCache::Init):
(WTF::TCMalloc_ThreadCache::Cleanup):
(WTF::TCMalloc_ThreadCache::Allocate):
(WTF::TCMalloc_ThreadCache::Deallocate):
(WTF::TCMalloc_ThreadCache::FetchFromCentralCache):
(WTF::TCMalloc_ThreadCache::ReleaseToCentralCache):
(WTF::TCMalloc_ThreadCache::Scavenge):
(WTF::TCMalloc_ThreadCache::PickNextSample):
(WTF::TCMalloc_ThreadCache::InitModule):
(WTF::TCMalloc_ThreadCache::NewHeap):
(WTF::TCMalloc_ThreadCache::GetThreadHeap):
(WTF::TCMalloc_ThreadCache::GetCache):
(WTF::TCMalloc_ThreadCache::GetCacheIfPresent):
(WTF::TCMalloc_ThreadCache::InitTSD):
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
* wtf/FastMalloc.h: Renamed from Source/JavaScriptCore/wtf/FastMalloc.h.
(WTF):
(WTF::TryMallocReturnValue::TryMallocReturnValue):
(WTF::TryMallocReturnValue::~TryMallocReturnValue):
(TryMallocReturnValue):
(WTF::TryMallocReturnValue::operator PossiblyNull<T>):
(WTF::TryMallocReturnValue::getValue):
(FastMallocStatistics):
(ValidationHeader):
(Internal):
(WTF::Internal::fastMallocValidationHeader):
(WTF::Internal::fastMallocValidationSuffix):
(WTF::Internal::fastMallocMatchValidationType):
(WTF::Internal::setFastMallocMatchValidationType):
(WTF::fastMallocMatchValidateMalloc):
(WTF::fastMallocMatchValidateFree):
(WTF::fastMallocValidate):
(throw):
* wtf/FixedArray.h: Renamed from Source/JavaScriptCore/wtf/FixedArray.h.
(WTF):
(FixedArray):
(WTF::FixedArray::operator[]):
(WTF::FixedArray::data):
(WTF::FixedArray::size):
* wtf/Float32Array.h: Renamed from Source/JavaScriptCore/wtf/Float32Array.h.
(WTF):
(Float32Array):
(WTF::Float32Array::set):
(WTF::Float32Array::item):
(WTF::Float32Array::isFloatArray):
(WTF::Float32Array::create):
(WTF::Float32Array::Float32Array):
(WTF::Float32Array::subarray):
* wtf/Float64Array.h: Renamed from Source/JavaScriptCore/wtf/Float64Array.h.
(WTF):
(Float64Array):
(WTF::Float64Array::set):
(WTF::Float64Array::item):
(WTF::Float64Array::isDoubleArray):
(WTF::Float64Array::create):
(WTF::Float64Array::Float64Array):
(WTF::Float64Array::subarray):
* wtf/Forward.h: Renamed from Source/JavaScriptCore/wtf/Forward.h.
(WTF):
* wtf/Functional.h: Renamed from Source/JavaScriptCore/wtf/Functional.h.
(WTF):
(HasRefAndDeref):
(NoType):
(BaseMixin):
(WTF::R):
(WTF::C::):
(WTF::RefAndDeref::ref):
(WTF::RefAndDeref::deref):
(ParamStorageTraits):
(WTF::ParamStorageTraits::wrap):
(WTF::ParamStorageTraits::unwrap):
(FunctionImplBase):
(WTF::FunctionImplBase::~FunctionImplBase):
(FunctionBase):
(WTF::FunctionBase::isNull):
(WTF::FunctionBase::FunctionBase):
(WTF::FunctionBase::impl):
(WTF::bind):
* wtf/GetPtr.h: Renamed from Source/JavaScriptCore/wtf/GetPtr.h.
(WTF):
(WTF::getPtr):
* wtf/HashCountedSet.h: Renamed from Source/JavaScriptCore/wtf/HashCountedSet.h.
(WTF):
(HashCountedSet):
(WTF::HashCountedSet::HashCountedSet):
(WTF::::size):
(WTF::::capacity):
(WTF::::isEmpty):
(WTF::::begin):
(WTF::::end):
(WTF::::find):
(WTF::::contains):
(WTF::::count):
(WTF::::add):
(WTF::::remove):
(WTF::::removeAll):
(WTF::::clear):
(WTF::copyToVector):
* wtf/HashFunctions.h: Renamed from Source/JavaScriptCore/wtf/HashFunctions.h.
(WTF):
(WTF::intHash):
(WTF::IntHash::hash):
(WTF::IntHash::equal):
(IntHash):
(WTF::FloatHash::hash):
(WTF::FloatHash::equal):
(FloatHash):
(WTF::PtrHash::hash):
(WTF::PtrHash::equal):
(PtrHash):
(WTF::PairHash::hash):
(WTF::PairHash::equal):
(PairHash):
* wtf/HashIterators.h: Renamed from Source/JavaScriptCore/wtf/HashIterators.h.
(WTF):
(HashTableConstKeysIterator):
(WTF::HashTableConstKeysIterator::HashTableConstKeysIterator):
(WTF::HashTableConstKeysIterator::get):
(WTF::HashTableConstKeysIterator::operator*):
(WTF::HashTableConstKeysIterator::operator->):
(WTF::HashTableConstKeysIterator::operator++):
(HashTableConstValuesIterator):
(WTF::HashTableConstValuesIterator::HashTableConstValuesIterator):
(WTF::HashTableConstValuesIterator::get):
(WTF::HashTableConstValuesIterator::operator*):
(WTF::HashTableConstValuesIterator::operator->):
(WTF::HashTableConstValuesIterator::operator++):
(HashTableKeysIterator):
(WTF::HashTableKeysIterator::HashTableKeysIterator):
(WTF::HashTableKeysIterator::get):
(WTF::HashTableKeysIterator::operator*):
(WTF::HashTableKeysIterator::operator->):
(WTF::HashTableKeysIterator::operator++):
(WTF::HashTableKeysIterator::operator HashTableConstKeysIterator<HashTableType, KeyType, MappedType>):
(HashTableValuesIterator):
(WTF::HashTableValuesIterator::HashTableValuesIterator):
(WTF::HashTableValuesIterator::get):
(WTF::HashTableValuesIterator::operator*):
(WTF::HashTableValuesIterator::operator->):
(WTF::HashTableValuesIterator::operator++):
(WTF::HashTableValuesIterator::operator HashTableConstValuesIterator<HashTableType, KeyType, MappedType>):
(WTF::operator==):
(WTF::operator!=):
* wtf/HashMap.h: Renamed from Source/JavaScriptCore/wtf/HashMap.h.
(WTF):
(ReferenceTypeMaker):
(HashMap):
(WTF::HashMap::keys):
(WTF::HashMap::values):
(HashMapKeysProxy):
(WTF::HashMap::HashMapKeysProxy::begin):
(WTF::HashMap::HashMapKeysProxy::end):
(HashMapValuesProxy):
(WTF::HashMap::HashMapValuesProxy::begin):
(WTF::HashMap::HashMapValuesProxy::end):
(WTF::PairFirstExtractor::extract):
(WTF::HashMapTranslator::hash):
(WTF::HashMapTranslator::equal):
(WTF::HashMapTranslator::translate):
(WTF::HashMapTranslatorAdapter::hash):
(WTF::HashMapTranslatorAdapter::equal):
(WTF::HashMapTranslatorAdapter::translate):
(WTF::::swap):
(WTF::::size):
(WTF::::capacity):
(WTF::::isEmpty):
(WTF::::begin):
(WTF::::end):
(WTF::::find):
(WTF::::contains):
(WTF::::inlineAdd):
(WTF::::set):
(WTF::::add):
(WTF::::get):
(WTF::::remove):
(WTF::::clear):
(WTF::::take):
(WTF::::checkConsistency):
(WTF::operator==):
(WTF::operator!=):
(WTF::deleteAllPairSeconds):
(WTF::deleteAllValues):
(WTF::deleteAllPairFirsts):
(WTF::deleteAllKeys):
(WTF::copyKeysToVector):
(WTF::copyValuesToVector):
* wtf/HashSet.h: Renamed from Source/JavaScriptCore/wtf/HashSet.h.
(WTF):
(HashSet):
(WTF::IdentityExtractor::extract):
(WTF::HashSetTranslatorAdapter::hash):
(WTF::HashSetTranslatorAdapter::equal):
(WTF::HashSetTranslatorAdapter::translate):
(WTF::::swap):
(WTF::::size):
(WTF::::capacity):
(WTF::::isEmpty):
(WTF::::begin):
(WTF::::end):
(WTF::::find):
(WTF::::contains):
(WTF::::add):
(WTF::::remove):
(WTF::::clear):
(WTF::deleteAllValues):
(WTF::fastDeleteAllValues):
(WTF::copyToVector):
* wtf/HashTable.cpp: Renamed from Source/JavaScriptCore/wtf/HashTable.cpp.
(WTF):
(WTF::hashTableStatsMutex):
(WTF::HashTableStats::~HashTableStats):
(WTF::HashTableStats::recordCollisionAtCount):
* wtf/HashTable.h: Renamed from Source/JavaScriptCore/wtf/HashTable.h.
(WTF):
(HashTableStats):
(WTF::addIterator):
(WTF::removeIterator):
(HashTableConstIterator):
(WTF::HashTableConstIterator::skipEmptyBuckets):
(WTF::HashTableConstIterator::HashTableConstIterator):
(WTF::HashTableConstIterator::~HashTableConstIterator):
(WTF::HashTableConstIterator::operator=):
(WTF::HashTableConstIterator::get):
(WTF::HashTableConstIterator::operator*):
(WTF::HashTableConstIterator::operator->):
(WTF::HashTableConstIterator::operator++):
(WTF::HashTableConstIterator::operator==):
(WTF::HashTableConstIterator::operator!=):
(WTF::HashTableConstIterator::checkValidity):
(HashTableIterator):
(WTF::HashTableIterator::HashTableIterator):
(WTF::HashTableIterator::get):
(WTF::HashTableIterator::operator*):
(WTF::HashTableIterator::operator->):
(WTF::HashTableIterator::operator++):
(WTF::HashTableIterator::operator==):
(WTF::HashTableIterator::operator!=):
(WTF::HashTableIterator::operator const_iterator):
(WTF::hashTableSwap):
(IdentityHashTranslator):
(WTF::IdentityHashTranslator::hash):
(WTF::IdentityHashTranslator::equal):
(WTF::IdentityHashTranslator::translate):
(HashTable):
(WTF::HashTable::~HashTable):
(WTF::HashTable::begin):
(WTF::HashTable::end):
(WTF::HashTable::size):
(WTF::HashTable::capacity):
(WTF::HashTable::isEmpty):
(WTF::HashTable::add):
(WTF::HashTable::find):
(WTF::HashTable::contains):
(WTF::HashTable::isEmptyBucket):
(WTF::HashTable::isDeletedBucket):
(WTF::HashTable::isEmptyOrDeletedBucket):
(WTF::HashTable::lookup):
(WTF::HashTable::checkTableConsistency):
(WTF::HashTable::internalCheckTableConsistency):
(WTF::HashTable::internalCheckTableConsistencyExceptSize):
(WTF::HashTable::lookupForWriting):
(WTF::HashTable::shouldExpand):
(WTF::HashTable::mustRehashInPlace):
(WTF::HashTable::shouldShrink):
(WTF::HashTable::shrink):
(WTF::HashTable::deleteBucket):
(WTF::HashTable::makeLookupResult):
(WTF::HashTable::makeIterator):
(WTF::HashTable::makeConstIterator):
(WTF::HashTable::makeKnownGoodIterator):
(WTF::HashTable::makeKnownGoodConstIterator):
(WTF::HashTable::checkTableConsistencyExceptSize):
(WTF::HashTable::invalidateIterators):
(WTF::::HashTable):
(WTF::doubleHash):
(WTF::::checkKey):
(WTF::::lookup):
(WTF::::lookupForWriting):
(WTF::::fullLookupForWriting):
(WTF::::initializeBucket):
(WTF::::add):
(WTF::::addPassingHashCode):
(WTF::::reinsert):
(WTF::::find):
(WTF::::contains):
(WTF::::removeAndInvalidateWithoutEntryConsistencyCheck):
(WTF::::removeAndInvalidate):
(WTF::::remove):
(WTF::::removeWithoutEntryConsistencyCheck):
(WTF::::allocateTable):
(WTF::::deallocateTable):
(WTF::::expand):
(WTF::::rehash):
(WTF::::clear):
(WTF::::swap):
(WTF::=):
(WTF::::checkTableConsistency):
(WTF::::checkTableConsistencyExceptSize):
(WTF::::invalidateIterators):
(WTF::HashTableConstIteratorAdapter::HashTableConstIteratorAdapter):
(HashTableConstIteratorAdapter):
(WTF::HashTableConstIteratorAdapter::get):
(WTF::HashTableConstIteratorAdapter::operator*):
(WTF::HashTableConstIteratorAdapter::operator->):
(WTF::HashTableConstIteratorAdapter::operator++):
(WTF::HashTableIteratorAdapter::HashTableIteratorAdapter):
(HashTableIteratorAdapter):
(WTF::HashTableIteratorAdapter::get):
(WTF::HashTableIteratorAdapter::operator*):
(WTF::HashTableIteratorAdapter::operator->):
(WTF::HashTableIteratorAdapter::operator++):
(WTF::HashTableIteratorAdapter::operator HashTableConstIteratorAdapter<HashTableType, ValueType>):
(WTF::operator==):
(WTF::operator!=):
* wtf/HashTraits.h: Renamed from Source/JavaScriptCore/wtf/HashTraits.h.
(WTF):
(GenericHashTraits):
(WTF::GenericHashTraits::emptyValue):
(WTF::GenericHashTraits::store):
(WTF::GenericHashTraits::passOut):
(WTF::GenericHashTraits::peek):
(FloatHashTraits):
(WTF::FloatHashTraits::emptyValue):
(WTF::FloatHashTraits::constructDeletedValue):
(WTF::FloatHashTraits::isDeletedValue):
(UnsignedWithZeroKeyHashTraits):
(WTF::UnsignedWithZeroKeyHashTraits::emptyValue):
(WTF::UnsignedWithZeroKeyHashTraits::constructDeletedValue):
(WTF::UnsignedWithZeroKeyHashTraits::isDeletedValue):
(SimpleClassHashTraits):
(WTF::SimpleClassHashTraits::constructDeletedValue):
(WTF::SimpleClassHashTraits::isDeletedValue):
(PairHashTraits):
(WTF::PairHashTraits::emptyValue):
(WTF::PairHashTraits::constructDeletedValue):
(WTF::PairHashTraits::isDeletedValue):
* wtf/HexNumber.h: Renamed from Source/JavaScriptCore/wtf/HexNumber.h.
(WTF):
(Internal):
(WTF::Internal::hexDigitsForMode):
(WTF::appendByteAsHex):
(WTF::placeByteAsHexCompressIfPossible):
(WTF::placeByteAsHex):
(WTF::appendUnsignedAsHex):
(WTF::appendUnsignedAsHexFixedSize):
* wtf/InlineASM.h: Renamed from Source/JavaScriptCore/wtf/InlineASM.h.
* wtf/Int16Array.h: Renamed from Source/JavaScriptCore/wtf/Int16Array.h.
(WTF):
(Int16Array):
(WTF::Int16Array::set):
(WTF::Int16Array::isShortArray):
(WTF::Int16Array::create):
(WTF::Int16Array::Int16Array):
(WTF::Int16Array::subarray):
* wtf/Int32Array.h: Renamed from Source/JavaScriptCore/wtf/Int32Array.h.
(WTF):
(Int32Array):
(WTF::Int32Array::set):
(WTF::Int32Array::isIntArray):
(WTF::Int32Array::create):
(WTF::Int32Array::Int32Array):
(WTF::Int32Array::subarray):
* wtf/Int8Array.h: Renamed from Source/JavaScriptCore/wtf/Int8Array.h.
(WTF):
(Int8Array):
(WTF::Int8Array::set):
(WTF::Int8Array::isByteArray):
(WTF::Int8Array::create):
(WTF::Int8Array::Int8Array):
(WTF::Int8Array::subarray):
* wtf/IntegralTypedArrayBase.h: Renamed from Source/JavaScriptCore/wtf/IntegralTypedArrayBase.h.
(WTF):
(IntegralTypedArrayBase):
(WTF::IntegralTypedArrayBase::set):
(WTF::IntegralTypedArrayBase::item):
(WTF::IntegralTypedArrayBase::IntegralTypedArrayBase):
* wtf/ListHashSet.h: Renamed from Source/JavaScriptCore/wtf/ListHashSet.h.
(WTF):
(ListHashSet):
(ListHashSetNodeAllocator):
(WTF::ListHashSetNodeAllocator::ListHashSetNodeAllocator):
(WTF::ListHashSetNodeAllocator::allocate):
(WTF::ListHashSetNodeAllocator::deallocate):
(WTF::ListHashSetNodeAllocator::pool):
(WTF::ListHashSetNodeAllocator::pastPool):
(WTF::ListHashSetNodeAllocator::inPool):
(ListHashSetNode):
(WTF::ListHashSetNode::ListHashSetNode):
(WTF::ListHashSetNode::operator new):
(WTF::ListHashSetNode::destroy):
(WTF::ListHashSetNodeHashFunctions::hash):
(WTF::ListHashSetNodeHashFunctions::equal):
(ListHashSetNodeHashFunctions):
(ListHashSetIterator):
(WTF::ListHashSetIterator::ListHashSetIterator):
(WTF::ListHashSetIterator::get):
(WTF::ListHashSetIterator::operator*):
(WTF::ListHashSetIterator::operator->):
(WTF::ListHashSetIterator::operator++):
(WTF::ListHashSetIterator::operator--):
(WTF::ListHashSetIterator::operator==):
(WTF::ListHashSetIterator::operator!=):
(WTF::ListHashSetIterator::operator const_iterator):
(WTF::ListHashSetIterator::node):
(ListHashSetConstIterator):
(WTF::ListHashSetConstIterator::ListHashSetConstIterator):
(WTF::ListHashSetConstIterator::get):
(WTF::ListHashSetConstIterator::operator*):
(WTF::ListHashSetConstIterator::operator->):
(WTF::ListHashSetConstIterator::operator++):
(WTF::ListHashSetConstIterator::operator--):
(WTF::ListHashSetConstIterator::operator==):
(WTF::ListHashSetConstIterator::operator!=):
(WTF::ListHashSetConstIterator::node):
(ListHashSetReverseIterator):
(WTF::ListHashSetReverseIterator::ListHashSetReverseIterator):
(WTF::ListHashSetReverseIterator::get):
(WTF::ListHashSetReverseIterator::operator*):
(WTF::ListHashSetReverseIterator::operator->):
(WTF::ListHashSetReverseIterator::operator++):
(WTF::ListHashSetReverseIterator::operator--):
(WTF::ListHashSetReverseIterator::operator==):
(WTF::ListHashSetReverseIterator::operator!=):
(WTF::ListHashSetReverseIterator::operator const_reverse_iterator):
(WTF::ListHashSetReverseIterator::node):
(ListHashSetConstReverseIterator):
(WTF::ListHashSetConstReverseIterator::ListHashSetConstReverseIterator):
(WTF::ListHashSetConstReverseIterator::get):
(WTF::ListHashSetConstReverseIterator::operator*):
(WTF::ListHashSetConstReverseIterator::operator->):
(WTF::ListHashSetConstReverseIterator::operator++):
(WTF::ListHashSetConstReverseIterator::operator--):
(WTF::ListHashSetConstReverseIterator::operator==):
(WTF::ListHashSetConstReverseIterator::operator!=):
(WTF::ListHashSetConstReverseIterator::node):
(WTF::ListHashSetTranslator::hash):
(WTF::ListHashSetTranslator::equal):
(WTF::ListHashSetTranslator::translate):
(WTF::::ListHashSet):
(WTF::=):
(WTF::::swap):
(WTF::::~ListHashSet):
(WTF::::size):
(WTF::::capacity):
(WTF::::isEmpty):
(WTF::::begin):
(WTF::::end):
(WTF::::rbegin):
(WTF::::rend):
(WTF::::first):
(WTF::::last):
(WTF::::removeLast):
(WTF::::find):
(WTF::ListHashSetTranslatorAdapter::hash):
(WTF::ListHashSetTranslatorAdapter::equal):
(WTF::::contains):
(WTF::::add):
(WTF::::insertBefore):
(WTF::::remove):
(WTF::::clear):
(WTF::::unlinkAndDelete):
(WTF::::appendNode):
(WTF::::insertNodeBefore):
(WTF::::deleteAllNodes):
(WTF::::makeReverseIterator):
(WTF::::makeConstReverseIterator):
(WTF::::makeIterator):
(WTF::::makeConstIterator):
(WTF::deleteAllValues):
* wtf/ListRefPtr.h: Renamed from Source/JavaScriptCore/wtf/ListRefPtr.h.
(WTF):
(ListRefPtr):
(WTF::ListRefPtr::ListRefPtr):
(WTF::ListRefPtr::~ListRefPtr):
(WTF::ListRefPtr::operator=):
(WTF::getPtr):
* wtf/Locker.h: Renamed from Source/JavaScriptCore/wtf/Locker.h.
(WTF):
(Locker):
(WTF::Locker::Locker):
(WTF::Locker::~Locker):
* wtf/MD5.cpp: Renamed from Source/JavaScriptCore/wtf/MD5.cpp.
(WTF):
(WTF::testMD5):
(WTF::expectMD5):
(WTF::reverseBytes):
(WTF::MD5Transform):
(WTF::MD5::MD5):
(WTF::MD5::addBytes):
(WTF::MD5::checksum):
* wtf/MD5.h: Renamed from Source/JavaScriptCore/wtf/MD5.h.
(WTF):
(MD5):
(WTF::MD5::addBytes):
* wtf/MainThread.cpp: Renamed from Source/JavaScriptCore/wtf/MainThread.cpp.
(WTF):
(FunctionWithContext):
(WTF::FunctionWithContext::FunctionWithContext):
(WTF::FunctionWithContext::operator == ):
(FunctionWithContextFinder):
(WTF::FunctionWithContextFinder::FunctionWithContextFinder):
(WTF::FunctionWithContextFinder::operator()):
(WTF::mainThreadFunctionQueueMutex):
(WTF::functionQueue):
(WTF::initializeMainThread):
(WTF::initializeMainThreadOnce):
(WTF::initializeMainThreadToProcessMainThreadOnce):
(WTF::initializeMainThreadToProcessMainThread):
(WTF::dispatchFunctionsFromMainThread):
(WTF::callOnMainThread):
(WTF::callOnMainThreadAndWait):
(WTF::cancelCallOnMainThread):
(WTF::callFunctionObject):
(WTF::setMainThreadCallbacksPaused):
(WTF::isMainThread):
(WTF::initializeGCThreads):
(WTF::registerGCThread):
(WTF::isMainThreadOrGCThread):
* wtf/MainThread.h: Renamed from Source/JavaScriptCore/wtf/MainThread.h.
(WTF):
(WTF::isMainThreadOrGCThread):
* wtf/MallocZoneSupport.h: Renamed from Source/JavaScriptCore/wtf/MallocZoneSupport.h.
(WTF):
(RemoteMemoryReader):
(WTF::RemoteMemoryReader::RemoteMemoryReader):
(WTF::RemoteMemoryReader::operator()):
(WTF::RemoteMemoryReader::nextEntryInLinkedList):
* wtf/MathExtras.h: Renamed from Source/JavaScriptCore/wtf/MathExtras.h.
(wtf_ceil):
(isfinite):
(isinf):
(signbit):
(round):
(roundf):
(llround):
(llroundf):
(lround):
(lroundf):
(trunc):
(abs):
(isnan):
(nextafter):
(nextafterf):
(copysign):
(log2):
(log2f):
(wtf_atan2):
(wtf_fmod):
(wtf_pow):
(deg2rad):
(rad2deg):
(deg2grad):
(grad2deg):
(turn2deg):
(deg2turn):
(rad2grad):
(grad2rad):
(defaultMinimumForClamp):
(defaultMaximumForClamp):
(clampTo):
(clampToInteger):
(clampToFloat):
(clampToPositiveInteger):
(isWithinIntRange):
(decomposeDouble):
(doubleToInteger):
* wtf/MessageQueue.h: Renamed from Source/JavaScriptCore/wtf/MessageQueue.h.
(WTF):
(MessageQueue):
(WTF::MessageQueue::MessageQueue):
(WTF::MessageQueue::infiniteTime):
(WTF::MessageQueue::alwaysTruePredicate):
(WTF::::~MessageQueue):
(WTF::::append):
(WTF::::appendAndCheckEmpty):
(WTF::::prepend):
(WTF::::waitForMessage):
(WTF::::waitForMessageFilteredWithTimeout):
(WTF::::tryGetMessage):
(WTF::::tryGetMessageIgnoringKilled):
(WTF::::removeIf):
(WTF::::isEmpty):
(WTF::::kill):
(WTF::::killed):
* wtf/MetaAllocator.cpp: Renamed from Source/JavaScriptCore/wtf/MetaAllocator.cpp.
(WTF):
(WTF::MetaAllocator::~MetaAllocator):
(WTF::MetaAllocatorTracker::notify):
(WTF::MetaAllocatorTracker::release):
(WTF::MetaAllocator::release):
(WTF::MetaAllocatorHandle::MetaAllocatorHandle):
(WTF::MetaAllocatorHandle::~MetaAllocatorHandle):
(WTF::MetaAllocatorHandle::shrink):
(WTF::MetaAllocator::MetaAllocator):
(WTF::MetaAllocator::allocate):
(WTF::MetaAllocator::currentStatistics):
(WTF::MetaAllocator::findAndRemoveFreeSpace):
(WTF::MetaAllocator::addFreeSpaceFromReleasedHandle):
(WTF::MetaAllocator::addFreshFreeSpace):
(WTF::MetaAllocator::debugFreeSpaceSize):
(WTF::MetaAllocator::addFreeSpace):
(WTF::MetaAllocator::incrementPageOccupancy):
(WTF::MetaAllocator::decrementPageOccupancy):
(WTF::MetaAllocator::roundUp):
(WTF::MetaAllocator::allocFreeSpaceNode):
(WTF::MetaAllocator::freeFreeSpaceNode):
(WTF::MetaAllocator::dumpProfile):
* wtf/MetaAllocator.h: Renamed from Source/JavaScriptCore/wtf/MetaAllocator.h.
(WTF):
(MetaAllocatorTracker):
(WTF::MetaAllocatorTracker::find):
(MetaAllocator):
(WTF::MetaAllocator::trackAllocations):
(WTF::MetaAllocator::bytesAllocated):
(WTF::MetaAllocator::bytesReserved):
(WTF::MetaAllocator::bytesCommitted):
(Statistics):
(WTF::MetaAllocator::dumpProfile):
(FreeSpaceNode):
(WTF::MetaAllocator::FreeSpaceNode::FreeSpaceNode):
(WTF::MetaAllocator::FreeSpaceNode::key):
* wtf/MetaAllocatorHandle.h: Renamed from Source/JavaScriptCore/wtf/MetaAllocatorHandle.h.
(WTF):
(MetaAllocatorHandle):
(WTF::MetaAllocatorHandle::start):
(WTF::MetaAllocatorHandle::end):
(WTF::MetaAllocatorHandle::sizeInBytes):
(WTF::MetaAllocatorHandle::isManaged):
(WTF::MetaAllocatorHandle::allocator):
(WTF::MetaAllocatorHandle::ownerUID):
(WTF::MetaAllocatorHandle::key):
* wtf/NonCopyingSort.h: Renamed from Source/JavaScriptCore/wtf/NonCopyingSort.h.
(WTF):
(WTF::siftDown):
(WTF::heapify):
(WTF::heapSort):
(WTF::nonCopyingSort):
* wtf/Noncopyable.h: Renamed from Source/JavaScriptCore/wtf/Noncopyable.h.
* wtf/NotFound.h: Renamed from Source/JavaScriptCore/wtf/NotFound.h.
(WTF):
* wtf/NullPtr.cpp: Renamed from Source/JavaScriptCore/wtf/NullPtr.cpp.
* wtf/NullPtr.h: Renamed from Source/JavaScriptCore/wtf/NullPtr.h.
* wtf/NumberOfCores.cpp: Renamed from Source/JavaScriptCore/wtf/NumberOfCores.cpp.
(WTF):
(WTF::numberOfProcessorCores):
* wtf/NumberOfCores.h: Renamed from Source/JavaScriptCore/wtf/NumberOfCores.h.
(WTF):
* wtf/OSAllocator.h: Renamed from Source/JavaScriptCore/wtf/OSAllocator.h.
(WTF):
(OSAllocator):
(WTF::OSAllocator::reserveAndCommit):
(WTF::OSAllocator::decommitAndRelease):
(WTF::OSAllocator::reallocateCommitted):
* wtf/OSAllocatorPosix.cpp: Renamed from Source/JavaScriptCore/wtf/OSAllocatorPosix.cpp.
(WTF):
(WTF::OSAllocator::reserveUncommitted):
(WTF::OSAllocator::reserveAndCommit):
(WTF::OSAllocator::commit):
(WTF::OSAllocator::decommit):
(WTF::OSAllocator::releaseDecommitted):
* wtf/OSAllocatorWin.cpp: Renamed from Source/JavaScriptCore/wtf/OSAllocatorWin.cpp.
(WTF):
(WTF::protection):
(WTF::OSAllocator::reserveUncommitted):
(WTF::OSAllocator::reserveAndCommit):
(WTF::OSAllocator::commit):
(WTF::OSAllocator::decommit):
(WTF::OSAllocator::releaseDecommitted):
* wtf/OSRandomSource.cpp: Renamed from Source/JavaScriptCore/wtf/OSRandomSource.cpp.
(WTF):
(WTF::cryptographicallyRandomValuesFromOS):
* wtf/OSRandomSource.h: Renamed from Source/JavaScriptCore/wtf/OSRandomSource.h.
(WTF):
* wtf/OwnArrayPtr.h: Renamed from Source/JavaScriptCore/wtf/OwnArrayPtr.h.
(WTF):
(OwnArrayPtr):
(WTF::OwnArrayPtr::OwnArrayPtr):
(WTF::OwnArrayPtr::~OwnArrayPtr):
(WTF::OwnArrayPtr::get):
(WTF::OwnArrayPtr::operator*):
(WTF::OwnArrayPtr::operator->):
(WTF::OwnArrayPtr::operator[]):
(WTF::OwnArrayPtr::operator!):
(WTF::OwnArrayPtr::operator UnspecifiedBoolType):
(WTF::OwnArrayPtr::operator=):
(WTF::OwnArrayPtr::swap):
(WTF::::OwnArrayPtr):
(WTF::::clear):
(WTF::::release):
(WTF::::leakPtr):
(WTF::=):
(WTF::swap):
(WTF::operator==):
(WTF::operator!=):
(WTF::getPtr):
* wtf/OwnPtr.h: Renamed from Source/JavaScriptCore/wtf/OwnPtr.h.
(WTF):
(OwnPtr):
(WTF::OwnPtr::OwnPtr):
(WTF::OwnPtr::~OwnPtr):
(WTF::OwnPtr::get):
(WTF::OwnPtr::operator*):
(WTF::OwnPtr::operator->):
(WTF::OwnPtr::operator!):
(WTF::OwnPtr::operator UnspecifiedBoolType):
(WTF::OwnPtr::operator=):
(WTF::OwnPtr::swap):
(WTF::OwnPtr::operator==):
(WTF::OwnPtr::operator!=):
(WTF::::OwnPtr):
(WTF::::clear):
(WTF::::release):
(WTF::::leakPtr):
(WTF::=):
(WTF::swap):
(WTF::operator==):
(WTF::operator!=):
(WTF::getPtr):
* wtf/OwnPtrCommon.h: Renamed from Source/JavaScriptCore/wtf/OwnPtrCommon.h.
(WTF):
(WTF::deleteOwnedPtr):
* wtf/PackedIntVector.h: Renamed from Source/JavaScriptCore/wtf/PackedIntVector.h.
(WTF):
(PackedIntVector):
(WTF::PackedIntVector::PackedIntVector):
(WTF::PackedIntVector::operator=):
(WTF::PackedIntVector::size):
(WTF::PackedIntVector::ensureSize):
(WTF::PackedIntVector::resize):
(WTF::PackedIntVector::clearAll):
(WTF::PackedIntVector::get):
(WTF::PackedIntVector::set):
(WTF::PackedIntVector::mask):
* wtf/PageAllocation.h: Renamed from Source/JavaScriptCore/wtf/PageAllocation.h.
(WTF):
(PageAllocation):
(WTF::PageAllocation::PageAllocation):
(WTF::PageAllocation::operator bool):
(WTF::PageAllocation::allocate):
(WTF::PageAllocation::deallocate):
* wtf/PageAllocationAligned.cpp: Renamed from Source/JavaScriptCore/wtf/PageAllocationAligned.cpp.
(WTF):
(WTF::PageAllocationAligned::allocate):
(WTF::PageAllocationAligned::deallocate):
* wtf/PageAllocationAligned.h: Renamed from Source/JavaScriptCore/wtf/PageAllocationAligned.h.
(WTF):
(PageAllocationAligned):
(WTF::PageAllocationAligned::PageAllocationAligned):
* wtf/PageBlock.cpp: Renamed from Source/JavaScriptCore/wtf/PageBlock.cpp.
(WTF):
(WTF::systemPageSize):
(WTF::pageSize):
(WTF::pageMask):
* wtf/PageBlock.h: Renamed from Source/JavaScriptCore/wtf/PageBlock.h.
(WTF):
(WTF::isPageAligned):
(WTF::isPowerOfTwo):
(PageBlock):
(WTF::PageBlock::base):
(WTF::PageBlock::size):
(WTF::PageBlock::operator bool):
(WTF::PageBlock::contains):
(WTF::PageBlock::PageBlock):
* wtf/PageReservation.h: Renamed from Source/JavaScriptCore/wtf/PageReservation.h.
(WTF):
(PageReservation):
(WTF::PageReservation::PageReservation):
(WTF::PageReservation::operator bool):
(WTF::PageReservation::commit):
(WTF::PageReservation::decommit):
(WTF::PageReservation::committed):
(WTF::PageReservation::reserve):
(WTF::PageReservation::reserveWithGuardPages):
(WTF::PageReservation::deallocate):
* wtf/ParallelJobs.h: Renamed from Source/JavaScriptCore/wtf/ParallelJobs.h.
(WTF):
(ParallelJobs):
(WTF::ParallelJobs::ParallelJobs):
(WTF::ParallelJobs::numberOfJobs):
(WTF::ParallelJobs::parameter):
(WTF::ParallelJobs::execute):
* wtf/ParallelJobsGeneric.cpp: Renamed from Source/JavaScriptCore/wtf/ParallelJobsGeneric.cpp.
(WTF):
(WTF::ParallelEnvironment::ParallelEnvironment):
(WTF::ParallelEnvironment::execute):
(WTF::ParallelEnvironment::ThreadPrivate::tryLockFor):
(WTF::ParallelEnvironment::ThreadPrivate::execute):
(WTF::ParallelEnvironment::ThreadPrivate::waitForFinish):
(WTF::ParallelEnvironment::ThreadPrivate::workerThread):
* wtf/ParallelJobsGeneric.h: Renamed from Source/JavaScriptCore/wtf/ParallelJobsGeneric.h.
(WTF):
(ParallelEnvironment):
(WTF::ParallelEnvironment::numberOfJobs):
(ThreadPrivate):
(WTF::ParallelEnvironment::ThreadPrivate::ThreadPrivate):
(WTF::ParallelEnvironment::ThreadPrivate::create):
* wtf/ParallelJobsLibdispatch.h: Renamed from Source/JavaScriptCore/wtf/ParallelJobsLibdispatch.h.
(WTF):
(ParallelEnvironment):
(WTF::ParallelEnvironment::ParallelEnvironment):
(WTF::ParallelEnvironment::numberOfJobs):
(WTF::ParallelEnvironment::execute):
* wtf/ParallelJobsOpenMP.h: Renamed from Source/JavaScriptCore/wtf/ParallelJobsOpenMP.h.
(WTF):
(ParallelEnvironment):
(WTF::ParallelEnvironment::ParallelEnvironment):
(WTF::ParallelEnvironment::numberOfJobs):
(WTF::ParallelEnvironment::execute):
* wtf/PassOwnArrayPtr.h: Renamed from Source/JavaScriptCore/wtf/PassOwnArrayPtr.h.
(WTF):
(PassOwnArrayPtr):
(WTF::PassOwnArrayPtr::PassOwnArrayPtr):
(WTF::PassOwnArrayPtr::~PassOwnArrayPtr):
(WTF::PassOwnArrayPtr::get):
(WTF::PassOwnArrayPtr::operator*):
(WTF::PassOwnArrayPtr::operator->):
(WTF::PassOwnArrayPtr::operator!):
(WTF::PassOwnArrayPtr::operator UnspecifiedBoolType):
(WTF::PassOwnArrayPtr::operator=):
(WTF::::leakPtr):
(WTF::operator==):
(WTF::operator!=):
(WTF::adoptArrayPtr):
(WTF::deleteOwnedArrayPtr):
(WTF::static_pointer_cast):
(WTF::const_pointer_cast):
(WTF::getPtr):
* wtf/PassOwnPtr.h: Renamed from Source/JavaScriptCore/wtf/PassOwnPtr.h.
(WTF):
(PassOwnPtr):
(WTF::PassOwnPtr::PassOwnPtr):
(WTF::PassOwnPtr::~PassOwnPtr):
(WTF::PassOwnPtr::get):
(WTF::PassOwnPtr::operator*):
(WTF::PassOwnPtr::operator->):
(WTF::PassOwnPtr::operator!):
(WTF::PassOwnPtr::operator UnspecifiedBoolType):
(WTF::PassOwnPtr::operator=):
(WTF::PassOwnPtr::operator==):
(WTF::PassOwnPtr::operator!=):
(WTF::::leakPtr):
(WTF::operator==):
(WTF::operator!=):
(WTF::adoptPtr):
(WTF::static_pointer_cast):
(WTF::const_pointer_cast):
(WTF::getPtr):
* wtf/PassRefPtr.h: Renamed from Source/JavaScriptCore/wtf/PassRefPtr.h.
(WTF):
(WTF::adopted):
(WTF::refIfNotNull):
(WTF::derefIfNotNull):
(PassRefPtr):
(WTF::PassRefPtr::PassRefPtr):
(WTF::PassRefPtr::~PassRefPtr):
(WTF::PassRefPtr::get):
(WTF::PassRefPtr::operator*):
(WTF::PassRefPtr::operator->):
(WTF::PassRefPtr::operator!):
(WTF::PassRefPtr::operator UnspecifiedBoolType):
(WTF::PassRefPtr::operator=):
(NonNullPassRefPtr):
(WTF::NonNullPassRefPtr::NonNullPassRefPtr):
(WTF::NonNullPassRefPtr::~NonNullPassRefPtr):
(WTF::NonNullPassRefPtr::get):
(WTF::NonNullPassRefPtr::operator*):
(WTF::NonNullPassRefPtr::operator->):
(WTF::NonNullPassRefPtr::operator=):
(WTF::::PassRefPtr):
(WTF::::leakRef):
(WTF::operator==):
(WTF::operator!=):
(WTF::adoptRef):
(WTF::static_pointer_cast):
(WTF::const_pointer_cast):
(WTF::getPtr):
* wtf/PassTraits.h: Renamed from Source/JavaScriptCore/wtf/PassTraits.h.
(WTF):
(PassTraits):
(WTF::PassTraits::transfer):
* wtf/PlatformBlackBerry.cmake: Renamed from Source/JavaScriptCore/wtf/PlatformBlackBerry.cmake.
* wtf/PlatformEfl.cmake: Renamed from Source/JavaScriptCore/wtf/PlatformEfl.cmake.
* wtf/PlatformWinCE.cmake: Renamed from Source/JavaScriptCore/wtf/PlatformWinCE.cmake.
* wtf/PossiblyNull.h: Renamed from Source/JavaScriptCore/wtf/PossiblyNull.h.
(WTF):
(WTF::PossiblyNull::PossiblyNull):
(WTF::PossiblyNull::~PossiblyNull):
(PossiblyNull):
(WTF::::getValue):
* wtf/RandomNumber.cpp: Renamed from Source/JavaScriptCore/wtf/RandomNumber.cpp.
(WTF):
(WTF::randomNumber):
* wtf/RandomNumber.h: Renamed from Source/JavaScriptCore/wtf/RandomNumber.h.
(WTF):
* wtf/RandomNumberSeed.h: Renamed from Source/JavaScriptCore/wtf/RandomNumberSeed.h.
(WTF):
(WTF::initializeRandomNumberGenerator):
* wtf/RedBlackTree.h: Renamed from Source/JavaScriptCore/wtf/RedBlackTree.h.
(WTF):
(RedBlackTree):
(Node):
(WTF::RedBlackTree::Node::successor):
(WTF::RedBlackTree::Node::predecessor):
(WTF::RedBlackTree::Node::reset):
(WTF::RedBlackTree::Node::parent):
(WTF::RedBlackTree::Node::setParent):
(WTF::RedBlackTree::Node::left):
(WTF::RedBlackTree::Node::setLeft):
(WTF::RedBlackTree::Node::right):
(WTF::RedBlackTree::Node::setRight):
(WTF::RedBlackTree::Node::color):
(WTF::RedBlackTree::Node::setColor):
(WTF::RedBlackTree::RedBlackTree):
(WTF::RedBlackTree::insert):
(WTF::RedBlackTree::remove):
(WTF::RedBlackTree::findExact):
(WTF::RedBlackTree::findLeastGreaterThanOrEqual):
(WTF::RedBlackTree::findGreatestLessThanOrEqual):
(WTF::RedBlackTree::first):
(WTF::RedBlackTree::last):
(WTF::RedBlackTree::size):
(WTF::RedBlackTree::isEmpty):
(WTF::RedBlackTree::treeMinimum):
(WTF::RedBlackTree::treeMaximum):
(WTF::RedBlackTree::treeInsert):
(WTF::RedBlackTree::leftRotate):
(WTF::RedBlackTree::rightRotate):
(WTF::RedBlackTree::removeFixup):
* wtf/RefCounted.h: Renamed from Source/JavaScriptCore/wtf/RefCounted.h.
(WTF):
(RefCountedBase):
(WTF::RefCountedBase::ref):
(WTF::RefCountedBase::hasOneRef):
(WTF::RefCountedBase::refCount):
(WTF::RefCountedBase::turnOffVerifier):
(WTF::RefCountedBase::relaxAdoptionRequirement):
(WTF::RefCountedBase::addressOfCount):
(WTF::RefCountedBase::RefCountedBase):
(WTF::RefCountedBase::~RefCountedBase):
(WTF::RefCountedBase::derefBase):
(WTF::RefCountedBase::deletionHasBegun):
(WTF::adopted):
(RefCounted):
(WTF::RefCounted::deref):
(WTF::RefCounted::RefCounted):
(WTF::RefCounted::~RefCounted):
(RefCountedCustomAllocated):
(WTF::RefCountedCustomAllocated::deref):
(WTF::RefCountedCustomAllocated::~RefCountedCustomAllocated):
(WTF::RefCountedBase::setMutexForVerifier):
(WTF::RefCountedBase::setDispatchQueueForVerifier):
* wtf/RefCountedArray.h: Renamed from Source/JavaScriptCore/wtf/RefCountedArray.h.
(WTF):
(RefCountedArray):
(WTF::RefCountedArray::RefCountedArray):
(WTF::RefCountedArray::operator=):
(WTF::RefCountedArray::~RefCountedArray):
(WTF::RefCountedArray::size):
(WTF::RefCountedArray::data):
(WTF::RefCountedArray::begin):
(WTF::RefCountedArray::end):
(WTF::RefCountedArray::at):
(WTF::RefCountedArray::operator[]):
(Header):
(WTF::RefCountedArray::Header::size):
(WTF::RefCountedArray::Header::payload):
(WTF::RefCountedArray::Header::fromPayload):
* wtf/RefCountedLeakCounter.cpp: Renamed from Source/JavaScriptCore/wtf/RefCountedLeakCounter.cpp.
(WTF):
(WTF::RefCountedLeakCounter::suppressMessages):
(WTF::RefCountedLeakCounter::cancelMessageSuppression):
(WTF::RefCountedLeakCounter::RefCountedLeakCounter):
(WTF::RefCountedLeakCounter::~RefCountedLeakCounter):
(WTF::RefCountedLeakCounter::increment):
(WTF::RefCountedLeakCounter::decrement):
* wtf/RefCountedLeakCounter.h: Renamed from Source/JavaScriptCore/wtf/RefCountedLeakCounter.h.
(WTF):
(RefCountedLeakCounter):
* wtf/RefPtr.h: Renamed from Source/JavaScriptCore/wtf/RefPtr.h.
(WTF):
(RefPtr):
(WTF::RefPtr::RefPtr):
(WTF::RefPtr::isHashTableDeletedValue):
(WTF::RefPtr::~RefPtr):
(WTF::RefPtr::get):
(WTF::RefPtr::release):
(WTF::RefPtr::operator*):
(WTF::RefPtr::operator->):
(WTF::RefPtr::operator!):
(WTF::RefPtr::operator UnspecifiedBoolType):
(WTF::RefPtr::operator=):
(WTF::RefPtr::hashTableDeletedValue):
(WTF::::RefPtr):
(WTF::::clear):
(WTF::=):
(WTF::::swap):
(WTF::swap):
(WTF::operator==):
(WTF::operator!=):
(WTF::static_pointer_cast):
(WTF::const_pointer_cast):
(WTF::getPtr):
* wtf/RefPtrHashMap.h: Renamed from Source/JavaScriptCore/wtf/RefPtrHashMap.h.
(WTF):
(WTF::::swap):
(WTF::::size):
(WTF::::capacity):
(WTF::::isEmpty):
(WTF::::begin):
(WTF::::end):
(WTF::::find):
(WTF::::contains):
(WTF::::inlineAdd):
(WTF::::set):
(WTF::::add):
(WTF::::get):
(WTF::::inlineGet):
(WTF::::remove):
(WTF::::clear):
(WTF::::take):
* wtf/RetainPtr.h: Renamed from Source/JavaScriptCore/wtf/RetainPtr.h.
(WTF):
(WTF::adoptNSReference):
(RetainPtr):
(WTF::RetainPtr::RetainPtr):
(WTF::RetainPtr::isHashTableDeletedValue):
(WTF::RetainPtr::~RetainPtr):
(WTF::RetainPtr::get):
(WTF::RetainPtr::operator->):
(WTF::RetainPtr::operator!):
(WTF::RetainPtr::operator UnspecifiedBoolType):
(WTF::RetainPtr::operator=):
(WTF::RetainPtr::hashTableDeletedValue):
(WTF::::RetainPtr):
(WTF::::clear):
(WTF::::leakRef):
(WTF::=):
(WTF::::adoptCF):
(WTF::::adoptNS):
(WTF::::swap):
(WTF::swap):
(WTF::operator==):
(WTF::operator!=):
(WTF::adoptCF):
(WTF::adoptNS):
(WTF::retainPtr):
* wtf/SHA1.cpp: Renamed from Source/JavaScriptCore/wtf/SHA1.cpp.
(WTF):
(WTF::testSHA1):
(WTF::expectSHA1):
(WTF::f):
(WTF::k):
(WTF::rotateLeft):
(WTF::SHA1::SHA1):
(WTF::SHA1::addBytes):
(WTF::SHA1::computeHash):
(WTF::SHA1::finalize):
(WTF::SHA1::processBlock):
(WTF::SHA1::reset):
* wtf/SHA1.h: Renamed from Source/JavaScriptCore/wtf/SHA1.h.
(WTF):
(SHA1):
(WTF::SHA1::addBytes):
* wtf/SegmentedVector.h: Renamed from Source/JavaScriptCore/wtf/SegmentedVector.h.
(WTF):
(SegmentedVectorIterator):
(WTF::SegmentedVectorIterator::~SegmentedVectorIterator):
(WTF::SegmentedVectorIterator::operator*):
(WTF::SegmentedVectorIterator::operator->):
(WTF::SegmentedVectorIterator::operator++):
(WTF::SegmentedVectorIterator::operator==):
(WTF::SegmentedVectorIterator::operator!=):
(WTF::SegmentedVectorIterator::operator=):
(WTF::SegmentedVectorIterator::SegmentedVectorIterator):
(SegmentedVector):
(WTF::SegmentedVector::SegmentedVector):
(WTF::SegmentedVector::~SegmentedVector):
(WTF::SegmentedVector::size):
(WTF::SegmentedVector::isEmpty):
(WTF::SegmentedVector::at):
(WTF::SegmentedVector::operator[]):
(WTF::SegmentedVector::last):
(WTF::SegmentedVector::append):
(WTF::SegmentedVector::alloc):
(WTF::SegmentedVector::removeLast):
(WTF::SegmentedVector::grow):
(WTF::SegmentedVector::clear):
(WTF::SegmentedVector::begin):
(WTF::SegmentedVector::end):
(WTF::SegmentedVector::deleteAllSegments):
(WTF::SegmentedVector::segmentExistsFor):
(WTF::SegmentedVector::segmentFor):
(WTF::SegmentedVector::subscriptFor):
(WTF::SegmentedVector::ensureSegmentsFor):
(WTF::SegmentedVector::ensureSegment):
* wtf/SentinelLinkedList.h: Renamed from Source/JavaScriptCore/wtf/SentinelLinkedList.h.
(WTF):
(BasicRawSentinelNode):
(WTF::BasicRawSentinelNode::BasicRawSentinelNode):
(WTF::BasicRawSentinelNode::setPrev):
(WTF::BasicRawSentinelNode::setNext):
(WTF::BasicRawSentinelNode::prev):
(WTF::BasicRawSentinelNode::next):
(WTF::BasicRawSentinelNode::isOnList):
(SentinelLinkedList):
(WTF::SentinelLinkedList::isEmpty):
(WTF::::remove):
(WTF::::SentinelLinkedList):
(WTF::::begin):
(WTF::::end):
(WTF::::push):
* wtf/SimpleStats.h: Renamed from Source/JavaScriptCore/wtf/SimpleStats.h.
(WTF):
(SimpleStats):
(WTF::SimpleStats::SimpleStats):
(WTF::SimpleStats::add):
(WTF::SimpleStats::operator!):
(WTF::SimpleStats::count):
(WTF::SimpleStats::sum):
(WTF::SimpleStats::sumOfSquares):
(WTF::SimpleStats::mean):
(WTF::SimpleStats::variance):
(WTF::SimpleStats::standardDeviation):
* wtf/SinglyLinkedList.h: Renamed from Source/JavaScriptCore/wtf/SinglyLinkedList.h.
(WTF):
(SinglyLinkedList):
(WTF::::SinglyLinkedList):
(WTF::::isEmpty):
(WTF::::push):
(WTF::::pop):
* wtf/SizeLimits.cpp: Renamed from Source/JavaScriptCore/wtf/SizeLimits.cpp.
(WTF):
(SameSizeAsRefCounted):
* wtf/Spectrum.h: Renamed from Source/JavaScriptCore/wtf/Spectrum.h.
(WTF):
(Spectrum):
(WTF::Spectrum::Spectrum):
(WTF::Spectrum::add):
(WTF::Spectrum::get):
(WTF::Spectrum::begin):
(WTF::Spectrum::end):
(WTF::Spectrum::KeyAndCount::KeyAndCount):
(KeyAndCount):
(WTF::Spectrum::KeyAndCount::operator<):
(WTF::Spectrum::buildList):
* wtf/StackBounds.cpp: Renamed from Source/JavaScriptCore/wtf/StackBounds.cpp.
(WTF):
(WTF::estimateStackBound):
(WTF::StackBounds::initialize):
(WTF::detectGrowingDownward):
(WTF::isPageWritable):
(WTF::getLowerStackBound):
(WTF::getUpperStackBound):
* wtf/StackBounds.h: Renamed from Source/JavaScriptCore/wtf/StackBounds.h.
(WTF):
(StackBounds):
(WTF::StackBounds::StackBounds):
(WTF::StackBounds::currentThreadStackBounds):
(WTF::StackBounds::origin):
(WTF::StackBounds::current):
(WTF::StackBounds::recursionLimit):
(WTF::StackBounds::recursionCheck):
(WTF::StackBounds::isGrowingDownward):
(WTF::StackBounds::checkConsistency):
* wtf/StaticConstructors.h: Renamed from Source/JavaScriptCore/wtf/StaticConstructors.h.
* wtf/StdLibExtras.h: Renamed from Source/JavaScriptCore/wtf/StdLibExtras.h.
(isPointerTypeAlignmentOkay):
(reinterpret_cast_ptr):
(WTF):
(WTF::isPointerAligned):
(WTF::is8ByteAligned):
(WTF::bitwise_cast):
(WTF::safeCast):
(WTF::bitCount):
(WTF::roundUpToMultipleOf):
(WTF::binarySearch):
(WTF::binarySearchWithFunctor):
(WTF::genericBinarySearch):
(operator new):
* wtf/StringExtras.cpp: Renamed from Source/JavaScriptCore/wtf/StringExtras.cpp.
(strcasecmp):
(strncasecmp):
* wtf/StringExtras.h: Renamed from Source/JavaScriptCore/wtf/StringExtras.h.
(snprintf):
(wtf_vsnprintf):
(strnicmp):
(stricmp):
(strdup):
(strncasecmp):
(strcasecmp):
(strnstr):
* wtf/StringHasher.h: Renamed from Source/JavaScriptCore/wtf/StringHasher.h.
(WTF):
(StringHasher):
(WTF::StringHasher::StringHasher):
(WTF::StringHasher::addCharacters):
(WTF::StringHasher::addCharacter):
(WTF::StringHasher::hash):
(WTF::StringHasher::computeHash):
(WTF::StringHasher::hashMemory):
(WTF::StringHasher::defaultConverter):
(WTF::StringHasher::addCharactersToHash):
* wtf/TCPackedCache.h: Renamed from Source/JavaScriptCore/wtf/TCPackedCache.h.
(PackedCache):
(PackedCache::PackedCache):
(PackedCache::Put):
(PackedCache::Has):
(PackedCache::GetOrDefault):
(PackedCache::Clear):
(PackedCache::EntryToValue):
(PackedCache::EntryToUpper):
(PackedCache::KeyToUpper):
(PackedCache::UpperToPartialKey):
(PackedCache::Hash):
(PackedCache::KeyMatch):
* wtf/TCPageMap.h: Renamed from Source/JavaScriptCore/wtf/TCPageMap.h.
(TCMalloc_PageMap1):
(TCMalloc_PageMap1::init):
(TCMalloc_PageMap1::Ensure):
(TCMalloc_PageMap1::PreallocateMoreMemory):
(TCMalloc_PageMap1::get):
(TCMalloc_PageMap1::set):
(TCMalloc_PageMap2):
(Leaf):
(TCMalloc_PageMap2::init):
(TCMalloc_PageMap2::get):
(TCMalloc_PageMap2::set):
(TCMalloc_PageMap2::Ensure):
(TCMalloc_PageMap2::PreallocateMoreMemory):
(TCMalloc_PageMap2::visitValues):
(TCMalloc_PageMap2::visitAllocations):
(TCMalloc_PageMap3):
(Node):
(TCMalloc_PageMap3::NewNode):
(TCMalloc_PageMap3::init):
(TCMalloc_PageMap3::get):
(TCMalloc_PageMap3::set):
(TCMalloc_PageMap3::Ensure):
(TCMalloc_PageMap3::PreallocateMoreMemory):
(TCMalloc_PageMap3::visitValues):
(TCMalloc_PageMap3::visitAllocations):
* wtf/TCSpinLock.h: Renamed from Source/JavaScriptCore/wtf/TCSpinLock.h.
(TCMalloc_SpinLock):
(TCMalloc_SpinLock::Lock):
(TCMalloc_SpinLock::Unlock):
(TCMalloc_SpinLock::IsHeld):
(TCMalloc_SpinLock::Init):
(TCMalloc_SpinLock::Finalize):
(TCMalloc_SlowLock):
(TCMalloc_SpinLockHolder):
(TCMalloc_SpinLockHolder::TCMalloc_SpinLockHolder):
(TCMalloc_SpinLockHolder::~TCMalloc_SpinLockHolder):
* wtf/TCSystemAlloc.cpp: Renamed from Source/JavaScriptCore/wtf/TCSystemAlloc.cpp.
(TrySbrk):
(TryMmap):
(TryVirtualAlloc):
(TryDevMem):
(TCMalloc_SystemAlloc):
(TCMalloc_SystemRelease):
(TCMalloc_SystemCommit):
* wtf/TCSystemAlloc.h: Renamed from Source/JavaScriptCore/wtf/TCSystemAlloc.h.
(TCMalloc_SystemRelease):
(TCMalloc_SystemCommit):
* wtf/TemporaryChange.h: Renamed from Source/JavaScriptCore/wtf/TemporaryChange.h.
(WTF):
(TemporaryChange):
(WTF::TemporaryChange::TemporaryChange):
(WTF::TemporaryChange::~TemporaryChange):
* wtf/ThreadFunctionInvocation.h: Renamed from Source/JavaScriptCore/wtf/ThreadFunctionInvocation.h.
(WTF):
(WTF::ThreadFunctionInvocation::ThreadFunctionInvocation):
(ThreadFunctionInvocation):
* wtf/ThreadIdentifierDataPthreads.cpp: Renamed from Source/JavaScriptCore/wtf/ThreadIdentifierDataPthreads.cpp.
(WTF):
(WTF::ThreadIdentifierData::~ThreadIdentifierData):
(WTF::ThreadIdentifierData::initializeOnce):
(WTF::ThreadIdentifierData::identifier):
(WTF::ThreadIdentifierData::initialize):
(WTF::ThreadIdentifierData::destruct):
* wtf/ThreadIdentifierDataPthreads.h: Renamed from Source/JavaScriptCore/wtf/ThreadIdentifierDataPthreads.h.
(WTF):
(ThreadIdentifierData):
(WTF::ThreadIdentifierData::ThreadIdentifierData):
* wtf/ThreadRestrictionVerifier.h: Renamed from Source/JavaScriptCore/wtf/ThreadRestrictionVerifier.h.
(WTF):
(ThreadRestrictionVerifier):
(WTF::ThreadRestrictionVerifier::ThreadRestrictionVerifier):
(WTF::ThreadRestrictionVerifier::~ThreadRestrictionVerifier):
(WTF::ThreadRestrictionVerifier::setMutexMode):
(WTF::ThreadRestrictionVerifier::setDispatchQueueMode):
(WTF::ThreadRestrictionVerifier::turnOffVerification):
(WTF::ThreadRestrictionVerifier::setShared):
(WTF::ThreadRestrictionVerifier::isSafeToUse):
* wtf/ThreadSafeRefCounted.h: Renamed from Source/JavaScriptCore/wtf/ThreadSafeRefCounted.h.
(WTF):
(ThreadSafeRefCountedBase):
(WTF::ThreadSafeRefCountedBase::ThreadSafeRefCountedBase):
(WTF::ThreadSafeRefCountedBase::ref):
(WTF::ThreadSafeRefCountedBase::hasOneRef):
(WTF::ThreadSafeRefCountedBase::refCount):
(WTF::ThreadSafeRefCountedBase::derefBase):
(ThreadSafeRefCounted):
(WTF::ThreadSafeRefCounted::deref):
(WTF::ThreadSafeRefCounted::ThreadSafeRefCounted):
* wtf/ThreadSpecific.h: Renamed from Source/JavaScriptCore/wtf/ThreadSpecific.h.
(WTF):
(ThreadSpecific):
(Data):
(WTF::ThreadSpecific::Data::Data):
(WTF::::ThreadSpecific):
(WTF::::get):
(WTF::::set):
(WTF::::~ThreadSpecific):
(WTF::::destroy):
(WTF::::isSet):
(WTF::T):
(WTF::::operator):
* wtf/ThreadSpecificWin.cpp: Renamed from Source/JavaScriptCore/wtf/ThreadSpecificWin.cpp.
(WTF):
(WTF::tlsKeyCount):
(WTF::tlsKeys):
(WTF::ThreadSpecificThreadExit):
* wtf/Threading.cpp: Renamed from Source/JavaScriptCore/wtf/Threading.cpp.
(WTF):
(NewThreadContext):
(WTF::NewThreadContext::NewThreadContext):
(WTF::threadEntryPoint):
(WTF::createThread):
(WTF::ThreadFunctionWithReturnValueInvocation::ThreadFunctionWithReturnValueInvocation):
(ThreadFunctionWithReturnValueInvocation):
(WTF::compatEntryPoint):
(WTF::waitForThreadCompletion):
* wtf/Threading.h: Renamed from Source/JavaScriptCore/wtf/Threading.h.
(WTF):
* wtf/ThreadingNone.cpp: Renamed from Source/JavaScriptCore/wtf/ThreadingNone.cpp.
* wtf/ThreadingPrimitives.h: Renamed from Source/JavaScriptCore/wtf/ThreadingPrimitives.h.
(WTF):
(PlatformMutex):
(PlatformCondition):
(Mutex):
(WTF::Mutex::impl):
(ReadWriteLock):
(ThreadCondition):
* wtf/ThreadingPthreads.cpp: Renamed from Source/JavaScriptCore/wtf/ThreadingPthreads.cpp.
(WTF):
(WTF::threadMapMutex):
(WTF::initializeThreading):
(WTF::lockAtomicallyInitializedStaticMutex):
(WTF::unlockAtomicallyInitializedStaticMutex):
(WTF::threadMap):
(WTF::identifierByPthreadHandle):
(WTF::establishIdentifierForPthreadHandle):
(WTF::pthreadHandleForIdentifier):
(WTF::clearPthreadHandleForIdentifier):
(WTF::wtfThreadEntryPoint):
(WTF::createThreadInternal):
(WTF::initializeCurrentThreadInternal):
(WTF::waitForThreadCompletion):
(WTF::detachThread):
(WTF::yield):
(WTF::currentThread):
(WTF::Mutex::Mutex):
(WTF::Mutex::~Mutex):
(WTF::Mutex::lock):
(WTF::Mutex::tryLock):
(WTF::Mutex::unlock):
(WTF::ReadWriteLock::ReadWriteLock):
(WTF::ReadWriteLock::~ReadWriteLock):
(WTF::ReadWriteLock::readLock):
(WTF::ReadWriteLock::tryReadLock):
(WTF::ReadWriteLock::writeLock):
(WTF::ReadWriteLock::tryWriteLock):
(WTF::ReadWriteLock::unlock):
(WTF::ThreadCondition::ThreadCondition):
(WTF::ThreadCondition::~ThreadCondition):
(WTF::ThreadCondition::wait):
(WTF::ThreadCondition::timedWait):
(WTF::ThreadCondition::signal):
(WTF::ThreadCondition::broadcast):
* wtf/ThreadingWin.cpp: Renamed from Source/JavaScriptCore/wtf/ThreadingWin.cpp.
(WTF):
(tagTHREADNAME_INFO):
(WTF::initializeCurrentThreadInternal):
(WTF::lockAtomicallyInitializedStaticMutex):
(WTF::unlockAtomicallyInitializedStaticMutex):
(WTF::threadMapMutex):
(WTF::initializeThreading):
(WTF::threadMap):
(WTF::storeThreadHandleByIdentifier):
(WTF::threadHandleForIdentifier):
(WTF::clearThreadHandleForIdentifier):
(WTF::wtfThreadEntryPoint):
(WTF::createThreadInternal):
(WTF::waitForThreadCompletion):
(WTF::detachThread):
(WTF::yield):
(WTF::currentThread):
(WTF::Mutex::Mutex):
(WTF::Mutex::~Mutex):
(WTF::Mutex::lock):
(WTF::Mutex::tryLock):
(WTF::Mutex::unlock):
(WTF::PlatformCondition::timedWait):
(WTF::PlatformCondition::signal):
(WTF::ThreadCondition::ThreadCondition):
(WTF::ThreadCondition::~ThreadCondition):
(WTF::ThreadCondition::wait):
(WTF::ThreadCondition::timedWait):
(WTF::ThreadCondition::signal):
(WTF::ThreadCondition::broadcast):
(WTF::absoluteTimeToWaitTimeoutInterval):
* wtf/TypeTraits.cpp: Renamed from Source/JavaScriptCore/wtf/TypeTraits.cpp.
(WTF):
* wtf/TypeTraits.h: Renamed from Source/JavaScriptCore/wtf/TypeTraits.h.
(WTF):
(IsConvertibleToInteger):
(IsArray):
(IsSameType):
(IsSubclass):
(NoType):
(IsSubclassOfTemplate):
(RemoveTemplate):
(RemoveConst):
(RemoveVolatile):
(RemoveConstVolatile):
(RemovePointer):
(RemoveReference):
(RemoveExtent):
(DecayArray):
(IntegralConstant):
* wtf/TypedArrayBase.h: Renamed from Source/JavaScriptCore/wtf/TypedArrayBase.h.
(WTF):
(TypedArrayBase):
(WTF::TypedArrayBase::data):
(WTF::TypedArrayBase::set):
(WTF::TypedArrayBase::setRange):
(WTF::TypedArrayBase::zeroRange):
(WTF::TypedArrayBase::length):
(WTF::TypedArrayBase::byteLength):
(WTF::TypedArrayBase::TypedArrayBase):
(WTF::TypedArrayBase::create):
(WTF::TypedArrayBase::subarrayImpl):
(WTF::TypedArrayBase::neuter):
* wtf/Uint16Array.h: Renamed from Source/JavaScriptCore/wtf/Uint16Array.h.
(WTF):
(Uint16Array):
(WTF::Uint16Array::set):
(WTF::Uint16Array::isUnsignedShortArray):
(WTF::Uint16Array::create):
(WTF::Uint16Array::Uint16Array):
(WTF::Uint16Array::subarray):
* wtf/Uint32Array.h: Renamed from Source/JavaScriptCore/wtf/Uint32Array.h.
(WTF):
(Uint32Array):
(WTF::Uint32Array::set):
(WTF::Uint32Array::isUnsignedIntArray):
(WTF::Uint32Array::create):
(WTF::Uint32Array::Uint32Array):
(WTF::Uint32Array::subarray):
* wtf/Uint8Array.h: Renamed from Source/JavaScriptCore/wtf/Uint8Array.h.
(WTF):
(Uint8Array):
(WTF::Uint8Array::set):
(WTF::Uint8Array::isUnsignedByteArray):
(WTF::Uint8Array::create):
(WTF::Uint8Array::Uint8Array):
(WTF::Uint8Array::subarray):
* wtf/Uint8ClampedArray.h: Renamed from Source/JavaScriptCore/wtf/Uint8ClampedArray.h.
(WTF):
(Uint8ClampedArray):
(WTF::Uint8ClampedArray::set):
(WTF::Uint8ClampedArray::isUnsignedByteClampedArray):
(WTF::Uint8ClampedArray::create):
(WTF::Uint8ClampedArray::Uint8ClampedArray):
(WTF::Uint8ClampedArray::subarray):
* wtf/UnionFind.h: Renamed from Source/JavaScriptCore/wtf/UnionFind.h.
(WTF):
(UnionFind):
(WTF::UnionFind::UnionFind):
(WTF::UnionFind::find):
(WTF::UnionFind::unify):
* wtf/UnusedParam.h: Renamed from Source/JavaScriptCore/wtf/UnusedParam.h.
(unusedParam):
* wtf/VMTags.h: Renamed from Source/JavaScriptCore/wtf/VMTags.h.
* wtf/ValueCheck.h: Renamed from Source/JavaScriptCore/wtf/ValueCheck.h.
(WTF):
(ValueCheck):
(WTF::ValueCheck::checkConsistency):
* wtf/Vector.h: Renamed from Source/JavaScriptCore/wtf/Vector.h.
(WTF):
(WTF::VectorTypeOperations::destruct):
(VectorTypeOperations):
(WTF::VectorTypeOperations::initialize):
(WTF::VectorTypeOperations::move):
(WTF::VectorTypeOperations::moveOverlapping):
(WTF::VectorTypeOperations::uninitializedCopy):
(WTF::VectorTypeOperations::uninitializedFill):
(WTF::VectorTypeOperations::compare):
(VectorBufferBase):
(WTF::VectorBufferBase::allocateBuffer):
(WTF::VectorBufferBase::tryAllocateBuffer):
(WTF::VectorBufferBase::deallocateBuffer):
(WTF::VectorBufferBase::buffer):
(WTF::VectorBufferBase::bufferSlot):
(WTF::VectorBufferBase::capacity):
(WTF::VectorBufferBase::releaseBuffer):
(WTF::VectorBufferBase::VectorBufferBase):
(WTF::VectorBufferBase::~VectorBufferBase):
(VectorBuffer):
(WTF::VectorBuffer::VectorBuffer):
(WTF::VectorBuffer::~VectorBuffer):
(WTF::VectorBuffer::allocateBuffer):
(WTF::VectorBuffer::tryAllocateBuffer):
(WTF::VectorBuffer::deallocateBuffer):
(WTF::VectorBuffer::swap):
(WTF::VectorBuffer::restoreInlineBufferIfNeeded):
(WTF::VectorBuffer::releaseBuffer):
(WTF::VectorBuffer::inlineBuffer):
(Vector):
(WTF::Vector::Vector):
(WTF::Vector::~Vector):
(WTF::Vector::size):
(WTF::Vector::capacity):
(WTF::Vector::isEmpty):
(WTF::Vector::at):
(WTF::Vector::operator[]):
(WTF::Vector::data):
(WTF::Vector::dataSlot):
(WTF::Vector::begin):
(WTF::Vector::end):
(WTF::Vector::rbegin):
(WTF::Vector::rend):
(WTF::Vector::reversed):
(WTF::Vector::first):
(WTF::Vector::last):
(WTF::Vector::shrinkToFit):
(WTF::Vector::clear):
(WTF::Vector::removeLast):
(WTF::Vector::fill):
(WTF::Vector::swap):
(VectorReverseProxy):
(WTF::Vector::VectorReverseProxy::begin):
(WTF::Vector::VectorReverseProxy::end):
(WTF::operator<<):
(WTF::operator>>):
(WTF::::Vector):
(WTF::=):
(WTF::typelessPointersAreEqual):
(WTF::::contains):
(WTF::::find):
(WTF::::reverseFind):
(WTF::::fill):
(WTF::::appendRange):
(WTF::::expandCapacity):
(WTF::::tryExpandCapacity):
(WTF::::resize):
(WTF::::shrink):
(WTF::::grow):
(WTF::::reserveCapacity):
(WTF::::tryReserveCapacity):
(WTF::::reserveInitialCapacity):
(WTF::::shrinkCapacity):
(WTF::::append):
(WTF::::tryAppend):
(WTF::::appendSlowCase):
(WTF::::uncheckedAppend):
(WTF::::insert):
(WTF::::prepend):
(WTF::::remove):
(WTF::::reverse):
(WTF::::releaseBuffer):
(WTF::::checkConsistency):
(WTF::deleteAllValues):
(WTF::swap):
(WTF::operator==):
(WTF::operator!=):
* wtf/VectorTraits.h: Renamed from Source/JavaScriptCore/wtf/VectorTraits.h.
(WTF):
(SimpleClassVectorTraits):
* wtf/WTFThreadData.cpp: Renamed from Source/JavaScriptCore/wtf/WTFThreadData.cpp.
(WTF):
(WTF::WTFThreadData::WTFThreadData):
(WTF::WTFThreadData::~WTFThreadData):
(JSC):
(JSC::IdentifierTable::~IdentifierTable):
(JSC::IdentifierTable::add):
* wtf/WTFThreadData.h: Renamed from Source/JavaScriptCore/wtf/WTFThreadData.h.
(JSC):
(IdentifierTable):
(JSC::IdentifierTable::remove):
(JSC::IdentifierTable::literalTable):
(WTF):
(WTFThreadData):
(WTF::WTFThreadData::atomicStringTable):
(WTF::WTFThreadData::currentIdentifierTable):
(WTF::WTFThreadData::setCurrentIdentifierTable):
(WTF::WTFThreadData::resetCurrentIdentifierTable):
(WTF::WTFThreadData::stack):
(WTF::wtfThreadData):
* wtf/blackberry/MainThreadBlackBerry.cpp: Renamed from Source/JavaScriptCore/wtf/blackberry/MainThreadBlackBerry.cpp.
(WTF):
(WTF::initializeMainThreadPlatform):
(WTF::scheduleDispatchFunctionsOnMainThread):
* wtf/chromium/ChromiumThreading.h: Renamed from Source/JavaScriptCore/wtf/chromium/ChromiumThreading.h.
(WTF):
(ChromiumThreading):
* wtf/chromium/MainThreadChromium.cpp: Renamed from Source/JavaScriptCore/wtf/chromium/MainThreadChromium.cpp.
(WTF):
(WTF::initializeMainThread):
(WTF::callOnMainThread):
(WTF::callOnMainThreadAndWait):
(WTF::setMainThreadCallbacksPaused):
(WTF::isMainThread):
* wtf/dtoa.cpp: Renamed from Source/JavaScriptCore/wtf/dtoa.cpp.
(WTF):
(WTF::storeInc):
(WTF::BigInt::BigInt):
(BigInt):
(WTF::BigInt::clear):
(WTF::BigInt::size):
(WTF::BigInt::resize):
(WTF::BigInt::words):
(WTF::BigInt::append):
(WTF::multadd):
(WTF::hi0bits):
(WTF::lo0bits):
(WTF::i2b):
(WTF::mult):
(P5Node):
(WTF::P5Node::P5Node):
(WTF::pow5mult):
(WTF::lshift):
(WTF::cmp):
(WTF::diff):
(WTF::d2b):
(WTF::strtod):
(WTF::quorem):
(WTF::dtoa):
* wtf/dtoa.h: Renamed from Source/JavaScriptCore/wtf/dtoa.h.
(WTF):
* wtf/dtoa/COPYING: Renamed from Source/JavaScriptCore/wtf/dtoa/COPYING.
* wtf/dtoa/LICENSE: Renamed from Source/JavaScriptCore/wtf/dtoa/LICENSE.
* wtf/dtoa/README: Renamed from Source/JavaScriptCore/wtf/dtoa/README.
* wtf/dtoa/bignum-dtoa.cc: Renamed from Source/JavaScriptCore/wtf/dtoa/bignum-dtoa.cc.
* wtf/dtoa/bignum-dtoa.h: Renamed from Source/JavaScriptCore/wtf/dtoa/bignum-dtoa.h.
(WTF):
(double_conversion):
* wtf/dtoa/bignum.cc: Renamed from Source/JavaScriptCore/wtf/dtoa/bignum.cc.
* wtf/dtoa/bignum.h: Renamed from Source/JavaScriptCore/wtf/dtoa/bignum.h.
(WTF):
(double_conversion):
(Bignum):
(WTF::double_conversion::Bignum::Times10):
(WTF::double_conversion::Bignum::Equal):
(WTF::double_conversion::Bignum::LessEqual):
(WTF::double_conversion::Bignum::Less):
(WTF::double_conversion::Bignum::PlusEqual):
(WTF::double_conversion::Bignum::PlusLessEqual):
(WTF::double_conversion::Bignum::PlusLess):
(WTF::double_conversion::Bignum::EnsureCapacity):
(WTF::double_conversion::Bignum::BigitLength):
* wtf/dtoa/cached-powers.cc: Renamed from Source/JavaScriptCore/wtf/dtoa/cached-powers.cc.
* wtf/dtoa/cached-powers.h: Renamed from Source/JavaScriptCore/wtf/dtoa/cached-powers.h.
(WTF):
(double_conversion):
(PowersOfTenCache):
* wtf/dtoa/diy-fp.cc: Renamed from Source/JavaScriptCore/wtf/dtoa/diy-fp.cc.
* wtf/dtoa/diy-fp.h: Renamed from Source/JavaScriptCore/wtf/dtoa/diy-fp.h.
(WTF):
(double_conversion):
(DiyFp):
(WTF::double_conversion::DiyFp::DiyFp):
(WTF::double_conversion::DiyFp::Subtract):
(WTF::double_conversion::DiyFp::Minus):
(WTF::double_conversion::DiyFp::Times):
(WTF::double_conversion::DiyFp::Normalize):
(WTF::double_conversion::DiyFp::f):
(WTF::double_conversion::DiyFp::e):
(WTF::double_conversion::DiyFp::set_f):
(WTF::double_conversion::DiyFp::set_e):
* wtf/dtoa/double-conversion.cc: Renamed from Source/JavaScriptCore/wtf/dtoa/double-conversion.cc.
* wtf/dtoa/double-conversion.h: Renamed from Source/JavaScriptCore/wtf/dtoa/double-conversion.h.
(WTF):
(double_conversion):
(DoubleToStringConverter):
(WTF::double_conversion::DoubleToStringConverter::DoubleToStringConverter):
(StringToDoubleConverter):
(WTF::double_conversion::StringToDoubleConverter::StringToDoubleConverter):
* wtf/dtoa/double.h: Renamed from Source/JavaScriptCore/wtf/dtoa/double.h.
(WTF):
(double_conversion):
(WTF::double_conversion::double_to_uint64):
(WTF::double_conversion::uint64_to_double):
(Double):
(WTF::double_conversion::Double::Double):
(WTF::double_conversion::Double::AsDiyFp):
(WTF::double_conversion::Double::AsNormalizedDiyFp):
(WTF::double_conversion::Double::AsUint64):
(WTF::double_conversion::Double::NextDouble):
(WTF::double_conversion::Double::Exponent):
(WTF::double_conversion::Double::Significand):
(WTF::double_conversion::Double::IsDenormal):
(WTF::double_conversion::Double::IsSpecial):
(WTF::double_conversion::Double::IsNan):
(WTF::double_conversion::Double::IsInfinite):
(WTF::double_conversion::Double::Sign):
(WTF::double_conversion::Double::UpperBoundary):
(WTF::double_conversion::Double::NormalizedBoundaries):
(WTF::double_conversion::Double::value):
(WTF::double_conversion::Double::SignificandSizeForOrderOfMagnitude):
(WTF::double_conversion::Double::Infinity):
(WTF::double_conversion::Double::NaN):
(WTF::double_conversion::Double::DiyFpToUint64):
* wtf/dtoa/fast-dtoa.cc: Renamed from Source/JavaScriptCore/wtf/dtoa/fast-dtoa.cc.
* wtf/dtoa/fast-dtoa.h: Renamed from Source/JavaScriptCore/wtf/dtoa/fast-dtoa.h.
(WTF):
(double_conversion):
* wtf/dtoa/fixed-dtoa.cc: Renamed from Source/JavaScriptCore/wtf/dtoa/fixed-dtoa.cc.
* wtf/dtoa/fixed-dtoa.h: Renamed from Source/JavaScriptCore/wtf/dtoa/fixed-dtoa.h.
(WTF):
(double_conversion):
* wtf/dtoa/strtod.cc: Renamed from Source/JavaScriptCore/wtf/dtoa/strtod.cc.
* wtf/dtoa/strtod.h: Renamed from Source/JavaScriptCore/wtf/dtoa/strtod.h.
(WTF):
(double_conversion):
* wtf/dtoa/utils.h: Renamed from Source/JavaScriptCore/wtf/dtoa/utils.h.
(WTF):
(double_conversion):
(WTF::double_conversion::Max):
(WTF::double_conversion::Min):
(WTF::double_conversion::StrLength):
(Vector):
(WTF::double_conversion::Vector::Vector):
(WTF::double_conversion::Vector::SubVector):
(WTF::double_conversion::Vector::length):
(WTF::double_conversion::Vector::is_empty):
(WTF::double_conversion::Vector::start):
(WTF::double_conversion::Vector::operator[]):
(WTF::double_conversion::Vector::first):
(WTF::double_conversion::Vector::last):
(StringBuilder):
(WTF::double_conversion::StringBuilder::StringBuilder):
(WTF::double_conversion::StringBuilder::~StringBuilder):
(WTF::double_conversion::StringBuilder::size):
(WTF::double_conversion::StringBuilder::position):
(WTF::double_conversion::StringBuilder::SetPosition):
(WTF::double_conversion::StringBuilder::Reset):
(WTF::double_conversion::StringBuilder::AddCharacter):
(WTF::double_conversion::StringBuilder::AddString):
(WTF::double_conversion::StringBuilder::AddSubstring):
(WTF::double_conversion::StringBuilder::AddPadding):
(WTF::double_conversion::StringBuilder::Finalize):
(WTF::double_conversion::StringBuilder::is_finalized):
(WTF::double_conversion::BitCast):
* wtf/efl/MainThreadEfl.cpp: Renamed from Source/JavaScriptCore/wtf/efl/MainThreadEfl.cpp.
(WTF):
(WTF::pipeObject):
(WTF::monitorDispatchFunctions):
(WTF::initializeMainThreadPlatform):
(WTF::scheduleDispatchFunctionsOnMainThread):
* wtf/efl/OwnPtrEfl.cpp: Renamed from Source/JavaScriptCore/wtf/efl/OwnPtrEfl.cpp.
(WTF):
(WTF::deleteOwnedPtr):
* wtf/gobject/GOwnPtr.cpp: Renamed from Source/JavaScriptCore/wtf/gobject/GOwnPtr.cpp.
(WTF):
(WTF::GError):
(WTF::GList):
(WTF::GSList):
(WTF::GPatternSpec):
(WTF::GDir):
(WTF::GTimer):
(WTF::GKeyFile):
* wtf/gobject/GOwnPtr.h: Renamed from Source/JavaScriptCore/wtf/gobject/GOwnPtr.h.
(WTF):
(GOwnPtr):
(WTF::GOwnPtr::GOwnPtr):
(WTF::GOwnPtr::~GOwnPtr):
(WTF::GOwnPtr::get):
(WTF::GOwnPtr::release):
(WTF::GOwnPtr::outPtr):
(WTF::GOwnPtr::set):
(WTF::GOwnPtr::clear):
(WTF::GOwnPtr::operator*):
(WTF::GOwnPtr::operator->):
(WTF::GOwnPtr::operator!):
(WTF::GOwnPtr::operator UnspecifiedBoolType):
(WTF::GOwnPtr::swap):
(WTF::swap):
(WTF::operator==):
(WTF::operator!=):
(WTF::getPtr):
(WTF::freeOwnedGPtr):
* wtf/gobject/GRefPtr.cpp: Renamed from Source/JavaScriptCore/wtf/gobject/GRefPtr.cpp.
(WTF):
(WTF::refGPtr):
(WTF::derefGPtr):
(_GVariant):
* wtf/gobject/GRefPtr.h: Renamed from Source/JavaScriptCore/wtf/gobject/GRefPtr.h.
(WTF):
(GRefPtr):
(WTF::GRefPtr::GRefPtr):
(WTF::GRefPtr::~GRefPtr):
(WTF::GRefPtr::clear):
(WTF::GRefPtr::isHashTableDeletedValue):
(WTF::GRefPtr::get):
(WTF::GRefPtr::operator*):
(WTF::GRefPtr::operator->):
(WTF::GRefPtr::operator!):
(WTF::GRefPtr::operator UnspecifiedBoolType):
(WTF::GRefPtr::hashTableDeletedValue):
(WTF::=):
(WTF::::swap):
(WTF::swap):
(WTF::operator==):
(WTF::operator!=):
(WTF::static_pointer_cast):
(WTF::const_pointer_cast):
(WTF::getPtr):
(WTF::adoptGRef):
(WTF::refGPtr):
(WTF::derefGPtr):
* wtf/gobject/GTypedefs.h: Renamed from Source/JavaScriptCore/wtf/gobject/GTypedefs.h.
* wtf/gobject/GlibUtilities.cpp: Renamed from Source/JavaScriptCore/wtf/gobject/GlibUtilities.cpp.
(getCurrentExecutablePath):
* wtf/gobject/GlibUtilities.h: Renamed from Source/JavaScriptCore/wtf/gobject/GlibUtilities.h.
* wtf/gtk/MainThreadGtk.cpp: Renamed from Source/JavaScriptCore/wtf/gtk/MainThreadGtk.cpp.
(WTF):
(WTF::initializeMainThreadPlatform):
(WTF::timeoutFired):
(WTF::scheduleDispatchFunctionsOnMainThread):
* wtf/mac/MainThreadMac.mm: Renamed from Source/JavaScriptCore/wtf/mac/MainThreadMac.mm.
(-[JSWTFMainThreadCaller call]):
(WTF):
(WTF::initializeMainThreadPlatform):
(WTF::initializeMainThreadToProcessMainThreadPlatform):
(WTF::timerFired):
(WTF::postTimer):
(WTF::scheduleDispatchFunctionsOnMainThread):
(WTF::isMainThread):
* wtf/qt/MainThreadQt.cpp: Renamed from Source/JavaScriptCore/wtf/qt/MainThreadQt.cpp.
(WTF):
(MainThreadInvoker):
(WTF::MainThreadInvoker::MainThreadInvoker):
(WTF::MainThreadInvoker::event):
(WTF::initializeMainThreadPlatform):
(WTF::scheduleDispatchFunctionsOnMainThread):
* wtf/qt/StringQt.cpp: Renamed from Source/JavaScriptCore/wtf/qt/StringQt.cpp.
(WTF):
(WTF::String::String):
(WTF::String::operator QString):
(WTF::operator<<):
(WTF::operator>>):
* wtf/qt/UtilsQt.h: Renamed from Source/JavaScriptCore/wtf/qt/UtilsQt.h.
(escapeHtml):
* wtf/qt/compat/QGuiApplication: Renamed from Source/JavaScriptCore/wtf/qt/compat/QGuiApplication.
* wtf/qt/compat/qguiapplication.h: Renamed from Source/JavaScriptCore/wtf/qt/compat/qguiapplication.h.
(QGuiApplication):
(QGuiApplication::styleHints):
* wtf/text/ASCIIFastPath.h: Renamed from Source/JavaScriptCore/wtf/text/ASCIIFastPath.h.
(WTF):
(WTF::isAlignedToMachineWord):
(WTF::alignToMachineWord):
(WTF::isAllASCII):
(WTF::charactersAreAllASCII):
* wtf/text/AtomicString.cpp: Renamed from Source/JavaScriptCore/wtf/text/AtomicString.cpp.
(WTF):
(AtomicStringTable):
(WTF::AtomicStringTable::create):
(WTF::AtomicStringTable::table):
(WTF::AtomicStringTable::destroy):
(WTF::stringTable):
(WTF::addToStringTable):
(WTF::CStringTranslator::hash):
(CStringTranslator):
(WTF::CStringTranslator::equal):
(WTF::CStringTranslator::translate):
(WTF::AtomicString::add):
(UCharBuffer):
(WTF::UCharBufferTranslator::hash):
(UCharBufferTranslator):
(WTF::UCharBufferTranslator::equal):
(WTF::UCharBufferTranslator::translate):
(HashAndCharacters):
(WTF::HashAndCharactersTranslator::hash):
(HashAndCharactersTranslator):
(WTF::HashAndCharactersTranslator::equal):
(WTF::HashAndCharactersTranslator::translate):
(HashAndUTF8Characters):
(WTF::HashAndUTF8CharactersTranslator::hash):
(HashAndUTF8CharactersTranslator):
(WTF::HashAndUTF8CharactersTranslator::equal):
(WTF::HashAndUTF8CharactersTranslator::translate):
(SubstringLocation):
(WTF::SubstringTranslator::hash):
(SubstringTranslator):
(WTF::SubstringTranslator::equal):
(WTF::SubstringTranslator::translate):
(WTF::AtomicString::addSlowCase):
(WTF::AtomicString::find):
(WTF::AtomicString::remove):
(WTF::AtomicString::lower):
(WTF::AtomicString::fromUTF8Internal):
(WTF::AtomicString::show):
* wtf/text/AtomicString.h: Renamed from Source/JavaScriptCore/wtf/text/AtomicString.h.
(WTF):
(AtomicString):
(WTF::AtomicString::AtomicString):
(WTF::AtomicString::isHashTableDeletedValue):
(WTF::AtomicString::operator const String&):
(WTF::AtomicString::string):
(WTF::AtomicString::impl):
(WTF::AtomicString::characters):
(WTF::AtomicString::length):
(WTF::AtomicString::operator[]):
(WTF::AtomicString::contains):
(WTF::AtomicString::find):
(WTF::AtomicString::startsWith):
(WTF::AtomicString::endsWith):
(WTF::AtomicString::upper):
(WTF::AtomicString::toInt):
(WTF::AtomicString::toDouble):
(WTF::AtomicString::toFloat):
(WTF::AtomicString::percentage):
(WTF::AtomicString::isNull):
(WTF::AtomicString::isEmpty):
(WTF::AtomicString::createCFString):
(WTF::AtomicString::operator NSString*):
(WTF::AtomicString::operator QString):
(WTF::AtomicString::add):
(WTF::operator==):
(WTF::operator!=):
(WTF::equalIgnoringCase):
(WTF::AtomicString::fromUTF8):
* wtf/text/AtomicStringHash.h: Renamed from Source/JavaScriptCore/wtf/text/AtomicStringHash.h.
(WTF):
(WTF::AtomicStringHash::hash):
(AtomicStringHash):
(WTF::AtomicStringHash::equal):
* wtf/text/AtomicStringImpl.h: Renamed from Source/JavaScriptCore/wtf/text/AtomicStringImpl.h.
(WTF):
(AtomicStringImpl):
(WTF::AtomicStringImpl::AtomicStringImpl):
* wtf/text/CString.cpp: Renamed from Source/JavaScriptCore/wtf/text/CString.cpp.
(WTF):
(WTF::CString::CString):
(WTF::CString::init):
(WTF::CString::mutableData):
(WTF::CString::newUninitialized):
(WTF::CString::copyBufferIfNeeded):
(WTF::operator==):
* wtf/text/CString.h: Renamed from Source/JavaScriptCore/wtf/text/CString.h.
(WTF):
(CStringBuffer):
(WTF::CStringBuffer::data):
(WTF::CStringBuffer::length):
(WTF::CStringBuffer::create):
(WTF::CStringBuffer::CStringBuffer):
(WTF::CStringBuffer::mutableData):
(CString):
(WTF::CString::CString):
(WTF::CString::data):
(WTF::CString::length):
(WTF::CString::isNull):
(WTF::CString::buffer):
(WTF::operator!=):
* wtf/text/StringBuffer.h: Renamed from Source/JavaScriptCore/wtf/text/StringBuffer.h.
(WTF):
(StringBuffer):
(WTF::StringBuffer::StringBuffer):
(WTF::StringBuffer::~StringBuffer):
(WTF::StringBuffer::shrink):
(WTF::StringBuffer::resize):
(WTF::StringBuffer::length):
(WTF::StringBuffer::characters):
(WTF::StringBuffer::operator[]):
(WTF::StringBuffer::release):
* wtf/text/StringBuilder.cpp: Renamed from Source/JavaScriptCore/wtf/text/StringBuilder.cpp.
(WTF):
(WTF::StringBuilder::reifyString):
(WTF::StringBuilder::resize):
(WTF::StringBuilder::allocateBuffer):
(WTF::StringBuilder::allocateBufferUpConvert):
(WTF::LChar):
(WTF::UChar):
(WTF::StringBuilder::reserveCapacity):
(WTF::StringBuilder::appendUninitialized):
(WTF::StringBuilder::appendUninitializedSlow):
(WTF::StringBuilder::append):
(WTF::StringBuilder::canShrink):
(WTF::StringBuilder::shrinkToFit):
* wtf/text/StringBuilder.h: Renamed from Source/JavaScriptCore/wtf/text/StringBuilder.h.
(WTF):
(StringBuilder):
(WTF::StringBuilder::StringBuilder):
(WTF::StringBuilder::append):
(WTF::StringBuilder::toString):
(WTF::StringBuilder::toStringPreserveCapacity):
(WTF::StringBuilder::toAtomicString):
(WTF::StringBuilder::length):
(WTF::StringBuilder::isEmpty):
(WTF::StringBuilder::capacity):
(WTF::StringBuilder::operator[]):
(WTF::StringBuilder::characters8):
(WTF::StringBuilder::characters16):
(WTF::StringBuilder::characters):
(WTF::StringBuilder::is8Bit):
(WTF::StringBuilder::clear):
(WTF::StringBuilder::swap):
(WTF::LChar):
(WTF::UChar):
(WTF::equal):
(WTF::operator==):
(WTF::operator!=):
* wtf/text/StringConcatenate.h: Renamed from Source/JavaScriptCore/wtf/text/StringConcatenate.h.
(WTF):
(WTF::sumWithOverflow):
(WTF::tryMakeString):
(WTF::makeString):
* wtf/text/StringHash.h: Renamed from Source/JavaScriptCore/wtf/text/StringHash.h.
(WTF):
(WTF::StringHash::hash):
(WTF::StringHash::equal):
(StringHash):
(CaseFoldingHash):
(WTF::CaseFoldingHash::foldCase):
(WTF::CaseFoldingHash::hash):
(WTF::CaseFoldingHash::equal):
(WTF::AlreadyHashed::hash):
(AlreadyHashed):
(WTF::AlreadyHashed::avoidDeletedValue):
* wtf/text/StringImpl.cpp: Renamed from Source/JavaScriptCore/wtf/text/StringImpl.cpp.
(WTF):
(WTF::StringImpl::~StringImpl):
(WTF::StringImpl::createUninitialized):
(WTF::StringImpl::reallocate):
(WTF::StringImpl::create):
(WTF::StringImpl::getData16SlowCase):
(WTF::StringImpl::upconvertCharacters):
(WTF::StringImpl::containsOnlyWhitespace):
(WTF::StringImpl::substring):
(WTF::StringImpl::characterStartingAt):
(WTF::StringImpl::lower):
(WTF::StringImpl::upper):
(WTF::StringImpl::fill):
(WTF::StringImpl::foldCase):
(WTF::StringImpl::stripMatchedCharacters):
(UCharPredicate):
(WTF::UCharPredicate::UCharPredicate):
(WTF::UCharPredicate::operator()):
(SpaceOrNewlinePredicate):
(WTF::SpaceOrNewlinePredicate::operator()):
(WTF::StringImpl::stripWhiteSpace):
(WTF::StringImpl::removeCharacters):
(WTF::StringImpl::simplifyMatchedCharactersToSpace):
(WTF::StringImpl::simplifyWhiteSpace):
(WTF::StringImpl::toIntStrict):
(WTF::StringImpl::toUIntStrict):
(WTF::StringImpl::toInt64Strict):
(WTF::StringImpl::toUInt64Strict):
(WTF::StringImpl::toIntPtrStrict):
(WTF::StringImpl::toInt):
(WTF::StringImpl::toUInt):
(WTF::StringImpl::toInt64):
(WTF::StringImpl::toUInt64):
(WTF::StringImpl::toIntPtr):
(WTF::StringImpl::toDouble):
(WTF::StringImpl::toFloat):
(WTF::equalIgnoringCase):
(WTF::StringImpl::find):
(WTF::StringImpl::findIgnoringCase):
(WTF::findInner):
(WTF::StringImpl::reverseFind):
(WTF::reverseFindInner):
(WTF::StringImpl::reverseFindIgnoringCase):
(WTF::StringImpl::endsWith):
(WTF::StringImpl::replace):
(WTF::equal):
(WTF::equalIgnoringNullity):
(WTF::StringImpl::defaultWritingDirection):
(WTF::StringImpl::adopt):
(WTF::StringImpl::createWithTerminatingNullCharacter):
* wtf/text/StringImpl.h: Renamed from Source/JavaScriptCore/wtf/text/StringImpl.h.
(JSC):
(WTF):
(StringImpl):
(WTF::StringImpl::StringImpl):
(WTF::StringImpl::create):
(WTF::StringImpl::create8):
(WTF::StringImpl::tryCreateUninitialized):
(WTF::StringImpl::flagsOffset):
(WTF::StringImpl::flagIs8Bit):
(WTF::StringImpl::dataOffset):
(WTF::StringImpl::adopt):
(WTF::StringImpl::length):
(WTF::StringImpl::is8Bit):
(WTF::StringImpl::characters8):
(WTF::StringImpl::characters16):
(WTF::StringImpl::characters):
(WTF::StringImpl::cost):
(WTF::StringImpl::has16BitShadow):
(WTF::StringImpl::isIdentifier):
(WTF::StringImpl::setIsIdentifier):
(WTF::StringImpl::hasTerminatingNullCharacter):
(WTF::StringImpl::isAtomic):
(WTF::StringImpl::setIsAtomic):
(WTF::StringImpl::setHash):
(WTF::StringImpl::rawHash):
(WTF::StringImpl::hasHash):
(WTF::StringImpl::existingHash):
(WTF::StringImpl::hash):
(WTF::StringImpl::hasOneRef):
(WTF::StringImpl::ref):
(WTF::StringImpl::deref):
(WTF::StringImpl::copyChars):
(WTF::StringImpl::operator[]):
(WTF::StringImpl::find):
(WTF::StringImpl::findIgnoringCase):
(WTF::StringImpl::startsWith):
(WTF::StringImpl::bufferOwnership):
(WTF::StringImpl::isStatic):
(WTF::LChar):
(WTF::UChar):
(WTF::equal):
(WTF::equalIgnoringCase):
(WTF::equalIgnoringNullity):
(WTF::codePointCompare):
(WTF::codePointCompare8):
(WTF::codePointCompare16):
(WTF::codePointCompare8To16):
(WTF::isSpaceOrNewline):
(WTF::StringImpl::isolatedCopy):
* wtf/text/StringOperators.h: Renamed from Source/JavaScriptCore/wtf/text/StringOperators.h.
(WTF):
(StringAppend):
(WTF::StringAppend::StringAppend):
(WTF::StringAppend::operator String):
(WTF::StringAppend::operator AtomicString):
(WTF::StringAppend::is8Bit):
(WTF::StringAppend::writeTo):
(WTF::StringAppend::length):
(WTF::operator+):
* wtf/text/StringStatics.cpp: Renamed from Source/JavaScriptCore/wtf/text/StringStatics.cpp.
(WTF):
(WTF::StringImpl::empty):
(WTF::StringImpl::hashSlowCase):
(WTF::AtomicString::init):
* wtf/text/TextPosition.h: Renamed from Source/JavaScriptCore/wtf/text/TextPosition.h.
(WTF):
(OrdinalNumber):
(WTF::OrdinalNumber::fromZeroBasedInt):
(WTF::OrdinalNumber::fromOneBasedInt):
(WTF::OrdinalNumber::OrdinalNumber):
(WTF::OrdinalNumber::zeroBasedInt):
(WTF::OrdinalNumber::oneBasedInt):
(WTF::OrdinalNumber::operator==):
(WTF::OrdinalNumber::operator!=):
(WTF::OrdinalNumber::first):
(WTF::OrdinalNumber::beforeFirst):
(TextPosition):
(WTF::TextPosition::TextPosition):
(WTF::TextPosition::operator==):
(WTF::TextPosition::operator!=):
(WTF::TextPosition::minimumPosition):
(WTF::TextPosition::belowRangePosition):
* wtf/text/WTFString.cpp: Renamed from Source/JavaScriptCore/wtf/text/WTFString.cpp.
(WTF):
(WTF::String::String):
(WTF::String::append):
(WTF::codePointCompare):
(WTF::String::insert):
(WTF::String::characterStartingAt):
(WTF::String::truncate):
(WTF::String::remove):
(WTF::String::substring):
(WTF::String::substringSharingImpl):
(WTF::String::lower):
(WTF::String::upper):
(WTF::String::stripWhiteSpace):
(WTF::String::simplifyWhiteSpace):
(WTF::String::removeCharacters):
(WTF::String::foldCase):
(WTF::String::percentage):
(WTF::String::charactersWithNullTermination):
(WTF::String::format):
(WTF::String::number):
(WTF::String::toIntStrict):
(WTF::String::toUIntStrict):
(WTF::String::toInt64Strict):
(WTF::String::toUInt64Strict):
(WTF::String::toIntPtrStrict):
(WTF::String::toInt):
(WTF::String::toUInt):
(WTF::String::toInt64):
(WTF::String::toUInt64):
(WTF::String::toIntPtr):
(WTF::String::toDouble):
(WTF::String::toFloat):
(WTF::String::isolatedCopy):
(WTF::String::split):
(WTF::String::ascii):
(WTF::String::latin1):
(WTF::putUTF8Triple):
(WTF::String::utf8):
(WTF::String::fromUTF8):
(WTF::String::fromUTF8WithLatin1Fallback):
(WTF::isCharacterAllowedInBase):
(WTF::toIntegralType):
(WTF::lengthOfCharactersAsInteger):
(WTF::charactersToIntStrict):
(WTF::charactersToUIntStrict):
(WTF::charactersToInt64Strict):
(WTF::charactersToUInt64Strict):
(WTF::charactersToIntPtrStrict):
(WTF::charactersToInt):
(WTF::charactersToUInt):
(WTF::charactersToInt64):
(WTF::charactersToUInt64):
(WTF::charactersToIntPtr):
(WTF::toDoubleType):
(WTF::charactersToDouble):
(WTF::charactersToFloat):
(WTF::charactersToFloatIgnoringJunk):
(WTF::emptyString):
(String::show):
(string):
(asciiDebug):
* wtf/text/WTFString.h: Renamed from Source/JavaScriptCore/wtf/text/WTFString.h.
(WebKit):
(WTF):
(String):
(WTF::String::String):
(WTF::String::~String):
(WTF::String::swap):
(WTF::String::adopt):
(WTF::String::isNull):
(WTF::String::isEmpty):
(WTF::String::impl):
(WTF::String::length):
(WTF::String::characters):
(WTF::String::characters8):
(WTF::String::characters16):
(WTF::String::is8Bit):
(WTF::String::operator[]):
(WTF::String::find):
(WTF::String::reverseFind):
(WTF::String::findIgnoringCase):
(WTF::String::reverseFindIgnoringCase):
(WTF::String::contains):
(WTF::String::startsWith):
(WTF::String::endsWith):
(WTF::String::append):
(WTF::String::replace):
(WTF::String::makeLower):
(WTF::String::makeUpper):
(WTF::String::fill):
(WTF::String::left):
(WTF::String::right):
(WTF::String::createUninitialized):
(WTF::String::operator NSString*):
(WTF::String::fromUTF8):
(WTF::String::fromUTF8WithLatin1Fallback):
(WTF::String::defaultWritingDirection):
(WTF::String::containsOnlyWhitespace):
(WTF::String::isHashTableDeletedValue):
(WTF::operator+=):
(WTF::operator==):
(WTF::operator!=):
(WTF::equalIgnoringCase):
(WTF::equalPossiblyIgnoringCase):
(WTF::equalIgnoringNullity):
(WTF::operator!):
(WTF::swap):
(WTF::LChar):
(WTF::UChar):
(WTF::String::containsOnlyLatin1):
(WTF::nsStringNilIfEmpty):
(WTF::String::containsOnlyASCII):
(WTF::codePointCompareLessThan):
(WTF::find):
(WTF::reverseFind):
(WTF::append):
(WTF::appendNumber):
(WTF::isAllSpecialCharacters):
(WTF::String::isAllSpecialCharacters):
* wtf/threads/BinarySemaphore.cpp: Renamed from Source/JavaScriptCore/wtf/threads/BinarySemaphore.cpp.
(WTF):
(WTF::BinarySemaphore::BinarySemaphore):
(WTF::BinarySemaphore::~BinarySemaphore):
(WTF::BinarySemaphore::signal):
(WTF::BinarySemaphore::wait):
* wtf/threads/BinarySemaphore.h: Renamed from Source/JavaScriptCore/wtf/threads/BinarySemaphore.h.
(WTF):
(BinarySemaphore):
(WTF::BinarySemaphore::event):
* wtf/threads/win/BinarySemaphoreWin.cpp: Renamed from Source/JavaScriptCore/wtf/threads/win/BinarySemaphoreWin.cpp.
(WTF):
(WTF::BinarySemaphore::BinarySemaphore):
(WTF::BinarySemaphore::~BinarySemaphore):
(WTF::BinarySemaphore::signal):
(WTF::BinarySemaphore::wait):
* wtf/unicode/CharacterNames.h: Renamed from Source/JavaScriptCore/wtf/unicode/CharacterNames.h.
(Unicode):
* wtf/unicode/Collator.h: Renamed from Source/JavaScriptCore/wtf/unicode/Collator.h.
(WTF):
(Collator):
* wtf/unicode/CollatorDefault.cpp: Renamed from Source/JavaScriptCore/wtf/unicode/CollatorDefault.cpp.
(WTF):
(WTF::Collator::Collator):
(WTF::Collator::~Collator):
(WTF::Collator::setOrderLowerFirst):
(WTF::Collator::userDefault):
(WTF::Collator::collate):
* wtf/unicode/ScriptCodesFromICU.h: Renamed from Source/JavaScriptCore/wtf/unicode/ScriptCodesFromICU.h.
* wtf/unicode/UTF8.cpp: Renamed from Source/JavaScriptCore/wtf/unicode/UTF8.cpp.
(Unicode):
(WTF::Unicode::inlineUTF8SequenceLengthNonASCII):
(WTF::Unicode::inlineUTF8SequenceLength):
(WTF::Unicode::UTF8SequenceLength):
(WTF::Unicode::decodeUTF8Sequence):
(WTF::Unicode::convertLatin1ToUTF8):
(WTF::Unicode::convertUTF16ToUTF8):
(WTF::Unicode::isLegalUTF8):
(WTF::Unicode::readUTF8Sequence):
(WTF::Unicode::convertUTF8ToUTF16):
(WTF::Unicode::calculateStringHashAndLengthFromUTF8):
(WTF::Unicode::equalUTF16WithUTF8):
* wtf/unicode/UTF8.h: Renamed from Source/JavaScriptCore/wtf/unicode/UTF8.h.
(Unicode):
* wtf/unicode/Unicode.h: Renamed from Source/JavaScriptCore/wtf/unicode/Unicode.h.
* wtf/unicode/UnicodeMacrosFromICU.h: Renamed from Source/JavaScriptCore/wtf/unicode/UnicodeMacrosFromICU.h.
* wtf/unicode/glib/UnicodeGLib.cpp: Renamed from Source/JavaScriptCore/wtf/unicode/glib/UnicodeGLib.cpp.
(Unicode):
(WTF::Unicode::foldCase):
(WTF::Unicode::getUTF16LengthFromUTF8):
(WTF::Unicode::convertCase):
(WTF::Unicode::toLower):
(WTF::Unicode::toUpper):
(WTF::Unicode::direction):
(WTF::Unicode::umemcasecmp):
* wtf/unicode/glib/UnicodeGLib.h: Renamed from Source/JavaScriptCore/wtf/unicode/glib/UnicodeGLib.h.
(Unicode):
(WTF::Unicode::toLower):
(WTF::Unicode::toUpper):
(WTF::Unicode::toTitleCase):
(WTF::Unicode::isArabicChar):
(WTF::Unicode::isAlphanumeric):
(WTF::Unicode::isFormatChar):
(WTF::Unicode::isSeparatorSpace):
(WTF::Unicode::isPrintableChar):
(WTF::Unicode::isDigit):
(WTF::Unicode::isPunct):
(WTF::Unicode::hasLineBreakingPropertyComplexContext):
(WTF::Unicode::hasLineBreakingPropertyComplexContextOrIdeographic):
(WTF::Unicode::mirroredChar):
(WTF::Unicode::category):
(WTF::Unicode::isLower):
(WTF::Unicode::digitValue):
(WTF::Unicode::combiningClass):
(WTF::Unicode::decompositionType):
* wtf/unicode/icu/CollatorICU.cpp: Renamed from Source/JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp.
(WTF):
(WTF::cachedCollatorMutex):
(WTF::Collator::Collator):
(WTF::Collator::userDefault):
(WTF::Collator::~Collator):
(WTF::Collator::setOrderLowerFirst):
(WTF::Collator::collate):
(WTF::Collator::createCollator):
(WTF::Collator::releaseCollator):
* wtf/unicode/icu/UnicodeIcu.h: Renamed from Source/JavaScriptCore/wtf/unicode/icu/UnicodeIcu.h.
(Unicode):
(WTF::Unicode::foldCase):
(WTF::Unicode::toLower):
(WTF::Unicode::toUpper):
(WTF::Unicode::toTitleCase):
(WTF::Unicode::isArabicChar):
(WTF::Unicode::isAlphanumeric):
(WTF::Unicode::isSeparatorSpace):
(WTF::Unicode::isPrintableChar):
(WTF::Unicode::isPunct):
(WTF::Unicode::hasLineBreakingPropertyComplexContext):
(WTF::Unicode::hasLineBreakingPropertyComplexContextOrIdeographic):
(WTF::Unicode::mirroredChar):
(WTF::Unicode::category):
(WTF::Unicode::direction):
(WTF::Unicode::isLower):
(WTF::Unicode::combiningClass):
(WTF::Unicode::decompositionType):
(WTF::Unicode::umemcasecmp):
* wtf/unicode/qt4/UnicodeQt4.h: Renamed from Source/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h.
(Properties):
(QUnicodeTables):
(Unicode):
(WTF::Unicode::toLower):
(WTF::Unicode::toUpper):
(WTF::Unicode::toTitleCase):
(WTF::Unicode::foldCase):
(WTF::Unicode::isArabicChar):
(WTF::Unicode::isPrintableChar):
(WTF::Unicode::isSeparatorSpace):
(WTF::Unicode::isPunct):
(WTF::Unicode::isLower):
(WTF::Unicode::hasLineBreakingPropertyComplexContext):
(WTF::Unicode::mirroredChar):
(WTF::Unicode::combiningClass):
(WTF::Unicode::decompositionType):
(WTF::Unicode::umemcasecmp):
(WTF::Unicode::direction):
(WTF::Unicode::category):
* wtf/unicode/wince/UnicodeWinCE.cpp: Renamed from Source/JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.cpp.
(Unicode):
(WTF::Unicode::toLower):
(WTF::Unicode::toUpper):
(WTF::Unicode::foldCase):
(WTF::Unicode::isPrintableChar):
(WTF::Unicode::isSpace):
(WTF::Unicode::isLetter):
(WTF::Unicode::isUpper):
(WTF::Unicode::isLower):
(WTF::Unicode::isDigit):
(WTF::Unicode::isPunct):
(WTF::Unicode::isAlphanumeric):
(WTF::Unicode::toTitleCase):
(WTF::Unicode::direction):
(WTF::Unicode::category):
(WTF::Unicode::decompositionType):
(WTF::Unicode::combiningClass):
(WTF::Unicode::mirroredChar):
(WTF::Unicode::digitValue):
* wtf/unicode/wince/UnicodeWinCE.h: Renamed from Source/JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.h.
(Unicode):
(WTF::Unicode::isSeparatorSpace):
(WTF::Unicode::isHighSurrogate):
(WTF::Unicode::isLowSurrogate):
(WTF::Unicode::isArabicChar):
(WTF::Unicode::hasLineBreakingPropertyComplexContext):
(WTF::Unicode::umemcasecmp):
(WTF::Unicode::surrogateToUcs4):
* wtf/url/api/ParsedURL.cpp: Renamed from Source/JavaScriptCore/wtf/url/api/ParsedURL.cpp.
(WTF):
(WTF::ParsedURL::ParsedURL):
(WTF::ParsedURL::isolatedCopy):
(WTF::ParsedURL::scheme):
(WTF::ParsedURL::username):
(WTF::ParsedURL::password):
(WTF::ParsedURL::host):
(WTF::ParsedURL::port):
(WTF::ParsedURL::path):
(WTF::ParsedURL::query):
(WTF::ParsedURL::fragment):
(WTF::ParsedURL::baseAsString):
(WTF::ParsedURL::segment):
* wtf/url/api/ParsedURL.h: Renamed from Source/JavaScriptCore/wtf/url/api/ParsedURL.h.
(WTF):
(ParsedURL):
(WTF::ParsedURL::ParsedURL):
(WTF::ParsedURL::isValid):
(WTF::ParsedURL::spec):
* wtf/url/api/URLString.h: Renamed from Source/JavaScriptCore/wtf/url/api/URLString.h.
(WTF):
(URLString):
(WTF::URLString::URLString):
(WTF::URLString::string):
* wtf/url/src/RawURLBuffer.h: Renamed from Source/JavaScriptCore/wtf/url/src/RawURLBuffer.h.
(WTF):
(RawURLBuffer):
(WTF::RawURLBuffer::RawURLBuffer):
(WTF::RawURLBuffer::~RawURLBuffer):
(WTF::RawURLBuffer::resize):
* wtf/url/src/URLBuffer.h: Renamed from Source/JavaScriptCore/wtf/url/src/URLBuffer.h.
(WTF):
(URLBuffer):
(WTF::URLBuffer::URLBuffer):
(WTF::URLBuffer::~URLBuffer):
(WTF::URLBuffer::at):
(WTF::URLBuffer::set):
(WTF::URLBuffer::capacity):
(WTF::URLBuffer::length):
(WTF::URLBuffer::data):
(WTF::URLBuffer::setLength):
(WTF::URLBuffer::append):
(WTF::URLBuffer::grow):
* wtf/url/src/URLCharacterTypes.cpp: Renamed from Source/JavaScriptCore/wtf/url/src/URLCharacterTypes.cpp.
(WTF):
* wtf/url/src/URLCharacterTypes.h: Renamed from Source/JavaScriptCore/wtf/url/src/URLCharacterTypes.h.
(WTF):
(URLCharacterTypes):
(WTF::URLCharacterTypes::isQueryChar):
(WTF::URLCharacterTypes::isIPv4Char):
(WTF::URLCharacterTypes::isHexChar):
(WTF::URLCharacterTypes::isCharOfType):
* wtf/url/src/URLComponent.h: Renamed from Source/JavaScriptCore/wtf/url/src/URLComponent.h.
(WTF):
(URLComponent):
(WTF::URLComponent::URLComponent):
(WTF::URLComponent::fromRange):
(WTF::URLComponent::isValid):
(WTF::URLComponent::isNonEmpty):
(WTF::URLComponent::isEmptyOrInvalid):
(WTF::URLComponent::reset):
(WTF::URLComponent::operator==):
(WTF::URLComponent::begin):
(WTF::URLComponent::setBegin):
(WTF::URLComponent::length):
(WTF::URLComponent::setLength):
(WTF::URLComponent::end):
* wtf/url/src/URLEscape.cpp: Renamed from Source/JavaScriptCore/wtf/url/src/URLEscape.cpp.
(WTF):
* wtf/url/src/URLEscape.h: Renamed from Source/JavaScriptCore/wtf/url/src/URLEscape.h.
(WTF):
(WTF::appendURLEscapedCharacter):
* wtf/url/src/URLParser.h: Renamed from Source/JavaScriptCore/wtf/url/src/URLParser.h.
(WTF):
(URLParser):
(WTF::URLParser::isPossibleAuthorityTerminator):
(WTF::URLParser::parseAuthority):
(WTF::URLParser::extractScheme):
(WTF::URLParser::parseAfterScheme):
(WTF::URLParser::parseStandardURL):
(WTF::URLParser::parsePath):
(WTF::URLParser::parsePathURL):
(WTF::URLParser::parseMailtoURL):
(WTF::URLParser::parsePort):
(WTF::URLParser::extractFileName):
(WTF::URLParser::extractQueryKeyValue):
(WTF::URLParser::isURLSlash):
(WTF::URLParser::shouldTrimFromURL):
(WTF::URLParser::trimURL):
(WTF::URLParser::consecutiveSlashes):
(WTF::URLParser::isPortDigit):
(WTF::URLParser::nextAuthorityTerminator):
(WTF::URLParser::parseUserInfo):
(WTF::URLParser::parseServerInfo):
* wtf/url/src/URLQueryCanonicalizer.h: Renamed from Source/JavaScriptCore/wtf/url/src/URLQueryCanonicalizer.h.
(WTF):
(URLQueryCanonicalizer):
(WTF::URLQueryCanonicalizer::canonicalize):
(WTF::URLQueryCanonicalizer::isAllASCII):
(WTF::URLQueryCanonicalizer::isRaw8Bit):
(WTF::URLQueryCanonicalizer::appendRaw8BitQueryString):
(WTF::URLQueryCanonicalizer::convertToQueryEncoding):
* wtf/url/src/URLSegments.cpp: Renamed from Source/JavaScriptCore/wtf/url/src/URLSegments.cpp.
(WTF):
(WTF::URLSegments::length):
(WTF::URLSegments::charactersBefore):
* wtf/url/src/URLSegments.h: Renamed from Source/JavaScriptCore/wtf/url/src/URLSegments.h.
(WTF):
(URLSegments):
(WTF::URLSegments::URLSegments):
* wtf/win/MainThreadWin.cpp: Renamed from Source/JavaScriptCore/wtf/win/MainThreadWin.cpp.
(WTF):
(WTF::ThreadingWindowWndProc):
(WTF::initializeMainThreadPlatform):
(WTF::scheduleDispatchFunctionsOnMainThread):
* wtf/win/OwnPtrWin.cpp: Renamed from Source/JavaScriptCore/wtf/win/OwnPtrWin.cpp.
(WTF):
(WTF::deleteOwnedPtr):
* wtf/wince/FastMallocWinCE.h: Renamed from Source/JavaScriptCore/wtf/wince/FastMallocWinCE.h.
(operator new):
(operator delete):
(operator new[]):
(operator delete[]):
(throw):
(WTF):
(Internal):
(WTF::Internal::fastMallocMatchValidationType):
(WTF::Internal::fastMallocMatchValidationValue):
(WTF::Internal::setFastMallocMatchValidationType):
(WTF::fastMallocMatchValidateMalloc):
(WTF::fastMallocMatchValidateFree):
* wtf/wince/MemoryManager.cpp: Renamed from Source/JavaScriptCore/wtf/wince/MemoryManager.cpp.
(WTF):
(WTF::memoryManager):
(WTF::MemoryManager::MemoryManager):
(WTF::MemoryManager::~MemoryManager):
(WTF::MemoryManager::createCompatibleBitmap):
(WTF::MemoryManager::createDIBSection):
(WTF::MemoryManager::m_malloc):
(WTF::MemoryManager::m_calloc):
(WTF::MemoryManager::m_realloc):
(WTF::MemoryManager::m_free):
(WTF::MemoryManager::resizeMemory):
(WTF::MemoryManager::allocate64kBlock):
(WTF::MemoryManager::free64kBlock):
(WTF::MemoryManager::onIdle):
(WTF::MemoryManager::virtualAlloc):
(WTF::MemoryManager::virtualFree):
(WTF::fastMalloc):
(WTF::fastCalloc):
(WTF::fastFree):
(WTF::fastRealloc):
(WTF::fastMallocForbid):
(WTF::fastMallocAllow):
(WTF::fastZeroedMalloc):
(WTF::tryFastMalloc):
(WTF::tryFastZeroedMalloc):
(WTF::tryFastCalloc):
(WTF::tryFastRealloc):
(WTF::fastStrDup):
* wtf/wince/MemoryManager.h: Renamed from Source/JavaScriptCore/wtf/wince/MemoryManager.h.
(WTF):
(MemoryManager):
(WTF::MemoryManager::allocationCanFail):
(WTF::MemoryManager::setAllocationCanFail):
(MemoryAllocationCanFail):
(WTF::MemoryAllocationCanFail::MemoryAllocationCanFail):
(WTF::MemoryAllocationCanFail::~MemoryAllocationCanFail):
(MemoryAllocationCannotFail):
(WTF::MemoryAllocationCannotFail::MemoryAllocationCannotFail):
(WTF::MemoryAllocationCannotFail::~MemoryAllocationCannotFail):
* wtf/wx/MainThreadWx.cpp: Renamed from Source/JavaScriptCore/wtf/wx/MainThreadWx.cpp.
(wxCallAfter):
(wxCallAfter::wxCallAfter):
(wxCallAfter::OnCallback):
(WTF):
(WTF::initializeMainThreadPlatform):
(WTF::scheduleDispatchFunctionsOnMainThread):
* wtf/wx/StringWx.cpp: Renamed from Source/JavaScriptCore/wtf/wx/StringWx.cpp.
(WTF):
(WTF::String::String):
(WTF::String::operator wxString):
2012-03-22 Hyowon Kim <hw1008.kim@samsung.com>
[EFL] Add PageClientEfl to WebCoreSupport.
https://bugs.webkit.org/show_bug.cgi?id=80748
Reviewed by Noam Rosenthal.
* wtf/Platform.h: Disable accelerated compositing. It's not ready yet.
2012-03-21 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=80322
Implement image-set
Reviewed by Dean Jackson.
For the time being, image-set is opt-in since the implementation is
incomplete.
Add an ENABLE flag for image-set.
* wtf/Platform.h:
2012-03-21 Jessie Berlin <jberlin@apple.com>
Fix the Windows build after r111504.
* WTF.vcproj/WTF.vcproj:
Platform.h was moved to Source/WTF.
* WTF.vcproj/copy-files.cmd:
Copy Platform.h from its new source location. This separate copy will not be necessary once
the full move is done and all the headers are being copied at once from the new locations.
2012-03-21 Jessie Berlin <jberlin@apple.com>
WTF headers should be in $(ConfigurationBuildDir)\include\private\wtf, not
$(ConfigurationBuildDir)\include\private\JavaScriptCore\wtf.
https://bugs.webkit.org/show_bug.cgi?id=81739
Reviewed by Dan Bernstein.
* WTF.vcproj/copy-files.cmd:
Copy the headers to private/include/wtf instead of private/include/JavaScriptCore/wtf.
2012-03-20 Eric Seidel <eric@webkit.org>
Move wtf/Platform.h from JavaScriptCore to Source/WTF/wtf
https://bugs.webkit.org/show_bug.cgi?id=80911
Reviewed by Adam Barth.
Update build systems to account for the new location of Platform.h
* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.vcproj/work-around-vs-dependency-tracking-bugs.py:
(react_to_vsprops_changes):
* WTF.xcodeproj/project.pbxproj:
* config.h: I don't think this change is 100% correct (but seemed to be needed to make qt-wk2 build)
- This dependency on JSC should be removed regardless (in a later patch).
* wtf/Platform.h: Renamed from Source/JavaScriptCore/wtf/Platform.h.
2012-03-20 Steve Falkenburg <sfalken@apple.com>
Move WTF-related Windows project files out of JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=80680
This change only moves the vcproj and related files from JavaScriptCore/JavaScriptCore.vcproj/WTF.
It does not move any source code. This is in preparation for the WTF source move out of
JavaScriptCore.
Reviewed by Jessie Berlin.
* WTF.vcproj: Added.
* WTF.vcproj/WTF.vcproj: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj.
* WTF.vcproj/WTFCommon.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFCommon.vsprops.
* WTF.vcproj/WTFDebug.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFDebug.vsprops.
* WTF.vcproj/WTFDebugAll.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFDebugAll.vsprops.
* WTF.vcproj/WTFDebugCairoCFLite.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFDebugCairoCFLite.vsprops.
* WTF.vcproj/WTFGenerated.make: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFGenerated.make.
* WTF.vcproj/WTFGenerated.vcproj: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFGenerated.vcproj.
* WTF.vcproj/WTFGeneratedCommon.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFGeneratedCommon.vsprops.
* WTF.vcproj/WTFGeneratedDebug.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFGeneratedDebug.vsprops.
* WTF.vcproj/WTFGeneratedDebugAll.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFGeneratedDebugAll.vsprops.
* WTF.vcproj/WTFGeneratedDebugCairoCFLite.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFGeneratedDebugCairoCFLite.vsprops.
* WTF.vcproj/WTFGeneratedProduction.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFGeneratedProduction.vsprops.
* WTF.vcproj/WTFGeneratedRelease.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFGeneratedRelease.vsprops.
* WTF.vcproj/WTFGeneratedReleaseCairoCFLite.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFGeneratedReleaseCairoCFLite.vsprops.
* WTF.vcproj/WTFPostBuild.cmd: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd.
* WTF.vcproj/WTFPreBuild.cmd: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd.
* WTF.vcproj/WTFProduction.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFProduction.vsprops.
* WTF.vcproj/WTFRelease.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFRelease.vsprops.
* WTF.vcproj/WTFReleaseCairoCFLite.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFReleaseCairoCFLite.vsprops.
* WTF.vcproj/build-generated-files.sh: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/build-generated-files.sh.
* WTF.vcproj/copy-files.cmd: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/copy-files.cmd.
* WTF.vcproj/work-around-vs-dependency-tracking-bugs.py: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/work-around-vs-dependency-tracking-bugs.py.
2012-03-20 Peter Beverloo <peter@chromium.org>
[Chromium] Fix the Android build by building NEWWTF for host
https://bugs.webkit.org/show_bug.cgi?id=81643
Reviewed by Tony Gentilcore.
Chromium for Android builds the ImageDiff target for the host architecture,
so all dependencies it has need to be able to build for host as well.
r111258 added (new)WTF as a dependency instead of just including the
header files, so make it possible to build the newwtf target for host.
* WTF.gyp/WTF.gyp:
2012-03-19 Dan Bernstein <mitz@apple.com>
Set the svn:ignore property on the Xcode project.
* WTF.xcodeproj: Added property svn:ignore.
2012-03-16 Mark Rowe <mrowe@apple.com>
Build fix. Do not preserve owner and group information when installing the WTF headers.
* WTF.xcodeproj/project.pbxproj:
2012-03-07 Mark Rowe <mrowe@apple.com>
Teach make to build WTF.
* Makefile: Added.
2012-02-11 Filip Pizlo <fpizlo@apple.com>
It should be possible to send all JSC debug logging to a file
https://bugs.webkit.org/show_bug.cgi?id=78418
Reviewed by Sam Weinig.
Introduced wtf/DataLog, which defines WTF::dataFile, WTF::dataLog,
and WTF::dataLogV. Changed all debugging- and profiling-related printfs
to use WTF::dataLog() or one of its friends. By default, debug logging
goes to stderr, unless you change the setting in wtf/DataLog.cpp.
* WTF.pro:
2012-02-03 Simon Hausmann <simon.hausmann@nokia.com>
[Qt] Fix build when cross-compiling
https://bugs.webkit.org/show_bug.cgi?id=77634
Reviewed by Tor Arne Vestbø.
* WTF.pri: Don't use icu-config for determining the library search
path and libraries needed for ICU. Either we use icu-config for includes
_and_ libraries or we don't. Right now we assume that icu is a system library
and expect the headers in the default include search pathes (/usr/include for example).
However we use icu-config to figure out where the libraries are, which breaks when
cross-compiling, because icu-config isn't cross-compile friendly (I wish icu was using
pkg-config). I think for the time being we should require ICU as a _system_ library,
which implies the header and library availability in default search paths. This also
makes the build succeed when cross-compiling with --sysroot.
2012-01-27 Zeno Albisser <zeno@webkit.org>
[Qt][Mac] Build fails after adding ICU support (r105997).
https://bugs.webkit.org/show_bug.cgi?id=77118
Link to libicucore if platform Mac.
Reviewed by Tor Arne Vestbø.
* WTF.pri:
2012-01-26 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
[Qt] Use ICU if available
https://bugs.webkit.org/show_bug.cgi?id=76821
Reviewed by Simon Hausmann.
Adding libicu dependencies for a Qt5 based build.
* WTF.pri:
2012-01-26 Csaba Osztrogonác <ossy@webkit.org>
[Qt][Win] One more speculative buildfix after r105970.
* WTF.pri:
2012-01-26 Nikolas Zimmermann <nzimmermann@rim.com>
Not reviewed. Try to fix Qt/Win build by building OwnPtrWin.cpp into the WTF library.
* WTF.pro:
2012-01-19 Joi Sigurdsson <joi@chromium.org>
Enable use of precompiled headers in Chromium port on Windows.
Bug 76381 - Use precompiled headers in Chromium port on Windows
https://bugs.webkit.org/show_bug.cgi?id=76381
Reviewed by Tony Chang.
* WTF.gyp/WTF.gyp: Include WinPrecompile.gypi.
2012-01-18 Roland Takacs <takacs.roland@stud.u-szeged.hu>
Cross-platform processor core counter
https://bugs.webkit.org/show_bug.cgi?id=76530
Reviewed by Zoltan Herczeg.
Two files have been added to the project, namely NumberOfCores.h/cpp,
that include a CPU core number determining function.
* WTF.pro:
2012-01-17 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Uint8ClampedArray support
https://bugs.webkit.org/show_bug.cgi?id=74455
Reviewed by Filip Pizlo.
* WTF.pro:
2012-01-13 Alexis Menard <alexis.menard@openbossa.org>
Unreviewed build fix for Qt SnowLeopard build bot.
This is a workaround for the moment.
* wtf/Platform.h:
2012-01-12 Simon Hausmann <simon.hausmann@nokia.com>
Make the new WTF module build on Qt
https://bugs.webkit.org/show_bug.cgi?id=76163
Reviewed by Tor Arne Vestbø.
With this change the WTF sources are built _here_ but _from_ their old location using a VPATH.
* WTF.pri: Renamed from Source/JavaScriptCore/wtf/wtf.pri.
* WTF.pro: Renamed from Source/JavaScriptCore/wtf/wtf.pro.
* config.h: Bring this file in sync with JavaScriptCore/config.h with regards to the inclusion
/ definition of the export macros.
2012-01-06 Benjamin Poulain <bpoulain@apple.com>
[Mac] Sort the resources of WTF.xcodeproj
https://bugs.webkit.org/show_bug.cgi?id=75639
Reviewed by Andreas Kling.
* WTF.xcodeproj/project.pbxproj:
2012-01-06 Eric Seidel <eric@webkit.org> and Gustavo Noronha Silva <gustavo.noronha@collabora.com>
Make the new WTF module build on Gtk
https://bugs.webkit.org/show_bug.cgi?id=75669
* GNUmakefile.am: Added.
* GNUmakefile.list.am: Added.
2011-11-19 Adam Barth <abarth@webkit.org>
Integrate Source/WTF with the Chromium build system
https://bugs.webkit.org/show_bug.cgi?id=72790
Reviewed by Eric Seidel.
Rename the target in this file to "newwtf" to avoid naming conflicts.
* WTF.gyp/WTF.gyp:
2011-11-19 Mark Rowe <mrowe@apple.com>
WTF should have an Xcode project
https://bugs.webkit.org/show_bug.cgi?id=71752
Reviewed by Adam Barth.
This adds an Xcode project that includes only Stub.cpp and Stub.h.
They’re built in to a library at the appropriate path for each
configuration (WebKitBuild/{Debug,Release}/libWTF.a and
/usr/local/lib/libWTF.a) and headers are installed in to the
appropriate location (WebKitBuild/{Debug,Release}/usr/local/include/wtf
and /usr/local/include/wtf). I tested building WTF in this project and
everything appears to build except for DateMath.cpp (due to bug 71747).
I have not yet done any work on making JavaScriptCore and other
projects use the built products of this new project.
* Configurations: Added.
* Configurations/Base.xcconfig: Copied from Source/JavaScriptCore/Configurations/Base.xcconfig.
* Configurations/CompilerVersion.xcconfig: Copied from Source/JavaScriptCore/Configurations/CompilerVersion.xcconfig.
* Configurations/DebugRelease.xcconfig: Copied from Source/JavaScriptCore/Configurations/DebugRelease.xcconfig.
* Configurations/WTF.xcconfig: Copied from Source/WebKit2/Configurations/Shim.xcconfig.
* WTF.xcodeproj: Added.
* WTF.xcodeproj/project.pbxproj: Added.
* config.h: Copied from Source/JavaScriptCore/config.h.
* icu: Added.
* icu/LICENSE: Copied from Source/JavaScriptCore/icu/LICENSE.
* icu/README: Copied from Source/JavaScriptCore/icu/README.
* icu/unicode: Added.
* icu/unicode/parseerr.h: Copied from Source/JavaScriptCore/icu/unicode/parseerr.h.
* icu/unicode/platform.h: Copied from Source/JavaScriptCore/icu/unicode/platform.h.
* icu/unicode/putil.h: Copied from Source/JavaScriptCore/icu/unicode/putil.h.
* icu/unicode/uchar.h: Copied from Source/JavaScriptCore/icu/unicode/uchar.h.
* icu/unicode/ucnv.h: Copied from Source/JavaScriptCore/icu/unicode/ucnv.h.
* icu/unicode/ucnv_err.h: Copied from Source/JavaScriptCore/icu/unicode/ucnv_err.h.
* icu/unicode/ucol.h: Copied from Source/JavaScriptCore/icu/unicode/ucol.h.
* icu/unicode/uconfig.h: Copied from Source/JavaScriptCore/icu/unicode/uconfig.h.
* icu/unicode/uenum.h: Copied from Source/JavaScriptCore/icu/unicode/uenum.h.
* icu/unicode/uiter.h: Copied from Source/JavaScriptCore/icu/unicode/uiter.h.
* icu/unicode/uloc.h: Copied from Source/JavaScriptCore/icu/unicode/uloc.h.
* icu/unicode/umachine.h: Copied from Source/JavaScriptCore/icu/unicode/umachine.h.
* icu/unicode/unorm.h: Copied from Source/JavaScriptCore/icu/unicode/unorm.h.
* icu/unicode/urename.h: Copied from Source/JavaScriptCore/icu/unicode/urename.h.
* icu/unicode/uscript.h: Copied from Source/JavaScriptCore/icu/unicode/uscript.h.
* icu/unicode/uset.h: Copied from Source/JavaScriptCore/icu/unicode/uset.h.
* icu/unicode/ustring.h: Copied from Source/JavaScriptCore/icu/unicode/ustring.h.
* icu/unicode/utf.h: Copied from Source/JavaScriptCore/icu/unicode/utf.h.
* icu/unicode/utf16.h: Copied from Source/JavaScriptCore/icu/unicode/utf16.h.
* icu/unicode/utf8.h: Copied from Source/JavaScriptCore/icu/unicode/utf8.h.
* icu/unicode/utf_old.h: Copied from Source/JavaScriptCore/icu/unicode/utf_old.h.
* icu/unicode/utypes.h: Copied from Source/JavaScriptCore/icu/unicode/utypes.h.
* icu/unicode/uversion.h: Copied from Source/JavaScriptCore/icu/unicode/uversion.h.
2011-11-03 Adam Barth <abarth@webkit.org>
Add Stub.h and Stub.cpp to Source-level WTF project
https://bugs.webkit.org/show_bug.cgi?id=71497
Reviewed by Eric Seidel.
This patch adds some stub files and a skelton GYP build file as a
starting point for the new Source-level WTF project. Other build
systems and actual code will arrive in future patches.
* Stub.cpp: Added.
* Stub.h: Added.
* WTF.gyp/WTF.gyp: Added.
* WTF.gypi: Added.
2011-11-02 Adam Barth <abarth@webkit.org>
Add stubs for WTF and Platform
https://bugs.webkit.org/show_bug.cgi?id=71492
Reviewed by Eric Seidel.
This patch creates the WTF directory, which begins the process of
moving WTF out of JavaScriptCore.