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