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