ChangeLog 467 KB
Newer Older
ap@webkit.org's avatar
ap@webkit.org committed
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
2008-03-28  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Sam Weinig.

        Fix a dtoa thread safety issue.

        WebCore can call kjs_strtod without holding JS lock, but we didn't have thread safety
        compiled in for dtoa.

        This is a 0.5% regression on SunSpider, which Sam Weinig has volunteered to cover with
        his recent improvement.

        * kjs/dtoa.cpp:
        (Bigint::Balloc):
        (Bigint::Bfree):
        Changed to use fastMalloc/fastDelete - they are much faster than the dtoa custom version was
        in the presence of locking (but somewhat slower in single-threaded case).
        (Bigint::pow5mult): Got rid of the dreaded double-checked locking anti-pattern (had to
        restructure the code to avoid significant performance implications).
        (Bigint::lshift): Rewrote to avoid an allocation, if possible.

        (Bigint::rv_alloc):
        (Bigint::kjs_freedtoa):
        (Bigint::kjs_dtoa):
        Check for USE(MULTIPLE_THREADS), not dtoa legacy MULTIPLE_THREADS.

        * kjs/InitializeThreading.cpp: Added.
        (KJS::initializeThreading):
        * kjs/InitializeThreading.h: Added.
        Initialize threading at KJS level, if enabled.

        * kjs/dtoa.h: Expose dtoa mutex for KJS::initializeThreading.

        * kjs/testkjs.cpp: (kjsmain): Call initializeThreading.

        * JavaScriptCore.exp: Export KJS::initializeThreading.

        * GNUmakefile.am:
        * JavaScriptCore.exp:
        * JavaScriptCore.pri:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCoreSources.bkl:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        Added InitializeThreading.{h,cpp}.

        * wtf/Threading.h: Removed a using directive for WTF::initializeThreading - it is only
        to be called from KJS::initializeThreading, and having it in the global namespace is useless.

beidson@apple.com's avatar
beidson@apple.com committed
49 50 51 52 53 54 55 56 57
2008-03-28  Brady Eidson  <beidson@apple.com>

        Reviewed by Darin

        Export Unicode/UTF8.h and convertUTF16ToUTF8() for more flexible conversion in WebCore

        * JavaScriptCore.exp:
        * JavaScriptCore.xcodeproj/project.pbxproj:

58 59 60 61 62 63 64 65 66 67 68 69
2008-03-27  Darin Adler  <darin@apple.com>

        Reviewed by Mark Rowe.

        <rdar://problem/5826236> Regular expressions with large nested repetition counts can have their
        compiled length calculated incorrectly.

        * pcre/pcre_compile.cpp:
        (multiplyWithOverflowCheck):
        (calculateCompiledPatternLength): Check for overflow when dealing with nested repetition counts
        and bail with an error rather than returning incorrect results.

70 71 72 73 74 75 76 77
2008-03-26  Mark Rowe  <mrowe@apple.com>

        Rubber-stamped by Brady Eidson.

        Update FEATURE_DEFINES to be consistent with the other locations in which it is defined.

        * Configurations/JavaScriptCore.xcconfig:

78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
2008-03-26  Adam Roben  <aroben@apple.com>

        Fix Bug 18060: Assertion failure (JSLock not held) beneath
        JSCallbackObject<Base>::toString

        <http://bugs.webkit.org/show_bug.cgi?id=18060>

        Reviewed by Geoff Garen.

        Bug fix:

        * API/JSCallbackObjectFunctions.h:
        (KJS::JSCallbackObject<Base>::toString): Make the DropAllLocks
        instance only be in scope while calling convertToType.

        Test:

        * API/testapi.c:
        (MyObject_convertToType): Implement type conversion to string.
        * API/testapi.js: Add a test for type conversion to string.

aroben@apple.com's avatar
aroben@apple.com committed
99 100 101 102 103 104 105 106
2008-03-26  Adam Roben  <aroben@apple.com>

        Windows build fix

        * kjs/array_instance.cpp: Touched this.
        * wtf/HashFunctions.h:
        (WTF::intHash): Added 8- and 16-bit versions of intHash.

107 108 109 110 111 112 113
2008-03-26  Adam Roben  <aroben@apple.com>

        Force JSC headers to be copied by touching a file

        * kjs/array_instance.cpp:
        (KJS::ArrayInstance::getPropertyNames):

114 115 116 117 118 119 120 121 122 123 124 125
2008-03-26  Adam Roben  <aroben@apple.com>

        Windows build fix after r31324

        Written with Darin.

        Added HashTable plumbing to support using wchar_t as a key type.

        * wtf/HashFunctions.h:
        * wtf/HashTraits.h:
        (WTF::):

126 127 128 129 130 131 132 133 134 135 136 137
2008-03-26  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.

        - JSC part of fix for "SVG multichar glyph matching matches longest instead of first (affects Acid3 test 79)"
        http://bugs.webkit.org/show_bug.cgi?id=18118

        * wtf/HashFunctions.h:
        (WTF::):
        * wtf/HashTraits.h:
        (WTF::):

ap@webkit.org's avatar
ap@webkit.org committed
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
2008-03-26  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Darin.

        Cache C string identifiers by address, not value, assuming that C strings can only
        be literals.

        1% speedup on Acid3 test 26.

        * kjs/identifier.cpp:
        (KJS::literalIdentifierTable):
        (KJS::Identifier::add):
        Added a new table to cache UString::Reps created from C strings by address. Elements are
        never removed from this cache, as only predefined identifiers can get there.

        * kjs/identifier.h:
        (KJS::Identifier::Identifier): Added a warning.

ap@webkit.org's avatar
ap@webkit.org committed
156 157 158 159 160 161 162 163 164 165 166 167 168 169
2008-03-26  Alexey Proskuryakov  <ap@webkit.org>

        Rubber-stamped by Maciej.

        An assertion was failing in function-toString-object-literals.html when parsing 1e-500.
        The condition existed before, and got uncovered by turning compiled-out dtoa checks into
        ASSERTs.

        The assertion was verifying that the caller wasn't constructing a Bigint from 0.
        This might have had some reason behind it originally, but I couldn't find any,
        and this doesn't look like a reasonable requirement.

        * kjs/dtoa.cpp: (d2b): Removed the assertion (two copies in different code paths).

170 171 172 173 174 175 176 177 178 179
2008-03-25  Adam Roben  <aroben@apple.com>

        Fix Bug 18077: Integrate testapi.c into the Windows build

        <http://bugs.webkit.org/show_bug.cgi?id=18077>

        Reviewed by Steve Falkenburg.

        * JavaScriptCore.vcproj/testapi/testapi.vcproj: Added.

180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
2008-03-25  Adam Roben  <aroben@apple.com>

        Make testapi.c compile under MSVC

        Currently you must compile testapi.c as C++ code since MSVC does not
        support many C features that GCC does.

        Reviewed by Steve Falkenburg.

        * API/testapi.c:
        (nan): Added an implementation of this for MSVC.
        (assertEqualsAsUTF8String): Use malloc instead of dynamically-sized
        stack arrays.
        (assertEqualsAsCharactersPtr): Ditto.
        (print_callAsFunction): Ditto.
        (main): Ditto, and explicitly cast from UniChar* to JSChar*.

197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
2008-03-25  Adam Roben  <aroben@apple.com>

        Stop using JavaScriptCore's custom stdbool.h and stdint.h on Windows

        We can't remove the os-win32 directory yet because other ports (at
        least wx) are still relying on it.

        Reviewed by Steve Falkenburg.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
          - Made all the include paths match the one for the Debug
            configuration (these got out of sync in r30797)
          - Removed os-win32 from the include path
          - Removed os-win32 from the directories we copy to $WebKitOutputDir.
          - Removed stdint.h from the project
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
        Delete the files that we may have previously copied from the os-win32
        directory.

ap@webkit.org's avatar
ap@webkit.org committed
216 217 218 219 220 221
2008-03-25  Alexey Proskuryakov  <ap@webkit.org>

        Windows build fix.

        * kjs/dtoa.cpp: Include stdint.h.

ap@webkit.org's avatar
ap@webkit.org committed
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
2008-03-25  Alexey Proskuryakov  <ap@webkit.org>

        Rubber-stamped by Darin.

        Cleanup dtoa.cpp style.

        * kjs/dtoa.cpp:
        (Bigint::Balloc):
        (Bigint::Bfree):
        (Bigint::multadd):
        (Bigint::s2b):
        (Bigint::hi0bits):
        (Bigint::lo0bits):
        (Bigint::i2b):
        (Bigint::mult):
        (Bigint::pow5mult):
        (Bigint::lshift):
        (Bigint::cmp):
        (Bigint::diff):
        (Bigint::ulp):
        (Bigint::b2d):
        (Bigint::d2b):
        (Bigint::ratio):
        (Bigint::):
        (Bigint::match):
        (Bigint::hexnan):
        (Bigint::kjs_strtod):
        (Bigint::quorem):
        (Bigint::rv_alloc):
        (Bigint::nrv_alloc):
        (Bigint::kjs_freedtoa):
        (Bigint::kjs_dtoa):
        * kjs/dtoa.h:

256 257 258 259 260 261 262 263 264 265 266 267 268 269
2008-03-24  Darin Adler  <darin@apple.com>

        Reviewed by Sam.

        - convert a JavaScript immediate number to a string more efficiently

        2% speedup of Acid3 test 26

        * kjs/JSImmediate.cpp:
        (KJS::JSImmediate::toString): Take advantage of the fact that all immediate
        numbers are integers, and use the faster UString function for formatting integers
        instead of the slower one that works for floating point. I think this is a leftover
        from when immediate numbers were floating point.

weinig@apple.com's avatar
weinig@apple.com committed
270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285
2008-03-23  Sam Weinig  <sam@webkit.org>

        Reviewed by Darin Adler.

        Fix http://bugs.webkit.org/show_bug.cgi?id=18048
        The "thisObject" parameter to JSEvaluateScript is not used properly

        Making passing a thisObject to JSEvaluateScript actually set the thisObject of the created
        ExecState.

        * API/testapi.c:
        (main): Add tests for setting the thisObject when calling JSEvaluateScript.

        * kjs/ExecState.cpp:
        (KJS::ExecState::ExecState): Assign the thisObject to m_thisValue and remove the comment. 

286 287 288 289 290 291 292 293 294 295
2008-03-22  Jesse Ruderman  <jruderman@gmail.com>

        Reviewed by Sam Weinig.  Landed by eseidel.
        
        Make testkjs flush stdout after printing.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * kjs/testkjs.cpp:
        (functionPrint):

296 297 298 299 300 301 302 303 304 305 306 307 308 309 310
2008-03-21  Oliver Hunt  <oliver@apple.com>

        Reviewed by Maciej.

        Optimise lookup of Math, undefined, NaN and Infinity

        Added a method to JSVariableObject to allow us to inject DontDelete properties
        into the symbol table and localStorage.  This results in a 0.4% progression in
        SunSpider, with a 8% gain in math-partial-sums.

        * kjs/JSGlobalObject.cpp:
        (KJS::JSGlobalObject::reset):
        * kjs/JSVariableObject.h:
        (KJS::JSVariableObject::symbolTableInsert):

311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328
2008-03-21  Oliver Hunt  <oliver@apple.com>

        Reviewed by Geoff Garen.

        Global properties that use LocalStorage are not correctly listed as enumerable.

        The problem was caused by JSObject::getPropertyAttributes not being aware
        of the JSVariableObject SymbolTable.  The fix is to make getPropertyAttributes
        virtual and override in JSVariableObject.  This does not produce any performance
        regression.

        * JavaScriptCore.exp:
        * kjs/JSVariableObject.cpp:
        (KJS::JSVariableObject::getPropertyNames):
        (KJS::JSVariableObject::getPropertyAttributes):
        * kjs/JSVariableObject.h:
        * kjs/object.h:

329 330 331 332 333 334 335 336 337 338 339
2008-03-21  Arkadiusz Miskiewicz  <arekm@maven.pl>

        Webkit does not build on linux powerpc

        <http://bugs.webkit.org/show_bug.cgi?id=17019>

        Reviewed by David Kilzer.

        * wtf/TCSpinLock.h:
        (TCMalloc_SpinLock::Unlock):

zecke@webkit.org's avatar
zecke@webkit.org committed
340 341 342 343 344 345 346 347 348 349
2008-03-21  Rodney Dawes  <dobey@wayofthemonkey.com>

        Reviewed by Holger.

        http://bugs.webkit.org/show_bug.cgi?id=17981

        Add javascriptcore_cppflags to Programs_minidom_CPPFLAGS.

        * GNUmakefile.am:

ap@webkit.org's avatar
ap@webkit.org committed
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
2008-03-21  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Oliver Hunt.

        Consolidate static identifier initializers within CommonIdentifiers.

        No reliably measurable change on SunSpider; maybe a tiny improvement (within 0.2%).

        * kjs/CommonIdentifiers.h: Added static identifiers that were lazily initialized
        throughout the code.

        * kjs/date_object.cpp:
        (KJS::DateObjectImp::DateObjectImp):
        * kjs/function_object.cpp:
        (KJS::FunctionPrototype::FunctionPrototype):
        * kjs/object_object.cpp:
        (KJS::ObjectPrototype::ObjectPrototype):
        * kjs/regexp_object.cpp:
        (KJS::RegExpPrototype::RegExpPrototype):
        Use the values from CommonIdentifiers. 

        * kjs/lookup.h: Caching the identifier in a static wasn't a win on SunSpider, removed it.

        * kjs/value.h:
        (KJS::jsNaN): We already have a shared NaN value, no need for a duplicate here.

        * wtf/MathExtras.h:
        (wtf_atan2): Having local variables for numeric_limits constants is good for readability,
        but there is no reason to keep them static.

        * JavaScriptCore.exp: Don't needlessly export JSGlobalObject::s_head.

382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401
2008-03-20  Oliver Hunt  <oliver@apple.com>

        Reviewed by Maciej.

        Fix for leak introduced by inline ScopeChainNode use

        To avoid any extra branches when managing an inline ScopeChainNode
        in the ScopeChain the inline node gets inserted with a refcount of
        2.  This meant than when the ScopeChain was destroyed the ScopeChainNodes
        above the inline node would be leaked.

        We resolve this by manually popping the inline node in the
        FunctionExecState destructor.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * kjs/ExecStateInlines.h:
        (KJS::FunctionExecState::~FunctionExecState):
        * kjs/scope_chain.h:
        (KJS::ScopeChain::popInlineScopeNode):

402 403 404 405 406 407 408 409 410 411
2008-03-20  Mark Rowe  <mrowe@apple.com>

        Reviewed by Sam Weinig.

        Ensure that the defines in FEATURE_DEFINES are sorted so that they will match the default settings of build-webkit.
        This will prevent the world from being rebuilt if you happen to switch between building in Xcode and with build-webkit on the
        command-line.

        * Configurations/JavaScriptCore.xcconfig:

412 413 414 415 416 417 418 419 420 421 422
2008-03-20  David Krause  <david.krause@gmail.com>

        Reviewed by David Kilzer.

        Fix http://bugs.webkit.org/show_bug.cgi?id=17923
        Bug 17923: ARM platform endian defines inaccurate

        * wtf/Platform.h: 
        Replaced !defined(__ARMEL__) check with !defined(__VFP_FP__)
        for PLATFORM(MIDDLE_ENDIAN)

423 424 425 426 427 428
2008-03-20  Maciej Stachowiak  <mjs@apple.com>

        - fix build

        * JavaScriptCore.xcodeproj/project.pbxproj: install Activation.h as private

429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452
2008-03-20  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver.
        
        - reduce function call overhead for 1.014x speedup on SunSpider

        I moved some functions from ExecState.cpp to ExecStateInline.h and
        from JSGlobalObject.cpp to JSGlobalObject.h, and declared them
        inline; machine function call overhead for these was hurting JS
        funcion call overhead.
        
        * kjs/ExecState.cpp:
        * kjs/ExecStateInlines.h: Added.
        (KJS::ExecState::ExecState):
        (KJS::ExecState::~ExecState):
        (KJS::FunctionExecState::FunctionExecState):
        (KJS::FunctionExecState::~FunctionExecState):
        * kjs/JSGlobalObject.cpp:
        * kjs/JSGlobalObject.h:
        (KJS::JSGlobalObject::pushActivation):
        (KJS::JSGlobalObject::checkActivationCount):
        (KJS::JSGlobalObject::popActivation):
        * kjs/function.cpp:

453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469
2008-03-19  Oliver Hunt  <oliver@apple.com>

        Reviewed by Maciej.

        Avoid heap allocating the root scope chain node for eval and closure free functions

        Maciej suggested using an inline ScopeChainNode for functions that don't use eval
        or closures as they are unable to ever capture the scope chain.  This gives us a 2.4%
        win in sunspider, a 15% win in controlflow-recursive, and big (>5%) wins in a number 
        of other tests.

        * kjs/ExecState.cpp:
        (KJS::ExecState::ExecState):
        * kjs/ExecState.h:
        * kjs/scope_chain.h:
        (KJS::ScopeChain::push):

470 471 472 473 474 475 476 477
2008-03-19  Mark Rowe  <mrowe@apple.com>

        Reviewed by Sam Weinig.

        Fix release build.

        * kjs/JSGlobalObject.cpp:  Add missing #include.

weinig@apple.com's avatar
weinig@apple.com committed
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
2008-03-19  Sam Weinig  <sam@webkit.org>

        Reviewed by Anders Carlsson.

        Fix for <rdar://problem/5785694>
        Crash occurs at KJS::Collector::collect() when loading web clip widgets with a PAC file

        Make the activeExecStates stack per JSGlobalObject instead of static to ensure
        thread safety.

        * JavaScriptCore.exp:
        * kjs/ExecState.cpp:
        (KJS::InterpreterExecState::InterpreterExecState):
        (KJS::InterpreterExecState::~InterpreterExecState):
        (KJS::EvalExecState::EvalExecState):
        (KJS::EvalExecState::~EvalExecState):
        (KJS::FunctionExecState::FunctionExecState):
        (KJS::FunctionExecState::~FunctionExecState):
        * kjs/ExecState.h:
        (KJS::):
        * kjs/JSGlobalObject.cpp:
        (KJS::JSGlobalObject::mark):
        * kjs/JSGlobalObject.h:
        (KJS::JSGlobalObject::activeExecStates):
        * kjs/collector.cpp:
        (KJS::Collector::collect):
        (KJS::Collector::reportOutOfMemoryToAllExecStates): Iterate all JSGlobalObjects and report
        the OutOfMemory condition to all the ExecStates in each.

507 508 509 510 511 512 513 514 515 516 517
2008-03-19  Jasper Bryant-Greene  <jasper@unix.geek.nz>

        Reviewed by Maciej Stachowiak.

        Fix http://bugs.webkit.org/show_bug.cgi?id=17941
        Bug 17941: C++-style comments in JavaScriptCore API

        * API/JSBase.h:
        Remove C++-style comments from public JavaScriptCore API, replacing
        with standard C90 block comments.

518 519 520 521 522 523 524 525 526 527
2008-03-19  Mark Rowe  <mrowe@apple.com>

        Reviewed by Oliver Hunt.

        Fix http://bugs.webkit.org/show_bug.cgi?id=17939
        Bug 17939: Crash decompiling "const a = 1, b;"

        * kjs/nodes2string.cpp:
        (KJS::ConstDeclNode::streamTo): Null-check the correct variable.

528 529 530 531 532 533 534 535 536 537 538 539 540 541
2008-03-18  Oliver Hunt  <oliver@apple.com>

        Reviewed by Mark Rowe.

        Bug 17929: Incorrect decompilation with |const|, comma
        http://bugs.webkit.org/show_bug.cgi?id=17929

        There were actually two bugs here. First we weren't correctly handling const
        nodes with multiple declarations. The second issue was caused by us not 
        giving the correct precedence to the initialisers.

        * kjs/nodes2string.cpp:
        (KJS::ConstDeclNode::streamTo):

darin@apple.com's avatar
darin@apple.com committed
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
2008-03-18  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - Speed up JavaScript built-in properties by changing the
          hash table to take advantage of the identifier objects

        5% speedup for Acid3 test 26

        * JavaScriptCore.exp: Updated.
        * kjs/create_hash_table: Compute size of hash table large enough so that there
        are no collisions, but don't generate the hash table.
        * kjs/identifier.h: Made the add function that returns a PassRefPtr public.
        * kjs/lexer.cpp:
        (KJS::Lexer::lex): Updated for change to HashTable interface.
        * kjs/lookup.cpp:
        (KJS::HashTable::changeKeysToIdentifiers): Added. Finds the identifier for
        each property so the equality comparision can be done with pointer comparision.
        * kjs/lookup.h: Made the key be a union of char* with UString::Rep* so it can
        hold identifiers. Added a keysAreIdentifiers flag to the HashTable. Changed
        the Lookup functions to be member functions of HashTable instead.
        * kjs/object.cpp:
        (KJS::JSObject::deleteProperty): Update for change to HashTable.
        (KJS::JSObject::findPropertyHashEntry): Ditto.
        (KJS::JSObject::getPropertyAttributes): Ditto.
        (KJS::JSObject::getPropertyNames): Ditto.

569 570 571 572 573 574 575 576 577 578 579 580 581
2008-03-18  Mark Rowe  <mrowe@apple.com>

        Reviewed by Oliver Hunt.

        Fix http://bugs.webkit.org/show_bug.cgi?id=17925 and http://bugs.webkit.org/show_bug.cgi?id=17927.
        - Bug 17925: Crash in KJS::JSObject::put after setting this.__proto__
        - Bug 17927: Hang after attempting to create circular __proto__

        * kjs/object.cpp:
        (KJS::JSObject::put): Silently ignore attempts to set __proto__ to a non-object, non-null value.
        Return after setting the exception when an attempt to set a cyclic __proto__ is detected so that
        the cyclic value is not set.

582 583 584 585 586 587 588 589 590 591
2008-03-18  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver.
        
        - inline ActivationImp::init for 0.8% SunSpider speedup

        * kjs/Activation.h:
        (KJS::ActivationImp::init): Moved here from function.cpp
        * kjs/function.cpp:

hausmann@webkit.org's avatar
hausmann@webkit.org committed
592 593 594 595 596 597 598 599 600
2008-03-18  Simon Hausmann  <hausmann@webkit.org>

        Fix the Qt build.

        Including config.h like in the other .cpp files gets the #ifdeffery
        correct for rand_s.

        * kjs/JSWrapperObject.cpp:

darin@apple.com's avatar
darin@apple.com committed
601 602 603 604 605 606 607 608 609 610
2008-03-17  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        JavaScriptCore changes to support a WebCore speedup.

        * JavaScriptCore.exp: Export the UString::Rep::computeHash function.
        * wtf/HashSet.h: Added a find and contains function that take a translator,
        like the add function.

611 612 613 614 615 616 617 618 619 620 621 622 623 624 625
2008-03-18  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver.
        
        - a few micro-optimizations for 1.2% SunSpider speedup

        * kjs/function.cpp:
        (KJS::FunctionImp::callAsFunction): check for Return completion before Throw,
        it is more likely.
        * kjs/object.cpp:
        (KJS::JSObject::put): When walking prototype chain, instead of
        checking isObject (a virtual call), compare to jsNull (compare to
        a constant) since null is the only non-object that can be in a
        prototype chain.

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
2008-03-17  Oliver Hunt  <oliver@apple.com>

        Reviewed by Geoff.

        Optimise multi-scope function call resolution

        Refactor multiscope variable resolution and use to add
        optimised FunctionCallResolveNode subclasses.  

        2.6% gain in sunspider performance, *25%* gain in controlflow-recursive

        * kjs/nodes.cpp:
        (KJS::getSymbolTableEntry):
        (KJS::ResolveNode::optimizeVariableAccess):
        (KJS::getNonLocalSymbol):
        (KJS::ExpressionNode::resolveAndCall):
        (KJS::FunctionCallResolveNode::optimizeVariableAccess):
        (KJS::FunctionCallResolveNode::inlineEvaluate):
        (KJS::ScopedVarFunctionCallNode::inlineEvaluate):
        (KJS::ScopedVarFunctionCallNode::evaluate):
        (KJS::ScopedVarFunctionCallNode::evaluateToNumber):
        (KJS::ScopedVarFunctionCallNode::evaluateToBoolean):
        (KJS::ScopedVarFunctionCallNode::evaluateToInt32):
        (KJS::ScopedVarFunctionCallNode::evaluateToUInt32):
        (KJS::NonLocalVarFunctionCallNode::inlineEvaluate):
        (KJS::NonLocalVarFunctionCallNode::evaluate):
        (KJS::NonLocalVarFunctionCallNode::evaluateToNumber):
        (KJS::NonLocalVarFunctionCallNode::evaluateToBoolean):
        (KJS::NonLocalVarFunctionCallNode::evaluateToInt32):
        (KJS::NonLocalVarFunctionCallNode::evaluateToUInt32):
        * kjs/nodes.h:
        (KJS::ScopedVarFunctionCallNode::):
        (KJS::NonLocalVarFunctionCallNode::):

660 661 662 663 664 665 666 667 668 669 670
2008-03-17  David Kilzer  <ddkilzer@apple.com>

        Don't define PLATFORM(MIDDLE_ENDIAN) on little endian ARM.

        Reviewed by Darin.

        See <http://bugs.webkit.org/show_bug.cgi?id=15416#c13>.

        * wtf/Platform.h: Added check for !defined(__ARMEL__) when defining
        PLATFORM(MIDDLE_ENDIAN).

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
2008-03-17  Oliver Hunt  <oliver@apple.com>

        Reviewed by Geoff, Darin and Weinig.

        Add fast multi-level scope lookup
        
        Add logic and AST nodes to provide rapid variable resolution across
        static scope boundaries.  This also adds logic that allows us to skip
        any static scopes that do not contain the variable to be resolved.
        
        This results in a ~2.5% speedup in SunSpider, and gives a 25-30% speedup
        in some simple and ad hoc closure and global variable access tests.

        * JavaScriptCore.exp:
        * kjs/Activation.h:
        * kjs/JSGlobalObject.cpp:
        * kjs/JSGlobalObject.h:
        * kjs/JSVariableObject.cpp:
        * kjs/JSVariableObject.h:
        * kjs/function.cpp:
        (KJS::ActivationImp::isDynamicScope):
        * kjs/nodes.cpp:
        (KJS::ResolveNode::optimizeVariableAccess):
        (KJS::ScopedVarAccessNode::inlineEvaluate):
        (KJS::ScopedVarAccessNode::evaluate):
        (KJS::ScopedVarAccessNode::evaluateToNumber):
        (KJS::ScopedVarAccessNode::evaluateToBoolean):
        (KJS::ScopedVarAccessNode::evaluateToInt32):
        (KJS::ScopedVarAccessNode::evaluateToUInt32):
        (KJS::NonLocalVarAccessNode::inlineEvaluate):
        (KJS::NonLocalVarAccessNode::evaluate):
        (KJS::NonLocalVarAccessNode::evaluateToNumber):
        (KJS::NonLocalVarAccessNode::evaluateToBoolean):
        (KJS::NonLocalVarAccessNode::evaluateToInt32):
        (KJS::NonLocalVarAccessNode::evaluateToUInt32):
        (KJS::IfElseNode::optimizeVariableAccess):
        (KJS::ScopeNode::optimizeVariableAccess):
        * kjs/nodes.h:
        (KJS::ScopedVarAccessNode::):
        (KJS::NonLocalVarAccessNode::):
        * kjs/object.h:

713 714 715 716 717 718 719 720 721
 2008-03-16  weihongzeng  <weihong.zeng@hotmail.com>
 
         Reviewed by Darin Adler.
 
         http://bugs.webkit.org/show_bug.cgi?id=15416
         Add support for mixed-endian processors
 
         * kjs/dtoa.cpp: Add IEEE_ARM, triggered by PLATFORM(MIDDLE_ENDIAN).
 
kevino@webkit.org's avatar
kevino@webkit.org committed
722 723 724 725 726 727 728 729 730 731 732
2008-03-16  Kevin Ollivier  <kevino@theolliviers.com>

        Rubber stamped by Darin.

        Add set-webkit-configuration support for wx port, and centralize
        build dir location setting.

        http://bugs.webkit.org/show_bug.cgi?id=17790

        * jscore.bkl:

sfalken@apple.com's avatar
sfalken@apple.com committed
733 734 735 736 737 738
2008-03-14  Steve Falkenburg  <sfalken@apple.com>

        PGO build fixes.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:

739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769
2008-03-14  Oliver Hunt  <oliver@apple.com>

        Reviewed by Maciej.

        Add logic to track whether a function uses a locally scoped eval or requires a closure
        
        Now that we limit eval we can track those uses of eval that operate
        in the local scope and functions that require a closure.  We track
        this information during initial parsing to avoid yet another tree
        walk.

        * JavaScriptCore.exp:
        * kjs/NodeInfo.h:
        * kjs/Parser.cpp:
        (KJS::Parser::didFinishParsing):
        * kjs/Parser.h:
        (KJS::Parser::parse):
        * kjs/grammar.y:
        * kjs/nodes.cpp:
        (KJS::ScopeNode::ScopeNode):
        (KJS::ProgramNode::ProgramNode):
        (KJS::ProgramNode::create):
        (KJS::EvalNode::EvalNode):
        (KJS::EvalNode::create):
        (KJS::FunctionBodyNode::FunctionBodyNode):
        (KJS::FunctionBodyNode::create):
        * kjs/nodes.h:
        (KJS::ScopeNode::):
        (KJS::ScopeNode::usesEval):
        (KJS::ScopeNode::needsClosure):

ggaren@apple.com's avatar
ggaren@apple.com committed
770 771 772 773 774 775 776 777 778 779 780 781 782 783
2008-03-14  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Beth Dakin.

        Fixed another problem with Vector::shrinkCapacity.
        
        moveOverlapping isn't good enough for the case where the buffer hasn't
        changed, because it still destroys the contents of the buffer.

        * wtf/Vector.h:
        (WTF::::shrinkCapacity): Changed to explicitly check whether the call
        to allocateBuffer produced a new buffer. If it didn't, there's no need
        to move.

ggaren@apple.com's avatar
ggaren@apple.com committed
784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806
2008-03-14  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Beth Dakin.
        
        Fixed a few problems with Vector::shrinkCapacity that I noticed in testing.

        * wtf/Vector.h:
        (WTF::VectorBufferBase::deallocateBuffer): Clear our m_buffer pointer
        when we deallocate m_buffer, in case we're not asked to reallocate a new
        buffer. (Otherwise, we would use a stale m_buffer if we were asked to
        perform any operations after shrinkCapacity was called.)
        
        (WTF::VectorBuffer::allocateBuffer): Made VectorBuffer with inline
        capacity aware that calls to allocateBuffer might be shrinks, rather
        than grows, so we shouldn't allocate a new buffer on the heap unless
        our inline buffer is too small.
        
        (WTF::::shrinkCapacity): Call resize() instead of just setting m_size,
        so destructors run. Call resize before reallocating the buffer to make
        sure that we still have access to the objects we need to destroy. Call
        moveOverlapping instead of move, since a call to allocateBuffer on an
        inline buffer may produce identical storage.

ap@webkit.org's avatar
ap@webkit.org committed
807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822
2008-03-14  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Darin.

        Get rid of a localime() call on platforms that have better alternatives.

        * kjs/DateMath.h: Added getLocalTime();

        * kjs/DateMath.cpp:
        (KJS::getLocalTime):
        (KJS::getDSTOffsetSimple):
        Implementation moved from getDSTOffsetSimple().

        * kjs/date_object.cpp:
        (KJS::DateObjectImp::callAsFunction): Switched to getLocalTime().

ddkilzer@apple.com's avatar
ddkilzer@apple.com committed
823 824 825 826 827 828 829 830
2008-03-14  David D. Kilzer  <ddkilzer@apple.com>

        Unify concept of enabling the Mac Java bridge.

        Reviewed by Darin and Anders.

        * wtf/Platform.h: Define ENABLE_MAC_JAVA_BRIDGE here.

831 832
2008-03-13  Mark Mentovai  <mark@moxienet.com>

833 834 835 836 837 838 839 840
        Reviewed by eseidel.  Landed by eseidel.

        * wtf/FastMalloc.cpp: #include <wtf/HashSet.h> outside of any
        namespaces.

2008-03-13  Mark Mentovai  <mark@moxienet.com>

        Reviewed by eseidel.  Landed by eseidel.
841 842 843 844 845 846

        * pcre/pcre_exec.cpp: Fix misnamed variable, allowing -DDEBUG build
        to succeed.
        * wtf/ThreadingPthreads.cpp: #include <sys/time.h> for gettimeofday
        in non-pch build.

sfalken@apple.com's avatar
sfalken@apple.com committed
847 848 849 850 851 852 853 854 855
2008-03-13  Steve Falkenburg  <sfalken@apple.com>

        PGO build fixes.
        
        Disable PGO for normal release builds.
        Added work-in-progress Release_PGOInstrument/Release_PGOOptimize targets.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:

bdakin@apple.com's avatar
bdakin@apple.com committed
856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873
2008-03-13  Beth Dakin  <bdakin@apple.com>

        Reviewed by Geoff.

        Adding new functionality to Vector. Currently all of the shrink and 
        resize functions on Vector only shrink the size of the Vector, not 
        the capacity. For the Vector to take up as little memory as 
        possible, though, it is necessary to be able to shrink the capacity 
        as well. So this patch adds that functionality. 

        I need this for a speed up I am working on, and Geoff wants to use 
        it in a speed up he is working on also, so he asked me to commit it 
        now. 

        * wtf/Vector.h:
        (WTF::VectorBufferBase::allocateBuffer):
        (WTF::::shrinkCapacity):

874 875 876 877 878 879 880 881 882
2008-03-13  Simon Hausmann  <hausmann@webkit.org>

        Reviewed by Adam Roben.

        Attempt at fixing the Qt/Windows build bot. Quote using double-quotes
        instead of single quotes.

        * pcre/dftables:

sfalken@apple.com's avatar
sfalken@apple.com committed
883 884 885 886 887 888
2008-03-12  Steve Falkenburg  <sfalken@apple.com>

        Build fix.

        * JavaScriptCore.vcproj/WTF/WTF.vcproj:

889 890 891 892 893 894
2008-03-12  Alp Toker  <alp@atoker.com>

        Another autotools testkjs build fix attempt.

        * GNUmakefile.am:

895 896 897 898 899 900 901
2008-03-12  Alp Toker  <alp@atoker.com>

        Attempt to fix the autotools testkjs build on systems with
        non-standard include paths.

        * GNUmakefile.am:

ap@webkit.org's avatar
ap@webkit.org committed
902 903 904 905 906 907 908 909 910
2008-03-11  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Darin.

        <rdar://problem/5787743> REGRESSION: Crash at WTF::Collator::CreateCollator() running fast/js/kde/StringObject.html on Windows

        * wtf/unicode/icu/CollatorICU.cpp:
        (WTF::Collator::createCollator): Check for null (== user default) m_locale before calling strcmp.

sfalken@apple.com's avatar
sfalken@apple.com committed
911 912 913 914 915 916 917 918 919 920 921 922
2008-03-11  Steve Falkenburg  <sfalken@apple.com>

        Disable LTCG/PGO for grammar.cpp and nodes.cpp.
        PGO on these files causes us to hang.
        
        Copy newer vsprops files from relative WebKitLibraries path to environment variable based path.
        
        Reviewed by Oliver.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:

darin@apple.com's avatar
darin@apple.com committed
923 924 925 926 927 928
2008-03-10  Darin Adler  <darin@apple.com>

        - Windows build fix

        * kjs/function.cpp: (KJS::decode): Initialize variable.

929 930 931 932 933 934 935 936 937
2008-03-10  Brent Fulgham  <bfulgham@gmail.com>

        Windows build fix

        Reviewed by Adam.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
        Set the PATH to include Cygwin before running touch.

darin@apple.com's avatar
darin@apple.com committed
938
2008-03-10  Eric Seidel  <eric@webkit.org>
eric@webkit.org's avatar
 
eric@webkit.org committed
939 940 941 942 943 944 945 946 947 948

        Build fix for JSC on windows.

        * API/JSStringRefCF.cpp:
        (JSStringCreateWithCFString):
        * kjs/function.cpp:
        (KJS::decode):
        * kjs/nodes2string.cpp:
        (KJS::escapeStringForPrettyPrinting):

eric@webkit.org's avatar
eric@webkit.org committed
949 950 951 952 953 954 955 956
2008-03-10  Eric Seidel  <eric@webkit.org>
        
        No review, build fix only.
        
        Attempt to fix the windows build?

        * kjs/ustring.h: change unsigned short to UChar

eric@webkit.org's avatar
eric@webkit.org committed
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
2008-03-10  Eric Seidel  <eric@webkit.org>

        Reviewed by Darin.

        Remove KJS::UChar, use ::UChar instead
        http://bugs.webkit.org/show_bug.cgi?id=17017

        * API/JSStringRef.cpp:
        (JSStringCreateWithCharacters):
        (JSStringCreateWithUTF8CString):
        * API/JSStringRefCF.cpp:
        (JSStringCreateWithCFString):
        * JavaScriptCore.exp:
        * kjs/Parser.h:
        * kjs/function.cpp:
        (KJS::decode):
        (KJS::parseInt):
        (KJS::parseFloat):
        (KJS::globalFuncEscape):
        (KJS::globalFuncUnescape):
        * kjs/function_object.cpp:
        (KJS::FunctionObjectImp::construct):
        * kjs/identifier.cpp:
        (KJS::Identifier::equal):
        (KJS::CStringTranslator::translate):
        * kjs/interpreter.h:
        * kjs/lexer.cpp:
        (KJS::Lexer::setCode):
        (KJS::Lexer::shift):
        (KJS::Lexer::lex):
        (KJS::Lexer::convertUnicode):
        (KJS::Lexer::makeIdentifier):
        * kjs/lookup.cpp:
        (KJS::keysMatch):
        * kjs/nodes2string.cpp:
        (KJS::escapeStringForPrettyPrinting):
        (KJS::SourceStream::operator<<):
        * kjs/regexp.cpp:
        (KJS::RegExp::RegExp):
        (KJS::RegExp::match):
        * kjs/string_object.cpp:
        (KJS::substituteBackreferences):
        (KJS::stringProtoFuncCharCodeAt):
        (KJS::stringProtoFuncToLowerCase):
        (KJS::stringProtoFuncToUpperCase):
        (KJS::stringProtoFuncToLocaleLowerCase):
        (KJS::stringProtoFuncToLocaleUpperCase):
        * kjs/ustring.cpp:
        (KJS::UString::Rep::computeHash):
        (KJS::UString::UString):
        (KJS::UString::append):
        (KJS::UString::ascii):
        (KJS::UString::operator=):
        (KJS::UString::is8Bit):
        (KJS::UString::toStrictUInt32):
        (KJS::UString::find):
        (KJS::operator==):
        (KJS::operator<):
        (KJS::compare):
        (KJS::UString::UTF8String):
        * kjs/ustring.h:
        * pcre/pcre.h:

sfalken@apple.com's avatar
sfalken@apple.com committed
1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030
2008-03-09  Steve Falkenburg  <sfalken@apple.com>

        Stop Windows build if an error occurs in a prior project.

        Rubber stamped by Darin.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
        * JavaScriptCore.vcproj/testkjs/testkjs.vcproj:

ggaren@apple.com's avatar
ggaren@apple.com committed
1031
2008-03-09  J¸rg Billeter  <j@bitron.ch>
1032 1033 1034 1035 1036 1037 1038

        Reviewed by Alp Toker.

        Conditionalise ICU for Unicode in the GTK+ port.

        * wtf/Platform.h:

ddkilzer@apple.com's avatar
ddkilzer@apple.com committed
1039 1040 1041 1042 1043 1044 1045 1046
2008-03-07  David D. Kilzer  <ddkilzer@apple.com>

        Unify concept of enabling Netscape Plug-in API (NPAPI).

        Reviewed by Darin.

        * wtf/Platform.h: Define ENABLE_NETSCAPE_PLUGIN_API here.

ggaren@apple.com's avatar
ggaren@apple.com committed
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
2008-03-07  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.
        
        Fixed <rdar://problem/5689093> Stricter (ES4) eval semantics
        
        The basic rule is:
        
        - "eval(s)" is treated as an operator that gives the ES3 eval behavior.
            ... but only if there is no overriding declaration of "eval" in scope.
        - All other invocations treat eval as a function that evaluates a
        script in the context of its "this" object.
            ... but if its "this" object is not the global object it was
            originally associated with, eval throws an exception.
        
        Because only expressions of the form "eval(s)" have access to local
        scope, the compiler can now statically determine whether a function
        needs local scope to be dynamic.

        * kjs/nodes.h: Added FunctionCallEvalNode. It works just like
        FuncationCallResolveNode, except it statically indicates that the node
        may execute eval in the ES3 way.
        * kjs/nodes.cpp:
        * kjs/nodes2string.cpp:

        * tests/mozilla/expected.html: This patch happens to fix a Mozilla JS
        test, but it's a bit of a pyrrhic victory. The test intends to test
        Mozilla's generic API for calling eval on any object, but, in reality,
        we only support calling eval on the global object.

sfalken@apple.com's avatar
sfalken@apple.com committed
1077 1078 1079 1080 1081 1082
2008-03-06  Steve Falkenburg  <sfalken@apple.com>

        Build fix.

        * JavaScriptCore.vcproj/testkjs/testkjs.vcproj:

sfalken@apple.com's avatar
sfalken@apple.com committed
1083 1084 1085 1086 1087 1088
2008-03-06  Steve Falkenburg  <sfalken@apple.com>

        Build fix.

        * JavaScriptCore.vcproj/WTF/WTF.vcproj:

1089 1090 1091 1092 1093 1094
2008-03-06  Alp Toker  <alp@atoker.com>

        Fix the build fix in r30845 to support out-of-tree builds.

        * GNUmakefile.am:

sfalken@apple.com's avatar
sfalken@apple.com committed
1095 1096 1097 1098 1099 1100 1101
2008-03-06  Steve Falkenburg  <sfalken@apple.com>

        Build fix.

        * wtf/ThreadingWin.cpp:
        (WTF::ThreadCondition::timedWait):

1102 1103 1104 1105 1106 1107
2008-03-06  Darin Adler  <darin@apple.com>

        - another small step towards fixing the Qt build

        * JavaScriptCore.pri: Remove more references to the now-obsolete bindings directory.

darin@apple.com's avatar
darin@apple.com committed
1108 1109 1110 1111 1112 1113
2008-03-06  Darin Adler  <darin@apple.com>

        - a small step towards fixing the Qt build

        * JavaScriptCore.pri: Remove references to files no longer present in JavaScriptCore/bindings.

beidson@apple.com's avatar
beidson@apple.com committed
1114 1115 1116 1117 1118 1119 1120
2008-03-06  Brady Eidson  <beidson@apple.com>

        Gtk Build fix

        * wtf/ThreadingGtk.cpp:
        (WTF::ThreadCondition::timedWait):

ap@webkit.org's avatar
ap@webkit.org committed
1121 1122 1123 1124 1125 1126 1127 1128
2008-03-06  Alexey Proskuryakov  <ap@webkit.org>

        Wx build fix.

        * wtf/unicode/icu/CollatorICU.cpp:
        (WTF::Collator::userDefault): Put ICU workaround under both PLATFORM(DARWIN) and
        PLATFORM(CF) checks, so that each port can decide if it wants to use CF on Mac for it.

beidson@apple.com's avatar
beidson@apple.com committed
1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150
2008-03-06  Brady Eidson <beidson@apple.com>

        Reviewed by Darin

        Add a timedWait() method to ThreadCondition

        * JavaScriptCore.exp:

        * wtf/Threading.h:

        * wtf/ThreadingGtk.cpp:
        (WTF::ThreadCondition::timedWait):

        * wtf/ThreadingNone.cpp:
        (WTF::ThreadCondition::timedWait):

        * wtf/ThreadingPthreads.cpp:
        (WTF::ThreadCondition::timedWait):

        * wtf/ThreadingWin.cpp:
        (WTF::ThreadCondition::timedWait): Needs implementation

ap@webkit.org's avatar
ap@webkit.org committed
1151 1152 1153 1154 1155 1156 1157 1158 1159
2008-03-06  Alexey Proskuryakov  <ap@webkit.org>

        More build fixes.

        * jscore.bkl: Add the wtf/unicode directory.
        * wtf/unicode/CollatorDefault.cpp:
        (WTF::Collator::userDefault): Use a constructor that does exist.
        * wtf/unicode/icu/CollatorICU.cpp: Mac build fix for case-sensitive file systems.

darin@apple.com's avatar
darin@apple.com committed
1160 1161 1162 1163 1164 1165
2008-03-06  Darin Adler  <darin@apple.com>

        - try to fix the Qt build

        * JavaScriptCore.pri: Add the wtf/unicode directory.

darin@apple.com's avatar
darin@apple.com committed
1166 1167 1168 1169
2008-03-06  Darin Adler  <darin@apple.com>

        - try to fix the GTK build

darin@apple.com's avatar
darin@apple.com committed
1170
        * GNUmakefile.am: Add a -I for the wtf/unicode directory.
darin@apple.com's avatar
darin@apple.com committed
1171

darin@apple.com's avatar
darin@apple.com committed
1172 1173 1174 1175 1176 1177 1178 1179 1180 1181
2008-03-06  Darin Adler  <darin@apple.com>

        - try to fix the Mac build

        * icu/unicode/parseerr.h: Copied from ../WebCore/icu/unicode/parseerr.h.
        * icu/unicode/ucol.h: Copied from ../WebCore/icu/unicode/ucol.h.
        * icu/unicode/uloc.h: Copied from ../WebCore/icu/unicode/uloc.h.
        * icu/unicode/unorm.h: Copied from ../WebCore/icu/unicode/unorm.h.
        * icu/unicode/uset.h: Copied from ../WebCore/icu/unicode/uset.h.

ap@webkit.org's avatar
ap@webkit.org committed
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
2008-03-06  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Darin.

        <rdar://problem/5687269> Need to create a Collator abstraction for WebCore and JavaScriptCore

        * wtf/Threading.h:
        (WTF::initializeThreading):
        * wtf/ThreadingGtk.cpp:
        (WTF::initializeThreading):
        * wtf/ThreadingNone.cpp:
        * wtf/ThreadingPthreads.cpp:
        * wtf/ThreadingWin.cpp:
        Added AtomicallyInitializedStatic.

        * kjs/string_object.cpp: (KJS::localeCompare): Changed to use Collator.

        * GNUmakefile.am:
        * JavaScriptCore.exp:
        * JavaScriptCore.pri:
        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * JavaScriptCoreSources.bkl:
        Added new fiiles to projects.

        * wtf/unicode/Collator.h: Added.
        (WTF::Collator::):
        * wtf/unicode/CollatorDefault.cpp: Added.
        (WTF::Collator::Collator):
        (WTF::Collator::~Collator):
        (WTF::Collator::setOrderLowerFirst):
        (WTF::Collator::collate):
        * wtf/unicode/icu/CollatorICU.cpp: Added.
        (WTF::cachedCollatorMutex):
        (WTF::Collator::Collator):
        (WTF::Collator::~Collator):
        (WTF::Collator::setOrderLowerFirst):
        (WTF::Collator::collate):
        (WTF::Collator::createCollator):
        (WTF::Collator::releaseCollator):

1223 1224 1225 1226 1227 1228 1229
2008-03-05  Kevin Ollivier  <kevino@theolliviers.com>

        Fix the wx build after the bindings move.

        * JavaScriptCoreSources.bkl:
        * jscore.bkl:

1230 1231 1232 1233 1234 1235 1236 1237
2008-03-05  Alp Toker  <alp@atoker.com>

        GTK+ build fix for breakage introduced in r30800.

        Track moved bridge sources from JavaScriptCore to WebCore.

        * GNUmakefile.am:

1238 1239 1240 1241 1242 1243 1244 1245 1246 1247
2008-03-05  Brent Fulgham  <bfulgham@gmail.com>

        Reviewed by Adam Roben.

        Remove definition of WTF_USE_SAFARI_THEME from wtf/Platform.h
        because the PLATFORM(CG) flag is not set until config.h has
        already included this file.

        * wtf/Platform.h:  Remove useless definition of WTF_USE_SAFARI_THEME

beidson@apple.com's avatar
beidson@apple.com committed
1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267
2008-03-05  Brady Eidson  <beidson@apple.com>

        Reviewed by Alexey and Mark Rowe

        Fix for <rdar://problem/5778247> - Reproducible crash on storage/execute-sql-args.html

        DatabaseThread::unscheduleDatabaseTasks() manually filters through a MessageQueue,
        removing particular items for Databases that were shutting down.

        This filtering operation is not atomic, and therefore causes a race condition with the
        MessageQueue waking up and reading from the message queue.  

        The end result was an attempt to dereference a null DatabaseTask.  Timing-wise, this never
        seemed to happen in a debug build, otherwise an assertion would've caught it.  Replacing that
        assertion with a crash in a release build is what revealed this bug.

        * wtf/MessageQueue.h:
        (WTF::::waitForMessage): Tweak the waiting logic to check the queue's empty state then go back
          to sleep if the queue was empty - checking m_killed each time it wakes up.

1268 1269 1270 1271 1272 1273 1274 1275
2008-03-05  David D. Kilzer  <ddkilzer@apple.com>

        Remove unused header includes from interpreter.cpp.

        Reviewed by Darin.

        * kjs/interpreter.cpp: Remove unused header includes.

andersca@apple.com's avatar
andersca@apple.com committed
1276 1277 1278 1279 1280 1281 1282 1283
2008-03-05  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam.
        
        Remove bindings/.

        * bindings: Removed.

1284 1285 1286 1287 1288 1289
2008-03-05  Anders Carlsson  <andersca@apple.com>

        Don't build bindings/ anymore.
        
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:

andersca@apple.com's avatar
andersca@apple.com committed
1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307
2008-03-05  Anders Carlsson  <andersca@apple.com>

        Reviewed by Geoff.

        Don't build JavaScriptCore/bindings.
        
        * JavaScriptCore.exp:
        Export a couple of new functions. 
        
        * JavaScriptCore.xcodeproj/project.pbxproj:
        Remove bindings/
        
        * kjs/config.h:
        No need to define HAVE_JNI anymore.
        
        * kjs/interpreter.cpp:
        Remove unnecessary include.

ddkilzer@apple.com's avatar
ddkilzer@apple.com committed
1308
2008-03-05  David D. Kilzer  <ddkilzer@apple.com>
1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320

        Allow override of default script file name using command-line argument.

        Reviewed by Adele.

        * API/minidom.c:
        (main): Allow first command-line argument to override the default script
        file name of "minidom.js".
        * API/testapi.c:
        (main): Allow first command-line argument to override the default script
        file name of "testapi.js".

1321 1322 1323 1324 1325 1326
2008-03-04  Mark Rowe  <mrowe@apple.com>

        Mac build fix.

        * JavaScriptCore.exp:  Add new symbol to exports file.

1327 1328 1329 1330 1331 1332 1333 1334 1335
2008-03-03  Oliver Hunt  <oliver@apple.com>

        Reviewed by Anders.

        Make ForInNode check for the timeout interrupt

        * kjs/nodes.cpp:
        (KJS::ForInNode::execute):

1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347
2008-03-02  Brent Fulgham  <bfulgham@gmail.com>

        Reviewed by Alp Toker.

        http://bugs.webkit.org/show_bug.cgi?id=17415
        GTK Build (using autotools) on Mac OS (DarwinPorts) Fails

        Add -lstdc++ to link flags for minidom program.  This corrects
        a build error for the GTK+ on Mac OS.

        * GNUmakefile.am:

1348 1349 1350 1351 1352 1353 1354 1355 1356
2008-03-01  Mark Rowe  <mrowe@apple.com>

        Reviewed by Tim Hatcher.

        Update Xcode configuration to support building debug and release from the mysterious future.

        * Configurations/Base.xcconfig:
        * Configurations/DebugRelease.xcconfig:

1357 1358 1359 1360 1361 1362 1363 1364 1365
2008-02-29  Brent Fulgham  <bfulgham@gmail.com>

        http://bugs.webkit.org/show_bug.cgi?id=17483
        Implement scrollbars on Windows (Cairo)

        Reviewed by Adam Roben.

        * wtf/Platform.h:

1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379
2008-02-29  Adam Roben  <aroben@apple.com>

        Remove unused DebuggerImp::abort and DebuggerImp::aborted

        Reviewed by Tim and Sam.

        * kjs/function_object.cpp:
        (KJS::FunctionObjectImp::construct):
        * kjs/internal.h:
        (KJS::DebuggerImp::DebuggerImp):
        * kjs/nodes.cpp:
        (KJS::Node::handleException):
        (KJS::FunctionBodyNodeWithDebuggerHooks::execute):

1380 1381 1382 1383 1384 1385 1386 1387 1388
2008-02-28  Eric Christopher  <echristo@apple.com>

        Reviewed by Geoffrey Garen.

        ** TOTAL **:          1.005x as fast    2867.6ms +/- 0.4%  2853.2ms +/- 0.3%    significant

        * kjs/nodes.cpp: Tell the compiler that exceptions are unexpected (for
        the sake of branch prediction and code organization).

ap@webkit.org's avatar
ap@webkit.org committed
1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400
2008-02-27  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Sam Weinig.

        http://bugs.webkit.org/show_bug.cgi?id=17030
        Small buffer overflow within initialization

        * kjs/date_object.cpp:
        (KJS::DateObjectFuncImp::callAsFunction):
        (KJS::parseDate):
        Remove unnecessary and incorrect memset() calls - GregorianDateTime can initialize itself.

weinig@apple.com's avatar
weinig@apple.com committed
1401 1402 1403 1404 1405 1406 1407 1408 1409
2008-02-25  Sam Weinig  <sam@webkit.org>

        Reviewed by Dan Bernstein.

        - Add a variant of remove that takes a position and a length.

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

1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421
2008-02-25  Mark Mentovai  <mark@moxienet.com>

        Reviewed by Mark Rowe.

        Enable CollectorHeapIntrospector to build by itself, as well as in an AllInOneFile build.
        http://bugs.webkit.org/show_bug.cgi?id=17538

        * kjs/CollectorHeapIntrospector.cpp: Provide "using" declaration for
          WTF::RemoteMemoryReader.
        * kjs/collector.h: Move CollectorHeap declaration here...
        * kjs/collector.cpp: ... from here.

darin@apple.com's avatar
darin@apple.com committed
1422 1423 1424 1425 1426 1427
2008-02-25  Darin Adler  <darin@apple.com>

        Reviewed by Adam.

        * JavaScriptCore.exp: Sort the contents of this file.

aroben@apple.com's avatar
aroben@apple.com committed
1428 1429 1430 1431 1432 1433 1434
2008-02-25  Adam Roben  <aroben@apple.com>

        MSVC build fix

        * kjs/testkjs.cpp:
        (functionQuit): Don't add a return statement after exit(0) for MSVC.

weinig@apple.com's avatar
weinig@apple.com committed
1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446
2008-02-24  Sam Weinig  <sam@webkit.org>

        Reviewed by Mark Rowe.

        http://bugs.webkit.org/show_bug.cgi?id=17529
        Add support for reading from stdin from testkjs

        * kjs/testkjs.cpp:
        (GlobalObject::GlobalObject): Add readline function to global object.
        (functionReadline): Added. Reads characters from stdin until a '\n' or
        EOF is encountered. The input is returned as a String to the caller.

weinig@apple.com's avatar
weinig@apple.com committed
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
2008-02-24  Sam Weinig  <sam@webkit.org>

        Reviewed by Mark Rowe.

        http://bugs.webkit.org/show_bug.cgi?id=17528
        Give testkjs a bath

        * JavaScriptCore.exp:
        * JavaScriptCore.xcodeproj/project.pbxproj: Make the testkjs.cpp use 4 space indentation.
        * kjs/testkjs.cpp:
        (StopWatch::getElapsedMS):
        (GlobalObject::className):
        (GlobalObject::GlobalObject):
        Rename GlobalImp to GlobalObject and setup the global functions
        in the GlobalObject's constructor. Also, use static functions for
        the implementation so we can use the standard PrototypeFunction
        class and remove TestFunctionImp.
        (functionPrint): Move print() functionality here.
        (functionDebug): Move debug() functionality here.
        (functionGC): Move gc() functionality here.
        (functionVersion): Move version() functionality here.
        (functionRun): Move run() functionality here.
        (functionLoad): Move load() functionality here.
        (functionQuit): Move quit() functionality here.
        (prettyPrintScript): Fix indentation.
        (runWithScripts): Since all the functionality of createGlobalObject is
        now in the GlobalObject constructor, just call new here.
        (parseArguments): Fix indentation.
        (kjsmain): Ditto
        (fillBufferWithContentsOfFile): Ditto.

1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500
2008-02-24  Sam Weinig  <sam@webkit.org>

        Reviewed by Oliver Hunt and Mark Rowe.

        http://bugs.webkit.org/show_bug.cgi?id=17505
        Add support for getting command line arguments in testkjs

        - This slightly changes the behavior of parsing arguments by requiring
          a '-f' before all files. 

        * kjs/testkjs.cpp:
        (createGlobalObject): Add a global property called 'arguments' which
        contains an array with the parsed arguments as strings.
        (runWithScripts): Pass in the arguments vector so that it can be passed
        to the global object.
        (parseArguments): Change parsing rules to require a '-f' before any script
        file. After all '-f' and '-p' arguments have been parsed, the remaining
        are added to the arguments vector and exposed to the script. If there is a
        chance of ambiguity (the user wants to pass the string '-f' to the script),
        the string '--' can be used separate the options from the pass through 
        arguments.
        (kjsmain):

mitz@apple.com's avatar
mitz@apple.com committed
1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512
2008-02-24  Dan Bernstein  <mitz@apple.com>

        Reviewed by Darin Adler.

        - fix http://bugs.webkit.org/show_bug.cgi?id=17511
          REGRESSION: Reproducible crash in SegmentedSubstring::SegmentedSubstring(SegmentedSubstring const&)

        * wtf/Deque.h:
        (WTF::::expandCapacityIfNeeded): Fixed the case where m_start and m_end
        are both zero but the buffer capacity is non-zero.
        (WTF::::prepend): Added validity checks.

1513 1514 1515 1516 1517 1518 1519 1520 1521
2008-02-23  Jan Michael Alonzo  <jmalonzo@unpluggable.com>

        Rubber stamped by Darin.

        Add separator '\' after libJavaScriptCore_la_LIBADD and cleanup
        whitespaces introduced in the previous commit.

        * GNUmakefile.am: 

darin@apple.com's avatar
.:  
darin@apple.com committed
1522 1523 1524 1525
2008-02-23  Jan Michael Alonzo  <jmalonzo@unpluggable.com>

        * GNUmakefile.am: Add GLOBALDEPS for testkjs and minidom.

darin@apple.com's avatar
darin@apple.com committed
1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540
2008-02-23  Darin Adler  <darin@apple.com>

        Reviewed by Anders.

        - http://bugs.webkit.org/show_bug.cgi?id=17496
          make Deque use a circular array; add iterators

        * wtf/Deque.h: Wrote an all-new version of this class that uses a circular
        buffer. Growth policy is identical to vector. Added iterators.

        * wtf/Vector.h: Made two small refinements while using this to implement
        Deque: Made VectorBufferBase derive from Noncopyable, which would have
        saved me some debugging time if it had been there. Renamed Impl and
        m_impl to Buffer and m_buffer.

darin@apple.com's avatar
darin@apple.com committed
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
2008-02-23  Darin Adler  <darin@apple.com>

        Reviewed by Anders.

        - http://bugs.webkit.org/show_bug.cgi?id=17067
          eliminate attributes parameter from JSObject::put for speed/clarity

        * API/JSCallbackObject.h: Removed attribute arguments.
        * API/JSCallbackObjectFunctions.h:
        (KJS::JSCallbackObject<Base>::put): Ditto.
        * API/JSObjectRef.cpp:
        (JSObjectSetProperty): Use initializeVariable or putDirect when necessary
        to set attribute values.
        * JavaScriptCore.exp: Updated.
        * bindings/objc/objc_runtime.h: Removed attribute arguments.
        * bindings/objc/objc_runtime.mm:
        (ObjcFallbackObjectImp::put): Ditto.
        * bindings/runtime_array.cpp:
        (RuntimeArray::put): Ditto.
        * bindings/runtime_array.h: Ditto.
        * bindings/runtime_object.cpp:
        (RuntimeObjectImp::put): Ditto.
        * bindings/runtime_object.h: Ditto. Also removed canPut which was only
        called from one place in WebCore that can use hasProperty instead.

        * kjs/Activation.h: Removed attribute argument from put and added the new
        initializeVariable function that's used to put variables in variable objects.
        Also made isActivationObject a const member.

        * kjs/JSGlobalObject.cpp:
        (KJS::JSGlobalObject::put): Removed attribute argument.
        (KJS::JSGlobalObject::initializeVariable): Added. Used to give variables
        their initial values, which can include the read-only property.
        (KJS::JSGlobalObject::reset): Removed obsolete comments about flags.
        Removed Internal flag, which is no longer needed.
        * kjs/JSGlobalObject.h: More of the same.

        * kjs/JSVariableObject.h: Added pure virtual initializeVariable function.
        (KJS::JSVariableObject::symbolTablePut): Removed checkReadOnly flag; we always
        check read-only.
        (KJS::JSVariableObject::symbolTableInitializeVariable): Added.

        * kjs/array_instance.cpp:
        (KJS::ArrayInstance::put): Removed attribute argument.
        * kjs/array_instance.h: Ditto.

        * kjs/function.cpp:
        (KJS::FunctionImp::put): Ditto.
        (KJS::Arguments::put): Ditto.
        (KJS::ActivationImp::put): Ditto.
        (KJS::ActivationImp::initializeVariable): Added.
        * kjs/function.h: Removed attribute arguments.

        * kjs/function_object.cpp:
        (KJS::FunctionObjectImp::construct): Removed Internal flag.

        * kjs/lookup.h:
        (KJS::lookupPut): Removed attributes argument. Also changed to use putDirect
        instead of calling JSObject::put.
        (KJS::cacheGlobalObject): Ditto.

        * kjs/nodes.cpp:
        (KJS::ConstDeclNode::handleSlowCase): Call initializeVariable to initialize
        the constant.
        (KJS::ConstDeclNode::evaluateSingle): Ditto.
        (KJS::TryNode::execute): Use putDirect to set up the new object.
        (KJS::FunctionBodyNode::processDeclarations): Removed Internal.
        (KJS::ProgramNode::processDeclarations): Ditto.
        (KJS::EvalNode::processDeclarations): Call initializeVariable to initialize
        the variables and functions.
        (KJS::FuncDeclNode::makeFunction): Removed Internal.
        (KJS::FuncExprNode::evaluate): Ditto.

        * kjs/object.cpp: Removed canPut, which was only being used in one code path,
        not the normal high speed one.
        (KJS::JSObject::put): Removed attribute argument. Moved the logic from
        canPut here, in the one code ath that was still using it.
        * kjs/object.h: Removed Internal attribute, ad canPut function. Removed the
        attributes argument to the put function. Made isActivationObject const.

        * kjs/regexp_object.cpp:
        (KJS::RegExpImp::put): Removed attributes argument.
        (KJS::RegExpImp::putValueProperty): Ditto.
        (KJS::RegExpObjectImp::put): Ditto.
        (KJS::RegExpObjectImp::putValueProperty): Ditto.
        * kjs/regexp_object.h: Ditto.

        * kjs/string_object.cpp:
        (KJS::StringInstance::put): Removed attributes argument.
        * kjs/string_object.h: Ditto.

1632 1633 1634 1635 1636 1637
2008-02-23  Jan Michael Alonzo  <jmalonzo@unpluggable.com>

        Not reviewed, Gtk build fix.

        * kjs/testkjs.pro:

1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648
2008-02-23  Alexey Proskuryakov  <ap@webkit.org>

        Windows build fix - move ThreadCondition implementation from WebCore to WTF.

        * wtf/ThreadingWin.cpp:
        (WTF::ThreadCondition::ThreadCondition):
        (WTF::ThreadCondition::~ThreadCondition):
        (WTF::ThreadCondition::wait):
        (WTF::ThreadCondition::signal):
        (WTF::ThreadCondition::broadcast):

ap@webkit.org's avatar
ap@webkit.org committed
1649 1650 1651 1652 1653 1654 1655 1656
2008-02-23  Alexey Proskuryakov  <ap@webkit.org>

        Touch some files, hoping that Windows build bot will create JSC headers.

        * kjs/AllInOneFile.cpp:
        * kjs/array_instance.cpp:
        * wtf/HashTable.cpp:

1657 1658 1659 1660 1661 1662
2008-02-23  Alexey Proskuryakov  <ap@webkit.org>

        Qt/Wx build fix - this file was still in a wrong namespace, too.

        * wtf/ThreadingNone.cpp:

1663 1664 1665 1666 1667 1668
2008-02-23  Alexey Proskuryakov  <ap@webkit.org>

        More build fixing - fix mismatched braces.

        * JavaScriptCore.pri:

ap@webkit.org's avatar
ap@webkit.org committed
1669 1670 1671 1672 1673 1674 1675
2008-02-23  Alexey Proskuryakov  <ap@webkit.org>

        Wx and Gtk build fixes.

        * JavaScriptCore.pri: Don't try to compile ThreadingPthreads.
        * wtf/ThreadingGtk.cpp: Use a correct namespace.

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
2008-02-23  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Darin.

        Move basic threading support from WebCore to WTF.

        Added mutex protection to MessageQueue::killed() for paranoia sake.

        * GNUmakefile.am:
        * JavaScriptCore.exp:
        * JavaScriptCore.pri:
        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * JavaScriptCoreSources.bkl:
        * wtf/Locker.h: Copied from WebCore/platform/Locker.h.
        * wtf/MessageQueue.h: Copied from WebCore/platform/MessageQueue.h.
        (WTF::::killed):
        * wtf/Threading.h: Copied from WebCore/platform/Threading.h.
        * wtf/ThreadingGtk.cpp: Copied from WebCore/platform/gtk/ThreadingGtk.cpp.
        (WebCore::createThread):
        * wtf/ThreadingNone.cpp: Copied from WebCore/platform/ThreadingNone.cpp.
        * wtf/ThreadingPthreads.cpp: Copied from WebCore/platform/pthreads/ThreadingPthreads.cpp.
        (WTF::createThread):
        * wtf/ThreadingWin.cpp: Copied from WebCore/platform/win/ThreadingWin.cpp.
        (WTF::createThread):
        (WTF::Mutex::Mutex):
        (WTF::Mutex::~Mutex):
        (WTF::Mutex::lock):
        (WTF::Mutex::tryLock):
        (WTF::Mutex::unlock):

ggaren@apple.com's avatar
ggaren@apple.com committed
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
2008-02-22  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.
        
        Partial fix for <rdar://problem/5744037> Gmail out of memory (17455)
        
        I'm removing KJS_MEM_LIMIT for the following reasons:
        
        - We have a few reports of KJS_MEM_LIMIT breaking important web
        applications, like GMail and Google Reader. (For example, if you
        simply open 12 GMail tabs, tab #12 will hit the limit.)

        - Firefox has no discernable JS object count limit, so any limit, even
        a large one, is a potential compatibility problem.
        
        - KJS_MEM_LIMIT does not protect against malicious memory allocation,
        since there are many ways to maliciously allocate memory without
        increasing the JS object count.
        
        - KJS_MEM_LIMIT is already mostly broken, since it only aborts the
        script that breaches the limit, not any subsequent scripts.
        
        - We've never gotten bug reports about websites that would have
        benefited from an unbroken KJS_MEM_LIMIT. The initial check-in of
        KJS_MEM_LIMIT (KJS revision 80061) doesn't mention a website that
        needed it.
        
        - Any website that brings you anywhere close to crashing due to the
        number of live JS objects will almost certainly put up the "slow
        script" dialog at least 20 times beforehand.

        * kjs/collector.cpp:
        (KJS::Collector::collect):
        * kjs/collector.h:
        * kjs/nodes.cpp:
        (KJS::TryNode::execute):

1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755
2008-02-22  Oliver Hunt  <oliver@apple.com>

        Reviewed by Alexey P.

        <rdar://problem/5759327> REGRESSION: while(NaN) acts like while(true)

        Fix yet another case where we incorrectly relied on implicit double
        to bool coercion.

        * kjs/nodes.cpp:
        (KJS::PostDecLocalVarNode::evaluateToBoolean):

weinig@apple.com's avatar
weinig@apple.com committed
1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771
2008-02-20  Michael Knaup  <michael.knaup@mac.com>

        Reviewed by Darin.

        Fix for Bug 16753: date set methods with no args should result in NaN (Acid3 bug)
        The set values result in NaN now when called with no args, NaN or +/- inf values.
        The setYear, setFullYear and setUTCFullYear methods used on NaN dates work as 
        descripted in the standard.

        * kjs/date_object.cpp:
        (KJS::fillStructuresUsingTimeArgs):
        (KJS::fillStructuresUsingDateArgs):
        (KJS::setNewValueFromTimeArgs):
        (KJS::setNewValueFromDateArgs):
        (KJS::dateProtoFuncSetYear):

andersca@apple.com's avatar
andersca@apple.com committed
1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788
2008-02-19  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin.

        Change OpaqueJSClass and RootObject to start with a ref count of 1.
        
        * API/JSClassRef.cpp:
        (OpaqueJSClass::OpaqueJSClass):
        (OpaqueJSClass::createNoAutomaticPrototype):
        (OpaqueJSClass::create):
        * API/JSClassRef.h:
        * API/JSObjectRef.cpp:
        (JSClassCreate):
        * bindings/runtime_root.cpp:
        (KJS::Bindings::RootObject::create):
        (KJS::Bindings::RootObject::RootObject):

darin@apple.com's avatar
darin@apple.com committed
1789 1790 1791 1792 1793 1794 1795 1796 1797
2008-02-19  Darin Adler  <darin@apple.com>

        Rubber stamped by Anders.

        - removed explicit initialization to 1 for RefCounted; that's now the default

        * kjs/regexp.cpp:
        (KJS::RegExp::RegExp): Removed RefCounted initializer.

darin@apple.com's avatar
darin@apple.com committed
1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809
2008-02-19  Darin Adler  <darin@apple.com>

        Reviewed by Anders.

        - next step for http://bugs.webkit.org/show_bug.cgi?id=17257
          start ref counts at 1 instead of 0 for speed

        * wtf/RefCounted.h:
        (WTF::RefCounted::RefCounted): Have refcounts default to 1. This allows us to start
        removing the explicit initialization of RefCounted from classes and eventually we
        can remove the ability to have the initial count of 0 entirely.

weinig@apple.com's avatar
weinig@apple.com committed
1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823
2008-02-18  Samuel Weinig  <sam@webkit.org>

        Reviewed by Geoff Garen.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=17419
        Remove CompatMode from JavaScriptCore as it is never set to anything other than NativeMode

        * kjs/JSGlobalObject.cpp:
        (KJS::JSGlobalObject::init):
        * kjs/JSGlobalObject.h:
        (KJS::JSGlobalObject::setDebugger):
        * kjs/date_object.cpp:
        (KJS::dateProtoFuncGetYear):

darin@apple.com's avatar
darin@apple.com committed
1824 1825 1826 1827 1828 1829 1830
2008-02-18  Darin Adler  <darin@apple.com>

        Reviewed by Sam.

        * wtf/ASCIICType.h:
        (WTF::toASCIIHexValue): Added.

1831 1832 1833 1834
2008-02-17  Darin Adler  <darin@apple.com>

        * wtf/ListHashSet.h: (WTF::swap): Removed stray return statement.

aroben@apple.com's avatar
aroben@apple.com committed
1835 1836 1837 1838 1839 1840 1841 1842
2008-02-15  Adam Roben  <aroben@apple.com>

        Make JavaScriptCore's FEATURE_DEFINES match WebCore's

        Reviewed by Mark.

        * Configurations/JavaScriptCore.xcconfig:

1843 1844 1845 1846 1847 1848 1849 1850
2008-02-14  Stephanie Lewis <slewis@apple.com>

        Reviewed by Geoff.

        Update order files.

        * JavaScriptCore.order:

ggaren@apple.com's avatar
ggaren@apple.com committed
1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869
2008-02-14  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.
        
        Fixed <rdar://problem/5737835> nee http://bugs.webkit.org/show_bug.cgi?id=17329
        Crash in JSGlobalObject::popActivation when inserting hyperlink in Wordpress (17329)
        
        Don't reset the "activations" stack in JSGlobalObject::reset, since we
        might be executing a script during the call to reset, and the script
        needs to safely run to completion.
        
        Instead, initialize the "activations" stack when the global object is
        created, and subsequently rely on pushing and popping during normal
        execution to maintain the stack's state.
        
        * kjs/JSGlobalObject.cpp:
        (KJS::JSGlobalObject::init):
        (KJS::JSGlobalObject::reset):

darin@apple.com's avatar
darin@apple.com committed
1870 1871 1872 1873 1874 1875 1876 1877 1878 1879
2008-02-13  Bernhard Rosenkraenzer  <bero@arklinux.org>

        Reviewed by Darin.

        - http://bugs.webkit.org/show_bug.cgi?id=17339
          JavaScriptCore does not build with gcc 4.3

        * kjs/interpreter.cpp: Add include of <unistd.h>, since that's where
        getpid() comes from.

1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891
2008-02-13  Oliver Hunt  <oliver@apple.com>

        Reviewed by Alexey P.

        <rdar://problem/5737003> REGRESSION (r27747): can't browse pictures on fastcupid.com

        When converting numeric values to booleans we need to account for NaN

        * kjs/nodes.cpp:
        (KJS::MultNode::evaluateToBoolean):
        (KJS::ModNode::evaluateToBoolean):

weinig@apple.com's avatar
weinig@apple.com committed
1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905
2008-02-08  Samuel Weinig  <sam@webkit.org>

        Reviewed by Brady Eidson.

        <rdar://problem/5659216> REGRESSION: PLT 0.3% slower due to r28868 (caching ClassNodeList and NamedNodeList)

        - Tweak the statements in isASCIISpace to account for the statistical distribution of
          usage in the PLT.

        .4% speedup on my machine.  Stephanie's machine shows this as .3% speedup.

        * wtf/ASCIICType.h:
        (WTF::isASCIISpace): 

1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920
2008-02-11  Sam Weinig  <sam@webkit.org>

        Reviewed by Anders Carlsson.

        Fixes for:
        <rdar://problem/5735497> Match Firefox's cross-domain model more accurately by return the built-in version of functions even if they have been overridden
        <rdar://problem/5735443> Crash when setting the Window objects prototype to a custom Object and then calling a method on it

        - Expose the native Object.prototype.toString implementation so that it can be used for cross-domain
          toString calling.

        * JavaScriptCore.exp:
        * kjs/object_object.cpp:
        * kjs/object_object.h:

darin@apple.com's avatar
darin@apple.com committed
1921 1922 1923 1924 1925 1926 1927
2008-02-10  Darin Adler  <darin@apple.com>

        Rubber stamped by Eric.

        * kjs/ExecState.h:
        (KJS::ExecState::takeException): Added.

darin@apple.com's avatar
darin@apple.com committed
1928 1929 1930 1931 1932 1933 1934 1935 1936 1937
2008-02-10  Darin Adler  <darin@apple.com>

        Reviewed by Eric.

        - http://bugs.webkit.org/show_bug.cgi?id=17256
          eliminate default ref. count of 0 in RefCounted class

        * wtf/RefCounted.h:
        (WTF::RefCounted::RefCounted): Remove default of 0.

darin@apple.com's avatar
darin@apple.com committed
1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949
2008-02-10  Darin Adler  <darin@apple.com>

        Reviewed by Eric.

        - http://bugs.webkit.org/show_bug.cgi?id=17256
          Make clients of RefCounted explicitly set the count to 0.

        * API/JSClassRef.cpp:
        (OpaqueJSClass::OpaqueJSClass):
        * bindings/runtime_root.cpp:
        (KJS::Bindings::RootObject::RootObject):

darin@apple.com's avatar
darin@apple.com committed
1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972
2008-02-09  Darin Adler  <darin@apple.com>

        Reviewed by Mitz.

        - http://bugs.webkit.org/show_bug.cgi?id=17256
          Change RegExp to start its ref count at 1, not 0

        We'll want to do this to every RefCounted class, one at a time.

        * kjs/nodes.h:
        (KJS::RegExpNode::RegExpNode): Use RegExp::create instead of new RegExp.
        * kjs/regexp.cpp:
        (KJS::RegExp::RegExp): Marked inline, set initial ref count to 1.
        (KJS::RegExp::create): Added. Calls new RegExp then adopts the initial ref.
        * kjs/regexp.h: Reformatted. Made the constructors private. Added static
        create functions that return objects already wrapped in PassRefPtr.
        * kjs/regexp_object.cpp:
        (KJS::regExpProtoFuncCompile): Use RegExp::create instead of new RegExp.
        (KJS::RegExpObjectImp::construct): Ditto.
        * kjs/string_object.cpp:
        (KJS::stringProtoFuncMatch): Ditto.
        (KJS::stringProtoFuncSearch): Ditto.

1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986
2008-02-08  Oliver Hunt  <oliver@apple.com>

        Reviewed by Maciej.

        <rdar://problem/5731773> REGRESSION (r28973): Extraneous parentheses in function.toString()
        https://bugs.webkit.org/show_bug.cgi?id=17214

        Make a subclass of CommaNode to provide the correct precedence for each expression in
        a variable declaration list.

        * kjs/grammar.y:
        * kjs/nodes.h:
        (KJS::VarDeclCommaNode::):

darin@apple.com's avatar
darin@apple.com committed
1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999
2008-02-08  Darin Adler  <darin@apple.com>

        Reviewed by Oliver.

        - fix http://bugs.webkit.org/show_bug.cgi?id=17247
          Labelled continue/break can fail in some cases

        Test: fast/js/continue-break-multiple-labels.html

        * kjs/nodes.h:
        (KJS::StatementNode::pushLabel): Made this virtual.
        (KJS::LabelNode::pushLabel): Forward pushLabel calls to the statement inside.

darin@apple.com's avatar
darin@apple.com committed
2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016
2008-02-08  Darin Adler  <darin@apple.com>

        Reviewed by Eric.

        - fix http://bugs.webkit.org/show_bug.cgi?id=15003
          Function.prototype.constructor should not be DontDelete/ReadOnly (Acid3 bug)

        Test: fast/js/constructor-attributes.html

        * kjs/JSGlobalObject.cpp:
        (KJS::JSGlobalObject::reset): Remove unwanted attributes from "constructor".
        * kjs/function_object.cpp:
        (KJS::FunctionObjectImp::construct): Ditto.
        * kjs/nodes.cpp:
        (KJS::FuncDeclNode::makeFunction): Ditto.
        (KJS::FuncExprNode::evaluate): Ditto.

ggaren@apple.com's avatar
ggaren@apple.com committed
2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
2008-02-06  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Oliver Hunt.
        
        Added an ASSERT to catch refCount underflow, since it caused a leak in
        my last check-in.

        * wtf/RefCounted.h:
        (WTF::RefCounted::deref):

ggaren@apple.com's avatar
ggaren@apple.com committed
2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042
2008-02-06  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.

        PLT speedup related to <rdar://problem/5659272> REGRESSION: PLT .4%
        slower due to r28884 (global variable symbol table optimization)
        
        Tweaked RefCounted::deref() to be a little more efficient.

        1% - 1.5% speedup on my machine. .7% speedup on Stephanie's machine.
        
        * wtf/RefCounted.h:
        (WTF::RefCounted::deref): Don't modify m_refCount if we're just going
        to delete the object anyway. Also, use a simple == test, which might be
        faster than <= on some hardware.

darin@apple.com's avatar
darin@apple.com committed
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
2008-02-06  Darin Adler  <darin@apple.com>

        Reviewed by Sam.

        - fix http://bugs.webkit.org/show_bug.cgi?id=17094
          Array.prototype functions create length properties with DontEnum/DontDelete

        Test results match Gecko with very few obscure exceptions that seem to be
        bugs in Gecko.

        Test: fast/js/array-functions-non-arrays.html

        * kjs/array_object.cpp:
        (KJS::arrayProtoFuncConcat):  Removed DontEnum and DontDelete from the call
        to set length.
        (KJS::arrayProtoFuncPop): Ditto. Also added missing call to deleteProperty,
        which is not needed for real arrays, but is needed for non-arrays.
        (KJS::arrayProtoFuncPush): Ditto.
        (KJS::arrayProtoFuncShift): Ditto.
        (KJS::arrayProtoFuncSlice): Ditto.
        (KJS::arrayProtoFuncSort): Removed incorrect call to set length when
        the array has no elements.
        (KJS::arrayProtoFuncSplice): Removed DontEnum and DontDelete from the call
        to set length.
        (KJS::arrayProtoFuncUnShift): Ditto. Also added a check for 0 arguments to
        make behavior match the specification in that case.
        * kjs/nodes.cpp:
        (KJS::ArrayNode::evaluate): Removed DontEnum and DontDelete from the call
        to set length.

darin@apple.com's avatar
darin@apple.com committed
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
2008-02-06  Darin Adler  <darin@apple.com>

        Reviewed by Sam.

        - replace calls to put to set up properties with calls to putDirect, to
          prepare for a future change where put won't take attributes any more,
          and for a slight performance boost

        * API/JSObjectRef.cpp:
        (JSObjectMakeConstructor): Use putDirect instead of put.
        * kjs/CommonIdentifiers.h: Removed lastIndex.
        * kjs/JSGlobalObject.cpp:
        (KJS::JSGlobalObject::reset): Use putDirect instead of put.
        * kjs/array_object.cpp:
        (KJS::arrayProtoFuncConcat): Took out extra call to get length (unused).
        (KJS::ArrayObjectImp::ArrayObjectImp): Use putDirect instead of put.
        * kjs/error_object.cpp:
        (KJS::ErrorPrototype::ErrorPrototype): Use putDirect instead of put.
        * kjs/function.cpp:
        (KJS::Arguments::Arguments): Use putDirect instead of put.
        (KJS::PrototypeFunction::PrototypeFunction): Use putDirect instead of put.
        * kjs/function_object.cpp:
        (KJS::FunctionObjectImp::construct): Use putDirect instead of put.
        * kjs/nodes.cpp:
        (KJS::FuncDeclNode::makeFunction): Use putDirect instead of put.
        (KJS::FuncExprNode::evaluate): Use putDirect instead of put.
        * kjs/regexp_object.cpp:
        (KJS::regExpProtoFuncCompile): Use setLastIndex instead of put(lastIndex).
        (KJS::RegExpImp::match): Get and set lastIndex by using m_lastIndex instead of
        calling get and put.
        * kjs/regexp_object.h:
        (KJS::RegExpImp::setLastIndex): Added.
        * kjs/string_object.cpp:
        (KJS::stringProtoFuncMatch): Use setLastIndex instead of put(lastIndex).

weinig@apple.com's avatar
weinig@apple.com committed
2108 2109 2110 2111 2112 2113 2114 2115 2116
2008-02-05  Sam Weinig  <sam@webkit.org>

        Reviewed by Anders Carlsson.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=8080
        NodeList (and other DOM lists) items are not enumeratable using for..in

        * JavaScriptCore.exp:

2117 2118 2119 2120 2121 2122 2123 2124
2008-02-05  Mark Rowe  <mrowe@apple.com>

        Reviewed by Oliver Hunt.

        Update versioning to support the mysterious future.

        * Configurations/Version.xcconfig: Add SYSTEM_VERSION_PREFIX_1060.

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
2008-02-04  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Oliver Hunt.

        Fixes Bug 16889: REGRESSION (r29425): Canvas-based graphing calculator fails to run
              Bug 17015: REGRESSION (r29414-29428): www.fox.com "shows" menu fails to render
              Bug 17164: REGRESSION: JavaScript pop-up menu appears at wrong location when hovering image at http://news.chinatimes.com/

        <http://bugs.webkit.org/show_bug.cgi?id=16889>
        <rdar://problem/5696255>

        <http://bugs.webkit.org/show_bug.cgi?id=17015>

        <http://bugs.webkit.org/show_bug.cgi?id=17164>
        <rdar://problem/5720947>

        The ActivationImp tear-off (r29425) introduced a problem with ReadModify
        nodes that first resolve a slot, call valueForReadModifyNode(), and then
        store a value in the previously resolved slot. Since valueForReadModifyNode()
        may cause a tear-off, the slot needs to be resolved again, but this was
        not happening with the existing code.

        * kjs/nodes.cpp:
        (KJS::ReadModifyLocalVarNode::evaluate):
        (KJS::ReadModifyResolveNode::evaluate):

2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166
2008-02-04  Cameron McCormack <cam@mcc.id.au>

        Reviewed by Geoff Garen.

        Remove some unneccesary UNUSED_PARAMs.  Clarify ownership rule of return value of JSObjectCopyPropertyNames.

        * API/JSNode.c:
        (JSNode_appendChild):
        (JSNode_removeChild):
        (JSNode_replaceChild):
        (JSNode_getNodeType):
        (JSNode_getFirstChild):
        * API/JSNodeList.c:
        (JSNodeList_length):
        * API/JSObjectRef.h:

2167 2168 2169 2170 2171 2172 2173 2174 2175
2008-02-04  Rodney Dawes  <dobey@wayofthemonkey.com>

        Reviewed by Alp Toker and Mark Rowe.

        Fix http://bugs.webkit.org/show_bug.cgi?id=17175.
        Bug 17175: Use of C++ compiler flags in CFLAGS

        * GNUmakefile.am: Use global_cxxflags as well as global_cflags in CXXFLAGS.

2176 2177 2178 2179 2180 2181 2182 2183 2184
2008-02-04  Alp Toker  <alp@atoker.com>

        Rubber-stamped by Mark Rowe.

        Remove all trailing whitespace in the GTK+ port and related
        components.

        * GNUmakefile.am:

ggaren@apple.com's avatar
ggaren@apple.com committed
2185 2186 2187 2188 2189 2190 2191 2192 2193 2194
2008-02-02  Darin Adler  <darin@apple.com>

        Reviewed by Geoff Garen.

        PLT speedup related to <rdar://problem/5659272> REGRESSION: PLT .4%
        slower due to r28884 (global variable symbol table optimization)

        Geoff's theory is that the slowdown was due to copying hash tables when
        putting things into the back/forward cache. If that's true, then this
        should fix the problem.
2195

ggaren@apple.com's avatar
ggaren@apple.com committed
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
        (According to Geoff's measurements, in a PLT that exaggerates the
        importance of symbol table saving during cached page creation, this
        patch is a ~3X speedup in cached page creation, and a 9% speedup overall.)

        * JavaScriptCore.exp: Updated.

        * kjs/JSVariableObject.cpp:
        (KJS::JSVariableObject::saveLocalStorage): Updated for changes to SavedProperty,
        which has been revised to avoid initializing each SavedProperty twice when building
        the array. Store the property names too, so we don't have to store the symbol table
        separately. Do this by iterating the symbol table instead of the local storage vector.
        (KJS::JSVariableObject::restoreLocalStorage): Ditto. Restore the symbol table as
        well as the local storage vector.

        * kjs/JSVariableObject.h: Removed save/restoreSymbolTable and do that work inside
        save/restoreLocalStorage instead. Made restoreLocalStorage a non-const member function
        that takes a const reference to a SavedProperties object.

        * kjs/LocalStorage.h: Changed attributes to be unsigned instead of int to match
        other declarations of attributes elsewhere.

        * kjs/property_map.cpp:
        (KJS::SavedProperties::SavedProperties): Updated for data member name change.
        (KJS::PropertyMap::save): Updated for data member name change and to use the new
        inline init function instead of setting the fields directly. This allows us to
        skip initializing the SavedProperty objects when first allocating the array, and
        just do it when we're actually setting up the individual elements.
        (KJS::PropertyMap::restore): Updated for SavedProperty changes.

        * kjs/property_map.h: Changed SavedProperty from a struct to a class. Set it up so
        it does not get initialized at construction time to avoid initializing twice when
        creating an array of SavedProperty. Removed the m_ prefixes from the members of
        the SavedProperties struct. Generally we use m_ for class members and not struct.

2230 2231 2232 2233 2234 2235 2236 2237 2238 2239
2008-02-02  Tony Chang  <idealisms@gmail.com>

        Reviewed by darin.  Landed by eseidel.

        Add #define guards for WIN32_LEAN_AND_MEAN and _CRT_RAND_S.

        * kjs/config.h:
        * wtf/FastMalloc.cpp:
        * wtf/TCSpinLock.h:

2240 2241 2242 2243 2244 2245 2246 2247