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