ChangeLog 759 KB
Newer Older
1 2 3 4 5 6 7 8 9
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!

10 11 12 13 14 15 16 17 18
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.

19 20 21 22 23 24
2013-08-23  Oliver Hunt  <oliver@apple.com>

        Attempt to appease windows bot.

        * wtf/Compression.h:

oliver@apple.com's avatar
oliver@apple.com committed
25 26 27 28 29 30
2013-08-23  Oliver Hunt  <oliver@apple.com>

        Re-sort xcode project file

        * WTF.xcodeproj/project.pbxproj:

31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
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):

70 71 72 73 74 75 76 77 78 79 80
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:

81 82 83 84 85 86 87 88 89 90 91
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).

92 93 94 95 96 97 98 99 100 101 102
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:

103 104 105 106 107 108 109 110 111 112
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.

113 114 115 116 117 118 119 120 121 122
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:

123 124 125 126 127 128 129 130 131 132 133
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:

134 135 136 137 138 139 140 141 142 143 144 145 146
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:

147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191
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.

192 193 194 195 196 197 198 199 200 201 202 203
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.

204 205 206 207 208 209 210 211 212 213 214 215
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):

216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249
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):

250 251 252 253 254 255 256 257 258
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:

259 260 261 262 263 264 265 266 267 268
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):

269 270 271 272 273 274 275 276 277 278 279 280
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:

281 282 283 284 285 286 287 288 289 290 291 292 293 294 295
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):

296 297 298 299 300 301
2013-08-11  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix make distcheck.

        * GNUmakefile.list.am: Add missing header file.

302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317
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:

318 319 320 321 322 323 324 325
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.

326 327 328 329 330 331 332 333 334
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:

335 336 337 338 339 340 341 342 343 344
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.

345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366
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.

367 368 369 370 371 372 373
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).

374 375 376 377 378 379 380 381 382
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.

mrowe@apple.com's avatar
mrowe@apple.com committed
383 384 385 386 387 388 389
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.

390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425
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.

426 427 428 429 430 431 432 433 434
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:

435 436 437 438 439 440 441 442 443 444 445 446 447
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:

448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476
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:

477 478 479 480 481 482 483 484
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:

485 486 487 488 489 490 491 492 493 494 495
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:

496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530
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.

531 532 533 534 535 536 537 538 539 540 541 542 543 544 545
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.

546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575
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.

576 577 578 579 580 581 582 583 584
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.

585 586 587 588 589 590 591 592 593 594 595 596 597
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:

598 599 600 601 602 603 604 605 606
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.

607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625
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):

626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641
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):

642 643 644 645 646 647
2013-07-29  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix make distcheck.

        * GNUmakefile.list.am: Add missing files to compilation.

648 649 650 651 652 653 654 655 656
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.

657 658 659 660 661 662 663 664 665 666 667 668 669
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:

670 671 672 673 674 675 676 677 678 679 680 681 682 683 684
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:

685 686 687 688 689 690 691 692 693 694 695 696
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):

697 698 699 700 701 702 703 704 705 706 707 708 709
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.

710 711 712 713 714 715 716 717 718 719 720
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.

721 722 723 724 725 726 727
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.

728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744
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):

745 746 747 748 749 750 751 752 753
2013-07-25  Allan Sandfeld Jensen  <allan.jensen@digia.com>

        Fix windows build after FTL upstream

        Unreviewed build fix.

        * wtf/Atomics.h:
        (WTF::weakCompareAndSwap):

754 755 756 757 758 759
2013-07-25  Ryuan Choi  <ryuan.choi@samsung.com>

        Unreviewed, build fix on the EFL port.

        * wtf/CMakeLists.txt: Added SixCharacterHash.cpp

760 761 762 763 764 765
2013-07-25  Gabor Rapcsanyi  <rgabor@webkit.org>

        Unreviewed, build fix on the Qt port.

        * WTF.pro: Add additional build files for the FTL.

766 767 768 769 770 771 772
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.

773 774 775 776 777 778
2013-07-25  Csaba Osztrogonác  <ossy@webkit.org>

        [GTK] Similar fix to r153304.

        * GNUmakefile.list.am:

779 780 781 782 783 784 785 786 787 788
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}.

789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843
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):

844 845 846 847 848 849 850 851 852 853 854 855
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):

856 857 858 859 860 861 862 863 864 865 866 867 868 869
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):

870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927
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):

928 929 930 931 932 933
2013-07-02  Filip Pizlo  <fpizlo@apple.com>

        Unreviewed, fix 32-bit build.

        * wtf/Platform.h:

934 935 936 937 938 939 940 941 942
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:

943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962
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:

963 964 965 966 967 968 969 970 971 972 973 974 975
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):

976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995
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):

996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009
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):

1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031
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[]):

1032 1033 1034 1035 1036 1037 1038 1039 1040 1041
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:

1042 1043 1044 1045 1046 1047 1048 1049 1050 1051
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):

1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065
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):

1066 1067 1068 1069 1070 1071 1072 1073 1074 1075
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[]):

1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091
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):

1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106
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:

1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125
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.

1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158
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):

1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180
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):

1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209
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):

1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235
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):

1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260
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:

1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289
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):

1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323
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:

1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339
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):

1340 1341 1342 1343 1344 1345
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.

1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356
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:

1357 1358 1359 1360 1361 1362 1363
2013-07-18  Benjamin Poulain  <benjamin@webkit.org>

        Fix the build after r152881

        * wtf/text/StringImpl.cpp:
        (WTF::StringImpl::lower):

1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383
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):

1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396
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):

1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416
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):

1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429
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.

1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442
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).

1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455
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):

1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473
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):

1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484
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.

1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504
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):

1505 1506 1507 1508 1509 1510
2013-07-08  Carlos Garcia Campos  <cgarcia@igalia.com>

        Unreviewed. Fix make distcheck.

        * GNUmakefile.list.am: Add missing header files.

antti@apple.com's avatar
antti@apple.com committed
1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525
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):

1526 1527 1528 1529 1530 1531 1532 1533
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.

1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545
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.

1546 1547 1548 1549 1550 1551 1552
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.

1553 1554 1555 1556 1557 1558 1559
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.

1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570
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.

1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588
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):

1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609
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:

1610 1611 1612 1613 1614 1615 1616
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.

1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630
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:

1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651
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:

1652 1653 1654 1655 1656 1657 1658 1659 1660
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:

ggaren@apple.com's avatar
ggaren@apple.com committed
1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679
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.

1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694
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:

1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717
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:

1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731
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:

1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749
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:

1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779
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.

1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801
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):

1802 1803 1804 1805 1806 1807 1808 1809 1810 1811
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.

1812 1813 1814 1815 1816 1817
2013-06-24  Roger Fong  <roger_fong@apple.com>

        Unreviewed. AppleWin build fix, followup to r151915.

        * WTF.vcxproj/WTFProduction.props:

1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832
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:

1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849
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.

1850 1851 1852 1853 1854 1855 1856 1857 1858
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.

1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873
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.

1874 1875 1876 1877 1878 1879 1880 1881 1882 1883
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):

1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894
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):

1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910
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):

1911 1912 1913 1914 1915 1916 1917
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:

1918 1919 1920 1921 1922
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

ggaren@apple.com's avatar
ggaren@apple.com committed
1923
        Reviewed by Oliver Hunt.
1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944

        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.

1945 1946 1947 1948 1949 1950 1951 1952
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.

1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972
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):

1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985
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):

1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998
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):

1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016
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:

2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044
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):

2045 2046 2047 2048 2049 2050 2051 2052 2053