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