ChangeLog-2007-10-14 956 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 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 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 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 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 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 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 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 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 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 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 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 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 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 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758
=== Start merge of feature-branch 2007-10-12 ===

2007-10-11  Andrew Wellington  <proton@wiretapped.net>

        Reviewed by Eric Seidel.
        
        Fix for http://bugs.webkit.org/show_bug.cgi?id=15076
        "deg2rad has multiple definitions"
        
        Define deg2rad, rad2deg, deg2grad, grad2deg, rad2grad, grad2rad
        These are used through WebKit.
        
        Change based on original patch by Rob Buis.

        * wtf/MathExtras.h:
        (deg2rad):
        (rad2deg):
        (deg2grad):
        (grad2deg):
        (rad2grad):
        (grad2rad):

2007-10-10  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Eric.
        
        - fix assertion failures on quit.

        * kjs/array_object.cpp:
        (ArrayProtoFunc::callAsFunction): Dynamically alocate function-scope static
        UStrings to avoid the static destructor getting called later.
        * kjs/lookup.h: Dynamically alocate function-scope static
        Identifiers to avoid the static destructor getting called later.

2007-10-07  Ed Schouten  <ed@fxq.nl>

        Reviewed and landed by Alexey Proskuryakov.

        Add PLATFORM(FREEBSD), so we can fix the build on FreeBSD-like
        systems by including <pthread_np.h>. Also fix some (disabled)
        regcomp()/regexec() code; it seems some variable names have
        changed.

        * kjs/config.h:
        * kjs/regexp.cpp:
        (KJS::RegExp::RegExp):
        * wtf/Platform.h:

2007-10-02  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=10370
        RegExp fails to match non-ASCII characters against [\S\s]

        Test: fast/js/regexp-negative-special-characters.html

        * pcre/pcre_compile.c:
        (compile_branch): Adjust opcode and bitmap as necessary to include (or exclude)
        character codes >255. Fix suggested by Philip Hazel.

        * pcre/pcre_exec.c:
        (match): Merged fix for PCRE bug 580 (\S\S vs. \S{2}).

        * tests/mozilla/expected.html: One test was fixed.
        * pcre/MERGING: Added information about this fix.

2007-10-02  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver.
        
        - skip extra hash lookup and avoid converting char* to UString for 19% speedup on CK JS array test 
        http://bugs.webkit.org/show_bug.cgi?id=15350

        * kjs/array_object.cpp:
        (ArrayProtoFunc::callAsFunction): Implement the two mentioned optimizations.

2007-10-02  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Mark.
        
        - Efficiently handle regexp property identifiers for 19% speedup on Celtic Kane regexp test
        http://bugs.webkit.org/show_bug.cgi?id=15337

        * kjs/CommonIdentifiers.h:
        * kjs/regexp_object.cpp:
        (RegExpProtoFunc::callAsFunction):
        (RegExpObjectImp::arrayOfMatches):
        (RegExpObjectImp::construct):

2007-10-02  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Mark.
        
        - Cache global prorotypes more efficiently for 10% speedup on CK AJAX benchmark
        http://bugs.webkit.org/show_bug.cgi?id=15335

        * kjs/lookup.h:

2007-10-01  Oliver Hunt  <oliver@apple.com>

        Reviewed by Mark.

        Enable Experimental SVG features by default when building from Xcode

        * Configurations/JavaScriptCore.xcconfig:

2007-09-29  Rob Buis  <buis@kde.org>

        Reviewed by Adam.

        http://bugs.webkit.org/show_bug.cgi?id=13472
        Misparsing date in javascript leads to year value of -1
        http://bugs.webkit.org/show_bug.cgi?id=14176
        Some date values not handled consistently with IE/Firefox

        Allow an optional comma between month and year, and year and time.

        * kjs/date_object.cpp:
        (KJS::parseDate):

2007-07-11  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Mark.

        Forwardport the hash table fix from CodeGeneratorJS.pm to create_hash_table.
        Reran run-jsc-tests, couldn't find any regressions. Suggested by Darin.

        * kjs/create_hash_table:

2007-06-25  Antti Koivisto  <antti@apple.com>

        Reviewed by Maciej.
        
        Use intHash to hash floats and doubles too.

        * ChangeLog:
        * wtf/HashFunctions.h:
        (WTF::FloatHash::hash):
        (WTF::FloatHash::equal):
        (WTF::):
        * wtf/HashTraits.h:
        (WTF::FloatHashTraits::emptyValue):
        (WTF::FloatHashTraits::deletedValue):
        (WTF::):

=== End merge of feature-branch 2007-10-12 ===

2007-10-11  Mark Rowe  <mrowe@apple.com>

        Reviewed by Tim Hatcher.

        Fix for <rdar://problem/5488678>.  Disable debugging symbols in production builds for 10.4
        PowerPC to prevent a huge STABS section from being generated.

        * Configurations/Base.xcconfig:

2007-10-08  George Staikos  <staikos@kde.org>

        Reviewed by Adam Roben.

        Fix Qt build on Win32.

        * kjs/testkjs.cpp:
        (main):

2007-10-10  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Lars.

        Fix compilation using gcc 4.3. Header files have been reorganized and as a result some extra
        includes are needed for INT_MAX, std::auto_ptr and the like.

        * kjs/collector.cpp:
        * kjs/collector.h:
        * kjs/lexer.cpp:
        * kjs/scope_chain.cpp:
        * kjs/ustring.cpp:
        * wtf/Vector.h:

2007-10-09  Lars Knoll  <lars@trolltech.com>

        Reviewed by Simon.

        fix the invokation of slots with return types. Add a JSLock around the conversion from QVariant to JSValue.

        * bindings/qt/qt_instance.cpp:
        (KJS::Bindings::QtInstance::invokeMethod):
        * bindings/qt/qt_runtime.cpp:
        (KJS::Bindings::convertValueToQVariant):
        (KJS::Bindings::convertQVariantToValue):

2007-10-05  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.
        
        Added JSObject::removeDirect, to support the fix for 
        <rdar://problem/5522487> REGRESSION: With JavaScript disabled, any 
        page load causes a crash in PropertyMap::put

        * kjs/object.cpp:
        (KJS::JSObject::removeDirect):
        * kjs/object.h:

2007-10-04  Mark Rowe  <mrowe@apple.com>

        Reviewed by Oliver.

        Switch to default level of debugging symbols to resolve <rdar://problem/5488678>.
        The "full" level appears to offer no observable benefits even though the documentation
        suggests it be used for dead code stripping.  This should also decrease link times.

        * Configurations/Base.xcconfig:

2007-10-03  Lars Knoll  <lars@trolltech.com>

        Reviewed by Rob.

        Fix a stupid bug in Unicode::toUpper/toLower.
        Fixes all three test failures in the JavaScriptCore test
        suite.

        * wtf/unicode/qt4/UnicodeQt4.h:
        (WTF::Unicode::toLower):
        (WTF::Unicode::toUpper):

2007-10-02  Darin Adler  <darin@apple.com>

        Reviewed by Adam.

        - add support for GDI objects to OwnPtr; I plan to use this
          to fix some GDI handle leaks

        * kjs/grammar.y: Change parser to avoid macros that conflict
        with macros defined in Windows system headers: THIS, DELETE,
        VOID, IN, and CONST. This is needed because OwnPtr.h will now
        include <windows.h>.
        * kjs/keywords.table: Ditto.

        * wtf/OwnPtr.h: For PLATFORM(WIN), add support so that OwnPtr can be
        a GDI handle, and it will call DeleteObject. Also change to use the
        RemovePointer technique used by RetainPtr, so you can say OwnPtr<HBITMAP>
        rather than having to pass in the type pointed to by HBITMAP.

        * wtf/OwnPtrWin.cpp: Added.
        (WebCore::deleteOwnedPtr): Put this in a separate file so that we
        don't have to include <windows.h> in OwnPtr.h.

        * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added OwnPtrWin.cpp.

2007-09-29  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Mark.

        -Fix http://bugs.webkit.org/show_bug.cgi?id=13226.
        Remove Bakefiles from svn.

        * JavaScriptCoreSources.bkl: Removed.
        * jscore.bkl: Removed.

2007-09-27  Kevin Decker  <kdecker@apple.com>

        Rubber stamped by John Sullivan.

        <rdar://problem/5493093>
        
        * JavaScriptCore.order: Added.
        * JavaScriptCore.xcodeproj/project.pbxproj: We're changing from using an order file built by
         another team to using one we actually check into our project repository. Linker settings for
         Symbol Ordering Flags have been updated accordingly.

2007-09-26  Adam Roben  <aroben@apple.com>

        Make testkjs delay-load WebKit.dll so WebKitInitializer can work its magic

        Rubberstamped by Anders.

        * JavaScriptCore.vcproj/testkjs/testkjs.vcproj:

2007-09-25  Adam Roben  <aroben@apple.com>

        Make testkjs delay-load its dependencies

        This lets WebKitInitializer re-route the dependencies to be loaded out
        of the Safari installation directory.

        Rubberstamped by Sam.

        * JavaScriptCore.vcproj/testkjs/testkjs.vcproj:

2007-09-25  David Kilzer  <ddkilzer@webkit.org>

        Reviewed by Adam.

        - Fix http://bugs.webkit.org/show_bug.cgi?id=14885
          LGPL'ed files contain incorrect FSF address

        * COPYING.LIB:
        * bindings/testbindings.cpp:
        * kjs/AllInOneFile.cpp:
        * kjs/DateMath.cpp:
        * kjs/PropertyNameArray.cpp:
        * kjs/PropertyNameArray.h:
        * kjs/config.h:

2007-09-25  Sam Weinig  <sam@webkit.org>

        Fix location for build products for Debug_Internal.

        Reviewed by Adam Roben.

        * JavaScriptCore.vcproj/testkjs/testkjs.vcproj:

2007-09-25  Adam Roben  <aroben@apple.com>

        Make testkjs use WebKitInitializer

        Reviewed by Sam.

        * JavaScriptCore.vcproj/JavaScriptCore.sln: Add WebKitInitializer and
        make testkjs depend on it.
        * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: Link against
        WebKitInitializer.lib.
        * kjs/testkjs.cpp:
        (main): Call initializeWebKit.

2007-09-24  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Sam.

        - Continued to update project files to not use Edit and Continue for Debug Information since it doesn't work and breaks some functionality.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.vcproj/WTF/WTF.vcproj:

2007-09-21  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Sam.

        - Updated project files to not use Edit and Continue for Debug Information since it doesn't work and breaks some functionality.

        * JavaScriptCore.vcproj/dftables/dftables.vcproj:
        * JavaScriptCore.vcproj/testkjs/testkjs.vcproj:

2007-09-20  Holger Hans Peter Freyther  <zecke@selfish.org>

        Rubber stamped by Adam.

        Renamed files from *Gdk to *Gtk (see #14732) using the
        work of Juan A. Suarez Romero as a base.

        GDK -> GTK 

        * JavaScriptCore.pri:
        * kjs/testkjs.pro:
        * pcre/dftables.pro:
        * wtf/Platform.h: PLATFORM(GDK) to PLATFORM(GTK)

2007-09-21  Mark Rowe  <mrowe@apple.com>

        Reviewed by Antti Koivisto.

        http://bugs.webkit.org/show_bug.cgi?id=15250
        <rdar://problem/5496942> REGRESSION: Reproducible crash in Safari when evaluating script in Drosera console (15250)

        * kjs/function.cpp:
        (KJS::GlobalFuncImp::callAsFunction): Null-check thisObj before passing it to interpreterForGlobalObject.

2007-09-19  Holger Hans Peter Freyther  <zecke@selfish.org>

        Rubber stamped by Adam.

        Make the guard/#if use the same name (ENABLE_FTPDIR) as the #define. This follows
        the ENABLE_ICONDATABASE example from a couple of lines above.

        * wtf/Platform.h:

2007-09-19  Mark Rowe  <mrowe@apple.com>

        Reviewed by Maciej.

        <rdar://problem/5487107> NULL dereference crash in FastMallocZone::enumerate when running leaks against Safari

        Storing remote pointers to their local equivalents in mapped memory was leading to the local pointer being
        interpreted as a remote pointer.  This caused a crash when using the result of mapping this invalid remote pointer.
        The fix is to follow the pattern used elsewhere in FastMallocZone by always doing the mapping after reading and
        never storing the mapped pointer.

        * wtf/FastMalloc.cpp:
        (WTF::FastMallocZone::enumerate):

2007-09-15  Darin Adler  <darin@apple.com>

        - fix Mac build

        * JavaScriptCore.exp: Export WTFLogVerbose.

2007-09-14  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Sam.

        - Copy JSRetainPtr to include folder.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:

2007-09-13  Geoffrey Garen  <ggaren@apple.com>

        Try to fix GDK build.

        * wtf/MathExtras.h:
        (wtf_random_init):

2007-09-12  Geoff Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.
        
        Fixed <rdar://problem/5429064> 141885 Safari JavaScript: Math.random() slightly less randomly distributed than on Safari / Mac

        Math.random was skewed slightly upward because it assumed that RAND_MAX was outside the range of
        values that rand() might return. This problem was particularly pronounced on Windows because
        the range of values returned by rand() on Windows is 2^16 smaller than the range of values
        return by rand() on Mac.
        
        Fixed by accounting for RAND_MAX return values. Also, switched Windows over to rand_s, which has
        a range that's equal to rand()'s range on Mac.
        
        * kjs/config.h:

        * kjs/math_object.cpp:
        (MathFuncImp::callAsFunction): Use the new new thing.

        * wtf/MathExtras.h: Platform abstraction for random numbers, to cover over differences on Windows.
        (wtf_random_init):
        (wtf_random):

2007-09-13  Antti Koivisto  <antti@apple.com>

        Reviewed by Maciej.
        
        Small addition to previous path to cover
        http://bugs.webkit.org/show_bug.cgi?id=11399
        window.eval runs in the global scope of the calling window
        
        Switch variable scope as well.

        * kjs/function.cpp:
        (KJS::GlobalFuncImp::callAsFunction):

2007-09-12  Antti Koivisto  <antti@apple.com>

        Reviewed by Geoff, Maciej.
        
        Fix <rdar://problem/5445058>
        REGRESSION: Unable to upload picture to eBay auction due to domain security check
        
        eBay uses window.eval() between windows. In Firefox window.eval() switches execution
        and security context to the target window, something WebKit did not do. With WebKit
        security tightening in r24781, this broke picture uploads.
        
        Fix by making WebKit switch context in window.eval().
        
        * kjs/Context.cpp:
        (KJS::Context::Context):
        (KJS::Context::~Context):
        * kjs/context.h:
        Save and restore interpreter context independently from calling context.
        
        * kjs/function.cpp:
        (KJS::GlobalFuncImp::callAsFunction):
        If eval is called for global object different than current one, switch execution context
        to that object and push it to scope.

2007-09-12  Sam Weinig  <sam@webkit.org>

        Reviewed by Geoffrey Garen.

        <rdar://problem/5478717> JSStringCreateWithCFString leaks when passed a zero length CFStringRef

        * API/JSStringRefCF.cpp:
        (JSStringCreateWithCFString): Special case the zero length string and remove the
        UTF16 optimized path since it will always leak due to the fact that we won't be 
        able to free the backing store that the CFStringRef provides.

2007-09-10  Timothy Hatcher  <timothy@apple.com>

        Reviewed by Darin Adler.

        <rdar://problem/5456224> CrashTracer: [USER] 2 crashes in Toast Titanium at com.apple.CoreServices.CarbonCore: CSMemDisposePtr + 37

        Removed the implementation of these malloc zone functions. We do not have the ability to 
        check if a pointer is valid or not, so we can't correctly implement them. The system free 
        does not fail if you pass in a bad pointer.

        * wtf/FastMalloc.cpp:
        (WTF::FastMallocZone::size):
        (WTF::FastMallocZone::zoneMalloc):
        (WTF::FastMallocZone::zoneCalloc):
        (WTF::FastMallocZone::zoneFree):
        (WTF::FastMallocZone::zoneRealloc):

2007-09-07  Darin Adler  <darin@apple.com>

        Reviewed by Steve Falkenburg.

        - fix crash seen on Windows release builds

        * wtf/FastMalloc.cpp: Change pthread_getspecific optimization to be done only
        on the DARWIN platform. Also correct a couple reinterpret_cast that should be
        static_cast instead.

2007-09-06  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Maciej.

        - Moved JSRetainPtr to the API.

        * API/JSRetainPtr.h: Copied from kjs/JSRetainPtr.h.
        (JSRetain):
        (JSRelease):
        (JSRetainPtr::JSRetainPtr):
        (JSRetainPtr::~JSRetainPtr):
        (JSRetainPtr::get):
        (JSRetainPtr::releaseRef):
        (JSRetainPtr::operator->):
        (JSRetainPtr::operator!):
        (JSRetainPtr::operator UnspecifiedBoolType):
        (::operator):
        (::adopt):
        (::swap):
        (swap):
        (operator==):
        (operator!=):
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * kjs/JSRetainPtr.h: Removed.

2007-09-05  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.
        
        - Remove single-threaded optimization for FastMalloc. 
        
        It does not appear to help anywhere but Mac OS X on PPC, due to
        pthread_getspecific being slow there. On Intel, removing the
        optimization results in a ~1.5% PLT speedup, a ~1-5% JS iBench
        speedup, and a ~1.5% HTML iBench speedup. On PPC this change is a
        speedup on some benchmarks, a slight hit on others.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * kjs/collector.cpp:
        (KJS::Collector::registerThread):
        * wtf/FastMalloc.cpp:
        (WTF::TCMalloc_ThreadCache::GetCache):
        (WTF::TCMalloc_ThreadCache::GetCacheIfPresent):
        (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
        (WTF::do_malloc):
        * wtf/FastMallocInternal.h: Removed.

2007-09-05  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Adam, Sam, Darin.

        - Created a JSRetainPtr specifically for JSStringRefs so they can be automatically refed and derefed.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * kjs/JSRetainPtr.h: Copied from wtf/RetainPtr.h.
        (KJS::JSRetain):
        (KJS::JSRelease):
        (KJS::):
        (KJS::JSRetainPtr::JSRetainPtr):
        (KJS::JSRetainPtr::~JSRetainPtr):
        (KJS::JSRetainPtr::get):
        (KJS::JSRetainPtr::releaseRef):
        (KJS::JSRetainPtr::operator->):
        (KJS::JSRetainPtr::operator UnspecifiedBoolType):
        (KJS::::operator):
        (KJS::::adopt):
        (KJS::::swap):
        (KJS::swap):
        (KJS::operator==):
        (KJS::operator!=):

2007-09-05  Mark Rowe  <mrowe@apple.com>

        Unreviewed Qt build fix.

        * wtf/unicode/qt4/UnicodeQt4.h: Fix the constness of the src argument to toUpper to prevent build failures.

2007-09-04  Maciej Stachowiak  <mjs@apple.com>

        Back out accidentally committed change.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * kjs/collector.cpp:
        (KJS::Collector::registerThread):
        * wtf/FastMalloc.cpp:
        (WTF::fastMallocSetIsMultiThreaded):
        (WTF::TCMalloc_ThreadCache::GetCache):
        (WTF::TCMalloc_ThreadCache::GetCacheIfPresent):
        (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
        (WTF::do_malloc):
        * wtf/FastMallocInternal.h: Added.

2007-09-04  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.
        
        - Added Vector::appendRange(), which appends to a vector based on a given start and end iterator
        - Added keys() and values() functions to HashMap iterators, which give keys-only and values-only iterators
        
        Together, these allow easy copying of a set, or the keys or values of a map, into a Vector. Examples:
        
        HashMap<int, int> map;
        HashSet<int> set;
        Vector<int> vec;
        // ...
        vec.appendRange(set.begin(), set.end());
        vec.appendRange(map.begin().keys(), map.end().keys());
        vec.appendRange(map.begin().values(), map.end().values());

        This also allows for a slightly nicer syntax when iterating a map. Instead of saying 
        (*it)->first, you can say *it.values(). Similarly for keys. Example:
        
        HashMap<int, int>::const_iterator end = map.end();
        for (HashMap<int, int>::const_iterator it = map.begin(); it != end; ++it)
        printf(" [%d => %d]", *it.keys(), *it.values());

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * wtf/HashIterators.h: Added.
        (WTF::):
        (WTF::HashTableConstKeysIterator::HashTableConstKeysIterator):
        (WTF::HashTableConstKeysIterator::get):
        (WTF::HashTableConstKeysIterator::operator*):
        (WTF::HashTableConstKeysIterator::operator->):
        (WTF::HashTableConstKeysIterator::operator++):
        (WTF::HashTableConstValuesIterator::HashTableConstValuesIterator):
        (WTF::HashTableConstValuesIterator::get):
        (WTF::HashTableConstValuesIterator::operator*):
        (WTF::HashTableConstValuesIterator::operator->):
        (WTF::HashTableConstValuesIterator::operator++):
        (WTF::HashTableKeysIterator::HashTableKeysIterator):
        (WTF::HashTableKeysIterator::get):
        (WTF::HashTableKeysIterator::operator*):
        (WTF::HashTableKeysIterator::operator->):
        (WTF::HashTableKeysIterator::operator++):
        (WTF::HashTableKeysIterator::operator HashTableConstKeysIterator<HashTableType, KeyType, MappedType>):
        (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/HashTable.h:
        * wtf/Vector.h:
        (WTF::::appendRange):

2007-09-04  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.
        
        - Remove single-threaded optimization for FastMalloc. 
        
        It does not appear to help anywhere but Mac OS X on PPC, due to
        pthread_getspecific being slow there. On Intel, removing the
        optimization results in a 1% PLT speedup, a 2% JS iBench speedup,
        and no measurable effect on HTML iBench (maybe a slight speedup).

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * kjs/collector.cpp:
        (KJS::Collector::registerThread):
        * wtf/FastMalloc.cpp:
        (WTF::TCMalloc_ThreadCache::GetCache):
        (WTF::TCMalloc_ThreadCache::GetCacheIfPresent):
        (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
        (WTF::do_malloc):
        * wtf/FastMallocInternal.h: Removed.

2007-09-03  Mark Rowe  <mrowe@apple.com>

        Reviewed by Tim Hatcher.

        <rdar://problem/5452164> Production build with in symbols directory has no debug info

        Enable debug symbol generation on all build configurations.  Production builds are stripped
        of symbols by Xcode during deployment post-processing.

        * Configurations/Base.xcconfig:
        * JavaScriptCore.xcodeproj/project.pbxproj:

2007-08-30  Riku Voipio  <riku.voipio@iki.fi>

        Reviewed by Dave Kilzer.

        Better ARM defines.

        * kjs/ustring.h: Update comments to reflect the change and update test
        to fit changes to Platform.h.
        * wtf/Platform.h: Forced packing is only needed on oldabi ARM.
        Set middle-endian floats only for little-endian oldabi ARM.
        Set big-endian define for big-endian ARM.

2007-08-29  Ryan Leavengood <leavengood@gmail.com>

        Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=15043
        - posix_memalign takes a void** as its first parameter. My port makes use of this function call.

        * kjs/collector.cpp:
        (KJS::allocateBlock):

2007-08-26  Darin Adler  <darin@apple.com>

        - quick follow on to that last check-in

        * API/JSCallbackObject.cpp: (KJS::JSCallbackObject::JSCallbackObject):
        Need to initialize m_class to 0.

2007-08-26  Mark Rowe  <mrowe@apple.com>

        Reviewed by Darin Adler.

        <rdar://problem/4949002> JSGlobalContextCreate can cause crashes because it passes a NULL JSContextRef to the globalObjectClass's initialize callback

        JSCallbackObject now tracks whether it was constructed with a null ExecState.  This will happen when the object is being used as the global object,
        as the Interpreter needs to be created after the global object.  In this situation the initialization is deferred until after the Interpreter's
        ExecState is available to be passed down to the initialize callbacks.

        * API/JSCallbackObject.cpp:
        (KJS::JSCallbackObject::init): Track whether we successfully initialized.
        (KJS::JSCallbackObject::initializeIfNeeded): Attempt to initialize with the new ExecState.
        * API/JSCallbackObject.h:
        * API/JSContextRef.cpp:
        (JSGlobalContextCreate): Initialize the JSCallbackObject with the Interpreter's ExecState.
        * API/testapi.c:
        (testInitializeOfGlobalObjectClassHasNonNullContext):
        (main): Verify that the context passed to the initialize callback is non-null.

2007-08-26  Mark Rowe  <mrowe@apple.com>

        Reviewed by Darin Adler.

        <rdar://problem/5438496> JSGlobalContextCreate crashes when passed a custom class

        * API/JSContextRef.cpp:
        (JSGlobalContextCreate): Specify jsNull() as the prototype and let Interpreter's constructor fix it up to point at builtinObjectPrototype().
        * API/testapi.c:
        (main): Use an instance of a custom class as the global object to ensure the code path is exercised in the test.

2007-08-26  Mike Hommey  <glandium@debian.org>

        Reviewed by Mark Rowe and David Kilzer.

        Fix build failure on arm.

        * wtf/Platform.h: Also test if __arm__ is defined.

pkasting@chromium.org's avatar
pkasting@chromium.org committed
759
2007-08-25  Peter Kasting <pkasting@google.com>
760 761 762 763 764 765 766 767 768

        Reviewed by Maciej Stachowiak.

        Part 3 of http://bugs.webkit.org/show_bug.cgi?id=14967
        Bug 14967: Reduce wtf::Vector::operator[]() overloads

        * wtf/Vector.h:
        (WTF::Vector::operator[]): Only provide versions of operator[] that takes a size_t argument.

pkasting@chromium.org's avatar
pkasting@chromium.org committed
769
2007-08-25  Peter Kasting <pkasting@google.com>
770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788

        Reviewed by Sam Weinig.

        Part 2 of http://bugs.webkit.org/show_bug.cgi?id=14967.
        Eliminate all remaining implicit conversions of wtf::Vector<T> to T*.  Where code was
        previously checking that the Vector's data pointer was non-NULL, check !Vector::isEmpty()
        instead.

        * wtf/Vector.h:
        (WTF::Vector::data):

2007-08-16  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Geoff and Adam.

        - Changing stack depth to 500 (from 100 on mac and win) to help out some apps specifically gmail.  <rdar://problem/3590522> JavaScript call stack limit of 99 is too small for some applications; needs to be closer to 500 (4045)

        * kjs/object.cpp:

pkasting@chromium.org's avatar
pkasting@chromium.org committed
789
2007-08-15  Peter Kasting  <pkasting@google.com>
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 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 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 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 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 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 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 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 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 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 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 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 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 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 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 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222

        Reviewed by Darin.
        
        http://bugs.webkit.org/show_bug.cgi?id=14967 part 1 - Eliminate most implicit
        conversions of wtf::Vector<T> to T* by explicitly calling .data()

        * API/JSCallbackConstructor.cpp:
        (KJS::JSCallbackConstructor::construct):
        * API/JSCallbackFunction.cpp:
        (KJS::JSCallbackFunction::callAsFunction):
        * API/JSCallbackObject.cpp:
        (KJS::JSCallbackObject::construct):
        (KJS::JSCallbackObject::callAsFunction):
        * bindings/c/c_instance.cpp:
        (KJS::Bindings::CInstance::invokeMethod):
        (KJS::Bindings::CInstance::invokeDefaultMethod):
        * kjs/number_object.cpp:
        (integer_part_noexp):
        (char_sequence):
        * kjs/ustring.cpp:
        (KJS::UString::UTF8String):

2007-08-14  Darin Adler  <darin@apple.com>

        Reviewed by Sam.

        - fix <rdar://problem/5410570> Global initializer introduced by use of std::numeric_limits in r24919

        * kjs/ustring.cpp:
        (KJS::overflowIndicator): Turned into a function.
        (KJS::maxUChars): Ditto.
        (KJS::allocChars): Use the functions.
        (KJS::reallocChars): Ditto.
        (KJS::UString::expandedSize): Ditto.

2007-08-12  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14931
          <rdar://problem/5403816> JavaScript regular expression non-participating capturing parentheses
          fail in 3 different ways

        Test: fast/js/regexp-non-capturing-groups.html

        * kjs/string_object.cpp:
        (KJS::replace): Add missing code to handle undefined backreferences; before we'd get the empty string
        instead of a JavaScript "undefined" value.
        (KJS::StringProtoFunc::callAsFunction): Implemented backreference support for split.
        * pcre/pcre_exec.c: (match): Made backreferences to undefined groups match the empty string instead
        of always failing. Only in JAVASCRIPT mode.

        * tests/mozilla/expected.html: Add a new expected test success, since this fixed one test result.

2007-08-10  Timothy Hatcher  <timothy@apple.com>

        Reviewed by Adam.

        <rdar://problem/5394449> Stop using some Carbon UI APIs for 64 bit

        Disable the NPAPI for 64-bit on Mac OS X.

        * Configurations/JavaScriptCore.xcconfig: Use the 64-bit export file.
        * JavaScriptCore.xcodeproj/project.pbxproj: Create a 64-bit export file
        that filters out the NPN fnctions.
        * bindings/NP_jsobject.cpp: #ifdef out this for 64-bit on Mac OS X
        * bindings/NP_jsobject.h: Ditto.
        * bindings/c/c_class.cpp: Ditto.
        * bindings/c/c_class.h: Ditto.
        * bindings/c/c_instance.cpp: Ditto.
        * bindings/c/c_instance.h: Ditto.
        * bindings/c/c_runtime.cpp: Ditto.
        * bindings/c/c_runtime.h: Ditto.
        * bindings/c/c_utility.cpp: Ditto.
        * bindings/c/c_utility.h: Ditto.
        * bindings/npapi.h: Ditto.
        * bindings/npruntime.cpp: Ditto.
        * bindings/npruntime.h: Ditto.
        * bindings/npruntime_impl.h: Ditto.
        * bindings/npruntime_priv.h: Ditto.
        * bindings/runtime.cpp:
        (KJS::Bindings::Instance::createBindingForLanguageInstance):
         don't creat an NPObject on Mac OS X in 64-bit.

2007-08-09  Mark Rowe  <mrowe@apple.com>

        Reviewed by Antti.

        <rdar://problem/5400709> Versioning in debug and release builds should include minor and tiny version before +

        * Configurations/Version.xcconfig:
        * JavaScriptCore.xcodeproj/project.pbxproj: Add a shell script phase to make to dependency between
        Version.xcconfig and Info.plist explicit to Xcode.

2007-08-08  George Staikos  <staikos@kde.org>

        Make it compile with Qt again.

        * wtf/unicode/qt4/UnicodeQt4.h:
        (WTF::Unicode::toUpper):

2007-08-07  Sam Weinig  <sam@webkit.org>

        Reviewed by Oliver.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=14897
        Decompilation of double negation fails and produces invalid or incorrect code

        Test: fast/js/function-decompilation-operators.html

        * kjs/nodes2string.cpp:
        (UnaryPlusNode::streamTo): Put space after unary operator.  Matches Firefox.
        (NegateNode::streamTo): Diito.
        (MultNode::streamTo): Put spaces around binary operator.  Matches Firefox.
        (AddNode::streamTo): Ditto.

2007-08-07  Darin Adler  <darin@apple.com>

        Reviewed by Adele.

        - fix <rdar://problem/5383104> REGRESSION: XHR.responseText is null instead of empty string
          in http/tests/xmlhttprequest/zero-length-response.html

        The new code to handle out of memory conditions was turning a "" into a null string.

        * kjs/ustring.h: Removed UCharReference, which has long been obsolete and unused.
        Removed copyForWriting, which was only used for the upper/lowercasing code and for
        UCharReference.
        * kjs/ustring.cpp:
        (KJS::allocChars): Removed special case that made this fail (return 0) when passed 0.
        Instead assert that we're not passed 0. Also added an overflow check for two reasons:
        1) for sizes that aren't checked this prevents us from allocating a buffer that's too
        small, and 2) for sizes where we overflowed in the expandedSize function and returned
        overflowIndicator, it guarantees we fail.
        (KJS::reallocChars): Ditto.
        (KJS::UString::expandedSize): Return a large number, overflowIndicator, rather than 0
        for cases where we overflow.
        (KJS::UString::spliceSubstringsWithSeparators): Added a special case for empty string so
        we don't call allocChars with a length of 0.
        (KJS::UString::operator=): Added special characters for both 0 and empty string so we
        match the behavior of the constructor. This avoids calling allocChars with a length of 0
        and making a null string rather than an empty string in that case, and also matches the
        pattern used in the rest of the functions.
        (KJS::UString::operator[]): Made the return value const so code that tries to use the
        operator to modify the string will fail.

        * kjs/string_object.cpp: (KJS::StringProtoFunc::callAsFunction): Rewrote uppercasing and
        lowercasing functions so they don't need copyForWriting any more -- it wasn't really doing
        any good for optimization purposes. Instead use a Vector and releaseBuffer.

        * wtf/unicode/icu/UnicodeIcu.h: Eliminate one of the versions of toLower/toUpper -- we now
        only need the version where both a source and destination buffer is passed in, not the one
        that works in place.
        * wtf/unicode/qt4/UnicodeQt4.h: Ditto.

2007-08-06  Sam Weinig  <sam@webkit.org>

        Reviewed by Oliver.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=14891
        Decompilation of try block immediately following "else" fails

        Test: fast/js/toString-try-else.html

        * kjs/nodes2string.cpp:
        (TryNode::streamTo): Add newline before "try".

2007-08-07  Mark Rowe  <mrowe@apple.com>

        Reviewed by Maciej.

        <rdar://problem/5388774> REGRESSION: Hang occurs after clicking "Attach a file " link in a new .Mac message

        Attempting to acquire the JSLock inside CollectorHeap::forceLock can lead to a deadlock if the thread currently
        holding the lock is waiting on the thread that is forking.  It is not considered safe to use system frameworks
        after a fork without first execing[*] so it is not particularly important to ensure that the collector and
        fastMalloc allocators are unlocked in the child process.  If the child process wishes to use JavaScriptCore it
        should exec after forking like it would to use any other system framework.
        [*]: <http://lists.apple.com/archives/Cocoa-dev/2005/Jan/msg00676.html>

        * kjs/CollectorHeapIntrospector.cpp: Remove forceLock and forceUnlock implementations.
        * kjs/CollectorHeapIntrospector.h: Stub out forceLock and forceUnlock methods.
        * wtf/FastMalloc.cpp: Ditto.

2007-08-06  Darin Adler  <darin@apple.com>

        Rubber stamped by Geoff.

        * kjs/ustring.h: Added an assertion which would have helped us find the
        previous bug more easily.

2007-08-06  Darin Adler  <darin@apple.com>

        Reviewed by Anders.

        - fix <rdar://problem/5387589> 9A514: Quartz Composer crash on launch in KJS::jsString

        * API/JSBase.cpp:
        (JSEvaluateScript): Turn NULL for sourceURL into UString::null(), just as JSObjectMakeFunction already does.
        (JSCheckScriptSyntax): Ditto.

2007-08-06  Matt Lilek  <pewtermoose@gmail.com>

        Not reviewed, build fix.

        * kjs/string_object.cpp:
        (KJS::StringProtoFunc::callAsFunction):

2007-08-04  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fix <rdar://problem/5371862> crash in Dashcode due to Quartz Composer JavaScript garbage collector reentrancy

        * API/JSBase.cpp: (JSGarbageCollect): Don't call collector() if isBusy() returns true.

        * kjs/collector.h: Added isBusy(), removed the unused return value from collect()
        * kjs/collector.cpp: Added an "operation in progress" flag to the allocator.
        (KJS::Collector::allocate): Call abort() if an operation is already in progress. Set the new flag instead
        of using the debug-only GCLock.
        (KJS::Collector::collect): Ditto.
        (KJS::Collector::isBusy): Added.

2007-08-04  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin and Adam.
        
        <rdar://problem/5368990> REGRESSION: newsgator.com sign-on 6x slower than Safari 3 beta due to GC changes (14808)

        * kjs/string_object.cpp:
        (KJS::replace): if the string didn't change (very common in some cases) reuse the original string value.
        (KJS::StringProtoFunc::callAsFunction): Pass in the StringImp* when replacing, not just the UString.
        * kjs/string_object.h:
        (KJS::StringInstance::internalValue): covariant override to return StringImp for convenience

2007-08-04  Mark Rowe  <mrowe@apple.com>

        Reviewed by Oliver Hunt.

        <rdar://problem/5385145> r24843 introduces a crash on calling fork() (14878)
        http://bugs.webkit.org/show_bug.cgi?id=14878

        Provide no-op functions for all members of the malloc_zone_t and malloc_introspection_t structures that we
        register to avoid crashes in system code that assumes they will be non-null.

        * kjs/CollectorHeapIntrospector.cpp:
        (KJS::CollectorHeapIntrospector::CollectorHeapIntrospector):
        (KJS::CollectorHeapIntrospector::forceLock): Grab the lock.
        (KJS::CollectorHeapIntrospector::forceUnlock): Release the lock.
        * kjs/CollectorHeapIntrospector.h:
        (KJS::CollectorHeapIntrospector::goodSize):
        (KJS::CollectorHeapIntrospector::check):
        (KJS::CollectorHeapIntrospector::print):
        (KJS::CollectorHeapIntrospector::log):
        (KJS::CollectorHeapIntrospector::statistics):
        (KJS::CollectorHeapIntrospector::size):
        (KJS::CollectorHeapIntrospector::zoneMalloc):
        (KJS::CollectorHeapIntrospector::zoneCalloc):
        (KJS::CollectorHeapIntrospector::zoneFree):
        * wtf/FastMalloc.cpp:
        (WTF::FastMallocZone::goodSize):
        (WTF::FastMallocZone::check):
        (WTF::FastMallocZone::print):
        (WTF::FastMallocZone::log):
        (WTF::FastMallocZone::forceLock): Grab the TCMalloc locks.
        (WTF::FastMallocZone::forceUnlock): Release the TCMalloc locks.
        (WTF::FastMallocZone::FastMallocZone):

2007-08-04  Mark Rowe  <mrowe@apple.com>

        Rubber-stamped by Anders.

        * pcre/pcre_compile.c: Remove non-ASCII character from a comment.

2007-08-02  Mark Rowe  <mrowe@apple.com>

        Reviewed by Geoff Garen.

        <rdar://problem/4212199> 'leaks' reports false leaks in WebKit (because the WTF allocator uses mmap?)

        Implement malloc zone introspection routines to allow leaks, heap, and friends to request information
        about specific memory regions that were allocated by FastMalloc or the JavaScriptCore collector.

        This requires tool-side support before the regions will be displayed.  The addition of that support is
        tracked by <rdar://problems/5353057&5353060>.

        * JavaScriptCore.exp: Export the two variables that are used by leaks to introspect the allocators.
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * kjs/AllInOneFile.cpp:
        * kjs/CollectorHeapIntrospector.cpp: Added.
        (KJS::):
        (KJS::CollectorHeapIntrospector::init): 
        (KJS::CollectorHeapIntrospector::CollectorHeapIntrospector): Create and register our zone with the system.
        (KJS::CollectorHeapIntrospector::enumerate): Iterate over the CollectorBlocks that are in use and report them to the caller as being used.
        * kjs/CollectorHeapIntrospector.h: Added.
        (KJS::CollectorHeapIntrospector::size): Return zero to indicate the specified pointer does not belong to this zone.
        * kjs/collector.cpp:
        (KJS::Collector::registerThread): Register the CollectorHeapIntrospector with the system when the first thread is registered with the collector.
        * wtf/FastMalloc.cpp:
        (WTF::TCMalloc_PageHeap::GetDescriptorEnsureSafe):
        (WTF::TCMalloc_ThreadCache_FreeList::enumerateFreeObjects): Enumerate the objects on the free list.
        (WTF::TCMalloc_ThreadCache::enumerateFreeObjects): Ditto.
        (WTF::TCMalloc_Central_FreeList::enumerateFreeObjects): Ditto.
        (WTF::TCMalloc_ThreadCache::InitModule): Register the FastMallocZone with the system when initializing TCMalloc.
        (WTF::FreeObjectFinder::FreeObjectFinder):
        (WTF::FreeObjectFinder::visit): Add an object to the free list.
        (WTF::FreeObjectFinder::isFreeObject):
        (WTF::FreeObjectFinder::freeObjectCount):
        (WTF::FreeObjectFinder::findFreeObjects): Find the free objects within a thread cache or free list.
        (WTF::PageMapFreeObjectFinder::PageMapFreeObjectFinder): Find the free objects within a TC_PageMap.
        (WTF::PageMapFreeObjectFinder::visit): Called once per allocated span.  Record whether the span or any subobjects are free.
        (WTF::PageMapMemoryUsageRecorder::PageMapMemoryUsageRecorder):
        (WTF::PageMapMemoryUsageRecorder::visit): Called once per allocated span.  Report the range of memory as being allocated, and the span or
        its subobjects as being used if they do not appear on the free list.
        (WTF::FastMallocZone::enumerate): Map the key remote TCMalloc data structures into our address space.  We then locate all free memory ranges
        before reporting the other ranges as being in use.
        (WTF::FastMallocZone::size): Determine whether the given pointer originates from within our allocation zone.  If so,
        we return its allocation size.
        (WTF::FastMallocZone::zoneMalloc):
        (WTF::FastMallocZone::zoneCalloc):
        (WTF::FastMallocZone::zoneFree):
        (WTF::FastMallocZone::zoneRealloc):
        (WTF::):
        (WTF::FastMallocZone::FastMallocZone): Create and register our zone with the system.
        (WTF::FastMallocZone::init):
        * wtf/MallocZoneSupport.h: Added.
        (WTF::RemoteMemoryReader::RemoteMemoryReader): A helper class to ease the process of mapping memory in a different process into
        our local address space
        (WTF::RemoteMemoryReader::operator()):
        * wtf/TCPageMap.h:
        (TCMalloc_PageMap2::visit): Walk over the heap and visit each allocated span.
        (TCMalloc_PageMap3::visit): Ditto.

2007-08-02  Mark Rowe  <mrowe@apple.com>

        Build fix.

        * kjs/ustring.cpp:
        (KJS::UString::expandedSize):  Use std::numeric_limits<size_t>::max() rather than the non-portable SIZE_T_MAX.

2007-08-02  Mark Rowe  <mrowe@apple.com>

        Reviewed by Maciej.

        <rdar://problem/5352887> "Out of memory" error during repeated JS string concatenation leaks hundreds of MBs of RAM

        A call to fastRealloc was failing which lead to UString::expandCapacity leaking the buffer it was trying to reallocate.
        It also resulted in the underlying UString::rep having both a null baseString and buf field, which meant that attempting
        to access the contents of the string after the failed memory reallocation would crash.

        A third issue is that expandedSize size was calculating the new length in a way that led to an integer overflow occurring.
        Attempting to allocate a string more than 190,000,000 characters long would fail a the integer overflow would lead to a
        memory allocation of around 3.6GB being attempted rather than the expected 390MB.  Sizes that would lead to an overflow
        are now  returned as zero and callers are updated to treat this as though the memory allocation has failed.

        * kjs/array_object.cpp:
        (ArrayProtoFunc::callAsFunction): Check whether the append failed and raise an "Out of memory" exception if it did.
        * kjs/ustring.cpp:
        (KJS::allocChars): Wrapper around fastMalloc that takes a length in characters.  It will return 0 when asked to allocate a zero-length buffer.
        (KJS::reallocChars): Wrapper around fastRealloc that takes a length in characters.  It will return 0 when asked to allocate a zero-length buffer.
        (KJS::UString::expandedSize): Split the size calculation in two and guard against overflow during each step.
        (KJS::UString::expandCapacity): Don't leak r->buf if reallocation fails.  Instead free the memory and use the null representation.
        (KJS::UString::expandPreCapacity): If fastMalloc fails then use the null representation rather than crashing in memcpy.
        (KJS::UString::UString): If calls to expandCapacity, expandPreCapacity or fastMalloc fail then use the null representation rather than crashing in memcpy.
        (KJS::UString::append): Ditto.
        (KJS::UString::operator=): Ditto.
        * kjs/ustring.h: Change return type of expandedSize from int to size_t.

2007-08-01  Darin Adler  <darin@apple.com>

        Reviewed by Kevin McCullough.

        - fix <rdar://problem/5375186> pointers to pieces of class definition passed to JSClassCreate should all be const

        * API/JSObjectRef.h: Added const.

        * API/JSClassRef.cpp:
        (OpaqueJSClass::OpaqueJSClass): Added const.
        (OpaqueJSClass::create): Added const.
        * API/JSObjectRef.cpp:
        (JSClassCreate): Added const.

2007-08-01  Steve Falkenburg  <sfalken@apple.com>

        Build mod: Fix sln to match configs in vcproj.
        
        Reviewed by Adam.

        * JavaScriptCore.vcproj/JavaScriptCore.make:
        * JavaScriptCore.vcproj/JavaScriptCore.sln:

2007-07-30  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars.

        Removed the __BUILDING_QT ifdef in JSStringRef.h and changed UChar for the Qt build to use wchar_t on Windows.

        * API/JSStringRef.h:
        * wtf/unicode/qt4/UnicodeQt4.h:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Always define JSChar to be unsigned short for the Qt builds, to ensure compatibility with UChar.

        * API/JSStringRef.h:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Fix compilation with Qt on Windows with MingW: Implemented currentThreadStackBase() for this platform.

        * kjs/collector.cpp:
        (KJS::currentThreadStackBase):

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Fix compilation with Qt on Windows with MingW: The MingW headers do not provide a prototype for a reentrant version of localtime. But since we don't use multiple threads for the Qt build we can use the plain localtime() function.

        * kjs/DateMath.cpp:
        (KJS::getDSTOffsetSimple):

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Use $(MOVE) instead of mv to eliminated the shell dependency and replaced the long shell line to call bison and modify the css grammar file with a few lines of portable perl code.

        * JavaScriptCore.pri:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Implemented currentTime() in the interpreter by using QDateTime, so that we don't need timeGetTime() on Windows and therefore also don't need to link against Winmm.dll.

        * kjs/interpreter.cpp:
        (KJS::getCurrentTime):
        * kjs/testkjs.cpp:
        (StopWatch::start):
        (StopWatch::stop):

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Replace the use of snprintf with QByteArray to compile under msvc 2005 express.

        * bindings/qt/qt_instance.cpp:
        (KJS::Bindings::QtInstance::stringValue):

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Don't use pthread.h unless thread support is enabled.

        * kjs/collector.cpp:
        (KJS::Collector::registerAsMainThread):
        (KJS::onMainThread):

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Removed TCSystemMalloc from the Qt build, it's not necessary it seems.

        * JavaScriptCore.pri:

2007-07-27  Simon Hausmann  <hausmann@kde.org>

        Done with and reviewed by Lars and Zack.

        Added os-win32 to the include search path for the Qt windows build in order to provide the fake stdint.h header file.

        * JavaScriptCore.pri:

2007-07-25  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Mark.

        - follow-up to previous change
        
        * kjs/ustring.cpp:
        (KJS::UString::operator=): Make sure to reset the length when
        replacing the buffer contents for a single-owned string.

2007-07-25  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.
        
        - JavaScriptCore part of fix for <rdar://problem/5300291> Optimize GC to reclaim big, temporary objects (like XMLHttpRequest.responseXML) quickly
        
        Also, as a side effect of optimizations included in this patch:
        - 7% speedup on JavaScript iBench
        - 4% speedup on "Celtic Kane" JS benchmark
        
        The basic idea is explained in a big comment in collector.cpp. When unusually 
        large objecs are allocated, we push the next GC closer on the assumption that
        most objects are short-lived.
        
        I also did the following two optimizations in the course of tuning
        this not to be a performance regression:

        1) Change UString::Rep to hold a self-pointer as the baseString in
        the unshared case, instead of a null pointer; this removes a
        number of null checks in hot code because many places already
        wanted to use the rep itself or the baseString as appropriate.
        
        2) Avoid creating duplicate StringImpls when creating a
        StringInstance (the object wrapper for a JS string) or calling
        their methods. Since a temporary wrapper object is made every time
        a string method is called, this resulted in two useless extra
        StringImpls being allocated for no reason whenever a String method
        was invoked on a string value. Now we bypass those.
        
        * kjs/collector.cpp:
        (KJS::):
        (KJS::Collector::recordExtraCost): Basics of the extra cost mechanism.
        (KJS::Collector::allocate): ditto
        (KJS::Collector::collect): ditto
        * kjs/collector.h:
        (KJS::Collector::reportExtraMemoryCost): ditto
        * kjs/array_object.cpp:
        (ArrayInstance::ArrayInstance): record extra cost
        * kjs/internal.cpp:
        (KJS::StringImp::toObject): don't create a whole new StringImpl just
        to be the internal value of a StringInstance! StringImpls are immutable
        so there's no point tot his.
        * kjs/internal.h:
        (KJS::StringImp::StringImp): report extra cost
        * kjs/string_object.cpp:
        (KJS::StringInstance::StringInstance): new version that takes a StringImp
        (KJS::StringProtoFunc::callAsFunction): don't create a whole new StringImpl
        just to convert self to string! we already have one in the internal value
        * kjs/string_object.h: report extra cost        
        * kjs/ustring.cpp: All changes to handle baseString being self instead of null in the 
        unshared case.
        (KJS::):
        (KJS::UString::Rep::create):
        (KJS::UString::Rep::destroy):
        (KJS::UString::usedCapacity):
        (KJS::UString::usedPreCapacity):
        (KJS::UString::expandCapacity):
        (KJS::UString::expandPreCapacity):
        (KJS::UString::UString):
        (KJS::UString::append):
        (KJS::UString::operator=):
        (KJS::UString::copyForWriting):
        * kjs/ustring.h:
        (KJS::UString::Rep::baseIsSelf): new method, now that baseString is
        self instead of null in the unshared case we can't just null check.
        (KJS::UString::Rep::data): adjusted as mentioned above
        (KJS::UString::cost): new method to compute the cost for a UString, for
        use by StringImpl.

        * kjs/value.cpp:
        (KJS::jsString): style fixups.
        (KJS::jsOwnedString): new method, use this for strings allocated from UStrings
        held by the parse tree. Tracking their cost as part of string cost is pointless,
        because garbage collecting them will not actually free the relevant string buffer.
        * kjs/value.h: prototyped jsOwnedString.
        * kjs/nodes.cpp:
        (StringNode::evaluate): use jsOwnedString as appropriate
        (RegExpNode::evaluate): ditto
        (PropertyNameNode::evaluate): ditto
        (ForInNode::execute): ditto
        
        * JavaScriptCore.exp: Exported some new symbols.

2007-07-23  Anders Carlsson  <andersca@apple.com>

        Reviewed by Geoff.

        <rdar://problem/5121461> REGRESSION: Unable to load JigZone puzzle
        
        * bindings/jni/jni_jsobject.cpp:
        (JavaJSObject::createNative):
        
        Call RootObject::gcProtect on the global object, thereby putting it in the
        "protect count" set which is used for checking if a native handle is valid.
        
2007-07-23  Darin Adler  <darin@apple.com>

        * pcre/pcre_compile.c: Roll back a tiny accidental change in the unused !JAVASCRIPT
        side of an #ifdef. This has no effect when using PCRE in JAVASCRIPT mode as we do,
        but seems worth rolling back.

2007-07-23  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver.
        
        - fix remaining problems with Window shadowing

        * kjs/nodes.cpp:
        (VarDeclNode::evaluate): Tweak the special case a little.

2007-07-23  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver.
        
        - fix Window shadowing regressions caused by the previous commit.

        * kjs/nodes.cpp:
        (VarDeclNode::evaluate): Handle the case of global scope specially.

2007-07-22  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

        -fixed <rdar://problem/5353293> REGRESSION (r24287): 1% i-Bench JS slowdown from JavaScript compatibility fix (14719)
        http://bugs.webkit.org/show_bug.cgi?id=14719
        
        My fix for this actually resulted in JS iBench being 1% faster than before the regression
        and the Celtic Kane benchmark being 5% faster than before the regression.
        
        * kjs/nodes.cpp:
        (VarDeclNode::handleSlowCase): factored out the slow code path to be out of line.
        (VarDeclNode::evaluate): I did a couple of things:
        (1) Don't check if the variable is already declared by looking for the property in
        the variable object, that code path was dead code.
        (2) Special-case the common case where the top of the scope and the variable object
        are the same; in that case the variable must always be in the variable object.
        (3) Don't return a jsString() of the variable name, nothing uses the return value
        from this node types evaluate method.
        * kjs/nodes.h:

2007-07-22  Darin Adler  <darin@apple.com>

        Reviewed by Kevin Decker.

        - fix <rdar://problem/5126394> REGRESSION: Crash after clicking back button in test application (13250)
          http://bugs.webkit.org/show_bug.cgi?id=13250

        * bindings/objc/objc_utility.mm: (KJS::Bindings::convertObjcValueToValue):
        If the object returns 0 for _imp, convert that to "undefined", since callers
        can't cope with a JSValue of 0.

2007-07-19  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.
        
        Fixed http://bugs.webkit.org/show_bug.cgi?id=10880 | <rdar://problem/5335694>
        REGRESSION: JavaScript menu doesn't appear on pricepoint.com (14595)
        
        Though the ECMA spec says auto-semicolon insertion should not occur
        without a newline or '}', Firefox treats do-while specially, and the
        library used by pricepoint.com requires that special treatment.
        
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * kjs/grammar.y:

2007-07-19  Darin Adler  <darin@apple.com>

        Reviewed by Geoff.

        - fix <rdar://problem/5345440> PCRE computes wrong length for expressions with quantifiers
          on named recursion or subexpressions

        It's challenging to implement proper preflighting for compiling these advanced features.
        But we don't want them in the JavaScript engine anyway.

        Turned off the following features of PCRE (some of these are simply parsed and not implemented):

            \C \E \G \L \N \P \Q \U \X \Z
            \e \l \p \u \z
            [::] [..] [==]
            (?#) (?<=) (?<!) (?>)
            (?C) (?P) (?R)
            (?0) (and 1-9)
            (?imsxUX)

        Added the following:

            \u \v

        Because of \v, the js1_2/regexp/special_characters.js test now passes.

        To be conservative, I left some features that JavaScript doesn't want, such as
        \012 and \x{2013}, in place. We can revisit these later; they're not directly-enough
        related to avoiding the incorrect preflighting.

        I also didn't try to remove unused opcodes and remove code from the execution engine.
        That could save code size and speed things up a bit, but it would require more changes.

        * kjs/regexp.h:
        * kjs/regexp.cpp: (KJS::RegExp::RegExp): Remove the sanitizePattern workaround for
        lack of \u support, since the PCRE code now has \u support.

        * pcre/pcre-config.h: Set JAVASCRIPT to 1.
        * pcre/pcre_internal.h: Added ESC_v.

        * pcre/pcre_compile.c: Added a different escape table for when JAVASCRIPT is set that
        omits all the escapes we don't want interpreted and includes '\v'.
        (check_escape): Put !JAVASCRIPT around the code for '\l', '\L', '\N', '\u', and '\U',
        and added code to handle '\u2013' inside JAVASCRIPT.
        (compile_branch): Put !JAVASCRIPT if around all the code implementing the features we
        don't want.
        (pcre_compile2): Ditto.

        * tests/mozilla/expected.html: Updated since js1_2/regexp/special_characters.js now
        passes.

2007-07-18  Darin Adler  <darin@apple.com>

        Reviewed by Oliver Hunt.

        - fix <rdar://problem/5345432> PCRE computes length wrong for expressions such as "[**]"

        Test: fast/js/regexp-charclass-crash.html

        * pcre/pcre_compile.c: (pcre_compile2): Fix the preflight code that calls
        check_posix_syntax to match the actual regular expression compilation code;
        before it was missing the check of the first character.

2007-07-19  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Mark.

        Define __BUILDING_GDK when building for Gdk to fix building testkjs on OSX.

        * JavaScriptCore.pri:

2007-07-18  Simon Hausmann  <hausmann@kde.org>

        * Fix the Qt build, call dftables from the right directory.

        Reviewed by Adam Treat.

        * pcre/pcre.pri:

2007-07-18  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Zack.

        Don't call gcc directly when building the dftables tool but use a separate .pro file for the Qt build.

        * pcre/dftables.pro: Added.
        * pcre/pcre.pri:

2007-07-17  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Darin, Maciej, and Adam.

        Fixes <http://bugs.webkit.org/show_bug.cgi?id=9697>,
              the failure of ecma/GlobalObject/15.1.2.2-2.js,
              the failure of ecma/LexicalConventions/7.7.3-1.js,
              and most of the failures of tests in ecma/TypeConversion/9.3.1-3.js.

        Bug 9697: parseInt results may be inaccurate for numbers greater than 2^53

        This patch also fixes similar issues in the lexer and UString::toDouble().

        * kjs/function.cpp:
        (KJS::parseIntOverflow):
        (KJS::parseInt):
        * kjs/function.h:
        * kjs/lexer.cpp:
        (KJS::Lexer::lex):
        * kjs/ustring.cpp:
        (KJS::UString::toDouble):
        * tests/mozilla/expected.html:

2007-07-16  Sam Weinig  <sam@webkit.org>

        Reviewed by Oliver.

        Turn off -Wshorten-64-to-32 warning for 64-bit builds.

        * Configurations/Base.xcconfig:

2007-07-14  Brady Eidson  <beidson@apple.com>

        Reviewed by Sam Weinig

        Initial check-in for <rdar://problem/3154486> - Supporting FTP directory listings in the browser

        * wtf/Platform.h: Add ENABLE_FTPDIR feature to handle building on platforms that don't have the
          proper network-layer support

2007-07-14  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Darin.

        Fixes http://bugs.webkit.org/show_bug.cgi?id=13517,
              http://bugs.webkit.org/show_bug.cgi?id=14237, and
              the failure of test js1_5/Scope/regress-185485.js

        Bug 13517: DOM Exception 8 in finance.aol.com sub-page
        Bug 14237: Javascript "var" statement interprets initialization in the topmost function scope

        * kjs/nodes.cpp:
        (VarDeclNode::evaluate):
        * tests/mozilla/expected.html:

2007-07-12  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Mitz.

        http://bugs.webkit.org/show_bug.cgi?id=14596
        Fix JSC compilation with KJS_VERBOSE.

        * kjs/function.cpp:
        (KJS::FunctionImp::passInParameters):

2007-07-11  George Staikos  <staikos@kde.org>

        Make it compile.

        * ForwardingHeaders: Added.
        * ForwardingHeaders/JavaScriptCore: Added.
        * ForwardingHeaders/JavaScriptCore/APICast.h: Added.
        * ForwardingHeaders/JavaScriptCore/JSBase.h: Added.
        * ForwardingHeaders/JavaScriptCore/JSContextRef.h: Added.
        * ForwardingHeaders/JavaScriptCore/JSLock.h: Added.
        * ForwardingHeaders/JavaScriptCore/JSObjectRef.h: Added.
        * ForwardingHeaders/JavaScriptCore/JSStringRef.h: Added.
        * ForwardingHeaders/JavaScriptCore/JSStringRefCF.h: Added.
        * ForwardingHeaders/JavaScriptCore/JSValueRef.h: Added.
        * ForwardingHeaders/JavaScriptCore/JavaScriptCore.h: Added.

2007-07-11  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Darin.

        As of http://bugs.webkit.org/show_bug.cgi?id=14527 move the
        WebCore/ForwardingHeader/JavaScriptCore to JavaScriptCore

        * ForwardingHeaders: Added.
        * ForwardingHeaders/JavaScriptCore: Copied from WebCore/ForwardingHeaders/JavaScriptCore.

2007-07-11  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Mark.

        Forwardport the hash table fix from CodeGeneratorJS.pm to create_hash_table.
        Reran run-jsc-tests, couldn't find any regressions. Suggested by Darin.

        * kjs/create_hash_table:

2007-07-09  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver.
        
        - JavaScriptCore part of fix for: <rdar://problem/5295734> Repro crash closing tab/window @ maps.google.com in WTF::HashSet<KJS::RuntimeObjectImp*, WTF::PtrHash<KJS::RuntimeObjectImp*>, WTF::HashTraits<KJS::RuntimeObjectImp*> >::add + 11
        
        * JavaScriptCore.exp: Added needed export.

2007-07-06  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Antti.

        - <rdar://problem/5311093> JavaScriptCore fails to build with strict-aliasing warnings
        
        * Configurations/Base.xcconfig: Re-enable -Wstrict-aliasing
        * bindings/jni/jni_utility.cpp:
        (KJS::Bindings::getJNIEnv): Type-pun via a union instead of a pointer cast.
        * wtf/HashMap.h:
        (WTF::): Instead of doing type-punned assignments via pointer cast, do one of three things:
        (1) assign directly w/o cast if storage type matches real type; (2) assign using cast
        via union if type does not need reffing; (3) copy with memcpy and ref/deref manually if type
        needs reffing. This is ok peref-wise because memcpy of a constant length gets optomized.
        HashTraits are now expected to make ref()/deref() take the storage type, not the true type.
        * wtf/HashSet.h:
        (WTF::): Same basic idea.
        * wtf/HashTable.h:
        (WTF::): Added Assigner template for use by HashMap/HashSet. Change RefCounter to call ref()
        and deref() via storage type, avoiding the need to
        type-pun.
        (WTF::RefCounter::ref): ditto
        (WTF::RefCounter::deref): ditto
        * wtf/HashTraits.h:
        (WTF::): Change ref() and deref() for RefPtr HashTraits to take the storage type; cast
        via union to pointer type.
        * wtf/FastMalloc.cpp:
        (WTF::TCMalloc_PageHeap::init): Changed from constructor to init function so this can go in a union.
        (WTF::): redefine pageheap macro in terms of getPageHeap().
        (WTF::getPageHeap): new inline function, helper for pageheap macro. This hides the cast in a union.
        (WTF::TCMalloc_ThreadCache::InitModule): Call init() instead of using placement new to initialize page
        heap.
        * wtf/TCPageMap.h:
        (TCMalloc_PageMap1::init): Changed from constructor to init function.
        (TCMalloc_PageMap2::init): ditto
        (TCMalloc_PageMap3::init): ditto


2007-07-06  George Staikos  <staikos@kde.org>

        Reviewed by Maciej.

        Switch USE(ICONDATABASE) to ENABLE(ICONDATABASE)

        * wtf/Platform.h:

2007-07-03  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin.

        Eleventh round of fixes for implicit 64-32 bit conversion errors.
        <rdar://problem/5292262>

        - Fixes a real bug where where we were setting long long and unsigned long long
          values to a long field.

        * bindings/objc/objc_utility.mm:
        (KJS::Bindings::convertValueToObjcValue):

2007-07-03  Sam Weinig  <sam@webkit.org>

        Reviewed by Brady Eidson.

        Tenth round of fixes for implicit 64-32 bit conversion errors.
        <rdar://problem/5292262>

        - Add explicit casts.

        * kjs/dtoa.cpp:
        (Bigint::):

2007-07-02  Sam Weinig  <sam@webkit.org>

        Reviewed by Kevin McCullough.

        Fourth round of fixes for implicit 64-32 bit conversion errors.
        <rdar://problem/5292262>

        Add custom piDouble and piFloat constants to use instead of M_PI.

        * kjs/math_object.cpp:
        (MathObjectImp::getValueProperty):
        * wtf/MathExtras.h:
        (wtf_atan2):

2007-06-29  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin.

        Second pass at fixing implicit 64-32 bit conversion errors.
        <rdar://problem/5292262>

        - Add a toFloat() method to JSValue for float conversion.

        * JavaScriptCore.exp:
        * kjs/value.cpp:
        (KJS::JSValue::toFloat):
        * kjs/value.h:

2007-06-27  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Darin.

        - <rdar://problem/5271937> REGRESSION: Apparent WebKit JavaScript memory smasher when submitting comment to iWeb site (crashes in kjs_pcre_compile2)
        - Correctly evaluate the return value of _pcre_ucp_findchar.

        * pcre/pcre_compile.c:
        (compile_branch):
        * pcre/pcre_exec.c:
        (match):

2007-06-27  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin.

        First pass at fixing implicit 64-32 bit conversion errors.
        <rdar://problem/5292262>

        - Add 'f' suffix where necessary.

        * kjs/testkjs.cpp:
        (StopWatch::getElapsedMS):

2007-06-26  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Maciej Stachowiak.
        
        Fixed <rdar://problem/5296627> JSGarbageCollect headerdoc suggests that 
        using JavaScriptCore requires leaking memory

        * API/JSBase.h: Changed documentation to explain that you can pass NULL
        to JSGarbageCollect.

2007-06-26  Adam Treat  <adam@staikos.net>

        Reviewed by Adam Roben.

        Make the SQLite icon database optional.

        * wtf/Platform.h:

2007-06-15  George Staikos  <staikos@kde.org>

        More missing files for Qt.

        * JavaScriptCore.pri:
        * kjs/testkjs.pro:

2007-06-15  George Staikos  <staikos@kde.org>

        Another Qt build fix.

        * JavaScriptCore.pri:
        * kjs/testkjs.pro:

2007-06-15  George Staikos  <staikos@kde.org>

        Fixing Qt build.

        * JavaScriptCore.pri:

2007-06-20  Mark Rowe  <mrowe@apple.com>

        Reviewed by Mitz.

        Fix http://bugs.webkit.org/show_bug.cgi?id=14244
        Bug 14244: Data corruption when using a replace() callback function with data containing "$"

        * kjs/string_object.cpp:
        (KJS::replace):  When 'replacement' is a function, do not replace $n placeholders in its return value.
        This matches the behaviour described in ECMA 262 3rd Ed section 15.5.4.1, and as implemented in Firefox.

2007-06-14  Anders Carlsson  <andersca@apple.com>

        Fix Windows build.
        
        * bindings/runtime_object.cpp:
        (RuntimeObjectImp::canPut):

2007-06-14  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        <rdar://problem/5103077> 
        Crash at _NPN_ReleaseObject when quitting page at http://eshop.macsales.com/shop/ModBook
        
        <rdar://problem/5183692>
        http://bugs.webkit.org/show_bug.cgi?id=13547
        REGRESSION: Crash in _NPN_ReleaseObject when closing Safari on nba.com (13547)
        
        <rdar://problem/5261499>
        CrashTracer: [USER] 75 crashes in Safari at com.apple.JavaScriptCore: KJS::Bindings::CInstance::~CInstance + 40
        
        Have the root object track all live instances of RuntimeObjectImp. When invalidating 
        the root object, also invalidate all live runtime objects by zeroing out their instance ivar.
        This prevents instances from outliving their plug-ins which lead to crashes.
        
        * bindings/c/c_utility.cpp:
        (KJS::Bindings::convertValueToNPVariant):
        * bindings/jni/jni_jsobject.cpp:
        (JavaJSObject::convertValueToJObject):
        * bindings/jni/jni_utility.cpp:
        (KJS::Bindings::convertValueToJValue):
        * bindings/objc/objc_runtime.mm:
        (ObjcFallbackObjectImp::callAsFunction):
        * bindings/runtime_array.cpp:
        (RuntimeArray::RuntimeArray):
        * bindings/runtime_array.h:
        (KJS::RuntimeArray::getConcreteArray):
        * bindings/runtime_method.cpp:
        (RuntimeMethod::callAsFunction):
        * bindings/runtime_method.h:
        * bindings/runtime_object.cpp:
        (RuntimeObjectImp::RuntimeObjectImp):
        (RuntimeObjectImp::~RuntimeObjectImp):
        (RuntimeObjectImp::invalidate):
        (RuntimeObjectImp::fallbackObjectGetter):
        (RuntimeObjectImp::fieldGetter):
        (RuntimeObjectImp::methodGetter):
        (RuntimeObjectImp::getOwnPropertySlot):
        (RuntimeObjectImp::put):
        (RuntimeObjectImp::canPut):
        (RuntimeObjectImp::defaultValue):
        (RuntimeObjectImp::implementsCall):
        (RuntimeObjectImp::callAsFunction):
        (RuntimeObjectImp::getPropertyNames):
        (RuntimeObjectImp::throwInvalidAccessError):
        * bindings/runtime_object.h:
        * bindings/runtime_root.cpp:
        (KJS::Bindings::RootObject::invalidate):
        (KJS::Bindings::RootObject::addRuntimeObject):
        (KJS::Bindings::RootObject::removeRuntimeObject):
        * bindings/runtime_root.h:

2007-06-14  Anders Carlsson  <andersca@apple.com>

        Reviewed by Mitz.

        <rdar://problem/5244948>
        Safari keeps on complaining about slow script playing NBC TV video (14133)

        http://bugs.webkit.org/show_bug.cgi?id=14133
        Runaway JavaScript timer fires when spinning around in Google Maps street view

        Make sure to start and stop the timeout checker around calls to JS.
        
        * bindings/NP_jsobject.cpp:
        (_NPN_InvokeDefault):
        (_NPN_Invoke):
        (_NPN_Evaluate):
        * bindings/jni/jni_jsobject.cpp:
        (JavaJSObject::call):
        (JavaJSObject::eval):

2007-06-13  Darin Adler  <darin@apple.com>

        Reviewed by Mark Rowe.

        - fix http://bugs.webkit.org/show_bug.cgi?id=14132
          array sort with > 10000 elements sets elements > 10000 undefined

        Test: fast/js/sort-large-array.html

        * kjs/array_instance.h: Replaced pushUndefinedObjectsToEnd with
        compactForSorting, and removed ExecState parameters.

        * kjs/array_object.cpp:
        (ArrayInstance::sort): Changed to call compactForSorting.
        (ArrayInstance::compactForSorting): Do the get and delete of the
        properties directly on the property map instead of using public
        calls from JSObject. The public calls would just read the undefined
        values from the compacted sort results array!

2007-06-13  George Staikos  <staikos@kde.org>

        Reviewed by Lars.

        Fix Mac OS X build after last checkin.

        * wtf/FastMalloc.h:

2007-06-14  Lars Knoll <lars@trolltech.com>

        Reviewed by Maciej.

        Disable FastMalloc for the Qt build and make sure we
        don't reimplement the global new/delete operators
        when using the system malloc.

        * wtf/FastMalloc.cpp:
        * wtf/FastMalloc.h:
        * wtf/Platform.h:

2007-06-13  Anders Carlsson  <andersca@apple.com>

        Reviewed by Geoff.

        Make sure that bindings instances get correct root objects.
        
        * JavaScriptCore.exp:
        * bindings/NP_jsobject.cpp:
        (listFromVariantArgs):
        (_NPN_InvokeDefault):
        (_NPN_Invoke):
        (_NPN_SetProperty):
        * bindings/c/c_instance.cpp:
        (KJS::Bindings::CInstance::invokeMethod):
        (KJS::Bindings::CInstance::invokeDefaultMethod):
        * bindings/c/c_runtime.cpp:
        (KJS::Bindings::CField::valueFromInstance):
        * bindings/c/c_utility.cpp:
        (KJS::Bindings::convertNPVariantToValue):
        * bindings/c/c_utility.h:
        * bindings/objc/objc_instance.mm:
        (ObjcInstance::invokeMethod):
        (ObjcInstance::invokeDefaultMethod):
        (ObjcInstance::getValueOfUndefinedField):
        * bindings/objc/objc_runtime.mm:
        (ObjcField::valueFromInstance):
        (ObjcArray::valueAt):
        * bindings/objc/objc_utility.h:
        * bindings/objc/objc_utility.mm:
        (KJS::Bindings::convertObjcValueToValue):
        * bindings/runtime.h:

2007-06-13  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Lars.

        * kjs/testkjs.pro: WebKitQt is now called QtWebKit.

2007-06-12  Anders Carlsson  <andersca@apple.com>

        Another build fix.
        
        * bindings/qt/qt_instance.cpp:
        (KJS::Bindings::QtInstance::invokeMethod):

2007-06-12  Anders Carlsson  <andersca@apple.com>

        Reviewed by Geoff.

        Move the notion of field type to the JNI runtime since that's the only 
        one that was actually using it.
        
        * bindings/c/c_runtime.h:
        (KJS::Bindings::CField::CField):
        * bindings/jni/jni_runtime.h:
        * bindings/objc/objc_runtime.h:
        * bindings/objc/objc_runtime.mm:
        * bindings/qt/qt_runtime.h:
        * bindings/runtime.h:
        * bindings/runtime_method.cpp:

2007-06-12  Anders Carlsson  <andersca@apple.com>

        Build fix.
        
        * bindings/qt/qt_class.cpp:
        (KJS::Bindings::QtClass::methodsNamed):
        * bindings/qt/qt_instance.cpp:
        (KJS::Bindings::QtInstance::invokeMethod):

2007-06-12  Anders Carlsson  <andersca@apple.com>

        Reviewed by Oliver.
        
        Get rid of the MethodList class and use a good ol' Vector instead.

        * bindings/c/c_class.cpp:
        (KJS::Bindings::CClass::methodsNamed):
        * bindings/c/c_instance.cpp:
        (KJS::Bindings::CInstance::invokeMethod):
        * bindings/jni/jni_class.cpp:
        (JavaClass::JavaClass):
        (JavaClass::~JavaClass):
        * bindings/jni/jni_instance.cpp:
        (JavaInstance::invokeMethod):
        * bindings/objc/objc_class.mm:
        (KJS::Bindings::ObjcClass::methodsNamed):
        * bindings/objc/objc_instance.mm:
        (ObjcInstance::invokeMethod):
        * bindings/objc/objc_runtime.mm:
        (ObjcFallbackObjectImp::callAsFunction):
        * bindings/runtime.cpp:
        * bindings/runtime.h:
        * bindings/runtime_method.cpp:
        (RuntimeMethod::lengthGetter):
        (RuntimeMethod::callAsFunction):
        * bindings/runtime_object.cpp:
        (RuntimeObjectImp::getOwnPropertySlot):

2007-06-12  Anders Carlsson  <andersca@apple.com>

        Reviewed by Geoff.

        Make RuntimeMethod's method list a pointer so that the object size doesn't
        grow beyond 32 bytes when we later will replace MethodList with a Vector.
        
        * bindings/runtime_method.cpp:
        (RuntimeMethod::RuntimeMethod):
        (RuntimeMethod::lengthGetter):
        (RuntimeMethod::callAsFunction):
        * bindings/runtime_method.h:

2007-06-12  Anders Carlsson  <andersca@apple.com>

        Reviewed by Geoff.

        Get rid of the Parameter class.
        
        * bindings/jni/jni_instance.cpp:
        (JavaInstance::invokeMethod):
        * bindings/jni/jni_runtime.cpp:
        (JavaMethod::signature):
        * bindings/jni/jni_runtime.h:
        (KJS::Bindings::JavaParameter::JavaParameter):
        (KJS::Bindings::JavaParameter::~JavaParameter):
        (KJS::Bindings::JavaParameter::type):
        (KJS::Bindings::JavaMethod::parameterAt):
        (KJS::Bindings::JavaMethod::numParameters):
        * bindings/runtime.h:

2007-06-12  Anders Carlsson  <andersca@apple.com>

        Build fix.
        
        * bindings/qt/qt_class.h:

2007-06-12  Mark Rowe  <mrowe@apple.com>

        Build fix.

        * bindings/objc/objc_runtime.h:

2007-06-12  Anders Carlsson  <andersca@apple.com>

        Reviewed by Geoff.

        Get rid of Constructor and its only subclass JavaConstructor.
        
        * bindings/c/c_class.h:
        * bindings/jni/jni_class.cpp:
        (JavaClass::JavaClass):
        (JavaClass::~JavaClass):
        * bindings/jni/jni_class.h:
        * bindings/jni/jni_runtime.cpp:
        * bindings/jni/jni_runtime.h:
        * bindings/objc/objc_class.h:
        * bindings/runtime.h:

2007-06-12  Anders Carlsson  <andersca@apple.com>

        Reviewed by Geoff.

        Use RetainPtr throughout the bindings code.
        
        * bindings/objc/objc_class.h:
        * bindings/objc/objc_class.mm:
        (KJS::Bindings::ObjcClass::ObjcClass):
        (KJS::Bindings::ObjcClass::methodsNamed):
        (KJS::Bindings::ObjcClass::fieldNamed):
        * bindings/objc/objc_instance.h:
        (KJS::Bindings::ObjcInstance::getObject):
        * bindings/objc/objc_instance.mm:
        (ObjcInstance::ObjcInstance):
        (ObjcInstance::~ObjcInstance):
        (ObjcInstance::implementsCall):
        (ObjcInstance::invokeMethod):
        (ObjcInstance::invokeDefaultMethod):
        (ObjcInstance::defaultValue):
        * bindings/objc/objc_runtime.h:
        (KJS::Bindings::ObjcMethod::setJavaScriptName):
        (KJS::Bindings::ObjcMethod::javaScriptName):
        (KJS::Bindings::ObjcArray::getObjcArray):
        * bindings/objc/objc_runtime.mm:
        (ObjcField::name):
        (ObjcArray::ObjcArray):
        (ObjcArray::setValueAt):
        (ObjcArray::valueAt):
        (ObjcArray::getLength):
        * wtf/RetainPtr.h:

2007-06-12  Anders Carlsson  <andersca@apple.com>

        Reviewed by Maciej.

        Have JSCell inherit from Noncopyable.
        
        * bindings/objc/objc_runtime.h:
        * bindings/runtime_object.h:
        * kjs/value.h:

2007-06-12  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin and Maciej.

        More cleanup. Use our Noncopyable WTF class, add a root object member
        to the Array class.
        
        * bindings/c/c_class.h:
        * bindings/jni/jni_class.h:
        * bindings/jni/jni_instance.h:
        * bindings/jni/jni_runtime.cpp:
        (JavaArray::JavaArray):
        * bindings/jni/jni_runtime.h:
        * bindings/objc/objc_class.h:
        * bindings/objc/objc_runtime.h:
        * bindings/objc/objc_runtime.mm:
        (ObjcArray::ObjcArray):
        * bindings/objc/objc_utility.mm:
        (KJS::Bindings::convertObjcValueToValue):
        * bindings/runtime.cpp:
        (KJS::Bindings::Array::Array):
        (KJS::Bindings::Array::~Array):
        * bindings/runtime.h:
        * bindings/runtime_object.h:
        * bindings/runtime_root.h:

2007-06-08  Zack Rusin  <zrusin@trolltech.com>

        Fix the Qt build

        * bindings/qt/qt_instance.cpp:
        (KJS::Bindings::QtInstance::QtInstance):
        * bindings/qt/qt_instance.h:

2007-06-07  Anders Carlsson  <andersca@apple.com>

        Reviewed by Geoff.

        Get rid of Instance::setRootObject and pass the root object to the instance constructor instead.
        
        * bindings/c/c_instance.cpp:
        (KJS::Bindings::CInstance::CInstance):
        * bindings/c/c_instance.h:
        * bindings/jni/jni_instance.cpp:
        (JavaInstance::JavaInstance):
        * bindings/jni/jni_instance.h:
        * bindings/jni/jni_jsobject.cpp:
        (JavaJSObject::convertJObjectToValue):
        * bindings/objc/objc_instance.h:
        * bindings/objc/objc_instance.mm:
        (ObjcInstance::ObjcInstance):
        * bindings/runtime.cpp:
        (KJS::Bindings::Instance::Instance):
        (KJS::Bindings::Instance::createBindingForLanguageInstance):
        * bindings/runtime.h:

2007-06-07  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

        Don't use a JavaInstance to store the field when all we want to do is to keep the field
        from being garbage collected. Instead, use a JObjectWrapper.
        
        * bindings/jni/jni_instance.h:
        * bindings/jni/jni_runtime.cpp:
        (JavaField::JavaField):
        (JavaField::dispatchValueFromInstance):
        (JavaField::dispatchSetValueToInstance):
        * bindings/jni/jni_runtime.h:
        (KJS::Bindings::JavaField::JavaField):
        (KJS::Bindings::JavaField::operator=):

2007-05-30  Alp Toker  <alp.toker@collabora.co.uk>

        Reviewed by Brady.

        Enable logging in the Gdk port.
        http://bugs.webkit.org/show_bug.cgi?id=13936

        * wtf/Assertions.cpp:
        * wtf/Assertions.h: Add WTFLogVerbose which also logs
        the file, line number and function.

2007-05-30  Mark Rowe  <mrowe@apple.com>

        Mac build fix.  Update #include.

        * API/JSCallbackFunction.h:

2007-05-30  Luciano Montanaro  <mikelima@cirulla.net>

        Reviewed by Maciej.

        - cross-port Harri Porten's commits 636099 and 636108 from KJS: 
        "publish a class anyway public already" and "class is being used from
        outside for quite some time" in preparation for further syncronizations

        * kjs/context.h:
        * kjs/date_object.cpp:
        * kjs/date_object.h:
        * kjs/function.h:
        (KJS::):
        (KJS::InternalFunctionImp::classInfo):
        (KJS::InternalFunctionImp::functionName):
        * kjs/function_object.h:
        * kjs/internal.h:
        * kjs/lookup.h:
        (KJS::getStaticPropertySlot):
        (KJS::getStaticFunctionSlot):
        (KJS::getStaticValueSlot):
        * kjs/object_object.h:

2007-05-29  Sam Weinig  <sam@webkit.org>

        Reviewed by Adam Roben.

        Cleanup function and fix to match comparison API.

        * kjs/string_object.cpp:
        (KJS::substituteBackreferences):
        (KJS::localeCompare):

2007-05-28  Geoffrey Garen  <ggaren@apple.com>

        Slight clarification to an exception message.

        * API/JSCallbackObject.cpp:
        (KJS::JSCallbackObject::put):

2007-05-27  Holger Freyther  <zecke@selfish.org>

        Reviewed by Mark Rowe.

        * wtf/Platform.h: Move Gdk up to allow building WebKit/Gdk on Darwin

2007-05-27  Darin Adler  <darin@apple.com>

        - fix a couple ifdefs that said WIN instead of WIN_OS

        * kjs/collector.cpp:
        (KJS::allocateBlock): WIN -> WIN_OS
        (KJS::freeBlock): Ditto.

2007-05-26  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=13854
        Port of commit 667785 from kjs

        - special case calling String.localeCompare() with no parameters to return 0.

        * kjs/string_object.cpp:
        (KJS::StringProtoFunc::callAsFunction):

2007-05-25  Kimmo Kinnunen  <kimmok@iki.fi>

        Reviewed by Darin.

        - Fix for http://bugs.webkit.org/show_bug.cgi?id=13456
        REGRESSION: setTimeout "arguments" object gets shadowed by a local variable

        - Add a explicit check for arguments. Previously check was done with getDirect,
        but since the arguments is created on-demand in ActivationImp, it doesn't
        show up in the test. 'arguments' should always be in the VarDeclNode's
        evaluation scope.

        * kjs/nodes.cpp:
        (VarDeclNode::evaluate): Additional check if the var decl identifier is 'arguments'

2007-05-25  George Staikos  <staikos@kde.org>

        Reviewed by Maciej.

        - Use COMPILER(GCC), not PLATFORM(GCC) - as Platform.h defines

        * wtf/FastMalloc.h:

2007-05-25  Kimmo Kinnunen  <kimmok@iki.fi>

        Reviewed by Darin.

        - http://bugs.webkit.org/show_bug.cgi?id=13623 (Decompilation of function
          doesn't compile with "++(x,y)")
        - Create the error node based on the actual node, not the node inside
          parenthesis
        - Fix applies to postfix, prefix and typeof operators
        - Produces run-time ReferenceError like other non-lvalue assignments etc.

        * kjs/grammar.y: Create {Prefix,Postfix}ErrorNode based on the actual node,
        not the based on the node returned by "nodeInsideAllParens()". Same for
        TypeOfValueNode.

2007-05-25  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Zack.

        Fix crash in Qt JavaScript bindings when the arguments used on the Qt side are not
        registered with QMetaType.

        * bindings/qt/qt_instance.cpp:
        (KJS::Bindings::QtInstance::invokeMethod):
        * bindings/qt/qt_runtime.cpp:

2007-05-24  Luciano Montanaro  <mikelima@cirulla.net>

        Reviewed by Darin

        Patch for http://bugs.webkit.org/show_bug.cgi?id=13855
        Port patch 666176 to JavaScriptCore

        - Renamed JSValue::downcast() to JSValue::asCell() which makes the
        function meaning cleaner. It's modeled after Harri Porten change in 
        KDE trunk.

        * kjs/collector.cpp:
        (KJS::Collector::protect):
        (KJS::Collector::unprotect):
        (KJS::Collector::collectOnMainThreadOnly):
        * kjs/object.h:
        (KJS::JSValue::isObject):
        * kjs/string_object.cpp:
        (KJS::StringProtoFunc::callAsFunction):
        * kjs/value.h:
        (KJS::JSValue::asCell):
        (KJS::JSValue::isNumber):
        (KJS::JSValue::isString):
        (KJS::JSValue::isObject):
        (KJS::JSValue::getNumber):
        (KJS::JSValue::getString):
        (KJS::JSValue::getObject):
        (KJS::JSValue::getUInt32):
        (KJS::JSValue::mark):
        (KJS::JSValue::marked):
        (KJS::JSValue::type):
        (KJS::JSValue::toPrimitive):
        (KJS::JSValue::toBoolean):
        (KJS::JSValue::toNumber):
        (KJS::JSValue::toString):
        (KJS::JSValue::toObject):

2007-05-18  Holger Hans Peter Freyther  <zecke@selfish.org>

        Reviewed by Mark Rowe.

        * kjs/testkjs.pro: Make the Gdk port link to icu

2007-05-15  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Adele Peterson.
        
        It helps if you swap the right variable.

        * wtf/HashSet.h:
        (WTF::::operator):

2007-05-15  Lars Knoll <lars@trolltech.com>

        Reviewed by Zack

        Extend the QObject JavaScript bindings to work for slots with
        arguments.

        * bindings/qt/qt_instance.cpp:
        (KJS::Bindings::QtInstance::invokeMethod):

2007-05-14  Kimmo Kinnunen  <kimmok@iki.fi>

        Reviewed by Darin.

        - Fixes http://bugs.webkit.org/show_bug.cgi?id=13622 (Decompiler
          omits trailing comma in array literal)

         * kjs/nodes2string.cpp:
         (ArrayNode::streamTo): print extra ',' in case there was elision
         commas (check opt member var) and array elements present
         in the array expression

2007-05-14  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Oliver Hunt.
        
        Added HashMap::swap and HashSet::swap. WebCore now uses HashSet::swap.
        I figured while I was in the neighborhood I might as well add HashMap::swap,
        too.

        * wtf/HashMap.h:
        (WTF::::operator):
        (WTF::::swap):
        * wtf/HashSet.h:
        (WTF::::operator):
        (WTF::::swap):

2007-05-11  Kimmo Kinnunen  <kimmok@iki.fi>

        Reviewed by Darin.

        - Fix for bug http://bugs.webkit.org/show_bug.cgi?id=13620
          Bogus decompilation of "for (var j = 1 in [])"
        - ForInNode toString()'ed to syntax error if there was var decl
          and initializer
        - ForNode toStringed()'ed lost 'var ' if it was present

        * kjs/nodes2string.cpp:
        (VarDeclListNode::streamTo): Print "var " here
        (VarStatementNode::streamTo): Don't print "var " here
        (ForNode::streamTo): Remove TODO comment, VarDeclListNode will
        stream the "var "
        (ForInNode::streamTo): ForIn initializer is printed by VarDeclNode

2007-05-11  Kimmo Kinnunen  <kimmok@iki.fi>

        Reviewed by Darin.

        - Fixes http://bugs.webkit.org/show_bug.cgi?id=10878
          (Incorrect decompilation for "4..x")
        - Group numbers in dotted expressions in toString() output, so we
          avoid the 4.x constructs  when the original input is 4..x.
          4..x means the same as 4. .x or (4).x or Number(4).x

        * kjs/nodes2string.cpp:
        (KJS::SourceStream::):
        Add boolean flag to indicate that if next item is a number, it should be grouped.
        Add new formatting enum which turns on the boolean flag.
        (KJS::SourceStream::SourceStream): Added. Initialize the flag.
        (SourceStream::operator<<): Added. New overloaded operator with double value as parameter.
        (NumberNode::streamTo): Use the double operator
        (ArrayNode::streamTo):
        (DotAccessorNode::streamTo):
        (FunctionCallDotNode::streamTo):
        (FunctionCallParenDotNode::streamTo):
        (PostfixDotNode::streamTo):
        (DeleteDotNode::streamTo):
        (PrefixDotNode::streamTo):
        (AssignDotNode::streamTo): Use the new formatting enum to turn on the grouping flag.

2007-05-10  Lars Knoll <lars@trolltech.com>

        Reviewed by Zack

        Fix our last three test failures in the JavaScript
        tests.

        * wtf/unicode/qt4/UnicodeQt4.h:
        (WTF::Unicode::toLower):
        (WTF::Unicode::toUpper):

2007-05-08  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.
        
        Fixed #includes of JSStringRefCF.h and use of CF datatypes. I think I 
        misunderstood this issue before.

        * API/JavaScriptCore.h: #include JSStringRefCF.h. Platforms that don't
        want this behavior can just #include individual headers, instead of the
        umbrella framework header. But we definitely want Mac OS X clients to
        get the #include of JSStringRefCF.h "for free."
        * API/minidom.c: Don't #include JSStringRefCF.h. (Don't need to #include
        JavaScriptCore.h, either.)
        * API/testapi.c: Don't #include JSStringRefCF.h. Do use CF datatypes
        regardless of whether __APPLE__ is defined. Platforms that don't support
        CF just shouldn't compile this file.
        (main):

2007-05-09  Eric Seidel  <eric@webkit.org>

        Reviewed by mjs.
        
        http://bugs.webkit.org/show_bug.cgi?id=6985
        Cyclic __proto__ values cause WebKit to hang

        * kjs/object.cpp:
        (KJS::JSObject::put): do a cycle check before setting __proto__

2007-05-08  Kimmo Kinnunen  <kimmok@iki.fi>

        Reviewed by darin.  Landed by eseidel.

        - http://bugs.webkit.org/show_bug.cgi?id=10880 (Do..while loop gains 
        a semicolon each time it is toStringed)
        Grammar in Ecma-66262, 12.6: "do Statement while ( Expression );"
        EmptyStatement was created after every do..while(expr) which
        had semicolon at the end.

        * kjs/grammar.y: Require semicolon at the end of do..while

2007-05-08  Geoffrey Garen  <ggaren@apple.com>

        Build fix -- this time for sure.
        
        APICast.h, being private, ends up in a different folder than JSValueRef.h,
        so we can't include one from the other using "". Instead, just forward
        declare the relevant data types.

        * API/APICast.h:

2007-05-08  Geoffrey Garen  <ggaren@apple.com>

        Build fix: export APICast.h for WebCore and WebKit.

        * JavaScriptCore.xcodeproj/project.pbxproj:

2007-05-04  Darin Adler  <darin@apple.com>

        Reviewed by Adele.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12821
          <rdar://problem/5007921> Number.toExponential doesn't work for negative numbers

        * kjs/number_object.cpp: (NumberProtoFunc::callAsFunction):
        Added a call to fabs before calling log10.

2007-05-03  Holger Freyther <freyther@kde.org>

        Reviewed by Zack, landed by Simon.
        This is bugzilla bug 13499.

        * JavaScriptCore.pri: Place Qt into the qt-port scope
        * bindings/testbindings.pro: Place Qt into the qt-port scope
        * kjs/testkjs.pro: Place Qt into the qt-port scope
        * pcre/pcre.pri: Place Qt into the qt-port scope

2007-05-02  David Harrison  <harrison@apple.com>

        Reviewed by Antti.

        <rdar://problem/5174862> Crash resulting from DeprecatedString::insert()

        Added insertion support for more than one value.
        
        * wtf/Vector.h:
        (WTF::::insert):
        Added support for inserting multiple values.
        
        (WTF::::prepend):
        New. Insert at the start of vectors. Convenient for vectors used as strings.

2007-05-01  Jungshik Shin  <jungshik.shin@gmail.com>

        Reviewed by Alexey.

        - get rid of non-ASCII lteral characters : suppress compiler warnings
        http://bugs.webkit.org/show_bug.cgi?id=13551
         
        * kjs/testkjs.cpp:
        * pcre/pcre_compile.c:

2007-04-28  Jungshik Shin  <jungshik.shin@gmail.com>

        Reviewed by Sam Weinig.

        - Replace copyright sign in Latin-1 (0xA9) with '(C)'
        http://bugs.webkit.org/show_bug.cgi?id=13531

        * bindings/npruntime.h:
    
2007-04-28  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fix <rdar://problem/5154144> Hamachi test fails: assertion failure in ListHashSet

        Test: fast/forms/add-remove-form-elements-stress-test.html

        * wtf/ListHashSet.h:
        (WTF::ListHashSetNodeAllocator::ListHashSetNodeAllocator): Initialize
        m_isDoneWithInitialFreeList to false.
        (WTF::ListHashSetNodeAllocator::allocate): Added assertions based on a debug-only
        m_isAllocated flag that make sure we don't allocate a block that's already allocated.
        These assertions helped pinpoint the bug. Set m_isDoneWithInitialFreeList when we
        allocate the last block of the initial free list. Once we're done with the initial
        free list, turn off the rule that says that the next node in the pool after the last
        node in the free list is also free. This rule works because any free nodes are added
        to the head of the free list, so a node that hasn't been allocated even once is always
        at the tail of the free list and all the nodes after it also haven't been allocated
        even once. But it doesn't work any longer once the entire pool has been used at least
        once, because there's nothing special about the last node on the free list any more.
        (WTF::ListHashSetNodeAllocator::deallocate): Set the node's m_isAllocated to false.
        (WTF::ListHashSetNodeAllocator::pastPool): Added. Used above.
        (WTF::ListHashSetNodeAllocator::inPool): Changed to use the pastPool function.
        (WTF::ListHashSetNode::ListHashSetNode): Initialize m_isAllocated to true.
        (WTF::ListHashSetNode::operator new): Removed variable name for unused size
        parameter.
        (WTF::ListHashSetNode::destroy): Changed to call the destructor rather than
        delete -- this gets rid of the need to define an operator delete.

2007-04-27  Christopher Brichford  <chrisb@adobe.com>

        Reviewed by Timothy Hatcher.

        Fix for: Bug 13211: Move JavaScriptCore mac project files for apollo port
        http://bugs.webkit.org/show_bug.cgi?id=13211

        * JavaScriptCore.apolloproj/mac/JavaScriptCore.Debug.xcconfig: Added.
        * JavaScriptCore.apolloproj/mac/JavaScriptCore.Release.xcconfig: Added.
        * JavaScriptCore.apolloproj/mac/JavaScriptCore.xcconfig: Added.
        * JavaScriptCore.apolloproj/mac/JavaScriptCore.xcodeproj/project.pbxproj: Added.
        * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.Debug.xcconfig: Removed.
        * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.Release.xcconfig: Removed.
        * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.xcconfig: Removed.
        * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj: Removed.

2007-04-27  Holger Freyther <freyther@kde.org>

        Reviewed by Maciej.

        Remove unmaintained CMake build system.

        * CMakeLists.txt: Removed.
        * pcre/CMakeLists.txt: Removed.

2007-04-27  Mark Rowe  <mrowe@apple.com>

        Reviewed by Oliver.

        * JavaScriptCore.xcodeproj/project.pbxproj: Improve dependencies in Xcode project
        by marking dftables as a dependency of Generate Derived Sources rather than of
        JavaScriptCore itself.

2007-04-26  Geoffrey Garen  <ggaren@apple.com>

        Build fix -- added #includes that we used to get implicitly through
        JSStringRef.h.

        * API/JSNode.c:
        * API/JSNodeList.c:
        * API/minidom.c:
        * API/testapi.c:

2007-04-26  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Maciej Stachowiak, Adam Roben.
        
        Fixed 
        <rdar://problem/4885130> Remove #include of JSStringRefCF.h from JSStringRef.h
        <rdar://problem/4885123> JavaScriptCore is not cross-platform -- JSStringRef.h references CF datatypes

        * API/JSStringRef.h: Removed #include -- no clients need it anymore.

2007-04-25  David Kilzer  <ddkilzer@apple.com>

        Reviewed by Maciej.

        Add assertions for debug builds.

        * kjs/JSLock.cpp:
        (KJS::JSLock::lock): Assert the return value of pthread_mutex_lock() in debug builds.
        (KJS::JSLock::unlock): Assert the return value of pthread_mutex_unlock() in debug builds.

2007-04-25  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Anders.
        
        - fix build problems

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Disable warning that
        gives often downright incorrect results based on guessing what will happen in 64-bit.

2007-04-25  Darin Adler  <darin@apple.com>

        Reviewed by Geoff.

        - tweak the allocator for a small speedup -- Shark showed this was a win, but I can't
          measure an improvement right now, but it's also clear these changes do no harm

        * wtf/FastMalloc.cpp:
        (WTF::LgFloor): Use ALWAYS_INLINE here; in testing I did a while back this was necessary
        to get this single-instruction function to be inlined.
        (WTF::SizeClass): Use ALWAYS_INLINE here too for the same reason. Also change the special
        case for a size of 0 to work without a branch for a bit of extra speed.
        (WTF::ByteSizeForClass): Use ALWAYS_INLINE here too for the same reason.

2007-04-24  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver.
        
        - use custom calling convention for everything in nodes.cpp on intel gcc for 1.5% speed boost

        Nearly all functions in nodes.cpp were marked up to use the
        regparm(3) calling convention under GCC for x86, since this is
        faster and they are all guaranteed to be called only internally to
        kjs.
        
        The only exception is destructors, since delete doesn't know how to use a custom calling convention.
        
        * kjs/nodes.cpp:
        (dotExprDoesNotAllowCallsString):
        * kjs/nodes.h:
        (KJS::Node::):
        (KJS::StatementNode::):
        (KJS::NullNode::):
        (KJS::BooleanNode::):
        (KJS::NumberNode::):
        (KJS::StringNode::):
        (KJS::RegExpNode::):
        (KJS::ThisNode::):
        (KJS::ResolveNode::):
        (KJS::GroupNode::):
        (KJS::ElementNode::):
        (KJS::ArrayNode::):
        (KJS::PropertyNameNode::):
        (KJS::PropertyNode::):
        (KJS::PropertyListNode::):
        (KJS::ObjectLiteralNode::):
        (KJS::BracketAccessorNode::):
        (KJS::DotAccessorNode::):
        (KJS::ArgumentListNode::):
        (KJS::ArgumentsNode::):
        (KJS::NewExprNode::):
        (KJS::FunctionCallValueNode::):
        (KJS::FunctionCallResolveNode::):
        (KJS::FunctionCallBracketNode::):
        (KJS::FunctionCallParenBracketNode::):
        (KJS::FunctionCallDotNode::):
        (KJS::FunctionCallParenDotNode::):
        (KJS::PostfixResolveNode::):
        (KJS::PostfixBracketNode::):
        (KJS::PostfixDotNode::):
        (KJS::PostfixErrorNode::):
        (KJS::DeleteResolveNode::):
        (KJS::DeleteBracketNode::):
        (KJS::DeleteDotNode::):
        (KJS::DeleteValueNode::):
        (KJS::VoidNode::):
        (KJS::TypeOfResolveNode::):
        (KJS::TypeOfValueNode::):
        (KJS::PrefixResolveNode::):
        (KJS::PrefixBracketNode::):
        (KJS::PrefixDotNode::):
        (KJS::PrefixErrorNode::):
        (KJS::UnaryPlusNode::):
        (KJS::NegateNode::):
        (KJS::BitwiseNotNode::):
        (KJS::LogicalNotNode::):
        (KJS::MultNode::):
        (KJS::AddNode::):
        (KJS::ShiftNode::):
        (KJS::RelationalNode::):
        (KJS::EqualNode::):
        (KJS::BitOperNode::):
        (KJS::BinaryLogicalNode::):
        (KJS::ConditionalNode::):
        (KJS::AssignResolveNode::):
        (KJS::AssignBracketNode::):
        (KJS::AssignDotNode::):
        (KJS::AssignErrorNode::):
        (KJS::CommaNode::):
        (KJS::AssignExprNode::):
        (KJS::VarDeclListNode::):
        (KJS::VarStatementNode::):
        (KJS::EmptyStatementNode::):
        (KJS::ExprStatementNode::):
        (KJS::IfNode::):
        (KJS::DoWhileNode::):
        (KJS::WhileNode::):
        (KJS::ForNode::):
        (KJS::ContinueNode::):
        (KJS::BreakNode::):
        (KJS::ReturnNode::):
        (KJS::WithNode::):
        (KJS::LabelNode::):
        (KJS::ThrowNode::):
        (KJS::TryNode::):
        (KJS::ParameterNode::):
        (KJS::Parameter::):
        (KJS::FunctionBodyNode::):
        (KJS::FuncExprNode::):
        (KJS::FuncDeclNode::):
        (KJS::SourceElementsNode::):
        (KJS::CaseClauseNode::):
        (KJS::ClauseListNode::):
        (KJS::SwitchNode::):

2007-04-24  Oliver Hunt  <oliver@apple.com>

        GTK Build fix, ::findEntry->KJS::findEntry

        * kjs/lookup.cpp:
        (KJS::Lookup::findEntry):
        (KJS::Lookup::find):

2007-04-23  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Geoff.
        
        - compile most of JavaScriptCore as one file for 4% JS iBench speed improvement 

        * JavaScriptCore.xcodeproj/project.pbxproj: Add AllInOneFile.cpp, and remove files it includes
        from the build.
        * kjs/AllInOneFile.cpp: Added.
        * kjs/dtoa.cpp: Renamed CONST to CONST_ to avoid conflict.
        (Bigint::):
        (Bigint::nrv_alloc):
        * kjs/lookup.cpp: Use "namspace KJS { ... }" instead of "using namespace KJS;" 

2007-04-23  Maciej Stachowiak  <mjs@apple.com>

        Build fix, not reviewed.

        * kjs/collector.h: Fix struct/class mismatch.

2007-04-23  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

        - raise ALLOCATIONS_PER_COLLECTION to 4000, for 3.7% iBench speed improvement
         
        Now that the cell size is smaller and the block size is bigger, we can fit 4000 objects in
        the two spare cells the collector is willing to keep around, so collect a bit less often.
        
        * kjs/collector.cpp:

2007-04-23  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin and Geoff.
        
        - move mark and collectOnMainThreadOnly bits into separate bitmaps
        
        This saves 4 bytes per cell, allowing shrink of cell size to 32,
        which leads to a .8% speed improvement on iBench.
        
        This is only feasible because of all the previous changes on the branch.

        * kjs/collector.cpp:
        (KJS::allocateBlock): Adjust for some renames of constants. 
        (KJS::Collector::markStackObjectsConservatively): Now that cells are 32 bytes (64 
        bytes on 64-bit) the cell alignment check can be made much more strict, and also
        obsoletes the need for a % sizeof(CollectorCell) check. Also, we can mask off the low
        bits of the pointer to have a potential block pointer to look for.
        (KJS::Collector::collectOnMainThreadOnly): Use bitmap.
        (KJS::Collector::markMainThreadOnlyObjects): Use bitmap.
        (KJS::Collector::collect): When sweeping, use bitmaps directly to find mark bits.
        * kjs/collector.h:
        (KJS::): Move needed constants and type declarations here.
        (KJS::CollectorBitmap::get): Bit twiddling to get a bitmap value.
        (KJS::CollectorBitmap::set): Bit twiddling to set a bitmap bit to true.
        (KJS::CollectorBitmap::clear): Bit twiddling to set a bitmap bit to false.
        (KJS::CollectorBitmap::clearAll): Clear whole bitmap at one go.
        (KJS::Collector::cellBlock): New operation, compute the block pointer for
        a cell by masking off low bits.
        (KJS::Collector::cellOffset): New operation, compute the cell offset for a
        cell by masking off high bits and dividing (actually a shift).
        (KJS::Collector::isCellMarked): Check mark bit in bitmap
        (KJS::Collector::markCell): Set mark bit in bitmap.
        * kjs/value.h:
        (KJS::JSCell::JSCell): No more bits.
        (KJS::JSCell::marked): Let collector handle it.
        (KJS::JSCell::mark): Let collector handle it.

2007-04-23  Anders Carlsson  <andersca@apple.com>

        Build fix.
        
        * kjs/regexp_object.h:
        RegExpObjectImpPrivate is a struct, not a class.
        
2007-04-23  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.
        
        - shrink FunctionImp / DeclaredFunctionImp by 4 bytes, by moving parameter list to function body
        
        I reconciled this with a similar change in KDE kjs by Maks Orlovich <maksim@kde.org>.

        * kjs/function.cpp:
        (KJS::FunctionImp::callAsFunction):
        (KJS::FunctionImp::passInParameters):
        (KJS::FunctionImp::lengthGetter):
        (KJS::FunctionImp::getParameterName):
        * kjs/function.h:
        * kjs/function_object.cpp:
        (FunctionProtoFunc::callAsFunction):
        (FunctionObjectImp::construct):
        * kjs/nodes.cpp:
        (FunctionBodyNode::addParam):
        (FunctionBodyNode::paramString):
        (FuncDeclNode::addParams):
        (FuncDeclNode::processFuncDecl):
        (FuncExprNode::addParams):
        (FuncExprNode::evaluate):
        * kjs/nodes.h:
        (KJS::Parameter::Parameter):
        (KJS::FunctionBodyNode::numParams):
        (KJS::FunctionBodyNode::paramName):
        (KJS::FunctionBodyNode::parameters):
        (KJS::FuncExprNode::FuncExprNode):
        (KJS::FuncDeclNode::FuncDeclNode):
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Disable 64-bit warnings because
        they handle size_t badly.

2007-04-23  Maciej Stachowiak  <mjs@apple.com>
 
        Reviewed by Darin.

        - shrink RegexpObjectImp by 4 bytes
        
        Somewhat inexplicably, this seems to be a .33% speedup on JS iBench.
        
        * kjs/regexp_object.cpp:
        (KJS::RegExpObjectImpPrivate::RegExpObjectImpPrivate):
        (RegExpObjectImp::RegExpObjectImp):
        (RegExpObjectImp::performMatch):
        (RegExpObjectImp::arrayOfMatches):
        (RegExpObjectImp::getBackref):
        (RegExpObjectImp::getLastMatch):
        (RegExpObjectImp::getLastParen):
        (RegExpObjectImp::getLeftContext):
        (RegExpObjectImp::getRightContext):
        (RegExpObjectImp::getValueProperty):
        (RegExpObjectImp::putValueProperty):
        * kjs/regexp_object.h:

2007-04-23  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver.
        
        - change to 1-bit bitfields instead of 8-bit, this turns out to lead to a .51% speedup on JS iBench
        
        The 1-bit bitfields are actually faster than just plain bools, at least on Intel (go figure).

        * kjs/property_map.h:

2007-04-23  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.
       
        - shrink ArrayInstance objects by 4 bytes
        http://bugs.webkit.org/show_bug.cgi?id=13386
        
        I did this by storing the capacity before the beginning of the storage array. It turns out
        it is rarely needed and is by definition 0 when the storage array is null.
 
        * kjs/array_instance.h:
        (KJS::ArrayInstance::capacity): Get it from the secret stash
        * kjs/array_object.cpp:
        (allocateStorage): New function to encapsulate allocating the storage with extra space ahead
        for the capacity.
        (reallocateStorage): ditto for realloc
        (ArrayInstance::ArrayInstance):
        (ArrayInstance::~ArrayInstance):
        (ArrayInstance::resizeStorage):

2007-04-23  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fix <rdar://problem/4840688> REGRESSION (r10588, r10621): JavaScript won't parse
          modifications of non-references (breaks 300themovie.warnerbros.com, fedex.com)

        Despite the ECMAScript specification's claim that you can treat these as syntax
        errors, doing so creates some website incompatibilities. So this patch turns them back
        into evaluation errors instead.

        Test: fast/js/modify-non-references.html

        * kjs/grammar.y: Change makeAssignNode, makePrefixNode, and makePostfixNode so that they
        never fail to parse. Update rules that use them. Fix a little bit of indenting. Use
        new PostfixErrorNode, PrefixErrorNode, and AssignErrorNode classes.

        * kjs/nodes.h: Added an overload of throwError that takes a char* argument.
        Replaced setExceptionDetailsIfNeeded and debugExceptionIfNeeded with handleException,
        which does both. Added PostfixErrorNode, PrefixErrorNode, and AssignErrorNode classes.

        * kjs/nodes.cpp: Changed exception macros to use handleException; simpler and smaller
        code size than the two functions that we used before.
        (Node::throwError): Added the overload mentioned above.
        (Node::handleException): Added. Contains the code from both setExceptionDetailsIfNeeded
        and debugExceptionIfNeeded.
        (PostfixErrorNode::evaluate): Added. Throws an exception.
        (PrefixErrorNode::evaluate): Ditto.
        (AssignErrorNode::evaluate): Ditto.
        (ThrowNode::execute): Call handleException instead of debugExceptionIfNeeded; this
        effectively adds a call to setExceptionDetailsIfNeeded, which may help with getting
        the correct file and line number for these exceptions.

        * kjs/nodes2string.cpp:
        (PostfixErrorNode::streamTo): Added.
        (PrefixErrorNode::streamTo): Added.
        (AssignErrorNode::streamTo): Added.

2007-04-23  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.
        
        - fix test failures / crashes on PPC

        * kjs/property_map.h: Make the bool fields explicitly 8-bit bitfields, since bool is a full
        word there otherwise :-(

2007-04-23  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.
        
        - fix more test case failures

        * bindings/runtime_array.cpp:
        (RuntimeArray::RuntimeArray): inherit from JSObject instead of ArrayInstance; it turns
        out that this class only needs the prototype and classInfo from ArrayInstance, not the
        actual class itself, and it was too big otherwise.
        (RuntimeArray::getOwnPropertySlot):
        * bindings/runtime_array.h:

2007-04-23  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.
        
        - fix some test failures

        * bindings/runtime_method.cpp:
        (RuntimeMethod::RuntimeMethod): inherit from InternalFunctionImp instead of FunctionImpl,
        otherwise this is too big
        (RuntimeMethod::getOwnPropertySlot):
        * bindings/runtime_method.h:

2007-04-22  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.
        
        - discard the arguments List for an ActivationImp when the corresponding Context is destroyed (1.7% speedup)
        http://bugs.webkit.org/show_bug.cgi?id=13385

        Based an idea by Christopher E. Hyde <C.Hyde@parableuk.force9.co.uk>. His patch to do 
        this also had many other List changes and I found this much simpler subset of the changes
        was actually a hair faster.
        
        This optimization is valid because the arguments list is only kept around to
        lazily make the arguments object. If it's not made by the time the function
        exits, it never will be, since any function that captures the continuation will
        have its own local arguments variable in scope.
        
        Besides the 1.7% speed improvement, it shrinks List by 4 bytes
        (which in turn shrinks ActivationImp by 4 bytes).
        
        * kjs/Context.cpp:
        (KJS::Context::~Context): Clear the activation's arguments list.
        * kjs/function.cpp:
        (KJS::ActivationImp::ActivationImp): Adjusted for list changes.
        (KJS::ActivationImp::mark): No need to mark, lists are always protected (this doesn't
        cause a ref-cycle for reasons stated above).
        (KJS::ActivationImp::createArgumentsObject): Clear arguments list.
        * kjs/function.h:
        * kjs/list.cpp:
        (KJS::List::List): No more needsMarking boolean
        (KJS::List::operator=): ditto
        * kjs/list.h:
        (KJS::List::List): ditto
        (KJS::List::reset): ditto
        (KJS::List::deref): ditto

2007-04-22  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.
        
        - shrink PropertyMap by 8 bytes and therefore shrink CELL_SIZE to 40 (for 32-bit; 
        similar shrinkage for 64-bit)
        http://bugs.webkit.org/show_bug.cgi?id=13384

        Inspired by similar changes by Christopher E. Hyde <C.Hyde@parableuk.force9.co.uk>
        done in the kjs-tweaks branch of KDE's kjs. However, this version is somewhat 
        cleaner style-wise and avoids some of the negative speed impact (at least on gcc/x86) 
        of his version.
        
        This is nearly a wash performance-wise, maybe a slight slowdown, but worth doing
        to eventually reach cell size 32.
        
        * kjs/collector.cpp:
        (KJS::):
        * kjs/property_map.cpp:
        (KJS::PropertyMap::~PropertyMap):
        (KJS::PropertyMap::clear):
        (KJS::PropertyMap::get):
        (KJS::PropertyMap::getLocation):
        (KJS::PropertyMap::put):
        (KJS::PropertyMap::insert):
        (KJS::PropertyMap::expand):
        (KJS::PropertyMap::rehash):
        (KJS::PropertyMap::remove):
        (KJS::PropertyMap::mark):
        (KJS::PropertyMap::containsGettersOrSetters):
        (KJS::PropertyMap::getEnumerablePropertyNames):
        (KJS::PropertyMap::getSparseArrayPropertyNames):
        (KJS::PropertyMap::save):
        (KJS::PropertyMap::checkConsistency):
        * kjs/property_map.h:
        (KJS::PropertyMap::hasGetterSetterProperties):
        (KJS::PropertyMap::setHasGetterSetterProperties):
        (KJS::PropertyMap::):
        (KJS::PropertyMap::PropertyMap):

2007-04-22  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.
        
        - change blocks to 64k in size, and use various platform-specific calls to allocate at 64k-aligned addresses
        http://bugs.webkit.org/show_bug.cgi?id=13383
        
        * kjs/collector.cpp:
        (KJS::allocateBlock): New function to allocate 64k of 64k-aligned memory
        (KJS::freeBlock): Corresponding free
        (KJS::Collector::allocate):
        (KJS::Collector::collect):

2007-04-22  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin and Geoff.
        
        - remove the concept of oversize objects, now that there aren't any (for now
        only enforced with an assert).
        http://bugs.webkit.org/show_bug.cgi?id=13382

        This change is a .66% speedup on JS iBench for 32-bit platforms, probably much more
        for 64-bit since it finally gives a reasonable cell size, but I did not test that.
        
        * kjs/collector.cpp:
        (KJS::): Use different cell size for 32-bit and 64-bit, now that there is no
        oversize allocation.
        (KJS::Collector::allocate): Remove oversize allocator.
        (KJS::Collector::markStackObjectsConservatively): Don't check oversize objects.
        (KJS::Collector::markMainThreadOnlyObjects): Ditto.
        (KJS::Collector::collect): Ditto.

2007-04-21  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Adam.

        - fix http://bugs.webkit.org/show_bug.cgi?id=13428
          REGRESSION (r20973-r20976): Failing ecma/Array/15.4.4.5-3.js

        - fix http://bugs.webkit.org/show_bug.cgi?id=13429
          REGRESSION (r20973-r20976): Crashing in fast/dom/plugin-attributes-enumeration.html

        * kjs/array_object.cpp:
        (ArrayInstance::sort): Free the old storage, not the new one.

2007-04-20  Maciej Stachowiak  <mjs@apple.com>

        Not reviewed, build fix.

        - fix build problem with last change - -O3 complains more about uninitialized variables
        
        * pcre/pcre_compile.c:
        (compile_branch):
        (pcre_compile2):

2007-04-20  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.
        
        - <rdar://problem/5149915> use mergesort when possible, since it leads to fewer compares (2% JS iBench speedup)

        * kjs/array_object.cpp:
        (ArrayInstance::sort): Use mergesort(3) on platforms that have it, since it tends
        to do fewer compares than qsort; but avoid it very on large arrays since it uses extra
        memory. Also added comments identifying possibly even better sorting algorithms
        for sort by string value and sort by compare function.
        * kjs/config.h:

2007-04-20  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.
        
        - bump optimization flags up to -O3 for 1% JS iBench speed improvement 

        * Configurations/Base.xcconfig:

2007-04-20  Mark Rowe  <mrowe@apple.com>

        Reviewed by Maciej.

        Fix bogus optimisation in the generic pthread code path.

        * kjs/collector.cpp:
        (KJS::currentThreadStackBase):

2007-04-20  Mark Rowe  <mrowe@apple.com>

        Reviewed by Anders.

        Improve FreeBSD compatibility, as suggested by Alexander Botero-Lowry.

        * kjs/collector.cpp:
        (KJS::currentThreadStackBase): FreeBSD requires that pthread_attr_t's are
        initialized via pthread_attr_init before being used in any context.

2007-04-19  Mark Rowe  <mrowe@apple.com>

        Reviewed by Darin.

        Fix http://bugs.webkit.org/show_bug.cgi?id=13401
        Bug 13401: Reproducible crash calling myArray.sort(compareFn) from within
        a sort comparison function

        * kjs/array_object.cpp:
        (ArrayInstance::sort): Save/restore the static variables around calls to qsort
        to ensure nested calls to ArrayInstance::sort behave correctly.

2007-04-12  Deneb Meketa  <dmeketa@adobe.com>

        Reviewed by Darin Adler.

        http://bugs.webkit.org/show_bug.cgi?id=13029
        rdar://problem/4994849
        Bug 13029: Permit NPAPI plug-ins to see HTTP response headers.
        This doesn't actually change JavaScriptCore, but that's where npapi.h is.

        * bindings/npapi.h:
        Add headers member to NPStream struct.  Also increase NP_VERSION_MINOR to 18.
        Increasing to >= 17 allows plug-ins to safely detect whether to look for
        NPStream::headers.  Increasing from 17 to 18 reflects presence of NPObject
        enumeration, which was added in a prior patch, and which has been agreed to
        constitute version 18 by the plugin-futures list.  Also add other missing
        bits of npapi.h to catch up from 14 to 18.  This includes features that are
        not implemented in WebKit, but those are safely stubbed.

2007-04-10  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Mark Rowe.
        
        Fixed last check-in to print in release builds, too.

        * kjs/collector.cpp:
        (KJS::getPlatformThreadRegisters):

2007-04-10  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by John Sullivan, Darin Adler.
        
        Fixed <rdar://problem/5121899> JavaScript garbage collection leads to 
        later crash under Rosetta (should abort or leak instead?)
        
        Log an error message and crash if the kernel reports failure during GC.
        We decided to do this instead of just leaking because we don't want people
        to get the mistaken impression that running in Rosetta is a supported
        configurtion.
        
        The CRASH macro will also hook into CrashReporter, which will tell us if 
        many (any?) users run into this issue.

        * kjs/collector.cpp:
        (KJS::getPlatformThreadRegisters):

2007-04-06  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>

        Reviewed by darin.

        Coverity fix. Coverity says:
        "Event var_deref_model: Variable "sourceRanges" tracked as NULL was passed to a
        function that dereferences it"

        * kjs/string_object.cpp:
        (KJS::replace):

2007-04-06  Geoffrey Garen  <ggaren@apple.com>

        Rubber stamped by Adele Peterson.

        * kjs/ExecState.h: Removed obsolete forward/friend declaration of 
        RuntimeMethodImp.

2007-04-05  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>

        Reviewed by darin.

        Coverity fix. Coverity says:
        "Event check_after_deref: Pointer "dateString" dereferenced before NULL check"

        * kjs/date_object.cpp:
        (KJS::parseDate):

2007-04-05  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>

        Reviewed by darin.

        Coverity fix. Coverity says:
        "Event check_after_deref: Pointer "re" dereferenced before NULL check"

        * pcre/pcre_study.c:
        (pcre_study):

2007-04-05  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>

        Reviewed by darin.

        Coverity fixes. Coverity says:
        "Event leaked_storage: Returned without freeing storage "buffer""
        and:
        "Event leaked_storage: Returned without freeing storage "script""

        * kjs/testkjs.cpp:
        (doIt):
        (createStringWithContentsOfFile):

2007-04-05  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>

        Reviewed by darin.

        Coverity fix: in single-threaded case currentThreadIsMainThread is always true
        so the code in if (!currentThreadIsMainThread) cannot possibly be reached
        and Coverity complains about dead code.

        * kjs/collector.cpp:
        (KJS::Collector::collect):

=== Safari-5522.6 ===

2007-04-03  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Adam.

        - Testing a post-commit hook.

        * JavaScriptCore.vcproj/testkjs/testkjs.vcproj:

2007-04-03  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam.

        <rdar://problem/5107534>
        http://bugs.webkit.org/show_bug.cgi?id=13265
        REGRESSION: Crash in KJS::Bindings::convertValueToNPVariant
        
        * bindings/NP_jsobject.cpp:
        (_NPN_InvokeDefault):
        Return false if the object isn't a function. Set the return value to undefined by default
        (to match Firefox).
        
2007-03-30  Anders Carlsson <andersca@apple.com>

        Build fix.
        
        * bindings/NP_jsobject.cpp:
        (_NPN_Enumerate):

2007-03-30  Anders Carlsson  <andersca@apple.com>

        Reviewed by Geoff.

        Implement _NPN_Enumerate support.
        
        * JavaScriptCore.exp:
        * bindings/NP_jsobject.cpp:
        (_NPN_Enumerate):
        * bindings/c/c_instance.cpp:
        (KJS::Bindings::CInstance::getPropertyNames):
        * bindings/c/c_instance.h:
        * bindings/npapi.h:
        * bindings/npruntime.h:
        * bindings/npruntime_impl.h:
        * bindings/runtime.h:
        (KJS::Bindings::Instance::getPropertyNames):
        * bindings/runtime_object.cpp:
        (RuntimeObjectImp::getPropertyNames):
        * bindings/runtime_object.h:
        (KJS::RuntimeObjectImp::getInternalInstance):

2007-03-28  Jeff Walden  <jwalden+code@mit.edu>

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=12963
        Fix some inconsistencies in the Mozilla JS Array extras implementations
        with respect to the Mozilla implementation:

          - holes in arrays should be skipped, not treated as undefined,
            by all such methods
          - an element with value undefined is not a hole
          - Array.prototype.forEach should return undefined

        * kjs/array_object.cpp:
        (ArrayInstance::getOwnPropertySlot):
        (ArrayProtoFunc::callAsFunction):

2007-03-27  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Geoff.

        * bindings/NP_jsobject.cpp:
        (_NPN_InvokeDefault):
        Call JSObject:call for native JavaScript objects.

2007-03-26  David Carson  <dacarson@gmail.com>

        Reviewed by Darin, landed by Anders.

        Fix for: REGRESSION (r19559): Java applet crash
        http://bugs.webkit.org/show_bug.cgi?id=13142
        <rdar://problem/5080340>

        The previous fix http://bugs.webkit.org/show_bug.cgi?id=12636 
        introduced new JNIType to enum in jni_utility.h This is a 
        problem on the Mac as it seems that the JNIType enum is also
        used in the JVM, it is used to specify the return type in
        jni_objc.mm
        Corrected the fix by moving type to the end, and changing
        jni_objc.mm to convert the new type to an old compatible
        type.

        * bindings/jni/jni_objc.mm:
        (KJS::Bindings::dispatchJNICall):
        * bindings/jni/jni_utility.h:

2007-03-26  Christopher Brichford  <chrisb@adobe.com>

        Reviewed/landed by Adam.

        Bug 13198: Move build settings from project file to xcconfig file for apollo
        port JSCore
        http://bugs.webkit.org/show_bug.cgi?id=13198

        - Moving build settings from xcode project file to xcconfig files.

        * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.Debug.xcconfig:
        * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.Release.xcconfig:
        * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.xcconfig:
        * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:

2007-03-26  Brady Eidson  <beidson@apple.com>

        Rubberstamped by Anders and Maciej aand Geoff (oh my!)
        
        Since CFTypeRef is really void*, a RetainPtr couldn't be used. 
        RefType was "void", which doesn't actually exist as a type.
        Since RefType only existed for operator*(), and since that operator
        doesn't make any sense for RetainPtr, I removed them!

        * kjs/nodes.cpp: Touch this to force a rebuild and (hopefully) help the
          compiler with dependencies
        * wtf/RetainPtr.h: Nuke RefType and operator*()

2007-03-26  Geoffrey Garen  <ggaren@apple.com>

        Touched a file to (hopefully) help the compiler with RetainPtr dependencies.

        * kjs/nodes.cpp:
        (Node::deref):

2007-03-24  Brady Eidson  <beidson@apple.com>

        Reviewed by Adam

        Whoops, RetainPtr should be in the WTF namespace

        * wtf/RetainPtr.h:

2007-03-24  Brady Eidson  <beidson@apple.com>

        Reviewed by Adam
        
        <rdar://problem/5086210> - Move RetainPtr to WTF

        * wtf/RetainPtr.h: Added
        * JavaScriptCore.xcodeproj/project.pbxproj: Add it to the project file
        * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto


2007-03-23  Christopher Brichford  <chrisb@adobe.com>

        Reviewed/landed by Adam.

        Bug 13175: Make apollo mac project files for JavaScriptCore actually
        build something
        http://bugs.webkit.org/show_bug.cgi?id=13175

        - Changing apollo mac project files for JavaScriptCore such that they actually build
        JavaScriptCore source code.

        * JavaScriptCore.apolloproj/ForwardingSources/grammar.cpp: Added.
        * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.xcconfig:
        * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:

2007-03-24  Mark Rowe  <mrowe@apple.com>

        Rubber-stamped by Darin.

        * Configurations/JavaScriptCore.xcconfig: Remove unnecessary INFOPLIST_PREPROCESS.

2007-03-22  Christopher Brichford  <chrisb@adobe.com>

        Reviewed/landed by Adam.

        Bug 13164: Initial version of mac JavaScriptCore project files for
        apollo port 
        http://bugs.webkit.org/show_bug.cgi?id=13164

        - Adding mac project files for apollo port of JavaScriptCore. Currently project
        just builds dftables.

        * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.Debug.xcconfig: Added.
        * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.Release.xcconfig: Added.
        * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.xcconfig: Added.
        * JavaScriptCore.apolloproj/mac/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj: Added.

2007-03-21  Timothy Hatcher  <timothy@apple.com>

        Reviewed by Darin.

        <rdar://problem/5076599> JavaScriptCore has a weak export (vtable for KJS::JSCell)

        * JavaScriptCore.exp: Remove __ZTVN3KJS6JSCellE.

2007-03-21  Adele Peterson  <adele@apple.com>

        Reviewed by Geoff.

        * API/JSStringRef.cpp: (JSStringIsEqual): Added JSLock.

2007-03-21  Zack Rusin  <zrusin@trolltech.com>

        Fix the compile when USE(MULTIPLE_THREADS) isn't
        defined

        * kjs/JSLock.cpp:
        (KJS::JSLock::currentThreadIsHoldingLock):

2007-03-20  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Geoff and Adam.
        
        - make USE(MULTIPLE_THREADS) support more portable
        http://bugs.webkit.org/show_bug.cgi?id=13069
        
        - fixed a threadsafety bug discovered by testing this
        
        - enhanced threadsafety assertions in collector

        * API/JSCallbackObject.cpp:
        (KJS::JSCallbackObject::~JSCallbackObject): This destructor can't
        DropAllLocks around the finalize callback, because it gets called
        from garbage collection and we can't let other threads collect!

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * kjs/JSLock.cpp:
        (KJS::JSLock::currentThreadIsHoldingLock): Added new function
        to allow stronger assertions than just that the lock is held
        by some thread (you can now assert that the current thread is
        holding it, given the new JSLock design).
        * kjs/JSLock.h:
        * kjs/collector.cpp: Refactored for portability plus added some
        stronger assertions.
        (KJS::Collector::allocate):
        (KJS::currentThreadStackBase):
        (KJS::Collector::registerAsMainThread):
        (KJS::onMainThread):
        (KJS::PlatformThread::PlatformThread):
        (KJS::getCurrentPlatformThread):
        (KJS::Collector::Thread::Thread):
        (KJS::destroyRegisteredThread):
        (KJS::Collector::registerThread):
        (KJS::Collector::markCurrentThreadConservatively):
        (KJS::suspendThread):
        (KJS::resumeThread):
        (KJS::getPlatformThreadRegisters):
        (KJS::otherThreadStackPointer):
        (KJS::otherThreadStackBase):
        (KJS::Collector::markOtherThreadConservatively):
        (KJS::Collector::markStackObjectsConservatively):
        (KJS::Collector::protect):
        (KJS::Collector::unprotect):
        (KJS::Collector::collectOnMainThreadOnly):
        (KJS::Collector::markMainThreadOnlyObjects):
        (KJS::Collector::collect):
        * kjs/collector.h:
        * wtf/FastMalloc.cpp:
        (WTF::fastMallocSetIsMultiThreaded):
        * wtf/FastMallocInternal.h:
        * wtf/Platform.h:

2007-03-19  Darin Adler  <darin@apple.com>

        * kjs/value.h: Roll ~JSValue change out. It was causing problems. I'll do it right later.

2007-03-19  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by John Sullivan.

        Fixed <rdar://problem/5073380> REGRESSION: Crash occurs at WTF::fastFree() 
        when reloading liveconnect page (applet)
        
        Best to use free when you use malloc, especially when malloc and delete
        use completely different libraries.

        * bindings/jni/jni_runtime.cpp:
        (JavaMethod::~JavaMethod):

2007-03-19  Andrew Wellington  <proton@wiretapped.net>

        Reviewed by Maciej.

        Really set Xcode editor to use 4 space indentation (http://webkit.org/coding/coding-style.html)

        * JavaScriptCore.xcodeproj/project.pbxproj:

2007-03-19  Darin Adler  <darin@apple.com>

        Reviewed by Geoff.

        - Changed list size threshold to 5 based on testing.

        I was testing the i-Bench JavaScript with the list statistics
        dumping on, and discovered that there were many 5-element lists.
        The fast case for lists was for 4 elements and fewer. By changing
        the threshold to 5 elements we get a measurable speedup. I believe
        this will help real web pages too, not just the benchmark.

        * kjs/list.cpp: Change constant from 4 to 5.

2007-03-19  Darin Adler  <darin@apple.com>

        * kjs/value.h: Oops, fix build.

2007-03-19  Darin Adler  <darin@apple.com>

        Reviewed by Geoff.

        - remove ~JSValue; tiny low-risk performance boost

        * kjs/value.h: Remove unneeded empty virtual destructor from JSValue.
        The only class derived from JSValue is JSCell and it already has a
        virtual destructor. Declaring an empty constructor in JSValue had one
        good effect: it marked the destructor private, making it a compile
        time error to try to destroy a JSValue; but that's not a likely
        mistake for someone to make. It had two bad effects: (1) it caused gcc,
        at least, to generate code to fix up the virtual table pointer to
        point to the JSValue version of the virtual table inside the destructor
        of all classes derived from JSValue directly or indirectly; (2) it
        caused JSValue to be a polymorphic class so required a virtual table for
        it. It's cleaner to not have either of those.

2007-03-18  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Mark.
        
        - avoid static construction (and global variable access) in a smarter, more portable way,
        to later enable MUTLI_THREAD mode to work on other platforms and compilers.
        
        * kjs/CommonIdentifiers.cpp: Added. New class to hold all the shared identifiers.
        (KJS::CommonIdentifiers::CommonIdentifiers):
        (KJS::CommonIdentifiers::shared):
        * kjs/CommonIdentifiers.h: Added.

        * kjs/ExecState.h:
        (KJS::ExecState::propertyNames): Hand the CommonIdentifiers instance here for easy access.
        (KJS::ExecState::ExecState):

        * API/JSObjectRef.cpp:
        (JSObjectMakeConstructor):
        * CMakeLists.txt:
        * JavaScriptCore.exp:
        * JavaScriptCore.pri:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * JavaScriptCoreSources.bkl:
        * bindings/runtime_array.cpp:
        (RuntimeArray::getOwnPropertySlot):
        (RuntimeArray::put):
        * bindings/runtime_method.cpp:
        (RuntimeMethod::getOwnPropertySlot):
        * kjs/array_object.cpp:
        (ArrayInstance::getOwnPropertySlot):
        (ArrayInstance::put):
        (ArrayInstance::deleteProperty):
        (ArrayProtoFunc::ArrayProtoFunc):
        (ArrayProtoFunc::callAsFunction):
        (ArrayObjectImp::ArrayObjectImp):
        * kjs/bool_object.cpp:
        (BooleanPrototype::BooleanPrototype):
        (BooleanProtoFunc::BooleanProtoFunc):
        (BooleanProtoFunc::callAsFunction):
        (BooleanObjectImp::BooleanObjectImp):
        * kjs/completion.h:
        (KJS::Completion::Completion):
        * kjs/date_object.cpp:
        (KJS::DateProtoFunc::DateProtoFunc):
        (KJS::DateObjectImp::DateObjectImp):
        (KJS::DateObjectFuncImp::DateObjectFuncImp):
        * kjs/error_object.cpp:
        (ErrorPrototype::ErrorPrototype):
        (ErrorProtoFunc::ErrorProtoFunc):
        (ErrorProtoFunc::callAsFunction):
        (ErrorObjectImp::ErrorObjectImp):
        (ErrorObjectImp::construct):
        (NativeErrorPrototype::NativeErrorPrototype):
        (NativeErrorImp::NativeErrorImp):
        (NativeErrorImp::construct):
        (NativeErrorImp::callAsFunction):
        * kjs/function.cpp:
        (KJS::FunctionImp::getOwnPropertySlot):
        (KJS::FunctionImp::put):
        (KJS::FunctionImp::deleteProperty):
        (KJS::FunctionImp::getParameterName):
        (KJS::DeclaredFunctionImp::construct):
        (KJS::IndexToNameMap::unMap):
        (KJS::Arguments::Arguments):
        (KJS::ActivationImp::getOwnPropertySlot):
        (KJS::ActivationImp::deleteProperty):
        (KJS::GlobalFuncImp::GlobalFuncImp):
        * kjs/function_object.cpp:
        (FunctionPrototype::FunctionPrototype):
        (FunctionProtoFunc::FunctionProtoFunc):
        (FunctionProtoFunc::callAsFunction):
        (FunctionObjectImp::FunctionObjectImp):
        (FunctionObjectImp::construct):
        * kjs/grammar.y:
        * kjs/identifier.cpp:
        * kjs/identifier.h:
        * kjs/interpreter.cpp:
        (KJS::Interpreter::init):
        (KJS::Interpreter::initGlobalObject):
        * kjs/interpreter.h:
        * kjs/lookup.h:
        * kjs/math_object.cpp:
        (MathFuncImp::MathFuncImp):
        * kjs/nodes.cpp:
        (ArrayNode::evaluate):
        (FuncDeclNode::processFuncDecl):
        (FuncExprNode::evaluate):
        * kjs/number_object.cpp:
        (NumberPrototype::NumberPrototype):
        (NumberProtoFunc::NumberProtoFunc):
        (NumberObjectImp::NumberObjectImp):
        * kjs/object.cpp:
        (KJS::JSObject::put):
        (KJS::JSObject::defaultValue):
        (KJS::JSObject::hasInstance):
        * kjs/object.h:
        (KJS::JSObject::getOwnPropertySlot):
        * kjs/object_object.cpp:
        (ObjectPrototype::ObjectPrototype):
        (ObjectProtoFunc::ObjectProtoFunc):
        (ObjectObjectImp::ObjectObjectImp):
        * kjs/regexp_object.cpp:
        (RegExpPrototype::RegExpPrototype):
        (RegExpProtoFunc::RegExpProtoFunc):
        (RegExpObjectImp::RegExpObjectImp):
        * kjs/string_object.cpp:
        (KJS::StringInstance::getOwnPropertySlot):
        (KJS::StringInstance::put):
        (KJS::StringInstance::deleteProperty):
        (KJS::StringPrototype::StringPrototype):
        (KJS::StringProtoFunc::StringProtoFunc):
        (KJS::StringProtoFunc::callAsFunction):
        (KJS::StringObjectImp::StringObjectImp):
        (KJS::StringObjectFuncImp::StringObjectFuncImp):
        * kjs/testkjs.cpp:
        (TestFunctionImp::TestFunctionImp):

2007-03-18  Andrew Wellington  <proton@wiretapped.net>

        Reviewed by Mark Rowe
        
        Set Xcode editor to use 4 space indentation (http://webkit.org/coding/coding-style.html) 

        * JavaScriptCore.xcodeproj/project.pbxproj:

2007-03-19  Mark Rowe  <mrowe@apple.com>

        Rubber-stamped by Brady.

        Update references to bugzilla.opendarwin.org with bugs.webkit.org.

        * bindings/c/c_utility.cpp:
        (KJS::Bindings::convertUTF8ToUTF16):
        * kjs/function.cpp:
        (KJS::FunctionImp::callAsFunction):
        * kjs/grammar.y:
        * kjs/keywords.table:
        * kjs/lexer.cpp:
        (KJS::Lexer::shift):

2007-03-18  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Oliver Hunt.
        
        Exposed some extra toUInt32 functionality, as part of the fix for
        REGRESSION: Incomplete document.all implementation breaks abtelectronics.com 
        (Style Change Through JavaScript Blanks Content)

        * JavaScriptCore.exp:
        * kjs/identifier.h:
        (KJS::Identifier::toUInt32):

2007-03-18  Geoffrey Garen  <ggaren@apple.com>

        Removed duplicate export name.
        
        * JavaScriptCore.exp:

2007-03-15  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Maciej Stachowiak.
        
        Fixed <rdar://problem/5064964> Repro ASSERT failure in JS Bindings when 
        closing window @ lowtrades.bptrade.com
        
        Unfortunately, the bindings depend on UString and Identifier as string 
        representations. So, they need to acquire the JSLock when doing something
        that will ref/deref their strings.

        Layout tests, the original site, and Java, Flash, and Quicktime on the 
        web work. No leaks reported. No automated test for this because testing 
        the Java bindings, like math, is hard.
        
        * bindings/runtime.h: Made Noncopyable, just to be sure.
        
        * bindings/c/c_class.cpp: 
        (KJS::Bindings::CClass::~CClass): Acquire the JSLock and explicitly clear the keys
        in our hashtable, since they're UString::Reps, and ref/deref aren't thread-safe.
        (KJS::Bindings::CClass::methodsNamed): Also acquire the JSLock when adding
        keys to the table, since the table ref's them.
        (KJS::Bindings::CClass::fieldNamed): ditto.

        * bindings/c/c_utility.cpp: Removed dead function.
        (KJS::Bindings::convertValueToNPVariant): Acquire the JSLock because doing
        it recursively is pretty cheap, and it's just too confusing to tell whether
        all our callers do it for us.
        (KJS::Bindings::convertNPVariantToValue): ditto
        * bindings/c/c_utility.h:

        * bindings/jni/jni_class.cpp: Same deal as c_class.cpp.
        (JavaClass::JavaClass):
        (JavaClass::~JavaClass):

        * bindings/jni/jni_instance.cpp: Same deal as c_utility.cpp.
        (JavaInstance::stringValue):
        * bindings/jni/jni_jsobject.cpp:
        (JavaJSObject::convertValueToJObject):

        * bindings/jni/jni_runtime.cpp:
        (JavaMethod::~JavaMethod): Moved from header, for clarity.
        (appendClassName): Made this static, so the set of callers is known, and
        we can assert that we hold the JSLock. Also changed it to take a UString
        reference, which makes the calling code simpler.
        (JavaMethod::signature): Store the ASCII value we care about instead of
        a UString, since UString is so much more hassle. Hold the JSLock while
        building up the temporary UString.

        * bindings/jni/jni_runtime.h: Nixed dead code in JavaMethod.
        (KJS::Bindings::JavaString::JavaString): Hold a UString::Rep instead of
        a UString, so we can acquire the JSLock and explicitly release it.
        (KJS::Bindings::JavaString::_commonInit):
        (KJS::Bindings::JavaString::~JavaString):
        (KJS::Bindings::JavaString::UTF8String):
        (KJS::Bindings::JavaString::uchars):
        (KJS::Bindings::JavaString::length):
        (KJS::Bindings::JavaString::ustring):

        * bindings/jni/jni_utility.cpp:
        (KJS::Bindings::convertArrayInstanceToJavaArray): Made this static, so 
        the set of callers is known, and we can assert that we hold the JSLock. 
        (KJS::Bindings::convertValueToJValue): Acquire the JSLock because doing
        it recursively is pretty cheap, and it's just too confusing to tell whether
        all our callers do it for us.

        * bindings/objc/objc_runtime.h: Nixed some dead code.
        * bindings/objc/objc_utility.mm:
        (KJS::Bindings::convertNSStringToString): Same drill as above.

2007-03-18  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Geoff.

        http://bugs.webkit.org/show_bug.cgi?id=13105
        REGRESSION: an exception raised when calculating base value of a dot expression is not returned

        Test: fast/js/dot-node-base-exception.html

        * kjs/nodes.cpp:
        (FunctionCallDotNode::evaluate): Added the necessary KJS_CHECKEXCEPTIONVALUE.

2007-03-18  Steve Falkenburg  <sfalken@apple.com>

        Build fix.

        * JavaScriptCore.vcproj/testkjs/testkjs.vcproj:

2007-03-17  Timothy Hatcher  <timothy@apple.com>

        Reviewed by Mark Rowe.

        Made Version.xcconfig smarter when building for different configurations.
        Now uses the 522+ OpenSource version for Debug and Release, while using the
        full 522.4 version for Production builds. The system prefix is also computed
        based on the current system, so 4522.4 on Tiger and 5522.4 on Leopard.

        * Configurations/JavaScriptCore.xcconfig:
        * Configurations/Version.xcconfig:

2007-03-15  Maciej Stachowiak  <mjs@apple.com>

        Not reviewed.
        
        - build fix

        * wtf/TCSystemAlloc.cpp:

2007-03-15  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Geoff and Steve.
        
        - fix some portability issues with TCMalloc.

        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
        * kjs/config.h:
        * wtf/FastMalloc.cpp:
        (WTF::SizeClass):
        (WTF::InitSizeClasses):
        (WTF::TCMalloc_PageHeap::Split):
        (WTF::TCMalloc_PageHeap::RegisterSizeClass):
        (WTF::TCMalloc_Central_FreeList::length):
        (WTF::TCMalloc_ThreadCache::InitTSD):
        (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
        * wtf/TCSpinLock.h:
        * wtf/TCSystemAlloc.cpp:
        (TryVirtualAlloc):
        (TCMalloc_SystemAlloc):

2007-03-15  Timothy Hatcher  <timothy@apple.com>

        Reviewed by John.

        * Factored out most of our common build settings into .xcconfig files. Anything that was common in
          each build configuration was factored out into the shared .xcconfig file.
        * Adds a Version.xcconfig file to define the current framework version, to be used in other places.
        * Use the new $(BUNDLE_VERSION) (defined in Version.xcconfig) in the preprocessed Info.plist.
        * Use the versions defined in Version.xcconfig to set $(DYLIB_CURRENT_VERSION).

        * Configurations/Base.xcconfig: Added.
        * Configurations/DebugRelease.xcconfig: Added.
        * Configurations/JavaScriptCore.xcconfig: Added.
        * Configurations/Version.xcconfig: Added.
        * Info.plist:
        * JavaScriptCore.xcodeproj/project.pbxproj:

2007-03-16  Shrikant Gangoda  <shrikant.gangoda@celunite.com>

        Gdk build fix.

        * kjs/DateMath.cpp:  gettimeofday comes from <sys/time.h> on Linux.

2007-03-14  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by .

        - Fixed one more build breakage

        * kjs/date_object.cpp:
        (KJS::formatLocaleDate):

2007-03-14  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by .

        - Fixed a build breakage.

        * kjs/DateMath.cpp:
        * kjs/date_object.cpp:
        (KJS::formatLocaleDate):
        (KJS::DateObjectImp::construct):

2007-03-14  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Geoff.

        - rdar://problem/5045720
        - DST changes in US affect JavaScript date calculations (12975)
        This fix was to ensure we properly test for the new changes to DST in the US.
        Also this fixes when we apply DST, now we correctly map most past years to current
        DST rules.  We still have a small issue with years before 1900 or after 2100.
        rdar://problem/5055038

        * kjs/DateMath.cpp: Fix DST to match spec better.
        (KJS::getCurrentUTCTime):
        (KJS::mimimumYearForDST):
        (KJS::maximumYearForDST):
        (KJS::equivalentYearForDST):
        (KJS::getDSTOffset):
        * kjs/DateMath.h: Consolodated common funtionality.
        * kjs/date_object.cpp: Consolodated common functionality.
        (KJS::formatLocaleDate):
        (KJS::DateObjectImp::construct):
        * tests/mozilla/ecma/jsref.js: Added functions for finding the correct days when DST starts and ends.
        * tests/mozilla/ecma/shell.js: Added