2009-11-23 Steve Block <steveblock@google.com>
[WebKit-https.git] / JavaScriptCore / ChangeLog
1 2009-11-23  Steve Block  <steveblock@google.com>
2
3         Reviewed by Dmitry Titov.
4
5         Adds MainThreadAndroid.cpp with Android-specific WTF threading functions.
6         https://bugs.webkit.org/show_bug.cgi?id=31807
7
8         * wtf/android: Added.
9         * wtf/android/MainThreadAndroid.cpp: Added.
10         (WTF::timeoutFired):
11         (WTF::initializeMainThreadPlatform):
12         (WTF::scheduleDispatchFunctionsOnMainThread):
13
14 2009-11-23  Alexey Proskuryakov  <ap@apple.com>
15
16         Reviewed by Brady Eidson.
17
18         https://bugs.webkit.org/show_bug.cgi?id=31748
19         Make WebSocketHandleCFNet respect proxy auto-configuration files via CFProxySupport
20
21         * JavaScriptCore.exp: Export callOnMainThreadAndWait.
22
23 2009-11-23  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
24
25         Reviewed by Kenneth Rohde Christiansen.
26
27         [Symbian] Fix lastIndexOf() for Symbian
28         https://bugs.webkit.org/show_bug.cgi?id=31773
29
30         Symbian soft floating point library has problems with operators
31         comparing NaN to numbers. Without a workaround lastIndexOf() 
32         function does not work.
33
34         Patch developed by David Leong.
35
36         * runtime/StringPrototype.cpp:
37         (JSC::stringProtoFuncLastIndexOf):Add an extra test 
38         to check for NaN for Symbian.
39
40 2009-11-23  Steve Block  <steveblock@google.com>
41
42         Reviewed by Eric Seidel.
43
44         Android port lacks implementation of atomicIncrement and atomicDecrement.
45         https://bugs.webkit.org/show_bug.cgi?id=31715
46
47         * wtf/Threading.h: Modified.
48         (WTF::atomicIncrement): Added Android implementation.
49         (WTF::atomicDecrement): Added Android implementation.
50
51 2009-11-22  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
52
53         Unreviewed.
54
55         [Qt] Sort source lists and remove obsolete comments 
56         from the build system.
57
58         * JavaScriptCore.pri:
59
60 2009-11-21  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
61
62         Reviewed by Eric Seidel.
63
64         [Qt][Mac] Turn on multiple JavaScript threads for QtWebkit on Mac
65         https://bugs.webkit.org/show_bug.cgi?id=31753
66
67         * wtf/Platform.h:
68
69 2009-11-19  Steve Block  <steveblock@google.com>
70
71         Android port lacks configuration in Platform.h and config.h.
72         https://bugs.webkit.org/show_bug.cgi?id=31671
73
74         * wtf/Platform.h: Modified. Added Android-specific configuration.
75
76 2009-11-19  Alexey Proskuryakov  <ap@apple.com>
77
78         Reviewed by Darin Adler.
79
80         https://bugs.webkit.org/show_bug.cgi?id=31690
81         Make SocketStreamHandleCFNet work on Windows
82
83         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
84         * wtf/MainThread.cpp:
85         (WTF::FunctionWithContext::FunctionWithContext):
86         (WTF::dispatchFunctionsFromMainThread):
87         (WTF::callOnMainThreadAndWait):
88         * wtf/MainThread.h:
89         Re-add callOnMainThreadAndWait(), which was removed in bug 23926.
90
91 2009-11-19  Dmitry Titov  <dimich@chromium.org>
92
93         Reviewed by David Levin.
94
95         isMainThread() on Chromium (Mac and Linux) is so slow it timeouts LayoutTests..
96         https://bugs.webkit.org/show_bug.cgi?id=31693
97
98         * wtf/ThreadingPthreads.cpp:
99         (WTF::initializeThreading): grab and use the pthread_t of the main thread instead of ThreadIdentifier.
100         (WTF::isMainThread): Ditto.
101
102 2009-11-19  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
103
104         Reviewed by Darin Adler.
105
106         Remove HAVE(STRING_H) guard from JavaScriptCore
107         https://bugs.webkit.org/show_bug.cgi?id=31668
108
109         * config.h:
110         * runtime/UString.cpp:
111
112 2009-11-19  Dumitru Daniliuc  <dumi@chromium.org>
113
114         Reviewed by Dmitry Titov.
115
116         Fixing a bug in MessageQueue::removeIf() that leads to an
117         assertion failure.
118
119         https://bugs.webkit.org/show_bug.cgi?id=31657
120
121         * wtf/MessageQueue.h:
122         (WTF::MessageQueue::removeIf):
123
124 2009-11-19  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
125
126         Reviewed by Darin Adler.
127
128         Remove HAVE(FLOAT_H) guard
129         https://bugs.webkit.org/show_bug.cgi?id=31661
130
131         JavaScriptCore has a dependency on float.h, there is
132         no need to guard float.h.
133
134         * runtime/DatePrototype.cpp: Remove include directive 
135         for float.h as it is included in MathExtras.h already.
136         * runtime/Operations.cpp: Ditto.
137         * runtime/UString.cpp: Ditto.
138         * wtf/dtoa.cpp: Ditto.
139         * wtf/MathExtras.h: Remove HAVE(FLOAT_H) guard.
140         * wtf/Platform.h: Ditto.
141
142 2009-11-19  Thiago Macieira <thiago.macieira@nokia.com>
143
144         Reviewed by Simon Hausmann.
145
146         Build fix for 32-bit Sparc machines: these machines are big-endian.
147
148         * wtf/Platform.h:
149
150 2009-11-18  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
151
152         Reviewed by Kenneth Rohde Christiansen.
153
154         [Qt] Remove support for Qt v4.3 or older versions
155         https://bugs.webkit.org/show_bug.cgi?id=29469
156
157         * JavaScriptCore.pro:
158         * jsc.pro:
159         * wtf/unicode/qt4/UnicodeQt4.h:
160
161 2009-11-18  Kent Tamura  <tkent@chromium.org>
162
163         Reviewed by Darin Adler.
164
165         Move UString::from(double) implementation to new
166         WTF::doubleToStringInJavaScriptFormat(), and expose it because WebCore
167         code will use it.
168         https://bugs.webkit.org/show_bug.cgi?id=31330
169
170         - Introduce new function createRep(const char*, unsigned) and
171           UString::UString(const char*, unsigned) to reduce 2 calls to strlen().
172         - Fix a bug that dtoa() doesn't update *rve if the input value is NaN
173           or Infinity.
174
175         No new tests because this doesn't change the behavior.
176
177         * JavaScriptCore.exp:
178         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
179         * runtime/UString.cpp:
180         (JSC::createRep):
181         (JSC::UString::UString):
182         (JSC::UString::from): Move the code to doubleToStringInJavaScriptFormat().
183         * runtime/UString.h:
184         * wtf/dtoa.cpp:
185         (WTF::dtoa): Fix a bug about rve.
186         (WTF::append): A helper for doubleToStringInJavaScriptFormat().
187         (WTF::doubleToStringInJavaScriptFormat): Move the code from UString::from(double).
188         * wtf/dtoa.h:
189
190 2009-11-18  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
191
192         Reviewed by Kenneth Rohde Christiansen.
193
194         [Qt] Remove WTF_USE_JAVASCRIPTCORE_BINDINGS as it is no longer used
195         https://bugs.webkit.org/show_bug.cgi?id=31643
196
197         * JavaScriptCore.pro:
198
199 2009-11-18  Nate Chapin  <japhet@chromium.org>
200
201         Reviewed by Darin Fisher.
202
203         Remove Chromium's unnecessary dependency on wtf's tcmalloc files.
204
205         https://bugs.webkit.org/show_bug.cgi?id=31648
206
207         * JavaScriptCore.gyp/JavaScriptCore.gyp:
208
209 2009-11-18  Thiago Macieira <thiago.macieira@nokia.com>
210
211         Reviewed by Gavin Barraclough.
212
213         [Qt] Implement symbol hiding for JSC's JIT functions.
214
215         These functions are implemented directly in assembly, so they need the
216         proper directives to enable/disable visibility. On ELF systems, it's
217         .hidden, whereas on Mach-O systems (Mac) it's .private_extern. On
218         Windows, it's not necessary since you have to explicitly export. I
219         also implemented the AIX idiom, though it's unlikely anyone will
220         implement AIX/POWER JIT.
221         https://bugs.webkit.org/show_bug.cgi?id=30864
222
223         * jit/JITStubs.cpp:
224
225 2009-11-18  Oliver Hunt  <oliver@apple.com>
226
227         Reviewed by Alexey Proskuryakov.
228
229         Interpreter may do an out of range access when throwing an exception in the profiler.
230         https://bugs.webkit.org/show_bug.cgi?id=31635
231
232         Add bounds check.
233
234         * interpreter/Interpreter.cpp:
235         (JSC::Interpreter::throwException):
236
237 2009-11-18  Gabor Loki  <loki@inf.u-szeged.hu>
238
239         Reviewed by Darin Adler.
240
241         Fix the clobber list of cacheFlush for ARM and Thumb2 on Linux
242         https://bugs.webkit.org/show_bug.cgi?id=31631
243
244         * jit/ExecutableAllocator.h:
245         (JSC::ExecutableAllocator::cacheFlush):
246
247 2009-11-18  Harald Fernengel  <harald.fernengel@nokia.com>
248
249         Reviewed by Simon Hausmann.
250
251         [Qt] Fix detection of linux-g++
252
253         Never use "linux-g++*" to check for linux-g++, since this will break embedded
254         builds which use linux-arm-g++ and friends. Use 'linux*-g++*' to check for any
255         g++ on linux mkspec.
256
257         * JavaScriptCore.pri:
258
259 2009-11-17  Jon Honeycutt  <jhoneycutt@apple.com>
260
261         Add JSContextRefPrivate.h to list of copied files.
262
263         Reviewed by Mark Rowe.
264
265         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
266
267 2009-11-17  Martin Robinson  <martin.james.robinson@gmail.com>
268
269         Reviewed by Adam Barth.
270
271         [GTK] Style cleanup for GOwnPtr
272         https://bugs.webkit.org/show_bug.cgi?id=31506
273
274         Remove forward declaration in GOwnPtr and do some style cleanup.
275
276         * wtf/GOwnPtr.cpp:
277         * wtf/GOwnPtr.h:
278         (WTF::GOwnPtr::GOwnPtr):
279         (WTF::GOwnPtr::~GOwnPtr):
280         (WTF::GOwnPtr::get):
281         (WTF::GOwnPtr::release):
282         (WTF::GOwnPtr::outPtr):
283         (WTF::GOwnPtr::set):
284         (WTF::GOwnPtr::clear):
285         (WTF::GOwnPtr::operator*):
286         (WTF::GOwnPtr::operator->):
287         (WTF::GOwnPtr::operator!):
288         (WTF::GOwnPtr::operator UnspecifiedBoolType):
289         (WTF::GOwnPtr::swap):
290         (WTF::swap):
291         (WTF::operator==):
292         (WTF::operator!=):
293         (WTF::getPtr):
294         (WTF::freeOwnedGPtr):
295
296 2009-11-17  Oliver Hunt  <oliver@apple.com>
297
298         Reviewed by Maciej Stachowiak.
299
300         Incorrect use of JavaScriptCore API in DumpRenderTree
301         https://bugs.webkit.org/show_bug.cgi?id=31577
302
303         Add assertions to the 'toJS' functions to catch mistakes like
304         this early.  Restructure existing code which blindly passed potentially
305         null values to toJS when forwarding exceptions so that a null check is
306         performed first.
307
308         * API/APICast.h:
309         (toJS):
310         (toJSForGC):
311         * API/JSCallbackObjectFunctions.h:
312         (JSC::::getOwnPropertySlot):
313         (JSC::::put):
314         (JSC::::deleteProperty):
315         (JSC::::construct):
316         (JSC::::hasInstance):
317         (JSC::::call):
318         (JSC::::toNumber):
319         (JSC::::toString):
320         (JSC::::staticValueGetter):
321         (JSC::::callbackGetter):
322         * API/tests/testapi.c: Fix errors in the API tester.
323         (MyObject_getProperty):
324         (MyObject_convertToType):
325         (EvilExceptionObject_convertToType):
326
327 2009-11-16  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
328
329         Reviewed by Gavin Barraclough.
330
331         https://bugs.webkit.org/show_bug.cgi?id=31050
332
333         Minor fixes for JSVALUE32_64: branchConvertDoubleToInt32
334         failed on a CortexA8 CPU, but not on a simulator; and
335         JITCall.cpp modifications was somehow not committed to mainline.
336
337         * assembler/ARMAssembler.h:
338         (JSC::ARMAssembler::fmrs_r):
339         * assembler/MacroAssemblerARM.h:
340         (JSC::MacroAssemblerARM::branchConvertDoubleToInt32):
341         * jit/JITCall.cpp:
342         (JSC::JIT::compileOpCall):
343
344 2009-11-16  Joerg Bornemann  <joerg.bornemann@trolltech.com>
345
346         Reviewed by Simon Hausmann.
347
348         Fix Qt build on Windows CE 6.
349
350         * JavaScriptCore.pri: Add missing include path.
351         * wtf/Platform.h: Include ce_time.h for Windows CE 6.
352
353 2009-11-13  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
354
355         Reviewed by Gavin Barraclough.
356
357         https://bugs.webkit.org/show_bug.cgi?id=31050
358
359         Adding optimization support for mode JSVALUE32_64
360         on ARM systems.
361
362         * jit/JIT.h:
363         * jit/JITCall.cpp:
364         (JSC::JIT::compileOpCall):
365         * jit/JITPropertyAccess.cpp:
366         (JSC::JIT::emit_op_method_check):
367         (JSC::JIT::compileGetByIdHotPath):
368         (JSC::JIT::compileGetByIdSlowCase):
369         (JSC::JIT::emit_op_put_by_id):
370
371 2009-11-14  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
372
373         Reviewed by Gavin Barraclough.
374
375         https://bugs.webkit.org/show_bug.cgi?id=31050
376
377         Adding JSVALUE32_64 support for ARM (but not turning it
378         on by default). All optimizations must be disabled, since
379         this patch is only the first of a series of patches.
380
381         During the work, a lot of x86 specific code revealed and
382         made platform independent.
383         See revisions: 50531 50541 50593 50594 50595
384
385         * assembler/ARMAssembler.h:
386         (JSC::ARMAssembler::):
387         (JSC::ARMAssembler::fdivd_r):
388         * assembler/MacroAssemblerARM.h:
389         (JSC::MacroAssemblerARM::lshift32):
390         (JSC::MacroAssemblerARM::neg32):
391         (JSC::MacroAssemblerARM::rshift32):
392         (JSC::MacroAssemblerARM::branchOr32):
393         (JSC::MacroAssemblerARM::set8):
394         (JSC::MacroAssemblerARM::setTest8):
395         (JSC::MacroAssemblerARM::loadDouble):
396         (JSC::MacroAssemblerARM::divDouble):
397         (JSC::MacroAssemblerARM::convertInt32ToDouble):
398         (JSC::MacroAssemblerARM::zeroDouble):
399         * jit/JIT.cpp:
400         * jit/JIT.h:
401         * jit/JITOpcodes.cpp:
402         (JSC::JIT::privateCompileCTIMachineTrampolines):
403         * jit/JITStubs.cpp:
404         * wtf/StdLibExtras.h:
405
406 2009-11-13  Dominik Röttsches  <dominik.roettsches@access-company.com>
407
408         Reviewed by Eric Seidel.
409
410         Unify TextBoundaries implementations by only relying on WTF Unicode abstractions
411         https://bugs.webkit.org/show_bug.cgi?id=31468
412
413         Adding isAlphanumeric abstraction, required
414         by TextBoundaries.cpp.
415
416         * wtf/unicode/glib/UnicodeGLib.h:
417         (WTF::Unicode::isAlphanumeric):
418         * wtf/unicode/icu/UnicodeIcu.h:
419         (WTF::Unicode::isAlphanumeric):
420
421 2009-11-13  Norbert Leser  <norbert.leser&nokia.com>
422
423         Reviewed by Eric Seidel.
424
425         Added macros for USERINCLUDE paths within symbian blocks
426         to guarantee inclusion of respective header files from local path
427         first (to avoid clashes with same names of header files in system include path).
428
429         * JavaScriptCore.pri:
430
431 2009-11-13  Oliver Hunt  <oliver@apple.com>
432
433         Reviewed by Geoff Garen.
434
435         JSValueProtect and JSValueUnprotect don't protect API wrapper values
436         https://bugs.webkit.org/show_bug.cgi?id=31485
437
438         Make JSValueProtect/Unprotect use a new 'toJS' function, 'toJSForGC' that
439         does not attempt to to strip out API wrapper objects.
440
441         * API/APICast.h:
442         (toJSForGC):
443         * API/JSValueRef.cpp:
444         (JSValueProtect):
445         (JSValueUnprotect):
446         * API/tests/testapi.c:
447         (makeGlobalNumberValue):
448         (main):
449
450 2009-11-13  İsmail Dönmez  <ismail@namtrac.org>
451
452         Reviewed by Antti Koivisto.
453
454         Fix typo, ce_time.cpp should be ce_time.c
455
456         * JavaScriptCore.pri:
457
458 2009-11-12  Steve VanDeBogart  <vandebo@chromium.org>
459
460         Reviewed by Adam Barth.
461
462         Calculate the time offset only if we were able to parse
463         the date string. This saves an IPC in Chromium for
464         invalid date strings.
465         https://bugs.webkit.org/show_bug.cgi?id=31416
466
467         * wtf/DateMath.cpp:
468         (WTF::parseDateFromNullTerminatedCharacters):
469         (JSC::parseDateFromNullTerminatedCharacters):
470
471 2009-11-12  Oliver Hunt  <oliver@apple.com>
472
473         Rollout r50896 until i can work out why it causes failures.
474
475         * bytecompiler/BytecodeGenerator.cpp:
476         (JSC::BytecodeGenerator::emitReturn):
477         * interpreter/Interpreter.cpp:
478         (JSC::Interpreter::execute):
479         * parser/Nodes.cpp:
480         (JSC::EvalNode::emitBytecode):
481
482 2009-11-12  Steve Falkenburg  <sfalken@apple.com>
483
484         Reviewed by Stephanie Lewis.
485
486         Remove LIBRARY directive from def file to fix Debug_All target.
487
488         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
489
490 2009-11-12  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
491
492         Rubber-stamped by Holger Freyther.
493
494         Revert r50204, since it makes DRT crash on 32 bits release builds
495         for GTK+.
496
497         * wtf/FastMalloc.h:
498
499 2009-11-12  Oliver Hunt  <oliver@apple.com>
500
501         Reviewed by Gavin Barraclough.
502
503         Start unifying entry logic for function and eval code.
504
505         Eval now uses a ret instruction to end execution, and sets up
506         a callframe more in line with what we do for function entry.
507
508         * bytecompiler/BytecodeGenerator.cpp:
509         (JSC::BytecodeGenerator::emitReturn):
510         * interpreter/Interpreter.cpp:
511         (JSC::Interpreter::execute):
512         * parser/Nodes.cpp:
513         (JSC::EvalNode::emitBytecode):
514
515 2009-11-12  Richard Moe Gustavsen  <richard.gustavsen@nokia.com>
516
517         Reviewed by Kenneth Rohde Christiansen.
518
519         [Qt] Disable pthread_setname_np.
520
521         This allows Qt builds on Mac from 10.6 to run on earlier version
522         where this symbol is not present.
523         https://bugs.webkit.org/show_bug.cgi?id=31403
524
525         * wtf/Platform.h:
526
527 2009-11-12  Thiago Macieira <thiago.macieira@nokia.com>
528
529         Reviewed by Kenneth Rohde Christiansen.
530
531         [Qt] Fix linking on Linux 32-bit.
532
533         It was missing the ".text" directive at the top of the file,
534         indicating that code would follow. Without it, the assembler created
535         "NOTYPE" symbols, which would result in linker errors.
536         https://bugs.webkit.org/show_bug.cgi?id=30863
537
538         * jit/JITStubs.cpp:
539
540 2009-11-11  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
541
542         Reviewed by Alexey Proskuryakov.
543
544         Refactor multiple JavaScriptCore threads
545         https://bugs.webkit.org/show_bug.cgi?id=31328
546
547         Remove the id field from the PlatformThread structure 
548         as it is not used.
549
550         * runtime/Collector.cpp:
551         (JSC::getCurrentPlatformThread):
552         (JSC::suspendThread):
553         (JSC::resumeThread):
554         (JSC::getPlatformThreadRegisters):
555
556 2009-11-10  Geoffrey Garen  <ggaren@apple.com>
557
558         Linux build fix: Added an #include for UINT_MAX.
559
560         * runtime/WeakRandom.h:
561
562 2009-11-10  Geoffrey Garen  <ggaren@apple.com>
563
564         JavaScriptGlue build fix: Marked a file 'private' instead of 'project'.
565
566         * JavaScriptCore.xcodeproj/project.pbxproj:
567
568 2009-11-10  Geoffrey Garen  <ggaren@apple.com>
569
570         Reviewed by Gavin "avGni arBalroguch" Barraclough.
571
572         Faster Math.random, based on GameRand.
573         
574         SunSpider says 1.4% faster.
575
576         * GNUmakefile.am:
577         * JavaScriptCore.gypi:
578         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
579         * JavaScriptCore.xcodeproj/project.pbxproj: Added the header to the project.
580
581         * runtime/JSGlobalData.cpp:
582         (JSC::JSGlobalData::JSGlobalData):
583         * runtime/JSGlobalData.h: Use an object to track random number generation
584         state, initialized to the current time.
585
586         * runtime/MathObject.cpp:
587         (JSC::MathObject::MathObject):
588         (JSC::mathProtoFuncRandom): Use the new hotness.
589
590         * runtime/WeakRandom.h: Added.
591         (JSC::WeakRandom::WeakRandom):
592         (JSC::WeakRandom::get):
593         (JSC::WeakRandom::advance): The new hotness.
594
595 2009-11-09  Geoffrey Garen  <ggaren@apple.com>
596
597         Reviewed by Oliver Hunt.
598
599         Imported the v8 DST cache.
600         
601         SunSpider says 1.5% faster.
602
603         * runtime/JSGlobalData.cpp:
604         (JSC::JSGlobalData::resetDateCache): Reset the DST cache when resetting
605         other date data.
606
607         * runtime/JSGlobalData.h:
608         (JSC::DSTOffsetCache::DSTOffsetCache):
609         (JSC::DSTOffsetCache::reset): Added a struct for the DST cache.
610
611         * wtf/DateMath.cpp:
612         (WTF::calculateDSTOffsetSimple):
613         (WTF::calculateDSTOffset):
614         (WTF::parseDateFromNullTerminatedCharacters):
615         (JSC::getDSTOffset):
616         (JSC::gregorianDateTimeToMS):
617         (JSC::msToGregorianDateTime):
618         (JSC::parseDateFromNullTerminatedCharacters):
619         * wtf/DateMath.h: The imported code for probing and updating the cache.
620
621 2009-11-09  Geoffrey Garen  <ggaren@apple.com>
622
623         Reviewed by Oliver Hunt.
624
625         Fixed an edge case that could cause the engine not to notice a timezone
626         change.
627         
628         No test because this case would require manual intervention to change
629         the timezone during the test.
630         
631         SunSpider reports no change.
632
633         * runtime/DateInstanceCache.h:
634         (JSC::DateInstanceCache::DateInstanceCache):
635         (JSC::DateInstanceCache::reset): Added a helper function for resetting
636         this cache. Also, shrank the cache, since we'll be resetting it often.
637
638         * runtime/JSGlobalData.cpp:
639         (JSC::JSGlobalData::resetDateCache): Include resetting the DateInstanceCache
640         in resetting Date data. (Otherwise, a cache hit could bypass a necessary
641         timezone update check.)
642
643 2009-11-09  Geoffrey Garen  <ggaren@apple.com>
644
645         Reviewed by Sam Weinig.
646
647         Some manual inlining and constant propogation in Date code.
648         
649         SunSpider reports a 0.4% speedup on date-*, no overall speedup. Shark
650         says some previously evident stalls are now gone.
651
652         * runtime/DateConstructor.cpp:
653         (JSC::callDate):
654         * runtime/DateConversion.cpp:
655         (JSC::formatTime):
656         (JSC::formatTimeUTC): Split formatTime into UTC and non-UTC variants.
657
658         * runtime/DateConversion.h:
659         * runtime/DateInstance.cpp:
660         (JSC::DateInstance::calculateGregorianDateTime):
661         (JSC::DateInstance::calculateGregorianDateTimeUTC):
662         * runtime/DateInstance.h:
663         (JSC::DateInstance::gregorianDateTime):
664         (JSC::DateInstance::gregorianDateTimeUTC): Split gregorianDateTime into
665         a UTC and non-UTC variant, and split each variant into a fast inline
666         case and a slow out-of-line case.
667
668         * runtime/DatePrototype.cpp:
669         (JSC::formatLocaleDate):
670         (JSC::dateProtoFuncToString):
671         (JSC::dateProtoFuncToUTCString):
672         (JSC::dateProtoFuncToISOString):
673         (JSC::dateProtoFuncToDateString):
674         (JSC::dateProtoFuncToTimeString):
675         (JSC::dateProtoFuncGetFullYear):
676         (JSC::dateProtoFuncGetUTCFullYear):
677         (JSC::dateProtoFuncToGMTString):
678         (JSC::dateProtoFuncGetMonth):
679         (JSC::dateProtoFuncGetUTCMonth):
680         (JSC::dateProtoFuncGetDate):
681         (JSC::dateProtoFuncGetUTCDate):
682         (JSC::dateProtoFuncGetDay):
683         (JSC::dateProtoFuncGetUTCDay):
684         (JSC::dateProtoFuncGetHours):
685         (JSC::dateProtoFuncGetUTCHours):
686         (JSC::dateProtoFuncGetMinutes):
687         (JSC::dateProtoFuncGetUTCMinutes):
688         (JSC::dateProtoFuncGetSeconds):
689         (JSC::dateProtoFuncGetUTCSeconds):
690         (JSC::dateProtoFuncGetTimezoneOffset):
691         (JSC::setNewValueFromTimeArgs):
692         (JSC::setNewValueFromDateArgs):
693         (JSC::dateProtoFuncSetYear):
694         (JSC::dateProtoFuncGetYear): Updated for the gregorianDateTime change above.
695
696 2009-11-09  Geoffrey Garen  <ggaren@apple.com>
697
698         Build fix: export a new symbol.
699
700         * JavaScriptCore.exp:
701         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
702
703 2009-11-09  Geoffrey Garen  <ggaren@apple.com>
704
705         Reviewed by Sam "Home Wrecker" Weinig.
706
707         Added a tiny cache for Date parsing.
708         
709         SunSpider says 1.2% faster.
710
711         * runtime/DateConversion.cpp:
712         (JSC::parseDate): Try to reuse the last parsed Date, if present.
713
714         * runtime/JSGlobalData.cpp:
715         (JSC::JSGlobalData::resetDateCache):
716         * runtime/JSGlobalData.h: Added storage for last parsed Date. Refactored
717         this code to make resetting the date cache easier.
718
719         * runtime/JSGlobalObject.h:
720         (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): Updated for
721         refactoring.
722
723         * wtf/DateMath.cpp:
724         (JSC::parseDateFromNullTerminatedCharacters):
725         * wtf/DateMath.h: Changed ExecState to be first parameter, as is the JSC custom.
726
727 2009-11-09  Oliver Hunt  <oliver@apple.com>
728
729         Reviewed by Gavin Barraclough.
730
731         Can cache prototype lookups on uncacheable dictionaries.
732         https://bugs.webkit.org/show_bug.cgi?id=31198
733
734         Replace fromDictionaryTransition with flattenDictionaryObject and
735         flattenDictionaryStructure.  This change is necessary as we need to
736         guarantee that our attempt to convert away from a dictionary structure
737         will definitely succeed, and in some cases this requires mutating the
738         object storage itself.
739
740         * interpreter/Interpreter.cpp:
741         (JSC::Interpreter::tryCacheGetByID):
742         * jit/JITStubs.cpp:
743         (JSC::JITThunks::tryCacheGetByID):
744         (JSC::DEFINE_STUB_FUNCTION):
745         * runtime/BatchedTransitionOptimizer.h:
746         (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
747         * runtime/JSObject.h:
748         (JSC::JSObject::flattenDictionaryObject):
749         * runtime/Operations.h:
750         (JSC::normalizePrototypeChain):
751         * runtime/Structure.cpp:
752         (JSC::Structure::flattenDictionaryStructure):
753         (JSC::comparePropertyMapEntryIndices):
754         * runtime/Structure.h:
755
756 2009-11-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
757
758         Not reviewed, build fix.
759
760         Remove extra character from r50701.
761
762         * JavaScriptCore.pri:
763
764 2009-11-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
765
766         Not reviewed, build fix.
767
768         Revert r50695 because it broke QtWebKit (clean builds).
769
770         * JavaScriptCore.pri:
771
772 2009-11-09  Norbert Leser  <norbert.leser@nokia.com>
773
774         Reviewed by Kenneth Rohde Christiansen.
775
776         Prepended $$PWD to GENERATED_SOURCES_DIR to avoid potential ambiguities when included from WebCore.pro.
777         Some preprocessors consider this GENERATED_SOURCES_DIR relative to current invoking dir (e.g., ./WebCore),
778         and not the working dir of JavaCriptCore.pri (i.e., ../JavaScriptCore/).
779
780         * JavaScriptCore.pri:
781
782 2009-11-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
783
784         Reviewed by Kenneth Rohde Christiansen.
785
786         Use explicit parentheses to silence gcc 4.4 -Wparentheses warnings
787         https://bugs.webkit.org/show_bug.cgi?id=31040
788
789         * interpreter/Interpreter.cpp:
790         (JSC::Interpreter::privateExecute):
791
792 2009-11-08  David Levin  <levin@chromium.org>
793
794         Reviewed by NOBODY (speculative snow leopard and windows build fixes).
795
796         * wtf/DateMath.cpp:
797         (WTF::parseDateFromNullTerminatedCharacters):
798         (JSC::gregorianDateTimeToMS):
799         (JSC::msToGregorianDateTime):
800         (JSC::parseDateFromNullTerminatedCharacters):
801         * wtf/DateMath.h:
802         (JSC::GregorianDateTime::GregorianDateTime):
803
804 2009-11-08  David Levin  <levin@chromium.org>
805
806         Reviewed by NOBODY (chromium build fix).
807         
808         Hopefully, the last build fix.
809
810         Create better separation in DateMath about the JSC
811         and non-JSC portions. Also, only expose the non-JSC
812         version in the exports.
813
814         * JavaScriptCore.exp:
815         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
816         * wtf/DateMath.cpp:
817         (WTF::parseDateFromNullTerminatedCharacters):
818         (JSC::getUTCOffset):
819         (JSC::gregorianDateTimeToMS):
820         (JSC::msToGregorianDateTime):
821         (JSC::parseDateFromNullTerminatedCharacters):
822         * wtf/DateMath.h:
823         (JSC::gmtoffset):
824
825 2009-11-08  David Levin  <levin@chromium.org>
826
827         Reviewed by NOBODY (chromium build fix).
828
829         For the change in DateMath.
830
831         * config.h:
832         * wtf/DateMath.cpp:
833
834 2009-11-06  Geoffrey Garen  <ggaren@apple.com>
835
836         Windows build fix: export some symbols.
837
838         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
839
840 2009-11-06  Geoffrey Garen  <ggaren@apple.com>
841
842         Build fix: updated export file.
843
844         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
845
846 2009-11-06  Geoffrey Garen  <ggaren@apple.com>
847
848         Build fix: added some #includes.
849
850         * wtf/CurrentTime.h:
851         * wtf/DateMath.h:
852
853 2009-11-06  Geoffrey Garen  <ggaren@apple.com>
854
855         Reviewed by Oliver Hunt.
856         
857         https://bugs.webkit.org/show_bug.cgi?id=31197
858         Implemented a timezone cache not based on Mac OS X's notify_check API.
859         
860         If the VM calculates the local timezone offset from UTC, it caches the
861         result until the end of the current VM invocation. (We don't want to cache
862         forever, because the user's timezone may change over time.)
863         
864         This removes notify_* overhead on Mac, and, more significantly, removes
865         OS time and date call overhead on non-Mac platforms.
866
867         ~8% speedup on Date microbenchmark on Mac. SunSpider reports maybe a tiny
868         speedup on Mac. (Speedup on non-Mac platforms should be even more noticeable.)
869
870         * JavaScriptCore.exp:
871
872         * interpreter/CachedCall.h:
873         (JSC::CachedCall::CachedCall):
874         * interpreter/Interpreter.cpp:
875         (JSC::Interpreter::execute):
876         * runtime/JSGlobalObject.h:
877         (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): Made the 
878         DynamicGlobalObjectScope constructor responsible for checking whether a
879         dynamicGlobalObject has already been set. This eliminated some duplicate
880         client code, and allowed me to avoid adding even more duplicate client
881         code. Made DynamicGlobalObjectScope responsible for resetting the
882         local timezone cache upon first entry to the VM.
883
884         * runtime/DateConstructor.cpp:
885         (JSC::constructDate):
886         (JSC::callDate):
887         (JSC::dateParse):
888         (JSC::dateUTC):
889         * runtime/DateConversion.cpp:
890         (JSC::parseDate):
891         * runtime/DateConversion.h:
892         * runtime/DateInstance.cpp:
893         (JSC::DateInstance::gregorianDateTime):
894         * runtime/DateInstance.h:
895         * runtime/DateInstanceCache.h:
896         * runtime/DatePrototype.cpp:
897         (JSC::setNewValueFromTimeArgs):
898         (JSC::setNewValueFromDateArgs):
899         (JSC::dateProtoFuncSetYear):
900         * runtime/InitializeThreading.cpp:
901         (JSC::initializeThreadingOnce):
902         * runtime/JSGlobalData.cpp:
903         (JSC::JSGlobalData::JSGlobalData):
904         * runtime/JSGlobalData.h:
905         * wtf/DateMath.cpp:
906         (WTF::getCurrentUTCTime):
907         (WTF::getCurrentUTCTimeWithMicroseconds):
908         (WTF::getLocalTime):
909         (JSC::getUTCOffset): Use the new cache. Also, see below.
910         (JSC::gregorianDateTimeToMS):
911         (JSC::msToGregorianDateTime):
912         (JSC::initializeDates):
913         (JSC::parseDateFromNullTerminatedCharacters): Simplified the way this function
914         accounts for the local timezone offset, to accomodate our new caching API,
915         and a (possibly misguided) caller in WebCore. Also, see below.
916         * wtf/DateMath.h:
917         (JSC::GregorianDateTime::GregorianDateTime): Moved most of the code in
918         DateMath.* into the JSC namespace. The code needed to move so it could
919         naturally interact with ExecState and JSGlobalData to support caching.
920         Logically, it seemed right to move it, too, since this code is not really
921         as low-level as the WTF namespace might imply -- it implements a set of
922         date parsing and conversion quirks that are finely tuned to the JavaScript
923         language. Also removed the Mac OS X notify_* infrastructure.
924         
925         * wtf/CurrentTime.h:
926         (WTF::currentTimeMS):
927         (WTF::getLocalTime): Moved the rest of the DateMath code here, and renamed
928         it to make it consistent with WTF's currentTime function.
929
930 2009-11-06  Gabor Loki  <loki@inf.u-szeged.hu>
931
932         Unreviewed trivial buildfix after r50595.
933
934         Rename the remaining rshiftPtr calls to rshift32
935
936         * jit/JITArithmetic.cpp:
937         (JSC::JIT::emit_op_rshift):
938         * jit/JITInlineMethods.h:
939         (JSC::JIT::emitFastArithImmToInt):
940
941 2009-11-06  Gavin Barraclough  <barraclough@apple.com>
942
943         Reviewed by Oliver Hunt.
944
945         Tidy up the shift methods on the macro-assembler interface.
946
947         Currently behaviour of shifts of a magnitude > 0x1f is undefined.
948         Instead defined that all shifts are masked to this range.  This makes a lot of
949         practical sense, both since having undefined behaviour is not particularly
950         desirable, and because this behaviour is commonly required (particularly since
951         it is required bt ECMA-262 for shifts).
952
953         Update the ARM assemblers to provide this behaviour.  Remove (now) redundant
954         masks from JITArithmetic, and remove rshiftPtr (this was used in case that
955         could be rewritten in a simpler form using rshift32, only optimized JSVALUE32
956         on x86-64, which uses JSVALUE64!)
957
958         * assembler/MacroAssembler.h:
959         * assembler/MacroAssemblerARM.h:
960         (JSC::MacroAssemblerARM::lshift32):
961         (JSC::MacroAssemblerARM::rshift32):
962         * assembler/MacroAssemblerARMv7.h:
963         (JSC::MacroAssemblerARMv7::lshift32):
964         (JSC::MacroAssemblerARMv7::rshift32):
965         * assembler/MacroAssemblerX86_64.h:
966         * jit/JITArithmetic.cpp:
967         (JSC::JIT::emit_op_lshift):
968         (JSC::JIT::emit_op_rshift):
969
970 2009-11-05  Gavin Barraclough  <barraclough@apple.com>
971
972         Rubber Stamped by Oliver Hunt.
973
974         Remove a magic number (1) from the JIT, instead compute the value with OBJECT_OFFSET.
975
976         * jit/JITInlineMethods.h:
977         (JSC::JIT::emitPutJITStubArg):
978         (JSC::JIT::emitPutJITStubArgConstant):
979         (JSC::JIT::emitGetJITStubArg):
980         (JSC::JIT::emitPutJITStubArgFromVirtualRegister):
981         * jit/JITStubCall.h:
982         (JSC::JITStubCall::JITStubCall):
983         (JSC::JITStubCall::getArgument):
984         * jit/JITStubs.h:
985
986 2009-11-05  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
987
988         Reviewed by Gavin Barraclough.
989
990         https://bugs.webkit.org/show_bug.cgi?id=31159
991         Fix branchDouble behaviour on ARM THUMB2 JIT.
992
993         The x86 branchDouble behaviour is reworked, and all JIT
994         ports should follow the x86 port. See bug 31104 and 31151
995
996         This patch contains a fix for the traditional ARM port
997
998         * assembler/ARMAssembler.h:
999         (JSC::ARMAssembler::):
1000         (JSC::ARMAssembler::fmrs_r):
1001         (JSC::ARMAssembler::ftosid_r):
1002         * assembler/MacroAssemblerARM.h:
1003         (JSC::MacroAssemblerARM::):
1004         (JSC::MacroAssemblerARM::branchDouble):
1005         (JSC::MacroAssemblerARM::branchConvertDoubleToInt32):
1006
1007 2009-11-05  Chris Jerdonek  <chris.jerdonek@gmail.com>
1008
1009         Reviewed by Eric Seidel.
1010
1011         Removed the "this is part of the KDE project" comments from 
1012         all *.h, *.cpp, *.idl, and *.pm files.
1013         
1014         https://bugs.webkit.org/show_bug.cgi?id=31167
1015         
1016         The maintenance and architecture page in the project wiki lists
1017         this as a task.
1018         
1019         This change includes no changes or additions to test cases 
1020         since the change affects only comments.
1021         
1022         * wtf/wince/FastMallocWince.h:
1023
1024 2009-11-05  Gabor Loki  <loki@inf.u-szeged.hu>
1025
1026         Reviewed by Gavin Barraclough.
1027
1028         Use ARMv7 specific encoding for immediate constants on ARMv7 target
1029         https://bugs.webkit.org/show_bug.cgi?id=31060
1030
1031         * assembler/ARMAssembler.cpp:
1032         (JSC::ARMAssembler::getOp2): Use INVALID_IMM
1033         (JSC::ARMAssembler::getImm): Use encodeComplexImm for complex immediate
1034         (JSC::ARMAssembler::moveImm): Ditto.
1035         (JSC::ARMAssembler::encodeComplexImm): Encode a constant by one or two
1036         instructions or a PC relative load.
1037         * assembler/ARMAssembler.h: Use INVALID_IMM if a constant cannot be
1038         encoded as an immediate constant.
1039         (JSC::ARMAssembler::):
1040         (JSC::ARMAssembler::movw_r): 16-bit immediate load
1041         (JSC::ARMAssembler::movt_r): High halfword 16-bit immediate load
1042         (JSC::ARMAssembler::getImm16Op2): Encode immediate constant for
1043         movw_r and mowt_r
1044
1045 2009-11-04  Mark Mentovai  <mark@chromium.org>
1046
1047         Reviewed by Mark Rowe.
1048
1049         Provide TARGETING_TIGER and TARGETING_LEOPARD as analogues to
1050         BUILDING_ON_TIGER and BUILDING_ON_LEOPARD.  The TARGETING_ macros
1051         consider the deployment target; the BUILDING_ON_ macros consider the
1052         headers being built against.
1053
1054         * wtf/Platform.h:
1055
1056 2009-11-04  Gavin Barraclough  <barraclough@apple.com>
1057
1058         Reviewed by Oliver Hunt.
1059
1060         https://bugs.webkit.org/show_bug.cgi?id=31151
1061         Fix branchDouble behaviour on ARM THUMB2 JIT.
1062
1063         The ARMv7 JIT is currently using ARMv7Assembler::ConditionEQ to branch
1064         for DoubleEqualOrUnordered, however this is incorrect – ConditionEQ won't
1065         branch on unordered operands.  Similarly, DoubleLessThanOrUnordered &
1066         DoubleLessThanOrEqualOrUnordered use ARMv7Assembler::ConditionLO &
1067         ARMv7Assembler::ConditionLS, whereas they should be using
1068         ARMv7Assembler::ConditionLT & ARMv7Assembler::ConditionLE.
1069
1070         Fix these, and fill out the missing DoubleConditions.
1071
1072         * assembler/MacroAssemblerARMv7.h:
1073         (JSC::MacroAssemblerARMv7::):
1074         (JSC::MacroAssemblerARMv7::branchDouble):
1075
1076 2009-11-04  Gavin Barraclough  <barraclough@apple.com>
1077
1078         Rubber Stamped by Oliver Hunt.
1079
1080         Enable native call optimizations on ARMv7.  (Existing ARM_TRADITIONAL
1081         implementation was generic, worked perfectly, just needed turning on).
1082
1083         * jit/JITOpcodes.cpp:
1084         * wtf/Platform.h:
1085
1086 2009-11-04  Gavin Barraclough  <barraclough@apple.com>
1087
1088         Rubber Stamped by Mark Rowe, Oliver Hunt, and Sam Weinig.
1089
1090         Add a missing assert to the ARMv7 JIT.
1091
1092         * assembler/ARMv7Assembler.h:
1093         (JSC::ARMThumbImmediate::ARMThumbImmediate):
1094
1095 2009-11-04  Mark Rowe  <mrowe@apple.com>
1096
1097         Rubber-stamped by Oliver Hunt.
1098
1099         Remove bogus op_ prefix on dumped version of three opcodes.
1100
1101         * bytecode/CodeBlock.cpp:
1102         (JSC::CodeBlock::dump):
1103
1104 2009-11-04  Mark Rowe  <mrowe@apple.com>
1105
1106         Reviewed by Sam Weinig.
1107
1108         Fix dumping of constants in bytecode so that they aren't printed as large positive register numbers.
1109
1110         We do this by having the registerName function return information about the constant if the register
1111         number corresponds to a constant.  This requires that registerName, and several functions that call it,
1112         be converted to member functions of CodeBlock so that the constant value can be retrieved.  The
1113         ExecState also needs to be threaded down through these functions so that it can be passed on to
1114         constantName when needed.
1115
1116         * bytecode/CodeBlock.cpp:
1117         (JSC::constantName):
1118         (JSC::CodeBlock::registerName):
1119         (JSC::CodeBlock::printUnaryOp):
1120         (JSC::CodeBlock::printBinaryOp):
1121         (JSC::CodeBlock::printConditionalJump):
1122         (JSC::CodeBlock::printGetByIdOp):
1123         (JSC::CodeBlock::printPutByIdOp):
1124         (JSC::CodeBlock::dump):
1125         * bytecode/CodeBlock.h:
1126         (JSC::CodeBlock::isConstantRegisterIndex):
1127
1128 2009-11-04  Pavel Heimlich  <tropikhajma@gmail.com>
1129
1130         Reviewed by Alexey Proskuryakov.
1131
1132         https://bugs.webkit.org/show_bug.cgi?id=30647
1133         Solaris build failure due to strnstr.
1134
1135         * wtf/StringExtras.h: Enable strnstr on Solaris, too.
1136
1137 2009-11-04  Gavin Barraclough  <barraclough@apple.com>
1138
1139         Reviewed by Oliver Hunt.
1140
1141         https://bugs.webkit.org/show_bug.cgi?id=31104
1142         Refactor x86-specific behaviour out of the JIT.
1143
1144         - Add explicit double branch conditions for ordered and unordered comparisons (presently the brehaviour is a mix).
1145         - Refactor double to int conversion out into the MacroAssembler.
1146         - Remove broken double to int conversion for !JSVALUE32_64 builds - this code was broken and slowing us down, fixing it showed it not to be an improvement.
1147         - Remove exclusion of double to int conversion from (1 % X) cases in JSVALUE32_64 builds - if this was of benefit this is no longer the case; simplify.
1148
1149         * assembler/MacroAssemblerARM.h:
1150         (JSC::MacroAssemblerARM::):
1151         * assembler/MacroAssemblerARMv7.h:
1152         (JSC::MacroAssemblerARMv7::):
1153         * assembler/MacroAssemblerX86Common.h:
1154         (JSC::MacroAssemblerX86Common::):
1155         (JSC::MacroAssemblerX86Common::convertInt32ToDouble):
1156         (JSC::MacroAssemblerX86Common::branchDouble):
1157         (JSC::MacroAssemblerX86Common::branchConvertDoubleToInt32):
1158         * jit/JITArithmetic.cpp:
1159         (JSC::JIT::emitBinaryDoubleOp):
1160         (JSC::JIT::emit_op_div):
1161         (JSC::JIT::emitSlow_op_jnless):
1162         (JSC::JIT::emitSlow_op_jnlesseq):
1163         * jit/JITOpcodes.cpp:
1164         (JSC::JIT::emit_op_jfalse):
1165
1166 2009-11-04  Mark Mentovai  <mark@chromium.org>
1167
1168         Reviewed by Eric Seidel.
1169
1170         Remove BUILDING_ON_LEOPARD from JavaScriptCore.gyp.  This is supposed
1171         to be set as needed only in wtf/Platform.h.
1172
1173         * JavaScriptCore.gyp/JavaScriptCore.gyp:
1174
1175 2009-11-02  Oliver Hunt  <oliver@apple.com>
1176
1177         Reviewed by Gavin Barraclough.
1178
1179         REGRESSION (r48573): JSC may incorrectly cache chain lookups with a dictionary at the head of the chain
1180         https://bugs.webkit.org/show_bug.cgi?id=31045
1181
1182         Add guards to prevent caching of prototype chain lookups with dictionaries at the
1183         head of the chain.  Also add a few tighter assertions to cached prototype lookups
1184         to catch this in future.
1185
1186         * interpreter/Interpreter.cpp:
1187         (JSC::Interpreter::tryCacheGetByID):
1188         (JSC::Interpreter::privateExecute):
1189         * jit/JITStubs.cpp:
1190         (JSC::JITThunks::tryCacheGetByID):
1191
1192 2009-11-02  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1193
1194         Reviewed by Darin Adler.
1195
1196         PLATFORM(CF) should be set when building for Qt on Darwin
1197         https://bugs.webkit.org/show_bug.cgi?id=23671
1198
1199         * wtf/Platform.h: Turn on CF support if both QT and DARWIN
1200         platforms are defined.
1201
1202 2009-11-02  Dmitry Titov  <dimich@chromium.org>
1203
1204         Reviewed by David Levin.
1205
1206         Remove threadsafe refcounting from tasks used with WTF::MessageQueue.
1207         https://bugs.webkit.org/show_bug.cgi?id=30612
1208
1209         * wtf/MessageQueue.h:
1210         (WTF::MessageQueue::alwaysTruePredicate):
1211         (WTF::MessageQueue::~MessageQueue):
1212         (WTF::MessageQueue::append):
1213         (WTF::MessageQueue::appendAndCheckEmpty):
1214         (WTF::MessageQueue::prepend):
1215         (WTF::MessageQueue::waitForMessage):
1216         (WTF::MessageQueue::waitForMessageFilteredWithTimeout):
1217         (WTF::MessageQueue::tryGetMessage):
1218         (WTF::MessageQueue::removeIf):
1219         The MessageQueue is changed to act as a queue of OwnPtr<DataType>. It takes ownership
1220         of posted tasks and passes it to the new owner (in another thread) when the task is fetched.
1221         All methods have arguments of type PassOwnPtr<DataType> and return the same type.
1222
1223         * wtf/Threading.cpp:
1224         (WTF::createThread):
1225         Superficial change to trigger rebuild of JSC project on Windows,
1226         workaround for https://bugs.webkit.org/show_bug.cgi?id=30890
1227
1228 2009-10-30  Geoffrey Garen  <ggaren@apple.com>
1229
1230         Reviewed by Oliver Hunt.
1231
1232         Fixed failing layout test: restore a special case I accidentally deleted.
1233
1234         * runtime/DatePrototype.cpp:
1235         (JSC::setNewValueFromDateArgs): In the case of applying a change to a date
1236         that is NaN, reset the date to 0 *and* then apply the change; don't just
1237         reset the date to 0.
1238
1239 2009-10-30  Geoffrey Garen  <ggaren@apple.com>
1240
1241         Windows build fix: update for object-to-pointer change.
1242
1243         * runtime/DatePrototype.cpp:
1244         (JSC::formatLocaleDate):
1245
1246 2009-10-29  Geoffrey Garen  <ggaren@apple.com>
1247
1248         Reviewed by Darin Adler.
1249
1250         https://bugs.webkit.org/show_bug.cgi?id=30942
1251         Use pointers instead of copies to pass GregorianDateTime objects around.
1252         
1253         SunSpider reports a shocking 4.5% speedup on date-format-xparb, and 1.3%
1254         speedup on date-format-tofte.
1255
1256         * runtime/DateInstance.cpp:
1257         (JSC::DateInstance::gregorianDateTime):
1258         * runtime/DateInstance.h:
1259         * runtime/DatePrototype.cpp:
1260         (JSC::formatLocaleDate):
1261         (JSC::dateProtoFuncToString):
1262         (JSC::dateProtoFuncToUTCString):
1263         (JSC::dateProtoFuncToISOString):
1264         (JSC::dateProtoFuncToDateString):
1265         (JSC::dateProtoFuncToTimeString):
1266         (JSC::dateProtoFuncGetFullYear):
1267         (JSC::dateProtoFuncGetUTCFullYear):
1268         (JSC::dateProtoFuncToGMTString):
1269         (JSC::dateProtoFuncGetMonth):
1270         (JSC::dateProtoFuncGetUTCMonth):
1271         (JSC::dateProtoFuncGetDate):
1272         (JSC::dateProtoFuncGetUTCDate):
1273         (JSC::dateProtoFuncGetDay):
1274         (JSC::dateProtoFuncGetUTCDay):
1275         (JSC::dateProtoFuncGetHours):
1276         (JSC::dateProtoFuncGetUTCHours):
1277         (JSC::dateProtoFuncGetMinutes):
1278         (JSC::dateProtoFuncGetUTCMinutes):
1279         (JSC::dateProtoFuncGetSeconds):
1280         (JSC::dateProtoFuncGetUTCSeconds):
1281         (JSC::dateProtoFuncGetTimezoneOffset):
1282         (JSC::setNewValueFromTimeArgs):
1283         (JSC::setNewValueFromDateArgs):
1284         (JSC::dateProtoFuncSetYear):
1285         (JSC::dateProtoFuncGetYear): Renamed getGregorianDateTime to gregorianDateTime,
1286         since it no longer has an out parameter. Uses 0 to indicate invalid dates.
1287
1288 2009-10-30  Zoltan Horvath  <zoltan@webkit.org>
1289
1290         Reviewed by Darin Adler.
1291
1292         Allow custom memory allocation control for JavaScriptCore's ListHashSet
1293         https://bugs.webkit.org/show_bug.cgi?id=30853
1294
1295         Inherits ListHashSet class from FastAllocBase because it is
1296         instantiated by 'new' in WebCore/rendering/RenderBlock.cpp:1813.
1297
1298         * wtf/ListHashSet.h:
1299
1300 2009-10-30  Oliver Hunt  <oliver@apple.com>
1301
1302         Reviewed by Gavin Barraclough.
1303
1304         Regression: crash enumerating properties of an object with getters or setters
1305         https://bugs.webkit.org/show_bug.cgi?id=30948
1306
1307         Add a guard to prevent us trying to cache property enumeration on
1308         objects with getters or setters.
1309
1310         * runtime/JSPropertyNameIterator.cpp:
1311         (JSC::JSPropertyNameIterator::create):
1312
1313 2009-10-30  Roland Steiner  <rolandsteiner@chromium.org>
1314
1315         Reviewed by Eric Seidel.
1316
1317         Remove ENABLE_RUBY guards as discussed with Dave Hyatt and Maciej Stachowiak.
1318
1319         Bug 28420 -  Implement HTML5 <ruby> rendering
1320         (https://bugs.webkit.org/show_bug.cgi?id=28420)
1321  
1322         No new tests (no functional change).
1323
1324         * Configurations/FeatureDefines.xcconfig:
1325
1326 2009-10-29  Oliver Hunt  <oliver@apple.com>
1327
1328         Reviewed by Maciej Stachowiak.
1329
1330         REGRESSION (r50218-r50262): E*TRADE accounts page is missing content
1331         https://bugs.webkit.org/show_bug.cgi?id=30947
1332         <rdar://problem/7348833>
1333
1334         The logic for flagging that a structure has non-enumerable properties
1335         was in addPropertyWithoutTransition, rather than in the core Structure::put
1336         method.  Despite this I was unable to produce a testcase that caused
1337         the failure that etrade was experiencing, but the new assertion in
1338         getEnumerablePropertyNames triggers on numerous layout tests without
1339         the fix, so in effecti all for..in enumeration in any test ends up
1340         doing the required consistency check.
1341
1342         * runtime/Structure.cpp:
1343         (JSC::Structure::addPropertyWithoutTransition):
1344         (JSC::Structure::put):
1345         (JSC::Structure::getEnumerablePropertyNames):
1346         (JSC::Structure::checkConsistency):
1347
1348 2009-10-29  Gabor Loki  <loki@inf.u-szeged.hu>
1349
1350         Reviewed by Gavin Barraclough.
1351
1352         Add cacheFlush support for Thumb-2 on Linux
1353         https://bugs.webkit.org/show_bug.cgi?id=30865
1354
1355         * jit/ExecutableAllocator.h:
1356         (JSC::ExecutableAllocator::cacheFlush):
1357
1358 2009-10-28  Gavin Barraclough  <barraclough@apple.com>
1359
1360         Reviewed by Oliver Hunt.
1361
1362         JSC JIT on ARMv7 cannot link jumps >16Mb range
1363         https://bugs.webkit.org/show_bug.cgi?id=30891
1364
1365         Start planing all relative jumps as move-32-bit-immediate-to-register-BX.
1366         In the cases where the jump would fall within a relative jump range, use a relative jump.
1367
1368         * JavaScriptCore.xcodeproj/project.pbxproj:
1369         * assembler/ARMv7Assembler.h:
1370         (JSC::ARMv7Assembler::~ARMv7Assembler):
1371         (JSC::ARMv7Assembler::LinkRecord::LinkRecord):
1372         (JSC::ARMv7Assembler::):
1373         (JSC::ARMv7Assembler::executableCopy):
1374         (JSC::ARMv7Assembler::linkJump):
1375         (JSC::ARMv7Assembler::relinkJump):
1376         (JSC::ARMv7Assembler::setInt32):
1377         (JSC::ARMv7Assembler::isB):
1378         (JSC::ARMv7Assembler::isBX):
1379         (JSC::ARMv7Assembler::isMOV_imm_T3):
1380         (JSC::ARMv7Assembler::isMOVT):
1381         (JSC::ARMv7Assembler::isNOP_T1):
1382         (JSC::ARMv7Assembler::isNOP_T2):
1383         (JSC::ARMv7Assembler::linkJumpAbsolute):
1384         (JSC::ARMv7Assembler::twoWordOp5i6Imm4Reg4EncodedImmFirst):
1385         (JSC::ARMv7Assembler::twoWordOp5i6Imm4Reg4EncodedImmSecond):
1386         (JSC::ARMv7Assembler::ARMInstructionFormatter::twoWordOp5i6Imm4Reg4EncodedImm):
1387         * assembler/MacroAssemblerARMv7.h:
1388         (JSC::MacroAssemblerARMv7::makeJump):
1389         (JSC::MacroAssemblerARMv7::makeBranch):
1390         * jit/JIT.h:
1391         * wtf/Platform.h:
1392
1393 2009-10-28  Oliver Hunt  <oliver@apple.com>
1394
1395         Reviewed by Geoff Garen.
1396
1397         Improve for..in enumeration performance
1398         https://bugs.webkit.org/show_bug.cgi?id=30887
1399
1400         Improve indexing of an object with a for..in iterator by
1401         identifying cases where get_by_val is being used with a iterator
1402         as the subscript and replace it with a new get_by_pname
1403         bytecode.  get_by_pname then optimizes lookups that directly access
1404         the base object.
1405
1406         * bytecode/CodeBlock.cpp:
1407         (JSC::CodeBlock::dump):
1408         * bytecode/Opcode.h:
1409         * bytecompiler/BytecodeGenerator.cpp:
1410         (JSC::BytecodeGenerator::emitGetByVal):
1411         * bytecompiler/BytecodeGenerator.h:
1412         (JSC::BytecodeGenerator::pushOptimisedForIn):
1413         (JSC::BytecodeGenerator::popOptimisedForIn):
1414         * interpreter/Interpreter.cpp:
1415         (JSC::Interpreter::privateExecute):
1416         * jit/JIT.cpp:
1417         (JSC::JIT::privateCompileMainPass):
1418         (JSC::JIT::privateCompileSlowCases):
1419         * jit/JIT.h:
1420         * jit/JITPropertyAccess.cpp:
1421         (JSC::JIT::compileGetDirectOffset):
1422         (JSC::JIT::emit_op_get_by_pname):
1423         (JSC::JIT::emitSlow_op_get_by_pname):
1424         * parser/Nodes.cpp:
1425         (JSC::ForInNode::emitBytecode):
1426         * runtime/JSObject.h:
1427         * runtime/JSPropertyNameIterator.cpp:
1428         (JSC::JSPropertyNameIterator::create):
1429         * runtime/JSPropertyNameIterator.h:
1430         (JSC::JSPropertyNameIterator::getOffset):
1431         (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
1432         * runtime/JSValue.h:
1433         (JSC::JSValue::):
1434         * runtime/Structure.cpp:
1435         (JSC::Structure::addPropertyTransition):
1436         (JSC::Structure::changePrototypeTransition):
1437         (JSC::Structure::despecifyFunctionTransition):
1438         (JSC::Structure::addAnonymousSlotsTransition):
1439         (JSC::Structure::getterSetterTransition):
1440         (JSC::Structure::toDictionaryTransition):
1441         (JSC::Structure::addPropertyWithoutTransition):
1442           Track the existence (or not) of non-enumerable properties.
1443         * runtime/Structure.h:
1444         (JSC::Structure::propertyStorageCapacity):
1445         (JSC::Structure::propertyStorageSize):
1446         (JSC::Structure::hasNonEnumerableProperties):
1447         (JSC::Structure::hasAnonymousSlots):
1448
1449 2009-10-28  Dmitry Titov  <dimich@chromium.org>
1450
1451         Not reviewed, attemp to fix Windows build.
1452
1453         Touch the cpp file to cause recompile.
1454
1455         * wtf/Threading.cpp:
1456         (WTF::threadEntryPoint):
1457
1458 2009-10-28  Dmitry Titov  <dimich@chromium.org>
1459
1460         Reviewed by David Levin.
1461
1462         https://bugs.webkit.org/show_bug.cgi?id=30805
1463         Add MessageQueue::removeIf(Predicate&) to remove certain tasks without pulling them from the queue.
1464         Existing Database tests cover this since Database removes tasks when it is stopped.
1465
1466         * wtf/MessageQueue.h:
1467         (WTF::::removeIf):
1468
1469 2009-10-28  Afonso R. Costa Jr.  <afonso.costa@openbossa.org>
1470
1471         Reviewed by Oliver Hunt.
1472
1473         [Qt] Enable YARR when YARR_JIT is enabled
1474         https://bugs.webkit.org/show_bug.cgi?id=30730
1475
1476         When enabling or disabling JIT using JAVASCRIPTCORE_JIT, the ENABLE_YARR should
1477         be toggled also.
1478
1479         * JavaScriptCore.pri:
1480
1481 2009-10-24  Martin Robinson  <martin.james.robinson@gmail.com>
1482
1483         Reviewed by Oliver Hunt.
1484
1485         Fix strict aliasing warning by switching reinterpret_cast to bitwise_cast.
1486
1487         strict-aliasing warnings in JSFunction.h
1488         https://bugs.webkit.org/show_bug.cgi?id=27869
1489
1490         * runtime/JSFunction.h:
1491         (JSC::JSFunction::nativeFunction):
1492         (JSC::JSFunction::scopeChain):
1493         (JSC::JSFunction::setScopeChain):
1494         (JSC::JSFunction::setNativeFunction):
1495
1496 2009-10-28  Jan-Arve Sæther <jan-arve.saether@nokia.com>
1497
1498         Reviewed by Tor Arne Vestbø.
1499
1500         Build-fix for 64-bit Windows
1501
1502         * wtf/Platform.h: Make sure to use WTF_USE_JSVALUE64
1503
1504 2009-10-28  Gavin Barraclough  <barraclough@apple.com>
1505
1506         Reviewed by NOBODY (build fix!).
1507
1508         * jit/JIT.h:
1509
1510 2009-10-26  Holger Hans Peter Freyther  <zecke@selfish.org>
1511
1512         Rubber-stamped by Darin Adler.
1513
1514         Export fastMalloc, fastCalloc, fastRealloc and fastFree on GCC/Unix
1515         https://bugs.webkit.org/show_bug.cgi?id=30769
1516
1517         When using -fvisibility=hidden to hide all internal symbols by default
1518         the malloc symbols will be hidden as well. For memory instrumentation
1519         it is needed to provide an instrumented version of these symbols and
1520         override the normal routines and by changing the visibility back to
1521         default this becomes possible.
1522
1523         The only other solution would be to use system malloc instead of the
1524         TCmalloc implementation but this will not allow to analyze memory
1525         behavior with the default allocator.
1526
1527         * wtf/FastMalloc.h: Define WTF_FAST_MALLOC_EXPORT for GCC and !darwin
1528
1529 2009-10-27  Gavin Barraclough  <barraclough@apple.com>
1530
1531         Rubber Stamped by Samuel Q. Weinig.
1532
1533         Make the asserts protecting the offsets in the JIT more descriptive.
1534
1535         * jit/JIT.h:
1536         * jit/JITCall.cpp:
1537         (JSC::JIT::compileOpCall):
1538         * jit/JITPropertyAccess.cpp:
1539         (JSC::JIT::emit_op_method_check):
1540         (JSC::JIT::compileGetByIdHotPath):
1541         (JSC::JIT::compileGetByIdSlowCase):
1542         (JSC::JIT::emit_op_put_by_id):
1543
1544 2009-10-27  Geoffrey Garen  <ggaren@apple.com>
1545
1546         Reviewed by Sam Weinig.
1547
1548         A little bit of refactoring in the date code.
1549
1550         * JavaScriptCore.exp: Don't export this unused symbol.
1551
1552         * runtime/DateConstructor.cpp:
1553         (JSC::constructDate):
1554
1555         * runtime/DateInstance.cpp:
1556         (JSC::DateInstance::DateInstance):
1557         * runtime/DateInstance.h: Removed some unused functions. Changed the default
1558         constructor to ensure that a DateInstance is always initialized.
1559
1560         * runtime/DatePrototype.cpp:
1561         (JSC::DatePrototype::DatePrototype): Pass an initializer to our constructor,
1562         since it now requires one.
1563
1564         * wtf/DateMath.cpp:
1565         (WTF::msToGregorianDateTime): Only compute our offset from UTC if our
1566         output will require it. Otherwise, our offset is 0.
1567
1568 2009-10-27  Geoffrey Garen  <ggaren@apple.com>
1569
1570         Build fix: Mark DateInstaceCache.h private, so other frameworks can see it.
1571
1572         * JavaScriptCore.xcodeproj/project.pbxproj:
1573
1574 2009-10-27  Geoffrey Garen  <ggaren@apple.com>
1575
1576         Build fix: re-readded this file.
1577
1578         * runtime/DateInstanceCache.h: Added.
1579         (JSC::DateInstanceData::create):
1580         (JSC::DateInstanceData::DateInstanceData):
1581         (JSC::DateInstanceCache::DateInstanceCache):
1582         (JSC::DateInstanceCache::add):
1583         (JSC::DateInstanceCache::lookup):
1584
1585 2009-10-27  Geoffrey Garen  <ggaren@apple.com>
1586
1587         Reviewed by Darin Adler and Oliver Hunt.
1588
1589         https://bugs.webkit.org/show_bug.cgi?id=30800
1590         Cache recently computed date data.
1591         
1592         SunSpider reports a ~0.5% speedup, mostly from date-format-tofte.js.
1593
1594         * GNUmakefile.am:
1595         * JavaScriptCore.gypi:
1596         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1597         * JavaScriptCore.xcodeproj/project.pbxproj: Added new file.
1598
1599         * runtime/DateInstance.cpp:
1600         (JSC::DateInstance::DateInstance):
1601         (JSC::DateInstance::getGregorianDateTime): Use the shared cache.
1602
1603         * runtime/DateInstance.h: Renamed m_cache to m_data, to avoid the confusion
1604         of a "cache cache".
1605
1606         * runtime/DatePrototype.cpp:
1607         (JSC::formatLocaleDate):
1608         (JSC::dateProtoFuncToString):
1609         (JSC::dateProtoFuncToUTCString):
1610         (JSC::dateProtoFuncToISOString):
1611         (JSC::dateProtoFuncToDateString):
1612         (JSC::dateProtoFuncToTimeString):
1613         (JSC::dateProtoFuncGetFullYear):
1614         (JSC::dateProtoFuncGetUTCFullYear):
1615         (JSC::dateProtoFuncToGMTString):
1616         (JSC::dateProtoFuncGetMonth):
1617         (JSC::dateProtoFuncGetUTCMonth):
1618         (JSC::dateProtoFuncGetDate):
1619         (JSC::dateProtoFuncGetUTCDate):
1620         (JSC::dateProtoFuncGetDay):
1621         (JSC::dateProtoFuncGetUTCDay):
1622         (JSC::dateProtoFuncGetHours):
1623         (JSC::dateProtoFuncGetUTCHours):
1624         (JSC::dateProtoFuncGetMinutes):
1625         (JSC::dateProtoFuncGetUTCMinutes):
1626         (JSC::dateProtoFuncGetSeconds):
1627         (JSC::dateProtoFuncGetUTCSeconds):
1628         (JSC::dateProtoFuncGetTimezoneOffset):
1629         (JSC::setNewValueFromTimeArgs):
1630         (JSC::setNewValueFromDateArgs):
1631         (JSC::dateProtoFuncSetYear):
1632         (JSC::dateProtoFuncGetYear): Pass an ExecState to these functions, so they
1633         can access the DateInstanceCache.
1634
1635         * runtime/JSGlobalData.h: Keep a DateInstanceCache.
1636
1637 2009-10-27  James Robinson  <jamesr@chromium.org>
1638
1639         Reviewed by Darin Fisher.
1640
1641         Ensures that JavaScriptCore/wtf/CurrentTime.cpp is not built in PLATFORM(CHROMIUM) builds.
1642
1643         Chromium uses a different method to calculate the current time than is used in
1644         JavaScriptCore/wtf/CurrentTime.cpp. This can lead to time skew when calls to currentTime() and Chromium's time
1645         function are mixed.  In particular, timers can get scheduled in the past which leads to 100% CPU use.
1646         See http://code.google.com/p/chromium/issues/detail?id=25892 for an example.
1647
1648         https://bugs.webkit.org/show_bug.cgi?id=30833
1649
1650         * JavaScriptCore.gyp/JavaScriptCore.gyp:
1651         * wtf/CurrentTime.cpp:
1652
1653 2009-10-27  Peter Varga  <pvarga@inf.u-szeged.hu>
1654
1655         Rubber-stamped by Tor Arne Vestbø.
1656
1657         Fix typo in RegexInterpreter.cpp and RegexJIT.cpp alterantive to
1658         alternative.
1659
1660         * yarr/RegexInterpreter.cpp:
1661         (JSC::Yarr::ByteCompiler::alternativeBodyDisjunction):
1662         (JSC::Yarr::ByteCompiler::alternativeDisjunction):
1663         (JSC::Yarr::ByteCompiler::emitDisjunction):
1664         * yarr/RegexJIT.cpp:
1665         (JSC::Yarr::RegexGenerator::generateDisjunction):
1666
1667 2009-10-26  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1668
1669         Reviewed by Darin Adler.
1670
1671         Make .rc files compile on Windows without depending on MFC headers
1672         https://bugs.webkit.org/show_bug.cgi?id=30750
1673
1674         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: Use
1675         winresrc.h because it exists even when MFC is not installed, and is
1676         all that's needed here.
1677
1678 2009-10-26  Gabor Loki  <loki@inf.u-szeged.hu>
1679
1680         Reviewed by Gavin Barraclough.
1681
1682         The thunkReturnAddress is on JITStackFrame on ARM JIT as well
1683         https://bugs.webkit.org/show_bug.cgi?id=30782
1684
1685         Move the thunkReturnAddress from top of the stack into the JITStackFrame
1686         structure. This is a requirement for JSValue32_64 support on ARM.
1687
1688         * assembler/MacroAssemblerARM.h:
1689         (JSC::MacroAssemblerARM::ret): Return with link register
1690         (JSC::MacroAssemblerARM::prepareCall): Store the return address in link register
1691         * jit/JIT.h: Remove unused ctiReturnRegister
1692         * jit/JITInlineMethods.h: Same as ARMv7
1693         (JSC::JIT::restoreArgumentReference): Ditto.
1694         (JSC::JIT::restoreArgumentReferenceForTrampoline): Ditto.
1695         * jit/JITOpcodes.cpp: Remove ctiReturnRegister related instruction
1696         * jit/JITStubs.cpp: Store thunkReturnAddress on JITStackFrame. Use
1697         small trampoline functions which handle return addresses for each
1698         CTI_STUB_FUNCTION.
1699         * jit/JITStubs.h: Store thunkReturnAddress on JITStackFrame
1700         (JSC::JITStackFrame::returnAddressSlot): Return with the address of thunkReturnAddress
1701         * yarr/RegexJIT.cpp:
1702         (JSC::Yarr::RegexGenerator::generateEnter): Remove the unnecessary instruction
1703
1704 2009-10-26  Steve Block  <steveblock@google.com>
1705
1706         Reviewed by Darin Adler.
1707
1708         Adds ability to disable ReadWriteLock on platforms (eg Android) that use pthreads but do not support pthread_rwlock.
1709         https://bugs.webkit.org/show_bug.cgi?id=30713
1710
1711         * wtf/Platform.h: Modified. Defines HAVE_PTHREAD_RWLOCK for all platforms currently using pthreads.
1712         * wtf/Threading.h: Modified. Use pthread_rwlock_t only when HAVE_PTHREAD_RWLOCK is defined.
1713         * wtf/ThreadingPthreads.cpp: Modified. Build ReadWriteLock methods only when HAVE_PTHREAD_RWLOCK is defined.
1714
1715 2009-10-24  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1716
1717         Reviewed by Holger Freyther.
1718
1719         [Qt] [Symbian] Set the capability and memory required to run QtWebKit for Symbian
1720         https://bugs.webkit.org/show_bug.cgi?id=30476
1721
1722         Assign ReadUserData WriteUserData NetworkServices Symbian capabilities
1723         to jsc.exe.
1724
1725         * jsc.pro:
1726
1727 2009-10-23  Steve Block  <steveblock@google.com>
1728
1729         Reviewed by Dmitry Titov.
1730
1731         Fixes a leak in createThreadInternal on Android.
1732         https://bugs.webkit.org/show_bug.cgi?id=30698
1733
1734         * wtf/ThreadingPthreads.cpp: Modified.
1735         (WTF::createThreadInternal): Avoid leaking a ThreadData object on failure.
1736
1737 2009-10-22  Geoffrey Garen  <ggaren@apple.com>
1738
1739         Reviewed by Alexey Proskuryakov.
1740
1741         Fixed ASSERT when opening Safari's Caches window while the Web Inspector
1742         is open.
1743
1744         * runtime/Collector.cpp:
1745         (JSC::typeName): Added two new types to the type name list in the Collector.
1746         These types have been around for a while, but nobody remembered to consider them here.
1747
1748         * runtime/JSCell.h:
1749         (JSC::JSCell::isPropertyNameIterator):
1750         * runtime/JSPropertyNameIterator.h:
1751         (JSC::JSPropertyNameIterator::isPropertyNameIterator): Give the Collector
1752         a way to tell if a cell is a JSPropertyNameIterator.
1753
1754 2009-10-22  Steve Falkenburg  <sfalken@apple.com>
1755
1756         Reviewed by Jon Honeycutt.
1757
1758         https://bugs.webkit.org/show_bug.cgi?id=30686
1759         Remove debug-specific def file.
1760         Only Debug_All target uses JavaScriptCore_debug.dll naming, and since
1761         that target is only used internally, maintaining two files just to
1762         suppress a single link warning isn't worthwhile.
1763
1764         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
1765         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Removed.
1766
1767 2009-10-21  Jon Honeycutt  <jhoneycutt@apple.com>
1768
1769         <rdar://problem/7270320> Screenshots of off-screen plug-ins are blank
1770         <rdar://problem/7270314> After halting a transparent PluginView on
1771         Windows, the transparency is applied twice
1772
1773         Reviewed by Dan Bernstein.
1774
1775         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1776         Export WTF::deleteOwnedPtr(HDC).
1777
1778         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
1779         Ditto.
1780
1781 2009-10-20  Geoffrey Garen  <ggaren@apple.com>
1782
1783         Windows build fix: updated variable name.
1784
1785         * runtime/DatePrototype.cpp:
1786         (JSC::formatLocaleDate):
1787
1788 2009-10-20  Geoffrey Garen  <ggaren@apple.com>
1789
1790         Reviewed by Mark Rowe.
1791
1792         * jit/JITOpcodes.cpp:
1793         (JSC::JIT::emit_op_next_pname): Slightly tweaked this #ifdef to match the
1794         size of a JSValue because m_jsStrings is an array of JSValues.
1795
1796 2009-10-20  Geoffrey Garen  <ggaren@apple.com>
1797
1798         Reviewed by Mark Rowe.
1799
1800         Fixed a 64-bit regression caused by the fix for
1801         https://bugs.webkit.org/show_bug.cgi?id=30570.
1802
1803         * jit/JITOpcodes.cpp:
1804         (JSC::JIT::emit_op_next_pname): Use TimesEight stepping on 64-bit, since
1805         64-bit pointers are eight bytes long.
1806
1807 2009-10-20  Geoffrey Garen  <ggaren@apple.com>
1808
1809         Reviewed by Sam Weinig.
1810
1811         Refactored DateInstance::msToGregorianDateTime so that a DateInstance's
1812         caller doesn't need to supply the DateInstance's own internal value to
1813         the DateInstance.
1814
1815         * runtime/DateInstance.cpp:
1816         (JSC::DateInstance::getGregorianDateTime): Renamed from "msToGregorianDateTime".
1817
1818         * runtime/DateInstance.h:
1819         * runtime/DatePrototype.cpp:
1820         (JSC::formatLocaleDate):
1821         (JSC::dateProtoFuncToString):
1822         (JSC::dateProtoFuncToUTCString):
1823         (JSC::dateProtoFuncToISOString):
1824         (JSC::dateProtoFuncToDateString):
1825         (JSC::dateProtoFuncToTimeString):
1826         (JSC::dateProtoFuncToLocaleString):
1827         (JSC::dateProtoFuncToLocaleDateString):
1828         (JSC::dateProtoFuncToLocaleTimeString):
1829         (JSC::dateProtoFuncGetTime):
1830         (JSC::dateProtoFuncGetFullYear):
1831         (JSC::dateProtoFuncGetUTCFullYear):
1832         (JSC::dateProtoFuncToGMTString):
1833         (JSC::dateProtoFuncGetMonth):
1834         (JSC::dateProtoFuncGetUTCMonth):
1835         (JSC::dateProtoFuncGetDate):
1836         (JSC::dateProtoFuncGetUTCDate):
1837         (JSC::dateProtoFuncGetDay):
1838         (JSC::dateProtoFuncGetUTCDay):
1839         (JSC::dateProtoFuncGetHours):
1840         (JSC::dateProtoFuncGetUTCHours):
1841         (JSC::dateProtoFuncGetMinutes):
1842         (JSC::dateProtoFuncGetUTCMinutes):
1843         (JSC::dateProtoFuncGetSeconds):
1844         (JSC::dateProtoFuncGetUTCSeconds):
1845         (JSC::dateProtoFuncGetTimezoneOffset):
1846         (JSC::setNewValueFromTimeArgs):
1847         (JSC::setNewValueFromDateArgs):
1848         (JSC::dateProtoFuncSetYear):
1849         (JSC::dateProtoFuncGetYear): Also renamed "utc" to "outputIsUTC", for clarity.
1850
1851 2009-10-20  Gabor Loki  <loki@inf.u-szeged.hu>
1852
1853         Reviewed by Geoffrey Garen.
1854
1855         The op_next_pname should use 4 bytes addressing mode in case of JSValue32
1856         https://bugs.webkit.org/show_bug.cgi?id=30570
1857
1858         * jit/JITOpcodes.cpp:
1859         (JSC::JIT::emit_op_next_pname):
1860
1861 2009-10-20  Gabor Loki  <loki@inf.u-szeged.hu>
1862
1863         Reviewed by Oliver Hunt.
1864
1865         Move OverridesMarkChildren flag from DatePrototype to its parent class
1866         https://bugs.webkit.org/show_bug.cgi?id=30372
1867
1868         * runtime/DateInstance.h:
1869         (JSC::DateInstance::createStructure):
1870         * runtime/DatePrototype.h:
1871
1872 2009-10-19  Geoffrey Garen  <ggaren@apple.com>
1873
1874         Reviewed by Oliver Hunt.
1875
1876         Tightened up some put_by_id_transition code generation.
1877         https://bugs.webkit.org/show_bug.cgi?id=30539
1878
1879         * jit/JIT.h:
1880         * jit/JITPropertyAccess.cpp:
1881         (JSC::JIT::testPrototype):
1882         (JSC::JIT::privateCompilePutByIdTransition): No need to do object type
1883         checks or read Structures and prototypes from objects: they're all known
1884         constants at compile time.
1885
1886 2009-10-19  Geoffrey Garen  <ggaren@apple.com>
1887
1888         Reviewed by Sam Weinig.
1889
1890         Added a private API for getting a global context from a context, for
1891         clients who want to preserve a context for a later callback.
1892
1893         * API/APICast.h:
1894         (toGlobalRef): Added an ASSERT, since this function is used more often
1895         than before.
1896
1897         * API/JSContextRef.cpp:
1898         * API/JSContextRefPrivate.h: Added. The new API.
1899
1900         * API/tests/testapi.c:
1901         (print_callAsFunction):
1902         (main): Test the new API.
1903
1904         * JavaScriptCore.exp:
1905         * JavaScriptCore.xcodeproj/project.pbxproj: Build and export the new API.
1906
1907 2009-10-17  Geoffrey Garen  <ggaren@apple.com>
1908
1909         Reviewed by Oliver Hunt.
1910         
1911         Tightened up some instanceof code generation.
1912         https://bugs.webkit.org/show_bug.cgi?id=30488
1913
1914         * jit/JITOpcodes.cpp:
1915         (JSC::JIT::emit_op_instanceof):
1916         (JSC::JIT::emitSlow_op_instanceof): No need to do object type checks - 
1917         cell type checks and ImplementsDefaultHasIntance checks implicitly
1918         supersede object type checks.
1919
1920 2009-10-18  Kwang Yul Seo  <skyul@company100.net>
1921
1922         Reviewed by Darin Adler.
1923
1924         Use _stricmp and _strnicmp instead of deprecated stricmp and strnicmp.
1925         https://bugs.webkit.org/show_bug.cgi?id=30474
1926
1927         stricmp and strnicmp are deprecated beginning in Visual
1928         C++ 2005. Use _stricmp and _strnicmp instead in StringExtras.h.
1929
1930         * wtf/StringExtras.h:
1931         (strncasecmp):
1932         (strcasecmp):
1933
1934 2009-10-16  Geoffrey Garen  <ggaren@apple.com>
1935
1936         Build fix: apparently we shouldn't export those symbols?
1937
1938         * JavaScriptCore.exp:
1939
1940 2009-10-16  Geoffrey Garen  <ggaren@apple.com>
1941
1942         Build fix: export some symbols.
1943
1944         * JavaScriptCore.exp:
1945
1946 2009-10-16  Oliver Hunt  <oliver@apple.com>
1947
1948         Reviewed by Gavin Barraclough.
1949
1950         structure typeinfo flags should be inherited.
1951         https://bugs.webkit.org/show_bug.cgi?id=30468
1952
1953         Add StructureFlag constant to the various JSC classes and use
1954         it for the TypeInfo construction.  This allows us to simply
1955         accumulate flags by basing each classes StructureInfo on its parents.
1956
1957         * API/JSCallbackConstructor.h:
1958         (JSC::JSCallbackConstructor::createStructure):
1959         * API/JSCallbackFunction.h:
1960         (JSC::JSCallbackFunction::createStructure):
1961         * API/JSCallbackObject.h:
1962         (JSC::JSCallbackObject::createStructure):
1963         * debugger/DebuggerActivation.h:
1964         (JSC::DebuggerActivation::createStructure):
1965         * runtime/Arguments.h:
1966         (JSC::Arguments::createStructure):
1967         * runtime/BooleanObject.h:
1968         (JSC::BooleanObject::createStructure):
1969         * runtime/DatePrototype.h:
1970         (JSC::DatePrototype::createStructure):
1971         * runtime/FunctionPrototype.h:
1972         (JSC::FunctionPrototype::createStructure):
1973         * runtime/GlobalEvalFunction.h:
1974         (JSC::GlobalEvalFunction::createStructure):
1975         * runtime/InternalFunction.h:
1976         (JSC::InternalFunction::createStructure):
1977         * runtime/JSActivation.h:
1978         (JSC::JSActivation::createStructure):
1979         * runtime/JSArray.h:
1980         (JSC::JSArray::createStructure):
1981         * runtime/JSByteArray.cpp:
1982         (JSC::JSByteArray::createStructure):
1983         * runtime/JSByteArray.h:
1984         * runtime/JSFunction.h:
1985         (JSC::JSFunction::createStructure):
1986         * runtime/JSGlobalObject.h:
1987         (JSC::JSGlobalObject::createStructure):
1988         * runtime/JSNotAnObject.h:
1989         (JSC::JSNotAnObject::createStructure):
1990         * runtime/JSONObject.h:
1991         (JSC::JSONObject::createStructure):
1992         * runtime/JSObject.h:
1993         (JSC::JSObject::createStructure):
1994         * runtime/JSStaticScopeObject.h:
1995         (JSC::JSStaticScopeObject::createStructure):
1996         * runtime/JSVariableObject.h:
1997         (JSC::JSVariableObject::createStructure):
1998         * runtime/JSWrapperObject.h:
1999         (JSC::JSWrapperObject::createStructure):
2000         * runtime/MathObject.h:
2001         (JSC::MathObject::createStructure):
2002         * runtime/NumberConstructor.h:
2003         (JSC::NumberConstructor::createStructure):
2004         * runtime/NumberObject.h:
2005         (JSC::NumberObject::createStructure):
2006         * runtime/RegExpConstructor.h:
2007         (JSC::RegExpConstructor::createStructure):
2008         * runtime/RegExpObject.h:
2009         (JSC::RegExpObject::createStructure):
2010         * runtime/StringObject.h:
2011         (JSC::StringObject::createStructure):
2012         * runtime/StringObjectThatMasqueradesAsUndefined.h:
2013         (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
2014
2015 2009-10-16  Geoffrey Garen  <ggaren@apple.com>
2016
2017         Reviewed by Oliver Hunt.
2018         
2019         Fast for-in enumeration: Cache JSPropertyNameIterator; cache JSStrings
2020         in JSPropertyNameIterator; inline more code.
2021
2022         1.024x as fast on SunSpider (fasta: 1.43x as fast).
2023
2024         * bytecode/CodeBlock.cpp:
2025         (JSC::CodeBlock::dump):
2026         * bytecode/Opcode.h:
2027         * bytecompiler/BytecodeGenerator.cpp:
2028         (JSC::BytecodeGenerator::emitGetPropertyNames):
2029         (JSC::BytecodeGenerator::emitNextPropertyName):
2030         * bytecompiler/BytecodeGenerator.h: Added a few extra operands to
2031         op_get_pnames and op_next_pname so that we can track iteration state
2032         in the register file instead of in the JSPropertyNameIterator. (To be
2033         cacheable, the JSPropertyNameIterator must be stateless.)
2034
2035         * interpreter/Interpreter.cpp:
2036         (JSC::Interpreter::tryCachePutByID):
2037         (JSC::Interpreter::tryCacheGetByID): Updated for rename to
2038         "normalizePrototypeChain" and removal of "isCacheable". 
2039
2040         (JSC::Interpreter::privateExecute): Updated for in-RegisterFile
2041         iteration state tracking.
2042
2043         * jit/JIT.cpp:
2044         (JSC::JIT::privateCompileMainPass):
2045         * jit/JIT.h:
2046         * jit/JITOpcodes.cpp:
2047         (JSC::JIT::emit_op_get_pnames): Updated for in-RegisterFile
2048         iteration state tracking.
2049
2050         (JSC::JIT::emit_op_next_pname): Inlined code generation for op_next_pname.
2051
2052         * jit/JITStubs.cpp:
2053         (JSC::JITThunks::tryCachePutByID):
2054         (JSC::JITThunks::tryCacheGetByID): Updated for rename to
2055         "normalizePrototypeChain" and removal of "isCacheable". 
2056
2057         (JSC::DEFINE_STUB_FUNCTION):
2058         * jit/JITStubs.h:
2059         (JSC::): Added has_property and to_object stubs. Removed op_next_pname
2060         stub, since has_property is all we need anymore.
2061
2062         * parser/Nodes.cpp:
2063         (JSC::ForInNode::emitBytecode): Updated for in-RegisterFile
2064         iteration state tracking.
2065
2066         * runtime/JSCell.h:
2067         * runtime/JSObject.cpp:
2068         (JSC::JSObject::getPropertyNames): Don't do caching at this layer
2069         anymore, since we don't create a JSPropertyNameIterator at this layer.
2070
2071         * runtime/JSPropertyNameIterator.cpp:
2072         (JSC::JSPropertyNameIterator::create): Do do caching at this layer.
2073         (JSC::JSPropertyNameIterator::get):  Updated for in-RegisterFile
2074         iteration state tracking.
2075         (JSC::JSPropertyNameIterator::markChildren): Mark our JSStrings.
2076
2077         * runtime/JSPropertyNameIterator.h:
2078         (JSC::JSPropertyNameIterator::size):
2079         (JSC::JSPropertyNameIterator::setCachedStructure):
2080         (JSC::JSPropertyNameIterator::cachedStructure):
2081         (JSC::JSPropertyNameIterator::setCachedPrototypeChain):
2082         (JSC::JSPropertyNameIterator::cachedPrototypeChain):
2083         (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
2084         (JSC::Structure::setEnumerationCache): Don't store iteration state in
2085         a JSPropertyNameIterator. Do cache a JSPropertyNameIterator in a
2086         Structure.
2087
2088         * runtime/JSValue.h:
2089         (JSC::asCell):
2090         * runtime/MarkStack.h: Make those mischievous #include gods happy.
2091
2092         * runtime/ObjectConstructor.cpp:
2093
2094         * runtime/Operations.h:
2095         (JSC::normalizePrototypeChain): Renamed countPrototypeChainEntriesAndCheckForProxies
2096         to normalizePrototypeChain, since it changes dictionary prototypes to
2097         non-dictionary objects.
2098
2099         * runtime/PropertyNameArray.cpp:
2100         (JSC::PropertyNameArray::add):
2101         * runtime/PropertyNameArray.h:
2102         (JSC::PropertyNameArrayData::PropertyNameArrayData):
2103         (JSC::PropertyNameArray::data):
2104         (JSC::PropertyNameArray::size):
2105         (JSC::PropertyNameArray::begin):
2106         (JSC::PropertyNameArray::end): Simplified some code here to help with
2107         current and future refactoring.
2108
2109         * runtime/Protect.h:
2110         * runtime/Structure.cpp:
2111         (JSC::Structure::~Structure):
2112         (JSC::Structure::addPropertyWithoutTransition):
2113         (JSC::Structure::removePropertyWithoutTransition): No need to clear
2114         the enumeration cache with adding / removing properties without
2115         transition. It is an error to add / remove properties without transition
2116         once an object has been observed, and we can ASSERT to catch that.
2117
2118         * runtime/Structure.h:
2119         (JSC::Structure::enumerationCache): Changed the enumeration cache to
2120         hold a JSPropertyNameIterator.
2121
2122         * runtime/StructureChain.cpp:
2123         * runtime/StructureChain.h:
2124         (JSC::StructureChain::head): Removed StructureChain::isCacheable because
2125         it was wrong-headed in two ways: (1) It gave up when a prototype was a
2126         dictionary, but instead we want un-dictionary heavily accessed
2127         prototypes; (2) It folded a test for hasDefaultGetPropertyNames() into
2128         a generic test for "cacheable-ness", but hasDefaultGetPropertyNames()
2129         is only releavant to for-in caching.
2130
2131 2009-10-16  Steve Falkenburg  <sfalken@apple.com>
2132
2133         Reviewed by Adam Roben.
2134
2135         Add a Debug_All configuration to build entire stack as debug.
2136         Change Debug_Internal to:
2137         - stop using _debug suffix for all WebKit/Safari binaries
2138         - not use _debug as a DLL naming suffix
2139         - use non-debug C runtime lib.
2140
2141         * JavaScriptCore.vcproj/JavaScriptCore.make: Debug build in makefile should build Debug_All.
2142         * JavaScriptCore.vcproj/JavaScriptCore.sln: Add Debug_All configuration.
2143         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add Debug_All configuration.
2144         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Renamed single configuration from "Release" to "all".
2145         * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Add Debug_All configuration.
2146         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add Debug_All configuration.
2147         * JavaScriptCore.vcproj/jsc/jsc.vcproj: Add Debug_All configuration.
2148         * JavaScriptCore.vcproj/testapi/testapi.vcproj: Add Debug_All configuration.
2149
2150 2009-10-16  Oliver Hunt  <oliver@apple.com>
2151
2152         Reviewed by Gavin Barraclough.
2153
2154         Make typeinfo flags default to false
2155         https://bugs.webkit.org/show_bug.cgi?id=30372
2156
2157         Last part -- replace HasDefaultGetPropertyNames with OverridesGetPropertyNames
2158         flag.
2159
2160         * API/JSCallbackConstructor.h:
2161         (JSC::JSCallbackConstructor::createStructure):
2162         * API/JSCallbackObject.h:
2163         (JSC::JSCallbackObject::createStructure):
2164         * debugger/DebuggerActivation.h:
2165         (JSC::DebuggerActivation::createStructure):
2166         * runtime/Arguments.h:
2167         (JSC::Arguments::createStructure):
2168         * runtime/BooleanObject.h:
2169         (JSC::BooleanObject::createStructure):
2170         * runtime/DatePrototype.h:
2171         (JSC::DatePrototype::createStructure):
2172         * runtime/FunctionPrototype.h:
2173         (JSC::FunctionPrototype::createStructure):
2174         * runtime/GlobalEvalFunction.h:
2175         (JSC::GlobalEvalFunction::createStructure):
2176         * runtime/JSAPIValueWrapper.h:
2177         (JSC::JSAPIValueWrapper::createStructure):
2178         * runtime/JSActivation.h:
2179         (JSC::JSActivation::createStructure):
2180         * runtime/JSArray.h:
2181         (JSC::JSArray::createStructure):
2182         * runtime/JSByteArray.cpp:
2183         (JSC::JSByteArray::createStructure):
2184         * runtime/JSFunction.h:
2185         (JSC::JSFunction::createStructure):
2186         * runtime/JSGlobalObject.h:
2187         (JSC::JSGlobalObject::createStructure):
2188         * runtime/JSNotAnObject.h:
2189         (JSC::JSNotAnObject::createStructure):
2190         * runtime/JSONObject.h:
2191         (JSC::JSONObject::createStructure):
2192         * runtime/JSObject.cpp:
2193         (JSC::JSObject::getPropertyNames):
2194         * runtime/JSObject.h:
2195         (JSC::JSObject::createStructure):
2196         * runtime/JSStaticScopeObject.h:
2197         (JSC::JSStaticScopeObject::createStructure):
2198         * runtime/JSTypeInfo.h:
2199         (JSC::TypeInfo::overridesGetPropertyNames):
2200         * runtime/JSVariableObject.h:
2201         (JSC::JSVariableObject::createStructure):
2202         * runtime/JSWrapperObject.h:
2203         (JSC::JSWrapperObject::createStructure):
2204         * runtime/MathObject.h:
2205         (JSC::MathObject::createStructure):
2206         * runtime/NumberConstructor.h:
2207         (JSC::NumberConstructor::createStructure):
2208         * runtime/NumberObject.h:
2209         (JSC::NumberObject::createStructure):
2210         * runtime/RegExpConstructor.h:
2211         (JSC::RegExpConstructor::createStructure):
2212         * runtime/RegExpObject.h:
2213         (JSC::RegExpObject::createStructure):
2214         * runtime/StringObject.h:
2215         (JSC::StringObject::createStructure):
2216         * runtime/StringObjectThatMasqueradesAsUndefined.h:
2217         (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
2218         * runtime/StructureChain.cpp:
2219         (JSC::StructureChain::isCacheable):
2220
2221 2009-10-16  Kevin Ollivier  <kevino@theolliviers.com>
2222
2223         wxMSW build fix, we can't use the simple hash there because the PlatformModuleVersion 
2224         structure differs.
2225
2226         * wtf/Platform.h:
2227
2228 2009-10-16  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2229
2230         Reviewed by Simon Hausmann.
2231
2232         [Qt] Implement ExecutableAllocator for Symbian
2233         https://bugs.webkit.org/show_bug.cgi?id=29946
2234
2235         Tested with YARR JIT enabled for Symbian; 
2236         This patch does not (yet) enable YARR JIT by default.
2237
2238         * JavaScriptCore.pri:
2239         * jit/ExecutableAllocator.h:
2240         * jit/ExecutableAllocatorSymbian.cpp: Added.
2241         (JSC::ExecutableAllocator::intializePageSize):
2242         (JSC::ExecutablePool::systemAlloc):
2243         (JSC::ExecutablePool::systemRelease):
2244
2245 2009-10-15  Oliver Hunt  <oliver@apple.com>
2246
2247         Reviewed by Darin Adler.
2248
2249         Make typeinfo flags default to false
2250         https://bugs.webkit.org/show_bug.cgi?id=30372
2251
2252         Part 2 -- Reverse the TypeInfo HasDefaultMark flag to OverridesMarkChildren, etc
2253
2254         * API/JSCallbackConstructor.h:
2255         (JSC::JSCallbackConstructor::createStructure):
2256         * API/JSCallbackFunction.h:
2257         (JSC::JSCallbackFunction::createStructure):
2258         * API/JSCallbackObject.h:
2259         (JSC::JSCallbackObject::createStructure):
2260         * debugger/DebuggerActivation.h:
2261         (JSC::DebuggerActivation::createStructure):
2262         * runtime/Arguments.h:
2263         (JSC::Arguments::createStructure):
2264         * runtime/BooleanObject.h:
2265         (JSC::BooleanObject::createStructure):
2266         * runtime/DatePrototype.h:
2267         (JSC::DatePrototype::createStructure):
2268         * runtime/FunctionPrototype.h:
2269         (JSC::FunctionPrototype::createStructure):
2270         * runtime/GetterSetter.h:
2271         (JSC::GetterSetter::createStructure):
2272         * runtime/GlobalEvalFunction.h:
2273         (JSC::GlobalEvalFunction::createStructure):
2274         * runtime/InternalFunction.h:
2275         (JSC::InternalFunction::createStructure):
2276         * runtime/JSAPIValueWrapper.h:
2277         (JSC::JSAPIValueWrapper::createStructure):
2278         * runtime/JSActivation.h:
2279         (JSC::JSActivation::createStructure):
2280         * runtime/JSArray.h:
2281         (JSC::JSArray::createStructure):
2282         (JSC::MarkStack::markChildren):
2283         * runtime/JSByteArray.cpp:
2284         (JSC::JSByteArray::createStructure):
2285         * runtime/JSFunction.h:
2286         (JSC::JSFunction::createStructure):
2287         * runtime/JSGlobalObject.h:
2288         (JSC::JSGlobalObject::createStructure):
2289         * runtime/JSNotAnObject.h:
2290         (JSC::JSNotAnObject::createStructure):
2291         * runtime/JSNumberCell.h:
2292         (JSC::JSNumberCell::createStructure):
2293         * runtime/JSONObject.h:
2294         (JSC::JSONObject::createStructure):
2295         * runtime/JSObject.h:
2296         (JSC::JSObject::createStructure):
2297         * runtime/JSPropertyNameIterator.h:
2298         (JSC::JSPropertyNameIterator::createStructure):
2299         * runtime/JSStaticScopeObject.h:
2300         (JSC::JSStaticScopeObject::createStructure):
2301         * runtime/JSString.h:
2302         (JSC::JSString::createStructure):
2303         * runtime/JSTypeInfo.h:
2304         (JSC::TypeInfo::overridesMarkChildren):
2305         * runtime/JSVariableObject.h:
2306         (JSC::JSVariableObject::createStructure):
2307         * runtime/JSWrapperObject.h:
2308         (JSC::JSWrapperObject::createStructure):
2309         * runtime/MathObject.h:
2310         (JSC::MathObject::createStructure):
2311         * runtime/NumberConstructor.h:
2312         (JSC::NumberConstructor::createStructure):
2313         * runtime/NumberObject.h:
2314         (JSC::NumberObject::createStructure):
2315         * runtime/RegExpConstructor.h:
2316         (JSC::RegExpConstructor::createStructure):
2317         * runtime/RegExpObject.h:
2318         (JSC::RegExpObject::createStructure):
2319         * runtime/StringObject.h:
2320         (JSC::StringObject::createStructure):
2321         * runtime/StringObjectThatMasqueradesAsUndefined.h:
2322         (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
2323
2324 2009-10-14  Oliver Hunt  <oliver@apple.com>
2325
2326         Reviewed by Geoff Garen.
2327
2328         Make typeinfo flags default to false
2329         https://bugs.webkit.org/show_bug.cgi?id=30372
2330         
2331         Part 1. Reverse the HasStandardGetOwnPropertySlot flag.
2332
2333         * API/JSCallbackConstructor.h:
2334         (JSC::JSCallbackConstructor::createStructure):
2335         * API/JSCallbackFunction.h:
2336         (JSC::JSCallbackFunction::createStructure):
2337         * API/JSCallbackObject.h:
2338         (JSC::JSCallbackObject::createStructure):
2339         * debugger/DebuggerActivation.h:
2340         (JSC::DebuggerActivation::createStructure):
2341         * jit/JITStubs.cpp:
2342         (JSC::DEFINE_STUB_FUNCTION):
2343         * runtime/Arguments.h:
2344         (JSC::Arguments::createStructure):
2345         * runtime/BooleanObject.h:
2346         (JSC::BooleanObject::createStructure):
2347         * runtime/DatePrototype.h:
2348         (JSC::DatePrototype::createStructure):
2349         * runtime/FunctionPrototype.h:
2350         (JSC::FunctionPrototype::createStructure):
2351         * runtime/GlobalEvalFunction.h:
2352         (JSC::GlobalEvalFunction::createStructure):
2353         * runtime/InternalFunction.h:
2354         (JSC::InternalFunction::createStructure):
2355         * runtime/JSActivation.h:
2356         (JSC::JSActivation::createStructure):
2357         * runtime/JSArray.h:
2358         (JSC::JSArray::createStructure):
2359         * runtime/JSByteArray.cpp:
2360         (JSC::JSByteArray::createStructure):
2361         * runtime/JSFunction.h:
2362         (JSC::JSFunction::createStructure):
2363         * runtime/JSGlobalObject.h:
2364         (JSC::JSGlobalObject::createStructure):
2365         * runtime/JSNumberCell.h:
2366         (JSC::JSNumberCell::createStructure):
2367         * runtime/JSONObject.h:
2368         (JSC::JSONObject::createStructure):
2369         * runtime/JSObject.h:
2370         (JSC::JSObject::createStructure):
2371         (JSC::JSCell::fastGetOwnPropertySlot):
2372         * runtime/JSStaticScopeObject.h:
2373         (JSC::JSStaticScopeObject::createStructure):
2374         * runtime/JSString.h:
2375         (JSC::JSString::createStructure):
2376         * runtime/JSTypeInfo.h:
2377         (JSC::TypeInfo::overridesGetOwnPropertySlot):
2378         * runtime/JSVariableObject.h:
2379         (JSC::JSVariableObject::createStructure):
2380         * runtime/JSWrapperObject.h:
2381         (JSC::JSWrapperObject::createStructure):
2382         * runtime/MathObject.h:
2383         (JSC::MathObject::createStructure):
2384         * runtime/NumberConstructor.h:
2385         (JSC::NumberConstructor::createStructure):
2386         * runtime/NumberObject.h:
2387         (JSC::NumberObject::createStructure):
2388         * runtime/RegExpConstructor.h:
2389         (JSC::RegExpConstructor::createStructure):
2390         * runtime/RegExpObject.h:
2391         (JSC::RegExpObject::createStructure):
2392         * runtime/StringObject.h:
2393         (JSC::StringObject::createStructure):
2394         * runtime/StringObjectThatMasqueradesAsUndefined.h:
2395         (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
2396
2397 2009-10-14  Kevin Ollivier  <kevino@theolliviers.com>
2398 2009-10-14  Darin Adler  <darin@apple.com>
2399
2400         Additions so fix for https://bugs.webkit.org/show_bug.cgi?id=18994
2401         can build on Windows.
2402
2403         * wtf/MathExtras.h: Added llround and llroundf for Windows.
2404
2405 2009-10-14  Kevin Ollivier  <kevino@theolliviers.com>
2406
2407         wx build fix. Set ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH for plugins while we're still building stubs.
2408
2409         * wtf/Platform.h:
2410
2411 2009-10-13  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2412
2413         Reviewed by Simon Hausmann.
2414
2415         Refactor ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH
2416         https://bugs.webkit.org/show_bug.cgi?id=30278
2417
2418         Move the definition of ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH
2419         from the make system into common code.
2420
2421         * wtf/Platform.h:
2422
2423 2009-10-13  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2424
2425         Reviewed by Darin Adler.
2426
2427         ARM compiler does not understand reinterpret_cast<void*>
2428         https://bugs.webkit.org/show_bug.cgi?id=29034
2429
2430         Change reinterpret_cast<void*> to regular C style (void*) cast 
2431         for the ARM RVCT compiler.
2432
2433         * assembler/MacroAssemblerCodeRef.h:
2434         (JSC::FunctionPtr::FunctionPtr): 
2435         * jit/JITOpcodes.cpp: Cast to FunctionPtr first 
2436            instead of directly casting to reinterpret_cast
2437         * jit/JITStubCall.h: Ditto + change the type of m_stub
2438           from void* to FunctionPtr.
2439         (JSC::JITStubCall::JITStubCall): 
2440         (JSC::JITStubCall::call):
2441         * jit/JITStubs.cpp: Ditto.
2442         (JSC::DEFINE_STUB_FUNCTION(EncodedJSValue, op_throw)):
2443
2444 2009-10-11  Oliver Hunt  <oliver@apple.com>
2445
2446         Re-enable the JIT.
2447
2448         * wtf/Platform.h:
2449
2450 2009-10-10  Oliver Hunt  <oliver@apple.com>
2451
2452         Reviewed by Maciej Stachowiak.
2453
2454         Support for String.trim(), String.trimLeft() and String.trimRight() methods
2455         https://bugs.webkit.org/show_bug.cgi?id=26590
2456
2457         Implement trim, trimLeft, and trimRight
2458
2459         * runtime/StringPrototype.cpp:
2460         (JSC::isTrimWhitespace):
2461            Our normal string whitespace function does not include U+200B which
2462            is needed for compatibility with mozilla's implementation of trim.
2463            U+200B does not appear to be expected according to spec, however I am
2464            choosing to be lax, and match mozilla behavior so have added this
2465            exception.
2466         (JSC::trimString):
2467
2468 2009-10-09  Geoffrey Garen  <ggaren@apple.com>
2469
2470         Reviewed by Oliver Hunt.
2471
2472         Eliminated some legacy bytecode weirdness.
2473         
2474         Use vPC[x] subscripting instead of ++vPC to access instruction operands.
2475         This is simpler, and often more efficient.
2476
2477         To support this, and to remove use of hard-coded offsets in bytecode and
2478         JIT code generation and dumping, calculate jump offsets from the beginning
2479         of an instruction, rather than the middle or end.
2480         
2481         Also, use OPCODE_LENGTH instead of hard-coded constants for the sizes of
2482         opcodes.
2483         
2484         SunSpider reports no change in JIT mode, and a 1.01x speedup in Interpreter
2485         mode.
2486
2487         * bytecode/CodeBlock.cpp:
2488         (JSC::printConditionalJump):
2489         (JSC::CodeBlock::dump):
2490         * bytecompiler/BytecodeGenerator.cpp:
2491         (JSC::BytecodeGenerator::emitJump):
2492         (JSC::BytecodeGenerator::emitJumpIfTrue):
2493         (JSC::BytecodeGenerator::emitJumpIfFalse):
2494         (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
2495         (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
2496         (JSC::BytecodeGenerator::emitComplexJumpScopes):
2497         (JSC::BytecodeGenerator::emitJumpScopes):
2498         (JSC::BytecodeGenerator::emitNextPropertyName):
2499         (JSC::BytecodeGenerator::emitCatch):
2500         (JSC::BytecodeGenerator::emitJumpSubroutine):
2501         (JSC::prepareJumpTableForImmediateSwitch):
2502         (JSC::prepareJumpTableForCharacterSwitch):
2503         (JSC::prepareJumpTableForStringSwitch):
2504         (JSC::BytecodeGenerator::endSwitch):
2505         * bytecompiler/Label.h:
2506         (JSC::Label::setLocation):
2507         (JSC::Label::bind):
2508         * interpreter/Interpreter.cpp:
2509         (JSC::Interpreter::resolve):
2510         (JSC::Interpreter::resolveSkip):
2511         (JSC::Interpreter::resolveGlobal):
2512         (JSC::Interpreter::resolveBase):
2513         (JSC::Interpreter::resolveBaseAndProperty):
2514         (JSC::Interpreter::createExceptionScope):
2515         (JSC::Interpreter::privateExecute):
2516         * interpreter/Interpreter.h:
2517         * jit/JIT.cpp:
2518         (JSC::JIT::privateCompile):
2519         * jit/JITArithmetic.cpp:
2520         (JSC::JIT::emit_op_jnless):
2521         (JSC::JIT::emitSlow_op_jnless):
2522         (JSC::JIT::emit_op_jnlesseq):
2523         (JSC::JIT::emitSlow_op_jnlesseq):
2524         (JSC::JIT::emitBinaryDoubleOp):
2525         * jit/JITOpcodes.cpp:
2526         (JSC::JIT::emit_op_jmp):
2527         (JSC::JIT::emit_op_loop):
2528         (JSC::JIT::emit_op_loop_if_less):
2529         (JSC::JIT::emitSlow_op_loop_if_less):
2530         (JSC::JIT::emit_op_loop_if_lesseq):
2531         (JSC::JIT::emitSlow_op_loop_if_lesseq):
2532         (JSC::JIT::emit_op_loop_if_true):
2533         (JSC::JIT::emitSlow_op_loop_if_true):
2534         (JSC::JIT::emit_op_jfalse):
2535         (JSC::JIT::emitSlow_op_jfalse):
2536         (JSC::JIT::emit_op_jtrue):
2537         (JSC::JIT::emitSlow_op_jtrue):
2538         (JSC::JIT::emit_op_jeq_null):
2539         (JSC::JIT::emit_op_jneq_null):
2540         (JSC::JIT::emit_op_jneq_ptr):
2541         (JSC::JIT::emit_op_jsr):
2542         (JSC::JIT::emit_op_next_pname):
2543         (JSC::JIT::emit_op_jmp_scopes):
2544
2545 2009-10-09  Geoffrey Garen  <ggaren@apple.com>
2546
2547         Reviewed by Sam Weinig.
2548
2549         Migrated some code that didn't belong out of Structure.
2550         
2551         SunSpider says maybe 1.03x faster.
2552
2553         * runtime/JSCell.h: Nixed Structure::markAggregate, and made marking of
2554         a Structure's prototype the direct responsility of the object using it.
2555         (Giving Structure a mark function was misleading because it implied that
2556         all live structures get marked during GC, when they don't.)
2557         
2558         * runtime/JSGlobalObject.cpp:
2559         (JSC::markIfNeeded):
2560         (JSC::JSGlobalObject::markChildren): Added code to mark prototypes stored
2561         on the global object. Maybe this wasn't necessary, but now we don't have
2562         to wonder.
2563
2564         * runtime/JSObject.cpp:
2565         (JSC::JSObject::getPropertyNames):
2566         (JSC::JSObject::getOwnPropertyNames):
2567         (JSC::JSObject::getEnumerableNamesFromClassInfoTable):
2568         * runtime/JSObject.h:
2569         (JSC::JSObject::markChildrenDirect):
2570         * runtime/PropertyNameArray.h:
2571         * runtime/Structure.cpp:
2572         * runtime/Structure.h:
2573         (JSC::Structure::setEnumerationCache):
2574         (JSC::Structure::enumerationCache): Moved property name gathering code
2575         from Structure to JSObject because having a Structure iterate its JSObject
2576         was a layering violation. A JSObject is implemented using a Structure; not
2577         the other way around.
2578
2579 2009-10-09  Mark Rowe  <mrowe@apple.com>
2580
2581         Attempt to fix the GTK release build.
2582
2583         * GNUmakefile.am: Include Grammar.cpp in release builds now that
2584         AllInOneFile.cpp is gone.
2585
2586 2009-10-09  Gabor Loki  <loki@inf.u-szeged.hu>
2587
2588         Rubber-stamped by Eric Seidel.
2589
2590         Add ARM JIT support for Gtk port (disabled by default)
2591         https://bugs.webkit.org/show_bug.cgi?id=30228
2592
2593         * GNUmakefile.am:
2594
2595 2009-10-08  Geoffrey Garen  <ggaren@apple.com>
2596
2597         Tiger build fix: added a few more variable initializations.
2598
2599         * runtime/StringPrototype.cpp:
2600         (JSC::stringProtoFuncReplace):
2601         (JSC::stringProtoFuncSearch):
2602
2603 2009-10-08  Geoffrey Garen  <ggaren@apple.com>
2604
2605         Qt build fix: added missing #include.
2606
2607         * jsc.cpp:
2608
2609 2009-10-08  Geoffrey Garen  <ggaren@apple.com>
2610
2611         Tiger build fix: initialize variable whose initialization the compiler
2612         can't otherwise figure out.
2613
2614         * runtime/RegExpObject.cpp:
2615         (JSC::RegExpObject::match):
2616
2617 2009-10-08  Geoffrey Garen  <ggaren@apple.com>
2618
2619         Windows build fix: updated exports.
2620
2621         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2622         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2623
2624 2009-10-08  Geoffrey Garen  <ggaren@apple.com>
2625
2626         Tiger build fix: fixed file name case.
2627
2628         * JavaScriptCore.xcodeproj/project.pbxproj:
2629
2630 2009-10-08  Geoffrey Garen  <ggaren@apple.com>
2631
2632         Reviewed by Maciej Stachowiak.
2633
2634         At long last, I pronounce the death of AllInOneFile.cpp.
2635         
2636         SunSpider reports a 1.01x speedup.
2637
2638         * AllInOneFile.cpp: Removed.
2639         * GNUmakefile.am:
2640         * JavaScriptCore.exp:
2641         * JavaScriptCore.gypi:
2642         * JavaScriptCore.xcodeproj/project.pbxproj: Added missing project files
2643         to compilation stages.
2644
2645         * parser/Grammar.y:
2646         * parser/Lexer.cpp:
2647         * parser/Lexer.h:
2648         (JSC::jscyylex):
2649         * runtime/ArrayConstructor.cpp:
2650         (JSC::constructArrayWithSizeQuirk):
2651         * runtime/Collector.h:
2652         * runtime/JSCell.cpp:
2653         (JSC::JSCell::operator new):
2654         * runtime/JSCell.h:
2655         (JSC::JSCell::operator new):
2656         * runtime/JSGlobalObject.cpp:
2657         (JSC::JSGlobalObject::operator new):
2658         * runtime/JSNumberCell.h:
2659         (JSC::JSNumberCell::operator new):
2660         * runtime/JSString.cpp:
2661         * runtime/JSString.h:
2662         (JSC::jsString):
2663         (JSC::jsSubstring):
2664         (JSC::jsOwnedString):
2665         * runtime/RegExpConstructor.cpp:
2666         * runtime/RegExpConstructor.h:
2667         (JSC::RegExpConstructorPrivate::RegExpConstructorPrivate):
2668         (JSC::RegExpConstructorPrivate::lastOvector):
2669         (JSC::RegExpConstructorPrivate::tempOvector):
2670         (JSC::RegExpConstructorPrivate::changeLastOvector):
2671         (JSC::RegExpConstructor::performMatch):
2672         * runtime/StringPrototype.cpp:
2673         (JSC::stringProtoFuncMatch):
2674         * yarr/RegexJIT.cpp:
2675         * yarr/RegexJIT.h:
2676         (JSC::Yarr::executeRegex): Inlined a few things that Shark said
2677         were hot, on the presumption that AllInOneFile.cpp used to inline them
2678         automatically.
2679
2680 2009-10-08  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
2681
2682         Reviewed by Gavin Barraclough.
2683
2684         Fix for JIT'ed op_call instructions (evals, constructs, etc.)
2685         when !ENABLE(JIT_OPTIMIZE_CALL) && USE(JSVALUE32_64)
2686
2687         https://bugs.webkit.org/show_bug.cgi?id=30201
2688
2689         * jit/JITCall.cpp:
2690         (JSC::JIT::compileOpCall):
2691
2692 2009-10-07  Geoffrey Garen  <ggaren@apple.com>
2693
2694         Windows build fix: removed no longer exported symbol.
2695
2696         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2697         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2698
2699 2009-10-07  Geoffrey Garen  <ggaren@apple.com>
2700
2701         Reviewed by Oliver Hunt.
2702
2703         Fixed <rdar://problem/5751979> Database code takes JSLock on secondary
2704         thread, permanently slowing down JavaScript
2705         
2706         Removed the optional lock from Heap::protect, Heap::unprotect, and friends,
2707         since WebCore no longer uses it.
2708
2709         * JavaScriptCore.exp:
2710         * runtime/Collector.cpp:
2711         (JSC::Heap::protect):
2712         (JSC::Heap::unprotect):
2713         (JSC::Heap::markProtectedObjects):
2714         (JSC::Heap::protectedGlobalObjectCount):
2715         (JSC::Heap::protectedObjectCount):
2716         (JSC::Heap::protectedObjectTypeCounts):
2717         * runtime/Collector.h:
2718
2719 2009-10-07  Zoltan Horvath  <zoltan@webkit.org>
2720
2721         Reviewed by Darin Adler.
2722
2723         Allow custom memory allocation control for JavaScriptCore's IdentifierArena
2724         https://bugs.webkit.org/show_bug.cgi?id=30158
2725
2726         Inherits IdentifierArena class from FastAllocBase because it has been
2727         instantiated by 'new' in JavaScriptCore/parser/ParserArena.cpp:36.
2728
2729         * parser/ParserArena.h:
2730
2731 2009-10-07  Adam Roben  <aroben@apple.com>
2732
2733         Export DateInstance::info in a way that works on Windows
2734
2735         Fixes <http://webkit.org/b/30171>
2736         fast/dom/Window/window-postmessage-clone.html fails on Windows
2737
2738         Reviewed by Anders Carlsson.
2739
2740         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2741         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2742         Removed the export of DateInstance::info from here.
2743
2744         * runtime/DateInstance.h: Use JS_EXPORTDATA to export
2745         DateInstance::info, which is the required way of exporting data on
2746         Windows.
2747
2748 2009-10-07  Jørgen Lind  <jorgen.lind@nokia.com>
2749
2750         Reviewed by Simon Hausmann.
2751
2752         When enabling or disabling the JIT through .qmake.cache, make sure
2753         to also toggle ENABLE_YARR_JIT.
2754
2755         * JavaScriptCore.pri:
2756
2757 2009-10-06  Priit Laes  <plaes@plaes.org>
2758
2759         Reviewed by Gavin Barraclough.
2760
2761         Linking fails with "relocation R_X86_64_PC32 against symbol
2762         `cti_vm_throw'"
2763         https://bugs.webkit.org/show_bug.cgi?id=28422
2764
2765         * jit/JITStubs.cpp:
2766         Mark cti_vm_throw symbol as PLT-indirect symbol, so it doesn't end up
2767         in text segment causing relocation errors on amd64 architecture.
2768         Introduced new define SYMBOL_STRING_RELOCATION for such symbols.
2769
2770 2009-10-06  Oliver Hunt  <oliver@apple.com>
2771
2772         Windows linking fix
2773
2774         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2775         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2776
2777 2009-10-06  Oliver Hunt  <oliver@apple.com>
2778
2779         Reviewed by NOBODY (build fix).
2780
2781         Windows build fix.
2782
2783         * runtime/DateInstance.cpp:
2784
2785 2009-10-05  Oliver Hunt  <oliver@apple.com>
2786
2787         Reviewed by Gavin Barraclough.
2788
2789         It should be possible to post (clone) built-in JS objects to Workers
2790         https://bugs.webkit.org/show_bug.cgi?id=22878
2791
2792         Expose helpers to throw correct exceptions during object graph walk
2793         used for cloning and add a helper function to create Date instances
2794         without going through the JS Date constructor function.
2795
2796         * JavaScriptCore.exp:
2797         * JavaScriptCore.xcodeproj/project.pbxproj:
2798         * runtime/DateInstance.cpp:
2799         (JSC::DateInstance::DateInstance):
2800         * runtime/DateInstance.h:
2801         * runtime/ExceptionHelpers.cpp:
2802         (JSC::createTypeError):
2803         * runtime/ExceptionHelpers.h:
2804
2805 2009-10-06  David Levin  <levin@chromium.org>
2806
2807         Reviewed by Oliver Hunt.
2808
2809         StringImpl needs a method to get an instance for another thread which doesn't copy the underlying buffer.
2810         https://bugs.webkit.org/show_bug.cgi?id=30095
2811
2812         * wtf/CrossThreadRefCounted.h:
2813         Removed an unused function and assert improvement.
2814         (WTF::CrossThreadRefCounted::isOwnedByCurrentThread): Moved out common code from asserts.
2815         (WTF::CrossThreadRefCounted::ref): Changed assert to use the common method.
2816         (WTF::CrossThreadRefCounted::deref): Changed assert to use the common method.
2817         (WTF::CrossThreadRefCounted::crossThreadCopy): Since this includes a potentially
2818         non-threadsafe operation, add an assert that the class is owned by the current thread.
2819
2820 2009-10-05  Kevin Ollivier  <kevino@theolliviers.com>
2821
2822         wx build fix. Add Symbian files to the list of excludes.
2823
2824         * wscript:
2825
2826 2009-10-05  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2827
2828         Reviewed by Simon Hausmann.
2829
2830         [Qt] Remove precompiled header from JavaScriptCore compilation to
2831         prevent qmake warning during autonomous compilation.
2832         https://bugs.webkit.org/show_bug.cgi?id=30069
2833
2834         * JavaScriptCore.pro:
2835
2836 2009-10-02  Geoffrey Garen  <ggaren@apple.com>
2837
2838         Reviewed by Sam Weinig.
2839
2840         Removed the concept of a "fast access cutoff" in arrays, because it
2841         punished some patterns of array access too much, and made things too
2842         complex for inlining in some cases.
2843         
2844         1.3% speedup on SunSpider.
2845
2846         * jit/JITOpcodes.cpp:
2847         (JSC::JIT::emitSlow_op_get_by_val):
2848         (JSC::JIT::emitSlow_op_put_by_val):
2849         * jit/JITPropertyAccess.cpp:
2850         (JSC::JIT::emit_op_get_by_val):
2851         (JSC::JIT::emitSlow_op_get_by_val):
2852         (JSC::JIT::emit_op_put_by_val):
2853         (JSC::JIT::emitSlow_op_put_by_val):
2854         * jit/JITStubs.cpp:
2855         * jit/JITStubs.h:
2856         (JSC::): Check m_vectorLength instead of m_fastAccessCutoff when
2857         getting / putting from / to an array. Inline putting past the end of
2858         the array.
2859
2860         * runtime/JSArray.cpp:
2861         (JSC::JSArray::JSArray):
2862         (JSC::JSArray::getOwnPropertySlot):
2863         (JSC::JSArray::getOwnPropertyDescriptor):
2864         (JSC::JSArray::put):
2865         (JSC::JSArray::putSlowCase):
2866         (JSC::JSArray::deleteProperty):
2867         (JSC::JSArray::getOwnPropertyNames):
2868         (JSC::JSArray::increaseVectorLength):
2869         (JSC::JSArray::setLength):
2870         (JSC::JSArray::pop):
2871         (JSC::JSArray::push):
2872         (JSC::JSArray::sort):
2873         (JSC::JSArray::fillArgList):
2874         (JSC::JSArray::copyToRegisters):
2875         (JSC::JSArray::compactForSorting):
2876         (JSC::JSArray::checkConsistency):
2877         * runtime/JSArray.h:
2878         (JSC::JSArray::canGetIndex):
2879         (JSC::JSArray::canSetIndex):
2880         (JSC::JSArray::setIndex):
2881         (JSC::JSArray::markChildrenDirect): Removed m_fastAccessCutoff, and
2882         replaced with checks for JSValue() to detect reads and writes from / to
2883         uninitialized parts of the array.
2884
2885 2009-10-02  Jonni Rainisto  <jonni.rainisto@nokia.com>
2886
2887         Reviewed by Darin Adler.
2888
2889         Math.random() gives too low values on Win32 when _CRT_RAND_S is not defined
2890         https://bugs.webkit.org/show_bug.cgi?id=29956
2891
2892         * wtf/RandomNumber.cpp:
2893         (WTF::randomNumber): Added PLATFORM(WIN_OS) to handle 15bit rand()
2894
2895 2009-10-02  Geoffrey Garen  <ggaren@apple.com>
2896
2897         Reviewed by Sam Weinig.
2898
2899         Take one branch instead of two to test for JSValue().
2900         
2901         1.1% SunSpider speedup.
2902
2903         * jit/JITCall.cpp:
2904         (JSC::JIT::compileOpCall):
2905         * jit/JITOpcodes.cpp:
2906         (JSC::JIT::emit_op_to_jsnumber):
2907         (JSC::JIT::emit_op_create_arguments):
2908         * jit/JITPropertyAccess.cpp:
2909         (JSC::JIT::emitSlow_op_get_by_val):
2910         (JSC::JIT::emit_op_put_by_val): Test for the empty value tag, instead
2911         of testing for the cell tag with a 0 payload.
2912
2913         * runtime/JSValue.cpp:
2914         (JSC::JSValue::description): Added support for dumping the new empty value,
2915         and deleted values, in debug builds.
2916
2917         * runtime/JSValue.h:
2918         (JSC::JSValue::JSValue()): Construct JSValue() with the empty value tag.
2919
2920         (JSC::JSValue::JSValue(JSCell*)): Convert null pointer to the empty value
2921         tag, to avoid having two different c++ versions of null / empty.
2922
2923         (JSC::JSValue::operator bool): Test for the empty value tag, instead
2924         of testing for the cell tag with a 0 payload.
2925
2926 2009-10-02  Steve Falkenburg  <sfalken@apple.com>
2927
2928         Reviewed by Mark Rowe.
2929
2930         <https://bugs.webkit.org/show_bug.cgi?id=29989>
2931         Safari version number shouldn't be exposed in WebKit code
2932         
2933         For a WebKit version of 532.3.4:
2934         Product version is: 5.32.3.4 (was 4.0.3.0)
2935         File version is: 5.32.3.4 (was 4.532.3.4)
2936
2937         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc:
2938
2939 2009-10-02  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2940
2941         Rubber-stamped by Simon Hausmann.
2942
2943         Fix the Qt on Mac OS X build.
2944
2945         * wtf/FastMalloc.cpp:
2946
2947 2009-10-02  Jørgen Lind  <jorgen.lind@nokia.com>
2948
2949         Reviewed by Simon Hausmann.
2950
2951         Allow enabling and disabling of the JIT through a qmake variable.
2952
2953         Qt's configure may set this variable through .qmake.cache if a
2954         commandline option is given and/or the compile test for hwcap.h
2955         failed/succeeded.
2956
2957         * JavaScriptCore.pri:
2958
2959 2009-10-01  Mark Rowe  <mrowe@apple.com>
2960
2961         Fix the Tiger build.  Don't unconditionally enable 3D canvas as it is not supported on Tiger.
2962
2963         * Configurations/FeatureDefines.xcconfig:
2964
2965 2009-10-01  Yongjun Zhang  <yongjun.zhang@nokia.com>
2966
2967         Reviewed by Darin Adler.
2968
2969         https://bugs.webkit.org/show_bug.cgi?id=29187
2970
2971         Don't inline ~ListRefPtr() to work around winscw compiler forward declaration
2972         bug regarding templated classes.
2973
2974         The compiler bug is reported at:
2975         https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812
2976
2977         The change will be reverted when the above bug is fixed in winscw compiler.
2978
2979         * wtf/ListRefPtr.h:
2980         (WTF::::~ListRefPtr):
2981
2982 2009-10-01  Zoltan Horvath  <zoltan@webkit.org>
2983
2984         Reviewed by Simon Hausmann.
2985
2986         [Qt] Allow custom memory allocation control for the whole JavaScriptCore
2987         https://bugs.webkit.org/show_bug.cgi?id=27029
2988
2989         Since in JavaScriptCore almost every class which has been instantiated by operator new is
2990         inherited from FastAllocBase (bug #20422), we disable customizing global operator new for the Qt-port
2991         when USE_SYSTEM_MALLOC=0.
2992
2993         Add #include <unistd.h> to FastMalloc.cpp because it's used by TCMalloc_PageHeap::scavengerThread().
2994         (It's needed for the functionality of TCmalloc.)
2995
2996         Add TCSystemAlloc.cpp to JavaScriptCore.pri if USE_SYSTEM_MALLOC is disabled.
2997
2998         * JavaScriptCore.pri:
2999         * wtf/FastMalloc.cpp:
3000         (WTF::sleep):
3001         * wtf/FastMalloc.h:
3002
3003 2009-09-30  Gabor Loki  <loki@inf.u-szeged.hu>
3004
3005         Reviewed by George Staikos.
3006
3007         Defines two pseudo-platforms for ARM and Thumb-2 instruction set.
3008         https://bugs.webkit.org/show_bug.cgi?id=29122
3009
3010         Introduces WTF_PLATFORM_ARM_TRADITIONAL and WTF_PLATFORM_ARM_THUMB2
3011         macros on ARM platforms. The PLATFORM(ARM_THUMB2) should be used
3012         when Thumb-2 instruction set is the required target. The
3013         PLATFORM(ARM_TRADITIONAL) is for generic ARM instruction set. In
3014         case where the code is common the PLATFORM(ARM) have to be used.
3015
3016         Modified by George Wright  <gwright@rim.com> to correctly work
3017         with the RVCT-defined __TARGET_ARCH_ARM and __TARGET_ARCH_THUMB
3018         compiler macros, as well as adding readability changes.
3019
3020         * wtf/Platform.h:
3021
3022 2009-09-30  Oliver Hunt  <oliver@apple.com>
3023
3024         Reviewed by Geoff Garen.
3025
3026         Devirtualise array toString conversion
3027
3028         Tweak the implementation of Array.prototype.toString to have a fast path
3029         when acting on a true JSArray.
3030
3031         * runtime/ArrayPrototype.cpp:
3032         (JSC::arrayProtoFuncToString):
3033
3034 2009-09-30  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
3035
3036         Reviewed by Geoffrey Garen.
3037
3038         Buildfix for platforms using JSVALUE32.
3039         https://bugs.webkit.org/show_bug.cgi?id=29915
3040
3041         After http://trac.webkit.org/changeset/48905 the build broke in JSVALUE32 case.
3042         Also removed unreachable code.
3043
3044         * jit/JITArithmetic.cpp:
3045         (JSC::JIT::emit_op_add):
3046          - Declaration of "OperandTypes types" moved before first use.
3047          - Typos fixed: dst modified to result, regT2 added.
3048          - Unreachable code removed.
3049         (JSC::JIT::emitSlow_op_add):
3050          - Missing declaration of "OperandTypes types" added.
3051
3052 2009-09-30  Janne Koskinen  <janne.p.koskinen@digia.com> 
3053
3054         Reviewed by Simon Hausmann.
3055
3056         Reduce heap size on Symbian from 64MB to 8MB.
3057
3058         This is not a perfect fix, it requires more fine tuning.
3059         But this makes it possible again to debug in the emulator,
3060         which is more important in order to be able to fix other
3061         run-time issues.
3062
3063         * runtime/Collector.h:
3064
3065 2009-09-30  Janne Koskinen  <janne.p.koskinen@digia.com> 
3066
3067         Reviewed by Simon Hausmann.
3068
3069         Fix CRASH() macro for Symbian build.
3070
3071         * wtf/Assertions.h: Added missing }
3072
3073 2009-09-29  Geoffrey Garen  <ggaren@apple.com>
3074
3075         Reviewed by Gavin Barraclough.
3076
3077         Inlined a few math operations.
3078         
3079         ~1% SunSpider speedup.
3080
3081         * jit/JIT.h:
3082         * jit/JITArithmetic.cpp:
3083         (JSC::JIT::compileBinaryArithOpSlowCase):
3084         (JSC::JIT::emitSlow_op_add):
3085         (JSC::JIT::emitSlow_op_mul):
3086         (JSC::JIT::emit_op_sub):
3087         (JSC::JIT::emitSlow_op_sub): Don't take a stub call when operating on
3088         a constant int and a double.
3089
3090 2009-09-28  Oliver Hunt  <oliver@apple.com>
3091
3092         Reviewed by Gavin Barraclough.
3093
3094         Tidy up codeblock sampler
3095         https://bugs.webkit.org/show_bug.cgi?id=29836
3096
3097         Some rather simple refactoring of codeblock sampler so that
3098         it's easier for us to use it to find problems in non-jsc
3099         environments
3100
3101         * JavaScriptCore.exp:
3102         * bytecode/SamplingTool.h:
3103         * debugger/Debugger.cpp:
3104         (JSC::evaluateInGlobalCallFrame):
3105         * debugger/DebuggerCallFrame.cpp:
3106         (JSC::DebuggerCallFrame::evaluate):
3107         * interpreter/Interpreter.cpp:
3108         (JSC::Interpreter::Interpreter):
3109         (JSC::Interpreter::execute):
3110         (JSC::Interpreter::privateExecute):
3111         (JSC::Interpreter::enableSampler):
3112         (JSC::Interpreter::dumpSampleData):
3113         (JSC::Interpreter::startSampling):
3114         (JSC::Interpreter::stopSampling):
3115         * interpreter/Interpreter.h:
3116         (JSC::Interpreter::sampler):
3117         * jit/JIT.h:
3118         * jsc.cpp:
3119         (runWithScripts):
3120         * runtime/Completion.cpp:
3121         (JSC::checkSyntax):
3122         (JSC::evaluate):
3123         * runtime/Executable.h:
3124         (JSC::EvalExecutable::EvalExecutable):
3125         (JSC::ProgramExecutable::create):
3126         (JSC::ProgramExecutable::ProgramExecutable):
3127         * runtime/JSGlobalData.cpp:
3128         (JSC::JSGlobalData::startSampling):
3129         (JSC::JSGlobalData::stopSampling):
3130         (JSC::JSGlobalData::dumpSampleData):
3131         * runtime/JSGlobalData.h:
3132         * runtime/JSGlobalObjectFunctions.cpp:
3133         (JSC::globalFuncEval):
3134
3135 2009-09-29  Jeremy Orlow  <jorlow@chromium.org>
3136
3137         Reviewed by Dimitri Glazkov.
3138
3139         Add GYP generated files to svn:ignore
3140         https://bugs.webkit.org/show_bug.cgi?id=29895
3141
3142         The following files are generated by JavaScriptCore's GYP file and should be ignored:
3143
3144         pcre.mk
3145         wtf.scons
3146         wtf.mk
3147         SConstruct
3148         wtf_config.scons
3149         wtf_config.mk
3150         pcre.scons
3151
3152         * JavaScriptCore.gyp: Changed property svn:ignore.
3153
3154 2009-09-29  Geoffrey Garen  <ggaren@apple.com>
3155
3156         Reviewed by Sam Weinig.
3157
3158         Standardized an optimization for adding non-numbers.
3159         
3160         SunSpider says maybe a tiny speedup.
3161
3162         * jit/JITArithmetic.cpp:
3163         (JSC::JIT::emit_op_add):
3164         (JSC::JIT::emitSlow_op_add):
3165
3166 2009-09-29  Geoffrey Garen  <ggaren@apple.com>
3167
3168         Windows build fix: export a new symbol.
3169
3170         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3171         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3172
3173 2009-09-28  Geoffrey Garen  <ggaren@apple.com>
3174
3175         Reviewed by Sam Weinig.
3176
3177         Removed virtual destructor from JSGlobalObjectData to eliminate pointer
3178         fix-ups when accessing JSGlobalObject::d.
3179         
3180         Replaced with an explicit destructor function pointer.
3181         
3182         6% speedup on bench-alloc-nonretained.js.
3183
3184         * JavaScriptCore.exp:
3185         * runtime/JSGlobalObject.cpp:
3186         (JSC::JSGlobalObject::~JSGlobalObject):
3187         (JSC::JSGlobalObject::destroyJSGlobalObjectData):
3188         * runtime/JSGlobalObject.h:
3189         (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
3190         (JSC::JSGlobalObject::JSGlobalObject):
3191
3192 2009-09-29  Janne Koskinen  <janne.p.koskinen@digia.com>
3193
3194         Reviewed by David Kilzer.
3195
3196         [Qt] Assert messages prints visible in Symbian
3197         https://bugs.webkit.org/show_bug.cgi?id=29808
3198
3199         Asserts use vprintf to print the messages to stderr.
3200         In Symbian Open C it is not possible to see stderr so
3201         I routed the messages to stdout instead.
3202
3203         * wtf/Assertions.cpp:
3204
3205 2009-09-29  Janne Koskinen  <janne.p.koskinen@digia.com>
3206
3207         Reviewed by Darin Adler.
3208
3209         [Qt] Symbian CRASH macro implementation
3210
3211         Added Symbian specific crash macro that
3212         stops to crash line if JIT debugging is used.
3213         Additional differentiation of access violation
3214         (KERN-EXEC 3) and CRASH panic.
3215
3216         * wtf/Assertions.h:
3217
3218 2009-09-28  Mark Rowe  <mrowe@apple.com>
3219
3220         Fix the PowerPC build.
3221
3222         * JavaScriptCore.exp:
3223
3224 2009-09-28  Mark Rowe  <mrowe@apple.com>
3225
3226         Reviewed by Gavin Barraclough.
3227
3228         <rdar://problem/7195704> JavaScriptCore fails to mark registers when built for x86_64 using LLVM GCC.
3229
3230         * runtime/Collector.cpp:
3231         (JSC::Heap::markCurrentThreadConservatively): Force jmp_buf to use the appropriate alignment for a pointer
3232         to ensure that we correctly interpret the contents of registers during marking.
3233
3234 2009-09-28  Geoffrey Garen  <ggaren@apple.com>
3235
3236         Windows build fix: added new exports.
3237
3238         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3239         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3240
3241 2009-09-28  Geoffrey Garen  <ggaren@apple.com>
3242
3243         Windows build fix: removed exports that no longer exist.
3244
3245         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3246         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3247
3248 2009-09-28  Geoffrey Garen  <ggaren@apple.com>
3249
3250         Reviewed by Darin Adler.
3251
3252         NotNullPassRefPtr: smart pointer optimized for passing references that are not null
3253         https://bugs.webkit.org/show_bug.cgi?id=29822
3254         
3255         Added NotNullPassRefPtr, and deployed it in all places that initialize
3256         JavaScript objects.
3257         
3258         2.2% speedup on bench-allocate-nonretained.js.
3259
3260         * API/JSCallbackConstructor.cpp:
3261         (JSC::JSCallbackConstructor::JSCallbackConstructor):
3262         * API/JSCallbackConstructor.h:
3263         * API/JSCallbackObject.h:
3264         * API/JSCallbackObjectFunctions.h:
3265         (JSC::JSCallbackObject::JSCallbackObject):
3266         * JavaScriptCore.exp:
3267         * bytecode/CodeBlock.h:
3268         (JSC::CodeBlock::addFunctionDecl):
3269         (JSC::CodeBlock::addFunctionExpr):
3270         * runtime/ArrayConstructor.cpp:
3271         (JSC::ArrayConstructor::ArrayConstructor):
3272         * runtime/ArrayConstructor.h:
3273         * runtime/ArrayPrototype.cpp:
3274         (JSC::ArrayPrototype::ArrayPrototype):
3275         * runtime/ArrayPrototype.h:
3276         * runtime/BooleanConstructor.cpp:
3277         (JSC::BooleanConstructor::BooleanConstructor):
3278         * runtime/BooleanConstructor.h:
3279         * runtime/BooleanObject.cpp:
3280         (JSC::BooleanObject::BooleanObject):
3281         * runtime/BooleanObject.h:
3282         * runtime/BooleanPrototype.cpp:
3283         (JSC::BooleanPrototype::BooleanPrototype):
3284         * runtime/BooleanPrototype.h:
3285         * runtime/DateConstructor.cpp:
3286         (JSC::DateConstructor::DateConstructor):
3287         * runtime/DateConstructor.h:
3288         * runtime/DateInstance.cpp:
3289         (JSC::DateInstance::DateInstance):
3290         * runtime/DateInstance.h:
3291         * runtime/DatePrototype.cpp:
3292         (JSC::DatePrototype::DatePrototype):
3293         * runtime/DatePrototype.h:
3294         * runtime/ErrorConstructor.cpp:
3295         (JSC::ErrorConstructor::ErrorConstructor):
3296         * runtime/ErrorConstructor.h:
3297         * runtime/ErrorInstance.cpp:
3298         (JSC::ErrorInstance::ErrorInstance):
3299         * runtime/ErrorInstance.h:
3300         * runtime/ErrorPrototype.cpp:
3301         (JSC::ErrorPrototype::ErrorPrototype):
3302         * runtime/ErrorPrototype.h:
3303         * runtime/FunctionConstructor.cpp:
3304         (JSC::FunctionConstructor::FunctionConstructor):
3305         * runtime/FunctionConstructor.h:
3306         * runtime/FunctionPrototype.cpp:
3307         (JSC::FunctionPrototype::FunctionPrototype):
3308         * runtime/FunctionPrototype.h:
3309         * runtime/GlobalEvalFunction.cpp:
3310         (JSC::GlobalEvalFunction::GlobalEvalFunction):
3311         * runtime/GlobalEvalFunction.h:
3312         * runtime/InternalFunction.cpp:
3313         (JSC::InternalFunction::InternalFunction):
3314         * runtime/InternalFunction.h:
3315         (JSC::InternalFunction::InternalFunction):
3316         * runtime/JSActivation.cpp:
3317         (JSC::JSActivation::JSActivation):
3318         * runtime/JSActivation.h:
3319         (JSC::JSActivation::JSActivationData::JSActivationData):
3320         * runtime/JSArray.cpp:
3321         (JSC::JSArray::JSArray):
3322         * runtime/JSArray.h:
3323         * runtime/JSByteArray.cpp:
3324         (JSC::JSByteArray::JSByteArray):
3325         * runtime/JSByteArray.h:
3326         * runtime/JSFunction.cpp:
3327         (JSC::JSFunction::JSFunction):
3328         * runtime/JSFunction.h:
3329         * runtime/JSGlobalObject.h:
3330         (JSC::JSGlobalObject::JSGlobalObject):
3331         * runtime/JSONObject.h:
3332         (JSC::JSONObject::JSONObject):
3333         * runtime/JSObject.h:
3334         (JSC::JSObject::JSObject):
3335         (JSC::JSObject::setStructure):
3336         * runtime/JSVariableObject.h:
3337         (JSC::JSVariableObject::JSVariableObject):
3338         * runtime/JSWrapperObject.h:
3339         (JSC::JSWrapperObject::JSWrapperObject):
3340         * runtime/MathObject.cpp:
3341         (JSC::MathObject::MathObject):
3342         * runtime/MathObject.h:
3343         * runtime/NativeErrorConstructor.cpp:
3344         (JSC::NativeErrorConstructor::NativeErrorConstructor):
3345         * runtime/NativeErrorConstructor.h:
3346         * runtime/NativeErrorPrototype.cpp:
3347         (JSC::NativeErrorPrototype::NativeErrorPrototype):
3348         * runtime/NativeErrorPrototype.h:
3349         * runtime/NumberConstructor.cpp:
3350         (JSC::NumberConstructor::NumberConstructor):
3351         * runtime/NumberConstructor.h:
3352         * runtime/NumberObject.cpp:
3353         (JSC::NumberObject::NumberObject):
3354         * runtime/NumberObject.h:
3355         * runtime/NumberPrototype.cpp:
3356         (JSC::NumberPrototype::NumberPrototype):
3357         * runtime/NumberPrototype.h:
3358         * runtime/ObjectConstructor.cpp:
3359         (JSC::ObjectConstructor::ObjectConstructor):
3360         * runtime/ObjectConstructor.h:
3361         * runtime/ObjectPrototype.cpp:
3362         (JSC::ObjectPrototype::ObjectPrototype):
3363         * runtime/ObjectPrototype.h:
3364         * runtime/PropertyNameArray.h:
3365         (JSC::PropertyNameArrayData::setCachedPrototypeChain):
3366         * runtime/PrototypeFunction.cpp:
3367         (JSC::PrototypeFunction::PrototypeFunction):
3368         * runtime/PrototypeFunction.h:
3369         * runtime/RegExpConstructor.cpp:
3370         (JSC::RegExpConstructor::RegExpConstructor):
3371         * runtime/RegExpConstructor.h:
3372         * runtime/RegExpObject.cpp:
3373         (JSC::RegExpObject::RegExpObject):
3374         * runtime/RegExpObject.h:
3375         (JSC::RegExpObject::RegExpObjectData::RegExpObjectData):
3376         * runtime/RegExpPrototype.cpp:
3377         (JSC::RegExpPrototype::RegExpPrototype):
3378         * runtime/RegExpPrototype.h:
3379         * runtime/StringConstructor.cpp:
3380         (JSC::StringConstructor::StringConstructor):
3381         * runtime/StringConstructor.h:
3382         * runtime/StringObject.cpp:
3383         (JSC::StringObject::StringObject):
3384         * runtime/StringObject.h:
3385         * runtime/StringObjectThatMasqueradesAsUndefined.h:
3386         (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
3387         * runtime/StringPrototype.cpp:
3388         (JSC::StringPrototype::StringPrototype):
3389         * runtime/StringPrototype.h:
3390         * wtf/PassRefPtr.h:
3391         (WTF::NotNullPassRefPtr::NotNullPassRefPtr):
3392         (WTF::NotNullPassRefPtr::~NotNullPassRefPtr):
3393         (WTF::NotNullPassRefPtr::get):
3394         (WTF::NotNullPassRefPtr::clear):
3395         (WTF::NotNullPassRefPtr::releaseRef):
3396         (WTF::NotNullPassRefPtr::operator*):
3397         (WTF::NotNullPassRefPtr::operator->):
3398         (WTF::NotNullPassRefPtr::operator!):
3399         (WTF::NotNullPassRefPtr::operator UnspecifiedBoolType):
3400         * wtf/RefPtr.h:
3401         (WTF::RefPtr::RefPtr):
3402         (WTF::operator==):
3403
3404 2009-09-28  Oliver Hunt  <oliver@apple.com>
3405
3406         Reviewed by Geoff Garen.
3407
3408         Hard dependency on SSE2 instruction set with JIT
3409         https://bugs.webkit.org/show_bug.cgi?id=29779
3410
3411         Add floating point support checks to op_jfalse and op_jtrue, and
3412         fix the logic for the slow case of op_add
3413
3414         * jit/JITArithmetic.cpp:
3415         (JSC::JIT::emitSlow_op_add):
3416         * jit/JITOpcodes.cpp:
3417         (JSC::JIT::emit_op_jfalse):
3418         (JSC::JIT::emit_op_jtrue):
3419
3420 2009-09-28  Yaar Schnitman  <yaar@chromium.org>
3421
3422         Reviewed by Dimitri Glazkov.
3423
3424         Chromium port - recognize we are being built independently
3425         of chromium and look for dependencies under webkit/chromium rather
3426         than chromium/src.
3427
3428         https://bugs.webkit.org/show_bug.cgi?id=29722
3429
3430         * JavaScriptCore.gyp/JavaScriptCore.gyp:
3431
3432 2009-09-28  Jakub Wieczorek  <faw217@gmail.com>
3433
3434         Reviewed by Simon Hausmann.
3435
3436         [Qt] Implement XSLT support with QtXmlPatterns.
3437         https://bugs.webkit.org/show_bug.cgi?id=28303
3438
3439         * wtf/Platform.h: Add a WTF_USE_QXMLQUERY #define.
3440
3441 2009-09-28  Gabor Loki  <loki@inf.u-szeged.hu>
3442
3443         Reviewed by Simon Hausmann.
3444
3445         Remove __clear_cache which is an internal function of GCC
3446         https://bugs.webkit.org/show_bug.cgi?id=28886
3447
3448         Although __clear_cache is exported from GCC, this is an internal
3449         function. GCC makes no promises about it.
3450
3451         * jit/ExecutableAllocator.h:
3452         (JSC::ExecutableAllocator::cacheFlush):
3453
3454 2009-09-28  Sam Weinig  <sam@webkit.org>
3455
3456         Reviewed by Oliver Hunt.
3457
3458         Fix an absolute path to somewhere in Oliver's machine to a relative path
3459         for derived JSONObject.lut.h.
3460
3461         * JavaScriptCore.xcodeproj/project.pbxproj:
3462
3463 2009-09-28  Joerg Bornemann  <joerg.bornemann@nokia.com>
3464
3465         Reviewed by Simon Hausmann.
3466
3467         Add ARM version detection for Windows CE.
3468
3469         * wtf/Platform.h:
3470
3471 2009-09-26  Yongjun Zhang  <yongjun.zhang@nokia.com>
3472
3473         Reviewed by Simon Hausmann.
3474
3475         Add MarkStackSymbian.cpp to build JavascriptCore for Symbian.
3476
3477         Re-use Windows shrinkAllocation implementation because Symbian doesn't
3478         support releasing part of memory region.
3479         
3480         Use fastMalloc and fastFree to implement allocateStack and releaseStack
3481         for Symbian port.
3482
3483         * JavaScriptCore.pri:
3484         * runtime/MarkStack.h:
3485         (JSC::MarkStack::MarkStackArray::shrinkAllocation):
3486         * runtime/MarkStackSymbian.cpp: Added.
3487         (JSC::MarkStack::initializePagesize):
3488         (JSC::MarkStack::allocateStack):
3489         (JSC::MarkStack::releaseStack):
3490
3491 2009-09-25  Gabor Loki  <loki@inf.u-szeged.hu>
3492
3493         Reviewed by Gavin Barraclough.
3494
3495         Fix unaligned data access in YARR_JIT on ARMv5 and below.
3496         https://bugs.webkit.org/show_bug.cgi?id=29695
3497
3498         On ARMv5 and below all data access should be naturally aligned.
3499         In the YARR_JIT there is a case when character pairs are
3500         loaded from the input string, but this data access is not
3501         naturally aligned. This fix introduces load32WithUnalignedHalfWords
3502         and branch32WithUnalignedHalfWords functions which contain
3503         naturally aligned memory loads - half word loads - on ARMv5 and below.
3504
3505         * assembler/MacroAssemblerARM.cpp:
3506         (JSC::MacroAssemblerARM::load32WithUnalignedHalfWords):
3507         * assembler/MacroAssemblerARM.h:
3508         (JSC::MacroAssemblerARM::load32WithUnalignedHalfWords):
3509         (JSC::MacroAssemblerARM::branch32WithUnalignedHalfWords):
3510         * assembler/MacroAssemblerARMv7.h:
3511         (JSC::MacroAssemblerARMv7::load32WithUnalignedHalfWords):
3512         (JSC::MacroAssemblerARMv7::branch32):
3513         (JSC::MacroAssemblerARMv7::branch32WithUnalignedHalfWords):
3514         * assembler/MacroAssemblerX86Common.h:
3515         (JSC::MacroAssemblerX86Common::load32WithUnalignedHalfWords):
3516         (JSC::MacroAssemblerX86Common::branch32WithUnalignedHalfWords):
3517         * wtf/Platform.h:
3518         * yarr/RegexJIT.cpp:
3519         (JSC::Yarr::RegexGenerator::generatePatternCharacterPair):
3520
3521 2009-09-25  Jeremy Orlow  <jorlow@chromium.org>
3522
3523         This is breaking Chromium try bots, so I'm counting this as a build fix.
3524
3525         Add more svn:ignore exceptions.  On different platforms, these files are
3526         generated with different case for JavaScriptCore.  Also there are some
3527         wtf project files that get built apparently.
3528
3529         * JavaScriptCore.gyp: Changed property svn:ignore.
3530
3531 2009-09-25  Ada Chan  <adachan@apple.com>
3532
3533         Build fix.
3534
3535         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3536         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
3537
3538 2009-09-25  Geoffrey Garen  <ggaren@apple.com>
3539
3540         Reviewed by Darin Adler.
3541
3542         Inlined some object creation code, including lexicalGlobalObject access
3543         https://bugs.webkit.org/show_bug.cgi?id=29750
3544         
3545         SunSpider says 0.5% faster.
3546         
3547         0.8% speedup on bench-alloc-nonretained.js.
3548         2.5% speedup on v8-splay.js.
3549
3550         * interpreter/CachedCall.h:
3551         (JSC::CachedCall::CachedCall):
3552         * interpreter/CallFrame.h:
3553         (JSC::ExecState::lexicalGlobalObject):
3554         (JSC::ExecState::globalThisValue):
3555         * interpreter/Interpreter.cpp:
3556         (JSC::Interpreter::dumpRegisters):
3557         (JSC::Interpreter::execute):
3558         (JSC::Interpreter::privateExecute):
3559         * jit/JITStubs.cpp:
3560         (JSC::DEFINE_STUB_FUNCTION):
3561         * runtime/FunctionConstructor.cpp:
3562         (JSC::constructFunction):
3563         * runtime/ScopeChain.cpp:
3564         (JSC::ScopeChainNode::print):
3565         * runtime/ScopeChain.h:
3566         (JSC::ScopeChainNode::ScopeChainNode):
3567         (JSC::ScopeChainNode::~ScopeChainNode):
3568         (JSC::ScopeChainNode::push):
3569         (JSC::ScopeChain::ScopeChain):
3570         (JSC::ScopeChain::globalObject): Added a globalObject data member to ScopeChainNode.
3571         Replaced accessor function for globalObject() with data member. Replaced
3572         globalThisObject() accessor with direct access to globalThis, to match.
3573
3574         * runtime/JSGlobalObject.cpp:
3575         (JSC::JSGlobalObject::init):
3576         * runtime/JSGlobalObject.h: Inlined array and object construction.
3577
3578 2009-09-25  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3579
3580         Reviewed by Gavin Barraclough.
3581
3582         Add ARM version detection rules for Symbian
3583         https://bugs.webkit.org/show_bug.cgi?id=29715
3584
3585         * wtf/Platform.h:
3586
3587 2009-09-24  Xan Lopez  <xlopez@igalia.com>
3588
3589         Reviewed by Mark "Do It!" Rowe.
3590
3591         Some GCC versions don't like C++-style comments in preprocessor
3592         directives, change to C-style to shut them up.
3593
3594         * wtf/Platform.h:
3595
3596 2009-09-24  Oliver Hunt  <oliver@apple.com>
3597