1 2010-08-24 Oliver Hunt <oliver@apple.com>
3 Reviewed by Geoff Garen.
5 Don't seed the JS random number generator from time()
6 https://bugs.webkit.org/show_bug.cgi?id=41868
7 <rdar://problem/8171025>
9 Switch to using the secure random number generator to
10 seed the fast random generator, and make the generator
13 * runtime/JSGlobalData.cpp:
14 (JSC::JSGlobalData::JSGlobalData):
15 * runtime/JSGlobalData.h:
16 * runtime/JSGlobalObject.h:
17 (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
18 (JSC::JSGlobalObject::weakRandomNumber):
19 * runtime/MathObject.cpp:
20 (JSC::mathProtoFuncRandom):
22 2010-06-18 Tucker Jay <jay.tucker@nokia.com>
24 Reviewed by NOBODY (OOPS!).
26 [Symbian] Lazy commit of memory required in JSC register file
27 https://bugs.webkit.org/show_bug.cgi?id=34349
29 * JavaScriptCore.pro: Added 1 new Symbian source file
30 * interpreter/RegisterFile.cpp:
31 (JSC::RegisterFile::~RegisterFile):
32 * interpreter/RegisterFile.h:
33 (JSC::RegisterFile::):
34 (JSC::RegisterFile::start):
35 (JSC::RegisterFile::end):
36 (JSC::RegisterFile::size):
37 (JSC::RegisterFile::setNumGlobals):
38 (JSC::RegisterFile::numGlobals):
39 (JSC::RegisterFile::maxGlobals):
40 (JSC::RegisterFile::lastGlobal):
41 (JSC::RegisterFile::markGlobals):
42 (JSC::RegisterFile::markCallFrames):
44 (JSC::RegisterFile::RegisterFile):
45 (JSC::RegisterFile::shrink):
46 (JSC::RegisterFile::grow):
47 * wtf/symbian/RegisterFileAllocatorSymbian.cpp: Added.
48 (WTF::RegisterFileAllocator::RegisterFileAllocator):
49 Helper class to allocate memory required by RegisterFile
51 (WTF::RegisterFileAllocator::~RegisterFileAllocator):
52 (WTF::RegisterFileAllocator::buffer):
53 (WTF::RegisterFileAllocator::grow):
54 (WTF::RegisterFileAllocator::shrink):
55 * wtf/symbian/RegisterFileAllocatorSymbian.h: Added.
56 * wtf/symbian/SymbianDefines.h: Added.
58 2010-06-19 Thiago Macieira <thiago.macieira@nokia.com>
60 Reviewed by Kenneth Rohde Christiansen.
62 Don't use __attribute__((may_alias)) with the Intel compiler,
63 as it doesn't understand it.
67 2010-06-19 Thiago Macieira <thiago.macieira@nokia.com>
69 Reviewed by Kenneth Rohde Christiansen.
71 Fix compilation with the Intel C++ compiler (11.1.072).
73 Like RVCT, label pointers must be void*, not const void*.
77 2010-06-19 Thiago Macieira <thiago.macieira@nokia.com>
79 Reviewed by Kenneth Rohde Christiansen.
81 Add the WTF_COMPILER_INTEL for when the Intel compiler is used
82 for building. Usually, the Intel compiler masquerades as
83 another compiler in the system and gets away with it, but some
84 times specific fixes are required (such as when using language
89 2010-06-07 Benjamin Poulain <benjamin.poulain@nokia.com>
91 Reviewed by Simon Hausmann.
93 [Qt] Crash when compiling on Snow Leopard and running on Leopard
94 https://bugs.webkit.org/show_bug.cgi?id=31403
96 Disable the use of pthread_setname_np and other symbols
97 when targetting Leopard.
99 Use the defines TARGETING_XX instead of BUILDING_ON_XX
100 for features that cannot be used before Snow Leopard.
104 2010-05-10 Laszlo Gombos <laszlo.1.gombos@nokia.com>
106 Reviewed by Darin Adler.
108 [Qt] Disable JIT support for mingw-w64
109 https://bugs.webkit.org/show_bug.cgi?id=38747
111 Disale JIT for mingw-w64 as it is reportedly
114 Thanks for Vanboxem Rruben for the investigation.
118 2010-05-06 Fumitoshi Ukai <ukai@chromium.org>
120 Reviewed by Alexey Proskuryakov.
122 JavaScriptCore/wtf/RandomNumber.h should provide using WTF::*
123 https://bugs.webkit.org/show_bug.cgi?id=38719
125 * wtf/RandomNumber.h:
126 Add using directives.
128 2010-04-28 Simon Hausmann <simon.hausmann@nokia.com>, Kent Hansen <kent.hansen@nokia.com>
130 Reviewed by Darin Adler.
132 JSC's currentThreadStackBase is not reentrant on some platforms
133 https://bugs.webkit.org/show_bug.cgi?id=37195
135 This function needs to be reentrant to avoid memory corruption on platforms where
136 the implementation uses global variables.
138 This patch adds a mutex lock where necessary and makes the Symbian implementation
141 * runtime/Collector.cpp:
142 (JSC::currentThreadStackBaseMutex):
143 (JSC::currentThreadStackBase):
145 2010-04-14 Kent Hansen <kent.hansen@nokia.com>
147 Reviewed by Maciej Stachowiak.
149 Mac OS X: Use deployment target to determine whether memory tagging should be enabled
150 https://bugs.webkit.org/show_bug.cgi?id=34888
152 When building on (Snow) Leopard but targeting Tiger
153 (TARGETING_TIGER defined, BUILDING_ON_TIGER not defined),
154 WebKit would crash on Tiger because the tags passed to mmap
155 caused those function calls to fail.
157 Conversely, when building on Tiger but targeting Leopard
158 (BUILDING_ON_TIGER defined, TARGETING_LEOPARD defined), WebKit
159 would crash on Leopard because the tags passed to vm_map and
160 vm_allocate caused those function calls to fail.
162 Solution: Use TARGETING_TIGER rather than BUILDING_ON_TIGER to
163 govern the tag definitions. Use the same tags for vm_map and
164 vm_allocate regardless of target, since they work on
165 both. Fall back to the mmap tags that work on Tiger (that is,
166 "no tags") if targeting Tiger, since those tags also work on
171 2010-04-02 Ruben Van Boxem <vanboxem.ruben@gmail.com>
173 Reviewed by Eric Seidel.
175 Mingw-w64 fixes for JavaScriptCore
176 https://bugs.webkit.org/show_bug.cgi?id=35607
178 * runtime/Collector.cpp: use the msvc code for mingw-w64 (but not mingw-w32)
179 (JSC::Heap::allocateBlock):
180 (JSC::Heap::freeBlockPtr):
181 (JSC::currentThreadStackBase):
182 (JSC::currentThreadStackBase):
183 * wtf/Platform.h: added COMPILER(MINGW64) check to differentiate between mingw.org and mingw-w64 functions
185 2010-03-29 Patrick Gansterer <paroga@paroga.com>
187 Reviewed by Darin Adler.
189 Corrected name of (u)int64_t compile time assert.
190 https://bugs.webkit.org/show_bug.cgi?id=36739
192 int64_t_is_four_bytes -> int64_t_is_eight_bytes
196 2010-03-29 Thomas Zander <t.zander@nokia.com>
198 Reviewed by Simon Hausmann.
200 https://bugs.webkit.org/show_bug.cgi?id=36742
202 gcc for Symbian doesn't support gcc extensions like atomicity.h - disable
204 * wtf/Threading.h: also detect os symbian
206 2010-03-23 Mark Rowe <mrowe@apple.com>
210 * runtime/ArrayPrototype.cpp:
211 (JSC::arrayProtoFuncSplice): Some versions of GCC emit a warning about the implicit 64- to 32-bit truncation
212 that takes place here. An explicit cast is sufficient to silence it.
214 2010-03-23 Alexey Proskuryakov <ap@apple.com>
218 * runtime/ArrayPrototype.cpp: (JSC::arrayProtoFuncSplice): Fixed a typo - length doesn't
219 need to be converted with toInteger().
221 2010-03-23 Alexey Proskuryakov <ap@apple.com>
223 Reviewed by Geoff Garen.
225 https://bugs.webkit.org/show_bug.cgi?id=36511
226 <rdar://problem/7753498> Safari freezes when using SPUTNIK JavaScript conformance check
228 Test: fast/js/sputnik-S15.4.4.12_A3_T3.html
230 * runtime/ArrayPrototype.cpp: (JSC::arrayProtoFuncSplice): We were incorrectly computing
231 the start offset, and iterated over (almost) all integers. Note that this can be fixed
232 without using doubles, but the code would be much more complicated, and there is no important
233 reason to stick to integers here.
235 2010-03-22 Siddharth Mathur <siddharth.mathur@nokia.com>
237 Reviewed by Laszlo Gombos.
239 [Symbian] More efficient aligned memory allocation for JSC Collector
240 https://bugs.webkit.org/show_bug.cgi?id=34350
242 * JavaScriptCore.pri: Added 2 new Symbian source files and HAL linkage
244 * runtime/Collector.cpp: Reduced port-specific code and added private data member
247 (JSC::Heap::destroy):
248 (JSC::Heap::allocateBlock):
249 (JSC::Heap::freeBlockPtr):
251 * runtime/Collector.h: Added private data member
253 * wtf/symbian: Added.
254 * wtf/symbian/BlockAllocatorSymbian.cpp: Added.
255 (WTF::AlignedBlockAllocator::AlignedBlockAllocator): Helper class to allocate
256 aligned blocks more efficiently as required by Collector
257 (WTF::AlignedBlockAllocator::alloc):
258 (WTF::AlignedBlockAllocator::free):
259 (WTF::AlignedBlockAllocator::destroy):
260 (WTF::AlignedBlockAllocator::~AlignedBlockAllocator):
261 * wtf/symbian/BlockAllocatorSymbian.h: Added.
263 2010-03-22 Geoffrey Garen <ggaren@apple.com>
265 Reviewed by Sam Weinig.
267 Fixed <rdar://problem/7728196> REGRESSION (r46701): -(-2147483648)
268 evaluates to -2147483648 on 32 bit (35842)
270 Two ways to fix the same bug:
272 1. Check for overflow when negating, since negating the largest negative
275 2. Constant-fold even when negating a negative, since, like they say in
276 high school, "math works."
278 * assembler/MacroAssemblerARM.h:
279 (JSC::MacroAssemblerARM::branchNeg32):
280 * assembler/MacroAssemblerX86Common.h:
281 (JSC::MacroAssemblerX86Common::branchNeg32): Added a branching version
282 of the negate operator.
284 * jit/JITArithmetic.cpp:
285 (JSC::JIT::emit_op_negate): Use the branching version of the negate
286 operator to check for overflow.
288 (JSC::JIT::emitSlow_op_negate): Link the check for overflow to a slow case.
289 (We could emit inline code for this, since we know what the result would
290 be, but that's probably just a waste of generated code.)
292 * parser/Grammar.y: Constant fold even when negating a negative.
294 2010-03-17 Mike Homey <glandium@debian.org>
296 Reviewed by Gustavo Noronha.
298 Build fix for SPARC. Fix missing macro value.
302 2010-03-03 Mark Rowe <mrowe@apple.com>
304 Reviewed by Geoff Garen.
306 Add virtual memory tags for TCMalloc and WebCore's purgeable buffers.
308 * wtf/TCSystemAlloc.cpp:
309 (TryMmap): Use the VM tag.
310 * wtf/VMTags.h: Make use of VM_MEMORY_TCMALLOC and VM_MEMORY_WEBCORE_PURGEABLE_BUFFERS.
312 2010-03-01 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
314 Reviewed by Simon Hausmann.
316 Fix the Qt build on Mac OS X/Cocoa 64-bit
318 * JavaScriptCore.pri: Add missing implementation file to resolve JSC symbols
320 2010-02-26 Janne Koskinen <janne.p.koskinen@digia.com>
322 Reviewed by Simon Hausmann.
324 [Qt] Symbian specific getCPUTime implemetation
325 https://bugs.webkit.org/show_bug.cgi?id=34742
327 Default implementation doesn't work on Symbian devices.
328 This change adds a proper implementation by
329 asking thread execution time from the current thread.
331 * runtime/TimeoutChecker.cpp:
334 2010-02-15 Gabor Loki <loki@webkit.org>
336 Reviewed by Gavin Barraclough.
338 Fix the SP at ctiOpThrowNotCaught on Thumb2 (JSVALUE32)
339 https://bugs.webkit.org/show_bug.cgi?id=34939
343 2010-02-15 Gavin Barraclough <barraclough@apple.com>
345 Reviewed by NOBODY (Build fix).
347 Add missing cast for !YARR (PPC) builds.
349 * runtime/RegExp.cpp:
350 (JSC::RegExp::match):
352 2010-02-14 Laszlo Gombos <laszlo.1.gombos@nokia.com>
354 Reviewed by Adam Barth.
356 Implement NEVER_INLINE and NO_RETURN for RVCT
357 https://bugs.webkit.org/show_bug.cgi?id=34740
359 * wtf/AlwaysInline.h:
361 2010-02-12 Kwang Yul Seo <skyul@company100.net>
363 Reviewed by Adam Barth.
365 Typedef both JSChar and UChar to wchar_t in RVCT.
366 https://bugs.webkit.org/show_bug.cgi?id=34560
368 Define both JSChar and UChar to wchar_t as the size
369 of wchar_t is 2 bytes in RVCT.
372 * wtf/unicode/qt4/UnicodeQt4.h:
374 2009-10-06 Yongjun Zhang <yongjun.zhang@nokia.com>
376 Reviewed by Simon Hausmann.
378 Get rid of WINSCW hack for UnSpecifiedBoolType
380 Add parenthesis around (RefPtr::*UnspecifiedBoolType) to make the WINSCW
381 compiler work with the default UnSpecifiedBoolType() operator.
383 https://bugs.webkit.org/show_bug.cgi?id=28054
387 2010-02-09 Janne Koskinen <janne.p.koskinen@digia.com>
389 Reviewed by Laszlo Gombos.
391 [Qt] use nanval() for Symbian as nonInlineNaN
392 https://bugs.webkit.org/show_bug.cgi?id=34170
394 numeric_limits<double>::quiet_NaN is broken in Symbian
395 causing NaN to be evaluated as a number.
397 * runtime/JSValue.cpp:
400 2010-02-01 Kent Tamura <tkent@chromium.org>
402 Reviewed by Darin Adler.
404 Date.UTC() should apply TimeClip operation.
405 https://bugs.webkit.org/show_bug.cgi?id=34461
407 ECMAScript 5 15.9.4.3:
408 > 9 Return TimeClip(MakeDate(MakeDay(yr, m, dt), MakeTime(h, min, s, milli))).
410 * runtime/DateConstructor.cpp:
411 (JSC::dateUTC): Calls WTF::timeClip().
413 2010-02-01 Kent Tamura <tkent@chromium.org>
415 Reviewed by Darin Adler.
417 Fix a bug that Math.round() retunrs incorrect results for huge integers
418 https://bugs.webkit.org/show_bug.cgi?id=34462
420 * runtime/MathObject.cpp:
421 (JSC::mathProtoFuncRound): Avoid "arg + 0.5".
423 2010-02-01 Patrick Gansterer <paroga@paroga.com>
425 Reviewed by Darin Adler.
427 [Qt] WinCE buildfix after r52729 and fix for Q_BIG_ENDIAN typo.
428 https://bugs.webkit.org/show_bug.cgi?id=34378
432 2010-01-31 Patrick Gansterer <paroga@paroga.com>
434 Reviewed by Darin Adler.
436 Buildfix for WinCE + style fixes (TLS_OUT_OF_INDEXES is not defined).
437 https://bugs.webkit.org/show_bug.cgi?id=34380
439 * wtf/ThreadSpecific.h:
441 2010-01-31 Kent Tamura <tkent@chromium.org>
443 Reviewed by Darin Adler.
445 [Windows] Fix a bug of round() with huge integral numbers
446 https://bugs.webkit.org/show_bug.cgi?id=34297
448 Fix a bug that round() for huge integral numbers returns incorrect
449 results. For example, round(8639999913600001) returns
450 8639999913600002 without this change though the double type can
451 represent 8639999913600001 precisely.
453 Math.round() of JavaScript has a similar problem. But this change
454 doesn't fix it because Math.round() doesn't use round() of
458 (round): Avoid to do "num + 0.5" or "num - 0.5".
459 (roundf): Fixed similarly.
460 (llround): Calls round().
461 (llroundf): Calls roundf().
462 (lround): Calls round().
463 (lroundf): Calls roundf().
465 2010-01-27 Anton Muhin <antonm@chromium.org>
467 Reviewed by Darin Adler.
469 Remove trailing \ from inline function code
470 https://bugs.webkit.org/show_bug.cgi?id=34223
472 * assembler/ARMv7Assembler.h:
473 (JSC::ARMThumbImmediate::countLeadingZerosPartial):
475 2010-01-27 Kwang Yul Seo <skyul@company100.net>
477 Reviewed by Oliver Hunt.
479 [BREWMP] Add MarkStack fastMalloc implementation for platforms without VirtualAlloc or mmap.
480 https://bugs.webkit.org/show_bug.cgi?id=33582
482 Use fastMalloc and fastFree to implement MarkStack::allocateStack and
483 MarkStack::releaseStack for platforms without page level allocation.
485 * runtime/MarkStack.h:
486 (JSC::MarkStack::MarkStackArray::shrinkAllocation):
487 * runtime/MarkStackNone.cpp: Added.
488 (JSC::MarkStack::initializePagesize):
489 (JSC::MarkStack::allocateStack):
490 (JSC::MarkStack::releaseStack):
492 2010-01-27 Kwang Yul Seo <skyul@company100.net>
494 Reviewed by Eric Seidel.
496 [BREWMP] Don't use time function
497 https://bugs.webkit.org/show_bug.cgi?id=33577
499 Calling time(0) in BREW devices causes a crash because time
500 is not properly ported in most devices. Cast currentTime() to
501 time_t to get the same result as time(0).
504 (WTF::calculateUTCOffset):
506 2010-01-27 Alexey Proskuryakov <ap@apple.com>
508 Revert r53899 (HashMap<AtomicStringImpl*, Value> key checks) and subsequent build fixes,
509 because they make SVG tests crash in release builds.
517 (WTF::::addPassingHashCode):
518 (WTF::::removeAndInvalidate):
521 (WTF::::checkTableConsistency):
522 (WTF::::checkTableConsistencyExceptSize):
524 (WTF::GenericHashTraits::emptyValue):
526 * wtf/RefPtrHashMap.h:
529 2010-01-26 Alexey Proskuryakov <ap@apple.com>
531 More Windows build fixing.
533 * wtf/HashTraits.h: _msize takes void*, remove const qualifier from type.
535 2010-01-26 Alexey Proskuryakov <ap@apple.com>
539 * wtf/HashTraits.h: Include malloc.h for _msize().
541 2010-01-26 Alexey Proskuryakov <ap@apple.com>
545 * wtf/HashTable.h: (WTF::HashTable::checkTableConsistencyExceptSize): Remove const from a
546 static (empty) version of this function.
548 2010-01-26 Alexey Proskuryakov <ap@apple.com>
550 Reviewed by Darin Adler.
552 https://bugs.webkit.org/show_bug.cgi?id=34150
553 WebKit needs a mechanism to catch stale HashMap entries
555 It is very difficult to catch stale pointers that are HashMap keys - since a pointer's hash
556 is just its value, it is very unlikely that any observable problem is reproducible.
558 This extends hash table consistency checks to check that pointers are referencing allocated
559 memory blocks, and makes it possible to invoke the checks explicitly (it is not feasible
560 to enable CHECK_HASHTABLE_CONSISTENCY by default, because that affects performance too much).
562 * wtf/HashMap.h: (WTF::::checkConsistency): Call through to HashTable implementation. We can
563 add similar calls to HashSet and HashCountedSet, but I haven't seen hard to debug problems
566 * wtf/HashSet.h: (WTF::::remove): The version of checkTableConsistency that's guarded by
567 CHECK_HASHTABLE_CONSISTENCY is now called internalCheckTableConsistency().
570 (WTF::HashTable::internalCheckTableConsistency):
571 (WTF::HashTable::internalCheckTableConsistencyExceptSize):
572 (WTF::HashTable::checkTableConsistencyExceptSize):
573 Expose checkTableConsistency() even if CHECK_HASHTABLE_CONSISTENCY is off.
574 (WTF::::add): Updated for checkTableConsistency renaming.
575 (WTF::::addPassingHashCode): Ditto.
576 (WTF::::removeAndInvalidate): Ditto.
577 (WTF::::remove): Ditto.
578 (WTF::::rehash): Ditto.
579 (WTF::::checkTableConsistency): The assertion for !shouldExpand() was not correct - this
580 function returns true for tables with m_table == 0.
581 (WTF::::checkTableConsistencyExceptSize): Call checkValueConsistency for key. Potentially,
582 we could do the same for values.
585 (WTF::GenericHashTraits::checkValueConsistency): An empty function that can be overridden
586 to add checks. Currently, the only override is for pointer hashes.
588 * wtf/RefPtrHashMap.h: (WTF::::remove): Updated for checkTableConsistency renaming.
590 2010-01-26 Lyon Chen <liachen@rim.com>
592 Reviewed by Maciej Stachowiak.
594 Opcode.h use const void* for Opcode cause error #1211 for RVCT compiler
595 https://bugs.webkit.org/show_bug.cgi?id=33902
599 2010-01-26 Steve Falkenburg <sfalken@apple.com>
601 Reviewed by Oliver Hunt.
603 Windows build references non-existent include paths
604 https://bugs.webkit.org/show_bug.cgi?id=34175
606 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
607 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
608 * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
609 * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
610 * JavaScriptCore.vcproj/testapi/testapi.vcproj:
611 * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
613 2010-01-26 Oliver Hunt <oliver@apple.com>
615 Reviewed by Geoffrey Garen.
617 Using JavaScriptCore API with a webkit vended context can result in slow script dialog
618 https://bugs.webkit.org/show_bug.cgi?id=34172
620 Make the APIShim correctly increment and decrement the timeout
624 (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
625 (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
626 (JSC::APICallbackShim::APICallbackShim):
627 (JSC::APICallbackShim::~APICallbackShim):
629 2010-01-26 Simon Hausmann <simon.hausmann@nokia.com>
631 [Qt] Fix compilation of QtScript with non-gcc compilers
633 Variable length stack arrays are a gcc extension. Use QVarLengthArray
634 as a more portable solution that still tries to allocate on the stack
637 * qt/api/qscriptvalue_p.h:
638 (QScriptValuePrivate::call):
640 2010-01-26 Simon Hausmann <simon.hausmann@nokia.com>
642 Reviewed by Tor Arne Vestbø.
644 [Qt] Fix the build on platforms without JIT support.
646 The JIT support should be determined at compile-time via wtf/Platform.h
648 * qt/api/QtScript.pro:
650 2010-01-26 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>
652 Reviewed by Simon Hausmann.
654 First steps of the QtScript API.
656 Two new classes were created; QScriptEngine and QScriptValue.
657 The first should encapsulate a javascript context and the second a script
660 This API is still in development, so it isn't compiled by default.
661 To trigger compilation, pass --qmakearg="CONFIG+=build-qtscript" to
664 https://bugs.webkit.org/show_bug.cgi?id=32565
666 * qt/api/QtScript.pro: Added.
667 * qt/api/qscriptconverter_p.h: Added.
668 (QScriptConverter::toString):
669 * qt/api/qscriptengine.cpp: Added.
670 (QScriptEngine::QScriptEngine):
671 (QScriptEngine::~QScriptEngine):
672 (QScriptEngine::evaluate):
673 (QScriptEngine::collectGarbage):
674 * qt/api/qscriptengine.h: Added.
675 * qt/api/qscriptengine_p.cpp: Added.
676 (QScriptEnginePrivate::QScriptEnginePrivate):
677 (QScriptEnginePrivate::~QScriptEnginePrivate):
678 (QScriptEnginePrivate::evaluate):
679 * qt/api/qscriptengine_p.h: Added.
680 (QScriptEnginePrivate::get):
681 (QScriptEnginePrivate::collectGarbage):
682 (QScriptEnginePrivate::makeJSValue):
683 (QScriptEnginePrivate::context):
684 * qt/api/qscriptvalue.cpp: Added.
685 (QScriptValue::QScriptValue):
686 (QScriptValue::~QScriptValue):
687 (QScriptValue::isValid):
688 (QScriptValue::isBool):
689 (QScriptValue::isBoolean):
690 (QScriptValue::isNumber):
691 (QScriptValue::isNull):
692 (QScriptValue::isString):
693 (QScriptValue::isUndefined):
694 (QScriptValue::isError):
695 (QScriptValue::isObject):
696 (QScriptValue::isFunction):
697 (QScriptValue::toString):
698 (QScriptValue::toNumber):
699 (QScriptValue::toBool):
700 (QScriptValue::toBoolean):
701 (QScriptValue::toInteger):
702 (QScriptValue::toInt32):
703 (QScriptValue::toUInt32):
704 (QScriptValue::toUInt16):
705 (QScriptValue::call):
706 (QScriptValue::engine):
707 (QScriptValue::operator=):
708 (QScriptValue::equals):
709 (QScriptValue::strictlyEquals):
710 * qt/api/qscriptvalue.h: Added.
712 * qt/api/qscriptvalue_p.h: Added.
713 (QScriptValuePrivate::):
714 (QScriptValuePrivate::get):
715 (QScriptValuePrivate::QScriptValuePrivate):
716 (QScriptValuePrivate::isValid):
717 (QScriptValuePrivate::isBool):
718 (QScriptValuePrivate::isNumber):
719 (QScriptValuePrivate::isNull):
720 (QScriptValuePrivate::isString):
721 (QScriptValuePrivate::isUndefined):
722 (QScriptValuePrivate::isError):
723 (QScriptValuePrivate::isObject):
724 (QScriptValuePrivate::isFunction):
725 (QScriptValuePrivate::toString):
726 (QScriptValuePrivate::toNumber):
727 (QScriptValuePrivate::toBool):
728 (QScriptValuePrivate::toInteger):
729 (QScriptValuePrivate::toInt32):
730 (QScriptValuePrivate::toUInt32):
731 (QScriptValuePrivate::toUInt16):
732 (QScriptValuePrivate::equals):
733 (QScriptValuePrivate::strictlyEquals):
734 (QScriptValuePrivate::assignEngine):
735 (QScriptValuePrivate::call):
736 (QScriptValuePrivate::engine):
737 (QScriptValuePrivate::context):
738 (QScriptValuePrivate::value):
739 (QScriptValuePrivate::object):
740 (QScriptValuePrivate::inherits):
741 (QScriptValuePrivate::isJSBased):
742 (QScriptValuePrivate::isNumberBased):
743 (QScriptValuePrivate::isStringBased):
744 * qt/api/qtscriptglobal.h: Added.
745 * qt/tests/qscriptengine/qscriptengine.pro: Added.
746 * qt/tests/qscriptengine/tst_qscriptengine.cpp: Added.
747 (tst_QScriptEngine::tst_QScriptEngine):
748 (tst_QScriptEngine::~tst_QScriptEngine):
749 (tst_QScriptEngine::init):
750 (tst_QScriptEngine::cleanup):
751 (tst_QScriptEngine::collectGarbage):
752 (tst_QScriptEngine::evaluate):
753 * qt/tests/qscriptvalue/qscriptvalue.pro: Added.
754 * qt/tests/qscriptvalue/tst_qscriptvalue.cpp: Added.
755 (tst_QScriptValue::tst_QScriptValue):
756 (tst_QScriptValue::~tst_QScriptValue):
757 (tst_QScriptValue::init):
758 (tst_QScriptValue::cleanup):
759 (tst_QScriptValue::ctor):
760 (tst_QScriptValue::toString_data):
761 (tst_QScriptValue::toString):
762 (tst_QScriptValue::copyConstructor_data):
763 (tst_QScriptValue::copyConstructor):
764 (tst_QScriptValue::assignOperator_data):
765 (tst_QScriptValue::assignOperator):
766 (tst_QScriptValue::dataSharing):
767 (tst_QScriptValue::constructors_data):
768 (tst_QScriptValue::constructors):
769 (tst_QScriptValue::call):
770 * qt/tests/tests.pri: Added.
771 * qt/tests/tests.pro: Added.
773 2010-01-25 Dmitry Titov <dimich@chromium.org>
775 Reviewed by David Levin.
777 Fix Chromium Linux tests: the pthread functions on Linux produce segfault if they receive 0 thread handle.
778 After r53714, we can have 0 thread handles passed to pthread_join and pthread_detach if corresponding threads
779 were already terminated and their threadMap entries cleared.
782 * wtf/ThreadingPthreads.cpp:
783 (WTF::waitForThreadCompletion):
786 2010-01-24 Laszlo Gombos <laszlo.1.gombos@nokia.com>
788 Reviewed by Maciej Stachowiak.
790 Refactor JITStubs.cpp so that DEFINE_STUB_FUNCTION is only used once for each function
791 https://bugs.webkit.org/show_bug.cgi?id=33866
793 Place the guard USE(JSVALUE32_64) inside the body of the DEFINE_STUB_FUNCTION
794 macro for those functions that are always present.
797 (JSC::DEFINE_STUB_FUNCTION):
799 2010-01-22 Kevin Watters <kevinwatters@gmail.com>
801 Reviewed by Kevin Ollivier.
803 [wx] Remove the Bakefile build system, which is no longer being used.
805 https://bugs.webkit.org/show_bug.cgi?id=34022
807 * JavaScriptCoreSources.bkl: Removed.
808 * jscore.bkl: Removed.
810 2010-01-22 Steve Falkenburg <sfalken@apple.com>
812 Reviewed by Darin Adler.
814 https://bugs.webkit.org/show_bug.cgi?id=34025
815 Enable client-based Geolocation abstraction for Mac, Windows AppleWebKit targets.
817 * Configurations/FeatureDefines.xcconfig:
819 2010-01-22 Dmitry Titov <dimich@chromium.org>
821 Not reviewed, attempted Snow Leopard build fix.
823 * wtf/ThreadingPthreads.cpp: Add a forward declaration of a function which is not 'static'.
825 2009-01-22 Dmitry Titov <dimich@chromium.org>
827 Reviewed by Maciej Stachowiak.
829 Fix the leak of ThreadIdentifiers in threadMap across threads.
830 https://bugs.webkit.org/show_bug.cgi?id=32689
832 Test is added to DumpRenderTree.mm.
834 * Android.mk: Added file ThreadIdentifierDataPthreads.(h|cpp) to build.
835 * Android.v8.wtf.mk: Ditto.
836 * GNUmakefile.am: Ditto.
837 * JavaScriptCore.gyp/JavaScriptCore.gyp: Ditto.
838 * JavaScriptCore.gypi: Ditto.
839 * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
841 * wtf/ThreadIdentifierDataPthreads.cpp: Added. Contains custom implementation of thread-specific data that uses custom destructor.
842 (WTF::ThreadIdentifierData::~ThreadIdentifierData): Removes the ThreadIdentifier from the threadMap.
843 (WTF::ThreadIdentifierData::identifier):
844 (WTF::ThreadIdentifierData::initialize):
845 (WTF::ThreadIdentifierData::destruct): Custom thread-specific destructor. Resets the value for the key again to cause second invoke.
846 (WTF::ThreadIdentifierData::initializeKeyOnceHelper):
847 (WTF::ThreadIdentifierData::initializeKeyOnce): Need to use pthread_once since initialization may come on any thread(s).
848 * wtf/ThreadIdentifierDataPthreads.h: Added.
849 (WTF::ThreadIdentifierData::ThreadIdentifierData):
852 (WTF::threadEntryPoint): Move initializeCurrentThreadInternal to after the lock to make
853 sure it is invoked when ThreadIdentifier is already established.
855 * wtf/Threading.h: Rename setThreadNameInternal -> initializeCurrentThreadInternal since it does more then only set the name now.
856 * wtf/ThreadingNone.cpp:
857 (WTF::initializeCurrentThreadInternal): Ditto.
858 * wtf/ThreadingWin.cpp:
859 (WTF::initializeCurrentThreadInternal): Ditto.
860 (WTF::initializeThreading): Ditto.
861 * wtf/gtk/ThreadingGtk.cpp:
862 (WTF::initializeCurrentThreadInternal): Ditto.
863 * wtf/qt/ThreadingQt.cpp:
864 (WTF::initializeCurrentThreadInternal): Ditto.
866 * wtf/ThreadingPthreads.cpp:
867 (WTF::establishIdentifierForPthreadHandle):
868 (WTF::clearPthreadHandleForIdentifier): Make it not 'static' so the ~ThreadIdentifierData() in another file can call it.
869 (WTF::initializeCurrentThreadInternal): Set the thread-specific data. The ThreadIdentifier is already established by creating thread.
870 (WTF::waitForThreadCompletion): Remove call to clearPthreadHandleForIdentifier(threadID) since it is now done in ~ThreadIdentifierData().
871 (WTF::detachThread): Ditto.
872 (WTF::currentThread): Use the thread-specific data to get the ThreadIdentifier. It's many times faster then Mutex-protected iteration through the map.
873 Also, set the thread-specific data if called first time on the thread.
875 2010-01-21 Kwang Yul Seo <skyul@company100.net>
877 Reviewed by Alexey Proskuryakov.
879 Add ThreadSpecific for ENABLE(SINGLE_THREADED)
880 https://bugs.webkit.org/show_bug.cgi?id=33878
882 Implement ThreadSpecific with a simple getter/setter
883 when ENABLE(SINGLE_THREADED) is true.
885 Due to the change in https://bugs.webkit.org/show_bug.cgi?id=33236,
886 an implementation of ThreadSpecific must be available to build WebKit.
887 This causes a build failure for platforms without a proper
888 ThreadSpecific implementation.
890 * wtf/ThreadSpecific.h:
891 (WTF::::ThreadSpecific):
892 (WTF::::~ThreadSpecific):
897 2010-01-21 Kwang Yul Seo <skyul@company100.net>
899 Reviewed by Maciej Stachowiak.
901 Add fastStrDup to FastMalloc
902 https://bugs.webkit.org/show_bug.cgi?id=33937
904 The new string returned by fastStrDup is obtained with fastMalloc,
905 and can be freed with fastFree. This makes the memory management
906 more consistent because we don't need to keep strdup allocated pointers
907 and free them with free(). Instead we can use fastFree everywhere.
909 * wtf/FastMalloc.cpp:
913 2010-01-21 Brady Eidson <beidson@apple.com>
915 Reviewed by Maciej Stachowiak.
917 history.back() for same-document history traversals isn't synchronous as the specification states.
918 <rdar://problem/7535011> and https://bugs.webkit.org/show_bug.cgi?id=33538
920 * wtf/Platform.h: Add a "HISTORY_ALWAYS_ASYNC" enable and turn it on for Chromium.
922 2010-01-21 Geoffrey Garen <ggaren@apple.com>
924 Reviewed by Oliver Hunt.
926 Always create a prototype for automatically managed classes.
928 This fixes some errors where prototype chains were not correctly hooked
929 up, and also ensures that API classes work correctly with features like
932 * API/JSClassRef.cpp:
933 (OpaqueJSClass::create): Cleaned up some of this code. Also changed it
934 to always create a prototype class.
936 * API/tests/testapi.c:
938 (main): Fixed a null value crash in the exception checking code.
939 * API/tests/testapi.js: Added some tests for the case where a prototype
940 chain would not be hooked up correctly.
942 2010-01-21 Oliver Hunt <oliver@apple.com>
944 Reviewed by Geoff Garen.
946 Force JSC to create a prototype chain for API classes with a
947 parent class but no static functions.
949 * API/JSClassRef.cpp:
950 (OpaqueJSClass::create):
952 2010-01-21 Kent Hansen <kent.hansen@nokia.com>
954 Reviewed by Geoffrey Garen.
956 Object.getOwnPropertyDescriptor always returns undefined for JS API objects
957 https://bugs.webkit.org/show_bug.cgi?id=33946
959 Ideally the getOwnPropertyDescriptor() reimplementation should return an
960 access descriptor that wraps the property getter and setter callbacks, but
961 that approach is much more involved than returning a value descriptor.
962 Keep it simple for now.
964 * API/JSCallbackObject.h:
965 * API/JSCallbackObjectFunctions.h:
966 (JSC::::getOwnPropertyDescriptor):
967 * API/tests/testapi.js:
969 2010-01-20 Mark Rowe <mrowe@apple.com>
973 * wtf/FastMalloc.cpp:
974 (WTF::TCMalloc_PageHeap::initializeScavenger): Remove unnecessary function call.
976 2010-01-20 Mark Rowe <mrowe@apple.com>
978 Reviewed by Oliver Hunt.
980 Use the inline i386 assembly for x86_64 as well rather than falling back to using pthread mutexes.
983 (TCMalloc_SpinLock::Lock):
984 (TCMalloc_SpinLock::Unlock):
987 2010-01-20 Mark Rowe <mrowe@apple.com>
989 Reviewed by Oliver Hunt.
991 <rdar://problem/7215063> Use GCD instead of an extra thread for FastMalloc scavenging on platforms where it is supported
993 Abstract the background scavenging slightly so that an alternate implementation that uses GCD can be used on platforms
994 where it is supported.
996 * wtf/FastMalloc.cpp:
997 (WTF::TCMalloc_PageHeap::init):
998 (WTF::TCMalloc_PageHeap::initializeScavenger):
999 (WTF::TCMalloc_PageHeap::signalScavenger):
1000 (WTF::TCMalloc_PageHeap::shouldContinueScavenging):
1001 (WTF::TCMalloc_PageHeap::Delete):
1002 (WTF::TCMalloc_PageHeap::periodicScavenge):
1005 2010-01-20 Geoffrey Garen <ggaren@apple.com>
1007 Reviewed by Oliver Hunt.
1009 <rdar://problem/7562708> REGRESSION(53460): Heap::destroy may not run
1012 * runtime/Collector.cpp:
1013 (JSC::Heap::freeBlocks): Instead of fully marking protected objects,
1014 just set their mark bits. This prevents protected objects from keeping
1015 unprotected objects alive. Destructor order is not guaranteed, so it's
1016 OK to destroy objects pointed to by protected objects before destroying
1019 2010-01-19 David Levin <levin@chromium.org>
1021 Reviewed by Oliver Hunt.
1023 CrossThreadCopier needs to support ThreadSafeShared better.
1024 https://bugs.webkit.org/show_bug.cgi?id=33698
1026 * wtf/TypeTraits.cpp: Added tests for the new type traits.
1028 (WTF::IsSubclass): Determines if a class is a derived from another class.
1029 (WTF::IsSubclassOfTemplate): Determines if a class is a derived from a
1030 template class (with one parameter that is unknown).
1031 (WTF::RemoveTemplate): Reveals the type for a template parameter.
1033 2010-01-20 Steve Falkenburg <sfalken@apple.com>
1035 Reviewed by Darin Adler and Adam Roben.
1037 Feature defines are difficult to maintain on Windows builds
1038 https://bugs.webkit.org/show_bug.cgi?id=33883
1040 FeatureDefines.vsprops are now maintained in a way similar to
1041 Configurations/FeatureDefines.xcconfig, with the added advantage
1042 of having a single FeatureDefines file across all projects.
1044 * Configurations/FeatureDefines.xcconfig: Add comments about keeping feature definitions in sync.
1045 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add FeatureDefines.vsprops inherited property sheet.
1046 * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add FeatureDefines.vsprops inherited property sheet.
1048 2010-01-20 Csaba Osztrogonác <ossy@webkit.org>
1050 [Qt] Unreviewed buildfix for r53547.
1052 * DerivedSources.pro:
1054 2010-01-20 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
1056 Reviewed by Simon Hausmann.
1058 [Qt] Make extraCompilers for generated sources depend on their scripts
1060 * DerivedSources.pro:
1062 2010-01-19 Brian Weinstein <bweinstein@apple.com>
1064 Reviewed by Tim Hatcher.
1066 When JavaScriptCore calls Debugger::Exception, have it pass a
1067 hasHandler variable that represents if exception is being handled
1068 in the same function (not in a parent on the call stack).
1070 This just adds a new parameter, no behavior is changed.
1072 * debugger/Debugger.h:
1073 * interpreter/Interpreter.cpp:
1074 (JSC::Interpreter::throwException):
1076 2010-01-18 Maciej Stachowiak <mjs@apple.com>
1078 Reviewed by Adam Barth.
1080 Inline functions that are hot in DOM manipulation
1081 https://bugs.webkit.org/show_bug.cgi?id=33820
1083 (3% speedup on Dromaeo DOM Core tests)
1085 * runtime/WeakGCMap.h:
1086 (JSC::::get): inline
1088 2010-01-19 Laszlo Gombos <laszlo.1.gombos@nokia.com>
1090 Unreviewed build fix for JIT with RVCT.
1092 Remove IMPORT statement; cti_vm_throw is already defined in JITStubs.h.
1096 (JSC::ctiVMThrowTrampoline):
1098 2010-01-19 Geoffrey Garen <ggaren@apple.com>
1100 Reviewed by Oliver Hunt.
1102 REGRESSION (52082): Crash on worker thread when reloading http://radnan.public.iastate.edu/procedural/
1103 https://bugs.webkit.org/show_bug.cgi?id=33826
1105 This bug was caused by a GC-protected object being destroyed early by
1106 Heap::destroy. Clients of the GC protect APIs (reasonably) expect pointers
1107 to GC-protected memory to be valid.
1109 The solution is to do two passes of tear-down in Heap::destroy. The first
1110 pass tears down all unprotected objects. The second pass ASSERTs that all
1111 previously protected objects are now unprotected, and then tears down
1112 all perviously protected objects. These two passes simulate the two passes
1113 that would have been required to free a protected object during normal GC.
1115 * API/JSContextRef.cpp: Removed some ASSERTs that have moved into Heap.
1117 * runtime/Collector.cpp:
1118 (JSC::Heap::destroy): Moved ASSERTs to here.
1119 (JSC::Heap::freeBlock): Tidied up the use of didShrink by moving its
1120 setter to the function that does the shrinking.
1121 (JSC::Heap::freeBlocks): Implemented above algorithm.
1122 (JSC::Heap::shrinkBlocks): Tidied up the use of didShrink.
1124 2010-01-19 Gavin Barraclough <barraclough@apple.com>
1126 Reviewed by NOBODY (build fix).
1128 Reverting r53455, breaks 2 javascriptcore tests.
1130 * API/JSContextRef.cpp:
1131 * runtime/Collector.cpp:
1132 (JSC::Heap::destroy):
1133 (JSC::Heap::freeBlock):
1134 (JSC::Heap::freeBlocks):
1135 (JSC::Heap::shrinkBlocks):
1137 2010-01-18 Gavin Barraclough <barraclough@apple.com>
1139 Reviewed by NOBODY (build fix).
1141 Revert r53454, since it causes much sadness in this world.
1143 * runtime/UString.cpp:
1144 (JSC::UString::spliceSubstringsWithSeparators):
1145 (JSC::UString::replaceRange):
1146 * runtime/UStringImpl.cpp:
1147 (JSC::UStringImpl::baseSharedBuffer):
1148 (JSC::UStringImpl::sharedBuffer):
1149 (JSC::UStringImpl::~UStringImpl):
1150 * runtime/UStringImpl.h:
1151 (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield):
1152 (JSC::UntypedPtrAndBitfield::asPtr):
1153 (JSC::UntypedPtrAndBitfield::operator&=):
1154 (JSC::UntypedPtrAndBitfield::operator|=):
1155 (JSC::UntypedPtrAndBitfield::operator&):
1156 (JSC::UStringImpl::create):
1157 (JSC::UStringImpl::cost):
1158 (JSC::UStringImpl::isIdentifier):
1159 (JSC::UStringImpl::setIsIdentifier):
1160 (JSC::UStringImpl::ref):
1161 (JSC::UStringImpl::deref):
1162 (JSC::UStringImpl::checkConsistency):
1163 (JSC::UStringImpl::UStringImpl):
1164 (JSC::UStringImpl::bufferOwnerString):
1165 (JSC::UStringImpl::bufferOwnership):
1166 (JSC::UStringImpl::isStatic):
1167 * wtf/StringHashFunctions.h:
1170 2010-01-18 Geoffrey Garen <ggaren@apple.com>
1172 Reviewed by Oliver Hunt.
1174 REGRESSION (52082): Crash on worker thread when reloading http://radnan.public.iastate.edu/procedural/
1175 https://bugs.webkit.org/show_bug.cgi?id=33826
1177 This bug was caused by a GC-protected object being destroyed early by
1178 Heap::destroy. Clients of the GC protect APIs (reasonably) expect pointers
1179 to GC-protected memory to be valid.
1181 The solution is to do two passes of tear-down in Heap::destroy. The first
1182 pass tears down all unprotected objects. The second pass ASSERTs that all
1183 previously protected objects are now unprotected, and then tears down
1184 all perviously protected objects. These two passes simulate the two passes
1185 that would have been required to free a protected object during normal GC.
1187 * API/JSContextRef.cpp: Removed some ASSERTs that have moved into Heap.
1189 * runtime/Collector.cpp:
1190 (JSC::Heap::destroy): Moved ASSERTs to here.
1191 (JSC::Heap::freeBlock): Tidied up the use of didShrink by moving its
1192 setter to the function that does the shrinking.
1193 (JSC::Heap::freeBlocks): Implemented above algorithm.
1194 (JSC::Heap::shrinkBlocks): Tidied up the use of didShrink.
1196 2010-01-18 Gavin Barraclough <barraclough@apple.com>
1198 Reviewed by Oliver Hunt.
1200 https://bugs.webkit.org/show_bug.cgi?id=33731
1201 Remove UntypedPtrAndBitfield from UStringImpl (akin to PtrAndFlags).
1203 This break the OS X Leaks tool. Instead, free up some more bits from the refCount.
1205 * runtime/UStringImpl.cpp:
1206 (JSC::UStringImpl::sharedBuffer):
1207 (JSC::UStringImpl::~UStringImpl):
1208 * runtime/UStringImpl.h:
1209 (JSC::UStringImpl::cost):
1210 (JSC::UStringImpl::checkConsistency):
1211 (JSC::UStringImpl::UStringImpl):
1212 (JSC::UStringImpl::bufferOwnerString):
1213 (JSC::UStringImpl::):
1214 * wtf/StringHashFunctions.h:
1217 2010-01-18 Kent Tamura <tkent@chromium.org>
1219 Reviewed by Darin Adler.
1221 HTMLInputElement::valueAsDate setter support for type=month.
1222 https://bugs.webkit.org/show_bug.cgi?id=33021
1224 Expose the following functions to be used by WebCore:
1227 - WTF::monthFromDayInYear()
1228 - WTF::dayInMonthFromDayInYear()
1230 * JavaScriptCore.exp:
1231 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1233 (WTF::msToYear): Remove "static inline".
1234 (WTF::dayInYear): Remove "static inline".
1235 (WTF::monthFromDayInYear): Remove "static inline".
1236 (WTF::dayInMonthFromDayInYear): Remove "static inline".
1237 * wtf/DateMath.h: Declare the above functions.
1239 2010-01-18 Darin Adler <darin@apple.com>
1241 Fix build by reverting the previous change.
1243 * runtime/UString.h: Rolled out the FastAllocBase base class.
1244 It was making UString larger, and therefore JSString larger,
1245 and too big for a garbage collection cell.
1247 This raises the unpleasant possibility that many classes became
1248 larger because we added the FastAllocBase base class. I am
1249 worried about this, and it needs to be investigated.
1251 2010-01-18 Zoltan Horvath <zoltan@webkit.org>
1253 Reviewed by Darin Adler.
1255 Allow custom memory allocation control for UString class
1256 https://bugs.webkit.org/show_bug.cgi?id=27831
1258 Inherits the following class from FastAllocBase because it is
1259 instantiated by 'new' and no need to be copyable:
1261 class name - instantiated at:
1262 classs UString - JavaScriptCore/runtime/UString.cpp:160
1264 * runtime/UString.h:
1266 2010-01-18 Evan Cheng <evan.cheng@apple.com>
1268 Reviewed by Darin Adler.
1270 Add some ALWAYS_INLINE for key functions not inlined by some versions of GCC.
1271 rdar://problem/7553780
1273 * runtime/JSObject.h:
1274 (JSC::JSObject::getPropertySlot): ALWAYS_INLINE both overloads.
1275 * runtime/JSString.h:
1276 (JSC::JSString::JSString): ALWAYS_INLINE the version that takes a UString.
1277 * runtime/UString.h:
1278 (JSC::operator==): ALWAYS_INLINE the version that compares two UString objects.
1280 2010-01-18 Csaba Osztrogonác <ossy@webkit.org>
1282 Reviewed by Darin Adler.
1284 Delete dftables-xxxxxxxx.in files automatically.
1285 https://bugs.webkit.org/show_bug.cgi?id=33796
1287 * pcre/dftables: unlink unnecessary temporary file.
1289 2010-01-18 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
1291 Reviewed by Simon Hausmann.
1293 [Qt] Force qmake to generate a single makefile for DerivedSources.pro
1295 * DerivedSources.pro:
1297 2010-01-18 Csaba Osztrogonác <ossy@webkit.org>
1299 Rubber-stamped by Gustavo Noronha Silva.
1301 Rolling out r53391 and r53392 because of random crashes on buildbots.
1302 https://bugs.webkit.org/show_bug.cgi?id=33731
1304 * bytecode/CodeBlock.h:
1305 (JSC::CallLinkInfo::seenOnce):
1306 (JSC::CallLinkInfo::setSeen):
1307 (JSC::MethodCallLinkInfo::MethodCallLinkInfo):
1308 (JSC::MethodCallLinkInfo::seenOnce):
1309 (JSC::MethodCallLinkInfo::setSeen):
1311 (JSC::JIT::unlinkCall):
1312 * jit/JITPropertyAccess.cpp:
1313 (JSC::JIT::patchMethodCallProto):
1314 * runtime/UString.cpp:
1315 (JSC::UString::spliceSubstringsWithSeparators):
1316 (JSC::UString::replaceRange):
1317 * runtime/UString.h:
1318 * runtime/UStringImpl.cpp:
1319 (JSC::UStringImpl::baseSharedBuffer):
1320 (JSC::UStringImpl::sharedBuffer):
1321 (JSC::UStringImpl::~UStringImpl):
1322 * runtime/UStringImpl.h:
1323 (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield):
1324 (JSC::UntypedPtrAndBitfield::asPtr):
1325 (JSC::UntypedPtrAndBitfield::operator&=):
1326 (JSC::UntypedPtrAndBitfield::operator|=):
1327 (JSC::UntypedPtrAndBitfield::operator&):
1328 (JSC::UStringImpl::create):
1329 (JSC::UStringImpl::cost):
1330 (JSC::UStringImpl::isIdentifier):
1331 (JSC::UStringImpl::setIsIdentifier):
1332 (JSC::UStringImpl::ref):
1333 (JSC::UStringImpl::deref):
1334 (JSC::UStringImpl::checkConsistency):
1335 (JSC::UStringImpl::UStringImpl):
1336 (JSC::UStringImpl::bufferOwnerString):
1337 (JSC::UStringImpl::bufferOwnership):
1338 (JSC::UStringImpl::isStatic):
1339 * wtf/StringHashFunctions.h:
1342 2010-01-18 Simon Hausmann <simon.hausmann@nokia.com>
1344 Reviewed by Kenneth Rohde Christiansen.
1346 Fix the build with strict gcc and RVCT versions: It's not legal to cast a
1347 pointer to a function to a void* without an intermediate cast to a non-pointer
1348 type. A cast to a ptrdiff_t inbetween fixes it.
1350 * runtime/JSString.h:
1351 (JSC::Fiber::JSString):
1353 2010-01-15 Gavin Barraclough <barraclough@apple.com>
1355 Reviewed by Oliver Hunt.
1357 https://bugs.webkit.org/show_bug.cgi?id=33731
1358 Remove UntypedPtrAndBitfield from UStringImpl (akin to PtrAndFlags).
1360 This break the OS X Leaks tool. Instead, free up some more bits from the refCount.
1362 * runtime/UStringImpl.cpp:
1363 (JSC::UStringImpl::sharedBuffer):
1364 (JSC::UStringImpl::~UStringImpl):
1365 * runtime/UStringImpl.h:
1366 (JSC::UStringImpl::cost):
1367 (JSC::UStringImpl::checkConsistency):
1368 (JSC::UStringImpl::UStringImpl):
1369 (JSC::UStringImpl::bufferOwnerString):
1370 (JSC::UStringImpl::):
1371 * wtf/StringHashFunctions.h:
1374 2010-01-15 Gavin Barraclough <barraclough@apple.com>
1376 Reviewed by Oliver Hunt.
1378 https://bugs.webkit.org/show_bug.cgi?id=33731
1379 Remove uses of PtrAndFlags from JIT data stuctures.
1381 These break the OS X Leaks tool. Free up a bit in CallLinkInfo, and invalid
1382 permutation of pointer states in MethodCallLinkInfo to represent the removed bits.
1384 * bytecode/CodeBlock.h:
1385 (JSC::CallLinkInfo::seenOnce):
1386 (JSC::CallLinkInfo::setSeen):
1387 (JSC::MethodCallLinkInfo::MethodCallLinkInfo):
1388 (JSC::MethodCallLinkInfo::seenOnce):
1389 (JSC::MethodCallLinkInfo::setSeen):
1391 (JSC::JIT::unlinkCall):
1392 * jit/JITPropertyAccess.cpp:
1393 (JSC::JIT::patchMethodCallProto):
1394 * runtime/UString.h:
1396 2010-01-16 Maciej Stachowiak <mjs@apple.com>
1398 Reviewed by Oliver Hunt.
1400 Cache JS string values made from DOM strings (Dromaeo speedup)
1401 https://bugs.webkit.org/show_bug.cgi?id=33768
1402 <rdar://problem/7353576>
1404 * runtime/JSString.h:
1405 (JSC::jsStringWithFinalizer): Added new mechanism for a string to have an optional
1406 finalizer callback, for the benefit of weak-referencing caches.
1408 (JSC::Fiber::JSString):
1409 (JSC::Fiber::~JSString):
1410 * runtime/JSString.cpp:
1411 (JSC::JSString::resolveRope): Clear fibers so this doesn't look like a string with a finalizer.
1412 * runtime/WeakGCMap.h: Include "Collector.h" to make this header includable by itself.
1414 2010-01-15 Sam Weinig <sam@webkit.org>
1416 Reviewed by Maciej Stachowiak.
1418 Fix for <rdar://problem/7548432>
1419 Add ALWAYS_INLINE to jsLess for a 1% speedup on llvm-gcc.
1421 * runtime/Operations.h:
1424 2010-01-14 Geoffrey Garen <ggaren@apple.com>
1426 Reviewed by Oliver Hunt.
1428 REGRESISON: Google maps buttons not working properly
1429 https://bugs.webkit.org/show_bug.cgi?id=31871
1431 REGRESSION(r52948): JavaScript exceptions thrown on Google Maps when
1432 getting directions for a second time
1433 https://bugs.webkit.org/show_bug.cgi?id=33446
1435 SunSpider and v8 report no change.
1437 * interpreter/Interpreter.cpp:
1438 (JSC::Interpreter::tryCacheGetByID): Update our cached offset in case
1439 flattening the dictionary changed any of its offsets.
1442 (JSC::JITThunks::tryCacheGetByID):
1443 (JSC::DEFINE_STUB_FUNCTION):
1444 * runtime/Operations.h:
1445 (JSC::normalizePrototypeChain): ditto
1447 2010-01-14 Gavin Barraclough <barraclough@apple.com>
1449 Reviewed by Oliver Hunt.
1451 https://bugs.webkit.org/show_bug.cgi?id=33705
1452 UStringImpl::create() should use internal storage
1454 When creating a UStringImpl copying of a UChar*, we can use an internal buffer,
1455 by calling UStringImpl::tryCreateUninitialized().
1457 Also, remove duplicate of copyChars from JSString, call UStringImpl's version.
1459 Small (max 0.5%) progression on Sunspidey.
1461 * runtime/JSString.cpp:
1462 (JSC::JSString::resolveRope):
1463 * runtime/UStringImpl.h:
1464 (JSC::UStringImpl::create):
1466 2010-01-14 Gavin Barraclough <barraclough@apple.com>
1468 Reviewed by Sam Weinig.
1470 Make naming & behaviour of UString[Impl] methods more consistent.
1471 https://bugs.webkit.org/show_bug.cgi?id=33702
1473 UString::create() creates a copy of the UChar* passed, but UStringImpl::create() assumes
1474 that it should assume ownership of the provided buffer (with UString::createNonCopying()
1475 and UStringImpl::createCopying() providing the alternate behaviours). Unify on create()
1476 taking a copy of the provided buffer. For non-copying cases, use the name 'adopt', and
1477 make this method take a Vector<UChar>&. For cases where non-copying construction was being
1478 used, other than from a Vector<UChar>, change the code to allocate the storage along with
1479 the UStringImpl using UStringImpl::createUninitialized(). (The adopt() method also more
1480 closely matches that of WebCore::StringImpl).
1482 Also, UString::createUninitialized() and UStringImpl::createUninitialized() have incompatible
1483 behaviours, in that the UString form sets the provided UChar* to a null or non-null value to
1484 indicate success or failure, but UStringImpl uses the returned PassRefPtr<UStringImpl> to
1485 indicate when allocation has failed (potentially leaving the output Char* uninitialized).
1486 This is also incompatible with WebCore::StringImpl's behaviour, in that
1487 StringImpl::createUninitialized() will CRASH() if unable to allocate. Some uses of
1488 createUninitialized() in JSC are unsafe, since they do not test the result for null.
1489 UStringImpl's indication is preferable, since we may want a successful call to set the result
1490 buffer to 0 (specifically, StringImpl returns 0 for the buffer where createUninitialized()
1491 returns the empty string, which seems reasonable to catch bugs early). UString's method
1492 cannot support UStringImpl's behaviour directly, since it returns an object rather than a
1494 - remove UString::createUninitialized(), replace with calls to UStringImpl::createUninitialized()
1495 - create a UStringImpl::tryCreateUninitialized() form UStringImpl::createUninitialized(),
1496 with current behaviour, make createUninitialized() crash on failure to allocate.
1497 - make cases in JSC that do not check the result call createUninitialized(), and cases that do
1498 check call tryCreateUninitialized().
1500 Rename computedHash() to existingHash(), to bring this in line wih WebCore::StringImpl.
1502 * API/JSClassRef.cpp:
1503 (OpaqueJSClassContextData::OpaqueJSClassContextData):
1504 * JavaScriptCore.exp:
1505 * runtime/ArrayPrototype.cpp:
1506 (JSC::arrayProtoFuncToString):
1507 * runtime/Identifier.cpp:
1508 (JSC::CStringTranslator::translate):
1509 (JSC::UCharBufferTranslator::translate):
1510 * runtime/JSString.cpp:
1511 (JSC::JSString::resolveRope):
1512 * runtime/Lookup.cpp:
1513 (JSC::HashTable::createTable):
1515 (JSC::HashTable::entry):
1516 * runtime/StringBuilder.h:
1517 (JSC::StringBuilder::release):
1518 * runtime/StringConstructor.cpp:
1519 (JSC::stringFromCharCodeSlowCase):
1520 * runtime/StringPrototype.cpp:
1521 (JSC::substituteBackreferencesSlow):
1522 (JSC::stringProtoFuncToLowerCase):
1523 (JSC::stringProtoFuncToUpperCase):
1524 (JSC::stringProtoFuncFontsize):
1525 (JSC::stringProtoFuncLink):
1526 * runtime/Structure.cpp:
1527 (JSC::Structure::despecifyDictionaryFunction):
1528 (JSC::Structure::get):
1529 (JSC::Structure::despecifyFunction):
1530 (JSC::Structure::put):
1531 (JSC::Structure::remove):
1532 (JSC::Structure::insertIntoPropertyMapHashTable):
1533 (JSC::Structure::checkConsistency):
1534 * runtime/Structure.h:
1535 (JSC::Structure::get):
1536 * runtime/StructureTransitionTable.h:
1537 (JSC::StructureTransitionTableHash::hash):
1538 * runtime/UString.cpp:
1540 (JSC::UString::UString):
1541 (JSC::UString::spliceSubstringsWithSeparators):
1542 (JSC::UString::replaceRange):
1543 (JSC::UString::operator=):
1544 * runtime/UString.h:
1545 (JSC::UString::adopt):
1546 (JSC::IdentifierRepHash::hash):
1548 * runtime/UStringImpl.h:
1549 (JSC::UStringImpl::adopt):
1550 (JSC::UStringImpl::create):
1551 (JSC::UStringImpl::createUninitialized):
1552 (JSC::UStringImpl::tryCreateUninitialized):
1553 (JSC::UStringImpl::existingHash):
1555 2010-01-13 Kent Hansen <kent.hansen@nokia.com>
1557 Reviewed by Oliver Hunt.
1559 JSON.stringify and JSON.parse needlessly process properties in the prototype chain
1560 https://bugs.webkit.org/show_bug.cgi?id=33053
1562 * runtime/JSONObject.cpp:
1563 (JSC::Stringifier::Holder::appendNextProperty):
1564 (JSC::Walker::walk):
1566 2010-01-13 Gavin Barraclough <barraclough@apple.com>
1568 Reviewed by NOBODY (buildfix).
1570 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1572 2010-01-13 Alexey Proskuryakov <ap@apple.com>
1574 Reviewed by Darin Adler.
1576 https://bugs.webkit.org/show_bug.cgi?id=33641
1577 Assertion failure in Lexer.cpp if input stream ends while in string escape
1579 Test: fast/js/end-in-string-escape.html
1581 * parser/Lexer.cpp: (JSC::Lexer::lex): Bail out quickly on end of stream, not giving the
1582 assertion a chance to fire.
1584 2010-01-13 Gavin Barraclough <barraclough@apple.com>
1586 Reviewed by NOBODY (buildfix).
1588 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1590 2010-01-13 Gavin Barraclough <barraclough@apple.com>
1592 Rubber stamped by Sam Weinig & Darin Adler.
1594 Three quick fixes to UStringImpl.
1595 - The destroy() method can be switched back to a normal destructor; since we've switched
1596 the way we protect static strings to be using an odd ref-count the destroy() won't abort.
1597 - The cost() calculation logic was wrong. If you have multiple JSStrings wrapping substrings
1598 of a base string, they would each report the full cost of the base string to the heap.
1599 Instead we should only be reporting once for the base string.
1600 - Remove the overloaded new operator calling fastMalloc, replace this with a 'using' to pick
1601 up the implementation from the parent class.
1603 * JavaScriptCore.exp:
1604 * runtime/UStringImpl.cpp:
1605 (JSC::UStringImpl::~UStringImpl):
1606 * runtime/UStringImpl.h:
1607 (JSC::UStringImpl::cost):
1608 (JSC::UStringImpl::deref):
1610 2010-01-13 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
1612 Reviewed by Simon Hausmann.
1614 [Qt] Split the build process in two different .pro files.
1615 This allows qmake to be run once all source files are available.
1617 * DerivedSources.pro: Added.
1618 * JavaScriptCore.pri: Moved source generation to DerivedSources.pro
1619 * pcre/pcre.pri: Moved source generation to DerivedSources.pro
1621 2010-01-12 Kent Hansen <kent.hansen@nokia.com>
1623 Reviewed by Geoffrey Garen.
1625 [ES5] Implement Object.getOwnPropertyNames
1626 https://bugs.webkit.org/show_bug.cgi?id=32242
1628 Add an extra argument to getPropertyNames() and getOwnPropertyNames()
1629 (and all reimplementations thereof) that indicates whether non-enumerable
1630 properties should be added.
1632 * API/JSCallbackObject.h:
1633 * API/JSCallbackObjectFunctions.h:
1634 (JSC::::getOwnPropertyNames):
1635 * JavaScriptCore.exp:
1636 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1637 * debugger/DebuggerActivation.cpp:
1638 (JSC::DebuggerActivation::getOwnPropertyNames):
1639 * debugger/DebuggerActivation.h:
1640 * runtime/Arguments.cpp:
1641 (JSC::Arguments::getOwnPropertyNames):
1642 * runtime/Arguments.h:
1643 * runtime/CommonIdentifiers.h:
1644 * runtime/JSArray.cpp:
1645 (JSC::JSArray::getOwnPropertyNames):
1646 * runtime/JSArray.h:
1647 * runtime/JSByteArray.cpp:
1648 (JSC::JSByteArray::getOwnPropertyNames):
1649 * runtime/JSByteArray.h:
1650 * runtime/JSFunction.cpp:
1651 (JSC::JSFunction::getOwnPropertyNames):
1652 * runtime/JSFunction.h:
1653 * runtime/JSNotAnObject.cpp:
1654 (JSC::JSNotAnObject::getOwnPropertyNames):
1655 * runtime/JSNotAnObject.h:
1656 * runtime/JSObject.cpp:
1657 (JSC::getClassPropertyNames):
1658 (JSC::JSObject::getPropertyNames):
1659 (JSC::JSObject::getOwnPropertyNames):
1660 * runtime/JSObject.h:
1661 * runtime/JSVariableObject.cpp:
1662 (JSC::JSVariableObject::getOwnPropertyNames):
1663 * runtime/JSVariableObject.h:
1664 * runtime/ObjectConstructor.cpp:
1665 (JSC::ObjectConstructor::ObjectConstructor):
1666 (JSC::objectConstructorGetOwnPropertyNames):
1667 * runtime/RegExpMatchesArray.h:
1668 (JSC::RegExpMatchesArray::getOwnPropertyNames):
1669 * runtime/StringObject.cpp:
1670 (JSC::StringObject::getOwnPropertyNames):
1671 * runtime/StringObject.h:
1672 * runtime/Structure.cpp: Rename getEnumerablePropertyNames() to getPropertyNames(), which takes an extra argument.
1673 (JSC::Structure::getPropertyNames):
1674 * runtime/Structure.h:
1677 2010-01-12 Alexey Proskuryakov <ap@apple.com>
1679 Reviewed by Darin Adler.
1681 https://bugs.webkit.org/show_bug.cgi?id=33540
1682 Make it possible to build in debug mode with assertions disabled
1684 * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION):
1685 * runtime/Identifier.cpp: (JSC::Identifier::checkSameIdentifierTable):
1686 * wtf/FastMalloc.cpp:
1687 * wtf/HashTable.h: (WTF::HashTableConstIterator::checkValidity):
1688 * yarr/RegexCompiler.cpp: (JSC::Yarr::compileRegex):
1690 2009-11-23 Yong Li <yoli@rim.com>
1692 Reviewed by Adam Treat.
1694 Make GIF decoder support down-sampling
1695 https://bugs.webkit.org/show_bug.cgi?id=31806
1697 * platform/image-decoders/ImageDecoder.cpp:
1698 (WebCore::ImageDecoder::upperBoundScaledY):
1699 (WebCore::ImageDecoder::lowerBoundScaledY):
1700 * platform/image-decoders/ImageDecoder.h:
1701 (WebCore::RGBA32Buffer::scaledRect):
1702 (WebCore::RGBA32Buffer::setScaledRect):
1703 (WebCore::ImageDecoder::scaledSize):
1704 * platform/image-decoders/gif/GIFImageDecoder.cpp:
1705 (WebCore::GIFImageDecoder::sizeNowAvailable):
1706 (WebCore::GIFImageDecoder::initFrameBuffer):
1707 (WebCore::copyOnePixel):
1708 (WebCore::GIFImageDecoder::haveDecodedRow):
1709 (WebCore::GIFImageDecoder::frameComplete):
1711 2010-01-12 Adam Barth <abarth@webkit.org>
1713 Reviewed by Eric Seidel.
1715 ecma/Date/15.9.5.12-1.js fails every night at midnight
1716 https://bugs.webkit.org/show_bug.cgi?id=28041
1718 Change the test to use a concrete time instead of "now".
1720 * tests/mozilla/ecma/Date/15.9.5.10-1.js:
1721 * tests/mozilla/ecma/Date/15.9.5.12-1.js:
1723 2010-01-11 Csaba Osztrogonác <ossy@webkit.org>
1725 Reviewed by Ariya Hidayat.
1727 [Qt] Enable JIT and YARR_JIT if (CPU(X86_64) && OS(LINUX) && GCC_VERSION >= 40100)
1731 2010-01-11 Geoffrey Garen <ggaren@apple.com>
1733 Reviewed by Alexey Proskuryakov.
1735 https://bugs.webkit.org/show_bug.cgi?id=33481
1736 Uninitialized data members in ArrayStorage
1738 SunSpider reports no change.
1740 * runtime/JSArray.cpp:
1741 (JSC::JSArray::JSArray): Initialize missing data members in the two cases
1742 where we don't use fastZeroedMalloc, so it doesn't happen automatically.
1744 2010-01-11 Steve Falkenburg <sfalken@apple.com>
1746 Reviewed by Sam Weinig.
1748 https://bugs.webkit.org/show_bug.cgi?id=33480
1750 Improve debugging reliability for WTF on Windows.
1751 Store WTF static library's PDB file into a better location.
1753 * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1755 2010-01-11 Steve Falkenburg <sfalken@apple.com>
1758 Remove extraneous entries from def file causing build warning.
1760 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1762 2010-01-10 Kent Hansen <kent.hansen@nokia.com>
1764 Reviewed by Darin Adler.
1766 RegExp.prototype.toString returns "//" for empty regular expressions
1767 https://bugs.webkit.org/show_bug.cgi?id=33319
1769 "//" starts a single-line comment, hence "/(?:)/" should be used, according to ECMA.
1771 * runtime/RegExpPrototype.cpp:
1772 (JSC::regExpProtoFuncToString):
1774 * tests/mozilla/ecma_2/RegExp/properties-001.js:
1776 * tests/mozilla/js1_2/regexp/toString.js:
1777 Update relevant Mozilla tests (Mozilla has had this behavior since November 2003).
1779 2010-01-10 Darin Adler <darin@apple.com>
1781 * tests/mozilla/ecma/Array/15.4.1.1.js: Added property allow-tabs.
1782 * tests/mozilla/ecma/Array/15.4.1.2.js: Added property allow-tabs.
1783 * tests/mozilla/ecma/Array/15.4.2.1-1.js: Added property allow-tabs.
1784 * tests/mozilla/ecma/Array/15.4.2.2-1.js: Added property allow-tabs.
1785 * tests/mozilla/ecma/Array/15.4.2.2-2.js: Added property allow-tabs.
1786 * tests/mozilla/ecma/Array/15.4.2.3.js: Added property allow-tabs.
1787 * tests/mozilla/ecma/Array/15.4.3.2.js: Added property allow-tabs.
1788 * tests/mozilla/ecma/Array/15.4.3.js: Added property allow-tabs.
1789 * tests/mozilla/ecma/Array/15.4.4.1.js: Added property allow-tabs.
1790 * tests/mozilla/ecma/Array/15.4.4.js: Added property allow-tabs.
1791 * tests/mozilla/ecma/LexicalConventions/7.7.4.js: Added property allow-tabs.
1792 * tests/mozilla/ecma/Math/15.8.2.13.js: Added property allow-tabs.
1793 * tests/mozilla/ecma/Math/15.8.2.16.js: Added property allow-tabs.
1794 * tests/mozilla/ecma/Math/15.8.2.18.js: Added property allow-tabs.
1795 * tests/mozilla/ecma/Math/15.8.2.2.js: Added property allow-tabs.
1796 * tests/mozilla/ecma/Math/15.8.2.4.js: Added property allow-tabs.
1797 * tests/mozilla/ecma/Math/15.8.2.5.js: Added property allow-tabs.
1798 * tests/mozilla/ecma/Math/15.8.2.7.js: Added property allow-tabs.
1799 * tests/mozilla/ecma/String/15.5.1.js: Added property allow-tabs.
1800 * tests/mozilla/ecma/String/15.5.2.js: Added property allow-tabs.
1801 * tests/mozilla/ecma/String/15.5.3.1-3.js: Added property allow-tabs.
1802 * tests/mozilla/ecma/String/15.5.3.1-4.js: Added property allow-tabs.
1803 * tests/mozilla/ecma/String/15.5.3.js: Added property allow-tabs.
1804 * tests/mozilla/ecma/TypeConversion/9.5-2.js: Added property allow-tabs.
1805 * tests/mozilla/ecma/jsref.js: Modified property allow-tabs.
1806 * tests/mozilla/ecma/shell.js: Modified property allow-tabs.
1807 * tests/mozilla/ecma_2/LexicalConventions/keywords-001.js: Added property allow-tabs.
1808 * tests/mozilla/ecma_2/RegExp/exec-001.js: Added property allow-tabs.
1809 * tests/mozilla/ecma_2/String/match-004.js: Added property allow-tabs.
1810 * tests/mozilla/ecma_2/String/replace-001.js: Added property allow-tabs.
1811 * tests/mozilla/ecma_2/String/split-002.js: Added property allow-tabs.
1812 * tests/mozilla/ecma_2/jsref.js: Modified property allow-tabs.
1813 * tests/mozilla/ecma_2/shell.js: Added property allow-tabs.
1814 * tests/mozilla/ecma_3/Date/shell.js: Modified property allow-tabs.
1815 * tests/mozilla/ecma_3/Exceptions/regress-181654.js: Added property allow-tabs.
1816 * tests/mozilla/ecma_3/RegExp/regress-209067.js: Added property allow-tabs.
1817 * tests/mozilla/ecma_3/RegExp/regress-85721.js: Added property allow-tabs.
1818 * tests/mozilla/importList.html: Added property allow-tabs.
1819 * tests/mozilla/js1_1/shell.js: Added property allow-tabs.
1820 * tests/mozilla/js1_2/Array/general1.js: Added property allow-tabs.
1821 * tests/mozilla/js1_2/Array/general2.js: Added property allow-tabs.
1822 * tests/mozilla/js1_2/Array/slice.js: Added property allow-tabs.
1823 * tests/mozilla/js1_2/Array/splice1.js: Added property allow-tabs.
1824 * tests/mozilla/js1_2/Array/splice2.js: Added property allow-tabs.
1825 * tests/mozilla/js1_2/Objects/toString-001.js: Added property allow-tabs.
1826 * tests/mozilla/js1_2/String/charCodeAt.js: Added property allow-tabs.
1827 * tests/mozilla/js1_2/String/concat.js: Modified property allow-tabs.
1828 * tests/mozilla/js1_2/String/match.js: Added property allow-tabs.
1829 * tests/mozilla/js1_2/String/slice.js: Added property allow-tabs.
1830 * tests/mozilla/js1_2/function/Function_object.js: Added property allow-tabs.
1831 * tests/mozilla/js1_2/function/Number.js: Modified property allow-tabs.
1832 * tests/mozilla/js1_2/function/String.js: Modified property allow-tabs.
1833 * tests/mozilla/js1_2/function/nesting.js: Added property allow-tabs.
1834 * tests/mozilla/js1_2/function/regexparg-1.js: Added property allow-tabs.
1835 * tests/mozilla/js1_2/function/regexparg-2-n.js: Added property allow-tabs.
1836 * tests/mozilla/js1_2/jsref.js: Added property allow-tabs.
1837 * tests/mozilla/js1_2/operator/equality.js: Added property allow-tabs.
1838 * tests/mozilla/js1_2/operator/strictEquality.js: Added property allow-tabs.
1839 * tests/mozilla/js1_2/regexp/RegExp_dollar_number.js: Added property allow-tabs.
1840 * tests/mozilla/js1_2/regexp/RegExp_input.js: Added property allow-tabs.
1841 * tests/mozilla/js1_2/regexp/RegExp_input_as_array.js: Added property allow-tabs.
1842 * tests/mozilla/js1_2/regexp/RegExp_lastIndex.js: Added property allow-tabs.
1843 * tests/mozilla/js1_2/regexp/RegExp_lastMatch.js: Added property allow-tabs.
1844 * tests/mozilla/js1_2/regexp/RegExp_lastMatch_as_array.js: Added property allow-tabs.
1845 * tests/mozilla/js1_2/regexp/RegExp_lastParen.js: Added property allow-tabs.
1846 * tests/mozilla/js1_2/regexp/RegExp_lastParen_as_array.js: Added property allow-tabs.
1847 * tests/mozilla/js1_2/regexp/RegExp_leftContext.js: Added property allow-tabs.
1848 * tests/mozilla/js1_2/regexp/RegExp_leftContext_as_array.js: Added property allow-tabs.
1849 * tests/mozilla/js1_2/regexp/RegExp_multiline.js: Added property allow-tabs.
1850 * tests/mozilla/js1_2/regexp/RegExp_multiline_as_array.js: Added property allow-tabs.
1851 * tests/mozilla/js1_2/regexp/RegExp_object.js: Added property allow-tabs.
1852 * tests/mozilla/js1_2/regexp/RegExp_rightContext.js: Added property allow-tabs.
1853 * tests/mozilla/js1_2/regexp/RegExp_rightContext_as_array.js: Added property allow-tabs.
1854 * tests/mozilla/js1_2/regexp/alphanumeric.js: Added property allow-tabs.
1855 * tests/mozilla/js1_2/regexp/asterisk.js: Added property allow-tabs.
1856 * tests/mozilla/js1_2/regexp/backslash.js: Added property allow-tabs.
1857 * tests/mozilla/js1_2/regexp/backspace.js: Added property allow-tabs.
1858 * tests/mozilla/js1_2/regexp/beginLine.js: Added property allow-tabs.
1859 * tests/mozilla/js1_2/regexp/character_class.js: Added property allow-tabs.
1860 * tests/mozilla/js1_2/regexp/compile.js: Added property allow-tabs.
1861 * tests/mozilla/js1_2/regexp/control_characters.js: Added property allow-tabs.
1862 * tests/mozilla/js1_2/regexp/digit.js: Added property allow-tabs.
1863 * tests/mozilla/js1_2/regexp/dot.js: Added property allow-tabs.
1864 * tests/mozilla/js1_2/regexp/endLine.js: Added property allow-tabs.
1865 * tests/mozilla/js1_2/regexp/everything.js: Added property allow-tabs.
1866 * tests/mozilla/js1_2/regexp/exec.js: Added property allow-tabs.
1867 * tests/mozilla/js1_2/regexp/flags.js: Added property allow-tabs.
1868 * tests/mozilla/js1_2/regexp/global.js: Added property allow-tabs.
1869 * tests/mozilla/js1_2/regexp/hexadecimal.js: Added property allow-tabs.
1870 * tests/mozilla/js1_2/regexp/ignoreCase.js: Added property allow-tabs.
1871 * tests/mozilla/js1_2/regexp/interval.js: Added property allow-tabs.
1872 * tests/mozilla/js1_2/regexp/octal.js: Added property allow-tabs.
1873 * tests/mozilla/js1_2/regexp/parentheses.js: Added property allow-tabs.
1874 * tests/mozilla/js1_2/regexp/plus.js: Added property allow-tabs.
1875 * tests/mozilla/js1_2/regexp/question_mark.js: Added property allow-tabs.
1876 * tests/mozilla/js1_2/regexp/simple_form.js: Added property allow-tabs.
1877 * tests/mozilla/js1_2/regexp/source.js: Added property allow-tabs.
1878 * tests/mozilla/js1_2/regexp/special_characters.js: Added property allow-tabs.
1879 * tests/mozilla/js1_2/regexp/string_replace.js: Added property allow-tabs.
1880 * tests/mozilla/js1_2/regexp/string_search.js: Added property allow-tabs.
1881 * tests/mozilla/js1_2/regexp/string_split.js: Added property allow-tabs.
1882 * tests/mozilla/js1_2/regexp/test.js: Added property allow-tabs.
1883 * tests/mozilla/js1_2/regexp/toString.js: Added property allow-tabs.
1884 * tests/mozilla/js1_2/regexp/vertical_bar.js: Added property allow-tabs.
1885 * tests/mozilla/js1_2/regexp/whitespace.js: Added property allow-tabs.
1886 * tests/mozilla/js1_2/regexp/word_boundary.js: Added property allow-tabs.
1887 * tests/mozilla/js1_2/shell.js: Added property allow-tabs.
1888 * tests/mozilla/js1_2/statements/break.js: Added property allow-tabs.
1889 * tests/mozilla/js1_2/statements/continue.js: Added property allow-tabs.
1890 * tests/mozilla/js1_2/statements/do_while.js: Added property allow-tabs.
1891 * tests/mozilla/js1_2/statements/switch.js: Added property allow-tabs.
1892 * tests/mozilla/js1_2/statements/switch2.js: Added property allow-tabs.
1893 * tests/mozilla/js1_3/shell.js: Added property allow-tabs.
1894 * tests/mozilla/js1_4/shell.js: Added property allow-tabs.
1895 * tests/mozilla/js1_5/Regress/regress-111557.js: Added property allow-tabs.
1896 * tests/mozilla/js1_5/Regress/regress-216320.js: Added property allow-tabs.
1897 * tests/mozilla/menuhead.html: Added property allow-tabs.
1898 * tests/mozilla/mklistpage.pl: Added property allow-tabs.
1899 * tests/mozilla/runtests.pl: Added property allow-tabs.
1901 2010-01-08 Daniel Bates <dbates@webkit.org>
1903 Reviewed by Adam Barth.
1905 https://bugs.webkit.org/show_bug.cgi?id=33417
1907 Cleans up style errors exposed by the patch for bug #33198.
1908 Moreover, fixes all "Weird number of spaces at line-start. Are you using a 4-space indent?"
1909 errors reported by check-webkit-style.
1911 No functionality was changed. So, no new tests.
1915 2010-01-08 Kent Hansen <kent.hansen@nokia.com>
1917 Reviewed by Eric Seidel.
1919 Don't store RegExp flags string representation
1920 https://bugs.webkit.org/show_bug.cgi?id=33321
1922 It's unused; the string representation is reconstructed from flags.
1924 * runtime/RegExp.cpp:
1925 (JSC::RegExp::RegExp):
1928 2010-01-08 Geoffrey Garen <ggaren@apple.com>
1930 Reviewed by Oliver Hunt.
1932 Memory use grows grows possibly unbounded in this JavaScript Array test case
1933 https://bugs.webkit.org/show_bug.cgi?id=31675
1935 This fixes one observed bug in this test case, which is that
1936 arrays don't report extra cost for the sparse value maps.
1938 SunSpider reports a small speedup.
1940 * runtime/JSArray.cpp:
1941 (JSC::JSArray::putSlowCase): Report extra memory cost for
1942 the sparse value map.
1943 * runtime/JSArray.h:
1945 2010-01-08 Yong Li <yoli@rim.com>
1947 Reviewed by Darin Adler.
1949 Remove unnecessary #include from FastMalloc.cpp
1950 https://bugs.webkit.org/show_bug.cgi?id=33393
1952 * wtf/FastMalloc.cpp:
1954 2010-01-08 Eric Seidel <eric@webkit.org>
1956 No review, rolling out r52983.
1957 http://trac.webkit.org/changeset/52983
1958 https://bugs.webkit.org/show_bug.cgi?id=33321
1960 Broke 59 JavaScriptCore tests. I don't think Kent knew about
1961 run-javascriptcore-tests. Sadly neither does the commit-bot,
1964 * runtime/RegExp.cpp:
1965 (JSC::RegExp::RegExp):
1967 (JSC::RegExp::flags):
1969 2010-01-08 Eric Seidel <eric@webkit.org>
1971 No review, rolling out r52981.
1972 http://trac.webkit.org/changeset/52981
1973 https://bugs.webkit.org/show_bug.cgi?id=33319
1975 Caused two JS tests to start failing:
1976 ecma_2/RegExp/properties-001.js and js1_2/regexp/toString.js
1978 * runtime/RegExpPrototype.cpp:
1979 (JSC::regExpProtoFuncToString):
1981 2010-01-08 Kent Hansen <kent.hansen@nokia.com>
1983 Reviewed by Darin Adler.
1985 Don't store RegExp flags string representation
1986 https://bugs.webkit.org/show_bug.cgi?id=33321
1988 It's unused; the string representation is reconstructed from flags.
1990 * runtime/RegExp.cpp:
1991 (JSC::RegExp::RegExp):
1994 2010-01-08 Kent Hansen <kent.hansen@nokia.com>
1996 Reviewed by Darin Adler.
1998 RegExp.prototype.toString returns "//" for empty regular expressions
1999 https://bugs.webkit.org/show_bug.cgi?id=33319
2001 "//" starts a single-line comment, hence "/(?:)/" should be used, according to ECMA.
2003 * runtime/RegExpPrototype.cpp:
2004 (JSC::regExpProtoFuncToString):
2006 2010-01-08 Norbert Leser <norbert.leser@nokia.com>
2008 Reviewed by Darin Adler.
2010 RVCT compiler with "-Otime -O3" optimization tries to optimize out
2011 inline new'ed pointers that are passed as arguments.
2012 Proposed patch assigns new'ed pointer explicitly outside function call.
2014 https://bugs.webkit.org/show_bug.cgi?id=33084
2016 * API/JSClassRef.cpp:
2017 (OpaqueJSClass::OpaqueJSClass):
2018 (OpaqueJSClassContextData::OpaqueJSClassContextData):
2020 2010-01-08 Gabor Loki <loki@webkit.org>
2022 Reviewed by Gavin Barraclough.
2024 Remove an unnecessary cacheFlush from ARM_TRADITIONAL JIT
2025 https://bugs.webkit.org/show_bug.cgi?id=33203
2027 * assembler/ARMAssembler.cpp: Remove obsolete linkBranch function.
2028 (JSC::ARMAssembler::executableCopy): Inline a clean linkBranch code.
2029 * assembler/ARMAssembler.h:
2030 (JSC::ARMAssembler::getLdrImmAddress): Use inline function.
2031 (JSC::ARMAssembler::getLdrImmAddressOnPool): Ditto.
2032 (JSC::ARMAssembler::patchPointerInternal): Remove an unnecessary cacheFlush.
2033 (JSC::ARMAssembler::linkJump): Use patchPointerInternal instead of linkBranch.
2034 (JSC::ARMAssembler::linkCall): Ditto.
2035 (JSC::ARMAssembler::relinkCall): Ditto.
2037 2010-01-07 Gabor Loki <loki@webkit.org>
2039 Reviewed by Gavin Barraclough.
2041 Build fix for JSVALUE32 when ENABLE_JIT_OPTIMIZE* are disabled
2042 https://bugs.webkit.org/show_bug.cgi?id=33311
2044 Move compileGetDirectOffset function to common part of JSVALUE32
2046 * jit/JITPropertyAccess.cpp:
2047 (JSC::JIT::compileGetDirectOffset):
2049 2010-01-07 Laszlo Gombos <laszlo.1.gombos@nokia.com>
2051 Reviewed by Maciej Stachowiak.
2053 Allow call sites to determine if ASSERT_* and LOG_* macros are operational
2054 https://bugs.webkit.org/show_bug.cgi?id=33020
2056 * wtf/Assertions.h: Set ASSERT_MSG_DISABLED, FATAL_DISABLED,
2057 ERROR_DISABLED, LOG_DISABLED to 1 if the compiler does not support
2058 variadic macros. Refactor for better readibility.
2060 2010-01-07 Daniel Bates <dbates@rim.com>
2062 Reviewed by Eric Seidel.
2064 https://bugs.webkit.org/show_bug.cgi?id=32987
2066 Added ENABLE_XHTMLMP flag. Disabled by default.
2068 * Configurations/FeatureDefines.xcconfig:
2070 2010-01-07 Laszlo Gombos <laszlo.1.gombos@nokia.com>
2072 Reviewed by Gavin Barraclough.
2074 [Symbian] Port ARM traditional JIT Trampolines to RVCT
2075 https://bugs.webkit.org/show_bug.cgi?id=30552
2077 Take the GCC implementation and mechanically convert
2080 Use 'bx rX' instead of 'mov pc, rX' when it is available.
2082 Developed in cooperation with Iain Campbell and Gabor Loki.
2084 * JavaScriptCore.pri: Extra step to generate RVCT stubs. The
2085 script generation intentionally executed all the time not just
2088 * create_rvct_stubs: Added. Perl script to expand precompiler macros
2089 for RVCT assembler - the template is defined in JITStubs.cpp.
2092 (JSC::ctiTrampoline):
2093 (JSC::ctiVMThrowTrampoline):
2094 (JSC::ctiOpThrowNotCaught):
2096 2010-01-07 Geoffrey Garen <ggaren@apple.com>
2098 Reviewed by Sam Weinig.
2100 Fix a crash seen on the buildbots.
2102 * runtime/JSGlobalObject.cpp:
2103 (JSC::JSGlobalObject::init): Disable specific function tracking here,
2104 instead of in WebCore, to ensure that the disabling happens before a
2105 specific function can be registered.
2107 2010-01-07 Alexey Proskuryakov <ap@apple.com>
2111 * JavaScriptCore.exp: Export new JSGlobalData static data members.
2113 2010-01-07 Alexey Proskuryakov <ap@apple.com>
2115 Reviewed by Geoffrey Garen.
2117 https://bugs.webkit.org/show_bug.cgi?id=33057
2118 REGRESSION(r49365): typeof(xhr.responseText) != "string" in Windows
2120 <rdar://problem/7296920> REGRESSION: WebKit fails to start PeaceKeeper benchmark
2122 Test: fast/js/webcore-string-comparison.html
2124 In r49365, some code was moved from JSString.cpp to JSString.h, and as a result, WebCore
2125 got a way to directly instantiate JSStrings over DLL borders. Since vftable for JSString was
2126 not exported, objects created from WebCore got a different vptr, and JavaScriptCore
2127 optimizations that relied on vptr of all JSString objects being equal failed.
2129 * config.h: Added a JS_EXPORTCLASS macro for exporting classes. It's currently the same as
2130 JS_EXPORTDATA, but it clearly needed a new name.
2132 * runtime/InitializeThreading.cpp:
2133 (JSC::initializeThreadingOnce):
2134 * runtime/JSGlobalData.cpp:
2135 (JSC::JSGlobalData::storeVPtrs):
2136 (JSC::JSGlobalData::JSGlobalData):
2137 (JSC::JSGlobalData::createNonDefault):
2138 (JSC::JSGlobalData::create):
2139 (JSC::JSGlobalData::sharedInstance):
2140 * runtime/JSGlobalData.h:
2141 Store vptrs just once, no need to repeatedly pick and copy them. This makes it possible to
2142 assert vptr correctness in object destructors (which don't have access to JSGlobalData,
2143 and even Heap::heap(this) will fail for fake objects created from storeVPtrs()).
2145 * runtime/JSArray.cpp: (JSC::JSArray::~JSArray): Assert that vptr is what we expect it to be.
2146 It's important to assert in destructor, because MSVC changes the vptr after constructor
2148 * runtime/JSByteArray.cpp: (JSC::JSByteArray::~JSByteArray): Ditto.
2149 * runtime/JSByteArray.h: Ditto.
2150 * runtime/JSFunction.h: Ditto.
2151 * runtime/JSFunction.cpp: (JSC::JSFunction::~JSFunction): Ditto.
2153 * runtime/JSCell.h: (JSC::JSCell::setVPtr): Added a method to substitute vptr for another
2156 * runtime/JSString.h: Export JSString class together with its vftable, and tell other
2157 libraries tp import it. This is needed on platforms that have a separate JavaScriptCore
2158 dynamic library - and on Mac, we already did the export via JavaScriptCore.exp.
2159 (JSC::JSString::~JSString): Assert tha vptr is what we expect it to be.
2160 (JSC::fixupVPtr): Store a previously saved primary vftable pointer (do nothing if building
2161 JavaScriptCore itself).
2162 (JSC::jsSingleCharacterString): Call fixupVPtr in case this is call across DLL boundary.
2163 (JSC::jsSingleCharacterSubstring): Ditto.
2164 (JSC::jsNontrivialString): Ditto.
2165 (JSC::jsString): Ditto.
2166 (JSC::jsSubstring): Ditto.
2167 (JSC::jsOwnedString): Ditto.
2169 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export the new static
2170 JSGlobalData members that are used in WebCore via inline functions.
2172 2010-01-07 Geoffrey Garen <ggaren@apple.com>
2174 Reviewed by Sam Weinig.
2176 Safari memory usage skyrockets using new Google AdWords interface
2177 https://bugs.webkit.org/show_bug.cgi?id=33343
2179 The memory use was caused by the global object creating too many structures
2180 as it thrashed between different specific functions.
2182 * runtime/Structure.cpp:
2183 (JSC::Structure::Structure):
2184 (JSC::Structure::addPropertyTransition):
2185 (JSC::Structure::changePrototypeTransition):
2186 (JSC::Structure::despecifyFunctionTransition):
2187 (JSC::Structure::addAnonymousSlotsTransition):
2188 (JSC::Structure::getterSetterTransition):
2189 (JSC::Structure::toDictionaryTransition):
2190 (JSC::Structure::addPropertyWithoutTransition):
2191 (JSC::Structure::despecifyAllFunctions):
2192 * runtime/Structure.h:
2193 (JSC::Structure::disableSpecificFunctionTracking): Track a thrash count
2194 for specific functions. Disable specific function tracking once the
2195 thrash count has been hit.
2197 2010-01-07 Csaba Osztrogonác <ossy@webkit.org>
2199 Reviewed by Simon Hausmann.
2201 [Qt] Enable JIT in debug mode on win32 after r51141 fixed the crashes.
2203 * JavaScriptCore.pri:
2205 2010-01-07 Zoltan Horvath <zoltan@webkit.org>
2207 Reviewed by Holger Freyther.
2209 [Mac] Build fix when FAST_MALLOC_MATCH_VALIDATION=1
2210 https://bugs.webkit.org/show_bug.cgi?id=33312
2212 Using of operator += cause compile error on Mac, so it is changed to
2213 "= static_cast<AllocAlignmentInteger*>(old_ptr) + 1".
2215 * wtf/FastMalloc.cpp:
2216 (WTF::TCMallocStats::realloc):
2218 2010-01-07 Zoltan Horvath <zoltan@webkit.org>
2220 Reviewed by Holger Freyther.
2222 [Qt] Build fix when FAST_MALLOC_MATCH_VALIDATION=1
2223 https://bugs.webkit.org/show_bug.cgi?id=33312
2225 Remove pByte (committed in r42344 from #20422), because pByte doesn't
2226 exist and it is unnecessary.
2228 * wtf/FastMalloc.cpp:
2229 (WTF::TCMallocStats::realloc):
2231 2010-01-06 Gavin Barraclough <barraclough@apple.com>
2235 * runtime/Identifier.cpp:
2236 (JSC::createIdentifierTableSpecific):
2238 2010-01-06 Gavin Barraclough <barraclough@apple.com>
2240 Windows build fix part I.
2242 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2244 2010-01-06 Dan Bernstein <mitz@apple.com>
2248 * runtime/Identifier.cpp:
2249 (JSC::createIdentifierTableSpecificCallback):
2251 2010-01-05 Gavin Barraclough <barraclough@apple.com>
2253 Reviewed by Sam Weinig.
2255 https://bugs.webkit.org/show_bug.cgi?id=33236
2256 Remove m_identifierTable pointer from UString
2258 Currently every string holds a pointer so that during destruction,
2259 if a string has been used as an identifier, it can remove itself
2260 from the table. By instead accessing the identifierTable via a
2261 thread specific tracking the table associated with the current
2262 globaldata, we can save the memory cost of this pointer.
2265 (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
2266 (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
2267 (JSC::APICallbackShim::APICallbackShim):
2268 (JSC::APICallbackShim::~APICallbackShim):
2270 - change the API shims to track the identifierTable of the current JSGlobalData.
2272 * API/JSContextRef.cpp:
2273 (JSContextGroupCreate):
2275 - update creation of JSGlobalData for API usage to use new create method.
2276 - fix shim instanciation bug in JSGlobalContextCreateInGroup.
2278 * JavaScriptCore.exp:
2279 * runtime/Completion.cpp:
2283 - add asserts to check the identifierTable is being tracked correctly.
2285 * runtime/Identifier.cpp:
2286 (JSC::IdentifierTable::~IdentifierTable):
2287 (JSC::IdentifierTable::add):
2288 (JSC::Identifier::remove):
2289 (JSC::Identifier::checkSameIdentifierTable):
2290 (JSC::createIdentifierTableSpecificCallback):
2291 (JSC::createIdentifierTableSpecific):
2292 (JSC::createDefaultDataSpecific):
2294 - Use currentIdentifierTable() instead of UStringImpl::m_identifierTable.
2295 - Define methods to access the thread specific identifier tables.
2297 * runtime/Identifier.h:
2298 (JSC::ThreadIdentifierTableData::ThreadIdentifierTableData):
2299 (JSC::defaultIdentifierTable):
2300 (JSC::setDefaultIdentifierTable):
2301 (JSC::currentIdentifierTable):
2302 (JSC::setCurrentIdentifierTable):
2303 (JSC::resetCurrentIdentifierTable):
2305 - Declare methods to access the thread specific identifier tables.
2307 * runtime/JSGlobalData.cpp:
2308 (JSC::JSGlobalData::createNonDefault):
2309 (JSC::JSGlobalData::create):
2310 (JSC::JSGlobalData::sharedInstance):
2312 - creation of JSGlobalData objects, other than for API usage, associate themselves with the current thread.
2314 * runtime/JSGlobalData.h:
2315 * runtime/UStringImpl.cpp:
2316 (JSC::UStringImpl::destroy):
2318 - destroy() method should be using isIdentifier().
2320 * runtime/UStringImpl.h:
2321 (JSC::UStringImpl::isIdentifier):
2322 (JSC::UStringImpl::setIsIdentifier):
2323 (JSC::UStringImpl::checkConsistency):
2324 (JSC::UStringImpl::UStringImpl):
2326 - replace m_identifierTable with a single m_isIdentifier bit.
2328 * wtf/StringHashFunctions.h:
2331 - change string hash result from 32-bit to 31-bit, to free a bit in UStringImpl for m_isIdentifier.
2333 2009-12-25 Patrick Gansterer <paroga@paroga.com>
2335 Reviewed by Eric Seidel.
2337 Buildfix for WinCE + style fixes.
2338 https://bugs.webkit.org/show_bug.cgi?id=32939
2344 (fillBufferWithContentsOfFile):
2346 2010-01-05 Patrick Gansterer <paroga@paroga.com>
2348 Reviewed by Eric Seidel.
2350 WinCE buildfix after r52791 (renamed PLATFORM(WINCE) to OS(WINCE)).
2351 https://bugs.webkit.org/show_bug.cgi?id=33205
2353 * jit/ExecutableAllocator.h:
2355 2010-01-05 Patrick Gansterer <paroga@paroga.com>
2357 Reviewed by Darin Adler.
2359 Added compiler error for unsupported platforms.
2360 https://bugs.webkit.org/show_bug.cgi?id=33112
2364 2010-01-05 Gabor Loki <loki@webkit.org>
2366 Reviewed by Maciej Stachowiak.
2368 Follow r52729 in ARMAssembler.
2369 https://bugs.webkit.org/show_bug.cgi?id=33208
2371 Use WTF_ARM_ARCH_AT_LEAST instead of ARM_ARCH_VERSION
2373 * assembler/ARMAssembler.cpp:
2374 (JSC::ARMAssembler::encodeComplexImm): Move tmp declaration to ARMv7
2375 * assembler/ARMAssembler.h:
2376 (JSC::ARMAssembler::):
2377 (JSC::ARMAssembler::bkpt):
2379 2010-01-05 Maciej Stachowiak <mjs@apple.com>
2381 Unreviewed build fix for Gtk+
2383 Don't use // comments in Platform.h, at least some of them seem to make the version of GCC
2384 used on the Gtk buildbot unhappy.
2388 2010-01-04 Maciej Stachowiak <mjs@apple.com>
2390 Reviewed by Darin Fisher.
2392 Reorganize, document and rename OS() platform macros.
2393 https://bugs.webkit.org/show_bug.cgi?id=33198
2395 * wtf/Platform.h: Rename, reorganize and document OS() macros.
2397 Adapt to name changes. Also fixed a few incorrect OS checks.
2399 * API/JSContextRef.cpp:
2400 * assembler/MacroAssemblerARM.cpp:
2401 (JSC::isVFPPresent):
2402 * assembler/MacroAssemblerX86Common.h:
2403 * bytecode/SamplingTool.cpp:
2405 * interpreter/RegisterFile.cpp:
2406 (JSC::RegisterFile::~RegisterFile):
2407 * interpreter/RegisterFile.h:
2408 (JSC::RegisterFile::RegisterFile):
2409 (JSC::RegisterFile::grow):
2410 * jit/ExecutableAllocator.h:
2411 * jit/ExecutableAllocatorFixedVMPool.cpp:
2412 * jit/ExecutableAllocatorPosix.cpp:
2413 * jit/ExecutableAllocatorSymbian.cpp:
2414 * jit/ExecutableAllocatorWin.cpp:
2415 * jit/JITOpcodes.cpp:
2416 (JSC::JIT::privateCompileCTIMachineTrampolines):
2421 * profiler/ProfileNode.cpp:
2423 * runtime/Collector.cpp:
2425 (JSC::Heap::allocateBlock):
2426 (JSC::Heap::freeBlockPtr):
2427 (JSC::currentThreadStackBase):
2428 (JSC::getCurrentPlatformThread):
2429 (JSC::suspendThread):
2430 (JSC::resumeThread):
2431 (JSC::getPlatformThreadRegisters):
2432 (JSC::otherThreadStackPointer):
2433 * runtime/Collector.h:
2434 * runtime/DateConstructor.cpp:
2435 * runtime/DatePrototype.cpp:
2436 (JSC::formatLocaleDate):
2437 * runtime/InitializeThreading.cpp:
2438 (JSC::initializeThreading):
2439 * runtime/MarkStack.h:
2440 (JSC::MarkStack::MarkStackArray::shrinkAllocation):
2441 * runtime/MarkStackPosix.cpp:
2442 * runtime/MarkStackSymbian.cpp:
2443 * runtime/MarkStackWin.cpp:
2444 * runtime/StringPrototype.cpp:
2445 (JSC::stringProtoFuncLastIndexOf):
2446 * runtime/TimeoutChecker.cpp:
2448 * runtime/UString.cpp:
2449 (JSC::UString::from):
2450 * wtf/Assertions.cpp:
2452 * wtf/CurrentTime.cpp:
2453 (WTF::lowResUTCTime):
2454 * wtf/CurrentTime.h:
2455 (WTF::getLocalTime):
2457 * wtf/FastMalloc.cpp:
2458 (WTF::TCMalloc_ThreadCache::InitModule):
2459 (WTF::TCMallocStats::):
2462 * wtf/RandomNumber.cpp:
2463 (WTF::randomNumber):
2464 * wtf/RandomNumberSeed.h:
2465 (WTF::initializeRandomNumberGenerator):
2466 * wtf/StringExtras.h:
2468 (TCMalloc_SpinLock::Unlock):
2469 (TCMalloc_SlowLock):
2470 * wtf/TCSystemAlloc.cpp:
2471 * wtf/ThreadSpecific.h:
2474 * wtf/ThreadingPthreads.cpp:
2475 (WTF::initializeThreading):
2476 (WTF::isMainThread):
2477 * wtf/ThreadingWin.cpp:
2478 (WTF::wtfThreadEntryPoint):
2479 (WTF::createThreadInternal):
2481 * wtf/unicode/icu/CollatorICU.cpp:
2482 (WTF::Collator::userDefault):
2483 * wtf/win/MainThreadWin.cpp:
2484 (WTF::initializeMainThreadPlatform):
2486 2010-01-04 Gustavo Noronha Silva <gns@gnome.org>
2488 Add missing files to the build system - make distcheck build fix.
2492 2010-01-04 Gavin Barraclough <barraclough@apple.com>
2494 Reviewed by Sam Weinig, additional coding by Mark Rowe.
2496 https://bugs.webkit.org/show_bug.cgi?id=33163
2497 Add string hashing functions to WTF.
2498 Use WTF's string hashing functions from UStringImpl.
2501 * JavaScriptCore.exp:
2502 * JavaScriptCore.gypi:
2503 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2504 * JavaScriptCore.xcodeproj/project.pbxproj:
2505 * runtime/UStringImpl.cpp:
2506 * runtime/UStringImpl.h:
2507 (JSC::UStringImpl::computeHash):
2508 * wtf/HashFunctions.h:
2509 * wtf/StringHashFunctions.h: Added.
2512 2010-01-04 Dmitry Titov <dimich@chromium.org>
2514 Not reviewed, attempt to fix ARM bulid.
2518 2010-01-04 Gavin Barraclough <barraclough@apple.com>
2520 Rubber stamped by Geoff Garen.
2522 Add an 'isIdentifier' to UStringImpl, use this where appropriate
2523 (where previously 'identifierTable' was being tested).
2525 * API/JSClassRef.cpp:
2526 (OpaqueJSClass::~OpaqueJSClass):
2527 (OpaqueJSClassContextData::OpaqueJSClassContextData):
2528 * runtime/Identifier.cpp:
2529 (JSC::Identifier::addSlowCase):
2530 * runtime/Identifier.h:
2531 (JSC::Identifier::add):
2532 * runtime/PropertyNameArray.cpp:
2533 (JSC::PropertyNameArray::add):
2534 * runtime/UStringImpl.h:
2535 (JSC::UStringImpl::isIdentifier):
2537 2010-01-04 Gavin Barraclough <barraclough@apple.com>
2539 Reviewed by Sam "Shimmey Shimmey" Weinig.
2541 https://bugs.webkit.org/show_bug.cgi?id=33158
2542 Refactor JSC API entry/exit to use RAII instead of copy/pasting code.
2543 Make it easier to change set of actions taken when passing across the API boundary.
2545 * API/APIShims.h: Added.
2546 (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
2547 (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
2548 (JSC::APIEntryShim::APIEntryShim):
2549 (JSC::APICallbackShim::APICallbackShim):
2550 (JSC::APICallbackShim::~APICallbackShim):
2553 (JSCheckScriptSyntax):
2555 (JSReportExtraMemoryCost):
2556 * API/JSCallbackConstructor.cpp:
2557 (JSC::constructJSCallback):
2558 * API/JSCallbackFunction.cpp:
2559 (JSC::JSCallbackFunction::call):
2560 * API/JSCallbackObjectFunctions.h:
2562 (JSC::::getOwnPropertySlot):
2564 (JSC::::deleteProperty):
2566 (JSC::::hasInstance):
2568 (JSC::::getOwnPropertyNames):
2571 (JSC::::staticValueGetter):
2572 (JSC::::callbackGetter):
2573 * API/JSContextRef.cpp:
2574 * API/JSObjectRef.cpp:
2576 (JSObjectMakeFunctionWithCallback):
2577 (JSObjectMakeConstructor):
2578 (JSObjectMakeFunction):
2579 (JSObjectMakeArray):
2581 (JSObjectMakeError):
2582 (JSObjectMakeRegExp):
2583 (JSObjectGetPrototype):
2584 (JSObjectSetPrototype):
2585 (JSObjectHasProperty):
2586 (JSObjectGetProperty):
2587 (JSObjectSetProperty):
2588 (JSObjectGetPropertyAtIndex):
2589 (JSObjectSetPropertyAtIndex):
2590 (JSObjectDeleteProperty):
2591 (JSObjectCallAsFunction):
2592 (JSObjectCallAsConstructor):
2593 (JSObjectCopyPropertyNames):
2594 (JSPropertyNameArrayRelease):
2595 (JSPropertyNameAccumulatorAddName):
2596 * API/JSValueRef.cpp:
2598 (JSValueIsUndefined):
2604 (JSValueIsObjectOfClass):
2606 (JSValueIsStrictEqual):
2607 (JSValueIsInstanceOfConstructor):
2608 (JSValueMakeUndefined):
2610 (JSValueMakeBoolean):
2611 (JSValueMakeNumber):
2612 (JSValueMakeString):
2615 (JSValueToStringCopy):
2619 * JavaScriptCore.xcodeproj/project.pbxproj:
2621 2010-01-04 Dan Bernstein <mitz@apple.com>
2623 Reviewed by Ada Chan and Mark Rowe.
2625 Updated copyright string
2628 * JavaScriptCore.vcproj/JavaScriptCore.resources/Info.plist:
2629 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc:
2631 2010-01-04 Adam Roben <aroben@apple.com>
2633 No review, rolling out r52741.
2634 http://trac.webkit.org/changeset/52741
2635 https://bugs.webkit.org/show_bug.cgi?id=33056
2637 * wtf/AlwaysInline.h:
2639 2010-01-04 Patrick Gansterer <paroga@paroga.com>
2641 Reviewed by Darin Adler.
2643 Add cacheFlush support for WinCE
2644 https://bugs.webkit.org/show_bug.cgi?id=33110
2646 * jit/ExecutableAllocator.h:
2647 (JSC::ExecutableAllocator::cacheFlush):
2649 2010-01-04 Patrick Gansterer <paroga@paroga.com>
2651 Reviewed by Adam Roben.
2653 Implement NO_RETURN for COMPILER(MSVC).
2654 https://bugs.webkit.org/show_bug.cgi?id=33056
2656 * wtf/AlwaysInline.h:
2658 2010-01-04 Maciej Stachowiak <mjs@apple.com>
2660 Reviewed by Simon Hausmann.
2662 Fix some PLATFORM(*_ENDIAN) uses to CPU()
2663 https://bugs.webkit.org/show_bug.cgi?id=33148
2665 * runtime/JSCell.cpp:
2667 * runtime/JSValue.h:
2670 2010-01-04 Maciej Stachowiak <mjs@apple.com>
2672 Reviewed by Adam Barth.
2674 Document CPU() macros in comments.
2675 https://bugs.webkit.org/show_bug.cgi?id=33147
2679 2010-01-04 Maciej Stachowiak <mjs@apple.com>
2681 Reviewed by Adam Barth.
2683 Reorganize, document and rename CPU() platform macros.
2684 https://bugs.webkit.org/show_bug.cgi?id=33145
2685 ExecutableAllocatorSymbian appears to have buggy ARM version check
2686 https://bugs.webkit.org/show_bug.cgi?id=33138
2689 Rename all macros related to detection of particular CPUs or
2690 classes of CPUs to CPU(), reorganize and document them.
2692 All remaining changes are adapting to the renames, plus fixing the
2693 second bug cited above.
2695 * assembler/ARMAssembler.cpp:
2696 * assembler/ARMAssembler.h:
2697 * assembler/ARMv7Assembler.h:
2698 * assembler/AbstractMacroAssembler.h:
2699 (JSC::AbstractMacroAssembler::Imm32::Imm32):
2700 * assembler/MacroAssembler.h:
2701 * assembler/MacroAssemblerARM.cpp:
2702 * assembler/MacroAssemblerARM.h:
2703 * assembler/MacroAssemblerCodeRef.h:
2704 (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
2705 * assembler/MacroAssemblerX86.h:
2706 * assembler/MacroAssemblerX86Common.h:
2707 * assembler/MacroAssemblerX86_64.h:
2708 * assembler/X86Assembler.h:
2709 (JSC::X86Registers::):
2710 (JSC::X86Assembler::):
2711 (JSC::X86Assembler::movl_mEAX):
2712 (JSC::X86Assembler::movl_EAXm):
2713 (JSC::X86Assembler::repatchLoadPtrToLEA):
2714 (JSC::X86Assembler::X86InstructionFormatter::memoryModRM):
2715 * jit/ExecutableAllocator.h:
2716 * jit/ExecutableAllocatorFixedVMPool.cpp:
2717 * jit/ExecutableAllocatorPosix.cpp:
2718 * jit/ExecutableAllocatorSymbian.cpp:
2719 (JSC::ExecutableAllocator::intializePageSize):
2722 * jit/JITArithmetic.cpp:
2723 * jit/JITInlineMethods.h:
2724 (JSC::JIT::beginUninterruptedSequence):
2725 (JSC::JIT::restoreArgumentReferenceForTrampoline):
2726 (JSC::JIT::emitCount):
2727 * jit/JITOpcodes.cpp:
2728 (JSC::JIT::privateCompileCTIMachineTrampolines):
2729 * jit/JITPropertyAccess.cpp:
2730 (JSC::JIT::privateCompileGetByIdProto):
2731 (JSC::JIT::privateCompileGetByIdProtoList):
2732 (JSC::JIT::privateCompileGetByIdChainList):
2733 (JSC::JIT::privateCompileGetByIdChain):
2735 (JSC::JITThunks::JITThunks):
2737 * runtime/Collector.cpp:
2738 (JSC::currentThreadStackBase):
2739 (JSC::getPlatformThreadRegisters):
2740 (JSC::otherThreadStackPointer):
2742 * wrec/WRECGenerator.cpp:
2743 (JSC::WREC::Generator::generateEnter):
2744 (JSC::WREC::Generator::generateReturnSuccess):
2745 (JSC::WREC::Generator::generateReturnFailure):
2746 * wrec/WRECGenerator.h:
2747 * wtf/FastMalloc.cpp:
2749 (TCMalloc_SpinLock::Lock):
2750 (TCMalloc_SpinLock::Unlock):
2751 (TCMalloc_SlowLock):
2754 * yarr/RegexJIT.cpp:
2755 (JSC::Yarr::RegexGenerator::generateEnter):
2756 (JSC::Yarr::RegexGenerator::generateReturn):
2759 2010-01-04 Maciej Stachowiak <mjs@apple.com>
2761 Reviewed by Adam Barth.
2763 Clean up COMPILER macros and remove unused ones.
2764 https://bugs.webkit.org/show_bug.cgi?id=33132
2766 Removed values are COMPILER(BORLAND) and COMPILER(CYGWIN) - they were
2771 2010-01-03 Maciej Stachowiak <mjs@apple.com>
2773 Reviewed by Eric Seidel.
2775 Update wtf/Platform.h to document the new system for porting macros.
2776 https://bugs.webkit.org/show_bug.cgi?id=33130
2780 2009-12-29 Laszlo Gombos <laszlo.1.gombos@nokia.com>
2782 Reviewed by Maciej Stachowiak.
2784 PLATFORM(CAIRO) should be defined by WIN_CAIRO define
2785 https://bugs.webkit.org/show_bug.cgi?id=22250
2787 * wtf/Platform.h: Define WTF_PLATFORM_CAIRO for GTK port only
2788 For the WinCairo port WTF_PLATFORM_CAIRO is already defined in config.h
2790 2009-12-28 Shu Chang <Chang.Shu@nokia.com>
2792 Reviewed by Laszlo Gombos.
2794 [Qt] Delete ThreadPrivate instance after it is finished.
2795 https://bugs.webkit.org/show_bug.cgi?id=32614
2797 * wtf/qt/ThreadingQt.cpp:
2798 (WTF::ThreadMonitor::instance):
2799 (WTF::ThreadMonitor::threadFinished):
2800 (WTF::createThreadInternal):
2801 (WTF::detachThread):
2803 2009-12-28 Patrick Gansterer <paroga@paroga.com>
2805 Reviewed by Maciej Stachowiak.
2807 Cleanup of #define JS_EXPORT.
2811 2009-12-27 Patrick Gansterer <paroga@paroga.com>
2813 Reviewed by Adam Barth.
2815 WinCE buildfix (HWND_MESSAGE isn't supported there)
2817 * wtf/win/MainThreadWin.cpp:
2818 (WTF::initializeMainThreadPlatform):
2820 2009-12-27 Patrick Gansterer <paroga@paroga.com>
2822 Reviewed by Adam Barth.
2824 Added a file with WinMain function to link agains in WinCE.
2826 * os-win32/WinMain.cpp: Added.
2830 2009-12-24 Laszlo Gombos <laszlo.1.gombos@nokia.com>
2832 Unreviewed; revert of r52550.
2834 The change regressed the following LayoutTests for QtWebKit.
2836 fast/workers/worker-call.html -> crashed
2837 fast/workers/worker-close.html -> crashed
2839 * wtf/qt/ThreadingQt.cpp:
2840 (WTF::waitForThreadCompletion):
2841 (WTF::detachThread):
2843 2009-12-24 Shu Chang <Chang.Shu@nokia.com>
2845 Reviewed by Laszlo Gombos.
2847 [Qt] Fix memory leak by deleting instance of ThreadPrivate
2848 in function waitForThreadCompletion(), synchronously, or in
2849 detachThread(), asynchronously.
2850 https://bugs.webkit.org/show_bug.cgi?id=32614
2852 * wtf/qt/ThreadingQt.cpp:
2853 (WTF::waitForThreadCompletion):
2854 (WTF::detachThread):
2856 2009-12-23 Kwang Yul Seo <skyul@company100.net>
2858 Reviewed by Laszlo Gombos.
2860 Include stddef.h for ptrdiff_t
2861 https://bugs.webkit.org/show_bug.cgi?id=32891
2863 ptrdiff_t is typedef-ed in stddef.h.
2864 Include stddef.h in jit/ExecutableAllocator.h.
2866 * jit/ExecutableAllocator.h:
2868 2009-12-23 Patrick Gansterer <paroga@paroga.com>
2870 Reviewed by Eric Seidel.
2872 Buildfix after r47092.
2874 * wtf/wince/MemoryManager.cpp:
2875 (WTF::tryFastMalloc):
2876 (WTF::tryFastZeroedMalloc):
2877 (WTF::tryFastCalloc):
2878 (WTF::tryFastRealloc):
2880 2009-12-23 Kent Tamura <tkent@chromium.org>
2882 Reviewed by Darin Adler.
2884 HTMLInputElement::valueAsDate getter support.
2885 https://bugs.webkit.org/show_bug.cgi?id=32876
2887 Expose dateToDaysFrom1970().
2889 * JavaScriptCore.exp:
2890 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2892 (WTF::dateToDaysFrom1970):
2895 2009-12-22 Darin Adler <darin@apple.com>
2897 Reviewed by Mark Rowe.
2899 Turn off datagrid by default, at least for all platforms Apple ships.
2900 The datagrid implementation isn't ready for general web use yet.
2902 * Configurations/FeatureDefines.xcconfig: Turn off datagrid by default.
2904 2009-12-22 Steve Block <steveblock@google.com>
2906 Reviewed by David Levin.
2908 Updates Android's scheduleDispatchFunctionsOnMainThread() to use new
2909 AndroidThreading class, rather than using JavaSharedClient directly.
2910 This fixes the current layering violation.
2911 https://bugs.webkit.org/show_bug.cgi?id=32651
2913 The pattern is copied from Chromium, which uses the ChromiumThreading
2914 class. This patch also fixes the style in ChromiumThreading.h.
2916 * wtf/android/AndroidThreading.h: Added. Declares AndroidThreading.
2917 * wtf/android/MainThreadAndroid.cpp: Modified
2918 (WTF::scheduleDispatchFunctionsOnMainThread): Uses AndroidThreading.
2919 * wtf/chromium/ChromiumThreading.h: Modified. Fixes style.
2921 2009-12-22 Gavin Barraclough <barraclough@apple.com>
2923 Reviewed by Sam Weinig.
2925 Fix a couple of problems with UntypedPtrAndBitfield.
2927 Add a m_leaksPtr to reduce false positives from leaks in debug builds
2928 (this isn't perfect because we'd like a solution for release builds,
2929 but this is now at least as good as a PtrAndFlags would be).
2931 Switch SmallStringsto use a regular string for the base, rather than
2932 a static one. UntypedPtrAndBitfield assumes all strings are at least
2933 8 byte aligned; this migt not be true of static strings. Shared buffers
2934 are heap allocated, as are all UStringImpls other than static strings.
2935 Static strings cannot end up being the owner string of substrings,
2936 since the only static strings are length 0.
2938 * runtime/SmallStrings.cpp:
2939 (JSC::SmallStringsStorage::SmallStringsStorage):
2940 * runtime/UStringImpl.h:
2941 (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield):
2942 (JSC::UStringImpl::UStringImpl):
2944 2009-12-22 Kwang Yul Seo <skyul@company100.net>
2946 Reviewed by Darin Adler.
2948 RVCT (__ARMCC_VERSION < 400000) does not provide strcasecmp and strncasecmp
2949 https://bugs.webkit.org/show_bug.cgi?id=32857
2951 Add implementation of strcasecmp and strncasecmp for RVCT < 4.0
2952 because earlier versions of RVCT 4.0 does not provide these functions.
2954 * wtf/StringExtras.cpp: Added.
2957 * wtf/StringExtras.h:
2959 2009-12-22 Kwang Yul Seo <skyul@company100.net>
2961 Reviewed by Darin Adler.
2963 Define ALWAYS_INLINE and WTF_PRIVATE_INLINE to __forceinline for RVCT
2964 https://bugs.webkit.org/show_bug.cgi?id=32853
2966 Use __forceinline forces RVCT to compile a C or C++ function
2967 inline. The compiler attempts to inline the function, regardless of
2968 the characteristics of the function.
2970 * wtf/AlwaysInline.h:
2973 2009-12-21 Simon Hausmann <simon.hausmann@nokia.com>
2975 Prospective GTK build fix: Add UStringImpl.cpp/h to the build.
2979 2009-12-21 Simon Hausmann <simon.hausmann@nokia.com>
2981 Fix the Qt build, add UStringImpl.cpp to the build.
2983 * JavaScriptCore.pri:
2985 2009-12-21 Gavin Barraclough <barraclough@apple.com>
2987 Windows Build fix part 5.
2988 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2990 2009-12-21 Gavin Barraclough <barraclough@apple.com>
2992 Reviewed by NOBODY (build fix).
2993 Fix breakage of world introduced in build fix to r52463.
2995 * runtime/UStringImpl.h:
2997 2009-12-21 Gavin Barraclough <barraclough@apple.com>
2999 Reviewed by Darin Adler.
3001 https://bugs.webkit.org/show_bug.cgi?id=32831
3002 Replace UString::Rep implementation, following introduction of ropes to JSC.
3004 * Remove redundant overcapacity mechanisms.
3005 * Reduce memory cost of Rep's.
3006 * Add an inline storage mechanism akin to that in WebCore's StringImpl.
3008 ~1% Sunspider progression.
3010 * JavaScriptCore.exp:
3011 * JavaScriptCore.xcodeproj/project.pbxproj:
3012 * runtime/JSString.cpp:
3013 (JSC::JSString::resolveRope):
3014 * runtime/SmallStrings.cpp:
3015 (JSC::SmallStringsStorage::SmallStringsStorage):
3016 * runtime/UString.cpp:
3017 (JSC::initializeUString):
3019 (JSC::UString::createFromUTF8):
3020 (JSC::UString::createUninitialized):
3021 (JSC::UString::spliceSubstringsWithSeparators):
3022 (JSC::UString::replaceRange):
3023 (JSC::UString::ascii):
3024 (JSC::UString::operator=):
3025 (JSC::UString::toStrictUInt32):
3027 * runtime/UString.h:
3028 (JSC::UString::isEmpty):
3029 (JSC::UString::cost):
3031 * runtime/UStringImpl.cpp: Added.
3032 (JSC::UStringImpl::baseSharedBuffer):
3033 (JSC::UStringImpl::sharedBuffer):
3034 (JSC::UStringImpl::destroy):
3035 (JSC::UStringImpl::computeHash):
3036 * runtime/UStringImpl.h: Added.
3037 (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield):
3038 (JSC::UntypedPtrAndBitfield::asPtr):
3039 (JSC::UntypedPtrAndBitfield::operator&=):
3040 (JSC::UntypedPtrAndBitfield::operator|=):
3041 (JSC::UntypedPtrAndBitfield::operator&):
3042 (JSC::UStringImpl::create):
3043 (JSC::UStringImpl::createCopying):
3044 (JSC::UStringImpl::createUninitialized):
3045 (JSC::UStringImpl::data):
3046 (JSC::UStringImpl::size):
3047 (JSC::UStringImpl::cost):
3048 (JSC::UStringImpl::hash):
3049 (JSC::UStringImpl::computedHash):
3050 (JSC::UStringImpl::setHash):
3051 (JSC::UStringImpl::identifierTable):
3052 (JSC::UStringImpl::setIdentifierTable):
3053 (JSC::UStringImpl::ref):
3054 (JSC::UStringImpl::deref):
3055 (JSC::UStringImpl::allocChars):
3056 (JSC::UStringImpl::copyChars):
3057 (JSC::UStringImpl::computeHash):
3058 (JSC::UStringImpl::null):
3059 (JSC::UStringImpl::empty):
3060 (JSC::UStringImpl::checkConsistency):
3061 (JSC::UStringImpl::):
3062 (JSC::UStringImpl::UStringImpl):
3063 (JSC::UStringImpl::operator new):
3064 (JSC::UStringImpl::bufferOwnerString):
3065 (JSC::UStringImpl::bufferOwnership):
3066 (JSC::UStringImpl::isStatic):
3068 2009-12-18 Laszlo Gombos <laszlo.1.gombos@nokia.com>
3070 Reviewed by Kenneth Rohde Christiansen.
3072 Move some build decisions from Qt build system into source files
3073 https://bugs.webkit.org/show_bug.cgi?id=31956
3075 * JavaScriptCore.pri: Compile files unconditionally
3076 * jit/ExecutableAllocatorPosix.cpp: Guard with PLATFORM(UNIX) && !PLATFORM(SYMBIAN)
3077 * jit/ExecutableAllocatorWin.cpp: Guard with PLATFORM(WIN_OS)
3078 * runtime/MarkStackPosix.cpp: Guard with PLATFORM(UNIX) && !PLATFORM(SYMBIAN)
3079 * runtime/MarkStackSymbian.cpp: Guard with PLATFORM(SYMBIAN)
3080 * runtime/MarkStackWin.cpp: Guard with PLATFORM(WIN_OS)
3081 * wtf/Platform.h: Guard ENABLE_JSC_MULTIPLE_THREADS with ENABLE_SINGLE_THREADED for the Qt port
3082 * wtf/ThreadingNone.cpp: Guard with ENABLE(SINGLE_THREADED)
3083 * wtf/qt/ThreadingQt.cpp: Guard with !ENABLE(SINGLE_THREADED)
3085 2009-12-18 Gavin Barraclough <barraclough@apple.com>
3087 Reviewed by Sam Weinig.
3089 Add createNonCopying method to UString to make replace constructor passed bool,
3090 to make behaviour more explicit. Add createFromUTF8 to UString (wrapping method
3091 on UString::Rep), since other cases of transliteration (e.g. from ascii) are
3092 performed in UString constructors. Add/use setHash & size() accessors on Rep,
3093 rather than accessing _hash/len directly.
3095 * API/JSClassRef.cpp:
3096 (OpaqueJSClass::OpaqueJSClass):
3097 * API/OpaqueJSString.cpp:
3098 (OpaqueJSString::ustring):
3099 * JavaScriptCore.exp:
3100 * runtime/ArrayPrototype.cpp:
3101 (JSC::arrayProtoFuncToString):
3102 * runtime/Identifier.cpp:
3103 (JSC::Identifier::equal):
3104 (JSC::CStringTranslator::translate):
3105 (JSC::UCharBufferTranslator::translate):
3106 (JSC::Identifier::addSlowCase):
3107 * runtime/JSString.cpp:
3108 (JSC::JSString::resolveRope):
3109 * runtime/JSString.h:
3110 (JSC::JSString::Rope::Fiber::refAndGetLength):
3111 (JSC::JSString::Rope::append):
3112 * runtime/StringBuilder.h:
3113 (JSC::StringBuilder::release):
3114 * runtime/StringConstructor.cpp:
3115 (JSC::stringFromCharCodeSlowCase):
3116 * runtime/StringPrototype.cpp:
3117 (JSC::substituteBackreferencesSlow):
3118 (JSC::stringProtoFuncToLowerCase):
3119 (JSC::stringProtoFuncToUpperCase):
3120 (JSC::stringProtoFuncFontsize):
3121 (JSC::stringProtoFuncLink):
3122 * runtime/UString.cpp:
3123 (JSC::UString::UString):
3124 (JSC::UString::createNonCopying):
3125 (JSC::UString::createFromUTF8):
3126 * runtime/UString.h:
3127 (JSC::UString::Rep::setHash):
3128 (JSC::UString::~UString):
3131 2009-12-18 Geoffrey Garen <ggaren@apple.com>
3133 Reviewed by Cameron Zwarich and Gavin Barraclough.
3135 Changed Register constructors to assignment operators, to streamline
3136 moving values into registers. (In theory, there's no difference between
3137 the two, since the constructor should just inline away, but there seems
3138 to be a big difference in the addled mind of the GCC optimizer.)
3140 In the interpreter, this is a 3.5% SunSpider speedup and a 1K-2K
3141 reduction in stack usage per privateExecute stack frame.
3143 * interpreter/CallFrame.h:
3144 (JSC::ExecState::setCalleeArguments):
3145 (JSC::ExecState::setCallerFrame):
3146 (JSC::ExecState::setScopeChain):
3147 (JSC::ExecState::init):
3148 (JSC::ExecState::setArgumentCount):
3149 (JSC::ExecState::setCallee):
3150 (JSC::ExecState::setCodeBlock): Added a little bit of casting so these
3151 functions could use the new Register assignment operators.
3153 * interpreter/Register.h:
3154 (JSC::Register::withInt):
3155 (JSC::Register::Register):
3156 (JSC::Register::operator=): Swapped in assignment operators for constructors.
3158 2009-12-18 Yongjun Zhang <yongjun.zhang@nokia.com>
3160 Reviewed by Simon Hausmann.
3162 https://bugs.webkit.org/show_bug.cgi?id=32713
3163 [Qt] make wtf/Assertions.h compile in winscw compiler.
3165 Add string arg before ellipsis to help winscw compiler resolve variadic
3166 macro definitions in wtf/Assertions.h.
3170 2009-12-18 Geoffrey Garen <ggaren@apple.com>
3172 Reviewed by Adam Roben.
3174 Fixed intermittent failure seen on Windows buildbot, and in other JSC
3177 Added a WeakGCPtr class and changed OpaqueJSClass::cachedPrototype to
3178 use it, to avoid vending a stale object as a prototype.
3180 * API/JSClassRef.cpp:
3181 (OpaqueJSClassContextData::OpaqueJSClassContextData):
3182 (OpaqueJSClass::prototype):
3183 * API/JSClassRef.h: Use WeakGCPtr.
3185 * JavaScriptCore.xcodeproj/project.pbxproj:
3186 * runtime/WeakGCPtr.h: Added.
3187 (JSC::WeakGCPtr::WeakGCPtr):
3188 (JSC::WeakGCPtr::get):
3189 (JSC::WeakGCPtr::clear):
3190 (JSC::WeakGCPtr::operator*):
3191 (JSC::WeakGCPtr::operator->):
3192 (JSC::WeakGCPtr::operator!):
3193 (JSC::WeakGCPtr::operator bool):
3194 (JSC::WeakGCPtr::operator UnspecifiedBoolType):
3195 (JSC::WeakGCPtr::assign):
3199 (JSC::static_pointer_cast):
3200 (JSC::const_pointer_cast):
3201 (JSC::getPtr): Added WeakGCPtr to the project.
3203 2009-12-18 Gavin Barraclough <barraclough@apple.com>
3205 Reviewed by Sam Weinig.
3207 https://bugs.webkit.org/show_bug.cgi?id=32720
3209 * JavaScriptCore.exp:
3210 - Remove exports for UString::append
3211 * JavaScriptCore.xcodeproj/project.pbxproj:
3212 - Make StringBuilder a private header (was project).
3214 2009-12-18 Martin Robinson <martin.james.robinson@gmail.com>
3216 Reviewed by Gustavo Noronha Silva.
3218 [GTK] GRefPtr does not take a reference when assigned a raw pointer
3219 https://bugs.webkit.org/show_bug.cgi?id=32709
3221 Ensure that when assigning a raw pointer to a GRefPtr, the reference
3222 count is incremented. Also remove the GRefPtr conversion overload as
3223 GRefPtr types have necessarily incompatible reference counting.
3225 * wtf/gtk/GRefPtr.h:
3226 (WTF::GRefPtr::operator=):
3228 2009-12-18 Simon Hausmann <simon.hausmann@nokia.com>
3230 Reviewed by Tor Arne Vestbø.
3232 [Qt] Clean up the qmake build system to distinguish between trunk builds and package builds
3234 https://bugs.webkit.org/show_bug.cgi?id=32716
3236 * pcre/pcre.pri: Use standalone_package instead of QTDIR_build
3238 2009-12-18 Martin Robinson <martin.james.robinson@gmail.com>
3240 Reviewed by Gustavo Noronha Silva.
3242 [GTK] Compile warning from line 29 of GRefPtr.cpp
3243 https://bugs.webkit.org/show_bug.cgi?id=32703
3245 Fix memory leak and compiler warning in GRefPtr GHashTable template
3248 * wtf/gtk/GRefPtr.cpp:
3251 2009-12-17 Sam Weinig <sam@webkit.org>
3253 Reviewed by Mark Rowe.
3255 Add BUILDING_ON_SNOW_LEOPARD and TARGETING_SNOW_LEOPARD #defines.
3259 2009-12-17 Adam Roben <aroben@apple.com>
3261 Sync JavaScriptCore.vcproj with JavaScriptCore.xcodeproj and the
3264 Fixes <http://webkit.org/b/32665>.
3266 Reviewed by Ada Chan.
3268 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Moved
3269 around files and filters so that the structure matches
3270 JavaScriptCore.xcodeproj and the source tree. A few headers that were
3271 previously omitted have been added, as well as JSZombie.{cpp,h}.
3273 2009-12-17 Adam Roben <aroben@apple.com>