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