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