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