• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
12010-02-12  Janne Koskinen  <janne.p.koskinen@digia.com>
2
3        Reviewed by Tor Arne Vestbø.
4
5        Additional refptr/passrefptr workarounds for WINSCW compiler
6        https://bugs.webkit.org/show_bug.cgi?id=28054
7
8        * wtf/PassRefPtr.h:
9        (WTF::refIfNotNull):
10        (WTF::PassRefPtr::PassRefPtr):
11        (WTF::PassRefPtr::~PassRefPtr):
12        (WTF::PassRefPtr::clear):
13        (WTF::::operator):
14        * wtf/RefPtr.h:
15        (WTF::RefPtr::RefPtr):
16        (WTF::::operator):
17
182010-02-12  Janne Koskinen  <janne.p.koskinen@digia.com>
19
20        Reviewed by Simon Hausmann.
21
22        Don't import the cmath functions from std:: for WINSCW.
23
24        * wtf/MathExtras.h:
25
262010-02-12  Kwang Yul Seo  <skyul@company100.net>
27
28        Reviewed by Adam Barth.
29
30        Typedef both JSChar and UChar to wchar_t in RVCT.
31        https://bugs.webkit.org/show_bug.cgi?id=34560
32
33        Define both JSChar and UChar to wchar_t as the size
34        of wchar_t is 2 bytes in RVCT.
35
36        * API/JSStringRef.h:
37        * wtf/unicode/qt4/UnicodeQt4.h:
38
392010-02-11  Geoffrey Garen  <ggaren@apple.com>
40
41        Reviewed by Oliver Hunt and Darin Adler.
42
43        The rest of the fix for
44        https://bugs.webkit.org/show_bug.cgi?id=34864 | <rdar://problem/7594198>
45        Many objects left uncollected after visiting mail.google.com and closing
46        window
47
48        Don't unconditionally hang onto small strings. Instead, hang onto all
49        small strings as long as any small string is still referenced.
50
51        SunSpider reports no change.
52
53        * runtime/Collector.cpp:
54        (JSC::Heap::markRoots): Mark the small strings cache last, so it can
55        check if anything else has kept any strings alive.
56
57        * runtime/SmallStrings.cpp:
58        (JSC::isMarked):
59        (JSC::SmallStrings::markChildren): Only keep our strings alive if some
60        other reference to at least one of them exists, too.
61
622010-02-11  Geoffrey Garen  <ggaren@apple.com>
63
64        Reviewed by Gavin Barraclough.
65
66        Some progress toward fixing
67        https://bugs.webkit.org/show_bug.cgi?id=34864 | <rdar://problem/7594198>
68        Many objects left uncollected after visiting mail.google.com and closing
69        window
70
71        SunSpider reports no change.
72
73        Keep weak references, rather than protected references, to cached for-in
74        property name enumerators.
75
76        One problem with protected references is that a chain like
77            [ gc object 1 ] => [ non-gc object ] => [ gc object 2 ]
78        takes two GC passes to break, since the first pass collects [ gc object 1 ],
79        releasing [ non-gc object ] and unprotecting [ gc object 2 ], and only
80        then can a second pass collect [ gc object 2 ].
81
82        Another problem with protected references is that they can keep a bunch
83        of strings alive long after they're useful. In SunSpider and a few popular
84        websites, the size-speed tradeoff seems to favor weak references.
85
86        * runtime/JSPropertyNameIterator.cpp:
87        (JSC::JSPropertyNameIterator::JSPropertyNameIterator): Moved this constructor
88        into the .cpp file, since it's not used elsewhere.
89
90        (JSC::JSPropertyNameIterator::~JSPropertyNameIterator): Added a destructor
91        to support our weak reference.
92
93        * runtime/JSPropertyNameIterator.h:
94        (JSC::Structure::setEnumerationCache):
95        (JSC::Structure::clearEnumerationCache):
96        (JSC::Structure::enumerationCache): Added a function for clearing a
97        Structure's enumeration cache, used by our new destructor. Also fixed
98        indentation to match the rest of the file.
99
100        * runtime/Structure.h: Changed from protected pointer to weak pointer.
101
1022010-02-11  Chris Rogers  <crogers@google.com>
103
104        Reviewed by David Levin.
105
106        audio engine: add Complex number class
107        https://bugs.webkit.org/show_bug.cgi?id=34538
108
109        * wtf/Complex.h: Added.
110        (WebCore::complexFromMagnitudePhase):
111
1122010-02-10  Geoffrey Garen  <ggaren@apple.com>
113
114        Reviewed by Oliver Hunt.
115
116        Added an SPI for asking about all the different live objects on the heap.
117        Useful for memory debugging.
118
119        * JavaScriptCore.exp: Export the new SPI.
120
121        * runtime/Collector.cpp:
122        (JSC::typeName): Use a little capitalization. Don't crash in the case of
123        a non-object cell, since it might just be an uninitialized cell.
124
125        (JSC::Heap::objectTypeCounts): The new SPI.
126
127        * runtime/Collector.h:
128        * runtime/CollectorHeapIterator.h:
129        (JSC::CollectorHeapIterator::advance):
130        (JSC::LiveObjectIterator::operator++):
131        (JSC::DeadObjectIterator::operator++):
132        (JSC::ObjectIterator::operator++): Made 2 tweaks to these iterators:
133        (1) Skip the last cell in the block, since it's a dummy sentinel, and
134        we don't want it to confuse the object count; (2) Fixed a logic error
135        in LiveObjectIterator that could cause it to iterate dead objects if
136        m_block were equal to m_heap.nextBlock and m_cell were less than
137        m_heap.nextCell. No test for this since I can't think of a way that this
138        could make WebKit behave badly.
139
1402010-02-11  Steve Block  <steveblock@google.com>
141
142        Reviewed by Darin Adler.
143
144        Guard cmath using declarations in MathExtras.h on Android
145        https://bugs.webkit.org/show_bug.cgi?id=34840
146
147        Android does not provide these functions.
148
149        * wtf/MathExtras.h:
150
1512010-02-08  Maciej Stachowiak  <mjs@apple.com>
152
153        Reviewed by Cameron Zwarich.
154
155        Restore ENABLE_RUBY flag so vendors can ship with Ruby disabled if they choose.
156        https://bugs.webkit.org/show_bug.cgi?id=34698
157
158        * Configurations/FeatureDefines.xcconfig:
159
1602010-02-10  Kevin Watters  <kevinwatters@gmail.com>
161
162        Reviewed by Kevin Ollivier.
163
164        [wx] Add Windows complex text support and Mac support for containsCharacters.
165
166        https://bugs.webkit.org/show_bug.cgi?id=34759
167
168        * wscript:
169
1702010-02-10  Alexey Proskuryakov  <ap@apple.com>
171
172        Addressing issues found by style bot.
173
174        * wtf/ValueCheck.h: Renamed header guard to match final file name.
175
176        * wtf/Vector.h: (WTF::::checkConsistency): Remove braces around a one-line clause.
177
1782010-02-09  Alexey Proskuryakov  <ap@apple.com>
179
180        Reviewed by Geoffrey Garen.
181
182        https://bugs.webkit.org/show_bug.cgi?id=34490
183        WebCore::ImageEventSender::dispatchPendingEvents() crashes in certain conditions
184
185        * GNUmakefile.am:
186        * JavaScriptCore.gypi:
187        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
188        * JavaScriptCore.xcodeproj/project.pbxproj:
189        Added ValueCheck.h.
190
191        * wtf/ValueCheck.h: Added. Moved code out of HashTraits, since it would be awkward to
192        include that from Vector.h.
193        (WTF::ValueCheck::checkConsistency): Allow null pointers, those are pretty consistent.
194
195        * wtf/HashTraits.h: Moved value checking code out of here.
196
197        * wtf/HashTable.h: (WTF::::checkTableConsistencyExceptSize): Updated for the above changes.
198
199        * wtf/Vector.h:
200        (WTF::::checkConsistency): Check all vector elements.
201        (WTF::ValueCheck): Support checking a Vector as an element in other containers. Currently
202        unused.
203
2042010-02-10  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
205
206        Reviewed by Simon Hausmann.
207
208        Fix QScriptValue::toBool.
209
210        Fix ECMA compliance in the QScriptValue for values like 0, NaN and
211        empty strings.
212
213        [Qt] QScriptValue::toBool problem
214        https://bugs.webkit.org/show_bug.cgi?id=34793
215
216        * qt/api/qscriptvalue_p.h:
217        (QScriptValuePrivate::toBool):
218        * qt/tests/qscriptvalue/tst_qscriptvalue.h:
219        * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp:
220        (tst_QScriptValue::toBool_initData):
221        (tst_QScriptValue::toBool_makeData):
222        (tst_QScriptValue::toBool_test):
223        (tst_QScriptValue::toBoolean_initData):
224        (tst_QScriptValue::toBoolean_makeData):
225        (tst_QScriptValue::toBoolean_test):
226
2272009-10-06  Yongjun Zhang  <yongjun.zhang@nokia.com>
228
229        Reviewed by Simon Hausmann.
230
231        Use derefIfNotNull() to work around WINSCW compiler forward declaration bug
232
233        The compiler bug is reported at
234        https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812.
235
236        The change should be reverted when the above bug is fixed in WINSCW compiler.
237
238        https://bugs.webkit.org/show_bug.cgi?id=28054
239
2402009-10-06  Yongjun Zhang  <yongjun.zhang@nokia.com>
241
242        Reviewed by Simon Hausmann.
243
244        Get rid of WINSCW hack for UnSpecifiedBoolType
245
246        Add parenthesis around (RefPtr::*UnspecifiedBoolType) to make the WINSCW
247        compiler work with the default UnSpecifiedBoolType() operator.
248
249        https://bugs.webkit.org/show_bug.cgi?id=28054
250
251        * wtf/RefPtr.h:
252
2532010-02-09  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
254
255        Reviewed by Simon Hausmann.
256
257        New functions nullValue() and undefinedValue().
258
259        [Qt] QScriptEngine should contain nullValue and undefinedValue methods
260        https://bugs.webkit.org/show_bug.cgi?id=34749
261
262        * qt/api/qscriptengine.cpp:
263        (QScriptEngine::nullValue):
264        (QScriptEngine::undefinedValue):
265        * qt/api/qscriptengine.h:
266        * qt/tests/qscriptengine/tst_qscriptengine.cpp:
267        (tst_QScriptEngine::nullValue):
268        (tst_QScriptEngine::undefinedValue):
269
2702010-02-09  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
271
272        Reviewed by Simon Hausmann.
273
274        Fixes for QScriptValue::toNumber().
275
276        Fix ECMA compliance in QScriptValue for values unbound
277        to a QScriptEngine.
278
279        [Qt] QScriptValue::toNumber() is broken
280        https://bugs.webkit.org/show_bug.cgi?id=34592
281
282        * qt/api/qscriptvalue_p.h:
283        (QScriptValuePrivate::toNumber):
284        * qt/tests/qscriptvalue/tst_qscriptvalue.h:
285        * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp:
286        (tst_QScriptValue::toNumber_initData):
287        (tst_QScriptValue::toNumber_makeData):
288        (tst_QScriptValue::toNumber_test):
289
2902010-02-09  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
291
292        Reviewed by Simon Hausmann.
293
294        Fix QScriptValue::isNumber().
295
296        The isNumber() should return 'true' if the value is in the CNumber
297        state.
298
299        [Qt] QScriptValue::isNumber() returns an incorrect value
300        https://bugs.webkit.org/show_bug.cgi?id=34575
301
302        * qt/api/qscriptvalue_p.h:
303        (QScriptValuePrivate::isNumber):
304        * qt/tests/qscriptvalue/tst_qscriptvalue.h:
305        * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp:
306        (tst_QScriptValue::isNumber_initData):
307        (tst_QScriptValue::isNumber_makeData):
308        (tst_QScriptValue::isNumber_test):
309
3102010-02-09  Geoffrey Garen  <ggaren@apple.com>
311
312        Reviewed by Oliver Hunt.
313
314        Small refactoring to the small strings cache to allow it to be cleared
315        dynamically.
316
317        * runtime/SmallStrings.cpp:
318        (JSC::SmallStrings::SmallStrings):
319        (JSC::SmallStrings::clear):
320        * runtime/SmallStrings.h: Moved initialization code into a shared function,
321        and changed the constructor to call it.
322
3232010-02-09  Gavin Barraclough  <barraclough@apple.com>
324
325        Rubber Stamped by Geoff Garen.
326
327        Rename StringBuilder::release && JSStringBuilder::releaseJSString
328        to 'build()'.
329
330        * runtime/ArrayPrototype.cpp:
331        (JSC::arrayProtoFuncToLocaleString):
332        (JSC::arrayProtoFuncJoin):
333        * runtime/Executable.cpp:
334        (JSC::FunctionExecutable::paramString):
335        * runtime/FunctionConstructor.cpp:
336        (JSC::constructFunction):
337        * runtime/JSGlobalObjectFunctions.cpp:
338        (JSC::encode):
339        (JSC::decode):
340        (JSC::globalFuncEscape):
341        (JSC::globalFuncUnescape):
342        * runtime/JSONObject.cpp:
343        (JSC::Stringifier::stringify):
344        * runtime/JSStringBuilder.h:
345        (JSC::JSStringBuilder::build):
346        * runtime/LiteralParser.cpp:
347        (JSC::LiteralParser::Lexer::lexString):
348        * runtime/NumberPrototype.cpp:
349        (JSC::integerPartNoExp):
350        (JSC::numberProtoFuncToFixed):
351        * runtime/StringBuilder.h:
352        (JSC::StringBuilder::build):
353
3542010-02-09  John Sullivan  <sullivan@apple.com>
355
356        https://bugs.webkit.org/show_bug.cgi?id=34772
357        Overzealous new assertion in URStringImpl::adopt()
358
359        Reviewed by Adam Barth.
360
361        * runtime/UStringImpl.h:
362        (JSC::UStringImpl::adopt):
363        Only assert that vector.data() is non-zero if vector.size() is non-zero.
364
3652010-02-09  Nikolas Zimmermann  <nzimmermann@rim.com>
366
367        Not reviewed. Try to fix build problem on SnowLeopard slaves to bring them back.
368
369        * API/JSClassRef.cpp:
370        (tryCreateStringFromUTF8): Mark method as 'static inline' to suppress "warning: no previous prototype for ..."
371
3722010-02-09  Gavin Barraclough  <barraclough@apple.com>
373
374        Reviewed by Oliver Hunt.
375
376        Three small string fixes:
377        (1) StringBuilder::release should CRASH if the buffer allocation failed.
378        (2) Remove weird, dead code from JSString::tryGetValue, replace with an ASSERT.
379        (3) Move UString::createFromUTF8 out to the API, as tryCreateStringFromUTF8.
380            This is only used from the API, and (now) unlike other UString::create
381            methods may return UString::null() to indicate failure cases.  Better
382            handle these in the API.
383
384        * API/JSClassRef.cpp:
385        (tryCreateStringFromUTF8):
386        (OpaqueJSClass::OpaqueJSClass):
387        (OpaqueJSClassContextData::OpaqueJSClassContextData):
388        * runtime/JSString.h:
389        (JSC::Fiber::tryGetValue):
390        * runtime/StringBuilder.h:
391        (JSC::StringBuilder::release):
392        * runtime/UString.cpp:
393        (JSC::UString::UString):
394        (JSC::UString::from):
395        (JSC::UString::find):
396        * runtime/UString.h:
397
3982010-02-09  Janne Koskinen  <janne.p.koskinen@digia.com>
399
400        Reviewed by Laszlo Gombos.
401
402        [Qt] use nanval() for Symbian as nonInlineNaN
403        https://bugs.webkit.org/show_bug.cgi?id=34170
404
405        numeric_limits<double>::quiet_NaN is broken in Symbian
406        causing NaN to be evaluated as a number.
407
408        * runtime/JSValue.cpp:
409        (JSC::nonInlineNaN):
410
4112010-02-09  Tamas Szirbucz  <szirbucz@inf.u-szeged.hu>
412
413        Reviewed by Gavin Barraclough.
414
415        Add a soft modulo operation to ARM JIT using a trampoline function.
416        The performance progression is about ~1.8% on ARMv7
417        https://bugs.webkit.org/show_bug.cgi?id=34424
418
419        Developed in cooperation with Gabor Loki.
420
421        * jit/JIT.h:
422        * jit/JITArithmetic.cpp:
423        (JSC::JIT::emit_op_mod):
424        (JSC::JIT::emitSlow_op_mod):
425        * jit/JITOpcodes.cpp:
426        (JSC::JIT::softModulo):
427        * jit/JITStubs.h:
428        (JSC::JITThunks::ctiSoftModulo):
429        * wtf/Platform.h:
430
4312010-02-08  Gavin Barraclough  <barraclough@apple.com>
432
433        Reviewed by NOBODY (SL/win build fixes).
434
435        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
436        * runtime/StringPrototype.cpp:
437
4382010-02-08  Gavin Barraclough  <barraclough@apple.com>
439
440        Reviewed by Oliver Hunt
441
442        Make String.replace throw an exception on out-of-memory, rather than
443        returning a null (err, empty-ish) string.  Move String::replaceRange
444        and String::spliceSubstringsWithSeparators out to StringPrototype -
445        these were fairly specific use anyway, and we can better integrate
446        throwing the JS expcetion this way.
447
448        Also removes redundant assignment operator from UString.
449
450        * JavaScriptCore.exp:
451        * runtime/StringPrototype.cpp:
452        (JSC::StringRange::StringRange):
453        (JSC::jsSpliceSubstringsWithSeparators):
454        (JSC::jsReplaceRange):
455        (JSC::stringProtoFuncReplace):
456        * runtime/UString.cpp:
457        * runtime/UString.h:
458
4592010-02-08  Kwang Yul Seo  <skyul@company100.net>
460
461        Reviewed by Eric Seidel.
462
463        [BREWMP] Undefine WTF_OS_WINDOWS and WTF_PLATFORM_WIN
464        https://bugs.webkit.org/show_bug.cgi?id=34561
465
466        As the binary for simulator is built with MSVC 2005,
467        WTF_OS_WINDOWS and WTF_PLATFORM_WIN are defined.
468        Undefine them as we don't target Windows.
469
470        * wtf/Platform.h:
471
4722010-02-08  Chris Rogers  <crogers@google.com>
473
474        Reviewed by Darin Adler.
475
476        audio engine: add Vector3 class
477        https://bugs.webkit.org/show_bug.cgi?id=34548
478
479        * wtf/Vector3.h: Added.
480        (WebCore::Vector3::Vector3):
481        (WebCore::Vector3::abs):
482        (WebCore::Vector3::isZero):
483        (WebCore::Vector3::normalize):
484        (WebCore::Vector3::x):
485        (WebCore::Vector3::y):
486        (WebCore::Vector3::z):
487        (WebCore::operator+):
488        (WebCore::operator-):
489        (WebCore::operator*):
490        (WebCore::dot):
491        (WebCore::cross):
492        (WebCore::distance):
493
4942010-02-08  Oliver Hunt  <oliver@apple.com>
495
496        Reviewed by Gavin Barraclough.
497
498        Fix warning in clang++
499
500        * runtime/Structure.h:
501        (JSC::Structure::propertyStorageSize):
502
5032010-02-08  Gavin Barraclough  <barraclough@apple.com>
504
505        Reviewed by Geoff Garen.
506
507        Make makeString CRASH if we fail to allocate a string.
508
509        (tryMakeString or jsMakeNontrivialString can be used where we
510        expect allocation may fail and want to handle the error).
511
512        * runtime/JSStringBuilder.h:
513        (JSC::jsMakeNontrivialString):
514        * runtime/UString.h:
515        (JSC::tryMakeString):
516        (JSC::makeString):
517
5182010-02-08  Gavin Barraclough  <barraclough@apple.com>
519
520        Rubber Stamped by Oliver Hunt.
521
522        Remove a couple of unnecesary C-style casts spotted by Darin.
523
524        * runtime/JSGlobalObjectFunctions.cpp:
525        (JSC::encode):
526        (JSC::globalFuncEscape):
527
5282010-02-08  Gavin Barraclough  <barraclough@apple.com>
529
530        Reviewed by Geoff Garen.
531
532        Switch some more StringBuilder/jsNontrivialString code to use
533        JSStringBuilder/jsMakeNontrivialString - these methods will
534        throw an exception if we hit out-of-memory, rather than just
535        CRASHing.
536
537        * runtime/FunctionPrototype.cpp:
538        (JSC::functionProtoFuncToString):
539        * runtime/JSGlobalObjectFunctions.cpp:
540        (JSC::encode):
541        (JSC::decode):
542        (JSC::globalFuncEscape):
543
5442010-02-08  Gavin Barraclough  <barraclough@apple.com>
545
546        Reviewed by Sam Weinig.
547
548        Use an empty identifier instead of a null identifier for parse
549        tokens without an identifier.
550
551        This helps encapsulate the null UStringImpl within UString.
552
553        * parser/Grammar.y:
554        * parser/NodeConstructors.h:
555        (JSC::ContinueNode::ContinueNode):
556        (JSC::BreakNode::BreakNode):
557        (JSC::ForInNode::ForInNode):
558        * runtime/CommonIdentifiers.cpp:
559        (JSC::CommonIdentifiers::CommonIdentifiers):
560        * runtime/CommonIdentifiers.h:
561        * runtime/FunctionPrototype.cpp:
562        (JSC::FunctionPrototype::FunctionPrototype):
563
5642010-02-08  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
565
566        Build fix for make distcheck.
567
568        * GNUmakefile.am:
569
5702010-02-08  Simon Hausmann  <simon.hausmann@nokia.com>
571
572        Unreviewed RVCT build fix.
573
574        Similar to r54391, don't import the cmath functions from std:: for RVCT.
575
576        * wtf/MathExtras.h:
577
5782010-02-05  Gavin Barraclough  <barraclough@apple.com>
579
580        Reviewed by Geoff Garen.
581
582        Change UStringImpl::create to CRASH if the string cannot be allocated,
583        rather than returning a null string (which will behave like a zero-length
584        string if used).
585
586        Also move createRep function from UString to become new overloaded
587        UStringImpl::create methods.  In doing so, bring their behaviour closer to
588        being in line with WebCore::StringImpl, in removing the behaviour that they
589        can be used to produce null UStrings (ASSERT the char* provided is non-null).
590        This behaviour of converting null C-strings to null UStrings is inefficient
591        (cmompared to just using UString::null()), incompatible with WebCore::StringImpl's
592        behaviour, and may generate unexpected behaviour, since in many cases a null
593        UString can be used like an empty string.
594
595        With these changes UStringImpl need not have a concept of null impls, we can
596        start transitioning this to become an implementation detail of UString, that
597        internally it chooses to use a null-object rather than an actually zero impl
598        pointer.
599
600        * JavaScriptCore.exp:
601        * debugger/Debugger.cpp:
602        (JSC::Debugger::recompileAllJSFunctions):
603        * debugger/DebuggerCallFrame.cpp:
604        (JSC::DebuggerCallFrame::calculatedFunctionName):
605        * parser/Parser.cpp:
606        (JSC::Parser::parse):
607        * profiler/Profile.cpp:
608        (JSC::Profile::Profile):
609        * profiler/ProfileGenerator.cpp:
610        (JSC::ProfileGenerator::stopProfiling):
611        * runtime/Error.cpp:
612        (JSC::Error::create):
613        (JSC::throwError):
614        * runtime/ExceptionHelpers.cpp:
615        (JSC::createError):
616        * runtime/Identifier.cpp:
617        (JSC::Identifier::add):
618        * runtime/PropertyNameArray.cpp:
619        (JSC::PropertyNameArray::add):
620        * runtime/UString.cpp:
621        (JSC::initializeUString):
622        (JSC::UString::UString):
623        (JSC::UString::operator=):
624        * runtime/UString.h:
625        (JSC::UString::isNull):
626        (JSC::UString::null):
627        (JSC::UString::rep):
628        (JSC::UString::UString):
629        * runtime/UStringImpl.cpp:
630        (JSC::UStringImpl::create):
631        * runtime/UStringImpl.h:
632
6332010-02-05  Kwang Yul Seo  <skyul@company100.net>
634
635        Reviewed by Eric Seidel.
636
637        [BREWMP] Define SYSTEM_MALLOC 1
638        https://bugs.webkit.org/show_bug.cgi?id=34640
639
640        Make BREWMP use system malloc because FastMalloc is not ported.
641
642        * wtf/Platform.h:
643
6442010-02-05  Kwang Yul Seo  <skyul@company100.net>
645
646        Reviewed by Alexey Proskuryakov.
647
648        Don't call CRASH() in fastMalloc and fastCalloc when the requested memory size is 0
649        https://bugs.webkit.org/show_bug.cgi?id=34569
650
651        With USE_SYSTEM_MALLOC=1, fastMalloc and fastCalloc call CRASH()
652        if the return value of malloc and calloc is 0.
653
654        However, these functions can return 0 when the request size is 0.
655        Libc manual says, "If size is 0, then malloc() returns either NULL,
656        or a unique pointer value that can later be successfully passed to free()."
657        Though malloc returns a unique pointer in most systems,
658        0 can be returned in some systems. For instance, BREW's MALLOC returns 0
659        when size is 0.
660
661        If malloc or calloc returns 0 due to allocation size, increase the size
662        to 1 and try again.
663
664        * wtf/FastMalloc.cpp:
665        (WTF::fastMalloc):
666        (WTF::fastCalloc):
667
6682010-02-04  Mark Rowe  <mrowe@apple.com>
669
670        Reviewed by Timothy Hatcher.
671
672        Build fix.  Remove a symbol corresponding to an inline function from the linker export
673        file to prevent a weak external failure.
674
675        * JavaScriptCore.xcodeproj/project.pbxproj: Accommodate rename of script.
676
6772010-02-04  Daniel Bates  <dbates@webkit.org>
678
679        [Qt] Unreviewed, build fix for Qt bot.
680
681        * runtime/JSStringBuilder.h: Changed #include <X.h> notation #include "X.h".
682
6832010-02-04  Geoffrey Garen  <ggaren@apple.com>
684
685        Reviewed by Oliver Hunt.
686
687        Clearing a WeakGCPtr is weird
688        https://bugs.webkit.org/show_bug.cgi?id=34627
689
690        Added a WeakGCPtr::clear interface.
691
692        As discussed in https://bugs.webkit.org/show_bug.cgi?id=33383, the old
693        interface made it pretty weird for a client to conditionally clear a
694        WeakGCPtr, which is exactly what clients want to do when objects are
695        finalized.
696
697        * API/JSClassRef.cpp:
698        (clearReferenceToPrototype): Use the new WeakGCPtr::clear() interface.
699
700        * runtime/WeakGCPtr.h:
701        (JSC::WeakGCPtr::clear): Added an interface for clearing a WeakGCPtr,
702        iff its current value is the value passed in. It's cumbersome for the
703        client to do this test, since WeakGCPtr sometimes pretends to be null.
704
7052010-02-04  Geoffrey Garen  <ggaren@apple.com>
706
707        Build fix: export a header.
708
709        * JavaScriptCore.xcodeproj/project.pbxproj:
710
7112010-02-04  Gavin Barraclough  <barraclough@apple.com>
712
713        Reviewed by Oliver Hunt.
714
715        Add a JSStringBuilder class (similar-to, and derived-from StringBuilder) to
716        construct JSStrings, throwing a JS exception should we run out of memory whilst
717        allocating storage for the string.
718
719        Similarly, add jsMakeNontrivialString methods to use in cases where previously
720        we were calling makeString & passing the result to jsNontrivialString.  Again,
721        these new methods throw if we hit an out of memory condition.
722
723        Move throwOutOfMemoryError into ExceptionHelpers, to make it more widely available.
724
725        * JavaScriptCore.xcodeproj/project.pbxproj:
726        * runtime/ArrayPrototype.cpp:
727        (JSC::arrayProtoFuncToString):
728        (JSC::arrayProtoFuncToLocaleString):
729        (JSC::arrayProtoFuncJoin):
730        * runtime/DateConstructor.cpp:
731        (JSC::callDate):
732        * runtime/DatePrototype.cpp:
733        (JSC::dateProtoFuncToString):
734        (JSC::dateProtoFuncToUTCString):
735        (JSC::dateProtoFuncToGMTString):
736        * runtime/ErrorPrototype.cpp:
737        (JSC::errorProtoFuncToString):
738        * runtime/ExceptionHelpers.cpp:
739        (JSC::throwOutOfMemoryError):
740        * runtime/ExceptionHelpers.h:
741        * runtime/JSStringBuilder.h: Added.
742        (JSC::JSStringBuilder::releaseJSString):
743        (JSC::jsMakeNontrivialString):
744        * runtime/NumberPrototype.cpp:
745        (JSC::numberProtoFuncToPrecision):
746        * runtime/ObjectPrototype.cpp:
747        (JSC::objectProtoFuncToString):
748        * runtime/Operations.cpp:
749        * runtime/Operations.h:
750        * runtime/RegExpPrototype.cpp:
751        (JSC::regExpProtoFuncToString):
752        * runtime/StringBuilder.h:
753        (JSC::StringBuilder::append):
754        * runtime/StringPrototype.cpp:
755        (JSC::stringProtoFuncBig):
756        (JSC::stringProtoFuncSmall):
757        (JSC::stringProtoFuncBlink):
758        (JSC::stringProtoFuncBold):
759        (JSC::stringProtoFuncFixed):
760        (JSC::stringProtoFuncItalics):
761        (JSC::stringProtoFuncStrike):
762        (JSC::stringProtoFuncSub):
763        (JSC::stringProtoFuncSup):
764        (JSC::stringProtoFuncFontcolor):
765        (JSC::stringProtoFuncFontsize):
766        (JSC::stringProtoFuncAnchor):
767
7682010-02-04  Steve Falkenburg  <sfalken@apple.com>
769
770        Windows build fix.
771
772        * wtf/MathExtras.h:
773
7742010-02-04  Darin Adler  <darin@apple.com>
775
776        Reviewed by David Levin.
777
778        Make MathExtras.h compatible with <cmath>
779        https://bugs.webkit.org/show_bug.cgi?id=34618
780
781        * wtf/MathExtras.h: Include <cmath> instead of <math.h>.
782        Use "using" as we do elsewhere in WTF for the four functions from <cmath>
783        we want to use without the prefix. Later we could consider making the std
784        explicit at call sites instead.
785
7862010-02-04  Tamas Szirbucz  <szirbucz@inf.u-szeged.hu>
787
788        Reviewed by Gavin Barraclough.
789
790        Use an easily appendable structure for trampolines instead of pointer parameters.
791        https://bugs.webkit.org/show_bug.cgi?id=34424
792
793        * assembler/ARMAssembler.cpp:
794        (JSC::ARMAssembler::executableCopy):
795        * jit/JIT.h:
796        (JSC::JIT::compileCTIMachineTrampolines):
797        * jit/JITOpcodes.cpp:
798        (JSC::JIT::privateCompileCTIMachineTrampolines):
799        * jit/JITStubs.cpp:
800        (JSC::JITThunks::JITThunks):
801        * jit/JITStubs.h:
802        (JSC::JITThunks::ctiStringLengthTrampoline):
803        (JSC::JITThunks::ctiVirtualCallLink):
804        (JSC::JITThunks::ctiVirtualCall):
805        (JSC::JITThunks::ctiNativeCallThunk):
806
8072010-02-04  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
808
809        Reviewed by Simon Hausmann.
810
811        Increase test coverage for the QScriptValue.
812
813        https://bugs.webkit.org/show_bug.cgi?id=34533
814
815        * qt/tests/qscriptvalue/qscriptvalue.pro:
816        * qt/tests/qscriptvalue/tst_qscriptvalue.cpp:
817        (tst_QScriptValue::tst_QScriptValue):
818        (tst_QScriptValue::~tst_QScriptValue):
819        (tst_QScriptValue::dataHelper):
820        (tst_QScriptValue::newRow):
821        (tst_QScriptValue::testHelper):
822        (tst_QScriptValue::ctor):
823        * qt/tests/qscriptvalue/tst_qscriptvalue.h: Added.
824        * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp: Added.
825        (tst_QScriptValue::initScriptValues):
826        (tst_QScriptValue::isValid_initData):
827        (tst_QScriptValue::isValid_makeData):
828        (tst_QScriptValue::isValid_test):
829        (tst_QScriptValue::isBool_initData):
830        (tst_QScriptValue::isBool_makeData):
831        (tst_QScriptValue::isBool_test):
832        (tst_QScriptValue::isBoolean_initData):
833        (tst_QScriptValue::isBoolean_makeData):
834        (tst_QScriptValue::isBoolean_test):
835        (tst_QScriptValue::isFunction_initData):
836        (tst_QScriptValue::isFunction_makeData):
837        (tst_QScriptValue::isFunction_test):
838        (tst_QScriptValue::isNull_initData):
839        (tst_QScriptValue::isNull_makeData):
840        (tst_QScriptValue::isNull_test):
841        (tst_QScriptValue::isString_initData):
842        (tst_QScriptValue::isString_makeData):
843        (tst_QScriptValue::isString_test):
844        (tst_QScriptValue::isUndefined_initData):
845        (tst_QScriptValue::isUndefined_makeData):
846        (tst_QScriptValue::isUndefined_test):
847        (tst_QScriptValue::isObject_initData):
848        (tst_QScriptValue::isObject_makeData):
849        (tst_QScriptValue::isObject_test):
850
8512010-02-03  Kwang Yul Seo  <skyul@company100.net>
852
853        Reviewed by Eric Seidel.
854
855        [BREWMP] Define WTF_PLATFORM_BREWMP_SIMULATOR when AEE_SIMULATOR is defined
856        https://bugs.webkit.org/show_bug.cgi?id=34514
857
858        PLATFORM(BREWMP_SIMULATOR) guard is needed to make distinction between BREWMP
859        and BREWMP simulator.
860
861        * wtf/Platform.h:
862
8632010-02-03  Kwang Yul Seo  <skyul@company100.net>
864
865        Reviewed by Eric Seidel.
866
867        [BREWMP] Remove COMPILE_ASSERT conflict with the underlying PLATFORM
868        https://bugs.webkit.org/show_bug.cgi?id=34190
869
870        COMPILE_ASSERT conflicts with the underlying PLATFORM because it is defined
871        both in WTF's Assertions.h and BREWMP's AEEClassIDs.h. Include AEEClassIDs.h
872        in Assertions.h and undef COMPILE_ASSERT to avoid redefining COMPILE_ASSERT.
873
874        * wtf/Assertions.h:
875
8762010-02-03  Kwang Yul Seo  <skyul@company100.net>
877
878        Reviewed by Eric Seidel.
879
880        [BREWMP] Implement OwnPtrBrew to make sure BREW instances are freed.
881        https://bugs.webkit.org/show_bug.cgi?id=34518
882
883        Add OwnPtrBrew to release IFile, IFileMgr and IBitmap instances.
884
885        * wtf/brew/OwnPtrBrew.cpp: Added.
886        (WTF::IFileMgr):
887        (WTF::IFile):
888        (WTF::IBitmap):
889        (WTF::freeOwnedPtrBrew):
890        * wtf/brew/OwnPtrBrew.h: Added.
891        (WTF::OwnPtrBrew::OwnPtrBrew):
892        (WTF::OwnPtrBrew::~OwnPtrBrew):
893        (WTF::OwnPtrBrew::get):
894        (WTF::OwnPtrBrew::release):
895        (WTF::OwnPtrBrew::outPtr):
896        (WTF::OwnPtrBrew::set):
897        (WTF::OwnPtrBrew::clear):
898        (WTF::OwnPtrBrew::operator*):
899        (WTF::OwnPtrBrew::operator->):
900        (WTF::OwnPtrBrew::operator!):
901        (WTF::OwnPtrBrew::operator UnspecifiedBoolType):
902        (WTF::OwnPtrBrew::swap):
903        (WTF::swap):
904        (WTF::operator==):
905        (WTF::operator!=):
906        (WTF::getPtr):
907
9082010-02-03  Kwang Yul Seo  <skyul@company100.net>
909
910        Reviewed by Darin Adler.
911
912        Export WTF::fastStrDup symbol
913        https://bugs.webkit.org/show_bug.cgi?id=34526
914
915        * JavaScriptCore.exp:
916
9172010-02-03  Kevin Watters  <kevinwatters@gmail.com>
918
919        Reviewed by Kevin Ollivier.
920
921        [wx] Enable JIT compilation for wx.
922
923        https://bugs.webkit.org/show_bug.cgi?id=34536
924
925        * wtf/Platform.h:
926
9272010-02-02  Oliver Hunt  <oliver@apple.com>
928
929        Reviewed by Geoffrey Garen.
930
931        Crash in CollectorBitmap::get at nbcolympics.com
932        https://bugs.webkit.org/show_bug.cgi?id=34504
933
934        This was caused by the use of m_offset to determine the offset of
935        a new property into the property storage.  This patch corrects
936        the effected cases by incorporating the anonymous slot count. It
937        also removes the duplicate copy of anonymous slot count from the
938        property table as keeping this up to date merely increased the
939        chance of a mismatch.  Finally I've added a large number of
940        assertions in an attempt to prevent such a bug from happening
941        again.
942
943        With the new assertions in place the existing anonymous slot tests
944        all fail without the m_offset fixes.
945
946        * runtime/PropertyMapHashTable.h:
947        * runtime/Structure.cpp:
948        (JSC::Structure::materializePropertyMap):
949        (JSC::Structure::addPropertyTransitionToExistingStructure):
950        (JSC::Structure::addPropertyTransition):
951        (JSC::Structure::removePropertyTransition):
952        (JSC::Structure::flattenDictionaryStructure):
953        (JSC::Structure::addPropertyWithoutTransition):
954        (JSC::Structure::removePropertyWithoutTransition):
955        (JSC::Structure::copyPropertyTable):
956        (JSC::Structure::get):
957        (JSC::Structure::put):
958        (JSC::Structure::remove):
959        (JSC::Structure::insertIntoPropertyMapHashTable):
960        (JSC::Structure::createPropertyMapHashTable):
961        (JSC::Structure::rehashPropertyMapHashTable):
962        (JSC::Structure::checkConsistency):
963
9642010-02-02  Steve Falkenburg  <sfalken@apple.com>
965
966        Reviewed by Darin Adler.
967
968        Copyright year updating for Windows version resources should be automatic
969        https://bugs.webkit.org/show_bug.cgi?id=34503
970
971        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc:
972
9732010-02-02  Kwang Yul Seo  <skyul@company100.net>
974
975        Reviewed by Eric Seidel.
976
977        [BREWMP] Add dummy main thread functions
978        https://bugs.webkit.org/show_bug.cgi?id=33569
979
980        Add dummy initializeMainThreadPlatform and
981        scheduleDispatchFunctionsOnMainThread.
982
983        * wtf/brew/MainThreadBrew.cpp: Added.
984        (WTF::initializeMainThreadPlatform):
985        (WTF::scheduleDispatchFunctionsOnMainThread):
986
9872010-02-02  Kwang Yul Seo  <skyul@company100.net>
988
989        Reviewed by Darin Adler.
990
991        Add using WTF::getLocalTime to CurrentTime.h
992        https://bugs.webkit.org/show_bug.cgi?id=34493
993
994        * wtf/CurrentTime.h:
995
9962010-02-02  Kwang Yul Seo  <skyul@company100.net>
997
998        Reviewed by Eric Seidel.
999
1000        [BREWMP] Add HAVE_XXX definitions
1001        https://bugs.webkit.org/show_bug.cgi?id=34414
1002
1003        Add HAVE_ERRNO_H=1
1004
1005        * wtf/Platform.h:
1006
10072010-02-02  Kwang Yul Seo  <skyul@company100.net>
1008
1009        Reviewed by Eric Seidel.
1010
1011        [BREWMP] Don't define HAVE_TM_GMTOFF, HAVE_TM_ZONE and HAVE_TIMEGM
1012        https://bugs.webkit.org/show_bug.cgi?id=34388
1013
1014        BREWMP does not have these features.
1015
1016        * wtf/Platform.h:
1017
10182010-02-02  Kwang Yul Seo  <skyul@company100.net>
1019
1020        Reviewed by Eric Seidel.
1021
1022        [BREWMP] Define WTF_PLATFORM_BREWMP=1 when BUILDING_BREWMP is defined
1023        https://bugs.webkit.org/show_bug.cgi?id=34386
1024
1025        Define WTF_PLATFORM_BREWMP=1 so that PLATFORM(BREWMP) guard can be used.
1026
1027        * wtf/Platform.h:
1028
10292010-02-01  Kent Tamura  <tkent@chromium.org>
1030
1031        Reviewed by Darin Adler.
1032
1033        Date.UTC() should apply TimeClip operation.
1034        https://bugs.webkit.org/show_bug.cgi?id=34461
1035
1036        ECMAScript 5 15.9.4.3:
1037        > 9 Return TimeClip(MakeDate(MakeDay(yr, m, dt), MakeTime(h, min, s, milli))).
1038
1039        * runtime/DateConstructor.cpp:
1040        (JSC::dateUTC): Calls WTF::timeClip().
1041
10422010-02-01  Kent Tamura  <tkent@chromium.org>
1043
1044        Reviewed by Darin Adler.
1045
1046        Fix a bug that Math.round() retunrs incorrect results for huge integers
1047        https://bugs.webkit.org/show_bug.cgi?id=34462
1048
1049        * runtime/MathObject.cpp:
1050        (JSC::mathProtoFuncRound): Avoid "arg + 0.5".
1051
10522010-02-01  Kwang Yul Seo  <skyul@company100.net>
1053
1054        Reviewed by Eric Seidel.
1055
1056        [BREWMP] Port WTF's currentTime
1057        https://bugs.webkit.org/show_bug.cgi?id=33567
1058
1059        Combine GETUTCSECONDS and GETTIMEMS to calculate the number
1060        of milliseconds since 1970/01/01 00:00:00 UTC.
1061
1062        * wtf/CurrentTime.cpp:
1063        (WTF::currentTime):
1064
10652010-02-01  Patrick Gansterer  <paroga@paroga.com>
1066
1067        Reviewed by Darin Adler.
1068
1069        [Qt] WinCE buildfix after r52729 and fix for Q_BIG_ENDIAN typo.
1070        https://bugs.webkit.org/show_bug.cgi?id=34378
1071
1072        * wtf/Platform.h:
1073
10742010-02-01  Oliver Hunt  <oliver@apple.com>
1075
1076        Reviewed by Gavin Barraclough.
1077
1078        Structure not accounting for anonymous slots when computing property storage size
1079        https://bugs.webkit.org/show_bug.cgi?id=34441
1080
1081        Previously any Structure with anonymous storage would have a property map, so we
1082        were only including anonymous slot size if there was a property map.  Given this
1083        is no longer the case we should always include the anonymous slot count in the
1084        property storage size.
1085
1086        * runtime/Structure.h:
1087        (JSC::Structure::propertyStorageSize):
1088
10892010-02-01  Oliver Hunt  <oliver@apple.com>
1090
1091        Windows build fix, update exports file (again)
1092
1093        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1094
10952010-02-01  Oliver Hunt  <oliver@apple.com>
1096
1097        Windows build fix, update exports file
1098
1099        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1100
11012010-01-31  Oliver Hunt  <oliver@apple.com>
1102
1103        Reviewed by Maciej Stachowiak.
1104
1105        JSC is failing to propagate anonymous slot count on some transitions
1106        https://bugs.webkit.org/show_bug.cgi?id=34321
1107
1108        Remove secondary Structure constructor, and make Structure store a copy
1109        of the number of anonymous slots directly so saving an immediate allocation
1110        of a property map for all structures with anonymous storage, which also
1111        avoids the leaked property map on new property transition in the original
1112        version of this patch.
1113
1114        We need to propagate the the anonymous slot count otherwise we can end up
1115        with a structure recording incorrect information about the available and
1116        needed space for property storage, or alternatively incorrectly reusing
1117        some slots.
1118
1119        * JavaScriptCore.exp:
1120        * runtime/Structure.cpp:
1121        (JSC::Structure::Structure):
1122        (JSC::Structure::materializePropertyMap):
1123        (JSC::Structure::addPropertyTransition):
1124        (JSC::Structure::changePrototypeTransition):
1125        (JSC::Structure::despecifyFunctionTransition):
1126        (JSC::Structure::getterSetterTransition):
1127        (JSC::Structure::toDictionaryTransition):
1128        (JSC::Structure::flattenDictionaryStructure):
1129        (JSC::Structure::copyPropertyTable):
1130        (JSC::Structure::put):
1131        (JSC::Structure::remove):
1132        (JSC::Structure::insertIntoPropertyMapHashTable):
1133        (JSC::Structure::createPropertyMapHashTable):
1134        * runtime/Structure.h:
1135        (JSC::Structure::create):
1136        (JSC::Structure::hasAnonymousSlots):
1137        (JSC::Structure::anonymousSlotCount):
1138
11392010-01-31  Patrick Gansterer  <paroga@paroga.com>
1140
1141        Reviewed by Darin Adler.
1142
1143        Buildfix for WinCE + style fixes (TLS_OUT_OF_INDEXES is not defined).
1144        https://bugs.webkit.org/show_bug.cgi?id=34380
1145
1146        * wtf/ThreadSpecific.h:
1147
11482010-01-31  Kent Tamura  <tkent@chromium.org>
1149
1150        Reviewed by Darin Adler.
1151
1152        [Windows] Fix a bug of round() with huge integral numbers
1153        https://bugs.webkit.org/show_bug.cgi?id=34297
1154
1155        Fix a bug that round() for huge integral numbers returns incorrect
1156        results. For example, round(8639999913600001) returns
1157        8639999913600002 without this change though the double type can
1158        represent 8639999913600001 precisely.
1159
1160        Math.round() of JavaScript has a similar problem. But this change
1161        doesn't fix it because Math.round() doesn't use round() of
1162        MathExtra.h.
1163
1164        * wtf/MathExtras.h:
1165        (round): Avoid to do "num + 0.5" or "num - 0.5".
1166        (roundf): Fixed similarly.
1167        (llround): Calls round().
1168        (llroundf): Calls roundf().
1169        (lround): Calls round().
1170        (lroundf): Calls roundf().
1171
11722010-01-29  Mark Rowe  <mrowe@apple.com>
1173
1174        Sort Xcode projects.
1175
1176        * JavaScriptCore.xcodeproj/project.pbxproj:
1177
11782010-01-29  Mark Rowe  <mrowe@apple.com>
1179
1180        Fix the Mac build.
1181
1182        Disable ENABLE_INDEXED_DATABASE since it is "completely non-functional".
1183
1184        As the comment in FeatureDefines.xcconfig notes, the list of feature defines
1185        needs to be kept in sync across the various files.  The default values also
1186        need to be kept in sync between these files and build-webkit.
1187
1188        * Configurations/FeatureDefines.xcconfig:
1189
11902010-01-29  Simon Hausmann  <simon.hausmann@nokia.com>
1191
1192        Rubber-stamped by Maciej Stachowiak.
1193
1194        Fix the ARM build.
1195
1196        * runtime/JSNumberCell.h:
1197        (JSC::JSNumberCell::createStructure): Call the right Structure::create overload.
1198
11992010-01-28  Kevin Ollivier  <kevino@theolliviers.com>
1200
1201        [wx] Build fix for MSW, use ThreadingWin.cpp as the Windows pthreads implementation
1202        implements pthread_t in a way that makes it impossible to check its validity,
1203        which is needed by ThreadingPthreads.cpp.
1204
1205        * wscript:
1206
12072010-01-28  Oliver Hunt  <oliver@apple.com>
1208
1209        Reviewed by Gavin Barraclough.
1210
1211        DOM Objects shouldn't all require custom mark functions
1212        https://bugs.webkit.org/show_bug.cgi?id=34291
1213
1214        Make getAnonymousValue const-friendly
1215
1216        * runtime/JSObject.h:
1217        (JSC::JSObject::getAnonymousValue):
1218
12192010-01-28  Oliver Hunt  <oliver@apple.com>
1220
1221        Reviewed by Gavin Barraclough.
1222
1223        Simplify anonymous slot implementation
1224        https://bugs.webkit.org/show_bug.cgi?id=34282
1225
1226        A class must now specify the number of slots it needs at construction time
1227        rather than later on with a transition.  This makes many things simpler,
1228        we no longer need to need an additional transition on object creation to
1229        add the anonymous slots, and we remove the need for a number of transition
1230        type checks.
1231
1232        * API/JSCallbackConstructor.h:
1233        (JSC::JSCallbackConstructor::createStructure):
1234        * API/JSCallbackFunction.h:
1235        (JSC::JSCallbackFunction::createStructure):
1236        * API/JSCallbackObject.h:
1237        (JSC::JSCallbackObject::createStructure):
1238        * JavaScriptCore.exp:
1239        * debugger/DebuggerActivation.h:
1240        (JSC::DebuggerActivation::createStructure):
1241        * runtime/Arguments.h:
1242        (JSC::Arguments::createStructure):
1243        * runtime/BooleanObject.h:
1244        (JSC::BooleanObject::createStructure):
1245        * runtime/DateInstance.h:
1246        (JSC::DateInstance::createStructure):
1247        * runtime/DatePrototype.h:
1248        (JSC::DatePrototype::createStructure):
1249        * runtime/FunctionPrototype.h:
1250        (JSC::FunctionPrototype::createStructure):
1251        * runtime/GetterSetter.h:
1252        (JSC::GetterSetter::createStructure):
1253        * runtime/GlobalEvalFunction.h:
1254        (JSC::GlobalEvalFunction::createStructure):
1255        * runtime/InternalFunction.h:
1256        (JSC::InternalFunction::createStructure):
1257        * runtime/JSAPIValueWrapper.h:
1258        (JSC::JSAPIValueWrapper::createStructure):
1259        * runtime/JSActivation.h:
1260        (JSC::JSActivation::createStructure):
1261        * runtime/JSArray.h:
1262        (JSC::JSArray::createStructure):
1263        * runtime/JSByteArray.cpp:
1264        (JSC::JSByteArray::createStructure):
1265        * runtime/JSCell.h:
1266        (JSC::JSCell::createDummyStructure):
1267        * runtime/JSFunction.h:
1268        (JSC::JSFunction::createStructure):
1269        * runtime/JSGlobalObject.h:
1270        (JSC::JSGlobalObject::createStructure):
1271        * runtime/JSNotAnObject.h:
1272        (JSC::JSNotAnObject::createStructure):
1273        * runtime/JSONObject.h:
1274        (JSC::JSONObject::createStructure):
1275        * runtime/JSObject.h:
1276        (JSC::JSObject::createStructure):
1277        (JSC::JSObject::putAnonymousValue):
1278        (JSC::JSObject::getAnonymousValue):
1279        * runtime/JSPropertyNameIterator.h:
1280        (JSC::JSPropertyNameIterator::createStructure):
1281        * runtime/JSStaticScopeObject.h:
1282        (JSC::JSStaticScopeObject::createStructure):
1283        * runtime/JSString.h:
1284        (JSC::Fiber::createStructure):
1285        * runtime/JSVariableObject.h:
1286        (JSC::JSVariableObject::createStructure):
1287        * runtime/JSWrapperObject.h:
1288        (JSC::JSWrapperObject::createStructure):
1289        (JSC::JSWrapperObject::JSWrapperObject):
1290        * runtime/MathObject.h:
1291        (JSC::MathObject::createStructure):
1292        * runtime/NumberConstructor.h:
1293        (JSC::NumberConstructor::createStructure):
1294        * runtime/NumberObject.h:
1295        (JSC::NumberObject::createStructure):
1296        * runtime/RegExpConstructor.h:
1297        (JSC::RegExpConstructor::createStructure):
1298        * runtime/RegExpObject.h:
1299        (JSC::RegExpObject::createStructure):
1300        * runtime/StringObject.h:
1301        (JSC::StringObject::createStructure):
1302        * runtime/StringObjectThatMasqueradesAsUndefined.h:
1303        (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
1304        * runtime/Structure.cpp:
1305        (JSC::Structure::~Structure):
1306        (JSC::Structure::materializePropertyMap):
1307        * runtime/Structure.h:
1308        (JSC::Structure::create):
1309        (JSC::Structure::anonymousSlotCount):
1310        * runtime/StructureTransitionTable.h:
1311
13122010-01-27  Oliver Hunt  <oliver@apple.com>
1313
1314        Windows build fix.
1315
1316        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1317
13182010-01-27  Oliver Hunt  <oliver@apple.com>
1319
1320        Reviewed by Maciej Stachowiak.
1321
1322        MessageEvent.data should deserialize in the context of the MessageEvent's global object
1323        https://bugs.webkit.org/show_bug.cgi?id=34227
1324
1325        Add logic to allow us to create an Object, Array, or Date instance
1326        so we can create them in the context of a specific global object,
1327        rather than just using the current lexical global object.
1328
1329        * JavaScriptCore.exp:
1330        * runtime/DateInstance.cpp:
1331        (JSC::DateInstance::DateInstance):
1332        * runtime/DateInstance.h:
1333        * runtime/JSGlobalObject.h:
1334        (JSC::constructEmptyObject):
1335        (JSC::constructEmptyArray):
1336
13372010-01-27  Alexey Proskuryakov  <ap@apple.com>
1338
1339        Reviewed by Darin Adler.
1340
1341        https://bugs.webkit.org/show_bug.cgi?id=34150
1342        WebKit needs a mechanism to catch stale HashMap entries
1343
1344        It is very difficult to catch stale pointers that are HashMap keys - since a pointer's hash
1345        is just its value, it is very unlikely that any observable problem is reproducible.
1346
1347        This extends hash table consistency checks to check that pointers are referencing allocated
1348        memory blocks, and makes it possible to invoke the checks explicitly (it is not feasible
1349        to enable CHECK_HASHTABLE_CONSISTENCY by default, because that affects performance too much).
1350
1351        * wtf/HashMap.h: (WTF::::checkConsistency): Call through to HashTable implementation. We can
1352        add similar calls to HashSet and HashCountedSet, but I haven't seen hard to debug problems
1353        with those yet.
1354
1355        * wtf/HashSet.h: (WTF::::remove): The version of checkTableConsistency that's guarded by
1356        CHECK_HASHTABLE_CONSISTENCY is now called internalCheckTableConsistency().
1357
1358        * wtf/HashTable.h:
1359        (WTF::HashTable::internalCheckTableConsistency):
1360        (WTF::HashTable::internalCheckTableConsistencyExceptSize):
1361        (WTF::HashTable::checkTableConsistencyExceptSize):
1362        Expose checkTableConsistency() even if CHECK_HASHTABLE_CONSISTENCY is off.
1363        (WTF::::add): Updated for checkTableConsistency renaming.
1364        (WTF::::addPassingHashCode): Ditto.
1365        (WTF::::removeAndInvalidate): Ditto.
1366        (WTF::::remove): Ditto.
1367        (WTF::::rehash): Ditto.
1368        (WTF::::checkTableConsistency): The assertion for !shouldExpand() was not correct - this
1369        function returns true for tables with m_table == 0.
1370        (WTF::::checkTableConsistencyExceptSize): Call checkValueConsistency for key. Potentially,
1371        we could do the same for values.
1372
1373        * wtf/HashTraits.h:
1374        (WTF::GenericHashTraits::checkValueConsistency): An empty function that can be overridden
1375        to add checks. Currently, the only override is for pointer hashes.
1376
1377        * wtf/RefPtrHashMap.h: (WTF::::remove): Updated for checkTableConsistency renaming.
1378
13792010-01-27  Anton Muhin  <antonm@chromium.org>
1380
1381        Reviewed by Darin Adler.
1382
1383        Remove trailing \ from inline function code
1384        https://bugs.webkit.org/show_bug.cgi?id=34223
1385
1386        * assembler/ARMv7Assembler.h:
1387        (JSC::ARMThumbImmediate::countLeadingZerosPartial):
1388
13892010-01-27  Kwang Yul Seo  <skyul@company100.net>
1390
1391        Reviewed by Eric Seidel.
1392
1393        [BREWMP] Port WTF's randomNumber
1394        https://bugs.webkit.org/show_bug.cgi?id=33566
1395
1396        Use GETRAND to generate 4 byte random byte sequence to implement
1397        weakRandomNumber. Create a secure random number generator with
1398        AEECLSID_RANDOM to implement randomNumber.
1399
1400        * wtf/RandomNumber.cpp:
1401        (WTF::weakRandomNumber):
1402        (WTF::randomNumber):
1403
14042010-01-27  Kwang Yul Seo  <skyul@company100.net>
1405
1406        Reviewed by Eric Seidel.
1407
1408        [BREWMP] Port getCPUTime
1409        https://bugs.webkit.org/show_bug.cgi?id=33572
1410
1411        Use GETUPTIMEMS which returns a continuously and
1412        linearly increasing millisecond timer from the time the device
1413        was powered on. This function is enough to implement getCPUTime.
1414
1415        * runtime/TimeoutChecker.cpp:
1416        (JSC::getCPUTime):
1417
14182010-01-27  Kwang Yul Seo  <skyul@company100.net>
1419
1420        Reviewed by Oliver Hunt.
1421
1422        [BREWMP] Add MarkStack fastMalloc implementation for platforms without VirtualAlloc or mmap.
1423        https://bugs.webkit.org/show_bug.cgi?id=33582
1424
1425        Use fastMalloc and fastFree to implement MarkStack::allocateStack and
1426        MarkStack::releaseStack for platforms without page level allocation.
1427
1428        * runtime/MarkStack.h:
1429        (JSC::MarkStack::MarkStackArray::shrinkAllocation):
1430        * runtime/MarkStackNone.cpp: Added.
1431        (JSC::MarkStack::initializePagesize):
1432        (JSC::MarkStack::allocateStack):
1433        (JSC::MarkStack::releaseStack):
1434
14352010-01-27  Kwang Yul Seo  <skyul@company100.net>
1436
1437        Reviewed by Eric Seidel.
1438
1439        [BREWMP] Don't use time function
1440        https://bugs.webkit.org/show_bug.cgi?id=33577
1441
1442        Calling time(0) in BREW devices causes a crash because time
1443        is not properly ported in most devices. Cast currentTime() to
1444        time_t to get the same result as time(0).
1445
1446        * wtf/DateMath.cpp:
1447        (WTF::calculateUTCOffset):
1448
14492010-01-27  Alexey Proskuryakov  <ap@apple.com>
1450
1451        Revert r53899 (HashMap<AtomicStringImpl*, Value> key checks) and subsequent build fixes,
1452        because they make SVG tests crash in release builds.
1453
1454        * wtf/HashMap.h:
1455        (WTF::::remove):
1456        * wtf/HashSet.h:
1457        (WTF::::remove):
1458        * wtf/HashTable.h:
1459        (WTF::::add):
1460        (WTF::::addPassingHashCode):
1461        (WTF::::removeAndInvalidate):
1462        (WTF::::remove):
1463        (WTF::::rehash):
1464        (WTF::::checkTableConsistency):
1465        (WTF::::checkTableConsistencyExceptSize):
1466        * wtf/HashTraits.h:
1467        (WTF::GenericHashTraits::emptyValue):
1468        (WTF::):
1469        * wtf/RefPtrHashMap.h:
1470        (WTF::::remove):
1471
14722010-01-26  Alexey Proskuryakov  <ap@apple.com>
1473
1474        More Windows build fixing.
1475
1476        * wtf/HashTraits.h: _msize takes void*, remove const qualifier from type.
1477
14782010-01-26  Alexey Proskuryakov  <ap@apple.com>
1479
1480        Windows build fix.
1481
1482        * wtf/HashTraits.h: Include malloc.h for _msize().
1483
14842010-01-26  Alexey Proskuryakov  <ap@apple.com>
1485
1486        Build fix.
1487
1488        * wtf/HashTable.h: (WTF::HashTable::checkTableConsistencyExceptSize): Remove const from a
1489        static (empty) version of this function.
1490
14912010-01-26  Alexey Proskuryakov  <ap@apple.com>
1492
1493        Reviewed by Darin Adler.
1494
1495        https://bugs.webkit.org/show_bug.cgi?id=34150
1496        WebKit needs a mechanism to catch stale HashMap entries
1497
1498        It is very difficult to catch stale pointers that are HashMap keys - since a pointer's hash
1499        is just its value, it is very unlikely that any observable problem is reproducible.
1500
1501        This extends hash table consistency checks to check that pointers are referencing allocated
1502        memory blocks, and makes it possible to invoke the checks explicitly (it is not feasible
1503        to enable CHECK_HASHTABLE_CONSISTENCY by default, because that affects performance too much).
1504
1505        * wtf/HashMap.h: (WTF::::checkConsistency): Call through to HashTable implementation. We can
1506        add similar calls to HashSet and HashCountedSet, but I haven't seen hard to debug problems
1507        with those yet.
1508
1509        * wtf/HashSet.h: (WTF::::remove): The version of checkTableConsistency that's guarded by
1510        CHECK_HASHTABLE_CONSISTENCY is now called internalCheckTableConsistency().
1511
1512        * wtf/HashTable.h:
1513        (WTF::HashTable::internalCheckTableConsistency):
1514        (WTF::HashTable::internalCheckTableConsistencyExceptSize):
1515        (WTF::HashTable::checkTableConsistencyExceptSize):
1516        Expose checkTableConsistency() even if CHECK_HASHTABLE_CONSISTENCY is off.
1517        (WTF::::add): Updated for checkTableConsistency renaming.
1518        (WTF::::addPassingHashCode): Ditto.
1519        (WTF::::removeAndInvalidate): Ditto.
1520        (WTF::::remove): Ditto.
1521        (WTF::::rehash): Ditto.
1522        (WTF::::checkTableConsistency): The assertion for !shouldExpand() was not correct - this
1523        function returns true for tables with m_table == 0.
1524        (WTF::::checkTableConsistencyExceptSize): Call checkValueConsistency for key. Potentially,
1525        we could do the same for values.
1526
1527        * wtf/HashTraits.h:
1528        (WTF::GenericHashTraits::checkValueConsistency): An empty function that can be overridden
1529        to add checks. Currently, the only override is for pointer hashes.
1530
1531        * wtf/RefPtrHashMap.h: (WTF::::remove): Updated for checkTableConsistency renaming.
1532
15332010-01-26  Lyon Chen  <liachen@rim.com>
1534
1535        Reviewed by Maciej Stachowiak.
1536
1537        Opcode.h use const void* for Opcode cause error #1211 for RVCT compiler
1538        https://bugs.webkit.org/show_bug.cgi?id=33902
1539
1540        * bytecode/Opcode.h:
1541
15422010-01-26  Steve Falkenburg  <sfalken@apple.com>
1543
1544        Reviewed by Oliver Hunt.
1545
1546        Windows build references non-existent include paths
1547        https://bugs.webkit.org/show_bug.cgi?id=34175
1548
1549        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1550        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
1551        * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
1552        * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
1553        * JavaScriptCore.vcproj/testapi/testapi.vcproj:
1554        * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
1555
15562010-01-26  Oliver Hunt  <oliver@apple.com>
1557
1558        Reviewed by Geoffrey Garen.
1559
1560        Using JavaScriptCore API with a webkit vended context can result in slow script dialog
1561        https://bugs.webkit.org/show_bug.cgi?id=34172
1562
1563        Make the APIShim correctly increment and decrement the timeout
1564        entry counter.
1565
1566        * API/APIShims.h:
1567        (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
1568        (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
1569        (JSC::APICallbackShim::APICallbackShim):
1570        (JSC::APICallbackShim::~APICallbackShim):
1571
15722010-01-26  Simon Hausmann  <simon.hausmann@nokia.com>
1573
1574        [Qt] Fix compilation of QtScript with non-gcc compilers
1575
1576        Variable length stack arrays are a gcc extension. Use QVarLengthArray
1577        as a more portable solution that still tries to allocate on the stack
1578        first.
1579
1580        * qt/api/qscriptvalue_p.h:
1581        (QScriptValuePrivate::call):
1582
15832010-01-26  Simon Hausmann  <simon.hausmann@nokia.com>
1584
1585        Reviewed by Tor Arne Vestbø.
1586
1587        [Qt] Fix the build on platforms without JIT support.
1588
1589        The JIT support should be determined at compile-time via wtf/Platform.h
1590
1591        * qt/api/QtScript.pro:
1592
15932010-01-26  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
1594
1595        Reviewed by Simon Hausmann.
1596
1597        First steps of the QtScript API.
1598
1599        Two new classes were created; QScriptEngine and QScriptValue.
1600        The first should encapsulate a javascript context and the second a script
1601        value.
1602
1603        This API is still in development, so it isn't compiled by default.
1604        To trigger compilation, pass --qmakearg="CONFIG+=build-qtscript" to
1605        build-webkit.
1606
1607        https://bugs.webkit.org/show_bug.cgi?id=32565
1608
1609        * qt/api/QtScript.pro: Added.
1610        * qt/api/qscriptconverter_p.h: Added.
1611        (QScriptConverter::toString):
1612        * qt/api/qscriptengine.cpp: Added.
1613        (QScriptEngine::QScriptEngine):
1614        (QScriptEngine::~QScriptEngine):
1615        (QScriptEngine::evaluate):
1616        (QScriptEngine::collectGarbage):
1617        * qt/api/qscriptengine.h: Added.
1618        * qt/api/qscriptengine_p.cpp: Added.
1619        (QScriptEnginePrivate::QScriptEnginePrivate):
1620        (QScriptEnginePrivate::~QScriptEnginePrivate):
1621        (QScriptEnginePrivate::evaluate):
1622        * qt/api/qscriptengine_p.h: Added.
1623        (QScriptEnginePrivate::get):
1624        (QScriptEnginePrivate::collectGarbage):
1625        (QScriptEnginePrivate::makeJSValue):
1626        (QScriptEnginePrivate::context):
1627        * qt/api/qscriptvalue.cpp: Added.
1628        (QScriptValue::QScriptValue):
1629        (QScriptValue::~QScriptValue):
1630        (QScriptValue::isValid):
1631        (QScriptValue::isBool):
1632        (QScriptValue::isBoolean):
1633        (QScriptValue::isNumber):
1634        (QScriptValue::isNull):
1635        (QScriptValue::isString):
1636        (QScriptValue::isUndefined):
1637        (QScriptValue::isError):
1638        (QScriptValue::isObject):
1639        (QScriptValue::isFunction):
1640        (QScriptValue::toString):
1641        (QScriptValue::toNumber):
1642        (QScriptValue::toBool):
1643        (QScriptValue::toBoolean):
1644        (QScriptValue::toInteger):
1645        (QScriptValue::toInt32):
1646        (QScriptValue::toUInt32):
1647        (QScriptValue::toUInt16):
1648        (QScriptValue::call):
1649        (QScriptValue::engine):
1650        (QScriptValue::operator=):
1651        (QScriptValue::equals):
1652        (QScriptValue::strictlyEquals):
1653        * qt/api/qscriptvalue.h: Added.
1654        (QScriptValue::):
1655        * qt/api/qscriptvalue_p.h: Added.
1656        (QScriptValuePrivate::):
1657        (QScriptValuePrivate::get):
1658        (QScriptValuePrivate::QScriptValuePrivate):
1659        (QScriptValuePrivate::isValid):
1660        (QScriptValuePrivate::isBool):
1661        (QScriptValuePrivate::isNumber):
1662        (QScriptValuePrivate::isNull):
1663        (QScriptValuePrivate::isString):
1664        (QScriptValuePrivate::isUndefined):
1665        (QScriptValuePrivate::isError):
1666        (QScriptValuePrivate::isObject):
1667        (QScriptValuePrivate::isFunction):
1668        (QScriptValuePrivate::toString):
1669        (QScriptValuePrivate::toNumber):
1670        (QScriptValuePrivate::toBool):
1671        (QScriptValuePrivate::toInteger):
1672        (QScriptValuePrivate::toInt32):
1673        (QScriptValuePrivate::toUInt32):
1674        (QScriptValuePrivate::toUInt16):
1675        (QScriptValuePrivate::equals):
1676        (QScriptValuePrivate::strictlyEquals):
1677        (QScriptValuePrivate::assignEngine):
1678        (QScriptValuePrivate::call):
1679        (QScriptValuePrivate::engine):
1680        (QScriptValuePrivate::context):
1681        (QScriptValuePrivate::value):
1682        (QScriptValuePrivate::object):
1683        (QScriptValuePrivate::inherits):
1684        (QScriptValuePrivate::isJSBased):
1685        (QScriptValuePrivate::isNumberBased):
1686        (QScriptValuePrivate::isStringBased):
1687        * qt/api/qtscriptglobal.h: Added.
1688        * qt/tests/qscriptengine/qscriptengine.pro: Added.
1689        * qt/tests/qscriptengine/tst_qscriptengine.cpp: Added.
1690        (tst_QScriptEngine::tst_QScriptEngine):
1691        (tst_QScriptEngine::~tst_QScriptEngine):
1692        (tst_QScriptEngine::init):
1693        (tst_QScriptEngine::cleanup):
1694        (tst_QScriptEngine::collectGarbage):
1695        (tst_QScriptEngine::evaluate):
1696        * qt/tests/qscriptvalue/qscriptvalue.pro: Added.
1697        * qt/tests/qscriptvalue/tst_qscriptvalue.cpp: Added.
1698        (tst_QScriptValue::tst_QScriptValue):
1699        (tst_QScriptValue::~tst_QScriptValue):
1700        (tst_QScriptValue::init):
1701        (tst_QScriptValue::cleanup):
1702        (tst_QScriptValue::ctor):
1703        (tst_QScriptValue::toString_data):
1704        (tst_QScriptValue::toString):
1705        (tst_QScriptValue::copyConstructor_data):
1706        (tst_QScriptValue::copyConstructor):
1707        (tst_QScriptValue::assignOperator_data):
1708        (tst_QScriptValue::assignOperator):
1709        (tst_QScriptValue::dataSharing):
1710        (tst_QScriptValue::constructors_data):
1711        (tst_QScriptValue::constructors):
1712        (tst_QScriptValue::call):
1713        * qt/tests/tests.pri: Added.
1714        * qt/tests/tests.pro: Added.
1715
17162010-01-25  Dmitry Titov  <dimich@chromium.org>
1717
1718        Reviewed by David Levin.
1719
1720        Fix Chromium Linux tests: the pthread functions on Linux produce segfault if they receive 0 thread handle.
1721        After r53714, we can have 0 thread handles passed to pthread_join and pthread_detach if corresponding threads
1722        were already terminated and their threadMap entries cleared.
1723        Add a 0 check.
1724
1725        * wtf/ThreadingPthreads.cpp:
1726        (WTF::waitForThreadCompletion):
1727        (WTF::detachThread):
1728
17292010-01-24  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1730
1731        Reviewed by Maciej Stachowiak.
1732
1733        Refactor JITStubs.cpp so that DEFINE_STUB_FUNCTION is only used once for each function
1734        https://bugs.webkit.org/show_bug.cgi?id=33866
1735
1736        Place the guard USE(JSVALUE32_64) inside the body of the DEFINE_STUB_FUNCTION
1737        macro for those functions that are always present.
1738
1739        * jit/JITStubs.cpp:
1740        (JSC::DEFINE_STUB_FUNCTION):
1741
17422010-01-22  Kevin Watters  <kevinwatters@gmail.com>
1743
1744        Reviewed by Kevin Ollivier.
1745
1746        [wx] Remove the Bakefile build system, which is no longer being used.
1747
1748        https://bugs.webkit.org/show_bug.cgi?id=34022
1749
1750        * JavaScriptCoreSources.bkl: Removed.
1751        * jscore.bkl: Removed.
1752
17532010-01-22  Steve Falkenburg  <sfalken@apple.com>
1754
1755        Reviewed by Darin Adler.
1756
1757        https://bugs.webkit.org/show_bug.cgi?id=34025
1758        Enable client-based Geolocation abstraction for Mac, Windows AppleWebKit targets.
1759
1760        * Configurations/FeatureDefines.xcconfig:
1761
17622010-01-22  Dmitry Titov  <dimich@chromium.org>
1763
1764        Not reviewed, attempted Snow Leopard build fix.
1765
1766        * wtf/ThreadingPthreads.cpp: Add a forward declaration of a function which is not 'static'.
1767
17682009-01-22  Dmitry Titov  <dimich@chromium.org>
1769
1770        Reviewed by Maciej Stachowiak.
1771
1772        Fix the leak of ThreadIdentifiers in threadMap across threads.
1773        https://bugs.webkit.org/show_bug.cgi?id=32689
1774
1775        Test is added to DumpRenderTree.mm.
1776
1777        * Android.mk: Added file ThreadIdentifierDataPthreads.(h|cpp) to build.
1778        * Android.v8.wtf.mk: Ditto.
1779        * GNUmakefile.am: Ditto.
1780        * JavaScriptCore.gyp/JavaScriptCore.gyp: Ditto.
1781        * JavaScriptCore.gypi: Ditto.
1782        * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
1783
1784        * wtf/ThreadIdentifierDataPthreads.cpp: Added. Contains custom implementation of thread-specific data that uses custom destructor.
1785        (WTF::ThreadIdentifierData::~ThreadIdentifierData): Removes the ThreadIdentifier from the threadMap.
1786        (WTF::ThreadIdentifierData::identifier):
1787        (WTF::ThreadIdentifierData::initialize):
1788        (WTF::ThreadIdentifierData::destruct): Custom thread-specific destructor. Resets the value for the key again to cause second invoke.
1789        (WTF::ThreadIdentifierData::initializeKeyOnceHelper):
1790        (WTF::ThreadIdentifierData::initializeKeyOnce): Need to use pthread_once since initialization may come on any thread(s).
1791        * wtf/ThreadIdentifierDataPthreads.h: Added.
1792        (WTF::ThreadIdentifierData::ThreadIdentifierData):
1793
1794        * wtf/Threading.cpp:
1795        (WTF::threadEntryPoint): Move initializeCurrentThreadInternal to after the lock to make
1796                                 sure it is invoked when ThreadIdentifier is already established.
1797
1798        * wtf/Threading.h: Rename setThreadNameInternal -> initializeCurrentThreadInternal since it does more then only set the name now.
1799        * wtf/ThreadingNone.cpp:
1800        (WTF::initializeCurrentThreadInternal): Ditto.
1801        * wtf/ThreadingWin.cpp:
1802        (WTF::initializeCurrentThreadInternal): Ditto.
1803        (WTF::initializeThreading): Ditto.
1804        * wtf/gtk/ThreadingGtk.cpp:
1805        (WTF::initializeCurrentThreadInternal): Ditto.
1806        * wtf/qt/ThreadingQt.cpp:
1807        (WTF::initializeCurrentThreadInternal): Ditto.
1808
1809        * wtf/ThreadingPthreads.cpp:
1810        (WTF::establishIdentifierForPthreadHandle):
1811        (WTF::clearPthreadHandleForIdentifier): Make it not 'static' so the ~ThreadIdentifierData() in another file can call it.
1812        (WTF::initializeCurrentThreadInternal): Set the thread-specific data. The ThreadIdentifier is already established by creating thread.
1813        (WTF::waitForThreadCompletion): Remove call to clearPthreadHandleForIdentifier(threadID) since it is now done in ~ThreadIdentifierData().
1814        (WTF::detachThread): Ditto.
1815        (WTF::currentThread): Use the thread-specific data to get the ThreadIdentifier. It's many times faster then Mutex-protected iteration through the map.
1816                              Also, set the thread-specific data if called first time on the thread.
1817
18182010-01-21  Kwang Yul Seo  <skyul@company100.net>
1819
1820        Reviewed by Alexey Proskuryakov.
1821
1822        Add ThreadSpecific for ENABLE(SINGLE_THREADED)
1823        https://bugs.webkit.org/show_bug.cgi?id=33878
1824
1825        Implement ThreadSpecific with a simple getter/setter
1826        when ENABLE(SINGLE_THREADED) is true.
1827
1828        Due to the change in https://bugs.webkit.org/show_bug.cgi?id=33236,
1829        an implementation of ThreadSpecific must be available to build WebKit.
1830        This causes a build failure for platforms without a proper
1831        ThreadSpecific implementation.
1832
1833        * wtf/ThreadSpecific.h:
1834        (WTF::::ThreadSpecific):
1835        (WTF::::~ThreadSpecific):
1836        (WTF::::get):
1837        (WTF::::set):
1838        (WTF::::destroy):
1839
18402010-01-21  Kwang Yul Seo  <skyul@company100.net>
1841
1842        Reviewed by Maciej Stachowiak.
1843
1844        Add fastStrDup to FastMalloc
1845        https://bugs.webkit.org/show_bug.cgi?id=33937
1846
1847        The new string returned by fastStrDup is obtained with fastMalloc,
1848        and can be freed with fastFree. This makes the memory management
1849        more consistent because we don't need to keep strdup allocated pointers
1850        and free them with free(). Instead we can use fastFree everywhere.
1851
1852        * wtf/FastMalloc.cpp:
1853        (WTF::fastStrDup):
1854        * wtf/FastMalloc.h:
1855
18562010-01-21  Brady Eidson  <beidson@apple.com>
1857
1858        Reviewed by Maciej Stachowiak.
1859
1860        history.back() for same-document history traversals isn't synchronous as the specification states.
1861        <rdar://problem/7535011> and https://bugs.webkit.org/show_bug.cgi?id=33538
1862
1863        * wtf/Platform.h: Add a "HISTORY_ALWAYS_ASYNC" enable and turn it on for Chromium.
1864
18652010-01-21  Geoffrey Garen  <ggaren@apple.com>
1866
1867        Reviewed by Oliver Hunt.
1868
1869        Always create a prototype for automatically managed classes.
1870
1871        This fixes some errors where prototype chains were not correctly hooked
1872        up, and also ensures that API classes work correctly with features like
1873        instanceof.
1874
1875        * API/JSClassRef.cpp:
1876        (OpaqueJSClass::create): Cleaned up some of this code. Also changed it
1877        to always create a prototype class.
1878
1879        * API/tests/testapi.c:
1880        (Derived2_class):
1881        (main): Fixed a null value crash in the exception checking code.
1882        * API/tests/testapi.js: Added some tests for the case where a prototype
1883        chain would not be hooked up correctly.
1884
18852010-01-21  Oliver Hunt  <oliver@apple.com>
1886
1887        Reviewed by Geoff Garen.
1888
1889        Force JSC to create a prototype chain for API classes with a
1890        parent class but no static functions.
1891
1892        * API/JSClassRef.cpp:
1893        (OpaqueJSClass::create):
1894
18952010-01-21  Kent Hansen  <kent.hansen@nokia.com>
1896
1897        Reviewed by Geoffrey Garen.
1898
1899        Object.getOwnPropertyDescriptor always returns undefined for JS API objects
1900        https://bugs.webkit.org/show_bug.cgi?id=33946
1901
1902        Ideally the getOwnPropertyDescriptor() reimplementation should return an
1903        access descriptor that wraps the property getter and setter callbacks, but
1904        that approach is much more involved than returning a value descriptor.
1905        Keep it simple for now.
1906
1907        * API/JSCallbackObject.h:
1908        * API/JSCallbackObjectFunctions.h:
1909        (JSC::::getOwnPropertyDescriptor):
1910        * API/tests/testapi.js:
1911
19122010-01-20  Mark Rowe  <mrowe@apple.com>
1913
1914        Build fix.
1915
1916        * wtf/FastMalloc.cpp:
1917        (WTF::TCMalloc_PageHeap::initializeScavenger): Remove unnecessary function call.
1918
19192010-01-20  Mark Rowe  <mrowe@apple.com>
1920
1921        Reviewed by Oliver Hunt.
1922
1923        Use the inline i386 assembly for x86_64 as well rather than falling back to using pthread mutexes.
1924
1925        * wtf/TCSpinLock.h:
1926        (TCMalloc_SpinLock::Lock):
1927        (TCMalloc_SpinLock::Unlock):
1928        (TCMalloc_SlowLock):
1929
19302010-01-20  Mark Rowe  <mrowe@apple.com>
1931
1932        Reviewed by Oliver Hunt.
1933
1934        <rdar://problem/7215063> Use GCD instead of an extra thread for FastMalloc scavenging on platforms where it is supported
1935
1936        Abstract the background scavenging slightly so that an alternate implementation that uses GCD can be used on platforms
1937        where it is supported.
1938
1939        * wtf/FastMalloc.cpp:
1940        (WTF::TCMalloc_PageHeap::init):
1941        (WTF::TCMalloc_PageHeap::initializeScavenger):
1942        (WTF::TCMalloc_PageHeap::signalScavenger):
1943        (WTF::TCMalloc_PageHeap::shouldContinueScavenging):
1944        (WTF::TCMalloc_PageHeap::Delete):
1945        (WTF::TCMalloc_PageHeap::periodicScavenge):
1946        * wtf/Platform.h:
1947
19482010-01-20  Geoffrey Garen  <ggaren@apple.com>
1949
1950        Reviewed by Oliver Hunt.
1951
1952        <rdar://problem/7562708> REGRESSION(53460): Heap::destroy may not run
1953        all destructors
1954
1955        * runtime/Collector.cpp:
1956        (JSC::Heap::freeBlocks): Instead of fully marking protected objects,
1957        just set their mark bits. This prevents protected objects from keeping
1958        unprotected objects alive. Destructor order is not guaranteed, so it's
1959        OK to destroy objects pointed to by protected objects before destroying
1960        protected objects.
1961
19622010-01-19  David Levin  <levin@chromium.org>
1963
1964        Reviewed by Oliver Hunt.
1965
1966        CrossThreadCopier needs to support ThreadSafeShared better.
1967        https://bugs.webkit.org/show_bug.cgi?id=33698
1968
1969        * wtf/TypeTraits.cpp: Added tests for the new type traits.
1970        * wtf/TypeTraits.h:
1971        (WTF::IsSubclass): Determines if a class is a derived from another class.
1972        (WTF::IsSubclassOfTemplate): Determines if a class is a derived from a
1973        template class (with one parameter that is unknown).
1974        (WTF::RemoveTemplate): Reveals the type for a template parameter.
1975
19762010-01-20  Steve Falkenburg  <sfalken@apple.com>
1977
1978        Reviewed by Darin Adler and Adam Roben.
1979
1980        Feature defines are difficult to maintain on Windows builds
1981        https://bugs.webkit.org/show_bug.cgi?id=33883
1982
1983        FeatureDefines.vsprops are now maintained in a way similar to
1984        Configurations/FeatureDefines.xcconfig, with the added advantage
1985        of having a single FeatureDefines file across all projects.
1986
1987        * Configurations/FeatureDefines.xcconfig: Add comments about keeping feature definitions in sync.
1988        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add FeatureDefines.vsprops inherited property sheet.
1989        * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add FeatureDefines.vsprops inherited property sheet.
1990
19912010-01-20  Csaba Osztrogonác  <ossy@webkit.org>
1992
1993        [Qt] Unreviewed buildfix for r53547.
1994
1995        * DerivedSources.pro:
1996
19972010-01-20  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
1998
1999        Reviewed by Simon Hausmann.
2000
2001        [Qt] Make extraCompilers for generated sources depend on their scripts
2002
2003        * DerivedSources.pro:
2004
20052010-01-19  Brian Weinstein  <bweinstein@apple.com>
2006
2007        Reviewed by Tim Hatcher.
2008
2009        When JavaScriptCore calls Debugger::Exception, have it pass a
2010        hasHandler variable that represents if exception is being handled
2011        in the same function (not in a parent on the call stack).
2012
2013        This just adds a new parameter, no behavior is changed.
2014
2015        * debugger/Debugger.h:
2016        * interpreter/Interpreter.cpp:
2017        (JSC::Interpreter::throwException):
2018
20192010-01-18  Maciej Stachowiak  <mjs@apple.com>
2020
2021        Reviewed by Adam Barth.
2022
2023        Inline functions that are hot in DOM manipulation
2024        https://bugs.webkit.org/show_bug.cgi?id=33820
2025
2026        (3% speedup on Dromaeo DOM Core tests)
2027
2028        * runtime/WeakGCMap.h:
2029        (JSC::::get): inline
2030
20312010-01-19  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2032
2033        Unreviewed build fix for JIT with RVCT.
2034
2035        Remove IMPORT statement; cti_vm_throw is already defined in JITStubs.h.
2036        Remove extra ')'.
2037
2038        * jit/JITStubs.cpp:
2039        (JSC::ctiVMThrowTrampoline):
2040
20412010-01-19  Geoffrey Garen  <ggaren@apple.com>
2042
2043        Reviewed by Oliver Hunt.
2044
2045        REGRESSION (52082): Crash on worker thread when reloading http://radnan.public.iastate.edu/procedural/
2046        https://bugs.webkit.org/show_bug.cgi?id=33826
2047
2048        This bug was caused by a GC-protected object being destroyed early by
2049        Heap::destroy. Clients of the GC protect APIs (reasonably) expect pointers
2050        to GC-protected memory to be valid.
2051
2052        The solution is to do two passes of tear-down in Heap::destroy. The first
2053        pass tears down all unprotected objects. The second pass ASSERTs that all
2054        previously protected objects are now unprotected, and then tears down
2055        all perviously protected objects. These two passes simulate the two passes
2056        that would have been required to free a protected object during normal GC.
2057
2058        * API/JSContextRef.cpp: Removed some ASSERTs that have moved into Heap.
2059
2060        * runtime/Collector.cpp:
2061        (JSC::Heap::destroy): Moved ASSERTs to here.
2062        (JSC::Heap::freeBlock): Tidied up the use of didShrink by moving its
2063        setter to the function that does the shrinking.
2064        (JSC::Heap::freeBlocks): Implemented above algorithm.
2065        (JSC::Heap::shrinkBlocks): Tidied up the use of didShrink.
2066
20672010-01-19  Gavin Barraclough  <barraclough@apple.com>
2068
2069        Reviewed by NOBODY (build fix).
2070
2071        Reverting r53455, breaks 2 javascriptcore tests.
2072
2073        * API/JSContextRef.cpp:
2074        * runtime/Collector.cpp:
2075        (JSC::Heap::destroy):
2076        (JSC::Heap::freeBlock):
2077        (JSC::Heap::freeBlocks):
2078        (JSC::Heap::shrinkBlocks):
2079
20802010-01-18  Gavin Barraclough  <barraclough@apple.com>
2081
2082        Reviewed by NOBODY (build fix).
2083
2084        Revert r53454, since it causes much sadness in this world.
2085
2086        * runtime/UString.cpp:
2087        (JSC::UString::spliceSubstringsWithSeparators):
2088        (JSC::UString::replaceRange):
2089        * runtime/UStringImpl.cpp:
2090        (JSC::UStringImpl::baseSharedBuffer):
2091        (JSC::UStringImpl::sharedBuffer):
2092        (JSC::UStringImpl::~UStringImpl):
2093        * runtime/UStringImpl.h:
2094        (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield):
2095        (JSC::UntypedPtrAndBitfield::asPtr):
2096        (JSC::UntypedPtrAndBitfield::operator&=):
2097        (JSC::UntypedPtrAndBitfield::operator|=):
2098        (JSC::UntypedPtrAndBitfield::operator&):
2099        (JSC::UStringImpl::create):
2100        (JSC::UStringImpl::cost):
2101        (JSC::UStringImpl::isIdentifier):
2102        (JSC::UStringImpl::setIsIdentifier):
2103        (JSC::UStringImpl::ref):
2104        (JSC::UStringImpl::deref):
2105        (JSC::UStringImpl::checkConsistency):
2106        (JSC::UStringImpl::UStringImpl):
2107        (JSC::UStringImpl::bufferOwnerString):
2108        (JSC::UStringImpl::bufferOwnership):
2109        (JSC::UStringImpl::isStatic):
2110        * wtf/StringHashFunctions.h:
2111        (WTF::stringHash):
2112
21132010-01-18  Geoffrey Garen  <ggaren@apple.com>
2114
2115        Reviewed by Oliver Hunt.
2116
2117        REGRESSION (52082): Crash on worker thread when reloading http://radnan.public.iastate.edu/procedural/
2118        https://bugs.webkit.org/show_bug.cgi?id=33826
2119
2120        This bug was caused by a GC-protected object being destroyed early by
2121        Heap::destroy. Clients of the GC protect APIs (reasonably) expect pointers
2122        to GC-protected memory to be valid.
2123
2124        The solution is to do two passes of tear-down in Heap::destroy. The first
2125        pass tears down all unprotected objects. The second pass ASSERTs that all
2126        previously protected objects are now unprotected, and then tears down
2127        all perviously protected objects. These two passes simulate the two passes
2128        that would have been required to free a protected object during normal GC.
2129
2130        * API/JSContextRef.cpp: Removed some ASSERTs that have moved into Heap.
2131
2132        * runtime/Collector.cpp:
2133        (JSC::Heap::destroy): Moved ASSERTs to here.
2134        (JSC::Heap::freeBlock): Tidied up the use of didShrink by moving its
2135        setter to the function that does the shrinking.
2136        (JSC::Heap::freeBlocks): Implemented above algorithm.
2137        (JSC::Heap::shrinkBlocks): Tidied up the use of didShrink.
2138
21392010-01-18  Gavin Barraclough  <barraclough@apple.com>
2140
2141        Reviewed by Oliver Hunt.
2142
2143        https://bugs.webkit.org/show_bug.cgi?id=33731
2144        Remove UntypedPtrAndBitfield from UStringImpl (akin to PtrAndFlags).
2145
2146        This break the OS X Leaks tool.  Instead, free up some more bits from the refCount.
2147
2148        * runtime/UStringImpl.cpp:
2149        (JSC::UStringImpl::sharedBuffer):
2150        (JSC::UStringImpl::~UStringImpl):
2151        * runtime/UStringImpl.h:
2152        (JSC::UStringImpl::cost):
2153        (JSC::UStringImpl::checkConsistency):
2154        (JSC::UStringImpl::UStringImpl):
2155        (JSC::UStringImpl::bufferOwnerString):
2156        (JSC::UStringImpl::):
2157        * wtf/StringHashFunctions.h:
2158        (WTF::stringHash):
2159
21602010-01-18  Kent Tamura  <tkent@chromium.org>
2161
2162        Reviewed by Darin Adler.
2163
2164        HTMLInputElement::valueAsDate setter support for type=month.
2165        https://bugs.webkit.org/show_bug.cgi?id=33021
2166
2167        Expose the following functions to be used by WebCore:
2168         - WTF::msToyear()
2169         - WTF::dayInYear()
2170         - WTF::monthFromDayInYear()
2171         - WTF::dayInMonthFromDayInYear()
2172
2173        * JavaScriptCore.exp:
2174        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2175        * wtf/DateMath.cpp:
2176        (WTF::msToYear): Remove "static inline".
2177        (WTF::dayInYear): Remove "static inline".
2178        (WTF::monthFromDayInYear): Remove "static inline".
2179        (WTF::dayInMonthFromDayInYear): Remove "static inline".
2180        * wtf/DateMath.h: Declare the above functions.
2181
21822010-01-18  Darin Adler  <darin@apple.com>
2183
2184        Fix build by reverting the previous change.
2185
2186        * runtime/UString.h: Rolled out the FastAllocBase base class.
2187        It was making UString larger, and therefore JSString larger,
2188        and too big for a garbage collection cell.
2189
2190        This raises the unpleasant possibility that many classes became
2191        larger because we added the FastAllocBase base class. I am
2192        worried about this, and it needs to be investigated.
2193
21942010-01-18  Zoltan Horvath  <zoltan@webkit.org>
2195
2196        Reviewed by Darin Adler.
2197
2198        Allow custom memory allocation control for UString class
2199        https://bugs.webkit.org/show_bug.cgi?id=27831
2200
2201        Inherits the following class from FastAllocBase because it is
2202        instantiated by 'new' and no need to be copyable:
2203
2204        class name     - instantiated at:
2205        classs UString - JavaScriptCore/runtime/UString.cpp:160
2206
2207        * runtime/UString.h:
2208
22092010-01-18  Evan Cheng  <evan.cheng@apple.com>
2210
2211        Reviewed by Darin Adler.
2212
2213        Add some ALWAYS_INLINE for key functions not inlined by some versions of GCC.
2214        rdar://problem/7553780
2215
2216        * runtime/JSObject.h:
2217        (JSC::JSObject::getPropertySlot): ALWAYS_INLINE both overloads.
2218        * runtime/JSString.h:
2219        (JSC::JSString::JSString): ALWAYS_INLINE the version that takes a UString.
2220        * runtime/UString.h:
2221        (JSC::operator==): ALWAYS_INLINE the version that compares two UString objects.
2222
22232010-01-18  Csaba Osztrogonác  <ossy@webkit.org>
2224
2225        Reviewed by Darin Adler.
2226
2227        Delete dftables-xxxxxxxx.in files automatically.
2228        https://bugs.webkit.org/show_bug.cgi?id=33796
2229
2230        * pcre/dftables: unlink unnecessary temporary file.
2231
22322010-01-18  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2233
2234        Reviewed by Simon Hausmann.
2235
2236        [Qt] Force qmake to generate a single makefile for DerivedSources.pro
2237
2238        * DerivedSources.pro:
2239
22402010-01-18  Csaba Osztrogonác  <ossy@webkit.org>
2241
2242        Rubber-stamped by Gustavo Noronha Silva.
2243
2244        Rolling out r53391 and r53392 because of random crashes on buildbots.
2245        https://bugs.webkit.org/show_bug.cgi?id=33731
2246
2247        * bytecode/CodeBlock.h:
2248        (JSC::CallLinkInfo::seenOnce):
2249        (JSC::CallLinkInfo::setSeen):
2250        (JSC::MethodCallLinkInfo::MethodCallLinkInfo):
2251        (JSC::MethodCallLinkInfo::seenOnce):
2252        (JSC::MethodCallLinkInfo::setSeen):
2253        * jit/JIT.cpp:
2254        (JSC::JIT::unlinkCall):
2255        * jit/JITPropertyAccess.cpp:
2256        (JSC::JIT::patchMethodCallProto):
2257        * runtime/UString.cpp:
2258        (JSC::UString::spliceSubstringsWithSeparators):
2259        (JSC::UString::replaceRange):
2260        * runtime/UString.h:
2261        * runtime/UStringImpl.cpp:
2262        (JSC::UStringImpl::baseSharedBuffer):
2263        (JSC::UStringImpl::sharedBuffer):
2264        (JSC::UStringImpl::~UStringImpl):
2265        * runtime/UStringImpl.h:
2266        (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield):
2267        (JSC::UntypedPtrAndBitfield::asPtr):
2268        (JSC::UntypedPtrAndBitfield::operator&=):
2269        (JSC::UntypedPtrAndBitfield::operator|=):
2270        (JSC::UntypedPtrAndBitfield::operator&):
2271        (JSC::UStringImpl::create):
2272        (JSC::UStringImpl::cost):
2273        (JSC::UStringImpl::isIdentifier):
2274        (JSC::UStringImpl::setIsIdentifier):
2275        (JSC::UStringImpl::ref):
2276        (JSC::UStringImpl::deref):
2277        (JSC::UStringImpl::checkConsistency):
2278        (JSC::UStringImpl::UStringImpl):
2279        (JSC::UStringImpl::bufferOwnerString):
2280        (JSC::UStringImpl::bufferOwnership):
2281        (JSC::UStringImpl::isStatic):
2282        * wtf/StringHashFunctions.h:
2283        (WTF::stringHash):
2284
22852010-01-18  Simon Hausmann  <simon.hausmann@nokia.com>
2286
2287        Reviewed by Kenneth Rohde Christiansen.
2288
2289        Fix the build with strict gcc and RVCT versions: It's not legal to cast a
2290        pointer to a function to a void* without an intermediate cast to a non-pointer
2291        type. A cast to a ptrdiff_t inbetween fixes it.
2292
2293        * runtime/JSString.h:
2294        (JSC::Fiber::JSString):
2295
22962010-01-15  Gavin Barraclough  <barraclough@apple.com>
2297
2298        Reviewed by Oliver Hunt.
2299
2300        https://bugs.webkit.org/show_bug.cgi?id=33731
2301        Remove UntypedPtrAndBitfield from UStringImpl (akin to PtrAndFlags).
2302
2303        This break the OS X Leaks tool.  Instead, free up some more bits from the refCount.
2304
2305        * runtime/UStringImpl.cpp:
2306        (JSC::UStringImpl::sharedBuffer):
2307        (JSC::UStringImpl::~UStringImpl):
2308        * runtime/UStringImpl.h:
2309        (JSC::UStringImpl::cost):
2310        (JSC::UStringImpl::checkConsistency):
2311        (JSC::UStringImpl::UStringImpl):
2312        (JSC::UStringImpl::bufferOwnerString):
2313        (JSC::UStringImpl::):
2314        * wtf/StringHashFunctions.h:
2315        (WTF::stringHash):
2316
23172010-01-15  Gavin Barraclough  <barraclough@apple.com>
2318
2319        Reviewed by Oliver Hunt.
2320
2321        https://bugs.webkit.org/show_bug.cgi?id=33731
2322        Remove uses of PtrAndFlags from JIT data stuctures.
2323
2324        These break the OS X Leaks tool.  Free up a bit in CallLinkInfo, and invalid
2325        permutation of pointer states in MethodCallLinkInfo to represent the removed bits.
2326
2327        * bytecode/CodeBlock.h:
2328        (JSC::CallLinkInfo::seenOnce):
2329        (JSC::CallLinkInfo::setSeen):
2330        (JSC::MethodCallLinkInfo::MethodCallLinkInfo):
2331        (JSC::MethodCallLinkInfo::seenOnce):
2332        (JSC::MethodCallLinkInfo::setSeen):
2333        * jit/JIT.cpp:
2334        (JSC::JIT::unlinkCall):
2335        * jit/JITPropertyAccess.cpp:
2336        (JSC::JIT::patchMethodCallProto):
2337        * runtime/UString.h:
2338
23392010-01-16  Maciej Stachowiak  <mjs@apple.com>
2340
2341        Reviewed by Oliver Hunt.
2342
2343        Cache JS string values made from DOM strings (Dromaeo speedup)
2344        https://bugs.webkit.org/show_bug.cgi?id=33768
2345        <rdar://problem/7353576>
2346
2347        * runtime/JSString.h:
2348        (JSC::jsStringWithFinalizer): Added new mechanism for a string to have an optional
2349        finalizer callback, for the benefit of weak-referencing caches.
2350        (JSC::):
2351        (JSC::Fiber::JSString):
2352        (JSC::Fiber::~JSString):
2353        * runtime/JSString.cpp:
2354        (JSC::JSString::resolveRope): Clear fibers so this doesn't look like a string with a finalizer.
2355        * runtime/WeakGCMap.h: Include "Collector.h" to make this header includable by itself.
2356
23572010-01-15  Sam Weinig  <sam@webkit.org>
2358
2359        Reviewed by Maciej Stachowiak.
2360
2361        Fix for <rdar://problem/7548432>
2362        Add ALWAYS_INLINE to jsLess for a 1% speedup on llvm-gcc.
2363
2364        * runtime/Operations.h:
2365        (JSC::jsLess):
2366
23672010-01-14  Geoffrey Garen  <ggaren@apple.com>
2368
2369        Reviewed by Oliver Hunt.
2370
2371        REGRESISON: Google maps buttons not working properly
2372        https://bugs.webkit.org/show_bug.cgi?id=31871
2373
2374        REGRESSION(r52948): JavaScript exceptions thrown on Google Maps when
2375        getting directions for a second time
2376        https://bugs.webkit.org/show_bug.cgi?id=33446
2377
2378        SunSpider and v8 report no change.
2379
2380        * interpreter/Interpreter.cpp:
2381        (JSC::Interpreter::tryCacheGetByID): Update our cached offset in case
2382        flattening the dictionary changed any of its offsets.
2383
2384        * jit/JITStubs.cpp:
2385        (JSC::JITThunks::tryCacheGetByID):
2386        (JSC::DEFINE_STUB_FUNCTION):
2387        * runtime/Operations.h:
2388        (JSC::normalizePrototypeChain): ditto
2389
23902010-01-14  Gavin Barraclough  <barraclough@apple.com>
2391
2392        Reviewed by Oliver Hunt.
2393
2394        https://bugs.webkit.org/show_bug.cgi?id=33705
2395        UStringImpl::create() should use internal storage
2396
2397        When creating a UStringImpl copying of a UChar*, we can use an internal buffer,
2398        by calling UStringImpl::tryCreateUninitialized().
2399
2400        Also, remove duplicate of copyChars from JSString, call UStringImpl's version.
2401
2402        Small (max 0.5%) progression on Sunspidey.
2403
2404        * runtime/JSString.cpp:
2405        (JSC::JSString::resolveRope):
2406        * runtime/UStringImpl.h:
2407        (JSC::UStringImpl::create):
2408
24092010-01-14  Gavin Barraclough  <barraclough@apple.com>
2410
2411        Reviewed by Sam Weinig.
2412
2413        Make naming & behaviour of UString[Impl] methods more consistent.
2414        https://bugs.webkit.org/show_bug.cgi?id=33702
2415
2416        UString::create() creates a copy of the UChar* passed, but UStringImpl::create() assumes
2417        that it should assume ownership of the provided buffer (with UString::createNonCopying()
2418        and UStringImpl::createCopying() providing the alternate behaviours).  Unify on create()
2419        taking a copy of the provided buffer.  For non-copying cases, use the name 'adopt', and
2420        make this method take a Vector<UChar>&.  For cases where non-copying construction was being
2421        used, other than from a Vector<UChar>, change the code to allocate the storage along with
2422        the UStringImpl using UStringImpl::createUninitialized().  (The adopt() method also more
2423        closely matches that of WebCore::StringImpl).
2424
2425        Also, UString::createUninitialized() and UStringImpl::createUninitialized() have incompatible
2426        behaviours, in that the UString form sets the provided UChar* to a null or non-null value to
2427        indicate success or failure, but UStringImpl uses the returned PassRefPtr<UStringImpl> to
2428        indicate when allocation has failed (potentially leaving the output Char* uninitialized).
2429        This is also incompatible with WebCore::StringImpl's behaviour, in that
2430        StringImpl::createUninitialized() will CRASH() if unable to allocate.  Some uses of
2431        createUninitialized() in JSC are unsafe, since they do not test the result for null.
2432        UStringImpl's indication is preferable, since we may want a successful call to set the result
2433        buffer to 0 (specifically, StringImpl returns 0 for the buffer where createUninitialized()
2434        returns the empty string, which seems reasonable to catch bugs early).  UString's method
2435        cannot support UStringImpl's behaviour directly, since it returns an object rather than a
2436        pointer.
2437            - remove UString::createUninitialized(), replace with calls to UStringImpl::createUninitialized()
2438            - create a UStringImpl::tryCreateUninitialized() form UStringImpl::createUninitialized(),
2439              with current behaviour, make createUninitialized() crash on failure to allocate.
2440            - make cases in JSC that do not check the result call createUninitialized(), and cases that do
2441              check call tryCreateUninitialized().
2442
2443        Rename computedHash() to existingHash(), to bring this in line wih WebCore::StringImpl.
2444
2445        * API/JSClassRef.cpp:
2446        (OpaqueJSClassContextData::OpaqueJSClassContextData):
2447        * JavaScriptCore.exp:
2448        * runtime/ArrayPrototype.cpp:
2449        (JSC::arrayProtoFuncToString):
2450        * runtime/Identifier.cpp:
2451        (JSC::CStringTranslator::translate):
2452        (JSC::UCharBufferTranslator::translate):
2453        * runtime/JSString.cpp:
2454        (JSC::JSString::resolveRope):
2455        * runtime/Lookup.cpp:
2456        (JSC::HashTable::createTable):
2457        * runtime/Lookup.h:
2458        (JSC::HashTable::entry):
2459        * runtime/StringBuilder.h:
2460        (JSC::StringBuilder::release):
2461        * runtime/StringConstructor.cpp:
2462        (JSC::stringFromCharCodeSlowCase):
2463        * runtime/StringPrototype.cpp:
2464        (JSC::substituteBackreferencesSlow):
2465        (JSC::stringProtoFuncToLowerCase):
2466        (JSC::stringProtoFuncToUpperCase):
2467        (JSC::stringProtoFuncFontsize):
2468        (JSC::stringProtoFuncLink):
2469        * runtime/Structure.cpp:
2470        (JSC::Structure::despecifyDictionaryFunction):
2471        (JSC::Structure::get):
2472        (JSC::Structure::despecifyFunction):
2473        (JSC::Structure::put):
2474        (JSC::Structure::remove):
2475        (JSC::Structure::insertIntoPropertyMapHashTable):
2476        (JSC::Structure::checkConsistency):
2477        * runtime/Structure.h:
2478        (JSC::Structure::get):
2479        * runtime/StructureTransitionTable.h:
2480        (JSC::StructureTransitionTableHash::hash):
2481        * runtime/UString.cpp:
2482        (JSC::createRep):
2483        (JSC::UString::UString):
2484        (JSC::UString::spliceSubstringsWithSeparators):
2485        (JSC::UString::replaceRange):
2486        (JSC::UString::operator=):
2487        * runtime/UString.h:
2488        (JSC::UString::adopt):
2489        (JSC::IdentifierRepHash::hash):
2490        (JSC::makeString):
2491        * runtime/UStringImpl.h:
2492        (JSC::UStringImpl::adopt):
2493        (JSC::UStringImpl::create):
2494        (JSC::UStringImpl::createUninitialized):
2495        (JSC::UStringImpl::tryCreateUninitialized):
2496        (JSC::UStringImpl::existingHash):
2497
24982010-01-13  Kent Hansen  <kent.hansen@nokia.com>
2499
2500        Reviewed by Oliver Hunt.
2501
2502        JSON.stringify and JSON.parse needlessly process properties in the prototype chain
2503        https://bugs.webkit.org/show_bug.cgi?id=33053
2504
2505        * runtime/JSONObject.cpp:
2506        (JSC::Stringifier::Holder::appendNextProperty):
2507        (JSC::Walker::walk):
2508
25092010-01-13  Gavin Barraclough  <barraclough@apple.com>
2510
2511        Reviewed by NOBODY (buildfix).
2512
2513        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2514
25152010-01-13  Alexey Proskuryakov  <ap@apple.com>
2516
2517        Reviewed by Darin Adler.
2518
2519        https://bugs.webkit.org/show_bug.cgi?id=33641
2520        Assertion failure in Lexer.cpp if input stream ends while in string escape
2521
2522        Test: fast/js/end-in-string-escape.html
2523
2524        * parser/Lexer.cpp: (JSC::Lexer::lex): Bail out quickly on end of stream, not giving the
2525        assertion a chance to fire.
2526
25272010-01-13  Gavin Barraclough  <barraclough@apple.com>
2528
2529        Reviewed by NOBODY (buildfix).
2530
2531        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2532
25332010-01-13  Gavin Barraclough  <barraclough@apple.com>
2534
2535        Rubber stamped by Sam Weinig & Darin Adler.
2536
2537        Three quick fixes to UStringImpl.
2538            - The destroy() method can be switched back to a normal destructor; since we've switched
2539              the way we protect static strings to be using an odd ref-count the destroy() won't abort.
2540            - The cost() calculation logic was wrong.  If you have multiple JSStrings wrapping substrings
2541              of a base string, they would each report the full cost of the base string to the heap.
2542              Instead we should only be reporting once for the base string.
2543            - Remove the overloaded new operator calling fastMalloc, replace this with a 'using' to pick
2544              up the implementation from the parent class.
2545
2546        * JavaScriptCore.exp:
2547        * runtime/UStringImpl.cpp:
2548        (JSC::UStringImpl::~UStringImpl):
2549        * runtime/UStringImpl.h:
2550        (JSC::UStringImpl::cost):
2551        (JSC::UStringImpl::deref):
2552
25532010-01-13  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2554
2555        Reviewed by Simon Hausmann.
2556
2557        [Qt] Split the build process in two different .pro files.
2558        This allows qmake to be run once all source files are available.
2559
2560        * DerivedSources.pro: Added.
2561        * JavaScriptCore.pri: Moved source generation to DerivedSources.pro
2562        * pcre/pcre.pri: Moved source generation to DerivedSources.pro
2563
25642010-01-12  Kent Hansen  <kent.hansen@nokia.com>
2565
2566        Reviewed by Geoffrey Garen.
2567
2568        [ES5] Implement Object.getOwnPropertyNames
2569        https://bugs.webkit.org/show_bug.cgi?id=32242
2570
2571        Add an extra argument to getPropertyNames() and getOwnPropertyNames()
2572        (and all reimplementations thereof) that indicates whether non-enumerable
2573        properties should be added.
2574
2575        * API/JSCallbackObject.h:
2576        * API/JSCallbackObjectFunctions.h:
2577        (JSC::::getOwnPropertyNames):
2578        * JavaScriptCore.exp:
2579        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2580        * debugger/DebuggerActivation.cpp:
2581        (JSC::DebuggerActivation::getOwnPropertyNames):
2582        * debugger/DebuggerActivation.h:
2583        * runtime/Arguments.cpp:
2584        (JSC::Arguments::getOwnPropertyNames):
2585        * runtime/Arguments.h:
2586        * runtime/CommonIdentifiers.h:
2587        * runtime/JSArray.cpp:
2588        (JSC::JSArray::getOwnPropertyNames):
2589        * runtime/JSArray.h:
2590        * runtime/JSByteArray.cpp:
2591        (JSC::JSByteArray::getOwnPropertyNames):
2592        * runtime/JSByteArray.h:
2593        * runtime/JSFunction.cpp:
2594        (JSC::JSFunction::getOwnPropertyNames):
2595        * runtime/JSFunction.h:
2596        * runtime/JSNotAnObject.cpp:
2597        (JSC::JSNotAnObject::getOwnPropertyNames):
2598        * runtime/JSNotAnObject.h:
2599        * runtime/JSObject.cpp:
2600        (JSC::getClassPropertyNames):
2601        (JSC::JSObject::getPropertyNames):
2602        (JSC::JSObject::getOwnPropertyNames):
2603        * runtime/JSObject.h:
2604        * runtime/JSVariableObject.cpp:
2605        (JSC::JSVariableObject::getOwnPropertyNames):
2606        * runtime/JSVariableObject.h:
2607        * runtime/ObjectConstructor.cpp:
2608        (JSC::ObjectConstructor::ObjectConstructor):
2609        (JSC::objectConstructorGetOwnPropertyNames):
2610        * runtime/RegExpMatchesArray.h:
2611        (JSC::RegExpMatchesArray::getOwnPropertyNames):
2612        * runtime/StringObject.cpp:
2613        (JSC::StringObject::getOwnPropertyNames):
2614        * runtime/StringObject.h:
2615        * runtime/Structure.cpp: Rename getEnumerablePropertyNames() to getPropertyNames(), which takes an extra argument.
2616        (JSC::Structure::getPropertyNames):
2617        * runtime/Structure.h:
2618        (JSC::):
2619
26202010-01-12  Alexey Proskuryakov  <ap@apple.com>
2621
2622        Reviewed by Darin Adler.
2623
2624        https://bugs.webkit.org/show_bug.cgi?id=33540
2625        Make it possible to build in debug mode with assertions disabled
2626
2627        * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION):
2628        * runtime/Identifier.cpp: (JSC::Identifier::checkSameIdentifierTable):
2629        * wtf/FastMalloc.cpp:
2630        * wtf/HashTable.h: (WTF::HashTableConstIterator::checkValidity):
2631        * yarr/RegexCompiler.cpp: (JSC::Yarr::compileRegex):
2632
26332009-11-23  Yong Li  <yoli@rim.com>
2634
2635        Reviewed by Adam Treat.
2636
2637        Make GIF decoder support down-sampling
2638        https://bugs.webkit.org/show_bug.cgi?id=31806
2639
2640        * platform/image-decoders/ImageDecoder.cpp:
2641        (WebCore::ImageDecoder::upperBoundScaledY):
2642        (WebCore::ImageDecoder::lowerBoundScaledY):
2643        * platform/image-decoders/ImageDecoder.h:
2644        (WebCore::RGBA32Buffer::scaledRect):
2645        (WebCore::RGBA32Buffer::setScaledRect):
2646        (WebCore::ImageDecoder::scaledSize):
2647        * platform/image-decoders/gif/GIFImageDecoder.cpp:
2648        (WebCore::GIFImageDecoder::sizeNowAvailable):
2649        (WebCore::GIFImageDecoder::initFrameBuffer):
2650        (WebCore::copyOnePixel):
2651        (WebCore::GIFImageDecoder::haveDecodedRow):
2652        (WebCore::GIFImageDecoder::frameComplete):
2653
26542010-01-12  Adam Barth  <abarth@webkit.org>
2655
2656        Reviewed by Eric Seidel.
2657
2658        ecma/Date/15.9.5.12-1.js fails every night at midnight
2659        https://bugs.webkit.org/show_bug.cgi?id=28041
2660
2661        Change the test to use a concrete time instead of "now".
2662
2663        * tests/mozilla/ecma/Date/15.9.5.10-1.js:
2664        * tests/mozilla/ecma/Date/15.9.5.12-1.js:
2665
26662010-01-11  Csaba Osztrogonác  <ossy@webkit.org>
2667
2668        Reviewed by Ariya Hidayat.
2669
2670        [Qt] Enable JIT and YARR_JIT if (CPU(X86_64) && OS(LINUX) && GCC_VERSION >= 40100)
2671
2672        * wtf/Platform.h:
2673
26742010-01-11  Geoffrey Garen  <ggaren@apple.com>
2675
2676        Reviewed by Alexey Proskuryakov.
2677
2678        https://bugs.webkit.org/show_bug.cgi?id=33481
2679        Uninitialized data members in ArrayStorage
2680
2681        SunSpider reports no change.
2682
2683        * runtime/JSArray.cpp:
2684        (JSC::JSArray::JSArray): Initialize missing data members in the two cases
2685        where we don't use fastZeroedMalloc, so it doesn't happen automatically.
2686
26872010-01-11  Steve Falkenburg  <sfalken@apple.com>
2688
2689        Reviewed by Sam Weinig.
2690
2691        https://bugs.webkit.org/show_bug.cgi?id=33480
2692
2693        Improve debugging reliability for WTF on Windows.
2694        Store WTF static library's PDB file into a better location.
2695
2696        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2697
26982010-01-11  Steve Falkenburg  <sfalken@apple.com>
2699
2700        Windows build fix.
2701        Remove extraneous entries from def file causing build warning.
2702
2703        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2704
27052010-01-10  Kent Hansen  <kent.hansen@nokia.com>
2706
2707        Reviewed by Darin Adler.
2708
2709        RegExp.prototype.toString returns "//" for empty regular expressions
2710        https://bugs.webkit.org/show_bug.cgi?id=33319
2711
2712        "//" starts a single-line comment, hence "/(?:)/" should be used, according to ECMA.
2713
2714        * runtime/RegExpPrototype.cpp:
2715        (JSC::regExpProtoFuncToString):
2716
2717        * tests/mozilla/ecma_2/RegExp/properties-001.js:
2718        (AddRegExpCases):
2719        * tests/mozilla/js1_2/regexp/toString.js:
2720        Update relevant Mozilla tests (Mozilla has had this behavior since November 2003).
2721
27222010-01-10  Darin Adler  <darin@apple.com>
2723
2724        * tests/mozilla/ecma/Array/15.4.1.1.js: Added property allow-tabs.
2725        * tests/mozilla/ecma/Array/15.4.1.2.js: Added property allow-tabs.
2726        * tests/mozilla/ecma/Array/15.4.2.1-1.js: Added property allow-tabs.
2727        * tests/mozilla/ecma/Array/15.4.2.2-1.js: Added property allow-tabs.
2728        * tests/mozilla/ecma/Array/15.4.2.2-2.js: Added property allow-tabs.
2729        * tests/mozilla/ecma/Array/15.4.2.3.js: Added property allow-tabs.
2730        * tests/mozilla/ecma/Array/15.4.3.2.js: Added property allow-tabs.
2731        * tests/mozilla/ecma/Array/15.4.3.js: Added property allow-tabs.
2732        * tests/mozilla/ecma/Array/15.4.4.1.js: Added property allow-tabs.
2733        * tests/mozilla/ecma/Array/15.4.4.js: Added property allow-tabs.
2734        * tests/mozilla/ecma/LexicalConventions/7.7.4.js: Added property allow-tabs.
2735        * tests/mozilla/ecma/Math/15.8.2.13.js: Added property allow-tabs.
2736        * tests/mozilla/ecma/Math/15.8.2.16.js: Added property allow-tabs.
2737        * tests/mozilla/ecma/Math/15.8.2.18.js: Added property allow-tabs.
2738        * tests/mozilla/ecma/Math/15.8.2.2.js: Added property allow-tabs.
2739        * tests/mozilla/ecma/Math/15.8.2.4.js: Added property allow-tabs.
2740        * tests/mozilla/ecma/Math/15.8.2.5.js: Added property allow-tabs.
2741        * tests/mozilla/ecma/Math/15.8.2.7.js: Added property allow-tabs.
2742        * tests/mozilla/ecma/String/15.5.1.js: Added property allow-tabs.
2743        * tests/mozilla/ecma/String/15.5.2.js: Added property allow-tabs.
2744        * tests/mozilla/ecma/String/15.5.3.1-3.js: Added property allow-tabs.
2745        * tests/mozilla/ecma/String/15.5.3.1-4.js: Added property allow-tabs.
2746        * tests/mozilla/ecma/String/15.5.3.js: Added property allow-tabs.
2747        * tests/mozilla/ecma/TypeConversion/9.5-2.js: Added property allow-tabs.
2748        * tests/mozilla/ecma/jsref.js: Modified property allow-tabs.
2749        * tests/mozilla/ecma/shell.js: Modified property allow-tabs.
2750        * tests/mozilla/ecma_2/LexicalConventions/keywords-001.js: Added property allow-tabs.
2751        * tests/mozilla/ecma_2/RegExp/exec-001.js: Added property allow-tabs.
2752        * tests/mozilla/ecma_2/String/match-004.js: Added property allow-tabs.
2753        * tests/mozilla/ecma_2/String/replace-001.js: Added property allow-tabs.
2754        * tests/mozilla/ecma_2/String/split-002.js: Added property allow-tabs.
2755        * tests/mozilla/ecma_2/jsref.js: Modified property allow-tabs.
2756        * tests/mozilla/ecma_2/shell.js: Added property allow-tabs.
2757        * tests/mozilla/ecma_3/Date/shell.js: Modified property allow-tabs.
2758        * tests/mozilla/ecma_3/Exceptions/regress-181654.js: Added property allow-tabs.
2759        * tests/mozilla/ecma_3/RegExp/regress-209067.js: Added property allow-tabs.
2760        * tests/mozilla/ecma_3/RegExp/regress-85721.js: Added property allow-tabs.
2761        * tests/mozilla/importList.html: Added property allow-tabs.
2762        * tests/mozilla/js1_1/shell.js: Added property allow-tabs.
2763        * tests/mozilla/js1_2/Array/general1.js: Added property allow-tabs.
2764        * tests/mozilla/js1_2/Array/general2.js: Added property allow-tabs.
2765        * tests/mozilla/js1_2/Array/slice.js: Added property allow-tabs.
2766        * tests/mozilla/js1_2/Array/splice1.js: Added property allow-tabs.
2767        * tests/mozilla/js1_2/Array/splice2.js: Added property allow-tabs.
2768        * tests/mozilla/js1_2/Objects/toString-001.js: Added property allow-tabs.
2769        * tests/mozilla/js1_2/String/charCodeAt.js: Added property allow-tabs.
2770        * tests/mozilla/js1_2/String/concat.js: Modified property allow-tabs.
2771        * tests/mozilla/js1_2/String/match.js: Added property allow-tabs.
2772        * tests/mozilla/js1_2/String/slice.js: Added property allow-tabs.
2773        * tests/mozilla/js1_2/function/Function_object.js: Added property allow-tabs.
2774        * tests/mozilla/js1_2/function/Number.js: Modified property allow-tabs.
2775        * tests/mozilla/js1_2/function/String.js: Modified property allow-tabs.
2776        * tests/mozilla/js1_2/function/nesting.js: Added property allow-tabs.
2777        * tests/mozilla/js1_2/function/regexparg-1.js: Added property allow-tabs.
2778        * tests/mozilla/js1_2/function/regexparg-2-n.js: Added property allow-tabs.
2779        * tests/mozilla/js1_2/jsref.js: Added property allow-tabs.
2780        * tests/mozilla/js1_2/operator/equality.js: Added property allow-tabs.
2781        * tests/mozilla/js1_2/operator/strictEquality.js: Added property allow-tabs.
2782        * tests/mozilla/js1_2/regexp/RegExp_dollar_number.js: Added property allow-tabs.
2783        * tests/mozilla/js1_2/regexp/RegExp_input.js: Added property allow-tabs.
2784        * tests/mozilla/js1_2/regexp/RegExp_input_as_array.js: Added property allow-tabs.
2785        * tests/mozilla/js1_2/regexp/RegExp_lastIndex.js: Added property allow-tabs.
2786        * tests/mozilla/js1_2/regexp/RegExp_lastMatch.js: Added property allow-tabs.
2787        * tests/mozilla/js1_2/regexp/RegExp_lastMatch_as_array.js: Added property allow-tabs.
2788        * tests/mozilla/js1_2/regexp/RegExp_lastParen.js: Added property allow-tabs.
2789        * tests/mozilla/js1_2/regexp/RegExp_lastParen_as_array.js: Added property allow-tabs.
2790        * tests/mozilla/js1_2/regexp/RegExp_leftContext.js: Added property allow-tabs.
2791        * tests/mozilla/js1_2/regexp/RegExp_leftContext_as_array.js: Added property allow-tabs.
2792        * tests/mozilla/js1_2/regexp/RegExp_multiline.js: Added property allow-tabs.
2793        * tests/mozilla/js1_2/regexp/RegExp_multiline_as_array.js: Added property allow-tabs.
2794        * tests/mozilla/js1_2/regexp/RegExp_object.js: Added property allow-tabs.
2795        * tests/mozilla/js1_2/regexp/RegExp_rightContext.js: Added property allow-tabs.
2796        * tests/mozilla/js1_2/regexp/RegExp_rightContext_as_array.js: Added property allow-tabs.
2797        * tests/mozilla/js1_2/regexp/alphanumeric.js: Added property allow-tabs.
2798        * tests/mozilla/js1_2/regexp/asterisk.js: Added property allow-tabs.
2799        * tests/mozilla/js1_2/regexp/backslash.js: Added property allow-tabs.
2800        * tests/mozilla/js1_2/regexp/backspace.js: Added property allow-tabs.
2801        * tests/mozilla/js1_2/regexp/beginLine.js: Added property allow-tabs.
2802        * tests/mozilla/js1_2/regexp/character_class.js: Added property allow-tabs.
2803        * tests/mozilla/js1_2/regexp/compile.js: Added property allow-tabs.
2804        * tests/mozilla/js1_2/regexp/control_characters.js: Added property allow-tabs.
2805        * tests/mozilla/js1_2/regexp/digit.js: Added property allow-tabs.
2806        * tests/mozilla/js1_2/regexp/dot.js: Added property allow-tabs.
2807        * tests/mozilla/js1_2/regexp/endLine.js: Added property allow-tabs.
2808        * tests/mozilla/js1_2/regexp/everything.js: Added property allow-tabs.
2809        * tests/mozilla/js1_2/regexp/exec.js: Added property allow-tabs.
2810        * tests/mozilla/js1_2/regexp/flags.js: Added property allow-tabs.
2811        * tests/mozilla/js1_2/regexp/global.js: Added property allow-tabs.
2812        * tests/mozilla/js1_2/regexp/hexadecimal.js: Added property allow-tabs.
2813        * tests/mozilla/js1_2/regexp/ignoreCase.js: Added property allow-tabs.
2814        * tests/mozilla/js1_2/regexp/interval.js: Added property allow-tabs.
2815        * tests/mozilla/js1_2/regexp/octal.js: Added property allow-tabs.
2816        * tests/mozilla/js1_2/regexp/parentheses.js: Added property allow-tabs.
2817        * tests/mozilla/js1_2/regexp/plus.js: Added property allow-tabs.
2818        * tests/mozilla/js1_2/regexp/question_mark.js: Added property allow-tabs.
2819        * tests/mozilla/js1_2/regexp/simple_form.js: Added property allow-tabs.
2820        * tests/mozilla/js1_2/regexp/source.js: Added property allow-tabs.
2821        * tests/mozilla/js1_2/regexp/special_characters.js: Added property allow-tabs.
2822        * tests/mozilla/js1_2/regexp/string_replace.js: Added property allow-tabs.
2823        * tests/mozilla/js1_2/regexp/string_search.js: Added property allow-tabs.
2824        * tests/mozilla/js1_2/regexp/string_split.js: Added property allow-tabs.
2825        * tests/mozilla/js1_2/regexp/test.js: Added property allow-tabs.
2826        * tests/mozilla/js1_2/regexp/toString.js: Added property allow-tabs.
2827        * tests/mozilla/js1_2/regexp/vertical_bar.js: Added property allow-tabs.
2828        * tests/mozilla/js1_2/regexp/whitespace.js: Added property allow-tabs.
2829        * tests/mozilla/js1_2/regexp/word_boundary.js: Added property allow-tabs.
2830        * tests/mozilla/js1_2/shell.js: Added property allow-tabs.
2831        * tests/mozilla/js1_2/statements/break.js: Added property allow-tabs.
2832        * tests/mozilla/js1_2/statements/continue.js: Added property allow-tabs.
2833        * tests/mozilla/js1_2/statements/do_while.js: Added property allow-tabs.
2834        * tests/mozilla/js1_2/statements/switch.js: Added property allow-tabs.
2835        * tests/mozilla/js1_2/statements/switch2.js: Added property allow-tabs.
2836        * tests/mozilla/js1_3/shell.js: Added property allow-tabs.
2837        * tests/mozilla/js1_4/shell.js: Added property allow-tabs.
2838        * tests/mozilla/js1_5/Regress/regress-111557.js: Added property allow-tabs.
2839        * tests/mozilla/js1_5/Regress/regress-216320.js: Added property allow-tabs.
2840        * tests/mozilla/menuhead.html: Added property allow-tabs.
2841        * tests/mozilla/mklistpage.pl: Added property allow-tabs.
2842        * tests/mozilla/runtests.pl: Added property allow-tabs.
2843
28442010-01-08  Daniel Bates  <dbates@webkit.org>
2845
2846        Reviewed by Adam Barth.
2847
2848        https://bugs.webkit.org/show_bug.cgi?id=33417
2849
2850        Cleans up style errors exposed by the patch for bug #33198.
2851        Moreover, fixes all "Weird number of spaces at line-start. Are you using a 4-space indent?"
2852        errors reported by check-webkit-style.
2853
2854        No functionality was changed. So, no new tests.
2855
2856        * wtf/Platform.h:
2857
28582010-01-08  Kent Hansen  <kent.hansen@nokia.com>
2859
2860        Reviewed by Eric Seidel.
2861
2862        Don't store RegExp flags string representation
2863        https://bugs.webkit.org/show_bug.cgi?id=33321
2864
2865        It's unused; the string representation is reconstructed from flags.
2866
2867        * runtime/RegExp.cpp:
2868        (JSC::RegExp::RegExp):
2869        * runtime/RegExp.h:
2870
28712010-01-08  Geoffrey Garen  <ggaren@apple.com>
2872
2873        Reviewed by Oliver Hunt.
2874
2875        Memory use grows grows possibly unbounded in this JavaScript Array test case
2876        https://bugs.webkit.org/show_bug.cgi?id=31675
2877
2878        This fixes one observed bug in this test case, which is that
2879        arrays don't report extra cost for the sparse value maps.
2880
2881        SunSpider reports a small speedup.
2882
2883        * runtime/JSArray.cpp:
2884        (JSC::JSArray::putSlowCase): Report extra memory cost for
2885        the sparse value map.
2886        * runtime/JSArray.h:
2887
28882010-01-08  Yong Li  <yoli@rim.com>
2889
2890        Reviewed by Darin Adler.
2891
2892        Remove unnecessary #include from FastMalloc.cpp
2893        https://bugs.webkit.org/show_bug.cgi?id=33393
2894
2895        * wtf/FastMalloc.cpp:
2896
28972010-01-08  Eric Seidel  <eric@webkit.org>
2898
2899        No review, rolling out r52983.
2900        http://trac.webkit.org/changeset/52983
2901        https://bugs.webkit.org/show_bug.cgi?id=33321
2902
2903        Broke 59 JavaScriptCore tests.  I don't think Kent knew about
2904        run-javascriptcore-tests.  Sadly neither does the commit-bot,
2905        yet.
2906
2907        * runtime/RegExp.cpp:
2908        (JSC::RegExp::RegExp):
2909        * runtime/RegExp.h:
2910        (JSC::RegExp::flags):
2911
29122010-01-08  Eric Seidel  <eric@webkit.org>
2913
2914        No review, rolling out r52981.
2915        http://trac.webkit.org/changeset/52981
2916        https://bugs.webkit.org/show_bug.cgi?id=33319
2917
2918        Caused two JS tests to start failing:
2919        ecma_2/RegExp/properties-001.js and js1_2/regexp/toString.js
2920
2921        * runtime/RegExpPrototype.cpp:
2922        (JSC::regExpProtoFuncToString):
2923
29242010-01-08  Kent Hansen  <kent.hansen@nokia.com>
2925
2926        Reviewed by Darin Adler.
2927
2928        Don't store RegExp flags string representation
2929        https://bugs.webkit.org/show_bug.cgi?id=33321
2930
2931        It's unused; the string representation is reconstructed from flags.
2932
2933        * runtime/RegExp.cpp:
2934        (JSC::RegExp::RegExp):
2935        * runtime/RegExp.h:
2936
29372010-01-08  Kent Hansen  <kent.hansen@nokia.com>
2938
2939        Reviewed by Darin Adler.
2940
2941        RegExp.prototype.toString returns "//" for empty regular expressions
2942        https://bugs.webkit.org/show_bug.cgi?id=33319
2943
2944        "//" starts a single-line comment, hence "/(?:)/" should be used, according to ECMA.
2945
2946        * runtime/RegExpPrototype.cpp:
2947        (JSC::regExpProtoFuncToString):
2948
29492010-01-08  Norbert Leser  <norbert.leser@nokia.com>
2950
2951        Reviewed by Darin Adler.
2952
2953        RVCT compiler with "-Otime -O3" optimization tries to optimize out
2954        inline new'ed pointers that are passed as arguments.
2955        Proposed patch assigns new'ed pointer explicitly outside function call.
2956
2957        https://bugs.webkit.org/show_bug.cgi?id=33084
2958
2959        * API/JSClassRef.cpp:
2960        (OpaqueJSClass::OpaqueJSClass):
2961        (OpaqueJSClassContextData::OpaqueJSClassContextData):
2962
29632010-01-08  Gabor Loki  <loki@webkit.org>
2964
2965        Reviewed by Gavin Barraclough.
2966
2967        Remove an unnecessary cacheFlush from ARM_TRADITIONAL JIT
2968        https://bugs.webkit.org/show_bug.cgi?id=33203
2969
2970        * assembler/ARMAssembler.cpp: Remove obsolete linkBranch function.
2971        (JSC::ARMAssembler::executableCopy): Inline a clean linkBranch code.
2972        * assembler/ARMAssembler.h:
2973        (JSC::ARMAssembler::getLdrImmAddress): Use inline function.
2974        (JSC::ARMAssembler::getLdrImmAddressOnPool): Ditto.
2975        (JSC::ARMAssembler::patchPointerInternal): Remove an unnecessary cacheFlush.
2976        (JSC::ARMAssembler::linkJump): Use patchPointerInternal instead of linkBranch.
2977        (JSC::ARMAssembler::linkCall): Ditto.
2978        (JSC::ARMAssembler::relinkCall): Ditto.
2979
29802010-01-07  Gabor Loki  <loki@webkit.org>
2981
2982        Reviewed by Gavin Barraclough.
2983
2984        Build fix for JSVALUE32 when ENABLE_JIT_OPTIMIZE* are disabled
2985        https://bugs.webkit.org/show_bug.cgi?id=33311
2986
2987        Move compileGetDirectOffset function to common part of JSVALUE32
2988
2989        * jit/JITPropertyAccess.cpp:
2990        (JSC::JIT::compileGetDirectOffset):
2991
29922010-01-07  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2993
2994        Reviewed by Maciej Stachowiak.
2995
2996        Allow call sites to determine if ASSERT_* and LOG_* macros are operational
2997        https://bugs.webkit.org/show_bug.cgi?id=33020
2998
2999        * wtf/Assertions.h: Set ASSERT_MSG_DISABLED, FATAL_DISABLED,
3000        ERROR_DISABLED, LOG_DISABLED to 1 if the compiler does not support
3001        variadic macros. Refactor for better readibility.
3002
30032010-01-07  Daniel Bates  <dbates@rim.com>
3004
3005        Reviewed by Eric Seidel.
3006
3007        https://bugs.webkit.org/show_bug.cgi?id=32987
3008
3009        Added ENABLE_XHTMLMP flag. Disabled by default.
3010
3011        * Configurations/FeatureDefines.xcconfig:
3012
30132010-01-07  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3014
3015        Reviewed by Gavin Barraclough.
3016
3017        [Symbian] Port ARM traditional JIT Trampolines to RVCT
3018        https://bugs.webkit.org/show_bug.cgi?id=30552
3019
3020        Take the GCC implementation and mechanically convert
3021        it to RVCT syntax.
3022
3023        Use 'bx rX' instead of 'mov pc, rX' when it is available.
3024
3025        Developed in cooperation with Iain Campbell and Gabor Loki.
3026
3027        * JavaScriptCore.pri: Extra step to generate RVCT stubs. The
3028        script generation intentionally executed all the time not just
3029        for RVCT targets.
3030
3031        * create_rvct_stubs: Added. Perl script to expand precompiler macros
3032        for RVCT assembler - the template is defined in JITStubs.cpp.
3033
3034        * jit/JITStubs.cpp:
3035        (JSC::ctiTrampoline):
3036        (JSC::ctiVMThrowTrampoline):
3037        (JSC::ctiOpThrowNotCaught):
3038
30392010-01-07  Geoffrey Garen  <ggaren@apple.com>
3040
3041        Reviewed by Sam Weinig.
3042
3043        Fix a crash seen on the buildbots.
3044
3045        * runtime/JSGlobalObject.cpp:
3046        (JSC::JSGlobalObject::init): Disable specific function tracking here,
3047        instead of in WebCore, to ensure that the disabling happens before a
3048        specific function can be registered.
3049
30502010-01-07  Alexey Proskuryakov  <ap@apple.com>
3051
3052        Mac build fix.
3053
3054        * JavaScriptCore.exp: Export new JSGlobalData static data members.
3055
30562010-01-07  Alexey Proskuryakov  <ap@apple.com>
3057
3058        Reviewed by Geoffrey Garen.
3059
3060        https://bugs.webkit.org/show_bug.cgi?id=33057
3061        REGRESSION(r49365): typeof(xhr.responseText) != "string" in Windows
3062
3063        <rdar://problem/7296920> REGRESSION: WebKit fails to start PeaceKeeper benchmark
3064
3065        Test: fast/js/webcore-string-comparison.html
3066
3067        In r49365, some code was moved from JSString.cpp to JSString.h, and as a result, WebCore
3068        got a way to directly instantiate JSStrings over DLL borders. Since vftable for JSString was
3069        not exported, objects created from WebCore got a different vptr, and JavaScriptCore
3070        optimizations that relied on vptr of all JSString objects being equal failed.
3071
3072        * config.h: Added a JS_EXPORTCLASS macro for exporting classes. It's currently the same as
3073        JS_EXPORTDATA, but it clearly needed a new name.
3074
3075        * runtime/InitializeThreading.cpp:
3076        (JSC::initializeThreadingOnce):
3077        * runtime/JSGlobalData.cpp:
3078        (JSC::JSGlobalData::storeVPtrs):
3079        (JSC::JSGlobalData::JSGlobalData):
3080        (JSC::JSGlobalData::createNonDefault):
3081        (JSC::JSGlobalData::create):
3082        (JSC::JSGlobalData::sharedInstance):
3083        * runtime/JSGlobalData.h:
3084        Store vptrs just once, no need to repeatedly pick and copy them. This makes it possible to
3085        assert vptr correctness in object destructors (which don't have access to JSGlobalData,
3086        and even Heap::heap(this) will fail for fake objects created from storeVPtrs()).
3087
3088        * runtime/JSArray.cpp: (JSC::JSArray::~JSArray): Assert that vptr is what we expect it to be.
3089        It's important to assert in destructor, because MSVC changes the vptr after constructor
3090        is invoked.
3091        * runtime/JSByteArray.cpp: (JSC::JSByteArray::~JSByteArray): Ditto.
3092        * runtime/JSByteArray.h: Ditto.
3093        * runtime/JSFunction.h: Ditto.
3094        * runtime/JSFunction.cpp: (JSC::JSFunction::~JSFunction): Ditto.
3095
3096        * runtime/JSCell.h: (JSC::JSCell::setVPtr): Added a method to substitute vptr for another
3097        one.
3098
3099        * runtime/JSString.h: Export JSString class together with its vftable, and tell other
3100        libraries tp import it. This is needed on platforms that have a separate JavaScriptCore
3101        dynamic library - and on Mac, we already did the export via JavaScriptCore.exp.
3102        (JSC::JSString::~JSString): Assert tha vptr is what we expect it to be.
3103        (JSC::fixupVPtr): Store a previously saved primary vftable pointer (do nothing if building
3104        JavaScriptCore itself).
3105        (JSC::jsSingleCharacterString): Call fixupVPtr in case this is call across DLL boundary.
3106        (JSC::jsSingleCharacterSubstring): Ditto.
3107        (JSC::jsNontrivialString): Ditto.
3108        (JSC::jsString): Ditto.
3109        (JSC::jsSubstring): Ditto.
3110        (JSC::jsOwnedString): Ditto.
3111
3112        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export the new static
3113        JSGlobalData members that are used in WebCore via inline functions.
3114
31152010-01-07  Geoffrey Garen  <ggaren@apple.com>
3116
3117        Reviewed by Sam Weinig.
3118
3119        Safari memory usage skyrockets using new Google AdWords interface
3120        https://bugs.webkit.org/show_bug.cgi?id=33343
3121
3122        The memory use was caused by the global object creating too many structures
3123        as it thrashed between different specific functions.
3124
3125        * runtime/Structure.cpp:
3126        (JSC::Structure::Structure):
3127        (JSC::Structure::addPropertyTransition):
3128        (JSC::Structure::changePrototypeTransition):
3129        (JSC::Structure::despecifyFunctionTransition):
3130        (JSC::Structure::addAnonymousSlotsTransition):
3131        (JSC::Structure::getterSetterTransition):
3132        (JSC::Structure::toDictionaryTransition):
3133        (JSC::Structure::addPropertyWithoutTransition):
3134        (JSC::Structure::despecifyAllFunctions):
3135        * runtime/Structure.h:
3136        (JSC::Structure::disableSpecificFunctionTracking): Track a thrash count
3137        for specific functions. Disable specific function tracking once the
3138        thrash count has been hit.
3139
31402010-01-07  Csaba Osztrogonác  <ossy@webkit.org>
3141
3142        Reviewed by Simon Hausmann.
3143
3144        [Qt] Enable JIT in debug mode on win32 after r51141 fixed the crashes.
3145
3146        * JavaScriptCore.pri:
3147
31482010-01-07  Zoltan Horvath  <zoltan@webkit.org>
3149
3150        Reviewed by Holger Freyther.
3151
3152        [Mac] Build fix when FAST_MALLOC_MATCH_VALIDATION=1
3153        https://bugs.webkit.org/show_bug.cgi?id=33312
3154
3155        Using of operator += cause compile error on Mac, so it is changed to
3156        "= static_cast<AllocAlignmentInteger*>(old_ptr) + 1".
3157
3158        * wtf/FastMalloc.cpp:
3159        (WTF::TCMallocStats::realloc):
3160
31612010-01-07  Zoltan Horvath  <zoltan@webkit.org>
3162
3163        Reviewed by Holger Freyther.
3164
3165        [Qt] Build fix when FAST_MALLOC_MATCH_VALIDATION=1
3166        https://bugs.webkit.org/show_bug.cgi?id=33312
3167
3168        Remove pByte (committed in r42344 from #20422), because pByte doesn't
3169        exist and it is unnecessary.
3170
3171        * wtf/FastMalloc.cpp:
3172        (WTF::TCMallocStats::realloc):
3173
31742010-01-06  Gavin Barraclough  <barraclough@apple.com>
3175
3176        QT build fix.
3177
3178        * runtime/Identifier.cpp:
3179        (JSC::createIdentifierTableSpecific):
3180
31812010-01-06  Gavin Barraclough  <barraclough@apple.com>
3182
3183        Windows build fix part I.
3184
3185        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3186
31872010-01-06  Dan Bernstein  <mitz@apple.com>
3188
3189        Build fix
3190
3191        * runtime/Identifier.cpp:
3192        (JSC::createIdentifierTableSpecificCallback):
3193
31942010-01-05  Gavin Barraclough  <barraclough@apple.com>
3195
3196        Reviewed by Sam Weinig.
3197
3198        https://bugs.webkit.org/show_bug.cgi?id=33236
3199        Remove m_identifierTable pointer from UString
3200
3201        Currently every string holds a pointer so that during destruction,
3202        if a string has been used as an identifier, it can remove itself
3203        from the table.  By instead accessing the identifierTable via a
3204        thread specific tracking the table associated with the current
3205        globaldata, we can save the memory cost of this pointer.
3206
3207        * API/APIShims.h:
3208        (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
3209        (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
3210        (JSC::APICallbackShim::APICallbackShim):
3211        (JSC::APICallbackShim::~APICallbackShim):
3212
3213            - change the API shims to track the identifierTable of the current JSGlobalData.
3214
3215        * API/JSContextRef.cpp:
3216        (JSContextGroupCreate):
3217
3218            - update creation of JSGlobalData for API usage to use new create method.
3219            - fix shim instanciation bug in JSGlobalContextCreateInGroup.
3220
3221        * JavaScriptCore.exp:
3222        * runtime/Completion.cpp:
3223        (JSC::checkSyntax):
3224        (JSC::evaluate):
3225
3226            - add asserts to check the identifierTable is being tracked correctly.
3227
3228        * runtime/Identifier.cpp:
3229        (JSC::IdentifierTable::~IdentifierTable):
3230        (JSC::IdentifierTable::add):
3231        (JSC::Identifier::remove):
3232        (JSC::Identifier::checkSameIdentifierTable):
3233        (JSC::createIdentifierTableSpecificCallback):
3234        (JSC::createIdentifierTableSpecific):
3235        (JSC::createDefaultDataSpecific):
3236
3237            - Use currentIdentifierTable() instead of UStringImpl::m_identifierTable.
3238            - Define methods to access the thread specific identifier tables.
3239
3240        * runtime/Identifier.h:
3241        (JSC::ThreadIdentifierTableData::ThreadIdentifierTableData):
3242        (JSC::defaultIdentifierTable):
3243        (JSC::setDefaultIdentifierTable):
3244        (JSC::currentIdentifierTable):
3245        (JSC::setCurrentIdentifierTable):
3246        (JSC::resetCurrentIdentifierTable):
3247
3248            - Declare methods to access the thread specific identifier tables.
3249
3250        * runtime/JSGlobalData.cpp:
3251        (JSC::JSGlobalData::createNonDefault):
3252        (JSC::JSGlobalData::create):
3253        (JSC::JSGlobalData::sharedInstance):
3254
3255            - creation of JSGlobalData objects, other than for API usage, associate themselves with the current thread.
3256
3257        * runtime/JSGlobalData.h:
3258        * runtime/UStringImpl.cpp:
3259        (JSC::UStringImpl::destroy):
3260
3261            - destroy() method should be using isIdentifier().
3262
3263        * runtime/UStringImpl.h:
3264        (JSC::UStringImpl::isIdentifier):
3265        (JSC::UStringImpl::setIsIdentifier):
3266        (JSC::UStringImpl::checkConsistency):
3267        (JSC::UStringImpl::UStringImpl):
3268
3269            - replace m_identifierTable with a single m_isIdentifier bit.
3270
3271        * wtf/StringHashFunctions.h:
3272        (WTF::stringHash):
3273
3274            - change string hash result from 32-bit to 31-bit, to free a bit in UStringImpl for m_isIdentifier.
3275
32762009-12-25 Patrick Gansterer <paroga@paroga.com>
3277
3278        Reviewed by Eric Seidel.
3279
3280        Buildfix for WinCE + style fixes.
3281        https://bugs.webkit.org/show_bug.cgi?id=32939
3282
3283        * jsc.cpp:
3284        (functionPrint):
3285        (functionQuit):
3286        (parseArguments):
3287        (fillBufferWithContentsOfFile):
3288
32892010-01-05  Patrick Gansterer  <paroga@paroga.com>
3290
3291        Reviewed by Eric Seidel.
3292
3293        WinCE buildfix after r52791 (renamed PLATFORM(WINCE) to OS(WINCE)).
3294        https://bugs.webkit.org/show_bug.cgi?id=33205
3295
3296        * jit/ExecutableAllocator.h:
3297
32982010-01-05  Patrick Gansterer  <paroga@paroga.com>
3299
3300        Reviewed by Darin Adler.
3301
3302        Added compiler error for unsupported platforms.
3303        https://bugs.webkit.org/show_bug.cgi?id=33112
3304
3305        * jit/JITStubs.cpp:
3306
33072010-01-05  Gabor Loki  <loki@webkit.org>
3308
3309        Reviewed by Maciej Stachowiak.
3310
3311        Follow r52729 in ARMAssembler.
3312        https://bugs.webkit.org/show_bug.cgi?id=33208
3313
3314        Use WTF_ARM_ARCH_AT_LEAST instead of ARM_ARCH_VERSION
3315
3316        * assembler/ARMAssembler.cpp:
3317        (JSC::ARMAssembler::encodeComplexImm): Move tmp declaration to ARMv7
3318        * assembler/ARMAssembler.h:
3319        (JSC::ARMAssembler::):
3320        (JSC::ARMAssembler::bkpt):
3321
33222010-01-05  Maciej Stachowiak  <mjs@apple.com>
3323
3324        Unreviewed build fix for Gtk+
3325
3326        Don't use // comments in Platform.h, at least some of them seem to make the version of GCC
3327        used on the Gtk buildbot unhappy.
3328
3329        * wtf/Platform.h:
3330
33312010-01-04  Maciej Stachowiak  <mjs@apple.com>
3332
3333        Reviewed by Darin Fisher.
3334
3335        Reorganize, document and rename OS() platform macros.
3336        https://bugs.webkit.org/show_bug.cgi?id=33198
3337
3338        * wtf/Platform.h: Rename, reorganize and document OS() macros.
3339
3340        Adapt to name changes. Also fixed a few incorrect OS checks.
3341
3342        * API/JSContextRef.cpp:
3343        * assembler/MacroAssemblerARM.cpp:
3344        (JSC::isVFPPresent):
3345        * assembler/MacroAssemblerX86Common.h:
3346        * bytecode/SamplingTool.cpp:
3347        * config.h:
3348        * interpreter/RegisterFile.cpp:
3349        (JSC::RegisterFile::~RegisterFile):
3350        * interpreter/RegisterFile.h:
3351        (JSC::RegisterFile::RegisterFile):
3352        (JSC::RegisterFile::grow):
3353        * jit/ExecutableAllocator.h:
3354        * jit/ExecutableAllocatorFixedVMPool.cpp:
3355        * jit/ExecutableAllocatorPosix.cpp:
3356        * jit/ExecutableAllocatorSymbian.cpp:
3357        * jit/ExecutableAllocatorWin.cpp:
3358        * jit/JITOpcodes.cpp:
3359        (JSC::JIT::privateCompileCTIMachineTrampolines):
3360        * jit/JITStubs.cpp:
3361        * jsc.cpp:
3362        (main):
3363        * parser/Grammar.y:
3364        * profiler/ProfileNode.cpp:
3365        (JSC::getCount):
3366        * runtime/Collector.cpp:
3367        (JSC::Heap::Heap):
3368        (JSC::Heap::allocateBlock):
3369        (JSC::Heap::freeBlockPtr):
3370        (JSC::currentThreadStackBase):
3371        (JSC::getCurrentPlatformThread):
3372        (JSC::suspendThread):
3373        (JSC::resumeThread):
3374        (JSC::getPlatformThreadRegisters):
3375        (JSC::otherThreadStackPointer):
3376        * runtime/Collector.h:
3377        * runtime/DateConstructor.cpp:
3378        * runtime/DatePrototype.cpp:
3379        (JSC::formatLocaleDate):
3380        * runtime/InitializeThreading.cpp:
3381        (JSC::initializeThreading):
3382        * runtime/MarkStack.h:
3383        (JSC::MarkStack::MarkStackArray::shrinkAllocation):
3384        * runtime/MarkStackPosix.cpp:
3385        * runtime/MarkStackSymbian.cpp:
3386        * runtime/MarkStackWin.cpp:
3387        * runtime/StringPrototype.cpp:
3388        (JSC::stringProtoFuncLastIndexOf):
3389        * runtime/TimeoutChecker.cpp:
3390        (JSC::getCPUTime):
3391        * runtime/UString.cpp:
3392        (JSC::UString::from):
3393        * wtf/Assertions.cpp:
3394        * wtf/Assertions.h:
3395        * wtf/CurrentTime.cpp:
3396        (WTF::lowResUTCTime):
3397        * wtf/CurrentTime.h:
3398        (WTF::getLocalTime):
3399        * wtf/DateMath.cpp:
3400        * wtf/FastMalloc.cpp:
3401        (WTF::TCMalloc_ThreadCache::InitModule):
3402        (WTF::TCMallocStats::):
3403        * wtf/FastMalloc.h:
3404        * wtf/MathExtras.h:
3405        * wtf/RandomNumber.cpp:
3406        (WTF::randomNumber):
3407        * wtf/RandomNumberSeed.h:
3408        (WTF::initializeRandomNumberGenerator):
3409        * wtf/StringExtras.h:
3410        * wtf/TCSpinLock.h:
3411        (TCMalloc_SpinLock::Unlock):
3412        (TCMalloc_SlowLock):
3413        * wtf/TCSystemAlloc.cpp:
3414        * wtf/ThreadSpecific.h:
3415        (WTF::::destroy):
3416        * wtf/Threading.h:
3417        * wtf/ThreadingPthreads.cpp:
3418        (WTF::initializeThreading):
3419        (WTF::isMainThread):
3420        * wtf/ThreadingWin.cpp:
3421        (WTF::wtfThreadEntryPoint):
3422        (WTF::createThreadInternal):
3423        * wtf/VMTags.h:
3424        * wtf/unicode/icu/CollatorICU.cpp:
3425        (WTF::Collator::userDefault):
3426        * wtf/win/MainThreadWin.cpp:
3427        (WTF::initializeMainThreadPlatform):
3428
34292010-01-04  Gustavo Noronha Silva  <gns@gnome.org>
3430
3431        Add missing files to the build system - make distcheck build fix.
3432
3433        * GNUmakefile.am:
3434
34352010-01-04  Gavin Barraclough <barraclough@apple.com>
3436
3437        Reviewed by Sam Weinig, additional coding by Mark Rowe.
3438
3439        https://bugs.webkit.org/show_bug.cgi?id=33163
3440        Add string hashing functions to WTF.
3441        Use WTF's string hashing functions from UStringImpl.
3442
3443        * GNUmakefile.am:
3444        * JavaScriptCore.exp:
3445        * JavaScriptCore.gypi:
3446        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3447        * JavaScriptCore.xcodeproj/project.pbxproj:
3448        * runtime/UStringImpl.cpp:
3449        * runtime/UStringImpl.h:
3450        (JSC::UStringImpl::computeHash):
3451        * wtf/HashFunctions.h:
3452        * wtf/StringHashFunctions.h: Added.
3453        (WTF::stringHash):
3454
34552010-01-04  Dmitry Titov  <dimich@chromium.org>
3456
3457        Not reviewed, attempt to fix ARM bulid.
3458
3459        * wtf/Platform.h:
3460
34612010-01-04  Gavin Barraclough  <barraclough@apple.com>
3462
3463        Rubber stamped by Geoff Garen.
3464
3465        Add an 'isIdentifier' to UStringImpl, use this where appropriate
3466        (where previously 'identifierTable' was being tested).
3467
3468        * API/JSClassRef.cpp:
3469        (OpaqueJSClass::~OpaqueJSClass):
3470        (OpaqueJSClassContextData::OpaqueJSClassContextData):
3471        * runtime/Identifier.cpp:
3472        (JSC::Identifier::addSlowCase):
3473        * runtime/Identifier.h:
3474        (JSC::Identifier::add):
3475        * runtime/PropertyNameArray.cpp:
3476        (JSC::PropertyNameArray::add):
3477        * runtime/UStringImpl.h:
3478        (JSC::UStringImpl::isIdentifier):
3479
34802010-01-04  Gavin Barraclough  <barraclough@apple.com>
3481
3482        Reviewed by Sam "Shimmey Shimmey" Weinig.
3483
3484        https://bugs.webkit.org/show_bug.cgi?id=33158
3485        Refactor JSC API entry/exit to use RAII instead of copy/pasting code.
3486        Make it easier to change set of actions taken when passing across the API boundary.
3487
3488        * API/APIShims.h: Added.
3489        (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
3490        (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
3491        (JSC::APIEntryShim::APIEntryShim):
3492        (JSC::APICallbackShim::APICallbackShim):
3493        (JSC::APICallbackShim::~APICallbackShim):
3494        * API/JSBase.cpp:
3495        (JSEvaluateScript):
3496        (JSCheckScriptSyntax):
3497        (JSGarbageCollect):
3498        (JSReportExtraMemoryCost):
3499        * API/JSCallbackConstructor.cpp:
3500        (JSC::constructJSCallback):
3501        * API/JSCallbackFunction.cpp:
3502        (JSC::JSCallbackFunction::call):
3503        * API/JSCallbackObjectFunctions.h:
3504        (JSC::::init):
3505        (JSC::::getOwnPropertySlot):
3506        (JSC::::put):
3507        (JSC::::deleteProperty):
3508        (JSC::::construct):
3509        (JSC::::hasInstance):
3510        (JSC::::call):
3511        (JSC::::getOwnPropertyNames):
3512        (JSC::::toNumber):
3513        (JSC::::toString):
3514        (JSC::::staticValueGetter):
3515        (JSC::::callbackGetter):
3516        * API/JSContextRef.cpp:
3517        * API/JSObjectRef.cpp:
3518        (JSObjectMake):
3519        (JSObjectMakeFunctionWithCallback):
3520        (JSObjectMakeConstructor):
3521        (JSObjectMakeFunction):
3522        (JSObjectMakeArray):
3523        (JSObjectMakeDate):
3524        (JSObjectMakeError):
3525        (JSObjectMakeRegExp):
3526        (JSObjectGetPrototype):
3527        (JSObjectSetPrototype):
3528        (JSObjectHasProperty):
3529        (JSObjectGetProperty):
3530        (JSObjectSetProperty):
3531        (JSObjectGetPropertyAtIndex):
3532        (JSObjectSetPropertyAtIndex):
3533        (JSObjectDeleteProperty):
3534        (JSObjectCallAsFunction):
3535        (JSObjectCallAsConstructor):
3536        (JSObjectCopyPropertyNames):
3537        (JSPropertyNameArrayRelease):
3538        (JSPropertyNameAccumulatorAddName):
3539        * API/JSValueRef.cpp:
3540        (JSValueGetType):
3541        (JSValueIsUndefined):
3542        (JSValueIsNull):
3543        (JSValueIsBoolean):
3544        (JSValueIsNumber):
3545        (JSValueIsString):
3546        (JSValueIsObject):
3547        (JSValueIsObjectOfClass):
3548        (JSValueIsEqual):
3549        (JSValueIsStrictEqual):
3550        (JSValueIsInstanceOfConstructor):
3551        (JSValueMakeUndefined):
3552        (JSValueMakeNull):
3553        (JSValueMakeBoolean):
3554        (JSValueMakeNumber):
3555        (JSValueMakeString):
3556        (JSValueToBoolean):
3557        (JSValueToNumber):
3558        (JSValueToStringCopy):
3559        (JSValueToObject):
3560        (JSValueProtect):
3561        (JSValueUnprotect):
3562        * JavaScriptCore.xcodeproj/project.pbxproj:
3563
35642010-01-04  Dan Bernstein  <mitz@apple.com>
3565
3566        Reviewed by Ada Chan and Mark Rowe.
3567
3568        Updated copyright string
3569
3570        * Info.plist:
3571        * JavaScriptCore.vcproj/JavaScriptCore.resources/Info.plist:
3572        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc:
3573
35742010-01-04  Adam Roben  <aroben@apple.com>
3575
3576        No review, rolling out r52741.
3577        http://trac.webkit.org/changeset/52741
3578        https://bugs.webkit.org/show_bug.cgi?id=33056
3579
3580        * wtf/AlwaysInline.h:
3581
35822010-01-04  Patrick Gansterer  <paroga@paroga.com>
3583
3584        Reviewed by Darin Adler.
3585
3586        Add cacheFlush support for WinCE
3587        https://bugs.webkit.org/show_bug.cgi?id=33110
3588
3589        * jit/ExecutableAllocator.h:
3590        (JSC::ExecutableAllocator::cacheFlush):
3591
35922010-01-04  Patrick Gansterer  <paroga@paroga.com>
3593
3594        Reviewed by Adam Roben.
3595
3596        Implement NO_RETURN for COMPILER(MSVC).
3597        https://bugs.webkit.org/show_bug.cgi?id=33056
3598
3599        * wtf/AlwaysInline.h:
3600
36012010-01-04  Maciej Stachowiak  <mjs@apple.com>
3602
3603        Reviewed by Simon Hausmann.
3604
3605        Fix some PLATFORM(*_ENDIAN) uses to CPU()
3606        https://bugs.webkit.org/show_bug.cgi?id=33148
3607
3608        * runtime/JSCell.cpp:
3609        (JSC::):
3610        * runtime/JSValue.h:
3611        (JSC::JSValue::):
3612
36132010-01-04  Maciej Stachowiak  <mjs@apple.com>
3614
3615        Reviewed by Adam Barth.
3616
3617        Document CPU() macros in comments.
3618        https://bugs.webkit.org/show_bug.cgi?id=33147
3619
3620        * wtf/Platform.h:
3621
36222010-01-04  Maciej Stachowiak  <mjs@apple.com>
3623
3624        Reviewed by Adam Barth.
3625
3626        Reorganize, document and rename CPU() platform macros.
3627        https://bugs.webkit.org/show_bug.cgi?id=33145
3628        ExecutableAllocatorSymbian appears to have buggy ARM version check
3629        https://bugs.webkit.org/show_bug.cgi?id=33138
3630
3631        * wtf/Platform.h:
3632        Rename all macros related to detection of particular CPUs or
3633        classes of CPUs to CPU(), reorganize and document them.
3634
3635        All remaining changes are adapting to the renames, plus fixing the
3636        second bug cited above.
3637
3638        * assembler/ARMAssembler.cpp:
3639        * assembler/ARMAssembler.h:
3640        * assembler/ARMv7Assembler.h:
3641        * assembler/AbstractMacroAssembler.h:
3642        (JSC::AbstractMacroAssembler::Imm32::Imm32):
3643        * assembler/MacroAssembler.h:
3644        * assembler/MacroAssemblerARM.cpp:
3645        * assembler/MacroAssemblerARM.h:
3646        * assembler/MacroAssemblerCodeRef.h:
3647        (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
3648        * assembler/MacroAssemblerX86.h:
3649        * assembler/MacroAssemblerX86Common.h:
3650        * assembler/MacroAssemblerX86_64.h:
3651        * assembler/X86Assembler.h:
3652        (JSC::X86Registers::):
3653        (JSC::X86Assembler::):
3654        (JSC::X86Assembler::movl_mEAX):
3655        (JSC::X86Assembler::movl_EAXm):
3656        (JSC::X86Assembler::repatchLoadPtrToLEA):
3657        (JSC::X86Assembler::X86InstructionFormatter::memoryModRM):
3658        * jit/ExecutableAllocator.h:
3659        * jit/ExecutableAllocatorFixedVMPool.cpp:
3660        * jit/ExecutableAllocatorPosix.cpp:
3661        * jit/ExecutableAllocatorSymbian.cpp:
3662        (JSC::ExecutableAllocator::intializePageSize):
3663        * jit/JIT.cpp:
3664        * jit/JIT.h:
3665        * jit/JITArithmetic.cpp:
3666        * jit/JITInlineMethods.h:
3667        (JSC::JIT::beginUninterruptedSequence):
3668        (JSC::JIT::restoreArgumentReferenceForTrampoline):
3669        (JSC::JIT::emitCount):
3670        * jit/JITOpcodes.cpp:
3671        (JSC::JIT::privateCompileCTIMachineTrampolines):
3672        * jit/JITPropertyAccess.cpp:
3673        (JSC::JIT::privateCompileGetByIdProto):
3674        (JSC::JIT::privateCompileGetByIdProtoList):
3675        (JSC::JIT::privateCompileGetByIdChainList):
3676        (JSC::JIT::privateCompileGetByIdChain):
3677        * jit/JITStubs.cpp:
3678        (JSC::JITThunks::JITThunks):
3679        * jit/JITStubs.h:
3680        * runtime/Collector.cpp:
3681        (JSC::currentThreadStackBase):
3682        (JSC::getPlatformThreadRegisters):
3683        (JSC::otherThreadStackPointer):
3684        * wrec/WREC.h:
3685        * wrec/WRECGenerator.cpp:
3686        (JSC::WREC::Generator::generateEnter):
3687        (JSC::WREC::Generator::generateReturnSuccess):
3688        (JSC::WREC::Generator::generateReturnFailure):
3689        * wrec/WRECGenerator.h:
3690        * wtf/FastMalloc.cpp:
3691        * wtf/TCSpinLock.h:
3692        (TCMalloc_SpinLock::Lock):
3693        (TCMalloc_SpinLock::Unlock):
3694        (TCMalloc_SlowLock):
3695        * wtf/Threading.h:
3696        * wtf/dtoa.cpp:
3697        * yarr/RegexJIT.cpp:
3698        (JSC::Yarr::RegexGenerator::generateEnter):
3699        (JSC::Yarr::RegexGenerator::generateReturn):
3700        * yarr/RegexJIT.h:
3701
37022010-01-04  Maciej Stachowiak  <mjs@apple.com>
3703
3704        Reviewed by Adam Barth.
3705
3706        Clean up COMPILER macros and remove unused ones.
3707        https://bugs.webkit.org/show_bug.cgi?id=33132
3708
3709        Removed values are COMPILER(BORLAND) and COMPILER(CYGWIN) - they were
3710        not used anywhere.
3711
3712        * wtf/Platform.h:
3713
37142010-01-03  Maciej Stachowiak  <mjs@apple.com>
3715
3716        Reviewed by Eric Seidel.
3717
3718        Update wtf/Platform.h to document the new system for porting macros.
3719        https://bugs.webkit.org/show_bug.cgi?id=33130
3720
3721        * wtf/Platform.h:
3722
37232009-12-29  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3724
3725        Reviewed by Maciej Stachowiak.
3726
3727        PLATFORM(CAIRO) should be defined by WIN_CAIRO define
3728        https://bugs.webkit.org/show_bug.cgi?id=22250
3729
3730        * wtf/Platform.h: Define WTF_PLATFORM_CAIRO for GTK port only
3731        For the WinCairo port WTF_PLATFORM_CAIRO is already defined in config.h
3732
37332009-12-28  Shu Chang  <Chang.Shu@nokia.com>
3734
3735        Reviewed by Laszlo Gombos.
3736
3737        [Qt] Delete ThreadPrivate instance after it is finished.
3738        https://bugs.webkit.org/show_bug.cgi?id=32614
3739
3740        * wtf/qt/ThreadingQt.cpp:
3741        (WTF::ThreadMonitor::instance):
3742        (WTF::ThreadMonitor::threadFinished):
3743        (WTF::createThreadInternal):
3744        (WTF::detachThread):
3745
37462009-12-28  Patrick Gansterer  <paroga@paroga.com>
3747
3748        Reviewed by Maciej Stachowiak.
3749
3750        Cleanup of #define JS_EXPORT.
3751
3752        * API/JSBase.h:
3753
37542009-12-27  Patrick Gansterer  <paroga@paroga.com>
3755
3756        Reviewed by Adam Barth.
3757
3758        WinCE buildfix (HWND_MESSAGE isn't supported there)
3759
3760        * wtf/win/MainThreadWin.cpp:
3761        (WTF::initializeMainThreadPlatform):
3762
37632009-12-27  Patrick Gansterer  <paroga@paroga.com>
3764
3765        Reviewed by Adam Barth.
3766
3767        Added a file with WinMain function to link agains in WinCE.
3768
3769        * os-win32/WinMain.cpp: Added.
3770        (convertToUtf8):
3771        (WinMain):
3772
37732009-12-24  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3774
3775        Unreviewed; revert of r52550.
3776
3777        The change regressed the following LayoutTests for QtWebKit.
3778
3779        fast/workers/worker-call.html -> crashed
3780        fast/workers/worker-close.html -> crashed
3781
3782        * wtf/qt/ThreadingQt.cpp:
3783        (WTF::waitForThreadCompletion):
3784        (WTF::detachThread):
3785
37862009-12-24  Shu Chang  <Chang.Shu@nokia.com>
3787
3788        Reviewed by Laszlo Gombos.
3789
3790        [Qt] Fix memory leak by deleting instance of ThreadPrivate
3791        in function waitForThreadCompletion(), synchronously, or in
3792        detachThread(), asynchronously.
3793        https://bugs.webkit.org/show_bug.cgi?id=32614
3794
3795        * wtf/qt/ThreadingQt.cpp:
3796        (WTF::waitForThreadCompletion):
3797        (WTF::detachThread):
3798
37992009-12-23  Kwang Yul Seo  <skyul@company100.net>
3800
3801        Reviewed by Laszlo Gombos.
3802
3803        Include stddef.h for ptrdiff_t
3804        https://bugs.webkit.org/show_bug.cgi?id=32891
3805
3806        ptrdiff_t is typedef-ed in stddef.h.
3807        Include stddef.h in jit/ExecutableAllocator.h.
3808
3809        * jit/ExecutableAllocator.h:
3810
38112009-12-23  Patrick Gansterer  <paroga@paroga.com>
3812
3813        Reviewed by Eric Seidel.
3814
3815        Buildfix after r47092.
3816
3817        * wtf/wince/MemoryManager.cpp:
3818        (WTF::tryFastMalloc):
3819        (WTF::tryFastZeroedMalloc):
3820        (WTF::tryFastCalloc):
3821        (WTF::tryFastRealloc):
3822
38232009-12-23  Kent Tamura  <tkent@chromium.org>
3824
3825        Reviewed by Darin Adler.
3826
3827        HTMLInputElement::valueAsDate getter support.
3828        https://bugs.webkit.org/show_bug.cgi?id=32876
3829
3830        Expose dateToDaysFrom1970().
3831
3832        * JavaScriptCore.exp:
3833        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3834        * wtf/DateMath.cpp:
3835        (WTF::dateToDaysFrom1970):
3836        * wtf/DateMath.h:
3837
38382009-12-22  Darin Adler  <darin@apple.com>
3839
3840        Reviewed by Mark Rowe.
3841
3842        Turn off datagrid by default, at least for all platforms Apple ships.
3843        The datagrid implementation isn't ready for general web use yet.
3844
3845        * Configurations/FeatureDefines.xcconfig: Turn off datagrid by default.
3846
38472009-12-22  Steve Block  <steveblock@google.com>
3848
3849        Reviewed by David Levin.
3850
3851        Updates Android's scheduleDispatchFunctionsOnMainThread() to use new
3852        AndroidThreading class, rather than using JavaSharedClient directly.
3853        This fixes the current layering violation.
3854        https://bugs.webkit.org/show_bug.cgi?id=32651
3855
3856        The pattern is copied from Chromium, which uses the ChromiumThreading
3857        class. This patch also fixes the style in ChromiumThreading.h.
3858
3859        * wtf/android/AndroidThreading.h: Added. Declares AndroidThreading.
3860        * wtf/android/MainThreadAndroid.cpp: Modified
3861        (WTF::scheduleDispatchFunctionsOnMainThread): Uses AndroidThreading.
3862        * wtf/chromium/ChromiumThreading.h: Modified. Fixes style.
3863
38642009-12-22  Gavin Barraclough  <barraclough@apple.com>
3865
3866        Reviewed by Sam Weinig.
3867
3868        Fix a couple of problems with UntypedPtrAndBitfield.
3869
3870        Add a m_leaksPtr to reduce false positives from leaks in debug builds
3871        (this isn't perfect because we'd like a solution for release builds,
3872        but this is now at least as good as a PtrAndFlags would be).
3873
3874        Switch SmallStringsto use a regular string for the base, rather than
3875        a static one.  UntypedPtrAndBitfield assumes all strings are at least
3876        8 byte aligned; this migt not be true of static strings.  Shared buffers
3877        are heap allocated, as are all UStringImpls other than static strings.
3878        Static strings cannot end up being the owner string of substrings,
3879        since the only static strings are length 0.
3880
3881        * runtime/SmallStrings.cpp:
3882        (JSC::SmallStringsStorage::SmallStringsStorage):
3883        * runtime/UStringImpl.h:
3884        (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield):
3885        (JSC::UStringImpl::UStringImpl):
3886
38872009-12-22  Kwang Yul Seo  <skyul@company100.net>
3888
3889        Reviewed by Darin Adler.
3890
3891        RVCT (__ARMCC_VERSION < 400000) does not provide strcasecmp and strncasecmp
3892        https://bugs.webkit.org/show_bug.cgi?id=32857
3893
3894        Add implementation of strcasecmp and strncasecmp for RVCT < 4.0
3895        because earlier versions of RVCT 4.0 does not provide these functions.
3896
3897        * wtf/StringExtras.cpp: Added.
3898        (strcasecmp):
3899        (strncasecmp):
3900        * wtf/StringExtras.h:
3901
39022009-12-22  Kwang Yul Seo  <skyul@company100.net>
3903
3904        Reviewed by Darin Adler.
3905
3906        Define ALWAYS_INLINE and WTF_PRIVATE_INLINE to __forceinline for RVCT
3907        https://bugs.webkit.org/show_bug.cgi?id=32853
3908
3909        Use __forceinline forces RVCT to compile a C or C++ function
3910        inline. The compiler attempts to inline the function, regardless of
3911        the characteristics of the function.
3912
3913        * wtf/AlwaysInline.h:
3914        * wtf/FastMalloc.h:
3915
39162009-12-21  Simon Hausmann  <simon.hausmann@nokia.com>
3917
3918        Prospective GTK build fix: Add UStringImpl.cpp/h to the build.
3919
3920        * GNUmakefile.am:
3921
39222009-12-21  Simon Hausmann  <simon.hausmann@nokia.com>
3923
3924        Fix the Qt build, add UStringImpl.cpp to the build.
3925
3926        * JavaScriptCore.pri:
3927
39282009-12-21  Gavin Barraclough  <barraclough@apple.com>
3929
3930        Windows Build fix part 5.
3931        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3932
39332009-12-21  Gavin Barraclough  <barraclough@apple.com>
3934
3935        Reviewed by NOBODY (build fix).
3936        Fix breakage of world introduced in build fix to r52463.
3937
3938        * runtime/UStringImpl.h:
3939
39402009-12-21  Gavin Barraclough  <barraclough@apple.com>
3941
3942        Reviewed by Darin Adler.
3943
3944        https://bugs.webkit.org/show_bug.cgi?id=32831
3945        Replace UString::Rep implementation, following introduction of ropes to JSC.
3946
3947            * Remove redundant overcapacity mechanisms.
3948            * Reduce memory cost of Rep's.
3949            * Add an inline storage mechanism akin to that in WebCore's StringImpl.
3950
3951        ~1% Sunspider progression.
3952
3953        * JavaScriptCore.exp:
3954        * JavaScriptCore.xcodeproj/project.pbxproj:
3955        * runtime/JSString.cpp:
3956        (JSC::JSString::resolveRope):
3957        * runtime/SmallStrings.cpp:
3958        (JSC::SmallStringsStorage::SmallStringsStorage):
3959        * runtime/UString.cpp:
3960        (JSC::initializeUString):
3961        (JSC::createRep):
3962        (JSC::UString::createFromUTF8):
3963        (JSC::UString::createUninitialized):
3964        (JSC::UString::spliceSubstringsWithSeparators):
3965        (JSC::UString::replaceRange):
3966        (JSC::UString::ascii):
3967        (JSC::UString::operator=):
3968        (JSC::UString::toStrictUInt32):
3969        (JSC::equal):
3970        * runtime/UString.h:
3971        (JSC::UString::isEmpty):
3972        (JSC::UString::cost):
3973        (JSC::makeString):
3974        * runtime/UStringImpl.cpp: Added.
3975        (JSC::UStringImpl::baseSharedBuffer):
3976        (JSC::UStringImpl::sharedBuffer):
3977        (JSC::UStringImpl::destroy):
3978        (JSC::UStringImpl::computeHash):
3979        * runtime/UStringImpl.h: Added.
3980        (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield):
3981        (JSC::UntypedPtrAndBitfield::asPtr):
3982        (JSC::UntypedPtrAndBitfield::operator&=):
3983        (JSC::UntypedPtrAndBitfield::operator|=):
3984        (JSC::UntypedPtrAndBitfield::operator&):
3985        (JSC::UStringImpl::create):
3986        (JSC::UStringImpl::createCopying):
3987        (JSC::UStringImpl::createUninitialized):
3988        (JSC::UStringImpl::data):
3989        (JSC::UStringImpl::size):
3990        (JSC::UStringImpl::cost):
3991        (JSC::UStringImpl::hash):
3992        (JSC::UStringImpl::computedHash):
3993        (JSC::UStringImpl::setHash):
3994        (JSC::UStringImpl::identifierTable):
3995        (JSC::UStringImpl::setIdentifierTable):
3996        (JSC::UStringImpl::ref):
3997        (JSC::UStringImpl::deref):
3998        (JSC::UStringImpl::allocChars):
3999        (JSC::UStringImpl::copyChars):
4000        (JSC::UStringImpl::computeHash):
4001        (JSC::UStringImpl::null):
4002        (JSC::UStringImpl::empty):
4003        (JSC::UStringImpl::checkConsistency):
4004        (JSC::UStringImpl::):
4005        (JSC::UStringImpl::UStringImpl):
4006        (JSC::UStringImpl::operator new):
4007        (JSC::UStringImpl::bufferOwnerString):
4008        (JSC::UStringImpl::bufferOwnership):
4009        (JSC::UStringImpl::isStatic):
4010
40112009-12-18  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
4012
4013        Reviewed by Kenneth Rohde Christiansen.
4014
4015        Move some build decisions from Qt build system into source files
4016        https://bugs.webkit.org/show_bug.cgi?id=31956
4017
4018        * JavaScriptCore.pri: Compile files unconditionally
4019        * jit/ExecutableAllocatorPosix.cpp: Guard with PLATFORM(UNIX) && !PLATFORM(SYMBIAN)
4020        * jit/ExecutableAllocatorWin.cpp: Guard with PLATFORM(WIN_OS)
4021        * runtime/MarkStackPosix.cpp: Guard with PLATFORM(UNIX) && !PLATFORM(SYMBIAN)
4022        * runtime/MarkStackSymbian.cpp: Guard with PLATFORM(SYMBIAN)
4023        * runtime/MarkStackWin.cpp: Guard with PLATFORM(WIN_OS)
4024        * wtf/Platform.h: Guard ENABLE_JSC_MULTIPLE_THREADS with ENABLE_SINGLE_THREADED for the Qt port
4025        * wtf/ThreadingNone.cpp: Guard with ENABLE(SINGLE_THREADED)
4026        * wtf/qt/ThreadingQt.cpp: Guard with !ENABLE(SINGLE_THREADED)
4027
40282009-12-18  Gavin Barraclough  <barraclough@apple.com>
4029
4030        Reviewed by Sam Weinig.
4031
4032        Add createNonCopying method to UString to make replace constructor passed bool,
4033        to make behaviour more explicit.  Add createFromUTF8 to UString (wrapping method
4034        on UString::Rep), since other cases of transliteration (e.g.  from ascii) are
4035        performed in UString constructors.  Add/use setHash & size() accessors on Rep,
4036        rather than accessing _hash/len directly.
4037
4038        * API/JSClassRef.cpp:
4039        (OpaqueJSClass::OpaqueJSClass):
4040        * API/OpaqueJSString.cpp:
4041        (OpaqueJSString::ustring):
4042        * JavaScriptCore.exp:
4043        * runtime/ArrayPrototype.cpp:
4044        (JSC::arrayProtoFuncToString):
4045        * runtime/Identifier.cpp:
4046        (JSC::Identifier::equal):
4047        (JSC::CStringTranslator::translate):
4048        (JSC::UCharBufferTranslator::translate):
4049        (JSC::Identifier::addSlowCase):
4050        * runtime/JSString.cpp:
4051        (JSC::JSString::resolveRope):
4052        * runtime/JSString.h:
4053        (JSC::JSString::Rope::Fiber::refAndGetLength):
4054        (JSC::JSString::Rope::append):
4055        * runtime/StringBuilder.h:
4056        (JSC::StringBuilder::release):
4057        * runtime/StringConstructor.cpp:
4058        (JSC::stringFromCharCodeSlowCase):
4059        * runtime/StringPrototype.cpp:
4060        (JSC::substituteBackreferencesSlow):
4061        (JSC::stringProtoFuncToLowerCase):
4062        (JSC::stringProtoFuncToUpperCase):
4063        (JSC::stringProtoFuncFontsize):
4064        (JSC::stringProtoFuncLink):
4065        * runtime/UString.cpp:
4066        (JSC::UString::UString):
4067        (JSC::UString::createNonCopying):
4068        (JSC::UString::createFromUTF8):
4069        * runtime/UString.h:
4070        (JSC::UString::Rep::setHash):
4071        (JSC::UString::~UString):
4072        (JSC::makeString):
4073
40742009-12-18  Geoffrey Garen  <ggaren@apple.com>
4075
4076        Reviewed by Cameron Zwarich and Gavin Barraclough.
4077
4078        Changed Register constructors to assignment operators, to streamline
4079        moving values into registers. (In theory, there's no difference between
4080        the two, since the constructor should just inline away, but there seems
4081        to be a big difference in the addled mind of the GCC optimizer.)
4082
4083        In the interpreter, this is a 3.5% SunSpider speedup and a 1K-2K
4084        reduction in stack usage per privateExecute stack frame.
4085
4086        * interpreter/CallFrame.h:
4087        (JSC::ExecState::setCalleeArguments):
4088        (JSC::ExecState::setCallerFrame):
4089        (JSC::ExecState::setScopeChain):
4090        (JSC::ExecState::init):
4091        (JSC::ExecState::setArgumentCount):
4092        (JSC::ExecState::setCallee):
4093        (JSC::ExecState::setCodeBlock): Added a little bit of casting so these
4094        functions could use the new Register assignment operators.
4095
4096        * interpreter/Register.h:
4097        (JSC::Register::withInt):
4098        (JSC::Register::Register):
4099        (JSC::Register::operator=): Swapped in assignment operators for constructors.
4100
41012009-12-18  Yongjun Zhang  <yongjun.zhang@nokia.com>
4102
4103        Reviewed by Simon Hausmann.
4104
4105        https://bugs.webkit.org/show_bug.cgi?id=32713
4106        [Qt] make wtf/Assertions.h compile in winscw compiler.
4107
4108        Add string arg before ellipsis to help winscw compiler resolve variadic
4109        macro definitions in wtf/Assertions.h.
4110
4111        * wtf/Assertions.h:
4112
41132009-12-18  Geoffrey Garen  <ggaren@apple.com>
4114
4115        Reviewed by Adam Roben.
4116
4117        Fixed intermittent failure seen on Windows buildbot, and in other JSC
4118        API clients.
4119
4120        Added a WeakGCPtr class and changed OpaqueJSClass::cachedPrototype to
4121        use it, to avoid vending a stale object as a prototype.
4122
4123        * API/JSClassRef.cpp:
4124        (OpaqueJSClassContextData::OpaqueJSClassContextData):
4125        (OpaqueJSClass::prototype):
4126        * API/JSClassRef.h: Use WeakGCPtr.
4127
4128        * JavaScriptCore.xcodeproj/project.pbxproj:
4129        * runtime/WeakGCPtr.h: Added.
4130        (JSC::WeakGCPtr::WeakGCPtr):
4131        (JSC::WeakGCPtr::get):
4132        (JSC::WeakGCPtr::clear):
4133        (JSC::WeakGCPtr::operator*):
4134        (JSC::WeakGCPtr::operator->):
4135        (JSC::WeakGCPtr::operator!):
4136        (JSC::WeakGCPtr::operator bool):
4137        (JSC::WeakGCPtr::operator UnspecifiedBoolType):
4138        (JSC::WeakGCPtr::assign):
4139        (JSC::::operator):
4140        (JSC::operator==):
4141        (JSC::operator!=):
4142        (JSC::static_pointer_cast):
4143        (JSC::const_pointer_cast):
4144        (JSC::getPtr): Added WeakGCPtr to the project.
4145
41462009-12-18  Gavin Barraclough  <barraclough@apple.com>
4147
4148        Reviewed by Sam Weinig.
4149
4150        https://bugs.webkit.org/show_bug.cgi?id=32720
4151
4152        * JavaScriptCore.exp:
4153            - Remove exports for UString::append
4154        * JavaScriptCore.xcodeproj/project.pbxproj:
4155            - Make StringBuilder a private header (was project).
4156
41572009-12-18  Martin Robinson  <martin.james.robinson@gmail.com>
4158
4159        Reviewed by Gustavo Noronha Silva.
4160
4161        [GTK] GRefPtr does not take a reference when assigned a raw pointer
4162        https://bugs.webkit.org/show_bug.cgi?id=32709
4163
4164        Ensure that when assigning a raw pointer to a GRefPtr, the reference
4165        count is incremented. Also remove the GRefPtr conversion overload as
4166        GRefPtr types have necessarily incompatible reference counting.
4167
4168        * wtf/gtk/GRefPtr.h:
4169        (WTF::GRefPtr::operator=):
4170
41712009-12-18  Simon Hausmann  <simon.hausmann@nokia.com>
4172
4173        Reviewed by Tor Arne Vestbø.
4174
4175        [Qt] Clean up the qmake build system to distinguish between trunk builds and package builds
4176
4177        https://bugs.webkit.org/show_bug.cgi?id=32716
4178
4179        * pcre/pcre.pri: Use standalone_package instead of QTDIR_build
4180
41812009-12-18  Martin Robinson  <martin.james.robinson@gmail.com>
4182
4183        Reviewed by Gustavo Noronha Silva.
4184
4185        [GTK] Compile warning from line 29 of GRefPtr.cpp
4186        https://bugs.webkit.org/show_bug.cgi?id=32703
4187
4188        Fix memory leak and compiler warning in GRefPtr GHashTable template
4189        specialization.
4190
4191        * wtf/gtk/GRefPtr.cpp:
4192        (WTF::refGPtr):
4193
41942009-12-17  Sam Weinig  <sam@webkit.org>
4195
4196        Reviewed by Mark Rowe.
4197
4198        Add BUILDING_ON_SNOW_LEOPARD and TARGETING_SNOW_LEOPARD #defines.
4199
4200        * wtf/Platform.h:
4201
42022009-12-17  Adam Roben  <aroben@apple.com>
4203
4204        Sync JavaScriptCore.vcproj with JavaScriptCore.xcodeproj and the
4205        source tree
4206
4207        Fixes <http://webkit.org/b/32665>.
4208
4209        Reviewed by Ada Chan.
4210
4211        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Moved
4212        around files and filters so that the structure matches
4213        JavaScriptCore.xcodeproj and the source tree. A few headers that were
4214        previously omitted have been added, as well as JSZombie.{cpp,h}.
4215
42162009-12-17  Adam Roben  <aroben@apple.com>
4217
4218        Remove HeavyProfile and TreeProfile completely
4219
4220        These were mostly removed in r42808, but the empty files were left in
4221        place.
4222
4223        Fixes <http://webkit.org/b/32664>.
4224
4225        Reviewed by John Sullivan.
4226
4227        * Android.mk:
4228        * GNUmakefile.am:
4229        * JavaScriptCore.gypi:
4230        * JavaScriptCore.pri:
4231        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
4232        * JavaScriptCoreSources.bkl:
4233        Removed HeavyProfile/TreeProfile source files.
4234
4235        * profiler/HeavyProfile.cpp: Removed.
4236        * profiler/HeavyProfile.h: Removed.
4237        * profiler/TreeProfile.cpp: Removed.
4238        * profiler/TreeProfile.h: Removed.
4239
42402009-12-17  Martin Robinson  <martin.james.robinson@gmail.com>
4241
4242        Reviewed by Gustavo Noronha Silva.
4243
4244        [GTK] WebKit GTK needs a wrapper for ref counted glib/gobject structs
4245        https://bugs.webkit.org/show_bug.cgi?id=21599
4246
4247        Implement GRefPtr, a smart pointer for reference counted GObject types.
4248
4249        * GNUmakefile.am:
4250        * wtf/gtk/GOwnPtr.cpp:
4251        (WTF::GDir):
4252        * wtf/gtk/GRefPtr.h: Added.
4253        (WTF::):
4254        (WTF::GRefPtr::GRefPtr):
4255        (WTF::GRefPtr::~GRefPtr):
4256        (WTF::GRefPtr::clear):
4257        (WTF::GRefPtr::get):
4258        (WTF::GRefPtr::operator*):
4259        (WTF::GRefPtr::operator->):
4260        (WTF::GRefPtr::operator!):
4261        (WTF::GRefPtr::operator UnspecifiedBoolType):
4262        (WTF::GRefPtr::hashTableDeletedValue):
4263        (WTF::::operator):
4264        (WTF::::swap):
4265        (WTF::swap):
4266        (WTF::operator==):
4267        (WTF::operator!=):
4268        (WTF::static_pointer_cast):
4269        (WTF::const_pointer_cast):
4270        (WTF::getPtr):
4271        (WTF::adoptGRef):
4272        (WTF::refGPtr):
4273        (WTF::derefGPtr):
4274
42752009-12-17  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
4276
4277        Unreviewed. Build fixes for make distcheck.
4278
4279        * GNUmakefile.am:
4280
42812009-12-16  Geoffrey Garen  <ggaren@apple.com>
4282
4283        Reviewed by Oliver Hunt.
4284
4285        Fixed <rdar://problem/7355025> Interpreter::privateExecute macro generates
4286        bloated code
4287
4288        This patch cuts Interpreter stack use by about a third.
4289
4290        * bytecode/Opcode.h: Changed Opcode to const void* to work with the
4291        const static initiliazation we want to do in Interpreter::privateExecute.
4292
4293        * interpreter/Interpreter.cpp:
4294        (JSC::Interpreter::Interpreter): Moved hashtable initialization here to
4295        avoid polluting Interpreter::privateExecute's stack, and changed it from a
4296        series of add() calls to one add() call in a loop, to cut down on code size.
4297
4298        (JSC::Interpreter::privateExecute): Changed a series of label computations
4299        to a copy of a compile-time constant array to cut down on code size.
4300
43012009-12-16  Mark Rowe  <mrowe@apple.com>
4302
4303        Build fix.  Disable debug variants of WebKit frameworks.
4304
4305        * JavaScriptCore.xcodeproj/project.pbxproj:
4306
43072009-12-15  Geoffrey Garen  <ggaren@apple.com>
4308
4309        Reviewed by Sam "r=me" Weinig.
4310
4311        https://bugs.webkit.org/show_bug.cgi?id=32498
4312        <rdar://problem/7471495>
4313        REGRESSION(r51978-r52039): AJAX "Mark This Forum Read" function no longer
4314        works
4315
4316        Fixed a tyop.
4317
4318        * runtime/Operations.h:
4319        (JSC::jsAdd): Use the '&&' operator, not the ',' operator.
4320
43212009-12-15  Geoffrey Garen  <ggaren@apple.com>
4322
4323        Try to fix the windows build: don't export this inlined function.
4324
4325        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4326
43272009-12-15  Geoffrey Garen  <ggaren@apple.com>
4328
4329        Reviewed by Beth Dakin.
4330
4331        Inlined JSCell's operator new.
4332
4333        3.7% speedup on bench-allocate-nonretained.js.
4334
4335        * JavaScriptCore.exp:
4336        * runtime/JSCell.cpp:
4337        * runtime/JSCell.h:
4338        (JSC::JSCell::operator new):
4339
43402009-12-15  Geoffrey Garen  <ggaren@apple.com>
4341
4342        Reviewed by Oliver Hunt.
4343
4344        Removed the number heap, replacing it with a one-item free list for
4345        numbers, taking advantage of the fact that two number cells fit inside
4346        the space for one regular cell, and number cells don't require destruction.
4347
4348        SunSpider says 1.6% faster in JSVALUE32 mode (the only mode that
4349        heap-allocates numbers).
4350
4351        SunSpider says 1.1% faster in JSVALUE32_64 mode. v8 says 0.8% faster
4352        in JSVALUE32_64 mode. 10% speedup on bench-alloc-nonretained.js. 6%
4353        speedup on bench-alloc-retained.js.
4354
4355        There's a lot of formulaic change in this patch, but not much substance.
4356
4357        * JavaScriptCore.exp:
4358        * debugger/Debugger.cpp:
4359        (JSC::Debugger::recompileAllJSFunctions):
4360        * runtime/Collector.cpp:
4361        (JSC::Heap::Heap):
4362        (JSC::Heap::destroy):
4363        (JSC::Heap::allocateBlock):
4364        (JSC::Heap::freeBlock):
4365        (JSC::Heap::freeBlockPtr):
4366        (JSC::Heap::freeBlocks):
4367        (JSC::Heap::recordExtraCost):
4368        (JSC::Heap::allocate):
4369        (JSC::Heap::resizeBlocks):
4370        (JSC::Heap::growBlocks):
4371        (JSC::Heap::shrinkBlocks):
4372        (JSC::Heap::markConservatively):
4373        (JSC::Heap::clearMarkBits):
4374        (JSC::Heap::markedCells):
4375        (JSC::Heap::sweep):
4376        (JSC::Heap::markRoots):
4377        (JSC::Heap::objectCount):
4378        (JSC::Heap::addToStatistics):
4379        (JSC::Heap::statistics):
4380        (JSC::Heap::isBusy):
4381        (JSC::Heap::reset):
4382        (JSC::Heap::collectAllGarbage):
4383        (JSC::Heap::primaryHeapBegin):
4384        (JSC::Heap::primaryHeapEnd):
4385        * runtime/Collector.h:
4386        (JSC::): Removed all code pertaining to the number heap, and changed all
4387        heap template functions and classes to non-template functions and classes.
4388
4389        (JSC::Heap::allocateNumber): A new optimization to replace the number
4390        heap: allocate half-sized number cells in pairs, returning the first
4391        cell and caching the second cell for the next allocation.
4392
4393        * runtime/CollectorHeapIterator.h:
4394        (JSC::LiveObjectIterator::LiveObjectIterator):
4395        (JSC::LiveObjectIterator::operator++):
4396        (JSC::DeadObjectIterator::DeadObjectIterator):
4397        (JSC::DeadObjectIterator::operator++):
4398        (JSC::ObjectIterator::ObjectIterator):
4399        (JSC::ObjectIterator::operator++):
4400        * runtime/JSCell.h:
4401        (JSC::JSCell::isNumber): Removed all code pertaining to the number heap,
4402        and changed all heap template functions and classes to non-template functions
4403        and classes.
4404
44052009-12-15  Zoltan Horvath  <zoltan@webkit.org>
4406
4407        Reviewed by Darin Adler.
4408
4409        Allow custom memory allocation control for WeakGCMap class
4410        https://bugs.webkit.org/show_bug.cgi?id=32547
4411
4412        Inherits WeakGCMap from FastAllocBase because it is instantiated by
4413        'new' at: WebCore/dom/Document.cpp:512.
4414
4415        * runtime/WeakGCMap.h:
4416
44172009-12-15  Zoltan Horvath  <zoltan@webkit.org>
4418
4419        Reviewed by Darin Adler.
4420
4421        Allow custom memory allocation control for dtoa's P5Node struct
4422        https://bugs.webkit.org/show_bug.cgi?id=32544
4423
4424        Inherits P5Node struct from Noncopyable because it is instantiated by
4425        'new' at wtf/dtoa.cpp:588 and don't need to be copyable.
4426
4427        * wtf/dtoa.cpp:
4428
44292009-12-14  Geoffrey Garen  <ggaren@apple.com>
4430
4431        Reviewed by Simon Fraser.
4432
4433        https://bugs.webkit.org/show_bug.cgi?id=32524
4434        REGRESSION(52084): fast/dom/prototypes.html failing two CSS tests
4435
4436        * wtf/StdLibExtras.h:
4437        (WTF::bitCount): The original patch put the parentheses in the wrong
4438        place, completely changing the calculation and making it almost always
4439        wrong. Moved the parentheses around the '+' operation, like the original
4440        compiler warning suggested.
4441
44422009-12-14  Gabor Loki  <loki@inf.u-szeged.hu>
4443
4444        Unreviewed trivial buildfix.
4445
4446        Fix crosses initialization of usedPrimaryBlocks for JSValue32
4447
4448        * runtime/Collector.cpp:
4449        (JSC::Heap::markConservatively):
4450
44512009-12-14  Csaba Osztrogonác  <ossy@webkit.org>
4452
4453        Reviewed by Simon Hausmann.
4454
4455        GCC 4.3.x warning fixed. Suggested parantheses added.
4456        warning: ../../../JavaScriptCore/wtf/StdLibExtras.h:77: warning: suggest parentheses around + or - in operand of &
4457
4458        * wtf/StdLibExtras.h:
4459        (WTF::bitCount):
4460
44612009-12-13  Geoffrey Garen  <ggaren@apple.com>
4462
4463        Reviewed by Sam Weinig.
4464
4465        Changed GC from mark-sweep to mark-allocate.
4466
4467        Added WeakGCMap to keep WebCore blissfully ignorant about objects that
4468        have become garbage but haven't run their destructors yet.
4469
4470        1% SunSpider speedup.
4471        7.6% v8 speedup (37% splay speedup).
4472        17% speedup on bench-alloc-nonretained.js.
4473        18% speedup on bench-alloc-retained.js.
4474
4475        * API/JSBase.cpp:
4476        (JSGarbageCollect):
4477        * API/JSContextRef.cpp:
4478        * JavaScriptCore.exp:
4479        * JavaScriptCore.xcodeproj/project.pbxproj: Updated for renames and new
4480        files.
4481
4482        * debugger/Debugger.cpp:
4483        (JSC::Debugger::recompileAllJSFunctions): Updated to use the Collector
4484        iterator abstraction.
4485
4486        * jsc.cpp:
4487        (functionGC): Updated for rename.
4488
4489        * runtime/Collector.cpp: Slightly reduced the number of allocations per
4490        collection, so that small workloads only allocate on collector block,
4491        rather than two.
4492
4493        (JSC::Heap::Heap): Updated to use the new allocateBlock function.
4494
4495        (JSC::Heap::destroy): Updated to use the new freeBlocks function.
4496
4497        (JSC::Heap::allocateBlock): New function to initialize a block when
4498        allocating it.
4499
4500        (JSC::Heap::freeBlock): Consolidated the responsibility for running
4501        destructors into this function.
4502
4503        (JSC::Heap::freeBlocks): Updated to use freeBlock.
4504
4505        (JSC::Heap::recordExtraCost): Sweep the heap in this reporting function,
4506        so that allocation, which is more common, doesn't have to check extraCost.
4507
4508        (JSC::Heap::heapAllocate): Run destructors right before recycling a
4509        garbage cell. This has better cache utilization than a separate sweep phase.
4510
4511        (JSC::Heap::resizeBlocks):
4512        (JSC::Heap::growBlocks):
4513        (JSC::Heap::shrinkBlocks): New set of functions for managing the size of
4514        the heap, now that the heap doesn't maintain any information about its
4515        size.
4516
4517        (JSC::isPointerAligned):
4518        (JSC::isHalfCellAligned):
4519        (JSC::isPossibleCell):
4520        (JSC::isCellAligned):
4521        (JSC::Heap::markConservatively): Cleaned up this code a bit.
4522
4523        (JSC::Heap::clearMarkBits):
4524        (JSC::Heap::markedCells): Some helper functions for examining the the mark
4525        bitmap.
4526
4527        (JSC::Heap::sweep): Simplified this function by using a DeadObjectIterator.
4528
4529        (JSC::Heap::markRoots): Reordered some operations for clarity.
4530
4531        (JSC::Heap::objectCount):
4532        (JSC::Heap::addToStatistics):
4533        (JSC::Heap::statistics): Rewrote these functions to calculate an object
4534        count on demand, since the heap doesn't maintain this information by
4535        itself.
4536
4537        (JSC::Heap::reset): New function for resetting the heap once we've
4538        exhausted heap space.
4539
4540        (JSC::Heap::collectAllGarbage): This function matches the old collect()
4541        behavior, but it's now an uncommon function used only by API.
4542
4543        * runtime/Collector.h:
4544        (JSC::CollectorBitmap::count):
4545        (JSC::CollectorBitmap::isEmpty): Added some helper functions for managing
4546        the collector mark bitmap.
4547
4548        (JSC::Heap::reportExtraMemoryCost): Changed reporting from cell equivalents
4549        to bytes, so it's easier to understand.
4550
4551        * runtime/CollectorHeapIterator.h:
4552        (JSC::CollectorHeapIterator::CollectorHeapIterator):
4553        (JSC::CollectorHeapIterator::operator!=):
4554        (JSC::CollectorHeapIterator::operator*):
4555        (JSC::CollectorHeapIterator::advance):
4556        (JSC::::LiveObjectIterator):
4557        (JSC::::operator):
4558        (JSC::::DeadObjectIterator):
4559        (JSC::::ObjectIterator): New iterators for encapsulating details about
4560        heap layout, and what's live and dead on the heap.
4561
4562        * runtime/JSArray.cpp:
4563        (JSC::JSArray::putSlowCase):
4564        (JSC::JSArray::increaseVectorLength): Delay reporting extra cost until
4565        we're fully constructed, so the heap mark phase won't visit us in an
4566        invalid state.
4567
4568        * runtime/JSCell.h:
4569        (JSC::JSCell::):
4570        (JSC::JSCell::createDummyStructure):
4571        (JSC::JSCell::JSCell):
4572        * runtime/JSGlobalData.cpp:
4573        (JSC::JSGlobalData::JSGlobalData):
4574        * runtime/JSGlobalData.h: Added a dummy cell to simplify allocation logic.
4575
4576        * runtime/JSString.h:
4577        (JSC::jsSubstring): Don't report extra cost for substrings, since they
4578        share a buffer that's already reported extra cost.
4579
4580        * runtime/Tracing.d:
4581        * runtime/Tracing.h: Changed these dtrace hooks not to report object
4582        counts, since they're no longer cheap to compute.
4583
4584        * runtime/UString.h: Updated for renames.
4585
4586        * runtime/WeakGCMap.h: Added.
4587        (JSC::WeakGCMap::isEmpty):
4588        (JSC::WeakGCMap::uncheckedGet):
4589        (JSC::WeakGCMap::uncheckedBegin):
4590        (JSC::WeakGCMap::uncheckedEnd):
4591        (JSC::::get):
4592        (JSC::::take):
4593        (JSC::::set):
4594        (JSC::::uncheckedRemove): Mentioned above.
4595
4596        * wtf/StdLibExtras.h:
4597        (WTF::bitCount): Added a bit population count function, so the heap can
4598        count live objects to fulfill statistics questions.
4599
4600The very last cell in the block is not allocated -- should not be marked.
4601
46022009-12-13  Geoffrey Garen  <ggaren@apple.com>
4603
4604        Windows build fix: Export some new symbols.
4605
4606        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4607
46082009-12-13  Geoffrey Garen  <ggaren@apple.com>
4609
4610        Windows build fix: Removed some old exports.
4611
4612        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4613
46142009-12-13  Geoffrey Garen  <ggaren@apple.com>
4615
4616        Windows build fix: Use unsigned instead of uint32_t to avoid dependencies.
4617
4618        * wtf/StdLibExtras.h:
4619        (WTF::bitCount):
4620
46212009-12-13  Gavin Barraclough  <barraclough@apple.com>
4622
4623        Reviewed by NOBODY (speculative Windows build fix).
4624
4625        * runtime/JSGlobalObjectFunctions.cpp:
4626
46272009-12-13  Gavin Barraclough  <barraclough@apple.com>
4628
4629        Reviewed by Sam Weinig.
4630
4631        https://bugs.webkit.org/show_bug.cgi?id=32496
4632        Switch remaining cases of string construction to use StringBuilder.
4633        Builds strings using a vector rather than using string append / addition.
4634
4635        * JavaScriptCore.exp:
4636        * JavaScriptCore.xcodeproj/project.pbxproj:
4637        * runtime/Executable.cpp:
4638        (JSC::FunctionExecutable::paramString):
4639        * runtime/FunctionConstructor.cpp:
4640        (JSC::constructFunction):
4641        * runtime/JSGlobalObjectFunctions.cpp:
4642        (JSC::encode):
4643        (JSC::decode):
4644        (JSC::globalFuncEscape):
4645        (JSC::globalFuncUnescape):
4646        * runtime/JSONObject.cpp:
4647        (JSC::Stringifier::stringify):
4648        (JSC::Stringifier::indent):
4649        * runtime/JSString.h:
4650        * runtime/LiteralParser.cpp:
4651        (JSC::LiteralParser::Lexer::lexString):
4652        * runtime/NumberPrototype.cpp:
4653        (JSC::integerPartNoExp):
4654        (JSC::numberProtoFuncToFixed):
4655        (JSC::numberProtoFuncToPrecision):
4656        * runtime/Operations.h:
4657        (JSC::jsString):
4658        * runtime/StringPrototype.cpp:
4659        (JSC::substituteBackreferencesSlow):
4660        (JSC::substituteBackreferences):
4661        (JSC::stringProtoFuncConcat):
4662
46632009-12-08  Jeremy Moskovich  <jeremy@chromium.org>
4664
4665        Reviewed by Eric Seidel.
4666
4667        Add code to allow toggling ATSUI/Core Text rendering at runtime in ComplexTextController.
4668        https://bugs.webkit.org/show_bug.cgi?id=31802
4669
4670        The goal here is to allow for a zero runtime hit for ports that decide to select
4671        the API at compile time.
4672        When both USE(ATSUI) and USE(CORE_TEXT) are true, the API is toggled
4673        at runtime.  Core Text is used for OS Versions >= 10.6.
4674
4675        * wtf/Platform.h: #define USE_CORE_TEXT and USE_ATSUI on Chrome/Mac.
4676
46772009-12-11  Maciej Stachowiak  <mjs@apple.com>
4678
4679        Reviewed by Oliver Hunt.
4680
4681        Unify codegen for forward and backward variants of branches
4682        https://bugs.webkit.org/show_bug.cgi?id=32463
4683
4684        * jit/JIT.h:
4685        (JSC::JIT::emit_op_loop): Implemented in terms of forward variant.
4686        (JSC::JIT::emit_op_loop_if_true): ditto
4687        (JSC::JIT::emitSlow_op_loop_if_true): ditto
4688        (JSC::JIT::emit_op_loop_if_false): ditto
4689        (JSC::JIT::emitSlow_op_loop_if_false): ditto
4690        (JSC::JIT::emit_op_loop_if_less): ditto
4691        (JSC::JIT::emitSlow_op_loop_if_less): ditto
4692        * jit/JITOpcodes.cpp:
4693
46942009-12-11  Sam Weinig  <sam@webkit.org>
4695
4696        Reviewed by Anders Carlsson.
4697
4698        Allow WTFs concept of the main thread to differ from pthreads when necessary.
4699
4700        * wtf/ThreadingPthreads.cpp:
4701        (WTF::initializeThreading):
4702        (WTF::isMainThread):
4703        * wtf/mac/MainThreadMac.mm:
4704        (WTF::initializeMainThreadPlatform):
4705        (WTF::scheduleDispatchFunctionsOnMainThread):
4706
47072009-12-11  Gavin Barraclough  <barraclough@apple.com>
4708
4709        Reviewed by Oliver Hunt.
4710
4711        https://bugs.webkit.org/show_bug.cgi?id=32454
4712        Refactor construction of simple strings to avoid string concatenation.
4713
4714        Building strings through concatenation has a memory and performance cost -
4715        a memory cost since we must over-allocate the buffer to leave space to append
4716        into, and performance in that the string may still require reallocation (and
4717        thus copying during construction).  Instead move the full construction to
4718        within a single function call (makeString), so that the arguments' lengths
4719        can be calculated and an appropriate sized buffer allocated before copying
4720        any characters.
4721
4722        ~No performance change (~2% progression on date tests).
4723
4724        * bytecode/CodeBlock.cpp:
4725        (JSC::escapeQuotes):
4726        (JSC::valueToSourceString):
4727        (JSC::constantName):
4728        (JSC::idName):
4729        (JSC::CodeBlock::registerName):
4730        (JSC::regexpToSourceString):
4731        (JSC::regexpName):
4732        * bytecompiler/NodesCodegen.cpp:
4733        (JSC::substitute):
4734        * profiler/Profiler.cpp:
4735        (JSC::Profiler::createCallIdentifier):
4736        * runtime/DateConstructor.cpp:
4737        (JSC::callDate):
4738        * runtime/DateConversion.cpp:
4739        (JSC::formatDate):
4740        (JSC::formatDateUTCVariant):
4741        (JSC::formatTime):
4742        (JSC::formatTimeUTC):
4743        * runtime/DateConversion.h:
4744        (JSC::):
4745        * runtime/DatePrototype.cpp:
4746        (JSC::dateProtoFuncToString):
4747        (JSC::dateProtoFuncToUTCString):
4748        (JSC::dateProtoFuncToDateString):
4749        (JSC::dateProtoFuncToTimeString):
4750        (JSC::dateProtoFuncToGMTString):
4751        * runtime/ErrorPrototype.cpp:
4752        (JSC::errorProtoFuncToString):
4753        * runtime/ExceptionHelpers.cpp:
4754        (JSC::createUndefinedVariableError):
4755        (JSC::createErrorMessage):
4756        (JSC::createInvalidParamError):
4757        * runtime/FunctionPrototype.cpp:
4758        (JSC::insertSemicolonIfNeeded):
4759        (JSC::functionProtoFuncToString):
4760        * runtime/ObjectPrototype.cpp:
4761        (JSC::objectProtoFuncToString):
4762        * runtime/RegExpConstructor.cpp:
4763        (JSC::constructRegExp):
4764        * runtime/RegExpObject.cpp:
4765        (JSC::RegExpObject::match):
4766        * runtime/RegExpPrototype.cpp:
4767        (JSC::regExpProtoFuncCompile):
4768        (JSC::regExpProtoFuncToString):
4769        * runtime/StringPrototype.cpp:
4770        (JSC::stringProtoFuncBig):
4771        (JSC::stringProtoFuncSmall):
4772        (JSC::stringProtoFuncBlink):
4773        (JSC::stringProtoFuncBold):
4774        (JSC::stringProtoFuncFixed):
4775        (JSC::stringProtoFuncItalics):
4776        (JSC::stringProtoFuncStrike):
4777        (JSC::stringProtoFuncSub):
4778        (JSC::stringProtoFuncSup):
4779        (JSC::stringProtoFuncFontcolor):
4780        (JSC::stringProtoFuncFontsize):
4781        (JSC::stringProtoFuncAnchor):
4782        * runtime/UString.h:
4783        (JSC::):
4784        (JSC::makeString):
4785
47862009-12-10  Gavin Barraclough  <barraclough@apple.com>
4787
4788        Reviewed by Oliver Hunt.
4789
4790        https://bugs.webkit.org/show_bug.cgi?id=32400
4791        Switch remaining cases of string addition to use ropes.
4792
4793        Re-landing r51975 - added toPrimitiveString method,
4794        performs toPrimitive then subsequent toString operations.
4795
4796        ~1% progression on Sunspidey.
4797
4798        * jit/JITStubs.cpp:
4799        (JSC::DEFINE_STUB_FUNCTION):
4800        * runtime/JSString.h:
4801        (JSC::JSString::JSString):
4802        (JSC::JSString::appendStringInConstruct):
4803        * runtime/Operations.cpp:
4804        (JSC::jsAddSlowCase):
4805        * runtime/Operations.h:
4806        (JSC::jsString):
4807        (JSC::jsAdd):
4808
48092009-12-11  Adam Roben  <aroben@apple.com>
4810
4811        Windows build fix
4812
4813        * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Added
4814        $(WebKitOutputDir)/include/private to the include path.
4815
48162009-12-11  Adam Roben  <aroben@apple.com>
4817
4818        Move QuartzCorePresent.h to include/private
4819
4820        This fixes other projects that use wtf/Platform.h
4821
4822        Rubber-stamped by Steve Falkenburg.
4823
4824        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Let VS do its thang.
4825        * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Write
4826        QuartzCorePresent.h to $(WebKitOutputDir)/include/private.
4827
4828        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
4829        * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
4830        Added $(WebKitOutputDir)/include/private to the include path.
4831
48322009-12-11  Adam Roben  <aroben@apple.com>
4833
4834        Fix clean builds and everything rebuilding on every build
4835
4836        Reviewed by Sam Weinig.
4837
4838        * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Don't
4839        write out QuartzCorePresent.h if it exists but is older than
4840        QuartzCore.h. Also, create the directory we write QuartzCorePresent.h
4841        into first.
4842
48432009-12-11  Adam Roben  <aroben@apple.com>
4844
4845        Windows build fix for systems with spaces in their paths
4846
4847        * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Quote some paths.
4848
48492009-12-11  Chris Marrin  <cmarrin@apple.com>
4850
4851        Reviewed by Adam Roben.
4852
4853        Add check for presence of QuartzCore headers
4854        https://bugs.webkit.org/show_bug.cgi?id=31856
4855
4856        The script now checks for the presence of QuartzCore.h. If present
4857        it will turn on ACCELERATED_COMPOSITING and 3D_RENDERING to enable
4858        HW compositing on Windows. The script writes QuartzCorePresent.h to
4859        the build directory which has a define telling whether QuartzCore is
4860        present.
4861
4862        * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
4863        * wtf/Platform.h:
4864
48652009-12-11  Kent Tamura  <tkent@chromium.org>
4866
4867        Reviewed by Darin Adler.
4868
4869        Fix a problem that JSC::gregorianDateTimeToMS() returns a negative
4870        value for a huge year value.
4871        https://bugs.webkit.org/show_bug.cgi?id=32304
4872
4873        * wtf/DateMath.cpp:
4874        (WTF::dateToDaysFrom1970): Renamed from dateToDayInYear, and changed the return type to double.
4875        (WTF::calculateDSTOffset): Follow the dateToDaysFrom1970() change.
4876        (WTF::timeClip): Use maxECMAScriptTime.
4877        (JSC::gregorianDateTimeToMS): Follow the dateToDaysFrom1970() change.
4878
48792009-12-10  Adam Barth  <abarth@webkit.org>
4880
4881        No review, rolling out r51975.
4882        http://trac.webkit.org/changeset/51975
4883
4884        * jit/JITStubs.cpp:
4885        (JSC::DEFINE_STUB_FUNCTION):
4886        * runtime/JSString.h:
4887        (JSC::JSString::JSString):
4888        (JSC::JSString::appendStringInConstruct):
4889        * runtime/Operations.cpp:
4890        (JSC::jsAddSlowCase):
4891        * runtime/Operations.h:
4892        (JSC::jsString):
4893        (JSC::jsAdd):
4894
48952009-12-10  Oliver Hunt  <oliver@apple.com>
4896
4897        Reviewed by Gavin Barraclough.
4898
4899        Incorrect caching of prototype lookup with dictionary base
4900        https://bugs.webkit.org/show_bug.cgi?id=32402
4901
4902        Make sure we don't add cached prototype lookup to the proto_list
4903        lookup chain if the top level object is a dictionary.
4904
4905        * jit/JITStubs.cpp:
4906        (JSC::JITThunks::tryCacheGetByID):
4907
49082009-12-10  Gavin Barraclough  <barraclough@apple.com>
4909
4910        Reviewed by Oliver Hunt.
4911
4912        https://bugs.webkit.org/show_bug.cgi?id=32400
4913        Switch remaining cases of string addition to use ropes.
4914
4915        ~1% progression on Sunspidey.
4916
4917        * jit/JITStubs.cpp:
4918        (JSC::DEFINE_STUB_FUNCTION):
4919        * runtime/JSString.h:
4920        (JSC::JSString::JSString):
4921        (JSC::JSString::appendStringInConstruct):
4922        * runtime/Operations.cpp:
4923        (JSC::jsAddSlowCase):
4924        * runtime/Operations.h:
4925        (JSC::jsString):
4926        (JSC::jsAdd):
4927
49282009-12-10  Kent Hansen  <kent.hansen@nokia.com>
4929
4930        Reviewed by Geoffrey Garen.
4931
4932        Remove JSObject::getPropertyAttributes() and all usage of it.
4933        https://bugs.webkit.org/show_bug.cgi?id=31933
4934
4935        getOwnPropertyDescriptor() should be used instead.
4936
4937        * JavaScriptCore.exp:
4938        * JavaScriptCore.order:
4939        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4940        * debugger/DebuggerActivation.cpp:
4941        (JSC::DebuggerActivation::getOwnPropertyDescriptor):
4942        * debugger/DebuggerActivation.h:
4943        * runtime/JSObject.cpp:
4944        (JSC::JSObject::propertyIsEnumerable):
4945        * runtime/JSObject.h:
4946        * runtime/JSVariableObject.cpp:
4947        * runtime/JSVariableObject.h:
4948
49492009-12-10  Gavin Barraclough  <barraclough@apple.com>
4950
4951        Reviewed by Oliver Hunt & Mark Rowe.
4952
4953        https://bugs.webkit.org/show_bug.cgi?id=32367
4954        Add support for short Ropes (up to 3 entries) inline within JSString.
4955        (rather than externally allocating an object to hold the rope).
4956        Switch jsAdd of (JSString* + JSString*) to now make use of Ropes.
4957
4958        ~1% progression on Sunspidey.
4959
4960        * interpreter/Interpreter.cpp:
4961        (JSC::Interpreter::privateExecute):
4962        * jit/JITOpcodes.cpp:
4963        (JSC::JIT::privateCompileCTIMachineTrampolines):
4964        * jit/JITStubs.cpp:
4965        (JSC::DEFINE_STUB_FUNCTION):
4966        * runtime/JSString.cpp:
4967        (JSC::JSString::resolveRope):
4968        (JSC::JSString::toBoolean):
4969        (JSC::JSString::getStringPropertyDescriptor):
4970        * runtime/JSString.h:
4971        (JSC::JSString::Rope::Fiber::deref):
4972        (JSC::JSString::Rope::Fiber::ref):
4973        (JSC::JSString::Rope::Fiber::refAndGetLength):
4974        (JSC::JSString::Rope::append):
4975        (JSC::JSString::JSString):
4976        (JSC::JSString::~JSString):
4977        (JSC::JSString::value):
4978        (JSC::JSString::tryGetValue):
4979        (JSC::JSString::length):
4980        (JSC::JSString::canGetIndex):
4981        (JSC::JSString::appendStringInConstruct):
4982        (JSC::JSString::appendValueInConstructAndIncrementLength):
4983        (JSC::JSString::isRope):
4984        (JSC::JSString::string):
4985        (JSC::JSString::ropeLength):
4986        (JSC::JSString::getStringPropertySlot):
4987        * runtime/Operations.h:
4988        (JSC::jsString):
4989        (JSC::jsAdd):
4990        (JSC::resolveBase):
4991
49922009-12-09  Anders Carlsson  <andersca@apple.com>
4993
4994        Reviewed by Geoffrey Garen.
4995
4996        Fix three more things found by compiling with clang++.
4997
4998        * runtime/Structure.h:
4999        (JSC::StructureTransitionTable::reifySingleTransition):
5000        Add the 'std' qualifier to the call to make_pair.
5001
5002        * wtf/DateMath.cpp:
5003        (WTF::initializeDates):
5004        Incrementing a bool is deprecated according to the C++ specification.
5005
5006        * wtf/PtrAndFlags.h:
5007        (WTF::PtrAndFlags::PtrAndFlags):
5008        Name lookup should not be done in dependent bases, so explicitly qualify the call to set.
5009
50102009-12-09  Maciej Stachowiak  <mjs@apple.com>
5011
5012        Reviewed by Oliver Hunt.
5013
5014        Google reader gets stuck in the "Loading..." state and does not complete
5015        https://bugs.webkit.org/show_bug.cgi?id=32256
5016        <rdar://problem/7456388>
5017
5018        * jit/JITArithmetic.cpp:
5019        (JSC::JIT::emitSlow_op_jless): Fix some backward branches.
5020
50212009-12-09  Gavin Barraclough  <barraclough@apple.com>
5022
5023        Reviewed by Oliver Hunt.
5024
5025        https://bugs.webkit.org/show_bug.cgi?id=32228
5026        Make destruction of ropes non-recursive to prevent stack exhaustion.
5027        Also, pass a UString& into initializeFiber rather than a Ustring::Rep*,
5028        since the Rep is not being ref counted this could result in usage of a
5029        Rep with refcount zero (where the Rep comes from a temporary UString
5030        returned from a function).
5031
5032        * runtime/JSString.cpp:
5033        (JSC::JSString::Rope::destructNonRecursive):
5034        (JSC::JSString::Rope::~Rope):
5035        * runtime/JSString.h:
5036        (JSC::JSString::Rope::initializeFiber):
5037        * runtime/Operations.h:
5038        (JSC::concatenateStrings):
5039
50402009-12-09  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
5041
5042        Reviewed by Eric Seidel.
5043
5044        https://bugs.webkit.org/show_bug.cgi?id=31930
5045
5046        Update to r51457. ASSERTs changed to COMPILE_ASSERTs.
5047        The speedup is 25%.
5048
5049        * runtime/JSGlobalData.cpp:
5050        (JSC::VPtrSet::VPtrSet):
5051
50522009-12-09  Steve Block  <steveblock@google.com>
5053
5054        Reviewed by Adam Barth.
5055
5056        Updates Android Makefiles with latest additions.
5057        https://bugs.webkit.org/show_bug.cgi?id=32278
5058
5059        * Android.mk: Modified.
5060        * Android.v8.wtf.mk: Modified.
5061
50622009-12-09  Sam Weinig  <sam@webkit.org>
5063
5064        Reviewed by Gavin Barraclough.
5065
5066        Fix a bug found while trying to compile JavaScriptCore with clang++.
5067
5068        * yarr/RegexPattern.h:
5069        (JSC::Yarr::PatternTerm::PatternTerm): Don't self assign here.  Use false instead.
5070
50712009-12-09  Anders Carlsson  <andersca@apple.com>
5072
5073        Reviewed by Sam Weinig.
5074
5075        Attempt to fix the Windows build.
5076
5077        * wtf/FastMalloc.h:
5078
50792009-12-09  Anders Carlsson  <andersca@apple.com>
5080
5081        Reviewed by Sam Weinig.
5082
5083        Fix some things found while trying to compile JavaScriptCore with clang++.
5084
5085        * wtf/FastMalloc.h:
5086        Add correct exception specifications for the allocation/deallocation operators.
5087
5088        * wtf/Vector.h:
5089        * wtf/VectorTraits.h:
5090        Fix a bunch of struct/class mismatches.
5091
50922009-12-08  Maciej Stachowiak  <mjs@apple.com>
5093
5094        Reviewed by Darin Adler.
5095
5096        move code generation portions of Nodes.cpp to bytecompiler directory
5097        https://bugs.webkit.org/show_bug.cgi?id=32284
5098
5099        * bytecompiler/NodesCodegen.cpp: Copied from parser/Nodes.cpp. Removed parts that
5100        are not about codegen.
5101        * parser/Nodes.cpp: Removed everything that is about codegen.
5102
5103        Update build systems:
5104
5105        * Android.mk:
5106        * GNUmakefile.am:
5107        * JavaScriptCore.gypi:
5108        * JavaScriptCore.pri:
5109        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
5110        * JavaScriptCore.xcodeproj/project.pbxproj:
5111        * JavaScriptCoreSources.bkl:
5112
51132009-12-08  Kevin Watters  <kevinwatters@gmail.com>
5114
5115        Reviewed by Kevin Ollivier.
5116
5117        [wx] Mac plugins support.
5118
5119        https://bugs.webkit.org/show_bug.cgi?id=32236
5120
5121        * wtf/Platform.h:
5122
51232009-12-08  Dmitry Titov  <dimich@chromium.org>
5124
5125        Rubber-stamped by David Levin.
5126
5127        Revert and reopen "Add asserts to RefCounted to make sure ref/deref happens on the right thread."
5128        It may have caused massive increase of reported leaks on the bots.
5129        https://bugs.webkit.org/show_bug.cgi?id=31639
5130
5131        * GNUmakefile.am:
5132        * JavaScriptCore.gypi:
5133        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
5134        * JavaScriptCore.xcodeproj/project.pbxproj:
5135        * runtime/Structure.cpp:
5136        (JSC::Structure::Structure):
5137        * wtf/RefCounted.h:
5138        (WTF::RefCountedBase::ref):
5139        (WTF::RefCountedBase::hasOneRef):
5140        (WTF::RefCountedBase::refCount):
5141        (WTF::RefCountedBase::derefBase):
5142        * wtf/ThreadVerifier.h: Removed.
5143
51442009-12-08  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
5145
5146        Reviewed by Darin Adler.
5147
5148        Make WebKit build correctly on FreeBSD, IA64, and Alpha.
5149        Based on work by Petr Salinger <Petr.Salinger@seznam.cz>,
5150        and Colin Watson <cjwatson@ubuntu.com>.
5151
5152        * wtf/Platform.h:
5153
51542009-12-08  Dmitry Titov  <dimich@chromium.org>
5155
5156        Reviewed by Darin Adler.
5157
5158        Add asserts to RefCounted to make sure ref/deref happens on the right thread.
5159        https://bugs.webkit.org/show_bug.cgi?id=31639
5160
5161        * runtime/Structure.cpp:
5162        (JSC::Structure::Structure): Disable thread verification on this class since it uses addressOfCount().
5163        * wtf/RefCounted.h:
5164        (WTF::RefCountedBase::ref): Add ASSERT.
5165        (WTF::RefCountedBase::hasOneRef): Ditto.
5166        (WTF::RefCountedBase::refCount): Ditto.
5167        (WTF::RefCountedBase::derefBase): Ditto.
5168        (WTF::RefCountedBase::disableThreadVerification): delegate to ThreadVerifier method.
5169        * wtf/ThreadVerifier.h: Added.
5170        (WTF::ThreadVerifier::ThreadVerifier): New Debug-only class to verify that ref/deref of RefCounted is done on the same thread.
5171        (WTF::ThreadVerifier::activate): Activates checks. Called when ref count becomes above 2.
5172        (WTF::ThreadVerifier::deactivate): Deactivates checks. Called when ref count drops below 2.
5173        (WTF::ThreadVerifier::disableThreadVerification): used on objects that should not be checked (StringImpl etc)
5174        (WTF::ThreadVerifier::verifyThread):
5175        * GNUmakefile.am: Add ThreadVerifier.h to the build file.
5176        * JavaScriptCore.gypi: Ditto.
5177        * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
5178        * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
5179
51802009-12-08  Steve Block  <steveblock@google.com>
5181
5182        Reviewed by Adam Barth.
5183
5184        [Android] Adds Makefiles for Android port.
5185        https://bugs.webkit.org/show_bug.cgi?id=31325
5186
5187        * Android.mk: Added.
5188        * Android.v8.wtf.mk: Added.
5189
51902009-12-07  Dmitry Titov  <dimich@chromium.org>
5191
5192        Rubber-stamped by Darin Adler.
5193
5194        Remove ENABLE_SHARED_SCRIPT flags
5195        https://bugs.webkit.org/show_bug.cgi?id=32245
5196        This patch was obtained by "git revert" command and then un-reverting of ChangeLog files.
5197
5198        * Configurations/FeatureDefines.xcconfig:
5199        * wtf/Platform.h:
5200
52012009-12-07  Gavin Barraclough  <barraclough@apple.com>
5202
5203        Reviewed by NOBODY (Windows build fixage part I).
5204
5205        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
5206
52072009-12-05  Gavin Barraclough  <barraclough@apple.com>
5208
5209        Reviewed by Oliver Hunt.
5210
5211        https://bugs.webkit.org/show_bug.cgi?id=32184
5212        Handle out-of-memory conditions with JSC Ropes with a JS exception, rather than crashing.
5213        Switch from using fastMalloc to tryFastMalloc, pass an ExecState to record the exception on.
5214
5215        * API/JSCallbackObjectFunctions.h:
5216        (JSC::::toString):
5217        * API/JSValueRef.cpp:
5218        (JSValueIsStrictEqual):
5219        * JavaScriptCore.exp:
5220        * bytecompiler/BytecodeGenerator.cpp:
5221        (JSC::BytecodeGenerator::emitEqualityOp):
5222        * debugger/DebuggerCallFrame.cpp:
5223        (JSC::DebuggerCallFrame::functionName):
5224        (JSC::DebuggerCallFrame::calculatedFunctionName):
5225        * interpreter/Interpreter.cpp:
5226        (JSC::Interpreter::callEval):
5227        (JSC::Interpreter::privateExecute):
5228        * jit/JITStubs.cpp:
5229        (JSC::DEFINE_STUB_FUNCTION):
5230        * profiler/ProfileGenerator.cpp:
5231        (JSC::ProfileGenerator::addParentForConsoleStart):
5232        * profiler/Profiler.cpp:
5233        (JSC::Profiler::willExecute):
5234        (JSC::Profiler::didExecute):
5235        (JSC::Profiler::createCallIdentifier):
5236        (JSC::createCallIdentifierFromFunctionImp):
5237        * profiler/Profiler.h:
5238        * runtime/ArrayPrototype.cpp:
5239        (JSC::arrayProtoFuncIndexOf):
5240        (JSC::arrayProtoFuncLastIndexOf):
5241        * runtime/DateConstructor.cpp:
5242        (JSC::constructDate):
5243        * runtime/FunctionPrototype.cpp:
5244        (JSC::functionProtoFuncToString):
5245        * runtime/InternalFunction.cpp:
5246        (JSC::InternalFunction::name):
5247        (JSC::InternalFunction::displayName):
5248        (JSC::InternalFunction::calculatedDisplayName):
5249        * runtime/InternalFunction.h:
5250        * runtime/JSCell.cpp:
5251        (JSC::JSCell::getString):
5252        * runtime/JSCell.h:
5253        (JSC::JSValue::getString):
5254        * runtime/JSONObject.cpp:
5255        (JSC::gap):
5256        (JSC::Stringifier::Stringifier):
5257        (JSC::Stringifier::appendStringifiedValue):
5258        * runtime/JSObject.cpp:
5259        (JSC::JSObject::putDirectFunction):
5260        (JSC::JSObject::putDirectFunctionWithoutTransition):
5261        (JSC::JSObject::defineOwnProperty):
5262        * runtime/JSObject.h:
5263        * runtime/JSPropertyNameIterator.cpp:
5264        (JSC::JSPropertyNameIterator::get):
5265        * runtime/JSString.cpp:
5266        (JSC::JSString::Rope::~Rope):
5267        (JSC::JSString::resolveRope):
5268        (JSC::JSString::getPrimitiveNumber):
5269        (JSC::JSString::toNumber):
5270        (JSC::JSString::toString):
5271        (JSC::JSString::toThisString):
5272        (JSC::JSString::getStringPropertyDescriptor):
5273        * runtime/JSString.h:
5274        (JSC::JSString::Rope::createOrNull):
5275        (JSC::JSString::Rope::operator new):
5276        (JSC::JSString::value):
5277        (JSC::JSString::tryGetValue):
5278        (JSC::JSString::getIndex):
5279        (JSC::JSString::getStringPropertySlot):
5280        (JSC::JSValue::toString):
5281        * runtime/JSValue.h:
5282        * runtime/NativeErrorConstructor.cpp:
5283        (JSC::NativeErrorConstructor::NativeErrorConstructor):
5284        * runtime/Operations.cpp:
5285        (JSC::JSValue::strictEqualSlowCase):
5286        * runtime/Operations.h:
5287        (JSC::JSValue::equalSlowCaseInline):
5288        (JSC::JSValue::strictEqualSlowCaseInline):
5289        (JSC::JSValue::strictEqual):
5290        (JSC::jsLess):
5291        (JSC::jsLessEq):
5292        (JSC::jsAdd):
5293        (JSC::concatenateStrings):
5294        * runtime/PropertyDescriptor.cpp:
5295        (JSC::PropertyDescriptor::equalTo):
5296        * runtime/PropertyDescriptor.h:
5297        * runtime/StringPrototype.cpp:
5298        (JSC::stringProtoFuncReplace):
5299        (JSC::stringProtoFuncToLowerCase):
5300        (JSC::stringProtoFuncToUpperCase):
5301
53022009-12-07  Nikolas Zimmermann  <nzimmermann@rim.com>
5303
5304        Reviewed by Holger Freyther.
5305
5306        Turn on (SVG) Filters support, by default.
5307        https://bugs.webkit.org/show_bug.cgi?id=32224
5308
5309        * Configurations/FeatureDefines.xcconfig: Enable FILTERS build flag.
5310
53112009-12-07  Steve Falkenburg  <sfalken@apple.com>
5312
5313        Build fix. Be flexible about which version of ICU is used on Windows.
5314
5315        * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Add optional xcopy commands to copy ICU 4.2.
5316
53172009-12-07  Maciej Stachowiak  <mjs@apple.com>
5318
5319        Reviewed by Oliver Hunt.
5320
5321        op_loop_if_less JIT codegen is broken for 64-bit
5322        https://bugs.webkit.org/show_bug.cgi?id=32221
5323
5324        * jit/JITOpcodes.cpp:
5325        (JSC::JIT::emit_op_loop_if_false): Fix codegen in this version - test was backwards.
5326
53272009-12-07  Oliver Hunt  <oliver@apple.com>
5328
5329        Reviewed by Maciej Stachowiak.
5330
5331        Object.create fails if properties on the descriptor are getters
5332        https://bugs.webkit.org/show_bug.cgi?id=32219
5333
5334        Correctly initialise the PropertySlots with the descriptor object.
5335
5336        * runtime/ObjectConstructor.cpp:
5337        (JSC::toPropertyDescriptor):
5338
53392009-12-06  Maciej Stachowiak  <mjs@apple.com>
5340
5341        Not reviewed, build fix.
5342
5343        Actually tested 64-bit *and* 32-bit build this time.
5344
5345        * jit/JITOpcodes.cpp:
5346        (JSC::JIT::emit_op_loop_if_false):
5347
53482009-12-06  Maciej Stachowiak  <mjs@apple.com>
5349
5350        Not reviewed, build fix.
5351
5352        Really really fix 64-bit build for prior patch (actually tested this time).
5353
5354        * jit/JITOpcodes.cpp:
5355        (JSC::JIT::emit_op_loop_if_false):
5356        (JSC::JIT::emitSlow_op_loop_if_false):
5357
53582009-12-06  Maciej Stachowiak  <mjs@apple.com>
5359
5360        Not reviewed, build fix.
5361
5362        Really fix 64-bit build for prior patch.
5363
5364        * jit/JITArithmetic.cpp:
5365        (JSC::JIT::emitSlow_op_jless):
5366
53672009-12-06  Maciej Stachowiak  <mjs@apple.com>
5368
5369        Not reviewed, build fix.
5370
5371        Fix 64-bit build for prior patch.
5372
5373        * jit/JITOpcodes.cpp:
5374        (JSC::JIT::emitSlow_op_loop_if_less):
5375
53762009-12-05  Maciej Stachowiak  <mjs@apple.com>
5377
5378        Reviewed by Oliver Hunt.
5379
5380        conway benchmark spends half it's time in op_less (jump fusion fails)
5381        https://bugs.webkit.org/show_bug.cgi?id=32190
5382
5383        <1% speedup on SunSpider and V8
5384        2x speedup on "conway" benchmark
5385
5386        Two optimizations:
5387        1) Improve codegen for logical operators &&, || and ! in a condition context
5388
5389        When generating code for combinations of &&, || and !, in a
5390        condition context (i.e. in an if statement or loop condition), we
5391        used to produce a value, and then separately jump based on its
5392        truthiness. Now we pass the false and true targets in, and let the
5393        logical operators generate jumps directly. This helps in four
5394        ways:
5395
5396        a) Individual clauses of a short-circuit logical operator can now
5397        jump directly to the then or else clause of an if statement (or to
5398        the top or exit of a loop) instead of jumping to a jump.
5399
5400        b) It used to be that jump fusion with the condition of the first
5401        clause of a logical operator was inhibited, because the register
5402        was ref'd to be used later, in the actual condition jump; this no
5403        longer happens since a jump straight to the final target is
5404        generated directly.
5405
5406        c) It used to be that jump fusion with the condition of the second
5407        clause of a logical operator was inhibited, because there was a
5408        jump target right after the second clause and before the actual
5409        condition jump. But now it's no longer necessary for the first
5410        clause to jump there so jump fusion is not blocked.
5411
5412        d) We avoid generating excess mov statements in some cases.
5413
5414        As a concrete example this source:
5415
5416        if (!((x < q && y < q) || (t < q && z < q))) {
5417            // ...
5418        }
5419
5420        Used to generate this bytecode:
5421
5422        [  34] less              r1, r-15, r-19
5423        [  38] jfalse            r1, 7(->45)
5424        [  41] less              r1, r-16, r-19
5425        [  45] jtrue             r1, 14(->59)
5426        [  48] less              r1, r-17, r-19
5427        [  52] jfalse            r1, 7(->59)
5428        [  55] less              r1, r-18, r-19
5429        [  59] jtrue             r1, 17(->76)
5430
5431        And now generates this bytecode (also taking advantage of the second optimization below):
5432
5433        [  34] jnless            r-15, r-19, 8(->42)
5434        [  38] jless             r-16, r-19, 26(->64)
5435        [  42] jnless            r-17, r-19, 8(->50)
5436        [  46] jless             r-18, r-19, 18(->64)
5437
5438        Note the jump fusion and the fact that there's less jump
5439        indirection - three of the four jumps go straight to the target
5440        clause instead of indirecting through another jump.
5441
5442        2) Implement jless opcode to take advantage of the above, since we'll now often generate
5443        a less followed by a jtrue where fusion is not forbidden.
5444
5445        * parser/Nodes.h:
5446        (JSC::ExpressionNode::hasConditionContextCodegen): Helper function to determine
5447        whether a node supports special conditional codegen. Return false as this is the default.
5448        (JSC::ExpressionNode::emitBytecodeInConditionContext): Assert not reached - only really
5449        defined for nodes that do have conditional codegen.
5450        (JSC::UnaryOpNode::expr): Add const version.
5451        (JSC::LogicalNotNode::hasConditionContextCodegen): Returne true only if subexpression
5452        supports it.
5453        (JSC::LogicalOpNode::hasConditionContextCodegen): Return true.
5454        * parser/Nodes.cpp:
5455        (JSC::LogicalNotNode::emitBytecodeInConditionContext): Implemented - just swap
5456        the true and false targets for the child node.
5457        (JSC::LogicalOpNode::emitBytecodeInConditionContext): Implemented - handle jumps
5458        directly, improving codegen quality. Also handles further nested conditional codegen.
5459        (JSC::ConditionalNode::emitBytecode): Use condition context codegen when available.
5460        (JSC::IfNode::emitBytecode): ditto
5461        (JSC::IfElseNode::emitBytecode): ditto
5462        (JSC::DoWhileNode::emitBytecode): ditto
5463        (JSC::WhileNode::emitBytecode): ditto
5464        (JSC::ForNode::emitBytecode): ditto
5465
5466        * bytecode/Opcode.h:
5467        - Added loop_if_false opcode - needed now that falsey jumps can be backwards.
5468        - Added jless opcode to take advantage of new fusion opportunities.
5469        * bytecode/CodeBlock.cpp:
5470        (JSC::CodeBlock::dump): Handle above.
5471        * bytecompiler/BytecodeGenerator.cpp:
5472        (JSC::BytecodeGenerator::emitJumpIfTrue): Add peephole for less + jtrue ==> jless.
5473        (JSC::BytecodeGenerator::emitJumpIfFalse): Add handling of backwrds falsey jumps.
5474        * bytecompiler/BytecodeGenerator.h:
5475        (JSC::BytecodeGenerator::emitNodeInConditionContext): Wrapper to handle tracking of
5476        overly deep expressions etc.
5477        * interpreter/Interpreter.cpp:
5478        (JSC::Interpreter::privateExecute): Implement the two new opcodes (loop_if_false, jless).
5479        * jit/JIT.cpp:
5480        (JSC::JIT::privateCompileMainPass): Implement JIT support for the two new opcodes.
5481        (JSC::JIT::privateCompileSlowCases): ditto
5482        * jit/JIT.h:
5483        * jit/JITArithmetic.cpp:
5484        (JSC::JIT::emit_op_jless):
5485        (JSC::JIT::emitSlow_op_jless): ditto
5486        (JSC::JIT::emitBinaryDoubleOp): ditto
5487        * jit/JITOpcodes.cpp:
5488        (JSC::JIT::emitSlow_op_loop_if_less): ditto
5489        (JSC::JIT::emit_op_loop_if_false): ditto
5490        (JSC::JIT::emitSlow_op_loop_if_false): ditto
5491        * jit/JITStubs.cpp:
5492        * jit/JITStubs.h:
5493        (JSC::):
5494
54952009-12-04  Kent Hansen  <kent.hansen@nokia.com>
5496
5497        Reviewed by Darin Adler.
5498
5499        JavaScript delete operator should return false for string properties
5500        https://bugs.webkit.org/show_bug.cgi?id=32012
5501
5502        * runtime/StringObject.cpp:
5503        (JSC::StringObject::deleteProperty):
5504
55052009-12-03  Drew Wilson  <atwilson@chromium.org>
5506
5507        Rolled back r51633 because it causes a perf regression in Chromium.
5508
5509        * wtf/Platform.h:
5510
55112009-12-03  Gavin Barraclough  <barraclough@apple.com>
5512
5513        Try and fix the Windows build.
5514
5515        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:  Export a symbol that should be exported.
5516
55172009-12-03  Mark Rowe  <mrowe@apple.com>
5518
5519        Try and fix the Mac build.
5520
5521        * JavaScriptCore.exp:  Export a symbol that should be exported.
5522
55232009-12-03  Oliver Hunt  <oliver@apple.com>
5524
5525        Reviewed by Gavin Barraclough.
5526
5527        REGRESSION(4.0.3-48777): Crash in JSC::ExecState::propertyNames() (Debug-only?)
5528        https://bugs.webkit.org/show_bug.cgi?id=32133
5529
5530        Work around odd GCC-ism and correct the scopechain for use by
5531        calls made while a cachedcall is active on the callstack.
5532
5533        * interpreter/CachedCall.h:
5534        (JSC::CachedCall::newCallFrame):
5535        * runtime/JSArray.cpp:
5536        (JSC::AVLTreeAbstractorForArrayCompare::compare_key_key):
5537        * runtime/StringPrototype.cpp:
5538        (JSC::stringProtoFuncReplace):
5539
55402009-12-03  Gavin Barraclough  <barraclough@apple.com>
5541
5542        Reviewed by Oliver "Brraaaaiiiinnnnnzzzzzzzz" Hunt.
5543
5544        https://bugs.webkit.org/show_bug.cgi?id=32136
5545        Add a rope representation to JSString.  Presently JSString always holds its data in UString form.
5546        Instead, allow the result of a string concatenation to be represented in a tree form - with a
5547        variable sized, reference-counted rope node retaining a set of UString::Reps (or other rope nopes).
5548
5549        Strings must still currently be resolved down to a flat UString representation before being used,
5550        but by holding the string in a rope representation during construction we can avoid copying data
5551        until we know the final size of the string.
5552
5553        ~2% progression on SunSpider (~25% on date-format-xparb, ~20% on string-validate-input).
5554
5555        * JavaScriptCore.exp:
5556
5557            - Update exports.
5558
5559        * interpreter/Interpreter.cpp:
5560        (JSC::Interpreter::privateExecute):
5561
5562            - Make use of new JSString::length() method to avoid prematurely resolving ropes.
5563
5564        * jit/JITOpcodes.cpp:
5565        (JSC::JIT::privateCompileCTIMachineTrampolines):
5566
5567            - Switch the string length trampoline to read the length directly from JSString::m_length,
5568              rather than from the JSString's UString::Rep's 'len' property.
5569
5570        * jit/JITStubs.cpp:
5571        (JSC::DEFINE_STUB_FUNCTION):
5572
5573            - Modify op_add such that addition of two strings, where either or both strings are already
5574              in rope representation, produces a rope as a result.
5575
5576        * runtime/JSString.cpp:
5577        (JSC::JSString::Rope::~Rope):
5578        (JSC::copyChars):
5579        (JSC::JSString::resolveRope):
5580        (JSC::JSString::getPrimitiveNumber):
5581        (JSC::JSString::toBoolean):
5582        (JSC::JSString::toNumber):
5583        (JSC::JSString::toString):
5584        (JSC::JSString::toThisString):
5585        (JSC::JSString::getStringPropertyDescriptor):
5586        * runtime/JSString.h:
5587        (JSC::JSString::Rope::Fiber::Fiber):
5588        (JSC::JSString::Rope::Fiber::destroy):
5589        (JSC::JSString::Rope::Fiber::isRope):
5590        (JSC::JSString::Rope::Fiber::rope):
5591        (JSC::JSString::Rope::Fiber::string):
5592        (JSC::JSString::Rope::create):
5593        (JSC::JSString::Rope::initializeFiber):
5594        (JSC::JSString::Rope::ropeLength):
5595        (JSC::JSString::Rope::stringLength):
5596        (JSC::JSString::Rope::fibers):
5597        (JSC::JSString::Rope::Rope):
5598        (JSC::JSString::Rope::operator new):
5599        (JSC::JSString::JSString):
5600        (JSC::JSString::value):
5601        (JSC::JSString::length):
5602        (JSC::JSString::isRope):
5603        (JSC::JSString::rope):
5604        (JSC::JSString::string):
5605        (JSC::JSString::canGetIndex):
5606        (JSC::jsSingleCharacterSubstring):
5607        (JSC::JSString::getIndex):
5608        (JSC::jsSubstring):
5609        (JSC::JSString::getStringPropertySlot):
5610
5611            - Add rope form.
5612
5613        * runtime/Operations.h:
5614        (JSC::jsAdd):
5615        (JSC::concatenateStrings):
5616
5617            - Update string concatenation, and addition of ropes, to produce ropes.
5618
5619        * runtime/StringObject.cpp:
5620        (JSC::StringObject::getOwnPropertyNames):
5621
5622            - Make use of new JSString::length() method to avoid prematurely resolving ropes.
5623
56242009-11-23  Jeremy Moskovich  <jeremy@chromium.org>
5625
5626        Reviewed by Eric Seidel.
5627
5628        Switch Chrome/Mac to use Core Text APIs rather than ATSUI APIs.
5629        https://bugs.webkit.org/show_bug.cgi?id=31802
5630
5631        No test since this is already covered by existing pixel tests.
5632
5633        * wtf/Platform.h: #define USE_CORE_TEXT for Chrome/Mac.
5634
56352009-12-02  Oliver Hunt  <oliver@apple.com>
5636
5637        Reviewed by Gavin Barraclough.
5638
5639        Add files missed in prior patch.
5640
5641        * runtime/JSZombie.cpp:
5642        (JSC::):
5643        (JSC::JSZombie::leakedZombieStructure):
5644        * runtime/JSZombie.h: Added.
5645        (JSC::JSZombie::JSZombie):
5646        (JSC::JSZombie::isZombie):
5647        (JSC::JSZombie::classInfo):
5648        (JSC::JSZombie::isGetterSetter):
5649        (JSC::JSZombie::isAPIValueWrapper):
5650        (JSC::JSZombie::isPropertyNameIterator):
5651        (JSC::JSZombie::getCallData):
5652        (JSC::JSZombie::getConstructData):
5653        (JSC::JSZombie::getUInt32):
5654        (JSC::JSZombie::toPrimitive):
5655        (JSC::JSZombie::getPrimitiveNumber):
5656        (JSC::JSZombie::toBoolean):
5657        (JSC::JSZombie::toNumber):
5658        (JSC::JSZombie::toString):
5659        (JSC::JSZombie::toObject):
5660        (JSC::JSZombie::markChildren):
5661        (JSC::JSZombie::put):
5662        (JSC::JSZombie::deleteProperty):
5663        (JSC::JSZombie::toThisObject):
5664        (JSC::JSZombie::toThisString):
5665        (JSC::JSZombie::toThisJSString):
5666        (JSC::JSZombie::getJSNumber):
5667        (JSC::JSZombie::getOwnPropertySlot):
5668
56692009-12-02  Oliver Hunt  <oliver@apple.com>
5670
5671        Reviewed by Gavin Barraclough.
5672
5673        Add zombies to JSC
5674        https://bugs.webkit.org/show_bug.cgi?id=32103
5675
5676        Add a compile time flag to make the JSC collector replace "unreachable"
5677        objects with zombie objects.  The zombie object is a JSCell subclass that
5678        ASSERTs on any attempt to use the JSCell methods.  In addition there are
5679        a number of additional assertions in bottleneck code to catch zombie usage
5680        as quickly as possible.
5681
5682        Grrr. Argh. Brains.
5683
5684        * JavaScriptCore.xcodeproj/project.pbxproj:
5685        * interpreter/Register.h:
5686        (JSC::Register::Register):
5687        * runtime/ArgList.h:
5688        (JSC::MarkedArgumentBuffer::append):
5689        (JSC::ArgList::ArgList):
5690        * runtime/Collector.cpp:
5691        (JSC::Heap::destroy):
5692        (JSC::Heap::sweep):
5693        * runtime/Collector.h:
5694        * runtime/JSCell.h:
5695        (JSC::JSCell::isZombie):
5696        (JSC::JSValue::isZombie):
5697        * runtime/JSValue.h:
5698        (JSC::JSValue::decode):
5699        (JSC::JSValue::JSValue):
5700        * wtf/Platform.h:
5701
57022009-12-01  Jens Alfke  <snej@chromium.org>
5703
5704        Reviewed by Darin Adler.
5705
5706        Added variants of find/contains/add that allow a foreign key type to be used.
5707        This will allow AtomicString-keyed maps to be queried by C string without
5708        having to create a temporary AtomicString (see HTTPHeaderMap.)
5709        The code for this is adapted from the equivalent in HashSet.h.
5710
5711        * wtf/HashMap.h:
5712        (WTF::HashMap::find):
5713        (WTF::HashMap::contains):
5714        (WTF::HashMap::add):
5715        * wtf/HashSet.h: Changed "method" to "function member" in a comment.
5716
57172009-12-01  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
5718
5719        Revert 51551 because it broke GTK+.
5720
5721        * wtf/Platform.h:
5722
57232009-11-30  Gavin Barraclough  <barraclough@apple.com>
5724
5725        Windows Build fix.  Reviewed by NOBODY.
5726
5727        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
5728
57292009-11-24  Gavin Barraclough  <barraclough@apple.com>
5730
5731        Reviewed by Geoff Garen.
5732
5733        Bug 31859 - Make world selection for JSC IsolatedWorlds automagical.
5734
5735        WebCore presently has to explicitly specify the world before entering into JSC,
5736        which is a little fragile (particularly since property access via a
5737        getter/setter might invoke execution). Instead derive the current world from
5738        the lexical global object.
5739
5740        Remove the temporary duct tape of willExecute/didExecute virtual hooks on the JSGlobalData::ClientData - these are no longer necessary.
5741
5742        * API/JSBase.cpp:
5743        (JSEvaluateScript):
5744        * API/JSObjectRef.cpp:
5745        (JSObjectCallAsFunction):
5746        * JavaScriptCore.exp:
5747        * runtime/JSGlobalData.cpp:
5748        * runtime/JSGlobalData.h:
5749
57502009-11-30  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
5751
5752        Reviewed by Kenneth Rohde Christiansen.
5753
5754        [Qt] Remove obsolete PLATFORM(KDE) code
5755        https://bugs.webkit.org/show_bug.cgi?id=31958
5756
5757        KDE is now using unpatched QtWebKit.
5758
5759        * parser/Lexer.cpp: Remove obsolete KDE_USE_FINAL guard
5760        * wtf/Platform.h: Remove PLATFORM(KDE) definition and code
5761        section that is guarded with it.
5762
57632009-11-30  Jan-Arve Sæther  <jan-arve.saether@nokia.com>
5764
5765        Reviewed by Simon Hausmann.
5766
5767        [Qt] Fix compilation with win32-icc
5768
5769        The Intel compiler does not support the __has_trivial_constructor type
5770        trait.  The Intel Compiler can report itself as _MSC_VER >= 1400. The
5771        reason for that is that the Intel Compiler depends on the Microsoft
5772        Platform SDK, and in order to try to be "fully" MS compatible it will
5773        "pretend" to be the same MS compiler as was shipped with the MS PSDK.
5774        (Thus, compiling with win32-icc with VC8 SDK will make the source code
5775        "think" the compiler at hand supports this type trait).
5776
5777        * wtf/TypeTraits.h:
5778
57792009-11-29  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
5780
5781        Reviewed by Eric Seidel.
5782
5783        [Qt] Mac build has JIT disabled
5784        https://bugs.webkit.org/show_bug.cgi?id=31828
5785
5786        * wtf/Platform.h: Enable JIT for Qt Mac builds
5787
57882009-11-28  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
5789
5790        Reviewed by Eric Seidel.
5791
5792        Apply workaround for the limitation of VirtualFree with MEM_RELEASE to all ports running on Windows
5793        https://bugs.webkit.org/show_bug.cgi?id=31943
5794
5795        * runtime/MarkStack.h:
5796        (JSC::MarkStack::MarkStackArray::shrinkAllocation):
5797
57982009-11-28  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
5799
5800        Reviewed by Gavin Barraclough.
5801
5802        https://bugs.webkit.org/show_bug.cgi?id=31930
5803
5804        Seems a typo. We don't need ~270k memory to determine the vptrs.
5805
5806        * runtime/JSGlobalData.cpp:
5807        (JSC::VPtrSet::VPtrSet):
5808
58092009-11-27  Shinichiro Hamaji  <hamaji@chromium.org>
5810
5811        Unreviewed.
5812
5813        Move GOwnPtr* from wtf to wtf/gtk
5814        https://bugs.webkit.org/show_bug.cgi?id=31793
5815
5816        Build fix for chromium after r51423.
5817        Exclude gtk directory from chromium build.
5818
5819        * JavaScriptCore.gyp/JavaScriptCore.gyp:
5820
58212009-11-25  Oliver Hunt  <oliver@apple.com>
5822
5823        Reviewed by Gavin Barraclough.
5824
5825        Incorrect behaviour of jneq_null in the interpreter
5826        https://bugs.webkit.org/show_bug.cgi?id=31901
5827
5828        Correct the logic of jneq_null.  This is already covered by existing tests.
5829
5830        * interpreter/Interpreter.cpp:
5831        (JSC::Interpreter::privateExecute):
5832
58332009-11-26  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
5834
5835        Reviewed by Oliver Hunt.
5836
5837        Move GOwnPtr* from wtf to wtf/gtk
5838        https://bugs.webkit.org/show_bug.cgi?id=31793
5839
5840        * GNUmakefile.am: Change the path for GOwnPtr.*.
5841        * JavaScriptCore.gyp/JavaScriptCore.gyp: Remove
5842          GOwnPtr.cpp from the exclude list.
5843        * JavaScriptCore.gypi: Change the path for GOwnPtr.*.
5844        * wscript: Remove GOwnPtr.cpp from the exclude list.
5845        * wtf/GOwnPtr.cpp: Removed.
5846        * wtf/GOwnPtr.h: Removed.
5847        * wtf/Threading.h: Change the path for GOwnPtr.h.
5848        * wtf/gtk/GOwnPtr.cpp: Copied from JavaScriptCore/wtf/GOwnPtr.cpp.
5849        * wtf/gtk/GOwnPtr.h: Copied from JavaScriptCore/wtf/GOwnPtr.h.
5850        * wtf/unicode/glib/UnicodeGLib.h: Change the path for GOwnPtr.h.
5851
58522009-11-24  Dmitry Titov  <dimich@chromium.org>
5853
5854        Reviewed by Eric Seidel.
5855
5856        Add ENABLE_SHARED_SCRIPT feature define and flag for build-webkit
5857        https://bugs.webkit.org/show_bug.cgi?id=31444
5858
5859        * Configurations/FeatureDefines.xcconfig:
5860        * wtf/Platform.h:
5861
58622009-11-24  Chris Marrin  <cmarrin@apple.com>
5863
5864        Reviewed by Simon Fraser.
5865
5866        Add ability to enable ACCELERATED_COMPOSITING on Windows (currently disabled)
5867        https://bugs.webkit.org/show_bug.cgi?id=27314
5868
5869        * wtf/Platform.h:
5870
58712009-11-24  Jason Smith  <dark.panda@gmail.com>
5872
5873        Reviewed by Alexey Proskuryakov.
5874
5875        RegExp#exec's returned Array-like object behaves differently from
5876        regular Arrays
5877        https://bugs.webkit.org/show_bug.cgi?id=31689
5878
5879        * JavaScriptCore/runtime/RegExpConstructor.cpp: ensure that undefined
5880        values are added to the returned RegExpMatchesArray
5881
58822009-11-24  Oliver Hunt  <oliver@apple.com>
5883
5884        Reviewed by Alexey Proskuryakov.
5885
5886        JSON.stringify performance on undefined is very poor
5887        https://bugs.webkit.org/show_bug.cgi?id=31839
5888
5889        Switch from a UString to a Vector<UChar> when building
5890        the JSON string, allowing us to safely remove the substr-copy
5891        we otherwise did when unwinding an undefined property.
5892
5893        Also turns out to be a ~5% speedup on stringification.
5894
5895        * runtime/JSONObject.cpp:
5896        (JSC::Stringifier::StringBuilder::append):
5897        (JSC::Stringifier::stringify):
5898        (JSC::Stringifier::Holder::appendNextProperty):
5899
59002009-11-24  Mark Rowe  <mrowe@apple.com>
5901
5902        Fix production builds where the source tree may be read-only.
5903
5904        * JavaScriptCore.xcodeproj/project.pbxproj:
5905
59062009-11-23  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
5907
5908        Reviewed by Kenneth Rohde Christiansen.
5909
5910        Include "config.h" to meet Coding Style Guidelines
5911        https://bugs.webkit.org/show_bug.cgi?id=31792
5912
5913        * wtf/unicode/UTF8.cpp:
5914        * wtf/unicode/glib/UnicodeGLib.cpp:
5915        * wtf/unicode/wince/UnicodeWince.cpp:
5916
59172009-11-23  Geoffrey Garen  <ggaren@apple.com>
5918
5919        Reviewed by Oliver Hunt.
5920
5921        Streamlined some Math functions where we expect or know the result not
5922        to be representable as an int.
5923
5924        SunSpider says 0.6% faster.
5925
5926        * runtime/JSNumberCell.h:
5927        (JSC::JSValue::JSValue):
5928        * runtime/JSValue.h:
5929        (JSC::JSValue::):
5930        (JSC::jsDoubleNumber):
5931        (JSC::JSValue::JSValue): Added a function for making a numeric JSValue
5932        and skipping the "can I encode this as an int?" check, avoiding the
5933        overhead of int <-> double roundtripping and double <-> double comparison
5934        and branching.
5935
5936        * runtime/MathObject.cpp:
5937        (JSC::mathProtoFuncACos):
5938        (JSC::mathProtoFuncASin):
5939        (JSC::mathProtoFuncATan):
5940        (JSC::mathProtoFuncATan2):
5941        (JSC::mathProtoFuncCos):
5942        (JSC::mathProtoFuncExp):
5943        (JSC::mathProtoFuncLog):
5944        (JSC::mathProtoFuncRandom):
5945        (JSC::mathProtoFuncSin):
5946        (JSC::mathProtoFuncSqrt):
5947        (JSC::mathProtoFuncTan): For these functions, which we expect or know
5948        to produce results not representable as ints, call jsDoubleNumber instead
5949        of jsNumber.
5950
59512009-11-23  Mark Rowe  <mrowe@apple.com>
5952
5953        Unreviewed. Unbreak the regression tests after r51329.
5954
5955        * API/JSBase.cpp:
5956        (JSEvaluateScript): Null-check clientData before dereferencing it.
5957        * API/JSObjectRef.cpp:
5958        (JSObjectCallAsFunction): Ditto.
5959
59602009-11-23  Gavin Barraclough  <barraclough@apple.com>
5961
5962        Reviewed by Geoff Garen.
5963
5964        Part 1/3 of <rdar://problem/7377477> REGRESSION: Many web pages fail to render after interesting script runs in isolated world
5965
5966        Some clients of the JavaScriptCore API expect to be able to make callbacks over the JSC API,
5967        and for this to automagically cause execution to take place in the world associated with the
5968        global object associated with the ExecState (JSContextRef) passed.  However this is not how
5969        things work - the world must be explicitly set within WebCore.
5970
5971        Making this work just for API calls to evaluate & call will be a far from perfect solution,
5972        since direct (non-API) use of JSC still relies on WebCore setting the current world correctly.
5973        A better solution would be to make this all work automagically all throughout WebCore, but this
5974        will require more refactoring.
5975
5976        Since the API is in JSC but worlds only exist in WebCore, add callbacks on the JSGlobalData::ClientData
5977        to allow it to update the current world on entry/exit via the JSC API.  This is temporary duck
5978        tape, and should be removed once the current world no longer needs to be explicitly tracked.
5979
5980        * API/JSBase.cpp:
5981        (JSEvaluateScript):
5982        * API/JSObjectRef.cpp:
5983        (JSObjectCallAsFunction):
5984        * JavaScriptCore.exp:
5985        * runtime/JSGlobalData.cpp:
5986        (JSC::JSGlobalData::ClientData::beginningExecution):
5987        (JSC::JSGlobalData::ClientData::completedExecution):
5988        * runtime/JSGlobalData.h:
5989
59902009-11-23  Steve Block  <steveblock@google.com>
5991
5992        Reviewed by Dmitry Titov.
5993
5994        Adds MainThreadAndroid.cpp with Android-specific WTF threading functions.
5995        https://bugs.webkit.org/show_bug.cgi?id=31807
5996
5997        * wtf/android: Added.
5998        * wtf/android/MainThreadAndroid.cpp: Added.
5999        (WTF::timeoutFired):
6000        (WTF::initializeMainThreadPlatform):
6001        (WTF::scheduleDispatchFunctionsOnMainThread):
6002
60032009-11-23  Alexey Proskuryakov  <ap@apple.com>
6004
6005        Reviewed by Brady Eidson.
6006
6007        https://bugs.webkit.org/show_bug.cgi?id=31748
6008        Make WebSocketHandleCFNet respect proxy auto-configuration files via CFProxySupport
6009
6010        * JavaScriptCore.exp: Export callOnMainThreadAndWait.
6011
60122009-11-23  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
6013
6014        Reviewed by Kenneth Rohde Christiansen.
6015
6016        [Symbian] Fix lastIndexOf() for Symbian
6017        https://bugs.webkit.org/show_bug.cgi?id=31773
6018
6019        Symbian soft floating point library has problems with operators
6020        comparing NaN to numbers. Without a workaround lastIndexOf()
6021        function does not work.
6022
6023        Patch developed by David Leong.
6024
6025        * runtime/StringPrototype.cpp:
6026        (JSC::stringProtoFuncLastIndexOf):Add an extra test
6027        to check for NaN for Symbian.
6028
60292009-11-23  Steve Block  <steveblock@google.com>
6030
6031        Reviewed by Eric Seidel.
6032
6033        Android port lacks implementation of atomicIncrement and atomicDecrement.
6034        https://bugs.webkit.org/show_bug.cgi?id=31715
6035
6036        * wtf/Threading.h: Modified.
6037        (WTF::atomicIncrement): Added Android implementation.
6038        (WTF::atomicDecrement): Added Android implementation.
6039
60402009-11-22  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
6041
6042        Unreviewed.
6043
6044        [Qt] Sort source lists and remove obsolete comments
6045        from the build system.
6046
6047        * JavaScriptCore.pri:
6048
60492009-11-21  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
6050
6051        Reviewed by Eric Seidel.
6052
6053        [Qt][Mac] Turn on multiple JavaScript threads for QtWebkit on Mac
6054        https://bugs.webkit.org/show_bug.cgi?id=31753
6055
6056        * wtf/Platform.h:
6057
60582009-11-19  Steve Block  <steveblock@google.com>
6059
6060        Android port lacks configuration in Platform.h and config.h.
6061        https://bugs.webkit.org/show_bug.cgi?id=31671
6062
6063        * wtf/Platform.h: Modified. Added Android-specific configuration.
6064
60652009-11-19  Alexey Proskuryakov  <ap@apple.com>
6066
6067        Reviewed by Darin Adler.
6068
6069        https://bugs.webkit.org/show_bug.cgi?id=31690
6070        Make SocketStreamHandleCFNet work on Windows
6071
6072        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
6073        * wtf/MainThread.cpp:
6074        (WTF::FunctionWithContext::FunctionWithContext):
6075        (WTF::dispatchFunctionsFromMainThread):
6076        (WTF::callOnMainThreadAndWait):
6077        * wtf/MainThread.h:
6078        Re-add callOnMainThreadAndWait(), which was removed in bug 23926.
6079
60802009-11-19  Dmitry Titov  <dimich@chromium.org>
6081
6082        Reviewed by David Levin.
6083
6084        isMainThread() on Chromium (Mac and Linux) is so slow it timeouts LayoutTests..
6085        https://bugs.webkit.org/show_bug.cgi?id=31693
6086
6087        * wtf/ThreadingPthreads.cpp:
6088        (WTF::initializeThreading): grab and use the pthread_t of the main thread instead of ThreadIdentifier.
6089        (WTF::isMainThread): Ditto.
6090
60912009-11-19  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
6092
6093        Reviewed by Darin Adler.
6094
6095        Remove HAVE(STRING_H) guard from JavaScriptCore
6096        https://bugs.webkit.org/show_bug.cgi?id=31668
6097
6098        * config.h:
6099        * runtime/UString.cpp:
6100
61012009-11-19  Dumitru Daniliuc  <dumi@chromium.org>
6102
6103        Reviewed by Dmitry Titov.
6104
6105        Fixing a bug in MessageQueue::removeIf() that leads to an
6106        assertion failure.
6107
6108        https://bugs.webkit.org/show_bug.cgi?id=31657
6109
6110        * wtf/MessageQueue.h:
6111        (WTF::MessageQueue::removeIf):
6112
61132009-11-19  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
6114
6115        Reviewed by Darin Adler.
6116
6117        Remove HAVE(FLOAT_H) guard
6118        https://bugs.webkit.org/show_bug.cgi?id=31661
6119
6120        JavaScriptCore has a dependency on float.h, there is
6121        no need to guard float.h.
6122
6123        * runtime/DatePrototype.cpp: Remove include directive
6124        for float.h as it is included in MathExtras.h already.
6125        * runtime/Operations.cpp: Ditto.
6126        * runtime/UString.cpp: Ditto.
6127        * wtf/dtoa.cpp: Ditto.
6128        * wtf/MathExtras.h: Remove HAVE(FLOAT_H) guard.
6129        * wtf/Platform.h: Ditto.
6130
61312009-11-19  Thiago Macieira <thiago.macieira@nokia.com>
6132
6133        Reviewed by Simon Hausmann.
6134
6135        Build fix for 32-bit Sparc machines: these machines are big-endian.
6136
6137        * wtf/Platform.h:
6138
61392009-11-18  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
6140
6141        Reviewed by Kenneth Rohde Christiansen.
6142
6143        [Qt] Remove support for Qt v4.3 or older versions
6144        https://bugs.webkit.org/show_bug.cgi?id=29469
6145
6146        * JavaScriptCore.pro:
6147        * jsc.pro:
6148        * wtf/unicode/qt4/UnicodeQt4.h:
6149
61502009-11-18  Kent Tamura  <tkent@chromium.org>
6151
6152        Reviewed by Darin Adler.
6153
6154        Move UString::from(double) implementation to new
6155        WTF::doubleToStringInJavaScriptFormat(), and expose it because WebCore
6156        code will use it.
6157        https://bugs.webkit.org/show_bug.cgi?id=31330
6158
6159        - Introduce new function createRep(const char*, unsigned) and
6160          UString::UString(const char*, unsigned) to reduce 2 calls to strlen().
6161        - Fix a bug that dtoa() doesn't update *rve if the input value is NaN
6162          or Infinity.
6163
6164        No new tests because this doesn't change the behavior.
6165
6166        * JavaScriptCore.exp:
6167        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
6168        * runtime/UString.cpp:
6169        (JSC::createRep):
6170        (JSC::UString::UString):
6171        (JSC::UString::from): Move the code to doubleToStringInJavaScriptFormat().
6172        * runtime/UString.h:
6173        * wtf/dtoa.cpp:
6174        (WTF::dtoa): Fix a bug about rve.
6175        (WTF::append): A helper for doubleToStringInJavaScriptFormat().
6176        (WTF::doubleToStringInJavaScriptFormat): Move the code from UString::from(double).
6177        * wtf/dtoa.h:
6178
61792009-11-18  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
6180
6181        Reviewed by Kenneth Rohde Christiansen.
6182
6183        [Qt] Remove WTF_USE_JAVASCRIPTCORE_BINDINGS as it is no longer used
6184        https://bugs.webkit.org/show_bug.cgi?id=31643
6185
6186        * JavaScriptCore.pro:
6187
61882009-11-18  Nate Chapin  <japhet@chromium.org>
6189
6190        Reviewed by Darin Fisher.
6191
6192        Remove Chromium's unnecessary dependency on wtf's tcmalloc files.
6193
6194        https://bugs.webkit.org/show_bug.cgi?id=31648
6195
6196        * JavaScriptCore.gyp/JavaScriptCore.gyp:
6197
61982009-11-18  Thiago Macieira <thiago.macieira@nokia.com>
6199
6200        Reviewed by Gavin Barraclough.
6201
6202        [Qt] Implement symbol hiding for JSC's JIT functions.
6203
6204        These functions are implemented directly in assembly, so they need the
6205        proper directives to enable/disable visibility. On ELF systems, it's
6206        .hidden, whereas on Mach-O systems (Mac) it's .private_extern. On
6207        Windows, it's not necessary since you have to explicitly export. I
6208        also implemented the AIX idiom, though it's unlikely anyone will
6209        implement AIX/POWER JIT.
6210        https://bugs.webkit.org/show_bug.cgi?id=30864
6211
6212        * jit/JITStubs.cpp:
6213
62142009-11-18  Oliver Hunt  <oliver@apple.com>
6215
6216        Reviewed by Alexey Proskuryakov.
6217
6218        Interpreter may do an out of range access when throwing an exception in the profiler.
6219        https://bugs.webkit.org/show_bug.cgi?id=31635
6220
6221        Add bounds check.
6222
6223        * interpreter/Interpreter.cpp:
6224        (JSC::Interpreter::throwException):
6225
62262009-11-18  Gabor Loki  <loki@inf.u-szeged.hu>
6227
6228        Reviewed by Darin Adler.
6229
6230        Fix the clobber list of cacheFlush for ARM and Thumb2 on Linux
6231        https://bugs.webkit.org/show_bug.cgi?id=31631
6232
6233        * jit/ExecutableAllocator.h:
6234        (JSC::ExecutableAllocator::cacheFlush):
6235
62362009-11-18  Harald Fernengel  <harald.fernengel@nokia.com>
6237
6238        Reviewed by Simon Hausmann.
6239
6240        [Qt] Fix detection of linux-g++
6241
6242        Never use "linux-g++*" to check for linux-g++, since this will break embedded
6243        builds which use linux-arm-g++ and friends. Use 'linux*-g++*' to check for any
6244        g++ on linux mkspec.
6245
6246        * JavaScriptCore.pri:
6247
62482009-11-17  Jon Honeycutt  <jhoneycutt@apple.com>
6249
6250        Add JSContextRefPrivate.h to list of copied files.
6251
6252        Reviewed by Mark Rowe.
6253
6254        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
6255
62562009-11-17  Martin Robinson  <martin.james.robinson@gmail.com>
6257
6258        Reviewed by Adam Barth.
6259
6260        [GTK] Style cleanup for GOwnPtr
6261        https://bugs.webkit.org/show_bug.cgi?id=31506
6262
6263        Remove forward declaration in GOwnPtr and do some style cleanup.
6264
6265        * wtf/GOwnPtr.cpp:
6266        * wtf/GOwnPtr.h:
6267        (WTF::GOwnPtr::GOwnPtr):
6268        (WTF::GOwnPtr::~GOwnPtr):
6269        (WTF::GOwnPtr::get):
6270        (WTF::GOwnPtr::release):
6271        (WTF::GOwnPtr::outPtr):
6272        (WTF::GOwnPtr::set):
6273        (WTF::GOwnPtr::clear):
6274        (WTF::GOwnPtr::operator*):
6275        (WTF::GOwnPtr::operator->):
6276        (WTF::GOwnPtr::operator!):
6277        (WTF::GOwnPtr::operator UnspecifiedBoolType):
6278        (WTF::GOwnPtr::swap):
6279        (WTF::swap):
6280        (WTF::operator==):
6281        (WTF::operator!=):
6282        (WTF::getPtr):
6283        (WTF::freeOwnedGPtr):
6284
62852009-11-17  Oliver Hunt  <oliver@apple.com>
6286
6287        Reviewed by Maciej Stachowiak.
6288
6289        Incorrect use of JavaScriptCore API in DumpRenderTree
6290        https://bugs.webkit.org/show_bug.cgi?id=31577
6291
6292        Add assertions to the 'toJS' functions to catch mistakes like
6293        this early.  Restructure existing code which blindly passed potentially
6294        null values to toJS when forwarding exceptions so that a null check is
6295        performed first.
6296
6297        * API/APICast.h:
6298        (toJS):
6299        (toJSForGC):
6300        * API/JSCallbackObjectFunctions.h:
6301        (JSC::::getOwnPropertySlot):
6302        (JSC::::put):
6303        (JSC::::deleteProperty):
6304        (JSC::::construct):
6305        (JSC::::hasInstance):
6306        (JSC::::call):
6307        (JSC::::toNumber):
6308        (JSC::::toString):
6309        (JSC::::staticValueGetter):
6310        (JSC::::callbackGetter):
6311        * API/tests/testapi.c: Fix errors in the API tester.
6312        (MyObject_getProperty):
6313        (MyObject_convertToType):
6314        (EvilExceptionObject_convertToType):
6315
63162009-11-16  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
6317
6318        Reviewed by Gavin Barraclough.
6319
6320        https://bugs.webkit.org/show_bug.cgi?id=31050
6321
6322        Minor fixes for JSVALUE32_64: branchConvertDoubleToInt32
6323        failed on a CortexA8 CPU, but not on a simulator; and
6324        JITCall.cpp modifications was somehow not committed to mainline.
6325
6326        * assembler/ARMAssembler.h:
6327        (JSC::ARMAssembler::fmrs_r):
6328        * assembler/MacroAssemblerARM.h:
6329        (JSC::MacroAssemblerARM::branchConvertDoubleToInt32):
6330        * jit/JITCall.cpp:
6331        (JSC::JIT::compileOpCall):
6332
63332009-11-16  Joerg Bornemann  <joerg.bornemann@trolltech.com>
6334
6335        Reviewed by Simon Hausmann.
6336
6337        Fix Qt build on Windows CE 6.
6338
6339        * JavaScriptCore.pri: Add missing include path.
6340        * wtf/Platform.h: Include ce_time.h for Windows CE 6.
6341
63422009-11-13  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
6343
6344        Reviewed by Gavin Barraclough.
6345
6346        https://bugs.webkit.org/show_bug.cgi?id=31050
6347
6348        Adding optimization support for mode JSVALUE32_64
6349        on ARM systems.
6350
6351        * jit/JIT.h:
6352        * jit/JITCall.cpp:
6353        (JSC::JIT::compileOpCall):
6354        * jit/JITPropertyAccess.cpp:
6355        (JSC::JIT::emit_op_method_check):
6356        (JSC::JIT::compileGetByIdHotPath):
6357        (JSC::JIT::compileGetByIdSlowCase):
6358        (JSC::JIT::emit_op_put_by_id):
6359
63602009-11-14  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
6361
6362        Reviewed by Gavin Barraclough.
6363
6364        https://bugs.webkit.org/show_bug.cgi?id=31050
6365
6366        Adding JSVALUE32_64 support for ARM (but not turning it
6367        on by default). All optimizations must be disabled, since
6368        this patch is only the first of a series of patches.
6369
6370        During the work, a lot of x86 specific code revealed and
6371        made platform independent.
6372        See revisions: 50531 50541 50593 50594 50595
6373
6374        * assembler/ARMAssembler.h:
6375        (JSC::ARMAssembler::):
6376        (JSC::ARMAssembler::fdivd_r):
6377        * assembler/MacroAssemblerARM.h:
6378        (JSC::MacroAssemblerARM::lshift32):
6379        (JSC::MacroAssemblerARM::neg32):
6380        (JSC::MacroAssemblerARM::rshift32):
6381        (JSC::MacroAssemblerARM::branchOr32):
6382        (JSC::MacroAssemblerARM::set8):
6383        (JSC::MacroAssemblerARM::setTest8):
6384        (JSC::MacroAssemblerARM::loadDouble):
6385        (JSC::MacroAssemblerARM::divDouble):
6386        (JSC::MacroAssemblerARM::convertInt32ToDouble):
6387        (JSC::MacroAssemblerARM::zeroDouble):
6388        * jit/JIT.cpp:
6389        * jit/JIT.h:
6390        * jit/JITOpcodes.cpp:
6391        (JSC::JIT::privateCompileCTIMachineTrampolines):
6392        * jit/JITStubs.cpp:
6393        * wtf/StdLibExtras.h:
6394
63952009-11-13  Dominik Röttsches  <dominik.roettsches@access-company.com>
6396
6397        Reviewed by Eric Seidel.
6398
6399        Unify TextBoundaries implementations by only relying on WTF Unicode abstractions
6400        https://bugs.webkit.org/show_bug.cgi?id=31468
6401
6402        Adding isAlphanumeric abstraction, required
6403        by TextBoundaries.cpp.
6404
6405        * wtf/unicode/glib/UnicodeGLib.h:
6406        (WTF::Unicode::isAlphanumeric):
6407        * wtf/unicode/icu/UnicodeIcu.h:
6408        (WTF::Unicode::isAlphanumeric):
6409
64102009-11-13  Norbert Leser  <norbert.leser&nokia.com>
6411
6412        Reviewed by Eric Seidel.
6413
6414        Added macros for USERINCLUDE paths within symbian blocks
6415        to guarantee inclusion of respective header files from local path
6416        first (to avoid clashes with same names of header files in system include path).
6417
6418        * JavaScriptCore.pri:
6419
64202009-11-13  Oliver Hunt  <oliver@apple.com>
6421
6422        Reviewed by Geoff Garen.
6423
6424        JSValueProtect and JSValueUnprotect don't protect API wrapper values
6425        https://bugs.webkit.org/show_bug.cgi?id=31485
6426
6427        Make JSValueProtect/Unprotect use a new 'toJS' function, 'toJSForGC' that
6428        does not attempt to to strip out API wrapper objects.
6429
6430        * API/APICast.h:
6431        (toJSForGC):
6432        * API/JSValueRef.cpp:
6433        (JSValueProtect):
6434        (JSValueUnprotect):
6435        * API/tests/testapi.c:
6436        (makeGlobalNumberValue):
6437        (main):
6438
64392009-11-13  İsmail Dönmez  <ismail@namtrac.org>
6440
6441        Reviewed by Antti Koivisto.
6442
6443        Fix typo, ce_time.cpp should be ce_time.c
6444
6445        * JavaScriptCore.pri:
6446
64472009-11-12  Steve VanDeBogart  <vandebo@chromium.org>
6448
6449        Reviewed by Adam Barth.
6450
6451        Calculate the time offset only if we were able to parse
6452        the date string. This saves an IPC in Chromium for
6453        invalid date strings.
6454        https://bugs.webkit.org/show_bug.cgi?id=31416
6455
6456        * wtf/DateMath.cpp:
6457        (WTF::parseDateFromNullTerminatedCharacters):
6458        (JSC::parseDateFromNullTerminatedCharacters):
6459
64602009-11-12  Oliver Hunt  <oliver@apple.com>
6461
6462        Rollout r50896 until i can work out why it causes failures.
6463
6464        * bytecompiler/BytecodeGenerator.cpp:
6465        (JSC::BytecodeGenerator::emitReturn):
6466        * interpreter/Interpreter.cpp:
6467        (JSC::Interpreter::execute):
6468        * parser/Nodes.cpp:
6469        (JSC::EvalNode::emitBytecode):
6470
64712009-11-12  Steve Falkenburg  <sfalken@apple.com>
6472
6473        Reviewed by Stephanie Lewis.
6474
6475        Remove LIBRARY directive from def file to fix Debug_All target.
6476
6477        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
6478
64792009-11-12  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
6480
6481        Rubber-stamped by Holger Freyther.
6482
6483        Revert r50204, since it makes DRT crash on 32 bits release builds
6484        for GTK+.
6485
6486        * wtf/FastMalloc.h:
6487
64882009-11-12  Oliver Hunt  <oliver@apple.com>
6489
6490        Reviewed by Gavin Barraclough.
6491
6492        Start unifying entry logic for function and eval code.
6493
6494        Eval now uses a ret instruction to end execution, and sets up
6495        a callframe more in line with what we do for function entry.
6496
6497        * bytecompiler/BytecodeGenerator.cpp:
6498        (JSC::BytecodeGenerator::emitReturn):
6499        * interpreter/Interpreter.cpp:
6500        (JSC::Interpreter::execute):
6501        * parser/Nodes.cpp:
6502        (JSC::EvalNode::emitBytecode):
6503
65042009-11-12  Richard Moe Gustavsen  <richard.gustavsen@nokia.com>
6505
6506        Reviewed by Kenneth Rohde Christiansen.
6507
6508        [Qt] Disable pthread_setname_np.
6509
6510        This allows Qt builds on Mac from 10.6 to run on earlier version
6511        where this symbol is not present.
6512        https://bugs.webkit.org/show_bug.cgi?id=31403
6513
6514        * wtf/Platform.h:
6515
65162009-11-12  Thiago Macieira <thiago.macieira@nokia.com>
6517
6518        Reviewed by Kenneth Rohde Christiansen.
6519
6520        [Qt] Fix linking on Linux 32-bit.
6521
6522        It was missing the ".text" directive at the top of the file,
6523        indicating that code would follow. Without it, the assembler created
6524        "NOTYPE" symbols, which would result in linker errors.
6525        https://bugs.webkit.org/show_bug.cgi?id=30863
6526
6527        * jit/JITStubs.cpp:
6528
65292009-11-11  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
6530
6531        Reviewed by Alexey Proskuryakov.
6532
6533        Refactor multiple JavaScriptCore threads
6534        https://bugs.webkit.org/show_bug.cgi?id=31328
6535
6536        Remove the id field from the PlatformThread structure
6537        as it is not used.
6538
6539        * runtime/Collector.cpp:
6540        (JSC::getCurrentPlatformThread):
6541        (JSC::suspendThread):
6542        (JSC::resumeThread):
6543        (JSC::getPlatformThreadRegisters):
6544
65452009-11-10  Geoffrey Garen  <ggaren@apple.com>
6546
6547        Linux build fix: Added an #include for UINT_MAX.
6548
6549        * runtime/WeakRandom.h:
6550
65512009-11-10  Geoffrey Garen  <ggaren@apple.com>
6552
6553        JavaScriptGlue build fix: Marked a file 'private' instead of 'project'.
6554
6555        * JavaScriptCore.xcodeproj/project.pbxproj:
6556
65572009-11-10  Geoffrey Garen  <ggaren@apple.com>
6558
6559        Reviewed by Gavin "avGni arBalroguch" Barraclough.
6560
6561        Faster Math.random, based on GameRand.
6562
6563        SunSpider says 1.4% faster.
6564
6565        * GNUmakefile.am:
6566        * JavaScriptCore.gypi:
6567        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
6568        * JavaScriptCore.xcodeproj/project.pbxproj: Added the header to the project.
6569
6570        * runtime/JSGlobalData.cpp:
6571        (JSC::JSGlobalData::JSGlobalData):
6572        * runtime/JSGlobalData.h: Use an object to track random number generation
6573        state, initialized to the current time.
6574
6575        * runtime/MathObject.cpp:
6576        (JSC::MathObject::MathObject):
6577        (JSC::mathProtoFuncRandom): Use the new hotness.
6578
6579        * runtime/WeakRandom.h: Added.
6580        (JSC::WeakRandom::WeakRandom):
6581        (JSC::WeakRandom::get):
6582        (JSC::WeakRandom::advance): The new hotness.
6583
65842009-11-09  Geoffrey Garen  <ggaren@apple.com>
6585
6586        Reviewed by Oliver Hunt.
6587
6588        Imported the v8 DST cache.
6589
6590        SunSpider says 1.5% faster.
6591
6592        * runtime/JSGlobalData.cpp:
6593        (JSC::JSGlobalData::resetDateCache): Reset the DST cache when resetting
6594        other date data.
6595
6596        * runtime/JSGlobalData.h:
6597        (JSC::DSTOffsetCache::DSTOffsetCache):
6598        (JSC::DSTOffsetCache::reset): Added a struct for the DST cache.
6599
6600        * wtf/DateMath.cpp:
6601        (WTF::calculateDSTOffsetSimple):
6602        (WTF::calculateDSTOffset):
6603        (WTF::parseDateFromNullTerminatedCharacters):
6604        (JSC::getDSTOffset):
6605        (JSC::gregorianDateTimeToMS):
6606        (JSC::msToGregorianDateTime):
6607        (JSC::parseDateFromNullTerminatedCharacters):
6608        * wtf/DateMath.h: The imported code for probing and updating the cache.
6609
66102009-11-09  Geoffrey Garen  <ggaren@apple.com>
6611
6612        Reviewed by Oliver Hunt.
6613
6614        Fixed an edge case that could cause the engine not to notice a timezone
6615        change.
6616
6617        No test because this case would require manual intervention to change
6618        the timezone during the test.
6619
6620        SunSpider reports no change.
6621
6622        * runtime/DateInstanceCache.h:
6623        (JSC::DateInstanceCache::DateInstanceCache):
6624        (JSC::DateInstanceCache::reset): Added a helper function for resetting
6625        this cache. Also, shrank the cache, since we'll be resetting it often.
6626
6627        * runtime/JSGlobalData.cpp:
6628        (JSC::JSGlobalData::resetDateCache): Include resetting the DateInstanceCache
6629        in resetting Date data. (Otherwise, a cache hit could bypass a necessary
6630        timezone update check.)
6631
66322009-11-09  Geoffrey Garen  <ggaren@apple.com>
6633
6634        Reviewed by Sam Weinig.
6635
6636        Some manual inlining and constant propogation in Date code.
6637
6638        SunSpider reports a 0.4% speedup on date-*, no overall speedup. Shark
6639        says some previously evident stalls are now gone.
6640
6641        * runtime/DateConstructor.cpp:
6642        (JSC::callDate):
6643        * runtime/DateConversion.cpp:
6644        (JSC::formatTime):
6645        (JSC::formatTimeUTC): Split formatTime into UTC and non-UTC variants.
6646
6647        * runtime/DateConversion.h:
6648        * runtime/DateInstance.cpp:
6649        (JSC::DateInstance::calculateGregorianDateTime):
6650        (JSC::DateInstance::calculateGregorianDateTimeUTC):
6651        * runtime/DateInstance.h:
6652        (JSC::DateInstance::gregorianDateTime):
6653        (JSC::DateInstance::gregorianDateTimeUTC): Split gregorianDateTime into
6654        a UTC and non-UTC variant, and split each variant into a fast inline
6655        case and a slow out-of-line case.
6656
6657        * runtime/DatePrototype.cpp:
6658        (JSC::formatLocaleDate):
6659        (JSC::dateProtoFuncToString):
6660        (JSC::dateProtoFuncToUTCString):
6661        (JSC::dateProtoFuncToISOString):
6662        (JSC::dateProtoFuncToDateString):
6663        (JSC::dateProtoFuncToTimeString):
6664        (JSC::dateProtoFuncGetFullYear):
6665        (JSC::dateProtoFuncGetUTCFullYear):
6666        (JSC::dateProtoFuncToGMTString):
6667        (JSC::dateProtoFuncGetMonth):
6668        (JSC::dateProtoFuncGetUTCMonth):
6669        (JSC::dateProtoFuncGetDate):
6670        (JSC::dateProtoFuncGetUTCDate):
6671        (JSC::dateProtoFuncGetDay):
6672        (JSC::dateProtoFuncGetUTCDay):
6673        (JSC::dateProtoFuncGetHours):
6674        (JSC::dateProtoFuncGetUTCHours):
6675        (JSC::dateProtoFuncGetMinutes):
6676        (JSC::dateProtoFuncGetUTCMinutes):
6677        (JSC::dateProtoFuncGetSeconds):
6678        (JSC::dateProtoFuncGetUTCSeconds):
6679        (JSC::dateProtoFuncGetTimezoneOffset):
6680        (JSC::setNewValueFromTimeArgs):
6681        (JSC::setNewValueFromDateArgs):
6682        (JSC::dateProtoFuncSetYear):
6683        (JSC::dateProtoFuncGetYear): Updated for the gregorianDateTime change above.
6684
66852009-11-09  Geoffrey Garen  <ggaren@apple.com>
6686
6687        Build fix: export a new symbol.
6688
6689        * JavaScriptCore.exp:
6690        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
6691
66922009-11-09  Geoffrey Garen  <ggaren@apple.com>
6693
6694        Reviewed by Sam "Home Wrecker" Weinig.
6695
6696        Added a tiny cache for Date parsing.
6697
6698        SunSpider says 1.2% faster.
6699
6700        * runtime/DateConversion.cpp:
6701        (JSC::parseDate): Try to reuse the last parsed Date, if present.
6702
6703        * runtime/JSGlobalData.cpp:
6704        (JSC::JSGlobalData::resetDateCache):
6705        * runtime/JSGlobalData.h: Added storage for last parsed Date. Refactored
6706        this code to make resetting the date cache easier.
6707
6708        * runtime/JSGlobalObject.h:
6709        (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): Updated for
6710        refactoring.
6711
6712        * wtf/DateMath.cpp:
6713        (JSC::parseDateFromNullTerminatedCharacters):
6714        * wtf/DateMath.h: Changed ExecState to be first parameter, as is the JSC custom.
6715
67162009-11-09  Oliver Hunt  <oliver@apple.com>
6717
6718        Reviewed by Gavin Barraclough.
6719
6720        Can cache prototype lookups on uncacheable dictionaries.
6721        https://bugs.webkit.org/show_bug.cgi?id=31198
6722
6723        Replace fromDictionaryTransition with flattenDictionaryObject and
6724        flattenDictionaryStructure.  This change is necessary as we need to
6725        guarantee that our attempt to convert away from a dictionary structure
6726        will definitely succeed, and in some cases this requires mutating the
6727        object storage itself.
6728
6729        * interpreter/Interpreter.cpp:
6730        (JSC::Interpreter::tryCacheGetByID):
6731        * jit/JITStubs.cpp:
6732        (JSC::JITThunks::tryCacheGetByID):
6733        (JSC::DEFINE_STUB_FUNCTION):
6734        * runtime/BatchedTransitionOptimizer.h:
6735        (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
6736        * runtime/JSObject.h:
6737        (JSC::JSObject::flattenDictionaryObject):
6738        * runtime/Operations.h:
6739        (JSC::normalizePrototypeChain):
6740        * runtime/Structure.cpp:
6741        (JSC::Structure::flattenDictionaryStructure):
6742        (JSC::comparePropertyMapEntryIndices):
6743        * runtime/Structure.h:
6744
67452009-11-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
6746
6747        Not reviewed, build fix.
6748
6749        Remove extra character from r50701.
6750
6751        * JavaScriptCore.pri:
6752
67532009-11-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
6754
6755        Not reviewed, build fix.
6756
6757        Revert r50695 because it broke QtWebKit (clean builds).
6758
6759        * JavaScriptCore.pri:
6760
67612009-11-09  Norbert Leser  <norbert.leser@nokia.com>
6762
6763        Reviewed by Kenneth Rohde Christiansen.
6764
6765        Prepended $$PWD to GENERATED_SOURCES_DIR to avoid potential ambiguities when included from WebCore.pro.
6766        Some preprocessors consider this GENERATED_SOURCES_DIR relative to current invoking dir (e.g., ./WebCore),
6767        and not the working dir of JavaCriptCore.pri (i.e., ../JavaScriptCore/).
6768
6769        * JavaScriptCore.pri:
6770
67712009-11-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
6772
6773        Reviewed by Kenneth Rohde Christiansen.
6774
6775        Use explicit parentheses to silence gcc 4.4 -Wparentheses warnings
6776        https://bugs.webkit.org/show_bug.cgi?id=31040
6777
6778        * interpreter/Interpreter.cpp:
6779        (JSC::Interpreter::privateExecute):
6780
67812009-11-08  David Levin  <levin@chromium.org>
6782
6783        Reviewed by NOBODY (speculative snow leopard and windows build fixes).
6784
6785        * wtf/DateMath.cpp:
6786        (WTF::parseDateFromNullTerminatedCharacters):
6787        (JSC::gregorianDateTimeToMS):
6788        (JSC::msToGregorianDateTime):
6789        (JSC::parseDateFromNullTerminatedCharacters):
6790        * wtf/DateMath.h:
6791        (JSC::GregorianDateTime::GregorianDateTime):
6792
67932009-11-08  David Levin  <levin@chromium.org>
6794
6795        Reviewed by NOBODY (chromium build fix).
6796
6797        Hopefully, the last build fix.
6798
6799        Create better separation in DateMath about the JSC
6800        and non-JSC portions. Also, only expose the non-JSC
6801        version in the exports.
6802
6803        * JavaScriptCore.exp:
6804        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
6805        * wtf/DateMath.cpp:
6806        (WTF::parseDateFromNullTerminatedCharacters):
6807        (JSC::getUTCOffset):
6808        (JSC::gregorianDateTimeToMS):
6809        (JSC::msToGregorianDateTime):
6810        (JSC::parseDateFromNullTerminatedCharacters):
6811        * wtf/DateMath.h:
6812        (JSC::gmtoffset):
6813
68142009-11-08  David Levin  <levin@chromium.org>
6815
6816        Reviewed by NOBODY (chromium build fix).
6817
6818        For the change in DateMath.
6819
6820        * config.h:
6821        * wtf/DateMath.cpp:
6822
68232009-11-06  Geoffrey Garen  <ggaren@apple.com>
6824
6825        Windows build fix: export some symbols.
6826
6827        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
6828
68292009-11-06  Geoffrey Garen  <ggaren@apple.com>
6830
6831        Build fix: updated export file.
6832
6833        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
6834
68352009-11-06  Geoffrey Garen  <ggaren@apple.com>
6836
6837        Build fix: added some #includes.
6838
6839        * wtf/CurrentTime.h:
6840        * wtf/DateMath.h:
6841
68422009-11-06  Geoffrey Garen  <ggaren@apple.com>
6843
6844        Reviewed by Oliver Hunt.
6845
6846        https://bugs.webkit.org/show_bug.cgi?id=31197
6847        Implemented a timezone cache not based on Mac OS X's notify_check API.
6848
6849        If the VM calculates the local timezone offset from UTC, it caches the
6850        result until the end of the current VM invocation. (We don't want to cache
6851        forever, because the user's timezone may change over time.)
6852
6853        This removes notify_* overhead on Mac, and, more significantly, removes
6854        OS time and date call overhead on non-Mac platforms.
6855
6856        ~8% speedup on Date microbenchmark on Mac. SunSpider reports maybe a tiny
6857        speedup on Mac. (Speedup on non-Mac platforms should be even more noticeable.)
6858
6859        * JavaScriptCore.exp:
6860
6861        * interpreter/CachedCall.h:
6862        (JSC::CachedCall::CachedCall):
6863        * interpreter/Interpreter.cpp:
6864        (JSC::Interpreter::execute):
6865        * runtime/JSGlobalObject.h:
6866        (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): Made the
6867        DynamicGlobalObjectScope constructor responsible for checking whether a
6868        dynamicGlobalObject has already been set. This eliminated some duplicate
6869        client code, and allowed me to avoid adding even more duplicate client
6870        code. Made DynamicGlobalObjectScope responsible for resetting the
6871        local timezone cache upon first entry to the VM.
6872
6873        * runtime/DateConstructor.cpp:
6874        (JSC::constructDate):
6875        (JSC::callDate):
6876        (JSC::dateParse):
6877        (JSC::dateUTC):
6878        * runtime/DateConversion.cpp:
6879        (JSC::parseDate):
6880        * runtime/DateConversion.h:
6881        * runtime/DateInstance.cpp:
6882        (JSC::DateInstance::gregorianDateTime):
6883        * runtime/DateInstance.h:
6884        * runtime/DateInstanceCache.h:
6885        * runtime/DatePrototype.cpp:
6886        (JSC::setNewValueFromTimeArgs):
6887        (JSC::setNewValueFromDateArgs):
6888        (JSC::dateProtoFuncSetYear):
6889        * runtime/InitializeThreading.cpp:
6890        (JSC::initializeThreadingOnce):
6891        * runtime/JSGlobalData.cpp:
6892        (JSC::JSGlobalData::JSGlobalData):
6893        * runtime/JSGlobalData.h:
6894        * wtf/DateMath.cpp:
6895        (WTF::getCurrentUTCTime):
6896        (WTF::getCurrentUTCTimeWithMicroseconds):
6897        (WTF::getLocalTime):
6898        (JSC::getUTCOffset): Use the new cache. Also, see below.
6899        (JSC::gregorianDateTimeToMS):
6900        (JSC::msToGregorianDateTime):
6901        (JSC::initializeDates):
6902        (JSC::parseDateFromNullTerminatedCharacters): Simplified the way this function
6903        accounts for the local timezone offset, to accomodate our new caching API,
6904        and a (possibly misguided) caller in WebCore. Also, see below.
6905        * wtf/DateMath.h:
6906        (JSC::GregorianDateTime::GregorianDateTime): Moved most of the code in
6907        DateMath.* into the JSC namespace. The code needed to move so it could
6908        naturally interact with ExecState and JSGlobalData to support caching.
6909        Logically, it seemed right to move it, too, since this code is not really
6910        as low-level as the WTF namespace might imply -- it implements a set of
6911        date parsing and conversion quirks that are finely tuned to the JavaScript
6912        language. Also removed the Mac OS X notify_* infrastructure.
6913
6914        * wtf/CurrentTime.h:
6915        (WTF::currentTimeMS):
6916        (WTF::getLocalTime): Moved the rest of the DateMath code here, and renamed
6917        it to make it consistent with WTF's currentTime function.
6918
69192009-11-06  Gabor Loki  <loki@inf.u-szeged.hu>
6920
6921        Unreviewed trivial buildfix after r50595.
6922
6923        Rename the remaining rshiftPtr calls to rshift32
6924
6925        * jit/JITArithmetic.cpp:
6926        (JSC::JIT::emit_op_rshift):
6927        * jit/JITInlineMethods.h:
6928        (JSC::JIT::emitFastArithImmToInt):
6929
69302009-11-06  Gavin Barraclough  <barraclough@apple.com>
6931
6932        Reviewed by Oliver Hunt.
6933
6934        Tidy up the shift methods on the macro-assembler interface.
6935
6936        Currently behaviour of shifts of a magnitude > 0x1f is undefined.
6937        Instead defined that all shifts are masked to this range.  This makes a lot of
6938        practical sense, both since having undefined behaviour is not particularly
6939        desirable, and because this behaviour is commonly required (particularly since
6940        it is required bt ECMA-262 for shifts).
6941
6942        Update the ARM assemblers to provide this behaviour.  Remove (now) redundant
6943        masks from JITArithmetic, and remove rshiftPtr (this was used in case that
6944        could be rewritten in a simpler form using rshift32, only optimized JSVALUE32
6945        on x86-64, which uses JSVALUE64!)
6946
6947        * assembler/MacroAssembler.h:
6948        * assembler/MacroAssemblerARM.h:
6949        (JSC::MacroAssemblerARM::lshift32):
6950        (JSC::MacroAssemblerARM::rshift32):
6951        * assembler/MacroAssemblerARMv7.h:
6952        (JSC::MacroAssemblerARMv7::lshift32):
6953        (JSC::MacroAssemblerARMv7::rshift32):
6954        * assembler/MacroAssemblerX86_64.h:
6955        * jit/JITArithmetic.cpp:
6956        (JSC::JIT::emit_op_lshift):
6957        (JSC::JIT::emit_op_rshift):
6958
69592009-11-05  Gavin Barraclough  <barraclough@apple.com>
6960
6961        Rubber Stamped by Oliver Hunt.
6962
6963        Remove a magic number (1) from the JIT, instead compute the value with OBJECT_OFFSET.
6964
6965        * jit/JITInlineMethods.h:
6966        (JSC::JIT::emitPutJITStubArg):
6967        (JSC::JIT::emitPutJITStubArgConstant):
6968        (JSC::JIT::emitGetJITStubArg):
6969        (JSC::JIT::emitPutJITStubArgFromVirtualRegister):
6970        * jit/JITStubCall.h:
6971        (JSC::JITStubCall::JITStubCall):
6972        (JSC::JITStubCall::getArgument):
6973        * jit/JITStubs.h:
6974
69752009-11-05  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
6976
6977        Reviewed by Gavin Barraclough.
6978
6979        https://bugs.webkit.org/show_bug.cgi?id=31159
6980        Fix branchDouble behaviour on ARM THUMB2 JIT.
6981
6982        The x86 branchDouble behaviour is reworked, and all JIT
6983        ports should follow the x86 port. See bug 31104 and 31151
6984
6985        This patch contains a fix for the traditional ARM port
6986
6987        * assembler/ARMAssembler.h:
6988        (JSC::ARMAssembler::):
6989        (JSC::ARMAssembler::fmrs_r):
6990        (JSC::ARMAssembler::ftosid_r):
6991        * assembler/MacroAssemblerARM.h:
6992        (JSC::MacroAssemblerARM::):
6993        (JSC::MacroAssemblerARM::branchDouble):
6994        (JSC::MacroAssemblerARM::branchConvertDoubleToInt32):
6995
69962009-11-05  Chris Jerdonek  <chris.jerdonek@gmail.com>
6997
6998        Reviewed by Eric Seidel.
6999
7000        Removed the "this is part of the KDE project" comments from
7001        all *.h, *.cpp, *.idl, and *.pm files.
7002
7003        https://bugs.webkit.org/show_bug.cgi?id=31167
7004
7005        The maintenance and architecture page in the project wiki lists
7006        this as a task.
7007
7008        This change includes no changes or additions to test cases
7009        since the change affects only comments.
7010
7011        * wtf/wince/FastMallocWince.h:
7012
70132009-11-05  Gabor Loki  <loki@inf.u-szeged.hu>
7014
7015        Reviewed by Gavin Barraclough.
7016
7017        Use ARMv7 specific encoding for immediate constants on ARMv7 target
7018        https://bugs.webkit.org/show_bug.cgi?id=31060
7019
7020        * assembler/ARMAssembler.cpp:
7021        (JSC::ARMAssembler::getOp2): Use INVALID_IMM
7022        (JSC::ARMAssembler::getImm): Use encodeComplexImm for complex immediate
7023        (JSC::ARMAssembler::moveImm): Ditto.
7024        (JSC::ARMAssembler::encodeComplexImm): Encode a constant by one or two
7025        instructions or a PC relative load.
7026        * assembler/ARMAssembler.h: Use INVALID_IMM if a constant cannot be
7027        encoded as an immediate constant.
7028        (JSC::ARMAssembler::):
7029        (JSC::ARMAssembler::movw_r): 16-bit immediate load
7030        (JSC::ARMAssembler::movt_r): High halfword 16-bit immediate load
7031        (JSC::ARMAssembler::getImm16Op2): Encode immediate constant for
7032        movw_r and mowt_r
7033
70342009-11-04  Mark Mentovai  <mark@chromium.org>
7035
7036        Reviewed by Mark Rowe.
7037
7038        Provide TARGETING_TIGER and TARGETING_LEOPARD as analogues to
7039        BUILDING_ON_TIGER and BUILDING_ON_LEOPARD.  The TARGETING_ macros
7040        consider the deployment target; the BUILDING_ON_ macros consider the
7041        headers being built against.
7042
7043        * wtf/Platform.h:
7044
70452009-11-04  Gavin Barraclough  <barraclough@apple.com>
7046
7047        Reviewed by Oliver Hunt.
7048
7049        https://bugs.webkit.org/show_bug.cgi?id=31151
7050        Fix branchDouble behaviour on ARM THUMB2 JIT.
7051
7052        The ARMv7 JIT is currently using ARMv7Assembler::ConditionEQ to branch
7053        for DoubleEqualOrUnordered, however this is incorrect – ConditionEQ won't
7054        branch on unordered operands.  Similarly, DoubleLessThanOrUnordered &
7055        DoubleLessThanOrEqualOrUnordered use ARMv7Assembler::ConditionLO &
7056        ARMv7Assembler::ConditionLS, whereas they should be using
7057        ARMv7Assembler::ConditionLT & ARMv7Assembler::ConditionLE.
7058
7059        Fix these, and fill out the missing DoubleConditions.
7060
7061        * assembler/MacroAssemblerARMv7.h:
7062        (JSC::MacroAssemblerARMv7::):
7063        (JSC::MacroAssemblerARMv7::branchDouble):
7064
70652009-11-04  Gavin Barraclough  <barraclough@apple.com>
7066
7067        Rubber Stamped by Oliver Hunt.
7068
7069        Enable native call optimizations on ARMv7.  (Existing ARM_TRADITIONAL
7070        implementation was generic, worked perfectly, just needed turning on).
7071
7072        * jit/JITOpcodes.cpp:
7073        * wtf/Platform.h:
7074
70752009-11-04  Gavin Barraclough  <barraclough@apple.com>
7076
7077        Rubber Stamped by Mark Rowe, Oliver Hunt, and Sam Weinig.
7078
7079        Add a missing assert to the ARMv7 JIT.
7080
7081        * assembler/ARMv7Assembler.h:
7082        (JSC::ARMThumbImmediate::ARMThumbImmediate):
7083
70842009-11-04  Mark Rowe  <mrowe@apple.com>
7085
7086        Rubber-stamped by Oliver Hunt.
7087
7088        Remove bogus op_ prefix on dumped version of three opcodes.
7089
7090        * bytecode/CodeBlock.cpp:
7091        (JSC::CodeBlock::dump):
7092
70932009-11-04  Mark Rowe  <mrowe@apple.com>
7094
7095        Reviewed by Sam Weinig.
7096
7097        Fix dumping of constants in bytecode so that they aren't printed as large positive register numbers.
7098
7099        We do this by having the registerName function return information about the constant if the register
7100        number corresponds to a constant.  This requires that registerName, and several functions that call it,
7101        be converted to member functions of CodeBlock so that the constant value can be retrieved.  The
7102        ExecState also needs to be threaded down through these functions so that it can be passed on to
7103        constantName when needed.
7104
7105        * bytecode/CodeBlock.cpp:
7106        (JSC::constantName):
7107        (JSC::CodeBlock::registerName):
7108        (JSC::CodeBlock::printUnaryOp):
7109        (JSC::CodeBlock::printBinaryOp):
7110        (JSC::CodeBlock::printConditionalJump):
7111        (JSC::CodeBlock::printGetByIdOp):
7112        (JSC::CodeBlock::printPutByIdOp):
7113        (JSC::CodeBlock::dump):
7114        * bytecode/CodeBlock.h:
7115        (JSC::CodeBlock::isConstantRegisterIndex):
7116
71172009-11-04  Pavel Heimlich  <tropikhajma@gmail.com>
7118
7119        Reviewed by Alexey Proskuryakov.
7120
7121        https://bugs.webkit.org/show_bug.cgi?id=30647
7122        Solaris build failure due to strnstr.
7123
7124        * wtf/StringExtras.h: Enable strnstr on Solaris, too.
7125
71262009-11-04  Gavin Barraclough  <barraclough@apple.com>
7127
7128        Reviewed by Oliver Hunt.
7129
7130        https://bugs.webkit.org/show_bug.cgi?id=31104
7131        Refactor x86-specific behaviour out of the JIT.
7132
7133        - Add explicit double branch conditions for ordered and unordered comparisons (presently the brehaviour is a mix).
7134        - Refactor double to int conversion out into the MacroAssembler.
7135        - 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.
7136        - 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.
7137
7138        * assembler/MacroAssemblerARM.h:
7139        (JSC::MacroAssemblerARM::):
7140        * assembler/MacroAssemblerARMv7.h:
7141        (JSC::MacroAssemblerARMv7::):
7142        * assembler/MacroAssemblerX86Common.h:
7143        (JSC::MacroAssemblerX86Common::):
7144        (JSC::MacroAssemblerX86Common::convertInt32ToDouble):
7145        (JSC::MacroAssemblerX86Common::branchDouble):
7146        (JSC::MacroAssemblerX86Common::branchConvertDoubleToInt32):
7147        * jit/JITArithmetic.cpp:
7148        (JSC::JIT::emitBinaryDoubleOp):
7149        (JSC::JIT::emit_op_div):
7150        (JSC::JIT::emitSlow_op_jnless):
7151        (JSC::JIT::emitSlow_op_jnlesseq):
7152        * jit/JITOpcodes.cpp:
7153        (JSC::JIT::emit_op_jfalse):
7154
71552009-11-04  Mark Mentovai  <mark@chromium.org>
7156
7157        Reviewed by Eric Seidel.
7158
7159        Remove BUILDING_ON_LEOPARD from JavaScriptCore.gyp.  This is supposed
7160        to be set as needed only in wtf/Platform.h.
7161
7162        * JavaScriptCore.gyp/JavaScriptCore.gyp:
7163
71642009-11-02  Oliver Hunt  <oliver@apple.com>
7165
7166        Reviewed by Gavin Barraclough.
7167
7168        REGRESSION (r48573): JSC may incorrectly cache chain lookups with a dictionary at the head of the chain
7169        https://bugs.webkit.org/show_bug.cgi?id=31045
7170
7171        Add guards to prevent caching of prototype chain lookups with dictionaries at the
7172        head of the chain.  Also add a few tighter assertions to cached prototype lookups
7173        to catch this in future.
7174
7175        * interpreter/Interpreter.cpp:
7176        (JSC::Interpreter::tryCacheGetByID):
7177        (JSC::Interpreter::privateExecute):
7178        * jit/JITStubs.cpp:
7179        (JSC::JITThunks::tryCacheGetByID):
7180
71812009-11-02  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
7182
7183        Reviewed by Darin Adler.
7184
7185        PLATFORM(CF) should be set when building for Qt on Darwin
7186        https://bugs.webkit.org/show_bug.cgi?id=23671
7187
7188        * wtf/Platform.h: Turn on CF support if both QT and DARWIN
7189        platforms are defined.
7190
71912009-11-02  Dmitry Titov  <dimich@chromium.org>
7192
7193        Reviewed by David Levin.
7194
7195        Remove threadsafe refcounting from tasks used with WTF::MessageQueue.
7196        https://bugs.webkit.org/show_bug.cgi?id=30612
7197
7198        * wtf/MessageQueue.h:
7199        (WTF::MessageQueue::alwaysTruePredicate):
7200        (WTF::MessageQueue::~MessageQueue):
7201        (WTF::MessageQueue::append):
7202        (WTF::MessageQueue::appendAndCheckEmpty):
7203        (WTF::MessageQueue::prepend):
7204        (WTF::MessageQueue::waitForMessage):
7205        (WTF::MessageQueue::waitForMessageFilteredWithTimeout):
7206        (WTF::MessageQueue::tryGetMessage):
7207        (WTF::MessageQueue::removeIf):
7208        The MessageQueue is changed to act as a queue of OwnPtr<DataType>. It takes ownership
7209        of posted tasks and passes it to the new owner (in another thread) when the task is fetched.
7210        All methods have arguments of type PassOwnPtr<DataType> and return the same type.
7211
7212        * wtf/Threading.cpp:
7213        (WTF::createThread):
7214        Superficial change to trigger rebuild of JSC project on Windows,
7215        workaround for https://bugs.webkit.org/show_bug.cgi?id=30890
7216
72172009-10-30  Geoffrey Garen  <ggaren@apple.com>
7218
7219        Reviewed by Oliver Hunt.
7220
7221        Fixed failing layout test: restore a special case I accidentally deleted.
7222
7223        * runtime/DatePrototype.cpp:
7224        (JSC::setNewValueFromDateArgs): In the case of applying a change to a date
7225        that is NaN, reset the date to 0 *and* then apply the change; don't just
7226        reset the date to 0.
7227
72282009-10-30  Geoffrey Garen  <ggaren@apple.com>
7229
7230        Windows build fix: update for object-to-pointer change.
7231
7232        * runtime/DatePrototype.cpp:
7233        (JSC::formatLocaleDate):
7234
72352009-10-29  Geoffrey Garen  <ggaren@apple.com>
7236
7237        Reviewed by Darin Adler.
7238
7239        https://bugs.webkit.org/show_bug.cgi?id=30942
7240        Use pointers instead of copies to pass GregorianDateTime objects around.
7241
7242        SunSpider reports a shocking 4.5% speedup on date-format-xparb, and 1.3%
7243        speedup on date-format-tofte.
7244
7245        * runtime/DateInstance.cpp:
7246        (JSC::DateInstance::gregorianDateTime):
7247        * runtime/DateInstance.h:
7248        * runtime/DatePrototype.cpp:
7249        (JSC::formatLocaleDate):
7250        (JSC::dateProtoFuncToString):
7251        (JSC::dateProtoFuncToUTCString):
7252        (JSC::dateProtoFuncToISOString):
7253        (JSC::dateProtoFuncToDateString):
7254        (JSC::dateProtoFuncToTimeString):
7255        (JSC::dateProtoFuncGetFullYear):
7256        (JSC::dateProtoFuncGetUTCFullYear):
7257        (JSC::dateProtoFuncToGMTString):
7258        (JSC::dateProtoFuncGetMonth):
7259        (JSC::dateProtoFuncGetUTCMonth):
7260        (JSC::dateProtoFuncGetDate):
7261        (JSC::dateProtoFuncGetUTCDate):
7262        (JSC::dateProtoFuncGetDay):
7263        (JSC::dateProtoFuncGetUTCDay):
7264        (JSC::dateProtoFuncGetHours):
7265        (JSC::dateProtoFuncGetUTCHours):
7266        (JSC::dateProtoFuncGetMinutes):
7267        (JSC::dateProtoFuncGetUTCMinutes):
7268        (JSC::dateProtoFuncGetSeconds):
7269        (JSC::dateProtoFuncGetUTCSeconds):
7270        (JSC::dateProtoFuncGetTimezoneOffset):
7271        (JSC::setNewValueFromTimeArgs):
7272        (JSC::setNewValueFromDateArgs):
7273        (JSC::dateProtoFuncSetYear):
7274        (JSC::dateProtoFuncGetYear): Renamed getGregorianDateTime to gregorianDateTime,
7275        since it no longer has an out parameter. Uses 0 to indicate invalid dates.
7276
72772009-10-30  Zoltan Horvath  <zoltan@webkit.org>
7278
7279        Reviewed by Darin Adler.
7280
7281        Allow custom memory allocation control for JavaScriptCore's ListHashSet
7282        https://bugs.webkit.org/show_bug.cgi?id=30853
7283
7284        Inherits ListHashSet class from FastAllocBase because it is
7285        instantiated by 'new' in WebCore/rendering/RenderBlock.cpp:1813.
7286
7287        * wtf/ListHashSet.h:
7288
72892009-10-30  Oliver Hunt  <oliver@apple.com>
7290
7291        Reviewed by Gavin Barraclough.
7292
7293        Regression: crash enumerating properties of an object with getters or setters
7294        https://bugs.webkit.org/show_bug.cgi?id=30948
7295
7296        Add a guard to prevent us trying to cache property enumeration on
7297        objects with getters or setters.
7298
7299        * runtime/JSPropertyNameIterator.cpp:
7300        (JSC::JSPropertyNameIterator::create):
7301
73022009-10-30  Roland Steiner  <rolandsteiner@chromium.org>
7303
7304        Reviewed by Eric Seidel.
7305
7306        Remove ENABLE_RUBY guards as discussed with Dave Hyatt and Maciej Stachowiak.
7307
7308        Bug 28420 -  Implement HTML5 <ruby> rendering
7309        (https://bugs.webkit.org/show_bug.cgi?id=28420)
7310
7311        No new tests (no functional change).
7312
7313        * Configurations/FeatureDefines.xcconfig:
7314
73152009-10-29  Oliver Hunt  <oliver@apple.com>
7316
7317        Reviewed by Maciej Stachowiak.
7318
7319        REGRESSION (r50218-r50262): E*TRADE accounts page is missing content
7320        https://bugs.webkit.org/show_bug.cgi?id=30947
7321        <rdar://problem/7348833>
7322
7323        The logic for flagging that a structure has non-enumerable properties
7324        was in addPropertyWithoutTransition, rather than in the core Structure::put
7325        method.  Despite this I was unable to produce a testcase that caused
7326        the failure that etrade was experiencing, but the new assertion in
7327        getEnumerablePropertyNames triggers on numerous layout tests without
7328        the fix, so in effecti all for..in enumeration in any test ends up
7329        doing the required consistency check.
7330
7331        * runtime/Structure.cpp:
7332        (JSC::Structure::addPropertyWithoutTransition):
7333        (JSC::Structure::put):
7334        (JSC::Structure::getEnumerablePropertyNames):
7335        (JSC::Structure::checkConsistency):
7336
73372009-10-29  Gabor Loki  <loki@inf.u-szeged.hu>
7338
7339        Reviewed by Gavin Barraclough.
7340
7341        Add cacheFlush support for Thumb-2 on Linux
7342        https://bugs.webkit.org/show_bug.cgi?id=30865
7343
7344        * jit/ExecutableAllocator.h:
7345        (JSC::ExecutableAllocator::cacheFlush):
7346
73472009-10-28  Gavin Barraclough  <barraclough@apple.com>
7348
7349        Reviewed by Oliver Hunt.
7350
7351        JSC JIT on ARMv7 cannot link jumps >16Mb range
7352        https://bugs.webkit.org/show_bug.cgi?id=30891
7353
7354        Start planing all relative jumps as move-32-bit-immediate-to-register-BX.
7355        In the cases where the jump would fall within a relative jump range, use a relative jump.
7356
7357        * JavaScriptCore.xcodeproj/project.pbxproj:
7358        * assembler/ARMv7Assembler.h:
7359        (JSC::ARMv7Assembler::~ARMv7Assembler):
7360        (JSC::ARMv7Assembler::LinkRecord::LinkRecord):
7361        (JSC::ARMv7Assembler::):
7362        (JSC::ARMv7Assembler::executableCopy):
7363        (JSC::ARMv7Assembler::linkJump):
7364        (JSC::ARMv7Assembler::relinkJump):
7365        (JSC::ARMv7Assembler::setInt32):
7366        (JSC::ARMv7Assembler::isB):
7367        (JSC::ARMv7Assembler::isBX):
7368        (JSC::ARMv7Assembler::isMOV_imm_T3):
7369        (JSC::ARMv7Assembler::isMOVT):
7370        (JSC::ARMv7Assembler::isNOP_T1):
7371        (JSC::ARMv7Assembler::isNOP_T2):
7372        (JSC::ARMv7Assembler::linkJumpAbsolute):
7373        (JSC::ARMv7Assembler::twoWordOp5i6Imm4Reg4EncodedImmFirst):
7374        (JSC::ARMv7Assembler::twoWordOp5i6Imm4Reg4EncodedImmSecond):
7375        (JSC::ARMv7Assembler::ARMInstructionFormatter::twoWordOp5i6Imm4Reg4EncodedImm):
7376        * assembler/MacroAssemblerARMv7.h:
7377        (JSC::MacroAssemblerARMv7::makeJump):
7378        (JSC::MacroAssemblerARMv7::makeBranch):
7379        * jit/JIT.h:
7380        * wtf/Platform.h:
7381
73822009-10-28  Oliver Hunt  <oliver@apple.com>
7383
7384        Reviewed by Geoff Garen.
7385
7386        Improve for..in enumeration performance
7387        https://bugs.webkit.org/show_bug.cgi?id=30887
7388
7389        Improve indexing of an object with a for..in iterator by
7390        identifying cases where get_by_val is being used with a iterator
7391        as the subscript and replace it with a new get_by_pname
7392        bytecode.  get_by_pname then optimizes lookups that directly access
7393        the base object.
7394
7395        * bytecode/CodeBlock.cpp:
7396        (JSC::CodeBlock::dump):
7397        * bytecode/Opcode.h:
7398        * bytecompiler/BytecodeGenerator.cpp:
7399        (JSC::BytecodeGenerator::emitGetByVal):
7400        * bytecompiler/BytecodeGenerator.h:
7401        (JSC::BytecodeGenerator::pushOptimisedForIn):
7402        (JSC::BytecodeGenerator::popOptimisedForIn):
7403        * interpreter/Interpreter.cpp:
7404        (JSC::Interpreter::privateExecute):
7405        * jit/JIT.cpp:
7406        (JSC::JIT::privateCompileMainPass):
7407        (JSC::JIT::privateCompileSlowCases):
7408        * jit/JIT.h:
7409        * jit/JITPropertyAccess.cpp:
7410        (JSC::JIT::compileGetDirectOffset):
7411        (JSC::JIT::emit_op_get_by_pname):
7412        (JSC::JIT::emitSlow_op_get_by_pname):
7413        * parser/Nodes.cpp:
7414        (JSC::ForInNode::emitBytecode):
7415        * runtime/JSObject.h:
7416        * runtime/JSPropertyNameIterator.cpp:
7417        (JSC::JSPropertyNameIterator::create):
7418        * runtime/JSPropertyNameIterator.h:
7419        (JSC::JSPropertyNameIterator::getOffset):
7420        (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
7421        * runtime/JSValue.h:
7422        (JSC::JSValue::):
7423        * runtime/Structure.cpp:
7424        (JSC::Structure::addPropertyTransition):
7425        (JSC::Structure::changePrototypeTransition):
7426        (JSC::Structure::despecifyFunctionTransition):
7427        (JSC::Structure::addAnonymousSlotsTransition):
7428        (JSC::Structure::getterSetterTransition):
7429        (JSC::Structure::toDictionaryTransition):
7430        (JSC::Structure::addPropertyWithoutTransition):
7431          Track the existence (or not) of non-enumerable properties.
7432        * runtime/Structure.h:
7433        (JSC::Structure::propertyStorageCapacity):
7434        (JSC::Structure::propertyStorageSize):
7435        (JSC::Structure::hasNonEnumerableProperties):
7436        (JSC::Structure::hasAnonymousSlots):
7437
74382009-10-28  Dmitry Titov  <dimich@chromium.org>
7439
7440        Not reviewed, attemp to fix Windows build.
7441
7442        Touch the cpp file to cause recompile.
7443
7444        * wtf/Threading.cpp:
7445        (WTF::threadEntryPoint):
7446
74472009-10-28  Dmitry Titov  <dimich@chromium.org>
7448
7449        Reviewed by David Levin.
7450
7451        https://bugs.webkit.org/show_bug.cgi?id=30805
7452        Add MessageQueue::removeIf(Predicate&) to remove certain tasks without pulling them from the queue.
7453        Existing Database tests cover this since Database removes tasks when it is stopped.
7454
7455        * wtf/MessageQueue.h:
7456        (WTF::::removeIf):
7457
74582009-10-28  Afonso R. Costa Jr.  <afonso.costa@openbossa.org>
7459
7460        Reviewed by Oliver Hunt.
7461
7462        [Qt] Enable YARR when YARR_JIT is enabled
7463        https://bugs.webkit.org/show_bug.cgi?id=30730
7464
7465        When enabling or disabling JIT using JAVASCRIPTCORE_JIT, the ENABLE_YARR should
7466        be toggled also.
7467
7468        * JavaScriptCore.pri:
7469
74702009-10-24  Martin Robinson  <martin.james.robinson@gmail.com>
7471
7472        Reviewed by Oliver Hunt.
7473
7474        Fix strict aliasing warning by switching reinterpret_cast to bitwise_cast.
7475
7476        strict-aliasing warnings in JSFunction.h
7477        https://bugs.webkit.org/show_bug.cgi?id=27869
7478
7479        * runtime/JSFunction.h:
7480        (JSC::JSFunction::nativeFunction):
7481        (JSC::JSFunction::scopeChain):
7482        (JSC::JSFunction::setScopeChain):
7483        (JSC::JSFunction::setNativeFunction):
7484
74852009-10-28  Jan-Arve Sæther <jan-arve.saether@nokia.com>
7486
7487        Reviewed by Tor Arne Vestbø.
7488
7489        Build-fix for 64-bit Windows
7490
7491        * wtf/Platform.h: Make sure to use WTF_USE_JSVALUE64
7492
74932009-10-28  Gavin Barraclough  <barraclough@apple.com>
7494
7495        Reviewed by NOBODY (build fix!).
7496
7497        * jit/JIT.h:
7498
74992009-10-26  Holger Hans Peter Freyther  <zecke@selfish.org>
7500
7501        Rubber-stamped by Darin Adler.
7502
7503        Export fastMalloc, fastCalloc, fastRealloc and fastFree on GCC/Unix
7504        https://bugs.webkit.org/show_bug.cgi?id=30769
7505
7506        When using -fvisibility=hidden to hide all internal symbols by default
7507        the malloc symbols will be hidden as well. For memory instrumentation
7508        it is needed to provide an instrumented version of these symbols and
7509        override the normal routines and by changing the visibility back to
7510        default this becomes possible.
7511
7512        The only other solution would be to use system malloc instead of the
7513        TCmalloc implementation but this will not allow to analyze memory
7514        behavior with the default allocator.
7515
7516        * wtf/FastMalloc.h: Define WTF_FAST_MALLOC_EXPORT for GCC and !darwin
7517
75182009-10-27  Gavin Barraclough  <barraclough@apple.com>
7519
7520        Rubber Stamped by Samuel Q. Weinig.
7521
7522        Make the asserts protecting the offsets in the JIT more descriptive.
7523
7524        * jit/JIT.h:
7525        * jit/JITCall.cpp:
7526        (JSC::JIT::compileOpCall):
7527        * jit/JITPropertyAccess.cpp:
7528        (JSC::JIT::emit_op_method_check):
7529        (JSC::JIT::compileGetByIdHotPath):
7530        (JSC::JIT::compileGetByIdSlowCase):
7531        (JSC::JIT::emit_op_put_by_id):
7532
75332009-10-27  Geoffrey Garen  <ggaren@apple.com>
7534
7535        Reviewed by Sam Weinig.
7536
7537        A little bit of refactoring in the date code.
7538
7539        * JavaScriptCore.exp: Don't export this unused symbol.
7540
7541        * runtime/DateConstructor.cpp:
7542        (JSC::constructDate):
7543
7544        * runtime/DateInstance.cpp:
7545        (JSC::DateInstance::DateInstance):
7546        * runtime/DateInstance.h: Removed some unused functions. Changed the default
7547        constructor to ensure that a DateInstance is always initialized.
7548
7549        * runtime/DatePrototype.cpp:
7550        (JSC::DatePrototype::DatePrototype): Pass an initializer to our constructor,
7551        since it now requires one.
7552
7553        * wtf/DateMath.cpp:
7554        (WTF::msToGregorianDateTime): Only compute our offset from UTC if our
7555        output will require it. Otherwise, our offset is 0.
7556
75572009-10-27  Geoffrey Garen  <ggaren@apple.com>
7558
7559        Build fix: Mark DateInstaceCache.h private, so other frameworks can see it.
7560
7561        * JavaScriptCore.xcodeproj/project.pbxproj:
7562
75632009-10-27  Geoffrey Garen  <ggaren@apple.com>
7564
7565        Build fix: re-readded this file.
7566
7567        * runtime/DateInstanceCache.h: Added.
7568        (JSC::DateInstanceData::create):
7569        (JSC::DateInstanceData::DateInstanceData):
7570        (JSC::DateInstanceCache::DateInstanceCache):
7571        (JSC::DateInstanceCache::add):
7572        (JSC::DateInstanceCache::lookup):
7573
75742009-10-27  Geoffrey Garen  <ggaren@apple.com>
7575
7576        Reviewed by Darin Adler and Oliver Hunt.
7577
7578        https://bugs.webkit.org/show_bug.cgi?id=30800
7579        Cache recently computed date data.
7580
7581        SunSpider reports a ~0.5% speedup, mostly from date-format-tofte.js.
7582
7583        * GNUmakefile.am:
7584        * JavaScriptCore.gypi:
7585        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
7586        * JavaScriptCore.xcodeproj/project.pbxproj: Added new file.
7587
7588        * runtime/DateInstance.cpp:
7589        (JSC::DateInstance::DateInstance):
7590        (JSC::DateInstance::getGregorianDateTime): Use the shared cache.
7591
7592        * runtime/DateInstance.h: Renamed m_cache to m_data, to avoid the confusion
7593        of a "cache cache".
7594
7595        * runtime/DatePrototype.cpp:
7596        (JSC::formatLocaleDate):
7597        (JSC::dateProtoFuncToString):
7598        (JSC::dateProtoFuncToUTCString):
7599        (JSC::dateProtoFuncToISOString):
7600        (JSC::dateProtoFuncToDateString):
7601        (JSC::dateProtoFuncToTimeString):
7602        (JSC::dateProtoFuncGetFullYear):
7603        (JSC::dateProtoFuncGetUTCFullYear):
7604        (JSC::dateProtoFuncToGMTString):
7605        (JSC::dateProtoFuncGetMonth):
7606        (JSC::dateProtoFuncGetUTCMonth):
7607        (JSC::dateProtoFuncGetDate):
7608        (JSC::dateProtoFuncGetUTCDate):
7609        (JSC::dateProtoFuncGetDay):
7610        (JSC::dateProtoFuncGetUTCDay):
7611        (JSC::dateProtoFuncGetHours):
7612        (JSC::dateProtoFuncGetUTCHours):
7613        (JSC::dateProtoFuncGetMinutes):
7614        (JSC::dateProtoFuncGetUTCMinutes):
7615        (JSC::dateProtoFuncGetSeconds):
7616        (JSC::dateProtoFuncGetUTCSeconds):
7617        (JSC::dateProtoFuncGetTimezoneOffset):
7618        (JSC::setNewValueFromTimeArgs):
7619        (JSC::setNewValueFromDateArgs):
7620        (JSC::dateProtoFuncSetYear):
7621        (JSC::dateProtoFuncGetYear): Pass an ExecState to these functions, so they
7622        can access the DateInstanceCache.
7623
7624        * runtime/JSGlobalData.h: Keep a DateInstanceCache.
7625
76262009-10-27  James Robinson  <jamesr@chromium.org>
7627
7628        Reviewed by Darin Fisher.
7629
7630        Ensures that JavaScriptCore/wtf/CurrentTime.cpp is not built in PLATFORM(CHROMIUM) builds.
7631
7632        Chromium uses a different method to calculate the current time than is used in
7633        JavaScriptCore/wtf/CurrentTime.cpp. This can lead to time skew when calls to currentTime() and Chromium's time
7634        function are mixed.  In particular, timers can get scheduled in the past which leads to 100% CPU use.
7635        See http://code.google.com/p/chromium/issues/detail?id=25892 for an example.
7636
7637        https://bugs.webkit.org/show_bug.cgi?id=30833
7638
7639        * JavaScriptCore.gyp/JavaScriptCore.gyp:
7640        * wtf/CurrentTime.cpp:
7641
76422009-10-27  Peter Varga  <pvarga@inf.u-szeged.hu>
7643
7644        Rubber-stamped by Tor Arne Vestbø.
7645
7646        Fix typo in RegexInterpreter.cpp and RegexJIT.cpp alterantive to
7647        alternative.
7648
7649        * yarr/RegexInterpreter.cpp:
7650        (JSC::Yarr::ByteCompiler::alternativeBodyDisjunction):
7651        (JSC::Yarr::ByteCompiler::alternativeDisjunction):
7652        (JSC::Yarr::ByteCompiler::emitDisjunction):
7653        * yarr/RegexJIT.cpp:
7654        (JSC::Yarr::RegexGenerator::generateDisjunction):
7655
76562009-10-26  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
7657
7658        Reviewed by Darin Adler.
7659
7660        Make .rc files compile on Windows without depending on MFC headers
7661        https://bugs.webkit.org/show_bug.cgi?id=30750
7662
7663        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: Use
7664        winresrc.h because it exists even when MFC is not installed, and is
7665        all that's needed here.
7666
76672009-10-26  Gabor Loki  <loki@inf.u-szeged.hu>
7668
7669        Reviewed by Gavin Barraclough.
7670
7671        The thunkReturnAddress is on JITStackFrame on ARM JIT as well
7672        https://bugs.webkit.org/show_bug.cgi?id=30782
7673
7674        Move the thunkReturnAddress from top of the stack into the JITStackFrame
7675        structure. This is a requirement for JSValue32_64 support on ARM.
7676
7677        * assembler/MacroAssemblerARM.h:
7678        (JSC::MacroAssemblerARM::ret): Return with link register
7679        (JSC::MacroAssemblerARM::prepareCall): Store the return address in link register
7680        * jit/JIT.h: Remove unused ctiReturnRegister
7681        * jit/JITInlineMethods.h: Same as ARMv7
7682        (JSC::JIT::restoreArgumentReference): Ditto.
7683        (JSC::JIT::restoreArgumentReferenceForTrampoline): Ditto.
7684        * jit/JITOpcodes.cpp: Remove ctiReturnRegister related instruction
7685        * jit/JITStubs.cpp: Store thunkReturnAddress on JITStackFrame. Use
7686        small trampoline functions which handle return addresses for each
7687        CTI_STUB_FUNCTION.
7688        * jit/JITStubs.h: Store thunkReturnAddress on JITStackFrame
7689        (JSC::JITStackFrame::returnAddressSlot): Return with the address of thunkReturnAddress
7690        * yarr/RegexJIT.cpp:
7691        (JSC::Yarr::RegexGenerator::generateEnter): Remove the unnecessary instruction
7692
76932009-10-26  Steve Block  <steveblock@google.com>
7694
7695        Reviewed by Darin Adler.
7696
7697        Adds ability to disable ReadWriteLock on platforms (eg Android) that use pthreads but do not support pthread_rwlock.
7698        https://bugs.webkit.org/show_bug.cgi?id=30713
7699
7700        * wtf/Platform.h: Modified. Defines HAVE_PTHREAD_RWLOCK for all platforms currently using pthreads.
7701        * wtf/Threading.h: Modified. Use pthread_rwlock_t only when HAVE_PTHREAD_RWLOCK is defined.
7702        * wtf/ThreadingPthreads.cpp: Modified. Build ReadWriteLock methods only when HAVE_PTHREAD_RWLOCK is defined.
7703
77042009-10-24  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
7705
7706        Reviewed by Holger Freyther.
7707
7708        [Qt] [Symbian] Set the capability and memory required to run QtWebKit for Symbian
7709        https://bugs.webkit.org/show_bug.cgi?id=30476
7710
7711        Assign ReadUserData WriteUserData NetworkServices Symbian capabilities
7712        to jsc.exe.
7713
7714        * jsc.pro:
7715
77162009-10-23  Steve Block  <steveblock@google.com>
7717
7718        Reviewed by Dmitry Titov.
7719
7720        Fixes a leak in createThreadInternal on Android.
7721        https://bugs.webkit.org/show_bug.cgi?id=30698
7722
7723        * wtf/ThreadingPthreads.cpp: Modified.
7724        (WTF::createThreadInternal): Avoid leaking a ThreadData object on failure.
7725
77262009-10-22  Geoffrey Garen  <ggaren@apple.com>
7727
7728        Reviewed by Alexey Proskuryakov.
7729
7730        Fixed ASSERT when opening Safari's Caches window while the Web Inspector
7731        is open.
7732
7733        * runtime/Collector.cpp:
7734        (JSC::typeName): Added two new types to the type name list in the Collector.
7735        These types have been around for a while, but nobody remembered to consider them here.
7736
7737        * runtime/JSCell.h:
7738        (JSC::JSCell::isPropertyNameIterator):
7739        * runtime/JSPropertyNameIterator.h:
7740        (JSC::JSPropertyNameIterator::isPropertyNameIterator): Give the Collector
7741        a way to tell if a cell is a JSPropertyNameIterator.
7742
77432009-10-22  Steve Falkenburg  <sfalken@apple.com>
7744
7745        Reviewed by Jon Honeycutt.
7746
7747        https://bugs.webkit.org/show_bug.cgi?id=30686
7748        Remove debug-specific def file.
7749        Only Debug_All target uses JavaScriptCore_debug.dll naming, and since
7750        that target is only used internally, maintaining two files just to
7751        suppress a single link warning isn't worthwhile.
7752
7753        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
7754        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Removed.
7755
77562009-10-21  Jon Honeycutt  <jhoneycutt@apple.com>
7757
7758        <rdar://problem/7270320> Screenshots of off-screen plug-ins are blank
7759        <rdar://problem/7270314> After halting a transparent PluginView on
7760        Windows, the transparency is applied twice
7761
7762        Reviewed by Dan Bernstein.
7763
7764        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
7765        Export WTF::deleteOwnedPtr(HDC).
7766
7767        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
7768        Ditto.
7769
77702009-10-20  Geoffrey Garen  <ggaren@apple.com>
7771
7772        Windows build fix: updated variable name.
7773
7774        * runtime/DatePrototype.cpp:
7775        (JSC::formatLocaleDate):
7776
77772009-10-20  Geoffrey Garen  <ggaren@apple.com>
7778
7779        Reviewed by Mark Rowe.
7780
7781        * jit/JITOpcodes.cpp:
7782        (JSC::JIT::emit_op_next_pname): Slightly tweaked this #ifdef to match the
7783        size of a JSValue because m_jsStrings is an array of JSValues.
7784
77852009-10-20  Geoffrey Garen  <ggaren@apple.com>
7786
7787        Reviewed by Mark Rowe.
7788
7789        Fixed a 64-bit regression caused by the fix for
7790        https://bugs.webkit.org/show_bug.cgi?id=30570.
7791
7792        * jit/JITOpcodes.cpp:
7793        (JSC::JIT::emit_op_next_pname): Use TimesEight stepping on 64-bit, since
7794        64-bit pointers are eight bytes long.
7795
77962009-10-20  Geoffrey Garen  <ggaren@apple.com>
7797
7798        Reviewed by Sam Weinig.
7799
7800        Refactored DateInstance::msToGregorianDateTime so that a DateInstance's
7801        caller doesn't need to supply the DateInstance's own internal value to
7802        the DateInstance.
7803
7804        * runtime/DateInstance.cpp:
7805        (JSC::DateInstance::getGregorianDateTime): Renamed from "msToGregorianDateTime".
7806
7807        * runtime/DateInstance.h:
7808        * runtime/DatePrototype.cpp:
7809        (JSC::formatLocaleDate):
7810        (JSC::dateProtoFuncToString):
7811        (JSC::dateProtoFuncToUTCString):
7812        (JSC::dateProtoFuncToISOString):
7813        (JSC::dateProtoFuncToDateString):
7814        (JSC::dateProtoFuncToTimeString):
7815        (JSC::dateProtoFuncToLocaleString):
7816        (JSC::dateProtoFuncToLocaleDateString):
7817        (JSC::dateProtoFuncToLocaleTimeString):
7818        (JSC::dateProtoFuncGetTime):
7819        (JSC::dateProtoFuncGetFullYear):
7820        (JSC::dateProtoFuncGetUTCFullYear):
7821        (JSC::dateProtoFuncToGMTString):
7822        (JSC::dateProtoFuncGetMonth):
7823        (JSC::dateProtoFuncGetUTCMonth):
7824        (JSC::dateProtoFuncGetDate):
7825        (JSC::dateProtoFuncGetUTCDate):
7826        (JSC::dateProtoFuncGetDay):
7827        (JSC::dateProtoFuncGetUTCDay):
7828        (JSC::dateProtoFuncGetHours):
7829        (JSC::dateProtoFuncGetUTCHours):
7830        (JSC::dateProtoFuncGetMinutes):
7831        (JSC::dateProtoFuncGetUTCMinutes):
7832        (JSC::dateProtoFuncGetSeconds):
7833        (JSC::dateProtoFuncGetUTCSeconds):
7834        (JSC::dateProtoFuncGetTimezoneOffset):
7835        (JSC::setNewValueFromTimeArgs):
7836        (JSC::setNewValueFromDateArgs):
7837        (JSC::dateProtoFuncSetYear):
7838        (JSC::dateProtoFuncGetYear): Also renamed "utc" to "outputIsUTC", for clarity.
7839
78402009-10-20  Gabor Loki  <loki@inf.u-szeged.hu>
7841
7842        Reviewed by Geoffrey Garen.
7843
7844        The op_next_pname should use 4 bytes addressing mode in case of JSValue32
7845        https://bugs.webkit.org/show_bug.cgi?id=30570
7846
7847        * jit/JITOpcodes.cpp:
7848        (JSC::JIT::emit_op_next_pname):
7849
78502009-10-20  Gabor Loki  <loki@inf.u-szeged.hu>
7851
7852        Reviewed by Oliver Hunt.
7853
7854        Move OverridesMarkChildren flag from DatePrototype to its parent class
7855        https://bugs.webkit.org/show_bug.cgi?id=30372
7856
7857        * runtime/DateInstance.h:
7858        (JSC::DateInstance::createStructure):
7859        * runtime/DatePrototype.h:
7860
78612009-10-19  Geoffrey Garen  <ggaren@apple.com>
7862
7863        Reviewed by Oliver Hunt.
7864
7865        Tightened up some put_by_id_transition code generation.
7866        https://bugs.webkit.org/show_bug.cgi?id=30539
7867
7868        * jit/JIT.h:
7869        * jit/JITPropertyAccess.cpp:
7870        (JSC::JIT::testPrototype):
7871        (JSC::JIT::privateCompilePutByIdTransition): No need to do object type
7872        checks or read Structures and prototypes from objects: they're all known
7873        constants at compile time.
7874
78752009-10-19  Geoffrey Garen  <ggaren@apple.com>
7876
7877        Reviewed by Sam Weinig.
7878
7879        Added a private API for getting a global context from a context, for
7880        clients who want to preserve a context for a later callback.
7881
7882        * API/APICast.h:
7883        (toGlobalRef): Added an ASSERT, since this function is used more often
7884        than before.
7885
7886        * API/JSContextRef.cpp:
7887        * API/JSContextRefPrivate.h: Added. The new API.
7888
7889        * API/tests/testapi.c:
7890        (print_callAsFunction):
7891        (main): Test the new API.
7892
7893        * JavaScriptCore.exp:
7894        * JavaScriptCore.xcodeproj/project.pbxproj: Build and export the new API.
7895
78962009-10-17  Geoffrey Garen  <ggaren@apple.com>
7897
7898        Reviewed by Oliver Hunt.
7899
7900        Tightened up some instanceof code generation.
7901        https://bugs.webkit.org/show_bug.cgi?id=30488
7902
7903        * jit/JITOpcodes.cpp:
7904        (JSC::JIT::emit_op_instanceof):
7905        (JSC::JIT::emitSlow_op_instanceof): No need to do object type checks -
7906        cell type checks and ImplementsDefaultHasIntance checks implicitly
7907        supersede object type checks.
7908
79092009-10-18  Kwang Yul Seo  <skyul@company100.net>
7910
7911        Reviewed by Darin Adler.
7912
7913        Use _stricmp and _strnicmp instead of deprecated stricmp and strnicmp.
7914        https://bugs.webkit.org/show_bug.cgi?id=30474
7915
7916        stricmp and strnicmp are deprecated beginning in Visual
7917        C++ 2005. Use _stricmp and _strnicmp instead in StringExtras.h.
7918
7919        * wtf/StringExtras.h:
7920        (strncasecmp):
7921        (strcasecmp):
7922
79232009-10-16  Geoffrey Garen  <ggaren@apple.com>
7924
7925        Build fix: apparently we shouldn't export those symbols?
7926
7927        * JavaScriptCore.exp:
7928
79292009-10-16  Geoffrey Garen  <ggaren@apple.com>
7930
7931        Build fix: export some symbols.
7932
7933        * JavaScriptCore.exp:
7934
79352009-10-16  Oliver Hunt  <oliver@apple.com>
7936
7937        Reviewed by Gavin Barraclough.
7938
7939        structure typeinfo flags should be inherited.
7940        https://bugs.webkit.org/show_bug.cgi?id=30468
7941
7942        Add StructureFlag constant to the various JSC classes and use
7943        it for the TypeInfo construction.  This allows us to simply
7944        accumulate flags by basing each classes StructureInfo on its parents.
7945
7946        * API/JSCallbackConstructor.h:
7947        (JSC::JSCallbackConstructor::createStructure):
7948        * API/JSCallbackFunction.h:
7949        (JSC::JSCallbackFunction::createStructure):
7950        * API/JSCallbackObject.h:
7951        (JSC::JSCallbackObject::createStructure):
7952        * debugger/DebuggerActivation.h:
7953        (JSC::DebuggerActivation::createStructure):
7954        * runtime/Arguments.h:
7955        (JSC::Arguments::createStructure):
7956        * runtime/BooleanObject.h:
7957        (JSC::BooleanObject::createStructure):
7958        * runtime/DatePrototype.h:
7959        (JSC::DatePrototype::createStructure):
7960        * runtime/FunctionPrototype.h:
7961        (JSC::FunctionPrototype::createStructure):
7962        * runtime/GlobalEvalFunction.h:
7963        (JSC::GlobalEvalFunction::createStructure):
7964        * runtime/InternalFunction.h:
7965        (JSC::InternalFunction::createStructure):
7966        * runtime/JSActivation.h:
7967        (JSC::JSActivation::createStructure):
7968        * runtime/JSArray.h:
7969        (JSC::JSArray::createStructure):
7970        * runtime/JSByteArray.cpp:
7971        (JSC::JSByteArray::createStructure):
7972        * runtime/JSByteArray.h:
7973        * runtime/JSFunction.h:
7974        (JSC::JSFunction::createStructure):
7975        * runtime/JSGlobalObject.h:
7976        (JSC::JSGlobalObject::createStructure):
7977        * runtime/JSNotAnObject.h:
7978        (JSC::JSNotAnObject::createStructure):
7979        * runtime/JSONObject.h:
7980        (JSC::JSONObject::createStructure):
7981        * runtime/JSObject.h:
7982        (JSC::JSObject::createStructure):
7983        * runtime/JSStaticScopeObject.h:
7984        (JSC::JSStaticScopeObject::createStructure):
7985        * runtime/JSVariableObject.h:
7986        (JSC::JSVariableObject::createStructure):
7987        * runtime/JSWrapperObject.h:
7988        (JSC::JSWrapperObject::createStructure):
7989        * runtime/MathObject.h:
7990        (JSC::MathObject::createStructure):
7991        * runtime/NumberConstructor.h:
7992        (JSC::NumberConstructor::createStructure):
7993        * runtime/NumberObject.h:
7994        (JSC::NumberObject::createStructure):
7995        * runtime/RegExpConstructor.h:
7996        (JSC::RegExpConstructor::createStructure):
7997        * runtime/RegExpObject.h:
7998        (JSC::RegExpObject::createStructure):
7999        * runtime/StringObject.h:
8000        (JSC::StringObject::createStructure):
8001        * runtime/StringObjectThatMasqueradesAsUndefined.h:
8002        (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
8003
80042009-10-16  Geoffrey Garen  <ggaren@apple.com>
8005
8006        Reviewed by Oliver Hunt.
8007
8008        Fast for-in enumeration: Cache JSPropertyNameIterator; cache JSStrings
8009        in JSPropertyNameIterator; inline more code.
8010
8011        1.024x as fast on SunSpider (fasta: 1.43x as fast).
8012
8013        * bytecode/CodeBlock.cpp:
8014        (JSC::CodeBlock::dump):
8015        * bytecode/Opcode.h:
8016        * bytecompiler/BytecodeGenerator.cpp:
8017        (JSC::BytecodeGenerator::emitGetPropertyNames):
8018        (JSC::BytecodeGenerator::emitNextPropertyName):
8019        * bytecompiler/BytecodeGenerator.h: Added a few extra operands to
8020        op_get_pnames and op_next_pname so that we can track iteration state
8021        in the register file instead of in the JSPropertyNameIterator. (To be
8022        cacheable, the JSPropertyNameIterator must be stateless.)
8023
8024        * interpreter/Interpreter.cpp:
8025        (JSC::Interpreter::tryCachePutByID):
8026        (JSC::Interpreter::tryCacheGetByID): Updated for rename to
8027        "normalizePrototypeChain" and removal of "isCacheable".
8028
8029        (JSC::Interpreter::privateExecute): Updated for in-RegisterFile
8030        iteration state tracking.
8031
8032        * jit/JIT.cpp:
8033        (JSC::JIT::privateCompileMainPass):
8034        * jit/JIT.h:
8035        * jit/JITOpcodes.cpp:
8036        (JSC::JIT::emit_op_get_pnames): Updated for in-RegisterFile
8037        iteration state tracking.
8038
8039        (JSC::JIT::emit_op_next_pname): Inlined code generation for op_next_pname.
8040
8041        * jit/JITStubs.cpp:
8042        (JSC::JITThunks::tryCachePutByID):
8043        (JSC::JITThunks::tryCacheGetByID): Updated for rename to
8044        "normalizePrototypeChain" and removal of "isCacheable".
8045
8046        (JSC::DEFINE_STUB_FUNCTION):
8047        * jit/JITStubs.h:
8048        (JSC::): Added has_property and to_object stubs. Removed op_next_pname
8049        stub, since has_property is all we need anymore.
8050
8051        * parser/Nodes.cpp:
8052        (JSC::ForInNode::emitBytecode): Updated for in-RegisterFile
8053        iteration state tracking.
8054
8055        * runtime/JSCell.h:
8056        * runtime/JSObject.cpp:
8057        (JSC::JSObject::getPropertyNames): Don't do caching at this layer
8058        anymore, since we don't create a JSPropertyNameIterator at this layer.
8059
8060        * runtime/JSPropertyNameIterator.cpp:
8061        (JSC::JSPropertyNameIterator::create): Do do caching at this layer.
8062        (JSC::JSPropertyNameIterator::get):  Updated for in-RegisterFile
8063        iteration state tracking.
8064        (JSC::JSPropertyNameIterator::markChildren): Mark our JSStrings.
8065
8066        * runtime/JSPropertyNameIterator.h:
8067        (JSC::JSPropertyNameIterator::size):
8068        (JSC::JSPropertyNameIterator::setCachedStructure):
8069        (JSC::JSPropertyNameIterator::cachedStructure):
8070        (JSC::JSPropertyNameIterator::setCachedPrototypeChain):
8071        (JSC::JSPropertyNameIterator::cachedPrototypeChain):
8072        (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
8073        (JSC::Structure::setEnumerationCache): Don't store iteration state in
8074        a JSPropertyNameIterator. Do cache a JSPropertyNameIterator in a
8075        Structure.
8076
8077        * runtime/JSValue.h:
8078        (JSC::asCell):
8079        * runtime/MarkStack.h: Make those mischievous #include gods happy.
8080
8081        * runtime/ObjectConstructor.cpp:
8082
8083        * runtime/Operations.h:
8084        (JSC::normalizePrototypeChain): Renamed countPrototypeChainEntriesAndCheckForProxies
8085        to normalizePrototypeChain, since it changes dictionary prototypes to
8086        non-dictionary objects.
8087
8088        * runtime/PropertyNameArray.cpp:
8089        (JSC::PropertyNameArray::add):
8090        * runtime/PropertyNameArray.h:
8091        (JSC::PropertyNameArrayData::PropertyNameArrayData):
8092        (JSC::PropertyNameArray::data):
8093        (JSC::PropertyNameArray::size):
8094        (JSC::PropertyNameArray::begin):
8095        (JSC::PropertyNameArray::end): Simplified some code here to help with
8096        current and future refactoring.
8097
8098        * runtime/Protect.h:
8099        * runtime/Structure.cpp:
8100        (JSC::Structure::~Structure):
8101        (JSC::Structure::addPropertyWithoutTransition):
8102        (JSC::Structure::removePropertyWithoutTransition): No need to clear
8103        the enumeration cache with adding / removing properties without
8104        transition. It is an error to add / remove properties without transition
8105        once an object has been observed, and we can ASSERT to catch that.
8106
8107        * runtime/Structure.h:
8108        (JSC::Structure::enumerationCache): Changed the enumeration cache to
8109        hold a JSPropertyNameIterator.
8110
8111        * runtime/StructureChain.cpp:
8112        * runtime/StructureChain.h:
8113        (JSC::StructureChain::head): Removed StructureChain::isCacheable because
8114        it was wrong-headed in two ways: (1) It gave up when a prototype was a
8115        dictionary, but instead we want un-dictionary heavily accessed
8116        prototypes; (2) It folded a test for hasDefaultGetPropertyNames() into
8117        a generic test for "cacheable-ness", but hasDefaultGetPropertyNames()
8118        is only releavant to for-in caching.
8119
81202009-10-16  Steve Falkenburg  <sfalken@apple.com>
8121
8122        Reviewed by Adam Roben.
8123
8124        Add a Debug_All configuration to build entire stack as debug.
8125        Change Debug_Internal to:
8126        - stop using _debug suffix for all WebKit/Safari binaries
8127        - not use _debug as a DLL naming suffix
8128        - use non-debug C runtime lib.
8129
8130        * JavaScriptCore.vcproj/JavaScriptCore.make: Debug build in makefile should build Debug_All.
8131        * JavaScriptCore.vcproj/JavaScriptCore.sln: Add Debug_All configuration.
8132        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add Debug_All configuration.
8133        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Renamed single configuration from "Release" to "all".
8134        * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Add Debug_All configuration.
8135        * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add Debug_All configuration.
8136        * JavaScriptCore.vcproj/jsc/jsc.vcproj: Add Debug_All configuration.
8137        * JavaScriptCore.vcproj/testapi/testapi.vcproj: Add Debug_All configuration.
8138
81392009-10-16  Oliver Hunt  <oliver@apple.com>
8140
8141        Reviewed by Gavin Barraclough.
8142
8143        Make typeinfo flags default to false
8144        https://bugs.webkit.org/show_bug.cgi?id=30372
8145
8146        Last part -- replace HasDefaultGetPropertyNames with OverridesGetPropertyNames
8147        flag.
8148
8149        * API/JSCallbackConstructor.h:
8150        (JSC::JSCallbackConstructor::createStructure):
8151        * API/JSCallbackObject.h:
8152        (JSC::JSCallbackObject::createStructure):
8153        * debugger/DebuggerActivation.h:
8154        (JSC::DebuggerActivation::createStructure):
8155        * runtime/Arguments.h:
8156        (JSC::Arguments::createStructure):
8157        * runtime/BooleanObject.h:
8158        (JSC::BooleanObject::createStructure):
8159        * runtime/DatePrototype.h:
8160        (JSC::DatePrototype::createStructure):
8161        * runtime/FunctionPrototype.h:
8162        (JSC::FunctionPrototype::createStructure):
8163        * runtime/GlobalEvalFunction.h:
8164        (JSC::GlobalEvalFunction::createStructure):
8165        * runtime/JSAPIValueWrapper.h:
8166        (JSC::JSAPIValueWrapper::createStructure):
8167        * runtime/JSActivation.h:
8168        (JSC::JSActivation::createStructure):
8169        * runtime/JSArray.h:
8170        (JSC::JSArray::createStructure):
8171        * runtime/JSByteArray.cpp:
8172        (JSC::JSByteArray::createStructure):
8173        * runtime/JSFunction.h:
8174        (JSC::JSFunction::createStructure):
8175        * runtime/JSGlobalObject.h:
8176        (JSC::JSGlobalObject::createStructure):
8177        * runtime/JSNotAnObject.h:
8178        (JSC::JSNotAnObject::createStructure):
8179        * runtime/JSONObject.h:
8180        (JSC::JSONObject::createStructure):
8181        * runtime/JSObject.cpp:
8182        (JSC::JSObject::getPropertyNames):
8183        * runtime/JSObject.h:
8184        (JSC::JSObject::createStructure):
8185        * runtime/JSStaticScopeObject.h:
8186        (JSC::JSStaticScopeObject::createStructure):
8187        * runtime/JSTypeInfo.h:
8188        (JSC::TypeInfo::overridesGetPropertyNames):
8189        * runtime/JSVariableObject.h:
8190        (JSC::JSVariableObject::createStructure):
8191        * runtime/JSWrapperObject.h:
8192        (JSC::JSWrapperObject::createStructure):
8193        * runtime/MathObject.h:
8194        (JSC::MathObject::createStructure):
8195        * runtime/NumberConstructor.h:
8196        (JSC::NumberConstructor::createStructure):
8197        * runtime/NumberObject.h:
8198        (JSC::NumberObject::createStructure):
8199        * runtime/RegExpConstructor.h:
8200        (JSC::RegExpConstructor::createStructure):
8201        * runtime/RegExpObject.h:
8202        (JSC::RegExpObject::createStructure):
8203        * runtime/StringObject.h:
8204        (JSC::StringObject::createStructure):
8205        * runtime/StringObjectThatMasqueradesAsUndefined.h:
8206        (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
8207        * runtime/StructureChain.cpp:
8208        (JSC::StructureChain::isCacheable):
8209
82102009-10-16  Kevin Ollivier  <kevino@theolliviers.com>
8211
8212        wxMSW build fix, we can't use the simple hash there because the PlatformModuleVersion
8213        structure differs.
8214
8215        * wtf/Platform.h:
8216
82172009-10-16  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
8218
8219        Reviewed by Simon Hausmann.
8220
8221        [Qt] Implement ExecutableAllocator for Symbian
8222        https://bugs.webkit.org/show_bug.cgi?id=29946
8223
8224        Tested with YARR JIT enabled for Symbian;
8225        This patch does not (yet) enable YARR JIT by default.
8226
8227        * JavaScriptCore.pri:
8228        * jit/ExecutableAllocator.h:
8229        * jit/ExecutableAllocatorSymbian.cpp: Added.
8230        (JSC::ExecutableAllocator::intializePageSize):
8231        (JSC::ExecutablePool::systemAlloc):
8232        (JSC::ExecutablePool::systemRelease):
8233
82342009-10-15  Oliver Hunt  <oliver@apple.com>
8235
8236        Reviewed by Darin Adler.
8237
8238        Make typeinfo flags default to false
8239        https://bugs.webkit.org/show_bug.cgi?id=30372
8240
8241        Part 2 -- Reverse the TypeInfo HasDefaultMark flag to OverridesMarkChildren, etc
8242
8243        * API/JSCallbackConstructor.h:
8244        (JSC::JSCallbackConstructor::createStructure):
8245        * API/JSCallbackFunction.h:
8246        (JSC::JSCallbackFunction::createStructure):
8247        * API/JSCallbackObject.h:
8248        (JSC::JSCallbackObject::createStructure):
8249        * debugger/DebuggerActivation.h:
8250        (JSC::DebuggerActivation::createStructure):
8251        * runtime/Arguments.h:
8252        (JSC::Arguments::createStructure):
8253        * runtime/BooleanObject.h:
8254        (JSC::BooleanObject::createStructure):
8255        * runtime/DatePrototype.h:
8256        (JSC::DatePrototype::createStructure):
8257        * runtime/FunctionPrototype.h:
8258        (JSC::FunctionPrototype::createStructure):
8259        * runtime/GetterSetter.h:
8260        (JSC::GetterSetter::createStructure):
8261        * runtime/GlobalEvalFunction.h:
8262        (JSC::GlobalEvalFunction::createStructure):
8263        * runtime/InternalFunction.h:
8264        (JSC::InternalFunction::createStructure):
8265        * runtime/JSAPIValueWrapper.h:
8266        (JSC::JSAPIValueWrapper::createStructure):
8267        * runtime/JSActivation.h:
8268        (JSC::JSActivation::createStructure):
8269        * runtime/JSArray.h:
8270        (JSC::JSArray::createStructure):
8271        (JSC::MarkStack::markChildren):
8272        * runtime/JSByteArray.cpp:
8273        (JSC::JSByteArray::createStructure):
8274        * runtime/JSFunction.h:
8275        (JSC::JSFunction::createStructure):
8276        * runtime/JSGlobalObject.h:
8277        (JSC::JSGlobalObject::createStructure):
8278        * runtime/JSNotAnObject.h:
8279        (JSC::JSNotAnObject::createStructure):
8280        * runtime/JSNumberCell.h:
8281        (JSC::JSNumberCell::createStructure):
8282        * runtime/JSONObject.h:
8283        (JSC::JSONObject::createStructure):
8284        * runtime/JSObject.h:
8285        (JSC::JSObject::createStructure):
8286        * runtime/JSPropertyNameIterator.h:
8287        (JSC::JSPropertyNameIterator::createStructure):
8288        * runtime/JSStaticScopeObject.h:
8289        (JSC::JSStaticScopeObject::createStructure):
8290        * runtime/JSString.h:
8291        (JSC::JSString::createStructure):
8292        * runtime/JSTypeInfo.h:
8293        (JSC::TypeInfo::overridesMarkChildren):
8294        * runtime/JSVariableObject.h:
8295        (JSC::JSVariableObject::createStructure):
8296        * runtime/JSWrapperObject.h:
8297        (JSC::JSWrapperObject::createStructure):
8298        * runtime/MathObject.h:
8299        (JSC::MathObject::createStructure):
8300        * runtime/NumberConstructor.h:
8301        (JSC::NumberConstructor::createStructure):
8302        * runtime/NumberObject.h:
8303        (JSC::NumberObject::createStructure):
8304        * runtime/RegExpConstructor.h:
8305        (JSC::RegExpConstructor::createStructure):
8306        * runtime/RegExpObject.h:
8307        (JSC::RegExpObject::createStructure):
8308        * runtime/StringObject.h:
8309        (JSC::StringObject::createStructure):
8310        * runtime/StringObjectThatMasqueradesAsUndefined.h:
8311        (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
8312
83132009-10-14  Oliver Hunt  <oliver@apple.com>
8314
8315        Reviewed by Geoff Garen.
8316
8317        Make typeinfo flags default to false
8318        https://bugs.webkit.org/show_bug.cgi?id=30372
8319
8320        Part 1. Reverse the HasStandardGetOwnPropertySlot flag.
8321
8322        * API/JSCallbackConstructor.h:
8323        (JSC::JSCallbackConstructor::createStructure):
8324        * API/JSCallbackFunction.h:
8325        (JSC::JSCallbackFunction::createStructure):
8326        * API/JSCallbackObject.h:
8327        (JSC::JSCallbackObject::createStructure):
8328        * debugger/DebuggerActivation.h:
8329        (JSC::DebuggerActivation::createStructure):
8330        * jit/JITStubs.cpp:
8331        (JSC::DEFINE_STUB_FUNCTION):
8332        * runtime/Arguments.h:
8333        (JSC::Arguments::createStructure):
8334        * runtime/BooleanObject.h:
8335        (JSC::BooleanObject::createStructure):
8336        * runtime/DatePrototype.h:
8337        (JSC::DatePrototype::createStructure):
8338        * runtime/FunctionPrototype.h:
8339        (JSC::FunctionPrototype::createStructure):
8340        * runtime/GlobalEvalFunction.h:
8341        (JSC::GlobalEvalFunction::createStructure):
8342        * runtime/InternalFunction.h:
8343        (JSC::InternalFunction::createStructure):
8344        * runtime/JSActivation.h:
8345        (JSC::JSActivation::createStructure):
8346        * runtime/JSArray.h:
8347        (JSC::JSArray::createStructure):
8348        * runtime/JSByteArray.cpp:
8349        (JSC::JSByteArray::createStructure):
8350        * runtime/JSFunction.h:
8351        (JSC::JSFunction::createStructure):
8352        * runtime/JSGlobalObject.h:
8353        (JSC::JSGlobalObject::createStructure):
8354        * runtime/JSNumberCell.h:
8355        (JSC::JSNumberCell::createStructure):
8356        * runtime/JSONObject.h:
8357        (JSC::JSONObject::createStructure):
8358        * runtime/JSObject.h:
8359        (JSC::JSObject::createStructure):
8360        (JSC::JSCell::fastGetOwnPropertySlot):
8361        * runtime/JSStaticScopeObject.h:
8362        (JSC::JSStaticScopeObject::createStructure):
8363        * runtime/JSString.h:
8364        (JSC::JSString::createStructure):
8365        * runtime/JSTypeInfo.h:
8366        (JSC::TypeInfo::overridesGetOwnPropertySlot):
8367        * runtime/JSVariableObject.h:
8368        (JSC::JSVariableObject::createStructure):
8369        * runtime/JSWrapperObject.h:
8370        (JSC::JSWrapperObject::createStructure):
8371        * runtime/MathObject.h:
8372        (JSC::MathObject::createStructure):
8373        * runtime/NumberConstructor.h:
8374        (JSC::NumberConstructor::createStructure):
8375        * runtime/NumberObject.h:
8376        (JSC::NumberObject::createStructure):
8377        * runtime/RegExpConstructor.h:
8378        (JSC::RegExpConstructor::createStructure):
8379        * runtime/RegExpObject.h:
8380        (JSC::RegExpObject::createStructure):
8381        * runtime/StringObject.h:
8382        (JSC::StringObject::createStructure):
8383        * runtime/StringObjectThatMasqueradesAsUndefined.h:
8384        (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
8385
83862009-10-14  Kevin Ollivier  <kevino@theolliviers.com>
83872009-10-14  Darin Adler  <darin@apple.com>
8388
8389        Additions so fix for https://bugs.webkit.org/show_bug.cgi?id=18994
8390        can build on Windows.
8391
8392        * wtf/MathExtras.h: Added llround and llroundf for Windows.
8393
83942009-10-14  Kevin Ollivier  <kevino@theolliviers.com>
8395
8396        wx build fix. Set ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH for plugins while we're still building stubs.
8397
8398        * wtf/Platform.h:
8399
84002009-10-13  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
8401
8402        Reviewed by Simon Hausmann.
8403
8404        Refactor ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH
8405        https://bugs.webkit.org/show_bug.cgi?id=30278
8406
8407        Move the definition of ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH
8408        from the make system into common code.
8409
8410        * wtf/Platform.h:
8411
84122009-10-13  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
8413
8414        Reviewed by Darin Adler.
8415
8416        ARM compiler does not understand reinterpret_cast<void*>
8417        https://bugs.webkit.org/show_bug.cgi?id=29034
8418
8419        Change reinterpret_cast<void*> to regular C style (void*) cast
8420        for the ARM RVCT compiler.
8421
8422        * assembler/MacroAssemblerCodeRef.h:
8423        (JSC::FunctionPtr::FunctionPtr):
8424        * jit/JITOpcodes.cpp: Cast to FunctionPtr first
8425           instead of directly casting to reinterpret_cast
8426        * jit/JITStubCall.h: Ditto + change the type of m_stub
8427          from void* to FunctionPtr.
8428        (JSC::JITStubCall::JITStubCall):
8429        (JSC::JITStubCall::call):
8430        * jit/JITStubs.cpp: Ditto.
8431        (JSC::DEFINE_STUB_FUNCTION(EncodedJSValue, op_throw)):
8432
84332009-10-11  Oliver Hunt  <oliver@apple.com>
8434
8435        Re-enable the JIT.
8436
8437        * wtf/Platform.h:
8438
84392009-10-10  Oliver Hunt  <oliver@apple.com>
8440
8441        Reviewed by Maciej Stachowiak.
8442
8443        Support for String.trim(), String.trimLeft() and String.trimRight() methods
8444        https://bugs.webkit.org/show_bug.cgi?id=26590
8445
8446        Implement trim, trimLeft, and trimRight
8447
8448        * runtime/StringPrototype.cpp:
8449        (JSC::isTrimWhitespace):
8450           Our normal string whitespace function does not include U+200B which
8451           is needed for compatibility with mozilla's implementation of trim.
8452           U+200B does not appear to be expected according to spec, however I am
8453           choosing to be lax, and match mozilla behavior so have added this
8454           exception.
8455        (JSC::trimString):
8456
84572009-10-09  Geoffrey Garen  <ggaren@apple.com>
8458
8459        Reviewed by Oliver Hunt.
8460
8461        Eliminated some legacy bytecode weirdness.
8462
8463        Use vPC[x] subscripting instead of ++vPC to access instruction operands.
8464        This is simpler, and often more efficient.
8465
8466        To support this, and to remove use of hard-coded offsets in bytecode and
8467        JIT code generation and dumping, calculate jump offsets from the beginning
8468        of an instruction, rather than the middle or end.
8469
8470        Also, use OPCODE_LENGTH instead of hard-coded constants for the sizes of
8471        opcodes.
8472
8473        SunSpider reports no change in JIT mode, and a 1.01x speedup in Interpreter
8474        mode.
8475
8476        * bytecode/CodeBlock.cpp:
8477        (JSC::printConditionalJump):
8478        (JSC::CodeBlock::dump):
8479        * bytecompiler/BytecodeGenerator.cpp:
8480        (JSC::BytecodeGenerator::emitJump):
8481        (JSC::BytecodeGenerator::emitJumpIfTrue):
8482        (JSC::BytecodeGenerator::emitJumpIfFalse):
8483        (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
8484        (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
8485        (JSC::BytecodeGenerator::emitComplexJumpScopes):
8486        (JSC::BytecodeGenerator::emitJumpScopes):
8487        (JSC::BytecodeGenerator::emitNextPropertyName):
8488        (JSC::BytecodeGenerator::emitCatch):
8489        (JSC::BytecodeGenerator::emitJumpSubroutine):
8490        (JSC::prepareJumpTableForImmediateSwitch):
8491        (JSC::prepareJumpTableForCharacterSwitch):
8492        (JSC::prepareJumpTableForStringSwitch):
8493        (JSC::BytecodeGenerator::endSwitch):
8494        * bytecompiler/Label.h:
8495        (JSC::Label::setLocation):
8496        (JSC::Label::bind):
8497        * interpreter/Interpreter.cpp:
8498        (JSC::Interpreter::resolve):
8499        (JSC::Interpreter::resolveSkip):
8500        (JSC::Interpreter::resolveGlobal):
8501        (JSC::Interpreter::resolveBase):
8502        (JSC::Interpreter::resolveBaseAndProperty):
8503        (JSC::Interpreter::createExceptionScope):
8504        (JSC::Interpreter::privateExecute):
8505        * interpreter/Interpreter.h:
8506        * jit/JIT.cpp:
8507        (JSC::JIT::privateCompile):
8508        * jit/JITArithmetic.cpp:
8509        (JSC::JIT::emit_op_jnless):
8510        (JSC::JIT::emitSlow_op_jnless):
8511        (JSC::JIT::emit_op_jnlesseq):
8512        (JSC::JIT::emitSlow_op_jnlesseq):
8513        (JSC::JIT::emitBinaryDoubleOp):
8514        * jit/JITOpcodes.cpp:
8515        (JSC::JIT::emit_op_jmp):
8516        (JSC::JIT::emit_op_loop):
8517        (JSC::JIT::emit_op_loop_if_less):
8518        (JSC::JIT::emitSlow_op_loop_if_less):
8519        (JSC::JIT::emit_op_loop_if_lesseq):
8520        (JSC::JIT::emitSlow_op_loop_if_lesseq):
8521        (JSC::JIT::emit_op_loop_if_true):
8522        (JSC::JIT::emitSlow_op_loop_if_true):
8523        (JSC::JIT::emit_op_jfalse):
8524        (JSC::JIT::emitSlow_op_jfalse):
8525        (JSC::JIT::emit_op_jtrue):
8526        (JSC::JIT::emitSlow_op_jtrue):
8527        (JSC::JIT::emit_op_jeq_null):
8528        (JSC::JIT::emit_op_jneq_null):
8529        (JSC::JIT::emit_op_jneq_ptr):
8530        (JSC::JIT::emit_op_jsr):
8531        (JSC::JIT::emit_op_next_pname):
8532        (JSC::JIT::emit_op_jmp_scopes):
8533
85342009-10-09  Geoffrey Garen  <ggaren@apple.com>
8535
8536        Reviewed by Sam Weinig.
8537
8538        Migrated some code that didn't belong out of Structure.
8539
8540        SunSpider says maybe 1.03x faster.
8541
8542        * runtime/JSCell.h: Nixed Structure::markAggregate, and made marking of
8543        a Structure's prototype the direct responsility of the object using it.
8544        (Giving Structure a mark function was misleading because it implied that
8545        all live structures get marked during GC, when they don't.)
8546
8547        * runtime/JSGlobalObject.cpp:
8548        (JSC::markIfNeeded):
8549        (JSC::JSGlobalObject::markChildren): Added code to mark prototypes stored
8550        on the global object. Maybe this wasn't necessary, but now we don't have
8551        to wonder.
8552
8553        * runtime/JSObject.cpp:
8554        (JSC::JSObject::getPropertyNames):
8555        (JSC::JSObject::getOwnPropertyNames):
8556        (JSC::JSObject::getEnumerableNamesFromClassInfoTable):
8557        * runtime/JSObject.h:
8558        (JSC::JSObject::markChildrenDirect):
8559        * runtime/PropertyNameArray.h:
8560        * runtime/Structure.cpp:
8561        * runtime/Structure.h:
8562        (JSC::Structure::setEnumerationCache):
8563        (JSC::Structure::enumerationCache): Moved property name gathering code
8564        from Structure to JSObject because having a Structure iterate its JSObject
8565        was a layering violation. A JSObject is implemented using a Structure; not
8566        the other way around.
8567
85682009-10-09  Mark Rowe  <mrowe@apple.com>
8569
8570        Attempt to fix the GTK release build.
8571
8572        * GNUmakefile.am: Include Grammar.cpp in release builds now that
8573        AllInOneFile.cpp is gone.
8574
85752009-10-09  Gabor Loki  <loki@inf.u-szeged.hu>
8576
8577        Rubber-stamped by Eric Seidel.
8578
8579        Add ARM JIT support for Gtk port (disabled by default)
8580        https://bugs.webkit.org/show_bug.cgi?id=30228
8581
8582        * GNUmakefile.am:
8583
85842009-10-08  Geoffrey Garen  <ggaren@apple.com>
8585
8586        Tiger build fix: added a few more variable initializations.
8587
8588        * runtime/StringPrototype.cpp:
8589        (JSC::stringProtoFuncReplace):
8590        (JSC::stringProtoFuncSearch):
8591
85922009-10-08  Geoffrey Garen  <ggaren@apple.com>
8593
8594        Qt build fix: added missing #include.
8595
8596        * jsc.cpp:
8597
85982009-10-08  Geoffrey Garen  <ggaren@apple.com>
8599
8600        Tiger build fix: initialize variable whose initialization the compiler
8601        can't otherwise figure out.
8602
8603        * runtime/RegExpObject.cpp:
8604        (JSC::RegExpObject::match):
8605
86062009-10-08  Geoffrey Garen  <ggaren@apple.com>
8607
8608        Windows build fix: updated exports.
8609
8610        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
8611        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
8612
86132009-10-08  Geoffrey Garen  <ggaren@apple.com>
8614
8615        Tiger build fix: fixed file name case.
8616
8617        * JavaScriptCore.xcodeproj/project.pbxproj:
8618
86192009-10-08  Geoffrey Garen  <ggaren@apple.com>
8620
8621        Reviewed by Maciej Stachowiak.
8622
8623        At long last, I pronounce the death of AllInOneFile.cpp.
8624
8625        SunSpider reports a 1.01x speedup.
8626
8627        * AllInOneFile.cpp: Removed.
8628        * GNUmakefile.am:
8629        * JavaScriptCore.exp:
8630        * JavaScriptCore.gypi:
8631        * JavaScriptCore.xcodeproj/project.pbxproj: Added missing project files
8632        to compilation stages.
8633
8634        * parser/Grammar.y:
8635        * parser/Lexer.cpp:
8636        * parser/Lexer.h:
8637        (JSC::jscyylex):
8638        * runtime/ArrayConstructor.cpp:
8639        (JSC::constructArrayWithSizeQuirk):
8640        * runtime/Collector.h:
8641        * runtime/JSCell.cpp:
8642        (JSC::JSCell::operator new):
8643        * runtime/JSCell.h:
8644        (JSC::JSCell::operator new):
8645        * runtime/JSGlobalObject.cpp:
8646        (JSC::JSGlobalObject::operator new):
8647        * runtime/JSNumberCell.h:
8648        (JSC::JSNumberCell::operator new):
8649        * runtime/JSString.cpp:
8650        * runtime/JSString.h:
8651        (JSC::jsString):
8652        (JSC::jsSubstring):
8653        (JSC::jsOwnedString):
8654        * runtime/RegExpConstructor.cpp:
8655        * runtime/RegExpConstructor.h:
8656        (JSC::RegExpConstructorPrivate::RegExpConstructorPrivate):
8657        (JSC::RegExpConstructorPrivate::lastOvector):
8658        (JSC::RegExpConstructorPrivate::tempOvector):
8659        (JSC::RegExpConstructorPrivate::changeLastOvector):
8660        (JSC::RegExpConstructor::performMatch):
8661        * runtime/StringPrototype.cpp:
8662        (JSC::stringProtoFuncMatch):
8663        * yarr/RegexJIT.cpp:
8664        * yarr/RegexJIT.h:
8665        (JSC::Yarr::executeRegex): Inlined a few things that Shark said
8666        were hot, on the presumption that AllInOneFile.cpp used to inline them
8667        automatically.
8668
86692009-10-08  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
8670
8671        Reviewed by Gavin Barraclough.
8672
8673        Fix for JIT'ed op_call instructions (evals, constructs, etc.)
8674        when !ENABLE(JIT_OPTIMIZE_CALL) && USE(JSVALUE32_64)
8675
8676        https://bugs.webkit.org/show_bug.cgi?id=30201
8677
8678        * jit/JITCall.cpp:
8679        (JSC::JIT::compileOpCall):
8680
86812009-10-07  Geoffrey Garen  <ggaren@apple.com>
8682
8683        Windows build fix: removed no longer exported symbol.
8684
8685        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
8686        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
8687
86882009-10-07  Geoffrey Garen  <ggaren@apple.com>
8689
8690        Reviewed by Oliver Hunt.
8691
8692        Fixed <rdar://problem/5751979> Database code takes JSLock on secondary
8693        thread, permanently slowing down JavaScript
8694
8695        Removed the optional lock from Heap::protect, Heap::unprotect, and friends,
8696        since WebCore no longer uses it.
8697
8698        * JavaScriptCore.exp:
8699        * runtime/Collector.cpp:
8700        (JSC::Heap::protect):
8701        (JSC::Heap::unprotect):
8702        (JSC::Heap::markProtectedObjects):
8703        (JSC::Heap::protectedGlobalObjectCount):
8704        (JSC::Heap::protectedObjectCount):
8705        (JSC::Heap::protectedObjectTypeCounts):
8706        * runtime/Collector.h:
8707
87082009-10-07  Zoltan Horvath  <zoltan@webkit.org>
8709
8710        Reviewed by Darin Adler.
8711
8712        Allow custom memory allocation control for JavaScriptCore's IdentifierArena
8713        https://bugs.webkit.org/show_bug.cgi?id=30158
8714
8715        Inherits IdentifierArena class from FastAllocBase because it has been
8716        instantiated by 'new' in JavaScriptCore/parser/ParserArena.cpp:36.
8717
8718        * parser/ParserArena.h:
8719
87202009-10-07  Adam Roben  <aroben@apple.com>
8721
8722        Export DateInstance::info in a way that works on Windows
8723
8724        Fixes <http://webkit.org/b/30171>
8725        fast/dom/Window/window-postmessage-clone.html fails on Windows
8726
8727        Reviewed by Anders Carlsson.
8728
8729        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
8730        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
8731        Removed the export of DateInstance::info from here.
8732
8733        * runtime/DateInstance.h: Use JS_EXPORTDATA to export
8734        DateInstance::info, which is the required way of exporting data on
8735        Windows.
8736
87372009-10-07  Jørgen Lind  <jorgen.lind@nokia.com>
8738
8739        Reviewed by Simon Hausmann.
8740
8741        When enabling or disabling the JIT through .qmake.cache, make sure
8742        to also toggle ENABLE_YARR_JIT.
8743
8744        * JavaScriptCore.pri:
8745
87462009-10-06  Priit Laes  <plaes@plaes.org>
8747
8748        Reviewed by Gavin Barraclough.
8749
8750        Linking fails with "relocation R_X86_64_PC32 against symbol
8751        `cti_vm_throw'"
8752        https://bugs.webkit.org/show_bug.cgi?id=28422
8753
8754        * jit/JITStubs.cpp:
8755        Mark cti_vm_throw symbol as PLT-indirect symbol, so it doesn't end up
8756        in text segment causing relocation errors on amd64 architecture.
8757        Introduced new define SYMBOL_STRING_RELOCATION for such symbols.
8758
87592009-10-06  Oliver Hunt  <oliver@apple.com>
8760
8761        Windows linking fix
8762
8763        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
8764        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
8765
87662009-10-06  Oliver Hunt  <oliver@apple.com>
8767
8768        Reviewed by NOBODY (build fix).
8769
8770        Windows build fix.
8771
8772        * runtime/DateInstance.cpp:
8773
87742009-10-05  Oliver Hunt  <oliver@apple.com>
8775
8776        Reviewed by Gavin Barraclough.
8777
8778        It should be possible to post (clone) built-in JS objects to Workers
8779        https://bugs.webkit.org/show_bug.cgi?id=22878
8780
8781        Expose helpers to throw correct exceptions during object graph walk
8782        used for cloning and add a helper function to create Date instances
8783        without going through the JS Date constructor function.
8784
8785        * JavaScriptCore.exp:
8786        * JavaScriptCore.xcodeproj/project.pbxproj:
8787        * runtime/DateInstance.cpp:
8788        (JSC::DateInstance::DateInstance):
8789        * runtime/DateInstance.h:
8790        * runtime/ExceptionHelpers.cpp:
8791        (JSC::createTypeError):
8792        * runtime/ExceptionHelpers.h:
8793
87942009-10-06  David Levin  <levin@chromium.org>
8795
8796        Reviewed by Oliver Hunt.
8797
8798        StringImpl needs a method to get an instance for another thread which doesn't copy the underlying buffer.
8799        https://bugs.webkit.org/show_bug.cgi?id=30095
8800
8801        * wtf/CrossThreadRefCounted.h:
8802        Removed an unused function and assert improvement.
8803        (WTF::CrossThreadRefCounted::isOwnedByCurrentThread): Moved out common code from asserts.
8804        (WTF::CrossThreadRefCounted::ref): Changed assert to use the common method.
8805        (WTF::CrossThreadRefCounted::deref): Changed assert to use the common method.
8806        (WTF::CrossThreadRefCounted::crossThreadCopy): Since this includes a potentially
8807        non-threadsafe operation, add an assert that the class is owned by the current thread.
8808
88092009-10-05  Kevin Ollivier  <kevino@theolliviers.com>
8810
8811        wx build fix. Add Symbian files to the list of excludes.
8812
8813        * wscript:
8814
88152009-10-05  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
8816
8817        Reviewed by Simon Hausmann.
8818
8819        [Qt] Remove precompiled header from JavaScriptCore compilation to
8820        prevent qmake warning during autonomous compilation.
8821        https://bugs.webkit.org/show_bug.cgi?id=30069
8822
8823        * JavaScriptCore.pro:
8824
88252009-10-02  Geoffrey Garen  <ggaren@apple.com>
8826
8827        Reviewed by Sam Weinig.
8828
8829        Removed the concept of a "fast access cutoff" in arrays, because it
8830        punished some patterns of array access too much, and made things too
8831        complex for inlining in some cases.
8832
8833        1.3% speedup on SunSpider.
8834
8835        * jit/JITOpcodes.cpp:
8836        (JSC::JIT::emitSlow_op_get_by_val):
8837        (JSC::JIT::emitSlow_op_put_by_val):
8838        * jit/JITPropertyAccess.cpp:
8839        (JSC::JIT::emit_op_get_by_val):
8840        (JSC::JIT::emitSlow_op_get_by_val):
8841        (JSC::JIT::emit_op_put_by_val):
8842        (JSC::JIT::emitSlow_op_put_by_val):
8843        * jit/JITStubs.cpp:
8844        * jit/JITStubs.h:
8845        (JSC::): Check m_vectorLength instead of m_fastAccessCutoff when
8846        getting / putting from / to an array. Inline putting past the end of
8847        the array.
8848
8849        * runtime/JSArray.cpp:
8850        (JSC::JSArray::JSArray):
8851        (JSC::JSArray::getOwnPropertySlot):
8852        (JSC::JSArray::getOwnPropertyDescriptor):
8853        (JSC::JSArray::put):
8854        (JSC::JSArray::putSlowCase):
8855        (JSC::JSArray::deleteProperty):
8856        (JSC::JSArray::getOwnPropertyNames):
8857        (JSC::JSArray::increaseVectorLength):
8858        (JSC::JSArray::setLength):
8859        (JSC::JSArray::pop):
8860        (JSC::JSArray::push):
8861        (JSC::JSArray::sort):
8862        (JSC::JSArray::fillArgList):
8863        (JSC::JSArray::copyToRegisters):
8864        (JSC::JSArray::compactForSorting):
8865        (JSC::JSArray::checkConsistency):
8866        * runtime/JSArray.h:
8867        (JSC::JSArray::canGetIndex):
8868        (JSC::JSArray::canSetIndex):
8869        (JSC::JSArray::setIndex):
8870        (JSC::JSArray::markChildrenDirect): Removed m_fastAccessCutoff, and
8871        replaced with checks for JSValue() to detect reads and writes from / to
8872        uninitialized parts of the array.
8873
88742009-10-02  Jonni Rainisto  <jonni.rainisto@nokia.com>
8875
8876        Reviewed by Darin Adler.
8877
8878        Math.random() gives too low values on Win32 when _CRT_RAND_S is not defined
8879        https://bugs.webkit.org/show_bug.cgi?id=29956
8880
8881        * wtf/RandomNumber.cpp:
8882        (WTF::randomNumber): Added PLATFORM(WIN_OS) to handle 15bit rand()
8883
88842009-10-02  Geoffrey Garen  <ggaren@apple.com>
8885
8886        Reviewed by Sam Weinig.
8887
8888        Take one branch instead of two to test for JSValue().
8889
8890        1.1% SunSpider speedup.
8891
8892        * jit/JITCall.cpp:
8893        (JSC::JIT::compileOpCall):
8894        * jit/JITOpcodes.cpp:
8895        (JSC::JIT::emit_op_to_jsnumber):
8896        (JSC::JIT::emit_op_create_arguments):
8897        * jit/JITPropertyAccess.cpp:
8898        (JSC::JIT::emitSlow_op_get_by_val):
8899        (JSC::JIT::emit_op_put_by_val): Test for the empty value tag, instead
8900        of testing for the cell tag with a 0 payload.
8901
8902        * runtime/JSValue.cpp:
8903        (JSC::JSValue::description): Added support for dumping the new empty value,
8904        and deleted values, in debug builds.
8905
8906        * runtime/JSValue.h:
8907        (JSC::JSValue::JSValue()): Construct JSValue() with the empty value tag.
8908
8909        (JSC::JSValue::JSValue(JSCell*)): Convert null pointer to the empty value
8910        tag, to avoid having two different c++ versions of null / empty.
8911
8912        (JSC::JSValue::operator bool): Test for the empty value tag, instead
8913        of testing for the cell tag with a 0 payload.
8914
89152009-10-02  Steve Falkenburg  <sfalken@apple.com>
8916
8917        Reviewed by Mark Rowe.
8918
8919        <https://bugs.webkit.org/show_bug.cgi?id=29989>
8920        Safari version number shouldn't be exposed in WebKit code
8921
8922        For a WebKit version of 532.3.4:
8923        Product version is: 5.32.3.4 (was 4.0.3.0)
8924        File version is: 5.32.3.4 (was 4.532.3.4)
8925
8926        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc:
8927
89282009-10-02  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
8929
8930        Rubber-stamped by Simon Hausmann.
8931
8932        Fix the Qt on Mac OS X build.
8933
8934        * wtf/FastMalloc.cpp:
8935
89362009-10-02  Jørgen Lind  <jorgen.lind@nokia.com>
8937
8938        Reviewed by Simon Hausmann.
8939
8940        Allow enabling and disabling of the JIT through a qmake variable.
8941
8942        Qt's configure may set this variable through .qmake.cache if a
8943        commandline option is given and/or the compile test for hwcap.h
8944        failed/succeeded.
8945
8946        * JavaScriptCore.pri:
8947
89482009-10-01  Mark Rowe  <mrowe@apple.com>
8949
8950        Fix the Tiger build.  Don't unconditionally enable 3D canvas as it is not supported on Tiger.
8951
8952        * Configurations/FeatureDefines.xcconfig:
8953
89542009-10-01  Yongjun Zhang  <yongjun.zhang@nokia.com>
8955
8956        Reviewed by Darin Adler.
8957
8958        https://bugs.webkit.org/show_bug.cgi?id=29187
8959
8960        Don't inline ~ListRefPtr() to work around winscw compiler forward declaration
8961        bug regarding templated classes.
8962
8963        The compiler bug is reported at:
8964        https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812
8965
8966        The change will be reverted when the above bug is fixed in winscw compiler.
8967
8968        * wtf/ListRefPtr.h:
8969        (WTF::::~ListRefPtr):
8970
89712009-10-01  Zoltan Horvath  <zoltan@webkit.org>
8972
8973        Reviewed by Simon Hausmann.
8974
8975        [Qt] Allow custom memory allocation control for the whole JavaScriptCore
8976        https://bugs.webkit.org/show_bug.cgi?id=27029
8977
8978        Since in JavaScriptCore almost every class which has been instantiated by operator new is
8979        inherited from FastAllocBase (bug #20422), we disable customizing global operator new for the Qt-port
8980        when USE_SYSTEM_MALLOC=0.
8981
8982        Add #include <unistd.h> to FastMalloc.cpp because it's used by TCMalloc_PageHeap::scavengerThread().
8983        (It's needed for the functionality of TCmalloc.)
8984
8985        Add TCSystemAlloc.cpp to JavaScriptCore.pri if USE_SYSTEM_MALLOC is disabled.
8986
8987        * JavaScriptCore.pri:
8988        * wtf/FastMalloc.cpp:
8989        (WTF::sleep):
8990        * wtf/FastMalloc.h:
8991
89922009-09-30  Gabor Loki  <loki@inf.u-szeged.hu>
8993
8994        Reviewed by George Staikos.
8995
8996        Defines two pseudo-platforms for ARM and Thumb-2 instruction set.
8997        https://bugs.webkit.org/show_bug.cgi?id=29122
8998
8999        Introduces WTF_PLATFORM_ARM_TRADITIONAL and WTF_PLATFORM_ARM_THUMB2
9000        macros on ARM platforms. The PLATFORM(ARM_THUMB2) should be used
9001        when Thumb-2 instruction set is the required target. The
9002        PLATFORM(ARM_TRADITIONAL) is for generic ARM instruction set. In
9003        case where the code is common the PLATFORM(ARM) have to be used.
9004
9005        Modified by George Wright  <gwright@rim.com> to correctly work
9006        with the RVCT-defined __TARGET_ARCH_ARM and __TARGET_ARCH_THUMB
9007        compiler macros, as well as adding readability changes.
9008
9009        * wtf/Platform.h:
9010
90112009-09-30  Oliver Hunt  <oliver@apple.com>
9012
9013        Reviewed by Geoff Garen.
9014
9015        Devirtualise array toString conversion
9016
9017        Tweak the implementation of Array.prototype.toString to have a fast path
9018        when acting on a true JSArray.
9019
9020        * runtime/ArrayPrototype.cpp:
9021        (JSC::arrayProtoFuncToString):
9022
90232009-09-30  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
9024
9025        Reviewed by Geoffrey Garen.
9026
9027        Buildfix for platforms using JSVALUE32.
9028        https://bugs.webkit.org/show_bug.cgi?id=29915
9029
9030        After http://trac.webkit.org/changeset/48905 the build broke in JSVALUE32 case.
9031        Also removed unreachable code.
9032
9033        * jit/JITArithmetic.cpp:
9034        (JSC::JIT::emit_op_add):
9035         - Declaration of "OperandTypes types" moved before first use.
9036         - Typos fixed: dst modified to result, regT2 added.
9037         - Unreachable code removed.
9038        (JSC::JIT::emitSlow_op_add):
9039         - Missing declaration of "OperandTypes types" added.
9040
90412009-09-30  Janne Koskinen  <janne.p.koskinen@digia.com>
9042
9043        Reviewed by Simon Hausmann.
9044
9045        Reduce heap size on Symbian from 64MB to 8MB.
9046
9047        This is not a perfect fix, it requires more fine tuning.
9048        But this makes it possible again to debug in the emulator,
9049        which is more important in order to be able to fix other
9050        run-time issues.
9051
9052        * runtime/Collector.h:
9053
90542009-09-30  Janne Koskinen  <janne.p.koskinen@digia.com>
9055
9056        Reviewed by Simon Hausmann.
9057
9058        Fix CRASH() macro for Symbian build.
9059
9060        * wtf/Assertions.h: Added missing }
9061
90622009-09-29  Geoffrey Garen  <ggaren@apple.com>
9063
9064        Reviewed by Gavin Barraclough.
9065
9066        Inlined a few math operations.
9067
9068        ~1% SunSpider speedup.
9069
9070        * jit/JIT.h:
9071        * jit/JITArithmetic.cpp:
9072        (JSC::JIT::compileBinaryArithOpSlowCase):
9073        (JSC::JIT::emitSlow_op_add):
9074        (JSC::JIT::emitSlow_op_mul):
9075        (JSC::JIT::emit_op_sub):
9076        (JSC::JIT::emitSlow_op_sub): Don't take a stub call when operating on
9077        a constant int and a double.
9078
90792009-09-28  Oliver Hunt  <oliver@apple.com>
9080
9081        Reviewed by Gavin Barraclough.
9082
9083        Tidy up codeblock sampler
9084        https://bugs.webkit.org/show_bug.cgi?id=29836
9085
9086        Some rather simple refactoring of codeblock sampler so that
9087        it's easier for us to use it to find problems in non-jsc
9088        environments
9089
9090        * JavaScriptCore.exp:
9091        * bytecode/SamplingTool.h:
9092        * debugger/Debugger.cpp:
9093        (JSC::evaluateInGlobalCallFrame):
9094        * debugger/DebuggerCallFrame.cpp:
9095        (JSC::DebuggerCallFrame::evaluate):
9096        * interpreter/Interpreter.cpp:
9097        (JSC::Interpreter::Interpreter):
9098        (JSC::Interpreter::execute):
9099        (JSC::Interpreter::privateExecute):
9100        (JSC::Interpreter::enableSampler):
9101        (JSC::Interpreter::dumpSampleData):
9102        (JSC::Interpreter::startSampling):
9103        (JSC::Interpreter::stopSampling):
9104        * interpreter/Interpreter.h:
9105        (JSC::Interpreter::sampler):
9106        * jit/JIT.h:
9107        * jsc.cpp:
9108        (runWithScripts):
9109        * runtime/Completion.cpp:
9110        (JSC::checkSyntax):
9111        (JSC::evaluate):
9112        * runtime/Executable.h:
9113        (JSC::EvalExecutable::EvalExecutable):
9114        (JSC::ProgramExecutable::create):
9115        (JSC::ProgramExecutable::ProgramExecutable):
9116        * runtime/JSGlobalData.cpp:
9117        (JSC::JSGlobalData::startSampling):
9118        (JSC::JSGlobalData::stopSampling):
9119        (JSC::JSGlobalData::dumpSampleData):
9120        * runtime/JSGlobalData.h:
9121        * runtime/JSGlobalObjectFunctions.cpp:
9122        (JSC::globalFuncEval):
9123
91242009-09-29  Jeremy Orlow  <jorlow@chromium.org>
9125
9126        Reviewed by Dimitri Glazkov.
9127
9128        Add GYP generated files to svn:ignore
9129        https://bugs.webkit.org/show_bug.cgi?id=29895
9130
9131        The following files are generated by JavaScriptCore's GYP file and should be ignored:
9132
9133        pcre.mk
9134        wtf.scons
9135        wtf.mk
9136        SConstruct
9137        wtf_config.scons
9138        wtf_config.mk
9139        pcre.scons
9140
9141        * JavaScriptCore.gyp: Changed property svn:ignore.
9142
91432009-09-29  Geoffrey Garen  <ggaren@apple.com>
9144
9145        Reviewed by Sam Weinig.
9146
9147        Standardized an optimization for adding non-numbers.
9148
9149        SunSpider says maybe a tiny speedup.
9150
9151        * jit/JITArithmetic.cpp:
9152        (JSC::JIT::emit_op_add):
9153        (JSC::JIT::emitSlow_op_add):
9154
91552009-09-29  Geoffrey Garen  <ggaren@apple.com>
9156
9157        Windows build fix: export a new symbol.
9158
9159        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
9160        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
9161
91622009-09-28  Geoffrey Garen  <ggaren@apple.com>
9163
9164        Reviewed by Sam Weinig.
9165
9166        Removed virtual destructor from JSGlobalObjectData to eliminate pointer
9167        fix-ups when accessing JSGlobalObject::d.
9168
9169        Replaced with an explicit destructor function pointer.
9170
9171        6% speedup on bench-alloc-nonretained.js.
9172
9173        * JavaScriptCore.exp:
9174        * runtime/JSGlobalObject.cpp:
9175        (JSC::JSGlobalObject::~JSGlobalObject):
9176        (JSC::JSGlobalObject::destroyJSGlobalObjectData):
9177        * runtime/JSGlobalObject.h:
9178        (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
9179        (JSC::JSGlobalObject::JSGlobalObject):
9180
91812009-09-29  Janne Koskinen  <janne.p.koskinen@digia.com>
9182
9183        Reviewed by David Kilzer.
9184
9185        [Qt] Assert messages prints visible in Symbian
9186        https://bugs.webkit.org/show_bug.cgi?id=29808
9187
9188        Asserts use vprintf to print the messages to stderr.
9189        In Symbian Open C it is not possible to see stderr so
9190        I routed the messages to stdout instead.
9191
9192        * wtf/Assertions.cpp:
9193
91942009-09-29  Janne Koskinen  <janne.p.koskinen@digia.com>
9195
9196        Reviewed by Darin Adler.
9197
9198        [Qt] Symbian CRASH macro implementation
9199
9200        Added Symbian specific crash macro that
9201        stops to crash line if JIT debugging is used.
9202        Additional differentiation of access violation
9203        (KERN-EXEC 3) and CRASH panic.
9204
9205        * wtf/Assertions.h:
9206
92072009-09-28  Mark Rowe  <mrowe@apple.com>
9208
9209        Fix the PowerPC build.
9210
9211        * JavaScriptCore.exp:
9212
92132009-09-28  Mark Rowe  <mrowe@apple.com>
9214
9215        Reviewed by Gavin Barraclough.
9216
9217        <rdar://problem/7195704> JavaScriptCore fails to mark registers when built for x86_64 using LLVM GCC.
9218
9219        * runtime/Collector.cpp:
9220        (JSC::Heap::markCurrentThreadConservatively): Force jmp_buf to use the appropriate alignment for a pointer
9221        to ensure that we correctly interpret the contents of registers during marking.
9222
92232009-09-28  Geoffrey Garen  <ggaren@apple.com>
9224
9225        Windows build fix: added new exports.
9226
9227        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
9228        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
9229
92302009-09-28  Geoffrey Garen  <ggaren@apple.com>
9231
9232        Windows build fix: removed exports that no longer exist.
9233
9234        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
9235        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
9236
92372009-09-28  Geoffrey Garen  <ggaren@apple.com>
9238
9239        Reviewed by Darin Adler.
9240
9241        NotNullPassRefPtr: smart pointer optimized for passing references that are not null
9242        https://bugs.webkit.org/show_bug.cgi?id=29822
9243
9244        Added NotNullPassRefPtr, and deployed it in all places that initialize
9245        JavaScript objects.
9246
9247        2.2% speedup on bench-allocate-nonretained.js.
9248
9249        * API/JSCallbackConstructor.cpp:
9250        (JSC::JSCallbackConstructor::JSCallbackConstructor):
9251        * API/JSCallbackConstructor.h:
9252        * API/JSCallbackObject.h:
9253        * API/JSCallbackObjectFunctions.h:
9254        (JSC::JSCallbackObject::JSCallbackObject):
9255        * JavaScriptCore.exp:
9256        * bytecode/CodeBlock.h:
9257        (JSC::CodeBlock::addFunctionDecl):
9258        (JSC::CodeBlock::addFunctionExpr):
9259        * runtime/ArrayConstructor.cpp:
9260        (JSC::ArrayConstructor::ArrayConstructor):
9261        * runtime/ArrayConstructor.h:
9262        * runtime/ArrayPrototype.cpp:
9263        (JSC::ArrayPrototype::ArrayPrototype):
9264        * runtime/ArrayPrototype.h:
9265        * runtime/BooleanConstructor.cpp:
9266        (JSC::BooleanConstructor::BooleanConstructor):
9267        * runtime/BooleanConstructor.h:
9268        * runtime/BooleanObject.cpp:
9269        (JSC::BooleanObject::BooleanObject):
9270        * runtime/BooleanObject.h:
9271        * runtime/BooleanPrototype.cpp:
9272        (JSC::BooleanPrototype::BooleanPrototype):
9273        * runtime/BooleanPrototype.h:
9274        * runtime/DateConstructor.cpp:
9275        (JSC::DateConstructor::DateConstructor):
9276        * runtime/DateConstructor.h:
9277        * runtime/DateInstance.cpp:
9278        (JSC::DateInstance::DateInstance):
9279        * runtime/DateInstance.h:
9280        * runtime/DatePrototype.cpp:
9281        (JSC::DatePrototype::DatePrototype):
9282        * runtime/DatePrototype.h:
9283        * runtime/ErrorConstructor.cpp:
9284        (JSC::ErrorConstructor::ErrorConstructor):
9285        * runtime/ErrorConstructor.h:
9286        * runtime/ErrorInstance.cpp:
9287        (JSC::ErrorInstance::ErrorInstance):
9288        * runtime/ErrorInstance.h:
9289        * runtime/ErrorPrototype.cpp:
9290        (JSC::ErrorPrototype::ErrorPrototype):
9291        * runtime/ErrorPrototype.h:
9292        * runtime/FunctionConstructor.cpp:
9293        (JSC::FunctionConstructor::FunctionConstructor):
9294        * runtime/FunctionConstructor.h:
9295        * runtime/FunctionPrototype.cpp:
9296        (JSC::FunctionPrototype::FunctionPrototype):
9297        * runtime/FunctionPrototype.h:
9298        * runtime/GlobalEvalFunction.cpp:
9299        (JSC::GlobalEvalFunction::GlobalEvalFunction):
9300        * runtime/GlobalEvalFunction.h:
9301        * runtime/InternalFunction.cpp:
9302        (JSC::InternalFunction::InternalFunction):
9303        * runtime/InternalFunction.h:
9304        (JSC::InternalFunction::InternalFunction):
9305        * runtime/JSActivation.cpp:
9306        (JSC::JSActivation::JSActivation):
9307        * runtime/JSActivation.h:
9308        (JSC::JSActivation::JSActivationData::JSActivationData):
9309        * runtime/JSArray.cpp:
9310        (JSC::JSArray::JSArray):
9311        * runtime/JSArray.h:
9312        * runtime/JSByteArray.cpp:
9313        (JSC::JSByteArray::JSByteArray):
9314        * runtime/JSByteArray.h:
9315        * runtime/JSFunction.cpp:
9316        (JSC::JSFunction::JSFunction):
9317        * runtime/JSFunction.h:
9318        * runtime/JSGlobalObject.h:
9319        (JSC::JSGlobalObject::JSGlobalObject):
9320        * runtime/JSONObject.h:
9321        (JSC::JSONObject::JSONObject):
9322        * runtime/JSObject.h:
9323        (JSC::JSObject::JSObject):
9324        (JSC::JSObject::setStructure):
9325        * runtime/JSVariableObject.h:
9326        (JSC::JSVariableObject::JSVariableObject):
9327        * runtime/JSWrapperObject.h:
9328        (JSC::JSWrapperObject::JSWrapperObject):
9329        * runtime/MathObject.cpp:
9330        (JSC::MathObject::MathObject):
9331        * runtime/MathObject.h:
9332        * runtime/NativeErrorConstructor.cpp:
9333        (JSC::NativeErrorConstructor::NativeErrorConstructor):
9334        * runtime/NativeErrorConstructor.h:
9335        * runtime/NativeErrorPrototype.cpp:
9336        (JSC::NativeErrorPrototype::NativeErrorPrototype):
9337        * runtime/NativeErrorPrototype.h:
9338        * runtime/NumberConstructor.cpp:
9339        (JSC::NumberConstructor::NumberConstructor):
9340        * runtime/NumberConstructor.h:
9341        * runtime/NumberObject.cpp:
9342        (JSC::NumberObject::NumberObject):
9343        * runtime/NumberObject.h:
9344        * runtime/NumberPrototype.cpp:
9345        (JSC::NumberPrototype::NumberPrototype):
9346        * runtime/NumberPrototype.h:
9347        * runtime/ObjectConstructor.cpp:
9348        (JSC::ObjectConstructor::ObjectConstructor):
9349        * runtime/ObjectConstructor.h:
9350        * runtime/ObjectPrototype.cpp:
9351        (JSC::ObjectPrototype::ObjectPrototype):
9352        * runtime/ObjectPrototype.h:
9353        * runtime/PropertyNameArray.h:
9354        (JSC::PropertyNameArrayData::setCachedPrototypeChain):
9355        * runtime/PrototypeFunction.cpp:
9356        (JSC::PrototypeFunction::PrototypeFunction):
9357        * runtime/PrototypeFunction.h:
9358        * runtime/RegExpConstructor.cpp:
9359        (JSC::RegExpConstructor::RegExpConstructor):
9360        * runtime/RegExpConstructor.h:
9361        * runtime/RegExpObject.cpp:
9362        (JSC::RegExpObject::RegExpObject):
9363        * runtime/RegExpObject.h:
9364        (JSC::RegExpObject::RegExpObjectData::RegExpObjectData):
9365        * runtime/RegExpPrototype.cpp:
9366        (JSC::RegExpPrototype::RegExpPrototype):
9367        * runtime/RegExpPrototype.h:
9368        * runtime/StringConstructor.cpp:
9369        (JSC::StringConstructor::StringConstructor):
9370        * runtime/StringConstructor.h:
9371        * runtime/StringObject.cpp:
9372        (JSC::StringObject::StringObject):
9373        * runtime/StringObject.h:
9374        * runtime/StringObjectThatMasqueradesAsUndefined.h:
9375        (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
9376        * runtime/StringPrototype.cpp:
9377        (JSC::StringPrototype::StringPrototype):
9378        * runtime/StringPrototype.h:
9379        * wtf/PassRefPtr.h:
9380        (WTF::NotNullPassRefPtr::NotNullPassRefPtr):
9381        (WTF::NotNullPassRefPtr::~NotNullPassRefPtr):
9382        (WTF::NotNullPassRefPtr::get):
9383        (WTF::NotNullPassRefPtr::clear):
9384        (WTF::NotNullPassRefPtr::releaseRef):
9385        (WTF::NotNullPassRefPtr::operator*):
9386        (WTF::NotNullPassRefPtr::operator->):
9387        (WTF::NotNullPassRefPtr::operator!):
9388        (WTF::NotNullPassRefPtr::operator UnspecifiedBoolType):
9389        * wtf/RefPtr.h:
9390        (WTF::RefPtr::RefPtr):
9391        (WTF::operator==):
9392
93932009-09-28  Oliver Hunt  <oliver@apple.com>
9394
9395        Reviewed by Geoff Garen.
9396
9397        Hard dependency on SSE2 instruction set with JIT
9398        https://bugs.webkit.org/show_bug.cgi?id=29779
9399
9400        Add floating point support checks to op_jfalse and op_jtrue, and
9401        fix the logic for the slow case of op_add
9402
9403        * jit/JITArithmetic.cpp:
9404        (JSC::JIT::emitSlow_op_add):
9405        * jit/JITOpcodes.cpp:
9406        (JSC::JIT::emit_op_jfalse):
9407        (JSC::JIT::emit_op_jtrue):
9408
94092009-09-28  Yaar Schnitman  <yaar@chromium.org>
9410
9411        Reviewed by Dimitri Glazkov.
9412
9413        Chromium port - recognize we are being built independently
9414        of chromium and look for dependencies under webkit/chromium rather
9415        than chromium/src.
9416
9417        https://bugs.webkit.org/show_bug.cgi?id=29722
9418
9419        * JavaScriptCore.gyp/JavaScriptCore.gyp:
9420
94212009-09-28  Jakub Wieczorek  <faw217@gmail.com>
9422
9423        Reviewed by Simon Hausmann.
9424
9425        [Qt] Implement XSLT support with QtXmlPatterns.
9426        https://bugs.webkit.org/show_bug.cgi?id=28303
9427
9428        * wtf/Platform.h: Add a WTF_USE_QXMLQUERY #define.
9429
94302009-09-28  Gabor Loki  <loki@inf.u-szeged.hu>
9431
9432        Reviewed by Simon Hausmann.
9433
9434        Remove __clear_cache which is an internal function of GCC
9435        https://bugs.webkit.org/show_bug.cgi?id=28886
9436
9437        Although __clear_cache is exported from GCC, this is an internal
9438        function. GCC makes no promises about it.
9439
9440        * jit/ExecutableAllocator.h:
9441        (JSC::ExecutableAllocator::cacheFlush):
9442
94432009-09-28  Sam Weinig  <sam@webkit.org>
9444
9445        Reviewed by Oliver Hunt.
9446
9447        Fix an absolute path to somewhere in Oliver's machine to a relative path
9448        for derived JSONObject.lut.h.
9449
9450        * JavaScriptCore.xcodeproj/project.pbxproj:
9451
94522009-09-28  Joerg Bornemann  <joerg.bornemann@nokia.com>
9453
9454        Reviewed by Simon Hausmann.
9455
9456        Add ARM version detection for Windows CE.
9457
9458        * wtf/Platform.h:
9459
94602009-09-26  Yongjun Zhang  <yongjun.zhang@nokia.com>
9461
9462        Reviewed by Simon Hausmann.
9463
9464        Add MarkStackSymbian.cpp to build JavascriptCore for Symbian.
9465
9466        Re-use Windows shrinkAllocation implementation because Symbian doesn't
9467        support releasing part of memory region.
9468
9469        Use fastMalloc and fastFree to implement allocateStack and releaseStack
9470        for Symbian port.
9471
9472        * JavaScriptCore.pri:
9473        * runtime/MarkStack.h:
9474        (JSC::MarkStack::MarkStackArray::shrinkAllocation):
9475        * runtime/MarkStackSymbian.cpp: Added.
9476        (JSC::MarkStack::initializePagesize):
9477        (JSC::MarkStack::allocateStack):
9478        (JSC::MarkStack::releaseStack):
9479
94802009-09-25  Gabor Loki  <loki@inf.u-szeged.hu>
9481
9482        Reviewed by Gavin Barraclough.
9483
9484        Fix unaligned data access in YARR_JIT on ARMv5 and below.
9485        https://bugs.webkit.org/show_bug.cgi?id=29695
9486
9487        On ARMv5 and below all data access should be naturally aligned.
9488        In the YARR_JIT there is a case when character pairs are
9489        loaded from the input string, but this data access is not
9490        naturally aligned. This fix introduces load32WithUnalignedHalfWords
9491        and branch32WithUnalignedHalfWords functions which contain
9492        naturally aligned memory loads - half word loads - on ARMv5 and below.
9493
9494        * assembler/MacroAssemblerARM.cpp:
9495        (JSC::MacroAssemblerARM::load32WithUnalignedHalfWords):
9496        * assembler/MacroAssemblerARM.h:
9497        (JSC::MacroAssemblerARM::load32WithUnalignedHalfWords):
9498        (JSC::MacroAssemblerARM::branch32WithUnalignedHalfWords):
9499        * assembler/MacroAssemblerARMv7.h:
9500        (JSC::MacroAssemblerARMv7::load32WithUnalignedHalfWords):
9501        (JSC::MacroAssemblerARMv7::branch32):
9502        (JSC::MacroAssemblerARMv7::branch32WithUnalignedHalfWords):
9503        * assembler/MacroAssemblerX86Common.h:
9504        (JSC::MacroAssemblerX86Common::load32WithUnalignedHalfWords):
9505        (JSC::MacroAssemblerX86Common::branch32WithUnalignedHalfWords):
9506        * wtf/Platform.h:
9507        * yarr/RegexJIT.cpp:
9508        (JSC::Yarr::RegexGenerator::generatePatternCharacterPair):
9509
95102009-09-25  Jeremy Orlow  <jorlow@chromium.org>
9511
9512        This is breaking Chromium try bots, so I'm counting this as a build fix.
9513
9514        Add more svn:ignore exceptions.  On different platforms, these files are
9515        generated with different case for JavaScriptCore.  Also there are some
9516        wtf project files that get built apparently.
9517
9518        * JavaScriptCore.gyp: Changed property svn:ignore.
9519
95202009-09-25  Ada Chan  <adachan@apple.com>
9521
9522        Build fix.
9523
9524        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
9525        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
9526
95272009-09-25  Geoffrey Garen  <ggaren@apple.com>
9528
9529        Reviewed by Darin Adler.
9530
9531        Inlined some object creation code, including lexicalGlobalObject access
9532        https://bugs.webkit.org/show_bug.cgi?id=29750
9533
9534        SunSpider says 0.5% faster.
9535
9536        0.8% speedup on bench-alloc-nonretained.js.
9537        2.5% speedup on v8-splay.js.
9538
9539        * interpreter/CachedCall.h:
9540        (JSC::CachedCall::CachedCall):
9541        * interpreter/CallFrame.h:
9542        (JSC::ExecState::lexicalGlobalObject):
9543        (JSC::ExecState::globalThisValue):
9544        * interpreter/Interpreter.cpp:
9545        (JSC::Interpreter::dumpRegisters):
9546        (JSC::Interpreter::execute):
9547        (JSC::Interpreter::privateExecute):
9548        * jit/JITStubs.cpp:
9549        (JSC::DEFINE_STUB_FUNCTION):
9550        * runtime/FunctionConstructor.cpp:
9551        (JSC::constructFunction):
9552        * runtime/ScopeChain.cpp:
9553        (JSC::ScopeChainNode::print):
9554        * runtime/ScopeChain.h:
9555        (JSC::ScopeChainNode::ScopeChainNode):
9556        (JSC::ScopeChainNode::~ScopeChainNode):
9557        (JSC::ScopeChainNode::push):
9558        (JSC::ScopeChain::ScopeChain):
9559        (JSC::ScopeChain::globalObject): Added a globalObject data member to ScopeChainNode.
9560        Replaced accessor function for globalObject() with data member. Replaced
9561        globalThisObject() accessor with direct access to globalThis, to match.
9562
9563        * runtime/JSGlobalObject.cpp:
9564        (JSC::JSGlobalObject::init):
9565        * runtime/JSGlobalObject.h: Inlined array and object construction.
9566
95672009-09-25  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
9568
9569        Reviewed by Gavin Barraclough.
9570
9571        Add ARM version detection rules for Symbian
9572        https://bugs.webkit.org/show_bug.cgi?id=29715
9573
9574        * wtf/Platform.h:
9575
95762009-09-24  Xan Lopez  <xlopez@igalia.com>
9577
9578        Reviewed by Mark "Do It!" Rowe.
9579
9580        Some GCC versions don't like C++-style comments in preprocessor
9581        directives, change to C-style to shut them up.
9582
9583        * wtf/Platform.h:
9584
95852009-09-24  Oliver Hunt  <oliver@apple.com>
9586
9587        Reviewed by Gavin Barraclough.
9588
9589        Division is needlessly slow in 64-bit
9590        https://bugs.webkit.org/show_bug.cgi?id=29723
9591
9592        Add codegen for op_div on x86-64
9593
9594        * jit/JIT.cpp:
9595        (JSC::JIT::privateCompileMainPass):
9596        (JSC::JIT::privateCompileSlowCases):
9597        * jit/JIT.h:
9598        * jit/JITArithmetic.cpp:
9599        (JSC::JIT::compileBinaryArithOpSlowCase):
9600        (JSC::JIT::emit_op_div):
9601        (JSC::JIT::emitSlow_op_div):
9602        * jit/JITInlineMethods.h:
9603        (JSC::JIT::isOperandConstantImmediateDouble):
9604        (JSC::JIT::addressFor):
9605        (JSC::JIT::emitLoadDouble):
9606        (JSC::JIT::emitLoadInt32ToDouble):
9607        (JSC::JIT::emitJumpSlowCaseIfNotImmediateNumber):
9608
96092009-09-24  Jeremy Orlow  <jorlow@chromium.org>
9610
9611        Reviewed by Dimitri Glazkov.
9612
9613        Add GYP generated files to svn:ignore
9614        https://bugs.webkit.org/show_bug.cgi?id=29724
9615
9616        Adding the following files to the svn:ignore list (all in the
9617        JavaScriptCore/JavaScriptCore.gyp directory)
9618
9619        JavaScriptCore.xcodeproj
9620        JavaScriptCore.sln
9621        JavaScriptCore.vcproj
9622        JavaScriptCore_Debug.rules
9623        JavaScriptCore_Release.rules
9624        JavaScriptCore_Release - no tcmalloc.rules
9625        JavaScriptCore_Purify.rules
9626        JavaScriptCore.mk
9627        JavaScriptCore_Debug_rules.mk
9628        JavaScriptCore_Release_rules.mk
9629        JavaScriptCore_Release - no tcmalloc_rules.mk
9630        JavaScriptCore_Purify_rules.mk
9631        JavaScriptCore.scons
9632        JavaScriptCore_main.scons
9633
9634        * JavaScriptCore.gyp: Changed property svn:ignore.
9635
96362009-09-24  Yong Li  <yong.li@torchmobile.com>
9637
9638        Reviewed by Adam Barth.
9639
9640        Replace platform-dependent code with WTF::currentTime()
9641        https://bugs.webkit.org/show_bug.cgi?id=29148
9642
9643        * jsc.cpp:
9644        (StopWatch::start):
9645        (StopWatch::stop):
9646        (StopWatch::getElapsedMS):
9647        * runtime/TimeoutChecker.cpp:
9648        (JSC::getCPUTime):
9649
96502009-09-24  Mark Rowe  <mrowe@apple.com>
9651
9652        Reviewed by Sam Weinig.
9653
9654        <rdar://problem/7215058> FastMalloc scavenging thread should be named
9655
9656        * wtf/FastMalloc.cpp:
9657        (WTF::TCMalloc_PageHeap::scavengerThread): Set the thread name.
9658        * wtf/Platform.h: Move the knowledge of whether pthread_setname_np exists to here as HAVE(PTHREAD_SETNAME_NP).
9659        * wtf/ThreadingPthreads.cpp:
9660        (WTF::setThreadNameInternal): Use HAVE(PTHREAD_SETNAME_NP).
9661
96622009-09-24  Geoffrey Garen  <ggaren@apple.com>
9663
9664        Reviewed by Sam Weinig.
9665
9666        Renamed clear to removeAll, as suggested by Darin Adler.
9667
9668        * wtf/HashCountedSet.h:
9669        (WTF::::removeAll):
9670
96712009-09-24  Mark Rowe  <mrowe@apple.com>
9672
9673        Reviewed by Gavin Barraclough.
9674
9675        Fix FastMalloc to build with assertions enabled.
9676
9677        * wtf/FastMalloc.cpp:
9678        (WTF::TCMalloc_Central_FreeList::ReleaseToSpans):
9679        * wtf/TCSpinLock.h:
9680        (TCMalloc_SpinLock::IsHeld):
9681
96822009-09-24  Geoffrey Garen  <ggaren@apple.com>
9683
9684        Suggested by Darin Adler.
9685
9686        Removed some unnecessary parameter names.
9687
9688        * wtf/HashCountedSet.h:
9689
96902009-09-24  Janne Koskinen  <janne.p.koskinen@digia.com>
9691
9692        Reviewed by Simon Hausmann.
9693
9694        On Windows JSChar is typedef'ed to wchar_t.
9695
9696        When building with WINSCW for Symbian we need to do the
9697        same typedef.
9698
9699        * API/JSStringRef.h:
9700
97012009-09-23  Geoffrey Garen  <ggaren@apple.com>
9702
9703        A piece of my last patch that I forgot.
9704
9705        * wtf/HashCountedSet.h:
9706        (WTF::::clear): Added HashCountedSet::clear.
9707
97082009-09-24  Gabor Loki  <loki@inf.u-szeged.hu>
9709
9710        Reviewed by Gavin Barraclough.
9711
9712        Avoid __clear_cache built-in function if DISABLE_BUILTIN_CLEAR_CACHE define is set
9713        https://bugs.webkit.org/show_bug.cgi?id=28886
9714
9715        There are some GCC packages (for example GCC-2006q3 from CodeSourcery)
9716        which contain __clear_cache built-in function only for C while the C++
9717        version of __clear_cache is missing on ARM architectures.
9718
9719        Fixed a small bug in the inline assembly of cacheFlush function on
9720        ARM_TRADITIONAL.
9721
9722        * jit/ExecutableAllocator.h:
9723        (JSC::ExecutableAllocator::cacheFlush):
9724
97252009-09-23  Geoffrey Garen  <ggaren@apple.com>
9726
9727        Reviewed by Sam Weinig.
9728
9729        Added the ability to swap vectors with inline capacities, so you can
9730        store a vector with inline capacity in a hash table.
9731
9732        * wtf/Vector.h:
9733        (WTF::swap):
9734        (WTF::VectorBuffer::swap):
9735
97362009-09-23  David Kilzer  <ddkilzer@apple.com>
9737
9738        Move definition of USE(PLUGIN_HOST_PROCESS) from WebKitPrefix.h to Platform.h
9739
9740        Reviewed by Mark Rowe.
9741
9742        * wtf/Platform.h: Define WTF_USE_PLUGIN_HOST_PROCESS to 1 when
9743        building on 64-bit SnowLeopard.  Define to 0 elsewhere.
9744
97452009-09-22  Oliver Hunt  <oliver@apple.com>
9746
9747        Reviewed by Geoff Garen.
9748
9749        Code sampling builds are broken.
9750        https://bugs.webkit.org/show_bug.cgi?id=29662
9751
9752        Fix build.
9753
9754        * bytecode/EvalCodeCache.h:
9755        (JSC::EvalCodeCache::get):
9756        * bytecode/SamplingTool.cpp:
9757        (JSC::ScriptSampleRecord::sample):
9758        (JSC::SamplingTool::doRun):
9759        (JSC::SamplingTool::notifyOfScope):
9760        (JSC::compareScriptSampleRecords):
9761        (JSC::SamplingTool::dump):
9762        * bytecode/SamplingTool.h:
9763        (JSC::ScriptSampleRecord::ScriptSampleRecord):
9764        (JSC::ScriptSampleRecord::~ScriptSampleRecord):
9765        (JSC::SamplingTool::SamplingTool):
9766        * bytecompiler/BytecodeGenerator.cpp:
9767        (JSC::BytecodeGenerator::BytecodeGenerator):
9768        (JSC::BytecodeGenerator::emitNewFunction):
9769        (JSC::BytecodeGenerator::emitNewFunctionExpression):
9770        * bytecompiler/BytecodeGenerator.h:
9771        (JSC::BytecodeGenerator::makeFunction):
9772        * debugger/Debugger.cpp:
9773        (JSC::evaluateInGlobalCallFrame):
9774        * debugger/DebuggerCallFrame.cpp:
9775        (JSC::DebuggerCallFrame::evaluate):
9776        * parser/Nodes.cpp:
9777        (JSC::ScopeNode::ScopeNode):
9778        * runtime/Completion.cpp:
9779        (JSC::checkSyntax):
9780        (JSC::evaluate):
9781        * runtime/Executable.cpp:
9782        (JSC::FunctionExecutable::fromGlobalCode):
9783        * runtime/Executable.h:
9784        (JSC::ScriptExecutable::ScriptExecutable):
9785        (JSC::EvalExecutable::EvalExecutable):
9786        (JSC::EvalExecutable::create):
9787        (JSC::ProgramExecutable::ProgramExecutable):
9788        (JSC::FunctionExecutable::create):
9789        (JSC::FunctionExecutable::FunctionExecutable):
9790        * runtime/JSGlobalObjectFunctions.cpp:
9791        (JSC::globalFuncEval):
9792
97932009-09-22  Darin Adler  <darin@apple.com>
9794
9795        Reviewed by Sam Weinig.
9796
9797        * wtf/Forward.h: Added PassOwnPtr.
9798
97992009-09-22  Yaar Schnitman  <yaar@chromium.org>
9800
9801        Reviewed by David Levin.
9802
9803        Ported chromium.org's javascriptcore.gyp for the webkit chromium port.
9804
9805        https://bugs.webkit.org/show_bug.cgi?id=29617
9806
9807        * JavaScriptCore.gyp/JavaScriptCore.gyp: Added.
9808
98092009-09-22  Thiago Macieira  <thiago.macieira@nokia.com>
9810
9811        Reviewed by Simon Hausmann.
9812
9813        Fix compilation with WINSCW: no varargs macros
9814
9815        Disable variadic arguments for WINSCW just like we do
9816        for MSVC7.
9817
9818        * wtf/Assertions.h:
9819
98202009-09-22  Kent Hansen  <khansen@trolltech.com>
9821
9822        Reviewed by Simon Hausmann.
9823
9824        Disable variadic macros on MSVC7.
9825
9826        This was originally added in r26589 but not extended
9827        when LOG_DISABLED/ASSERT_DISABLED was introduced.
9828
9829        * wtf/Assertions.h:
9830
98312009-09-22  Simon Hausmann  <simon.hausmann@nokia.com>
9832
9833        Unreviewed build fix for Windows CE < 5
9834
9835        Define WINCEBASIC to disable the IsDebuggerPresent() code in
9836        wtf/Assertions.cpp.
9837
9838        * JavaScriptCore.pri:
9839
98402009-09-22  Joerg Bornemann  <joerg.bornemann@nokia.com>
9841
9842        Reviewed by Simon Hausmann.
9843
9844        Fix major memory leak in JavaScriptCore RegisterFile on Windows CE
9845
9846        https://bugs.webkit.org/show_bug.cgi?id=29367
9847
9848        On Widows CE we must decommit all committed pages before we release
9849        them. See VirtualFree documentation.
9850        Desktop Windows behaves much smoother in this situation.
9851
9852        * interpreter/RegisterFile.cpp:
9853        (JSC::RegisterFile::~RegisterFile):
9854
98552009-09-21  Greg Bolsinga  <bolsinga@apple.com>
9856
9857        Reviewed by Simon Fraser & Sam Weinig.
9858
9859        Add ENABLE(ORIENTATION_EVENTS)
9860        https://bugs.webkit.org/show_bug.cgi?id=29508
9861
9862        * wtf/Platform.h: Also sort PLATFORM(IPHONE) #defines.
9863
98642009-09-21  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
9865
9866        Reviewed by Eric Seidel.
9867
9868        [Fix] SourceCode's uninitialized member
9869
9870        Potential source of crashes and bugs was fixed. Default constructor
9871        didn't initialized m_provider member.
9872
9873        https://bugs.webkit.org/show_bug.cgi?id=29364
9874
9875        * parser/SourceCode.h:
9876        (JSC::SourceCode::SourceCode):
9877
98782009-09-21  Oliver Hunt  <oliver@apple.com>
9879
9880        Reviewed by Geoff Garen.
9881
9882        REGRESSION (r48582): Crash in StructureStubInfo::initPutByIdTransition when reloading trac.webkit.org
9883        https://bugs.webkit.org/show_bug.cgi?id=29599
9884
9885        It is unsafe to attempt to cache new property transitions on
9886        dictionaries of any type.
9887
9888        * interpreter/Interpreter.cpp:
9889        (JSC::Interpreter::tryCachePutByID):
9890        * jit/JITStubs.cpp:
9891        (JSC::JITThunks::tryCachePutByID):
9892
98932009-09-21  Oliver Hunt  <oliver@apple.com>
9894
9895        RS=Maciej Stachowiak.
9896
9897        Re-land SNES fix with corrected assertion.
9898
9899        * interpreter/Interpreter.cpp:
9900        (JSC::Interpreter::resolveGlobal):
9901        (JSC::Interpreter::tryCachePutByID):
9902        (JSC::Interpreter::tryCacheGetByID):
9903        * jit/JITStubs.cpp:
9904        (JSC::JITThunks::tryCachePutByID):
9905        (JSC::JITThunks::tryCacheGetByID):
9906        (JSC::DEFINE_STUB_FUNCTION):
9907        * runtime/BatchedTransitionOptimizer.h:
9908        (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
9909        * runtime/JSObject.cpp:
9910        (JSC::JSObject::removeDirect):
9911        * runtime/Structure.cpp:
9912        (JSC::Structure::Structure):
9913        (JSC::Structure::getEnumerablePropertyNames):
9914        (JSC::Structure::despecifyDictionaryFunction):
9915        (JSC::Structure::addPropertyTransitionToExistingStructure):
9916        (JSC::Structure::addPropertyTransition):
9917        (JSC::Structure::removePropertyTransition):
9918        (JSC::Structure::toDictionaryTransition):
9919        (JSC::Structure::toCacheableDictionaryTransition):
9920        (JSC::Structure::toUncacheableDictionaryTransition):
9921        (JSC::Structure::fromDictionaryTransition):
9922        (JSC::Structure::removePropertyWithoutTransition):
9923        * runtime/Structure.h:
9924        (JSC::Structure::isDictionary):
9925        (JSC::Structure::isUncacheableDictionary):
9926        (JSC::Structure::):
9927        * runtime/StructureChain.cpp:
9928        (JSC::StructureChain::isCacheable):
9929
99302009-09-21  Adam Roben  <aroben@apple.com>
9931
9932        Revert r48573, as it caused many assertion failures
9933
9934        * interpreter/Interpreter.cpp:
9935        * jit/JITStubs.cpp:
9936        * runtime/BatchedTransitionOptimizer.h:
9937        * runtime/JSObject.cpp:
9938        * runtime/Structure.cpp:
9939        * runtime/Structure.h:
9940        * runtime/StructureChain.cpp:
9941
99422009-09-21  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
9943
9944        Unreviewed make dist build fix. Missing files.
9945
9946        * GNUmakefile.am:
9947
99482009-09-19  Gavin Barraclough  <barraclough@apple.com>
9949
9950        Reviewed by Sam 'Cabin Boy' Weinig.
9951
9952        Fix stack alignment with ARM THUMB2 JIT.
9953        https://bugs.webkit.org/show_bug.cgi?id=29526
9954
9955        Stack is currently being decremented by 0x3c, bump this to 0x40 to make this a
9956        multiple of 16 bytes.
9957
9958        * jit/JITStubs.cpp:
9959        (JSC::JITThunks::JITThunks):
9960        * jit/JITStubs.h:
9961
99622009-09-20  Oliver Hunt  <oliver@apple.com>
9963
9964        Reviewed by Maciej Stachowiak.
9965
9966        SNES is too slow
9967        https://bugs.webkit.org/show_bug.cgi?id=29534
9968
9969        The problem was that the emulator used multiple classes with
9970        more properties than our dictionary cutoff allowed, this resulted
9971        in more or less all critical logic inside the emulator requiring
9972        uncached property access.
9973
9974        Rather than simply bumping the dictionary cutoff, this patch
9975        recognises that there are two ways to create a "dictionary"
9976        structure.  Either by adding a large number of properties, or
9977        by removing a property.  In the case of adding properties we
9978        know all the existing properties will maintain their existing
9979        offsets, so we could cache access to those properties, if we
9980        know they won't be removed.
9981
9982        To make this possible, this patch adds the logic required to
9983        distinguish a dictionary created by addition from one created
9984        by removal.  With this logic in place we can now cache access
9985        to objects with large numbers of properties.
9986
9987        SNES performance improved by more than 6x.
9988
9989        * interpreter/Interpreter.cpp:
9990        (JSC::Interpreter::resolveGlobal):
9991        (JSC::Interpreter::tryCachePutByID):
9992        (JSC::Interpreter::tryCacheGetByID):
9993        * jit/JITStubs.cpp:
9994        (JSC::JITThunks::tryCachePutByID):
9995        (JSC::JITThunks::tryCacheGetByID):
9996        (JSC::DEFINE_STUB_FUNCTION):
9997        * runtime/BatchedTransitionOptimizer.h:
9998        (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
9999        * runtime/JSObject.cpp:
10000        (JSC::JSObject::removeDirect):
10001        * runtime/Structure.cpp:
10002        (JSC::Structure::Structure):
10003        (JSC::Structure::getEnumerablePropertyNames):
10004        (JSC::Structure::despecifyDictionaryFunction):
10005        (JSC::Structure::addPropertyTransitionToExistingStructure):
10006        (JSC::Structure::addPropertyTransition):
10007        (JSC::Structure::removePropertyTransition):
10008        (JSC::Structure::toDictionaryTransition):
10009        (JSC::Structure::toCacheableDictionaryTransition):
10010        (JSC::Structure::toUncacheableDictionaryTransition):
10011        (JSC::Structure::fromDictionaryTransition):
10012        (JSC::Structure::removePropertyWithoutTransition):
10013        * runtime/Structure.h:
10014        (JSC::Structure::isDictionary):
10015        (JSC::Structure::isUncacheableDictionary):
10016        (JSC::Structure::):
10017        * runtime/StructureChain.cpp:
10018        (JSC::StructureChain::isCacheable):
10019
100202009-09-19  Oliver Hunt  <oliver@apple.com>
10021
10022        Reviewed by Maciej Stachowiak.
10023
10024        Implement ES5 Object.create function
10025        https://bugs.webkit.org/show_bug.cgi?id=29524
10026
10027        Implement Object.create.  Very simple patch, effectively Object.defineProperties
10028        only creating the target object itself.
10029
10030        * runtime/CommonIdentifiers.h:
10031        * runtime/ObjectConstructor.cpp:
10032        (JSC::ObjectConstructor::ObjectConstructor):
10033        (JSC::objectConstructorCreate):
10034
100352009-09-19  Dan Bernstein  <mitz@apple.com>
10036
10037        Fix clean debug builds.
10038
10039        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
10040
100412009-09-19  Joerg Bornemann  <joerg.bornemann@nokia.com>
10042
10043        Reviewed by George Staikos.
10044
10045        QtWebKit Windows CE compile fix
10046
10047        https://bugs.webkit.org/show_bug.cgi?id=29379
10048
10049        There is no _aligned_alloc or _aligned_free on Windows CE.
10050        We just use the Windows code that was there before and use VirtualAlloc.
10051        But that also means that the BLOCK_SIZE must be 64K as this function
10052        allocates on 64K boundaries.
10053
10054        * runtime/Collector.cpp:
10055        (JSC::Heap::allocateBlock):
10056        (JSC::Heap::freeBlock):
10057        * runtime/Collector.h:
10058
100592009-09-19  Oliver Hunt  <oliver@apple.com>
10060
10061        Reviewed by Sam Weinig.
10062
10063        Implement ES5 Object.defineProperties function
10064        https://bugs.webkit.org/show_bug.cgi?id=29522
10065
10066        Implement Object.defineProperties.  Fairly simple patch, simply makes use of
10067        existing functionality used for defineProperty.
10068
10069        * runtime/CommonIdentifiers.h:
10070        * runtime/ObjectConstructor.cpp:
10071        (JSC::ObjectConstructor::ObjectConstructor):
10072        (JSC::defineProperties):
10073        (JSC::objectConstructorDefineProperties):
10074
100752009-09-19  Oliver Hunt  <oliver@apple.com>
10076
10077        Reviewed by NOBODY (Build fix).
10078
10079        Windows build fix part2
10080
10081        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
10082        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
10083
100842009-09-19  Oliver Hunt  <oliver@apple.com>
10085
10086        Reviewed by NOBODY (Buildfix).
10087
10088        Windows build fix part 1.
10089
10090        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
10091        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
10092
100932009-09-18  Oliver Hunt  <oliver@apple.com>
10094
10095        Reviewed by Geoff Garen.
10096
10097        Implement ES5 Object.defineProperty function
10098        https://bugs.webkit.org/show_bug.cgi?id=29503
10099
10100        Implement Object.defineProperty.  This requires adding the API to
10101        ObjectConstructor, along with a helper function that implements the
10102        ES5 internal [[ToPropertyDescriptor]] function.  It then adds
10103        JSObject::defineOwnProperty that implements the appropriate ES5 semantics.
10104        Currently defineOwnProperty uses a delete followed by a put to redefine
10105        attributes of a property, clearly this is less efficient than it could be
10106        but we can improve this if it needs to be possible in future.
10107
10108        * JavaScriptCore.exp:
10109        * debugger/DebuggerActivation.cpp:
10110        (JSC::DebuggerActivation::defineGetter):
10111        (JSC::DebuggerActivation::defineSetter):
10112        * debugger/DebuggerActivation.h:
10113        * interpreter/Interpreter.cpp:
10114        (JSC::Interpreter::privateExecute):
10115        * jit/JITStubs.cpp:
10116          Update defineGetter/Setter calls
10117        * runtime/CommonIdentifiers.h:
10118        * runtime/JSArray.cpp:
10119        (JSC::JSArray::getOwnPropertySlot):
10120        * runtime/JSGlobalObject.cpp:
10121        (JSC::JSGlobalObject::defineGetter):
10122        (JSC::JSGlobalObject::defineSetter):
10123        * runtime/JSGlobalObject.h:
10124        * runtime/JSObject.cpp:
10125        (JSC::JSObject::defineGetter):
10126        (JSC::JSObject::defineSetter):
10127        (JSC::putDescriptor):
10128        (JSC::JSObject::defineOwnProperty):
10129        * runtime/JSObject.h:
10130        * runtime/ObjectConstructor.cpp:
10131        (JSC::ObjectConstructor::ObjectConstructor):
10132        (JSC::objectConstructorGetOwnPropertyDescriptor):
10133        (JSC::toPropertyDescriptor):
10134        (JSC::objectConstructorDefineProperty):
10135        * runtime/ObjectPrototype.cpp:
10136        (JSC::objectProtoFuncDefineGetter):
10137        (JSC::objectProtoFuncDefineSetter):
10138        * runtime/PropertyDescriptor.cpp:
10139        (JSC::PropertyDescriptor::writable):
10140        (JSC::PropertyDescriptor::enumerable):
10141        (JSC::PropertyDescriptor::configurable):
10142        (JSC::PropertyDescriptor::isDataDescriptor):
10143        (JSC::PropertyDescriptor::isGenericDescriptor):
10144        (JSC::PropertyDescriptor::isAccessorDescriptor):
10145        (JSC::PropertyDescriptor::getter):
10146        (JSC::PropertyDescriptor::setter):
10147        (JSC::PropertyDescriptor::setDescriptor):
10148        (JSC::PropertyDescriptor::setAccessorDescriptor):
10149        (JSC::PropertyDescriptor::setWritable):
10150        (JSC::PropertyDescriptor::setEnumerable):
10151        (JSC::PropertyDescriptor::setConfigurable):
10152        (JSC::PropertyDescriptor::setSetter):
10153        (JSC::PropertyDescriptor::setGetter):
10154        (JSC::PropertyDescriptor::equalTo):
10155        (JSC::PropertyDescriptor::attributesEqual):
10156        (JSC::PropertyDescriptor::attributesWithOverride):
10157        * runtime/PropertyDescriptor.h:
10158        (JSC::PropertyDescriptor::PropertyDescriptor):
10159        (JSC::PropertyDescriptor::value):
10160        (JSC::PropertyDescriptor::setValue):
10161        (JSC::PropertyDescriptor::isEmpty):
10162        (JSC::PropertyDescriptor::writablePresent):
10163        (JSC::PropertyDescriptor::enumerablePresent):
10164        (JSC::PropertyDescriptor::configurablePresent):
10165        (JSC::PropertyDescriptor::setterPresent):
10166        (JSC::PropertyDescriptor::getterPresent):
10167        (JSC::PropertyDescriptor::operator==):
10168        (JSC::PropertyDescriptor::):
10169
101702009-09-18  Gabor Loki  <loki@inf.u-szeged.hu>
10171
10172        Reviewed by Gavin Barraclough.
10173
10174        Build fix to enable ARM_THUMB2 on Linux
10175        https://bugs.webkit.org/show_bug.cgi?id=
10176
10177        * jit/ExecutableAllocator.h:
10178        (JSC::ExecutableAllocator::cacheFlush):
10179        * jit/JITStubs.cpp:
10180        * wtf/Platform.h:
10181
101822009-09-18  Gabor Loki  <loki@inf.u-szeged.hu>
10183
10184        Reviewed by Gavin Barraclough.
10185
10186        Defines two pseudo-platforms for ARM and Thumb-2 instruction set.
10187        https://bugs.webkit.org/show_bug.cgi?id=29122
10188
10189        Introduces WTF_PLATFORM_ARM_TRADITIONAL and WTF_PLATFORM_ARM_THUMB2
10190        macros on ARM platforms. The PLATFORM(ARM_THUMB2) should be used
10191        when Thumb-2 instruction set is the required target. The
10192        PLATFORM(ARM_TRADITIONAL) is for generic ARM instruction set. In
10193        case where the code is common the PLATFORM(ARM) have to be used.
10194
10195        * assembler/ARMAssembler.cpp:
10196        * assembler/ARMAssembler.h:
10197        * assembler/ARMv7Assembler.h:
10198        * assembler/MacroAssembler.h:
10199        * assembler/MacroAssemblerARM.cpp:
10200        * assembler/MacroAssemblerARM.h:
10201        * assembler/MacroAssemblerCodeRef.h:
10202        (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
10203        * jit/ExecutableAllocator.h:
10204        * jit/JIT.h:
10205        * jit/JITInlineMethods.h:
10206        (JSC::JIT::beginUninterruptedSequence):
10207        (JSC::JIT::preserveReturnAddressAfterCall):
10208        (JSC::JIT::restoreReturnAddressBeforeReturn):
10209        (JSC::JIT::restoreArgumentReference):
10210        (JSC::JIT::restoreArgumentReferenceForTrampoline):
10211        * jit/JITOpcodes.cpp:
10212        * jit/JITStubs.cpp:
10213        (JSC::JITThunks::JITThunks):
10214        * jit/JITStubs.h:
10215        * wtf/Platform.h:
10216        * yarr/RegexJIT.cpp:
10217        (JSC::Yarr::RegexGenerator::generateEnter):
10218
102192009-09-18  Joerg Bornemann  <joerg.bornemann@nokia.com>
10220
10221        Reviewed by Simon Hausmann.
10222
10223        Fix the Qt/Windows CE build.
10224
10225        * JavaScriptCore.pri: Build the ce_time.cpp functions from
10226        within Qt externally.
10227        * wtf/DateMath.cpp: Removed unnecessary Qt #ifdef, for the
10228        Qt build these functions are no external, too.
10229
102302009-09-17  Janne Koskinen  <janne.p.koskinen@digia.com>
10231
10232        Reviewed by Simon Hausmann.
10233
10234        Symbian/WINSCW build fox.
10235
10236        Repeat Q_OS_WIN wchar_t hack for WINSCW, similar to
10237        revision 24774.
10238
10239        WINSCW defines wchar_t, thus UChar has to be wchar_t
10240
10241        * wtf/unicode/qt4/UnicodeQt4.h:
10242
102432009-09-17  Janne Koskinen  <janne.p.koskinen@digia.com>
10244
10245        Reviewed by Simon Hausmann.
10246
10247        Symbian/WINSCW build fix.
10248
10249        https://bugs.webkit.org/show_bug.cgi?id=29186
10250
10251        WINSCW Template specialisation name in declaration must the be the same as in implementation.
10252
10253        * runtime/LiteralParser.h:
10254
102552009-09-15  Norbert Leser  <norbert.leser@nokia.com>
10256
10257        Reviewed by Darin Adler.
10258
10259        https://bugs.webkit.org/show_bug.cgi?id=27060
10260
10261        Symbian compiler for emulator target (WINSCW) fails with
10262        "illegal operand" for m_attributesInPrevious in structure.ccp
10263        (when calling make_pair functions).
10264        This error is apparently due to the compiler not properly
10265        resolving the unsigned type of the declared bitfield.
10266
10267        Initial patch explicitly casted m_attributesInPrevious
10268        to unsigned, but since bitfield optimization is not critical for
10269        the emulator target, this conditional change in header file
10270        appears to be least intrusive.
10271
10272        * runtime/Structure.h:
10273
102742009-09-16  Gabor Loki  <loki@inf.u-szeged.hu>
10275
10276        Reviewed by Darin Adler.
10277
10278        Fix GCC warnings on ARM_THUMB2 platform
10279
10280        * assembler/ARMv7Assembler.h:
10281        (JSC::ARMThumbImmediate::countLeadingZerosPartial):
10282        * assembler/MacroAssemblerARMv7.h:
10283        (JSC::MacroAssemblerARMv7::branchTruncateDoubleToInt32):
10284        (JSC::MacroAssemblerARMv7::moveFixedWidthEncoding):
10285
102862009-09-16  Greg Bolsinga  <bolsinga@apple.com>
10287
10288        Add ENABLE(INSPECTOR)
10289        https://bugs.webkit.org/show_bug.cgi?id=29260
10290
10291        Reviewed by David Kilzer.
10292
10293        * wtf/Platform.h:
10294
102952009-09-16  Greg Bolsinga  <bolsinga@apple.com>
10296
10297        Add ENABLE(CONTEXT_MENUS)
10298        https://bugs.webkit.org/show_bug.cgi?id=29225
10299
10300        Reviewed by David Kilzer.
10301
10302        * wtf/Platform.h:
10303
103042009-09-16  Benjamin C Meyer  <benjamin.meyer@torchmobile.com>
10305
10306        Reviewed by Eric Seidel.
10307
10308        The webkit stdint and stdbool headers exists because
10309        the compiler MSVC doesn't include them.  The check
10310        should not check for PLATFORM(WIN_OS) but for MSVC.
10311
10312        * os-win32/stdbool.h:
10313        * os-win32/stdint.h:
10314
103152009-09-16  Greg Bolsinga  <bolsinga@apple.com>
10316
10317        Add ENABLE(DRAG_SUPPORT)
10318        https://bugs.webkit.org/show_bug.cgi?id=29233
10319
10320        Reviewed by David Kilzer.
10321
10322        * wtf/Platform.h:
10323
103242009-09-16  Kevin Ollivier  <kevino@theolliviers.com>
10325
10326        waf build fix after flag was moved to correct place.
10327
10328        * wscript:
10329
103302009-09-16  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
10331
10332        Reviewed by Simon Hausmann.
10333
10334        [Qt] Build fix for 64-bit Qt on Mac OS X
10335
10336        * wtf/Platform.h: Use JSVALUE64 on DARWIN, not only on MAC
10337
103382009-09-16  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
10339
10340        Reviewed by Simon Hausmann.
10341
10342        [Qt] Fix wtf/ThreadSpecific.h under Qt to free thread local objects.
10343        https://bugs.webkit.org/show_bug.cgi?id=29295
10344
10345        This is an important fix when JavaScript workers are in use, since
10346        unfreed ThreadGlobalDatas leak a big amount of memory (50-100k each).
10347        QThreadStorage calls the destructor of a given object, which is the
10348        ThreadSpecific::Data. Unlike pthread, Qt is object oriented, and does
10349        not support the calling of a static utility function when the thread
10350        is about to close. In this patch we call the ThreadSpecific::destroy()
10351        utility function from the destructor of ThreadSpecific::Data. Moreover,
10352        since Qt resets all thread local values to 0 before the calling of the
10353        appropriate destructors, we set back the pointer to its original value.
10354        This is necessary because the get() method of the ThreadSpecific
10355        object may be called during the exuction of the destructor.
10356
10357        * wtf/ThreadSpecific.h:
10358        (WTF::ThreadSpecific::Data::~Data):
10359        (WTF::::~ThreadSpecific):
10360        (WTF::::set):
10361        (WTF::::destroy):
10362
103632009-09-10  Oliver Hunt  <oliver@apple.com>
10364
10365        Reviewed by Geoff Garen.
10366
10367        Allow anonymous storage inside JSObject
10368        https://bugs.webkit.org/show_bug.cgi?id=29168
10369
10370        Add the concept of anonymous slots to Structures so that it is
10371        possible to store references to values that need marking in the
10372        standard JSObject storage buffer.  This allows us to reduce the
10373        malloc overhead of some objects (by allowing them to store JS
10374        values in the inline storage of the object) and reduce the
10375        dependence of custom mark functions (if all an objects children
10376        are in the standard object property storage there's no need to
10377        mark them manually).
10378
10379        * JavaScriptCore.exp:
10380        * runtime/JSObject.h:
10381        (JSC::JSObject::putAnonymousValue):
10382        (JSC::JSObject::getAnonymousValue):
10383        (JSC::JSObject::addAnonymousSlots):
10384        * runtime/JSWrapperObject.h:
10385        (JSC::JSWrapperObject::createStructure):
10386        (JSC::JSWrapperObject::JSWrapperObject):
10387        (JSC::JSWrapperObject::setInternalValue):
10388        * runtime/PropertyMapHashTable.h:
10389        * runtime/Structure.cpp:
10390        (JSC::Structure::~Structure):
10391        (JSC::Structure::materializePropertyMap):
10392        (JSC::Structure::addAnonymousSlotsTransition):
10393        (JSC::Structure::copyPropertyTable):
10394        (JSC::Structure::put):
10395        (JSC::Structure::rehashPropertyMapHashTable):
10396        * runtime/Structure.h:
10397        (JSC::Structure::propertyStorageSize):
10398        (JSC::StructureTransitionTable::reifySingleTransition):
10399        * runtime/StructureTransitionTable.h:
10400        (JSC::StructureTransitionTable::TransitionTable::addSlotTransition):
10401        (JSC::StructureTransitionTable::TransitionTable::removeSlotTransition):
10402        (JSC::StructureTransitionTable::TransitionTable::getSlotTransition):
10403        (JSC::StructureTransitionTable::getAnonymousSlotTransition):
10404        (JSC::StructureTransitionTable::addAnonymousSlotTransition):
10405        (JSC::StructureTransitionTable::removeAnonymousSlotTransition):
10406
104072009-09-15  Alex Milowski  <alex@milowski.com>
10408
10409        Reviewed by Tor Arne Vestbø.
10410
10411        Added the ENABLE_MATHML define to the features
10412
10413        * Configurations/FeatureDefines.xcconfig:
10414
104152009-09-15 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
10416
10417        Reviewed by Tor Arne Vestbø.
10418
10419        [Qt] Build fix for windows.
10420
10421        After http://trac.webkit.org/changeset/47795 the MinGW build broke,
10422        because MinGW has __mingw_aligned_malloc instead of _aligned_malloc.
10423
10424        * runtime/Collector.cpp:
10425        (JSC::Heap::allocateBlock): MinGW case added.
10426        (JSC::Heap::freeBlock): MinGW case added.
10427
104282009-09-15  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
10429
10430        Reviewed by Tor Arne Vestbø.
10431
10432        [Qt] Build fix for Windows/MinGW
10433
10434        https://bugs.webkit.org/show_bug.cgi?id=29268
10435
10436        * wtf/Platform.h: JSVALUE32_64 temporarily disabled on PLATFORM(WIN_OS) with COMPILER(MINGW)
10437
104382009-09-14  Gabor Loki  <loki@inf.u-szeged.hu>
10439
10440        Reviewed by Gavin Barraclough.
10441
10442        Detect VFP at runtime in generic ARM port on Linux platform.
10443        https://bugs.webkit.org/show_bug.cgi?id=29076
10444
10445        * JavaScriptCore.pri:
10446        * assembler/MacroAssemblerARM.cpp: Added.
10447        (JSC::isVFPPresent):
10448        * assembler/MacroAssemblerARM.h:
10449        (JSC::MacroAssemblerARM::supportsFloatingPoint):
10450
104512009-09-14  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
10452
10453        Reviewed by Tor Arne Vestbø.
10454
10455        [Qt] Build fix for windows build.
10456
10457        * JavaScriptCore.pri: Correct a logic error.
10458        * pcre/dftables: Add missing paranthesis for tmpdir function.
10459
104602009-09-12  Oliver Hunt  <oliver@apple.com>
10461
10462        Reviewed by NOBODY (Build fix).
10463
10464        Build fix for windows exports (again).
10465
10466        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
10467        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
10468
104692009-09-12  Oliver Hunt  <oliver@apple.com>
10470
10471        Reviewed by NOBODY (Build fix).
10472
10473        Build fix for windows exports.
10474
10475        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
10476        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
10477
104782009-09-12  Oliver Hunt  <oliver@apple.com>
10479
10480        Reviewed by NOBODY (Build fix).
10481
10482        Correct fix for non-allinonefile builds
10483
10484        * runtime/ObjectConstructor.cpp:
10485
104862009-09-12  Oliver Hunt  <oliver@apple.com>
10487
10488        Reviewed by NOBODY (Build fix).
10489
10490        Fix non-allinonefile builds
10491
10492        * runtime/ObjectConstructor.cpp:
10493
104942009-09-12  Oliver Hunt  <oliver@apple.com>
10495
10496        Reviewed by Maciej Stachowiak.
10497
10498        [ES5] Implement Object.keys
10499        https://bugs.webkit.org/show_bug.cgi?id=29170
10500
10501        This patch basically requires two separate steps, the first is to split getPropertyNames
10502        into two functions -- getOwnPropertyNames and getPropertyNames, basically making them behave
10503        in the same way as getOwnPropertySlot and getPropertySlot.  In essence getOwnPropertyNames
10504        produces the list of properties on an object excluding its prototype chain and getPropertyNames
10505        just iterates the the object and its prototype chain calling getOwnPropertyNames at each level.
10506
10507        * API/JSCallbackObject.h:
10508        * API/JSCallbackObjectFunctions.h:
10509        (JSC::::getOwnPropertyNames):
10510        * JavaScriptCore.exp:
10511        * debugger/DebuggerActivation.cpp:
10512        (JSC::DebuggerActivation::getOwnPropertyNames):
10513        * debugger/DebuggerActivation.h:
10514        * runtime/CommonIdentifiers.h:
10515        * runtime/JSArray.cpp:
10516        (JSC::JSArray::getOwnPropertyNames):
10517        * runtime/JSArray.h:
10518        * runtime/JSByteArray.cpp:
10519        (JSC::JSByteArray::getOwnPropertyNames):
10520        * runtime/JSByteArray.h:
10521        * runtime/JSNotAnObject.cpp:
10522        (JSC::JSNotAnObject::getOwnPropertyNames):
10523        * runtime/JSNotAnObject.h:
10524        * runtime/JSObject.cpp:
10525        (JSC::JSObject::getOwnPropertyNames):
10526        * runtime/JSObject.h:
10527        * runtime/JSVariableObject.cpp:
10528        (JSC::JSVariableObject::getOwnPropertyNames):
10529        * runtime/JSVariableObject.h:
10530        * runtime/ObjectConstructor.cpp:
10531        (JSC::ObjectConstructor::ObjectConstructor):
10532        (JSC::objectConstructorKeys):
10533        * runtime/RegExpMatchesArray.h:
10534        (JSC::RegExpMatchesArray::getOwnPropertyNames):
10535        * runtime/StringObject.cpp:
10536        (JSC::StringObject::getOwnPropertyNames):
10537        * runtime/StringObject.h:
10538        * runtime/Structure.cpp:
10539        (JSC::Structure::getOwnEnumerablePropertyNames):
10540        (JSC::Structure::getEnumerablePropertyNames):
10541        * runtime/Structure.h:
10542
105432009-09-11  Oliver Hunt  <oliver@apple.com>
10544
10545        Reviewed by Sam Weinig.
10546
10547        getPropertyNames caching is invalid when the prototype chain contains objects with custom getPropertyNames
10548        https://bugs.webkit.org/show_bug.cgi?id=29214
10549
10550        Add a flag to TypeInfo to indicate whether a type overrides getPropertyNames.
10551        This flag is used to make sure that caching of the property name data is safe.
10552
10553        * API/JSCallbackConstructor.h:
10554        (JSC::JSCallbackConstructor::createStructure):
10555        * debugger/DebuggerActivation.h:
10556        (JSC::DebuggerActivation::createStructure):
10557        * runtime/BooleanObject.h:
10558        (JSC::BooleanObject::createStructure):
10559        * runtime/DatePrototype.h:
10560        (JSC::DatePrototype::createStructure):
10561        * runtime/FunctionPrototype.h:
10562        (JSC::FunctionPrototype::createStructure):
10563        * runtime/JSONObject.h:
10564        (JSC::JSONObject::createStructure):
10565        * runtime/JSObject.h:
10566        (JSC::JSObject::createStructure):
10567        * runtime/JSTypeInfo.h:
10568        (JSC::TypeInfo::hasDefaultGetPropertyNames):
10569        * runtime/JSVariableObject.h:
10570        (JSC::JSVariableObject::createStructure):
10571        * runtime/JSWrapperObject.h:
10572        (JSC::JSWrapperObject::createStructure):
10573        * runtime/MathObject.h:
10574        (JSC::MathObject::createStructure):
10575        * runtime/NumberConstructor.h:
10576        (JSC::NumberConstructor::createStructure):
10577        * runtime/NumberObject.h:
10578        (JSC::NumberObject::createStructure):
10579        * runtime/RegExpConstructor.h:
10580        (JSC::RegExpConstructor::createStructure):
10581        * runtime/RegExpObject.h:
10582        (JSC::RegExpObject::createStructure):
10583        * runtime/StructureChain.cpp:
10584        (JSC::StructureChain::isCacheable):
10585
105862009-09-11  Alexey Proskuryakov  <ap@webkit.org>
10587
10588        Reviewed by Geoff Garen.
10589
10590        https://bugs.webkit.org/show_bug.cgi?id=29207
10591        Add checks for using WebCore JS context on secondary threads
10592
10593        * runtime/JSGlobalData.cpp: (JSC::JSGlobalData::JSGlobalData):
10594        * runtime/JSGlobalData.h:
10595        Added a new mainThreadOnly flag that WebCore would set.
10596
10597        * runtime/Collector.cpp: (JSC::Heap::registerThread): JSC API methods always call this,
10598        so this is a good place to check that the API isn't used form a wrong thread.
10599
106002009-09-11  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
10601
10602        Reviewed by Simon Hausmann.
10603
10604        Compiling JavaScriptCore on sparc 64 with gcc fails.
10605
10606        ThreadSafeShared uses the atomic __gnu_cxx::__exchange_and_add with an int,
10607        however on sparc 64 the _Atomic_word argument is typedefed to long (8 bytes).
10608
10609        The patch disables WTF_USE_LOCKFREE_THREADSAFESHARED in ThreadSafeShared to use
10610        a mutex instead when compiling for sparc 64 with gcc.
10611
10612        https://bugs.webkit.org/show_bug.cgi?id=29175
10613
10614        * wtf/Platform.h:
10615        __sparc64__ is not defined on all OS.
10616        Uses instead: __sparc__ && __arch64__ || __sparcv9
10617        * wtf/Threading.h:
10618
106192009-09-11  Prasanth Ullattil  <prasanth.ullattil@nokia.com>
10620
10621        Reviewed by Simon Hausmann.
10622
10623        Fix compile error on Windows7(64Bit) with latest SDK.
10624
10625        Added the missing include file.
10626
10627        * runtime/UString.cpp:
10628
106292009-09-11  Joerg Bornemann  <joerg.bornemann@trolltech.com>
10630
10631        Reviewed by Simon Hausmann.
10632
10633        Qt/Windows CE compile fix, include the executable allocator and
10634        markstack implementation in the windows build.
10635
10636        * JavaScriptCore.pri:
10637
106382009-09-08  John Abd-El-Malek  <jam@chromium.org>
10639
10640        Reviewed by Dimitri Glazkov.
10641
10642        Remove unneeded define for ActiveX.
10643        https://bugs.webkit.org/show_bug.cgi?id=29054
10644
10645        * wtf/Platform.h:
10646
106472009-09-10  Mark Rowe  <mrowe@apple.com>
10648
10649        Rubber-stamped by Sam Weinig.
10650
10651        Update JavaScriptCore and WebKit's FeatureDefines.xcconfig so that they are in sync with WebCore as they need to be.
10652
10653        * Configurations/FeatureDefines.xcconfig:
10654
106552009-09-10  Fumitoshi Ukai  <ukai@chromium.org>
10656
10657        Reviewed by Alexey Proskuryakov.
10658
10659        Export WTF::tryFastMalloc used in WebSocketChannel.
10660        https://bugs.webkit.org/show_bug.cgi?id=28038
10661
10662        * JavaScriptCore.exp:
10663        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
10664        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
10665
106662009-09-10  Oliver Hunt  <oliver@apple.com>
10667
10668        Reviewed by NOBODY (Build fix).
10669
10670        Make StructureTransitionTable use an enum for the PtrAndFlags member
10671        used for the single transition slot optimisation.
10672
10673        * runtime/StructureTransitionTable.h:
10674        (JSC::StructureTransitionTable::StructureTransitionTable):
10675        (JSC::StructureTransitionTable::usingSingleTransitionSlot):
10676        (JSC::StructureTransitionTable::):
10677
106782009-09-10  Oliver Hunt  <oliver@apple.com>
10679
10680        Reviewed by Geoff Garen.
10681
10682        Refactor StructureTransitionTable and Structure to unify handling of the single slot optimization
10683        https://bugs.webkit.org/show_bug.cgi?id=29141
10684
10685        Make StructureTransitionTable encapsulate the single transition slot optimization.
10686
10687        * runtime/Structure.cpp:
10688        (JSC::Structure::Structure):
10689        (JSC::Structure::~Structure):
10690        (JSC::Structure::addPropertyTransitionToExistingStructure):
10691        (JSC::Structure::addPropertyTransition):
10692        (JSC::Structure::addPropertyWithoutTransition):
10693        (JSC::Structure::removePropertyWithoutTransition):
10694        (JSC::Structure::hasTransition):
10695        * runtime/Structure.h:
10696        (JSC::StructureTransitionTable::contains):
10697        (JSC::StructureTransitionTable::get):
10698        (JSC::StructureTransitionTable::hasTransition):
10699        (JSC::StructureTransitionTable::reifySingleTransition):
10700        * runtime/StructureTransitionTable.h:
10701        (JSC::StructureTransitionTable::StructureTransitionTable):
10702        (JSC::StructureTransitionTable::~StructureTransitionTable):
10703        (JSC::StructureTransitionTable::remove):
10704        (JSC::StructureTransitionTable::add):
10705        (JSC::StructureTransitionTable::table):
10706        (JSC::StructureTransitionTable::singleTransition):
10707        (JSC::StructureTransitionTable::usingSingleTransitionSlot):
10708        (JSC::StructureTransitionTable::setSingleTransition):
10709        (JSC::StructureTransitionTable::setTransitionTable):
10710        (JSC::StructureTransitionTable::):
10711        * wtf/PtrAndFlags.h:
10712        (WTF::PtrAndFlags::PtrAndFlags):
10713
107142009-09-10  Zoltan Horvath  <zoltan@webkit.org>
10715
10716        Reviewed by Darin Adler.
10717
10718        Implement fastDeleteSkippingDestructor for FastAllocBase and fastDeleteAllValues for HashSet
10719        https://bugs.webkit.org/show_bug.cgi?id=25930
10720
10721        FastAllocBase has been extended with fastDeleteSkippingDestructor function which
10722        releases memory without destructor call. fastDeleteAllValues has been implemented
10723        similar as deleteAllValues but it uses fastDelete function to release memory.
10724
10725        * wtf/FastAllocBase.h:
10726        (WTF::fastDeleteSkippingDestructor):
10727        * wtf/HashSet.h:
10728        (WTF::fastDeleteAllValues):
10729
107302009-09-10  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
10731
10732        Reviewed by Darin Adler.
10733
10734        ARM compiler does not understand GCC visibility attribute
10735        https://bugs.webkit.org/show_bug.cgi?id=29079
10736
10737        * API/JSBase.h: Make the test more specific to hit only
10738        the GCC compiler
10739
107402009-09-10  Adam Barth  <abarth@webkit.org>
10741
10742        Unreviewed revert of the previous change.  It broke the tests.
10743
10744        * wtf/dtoa.cpp:
10745        (WTF::dtoa):
10746
107472009-09-10  Ben Laurie  <benl@google.com>
10748
10749        Reviewed by Adam Barth.
10750
10751        <https://bugs.webkit.org/show_bug.cgi?id=26836>
10752
10753        If dtoa was given a small buffer and the number was either infinite or
10754        NaN, then the buffer would be overflowed.
10755
10756        * wtf/dtoa.cpp:
10757
107582009-09-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
10759
10760        Reviewed by Darin Adler.
10761
10762        Change reinterpret_cast to static_cast in r48212.
10763
10764        * jit/ExecutableAllocator.h:
10765        (JSC::ExecutableAllocator::cacheFlush):
10766
107672009-09-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
10768
10769        Reviewed by Darin Adler.
10770
10771        Remove WTF_PLATFORM_FORCE_PACK as it is no longer used
10772        https://bugs.webkit.org/show_bug.cgi?id=29066
10773
10774        * wtf/Platform.h:
10775
107762009-09-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
10777
10778        Reviewed by Ariya Hidayat.
10779
10780        Implement flushing the instruction cache for Symbian
10781        https://bugs.webkit.org/show_bug.cgi?id=29075
10782
10783        * jit/ExecutableAllocator.h:
10784        (JSC::ExecutableAllocator::cacheFlush): Call IMB_Range to flush
10785        the instruction cache on Symbian
10786
107872009-09-09  Kent Hansen  <khansen@trolltech.com>
10788
10789        Reviewed by Darin Adler.
10790
10791        https://bugs.webkit.org/show_bug.cgi?id=29024
10792        Make JavaScriptCore compile on platforms with case-insensitive file systems and typeinfo.h in STL
10793
10794        These platforms include Microsoft Visual Studio 2003, and Symbian with Metrowerks compiler.
10795
10796        * JavaScriptCore.gypi:
10797        * JavaScriptCore.xcodeproj/project.pbxproj:
10798        * runtime/JSTypeInfo.h: Copied from JavaScriptCore/runtime/TypeInfo.h.
10799        * runtime/Structure.h:
10800        * runtime/TypeInfo.h: Removed.
10801
108022009-09-08  Oliver Hunt  <oliver@apple.com>
10803
10804        Reviewed by Maciej Stachowiak.
10805
10806        JSON.stringify(Date) loses the milliseconds information
10807        https://bugs.webkit.org/show_bug.cgi?id=29063
10808
10809        Make sure we include milliseconds in the output of toISOString.
10810
10811        * runtime/DatePrototype.cpp:
10812        (JSC::dateProtoFuncToISOString):
10813
108142009-09-08  Kevin Ollivier  <kevino@theolliviers.com>
10815
10816        wx build fix, generate derived sources earlier in order to make sure
10817        they're found by the build system when generating the list of sources to build.
10818
10819        * wscript:
10820
108212009-09-08  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
10822
10823        Reviewed by Simon Hausmann.
10824
10825        Build fix when USE(LOCKFREE_THREADSAFESHARED) is not defined
10826        https://bugs.webkit.org/show_bug.cgi?id=29011
10827
10828        * wtf/Threading.h: Use LOCKFREE_THREADSAFESHARED guard for
10829        atomicIncrement and atomicDecrement
10830
108312009-09-07  Zoltan Horvath  <zoltan@webkit.org>
10832
10833        Reviewed by Darin Adler.
10834
10835        Allow custom memory allocation control in Yarr's RegexInterpreter
10836        https://bugs.webkit.org/show_bug.cgi?id=29025
10837
10838        Inherits RegexInterpreter classes from FastAllocBase (bug #20422), which has
10839        been instantiated by 'new':
10840
10841        class ByteDisjunction
10842        -> instantiated in JavaScriptCore/yarr/RegexInterpreter.cpp:1462
10843
10844        struct BytecodePattern
10845        -> instantiated in JavaScriptCore/yarr/RegexInterpreter.cpp:1279
10846
10847        * yarr/RegexInterpreter.h:
10848
108492009-09-07  Drew Wilson  <atwilson@google.com>
10850
10851        Reverting r48121 to fix Windows build errors.
10852
10853        * JavaScriptCore.exp:
10854
108552009-09-07  Drew Wilson  <atwilson@google.com>
10856
10857        Reviewed by David Levin.
10858
10859        Enable SHARED_WORKERS by default
10860        https://bugs.webkit.org/show_bug.cgi?id=28959
10861
10862        * Configurations/FeatureDefines.xcconfig:
10863
108642009-09-07  Fumitoshi Ukai  <ukai@chromium.org>
10865
10866        Reviewed by Alexey Proskuryakov.
10867
10868        Export WTF::tryFastMalloc used in WebSocketChannel.
10869        https://bugs.webkit.org/show_bug.cgi?id=28038
10870
10871        * JavaScriptCore.exp:
10872
108732009-09-04  Oliver Hunt  <oliver@apple.com>
10874
10875        Reviewed by NOBODY (Build fix).
10876
10877        Fix windows export files
10878
10879        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
10880        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
10881
108822009-09-04  Oliver Hunt  <oliver@apple.com>
10883
10884        Reviewed by Gavin Barraclough.
10885
10886        [[ToString]] conversion should use the actual toString function for String objects.
10887
10888        Remove incorrect specialisations of toString conversions on StringObject.
10889
10890        * JavaScriptCore.exp:
10891        * runtime/StringObject.cpp:
10892        * runtime/StringObject.h:
10893
108942009-09-04  Steve Falkenburg  <sfalken@apple.com>
10895
10896        Windows build fix.
10897
10898        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Add new export.
10899        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Add new export.
10900
109012009-09-04  Steve Falkenburg  <sfalken@apple.com>
10902
10903        Windows build fix.
10904
10905        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Remove unneeded export.
10906        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Remove unneeded export.
10907
109082009-09-04  Darin Adler  <darin@apple.com>
10909
10910        Reviewed by Geoff Garen.
10911
10912        DateInstance object collected on ARM JIT (JSValue: WTF_USE_JSVALUE32)
10913        https://bugs.webkit.org/show_bug.cgi?id=28909
10914
10915        Part two.
10916
10917        Make some improvements to garbage collection code:
10918
10919            1) Create a runtime assertion that catches any classes that
10920               override markChildren but have the HasDefaultMark bit set.
10921            2) Remove checks of the mark bit outside the MarkStack::append
10922               function; they are redundant.
10923            3) Improve the efficiency of the asObject and asArray functions
10924               when called on JSCell* to avoid a round trip to JSValue.
10925            4) Make more callers use the checked asCell and asObject
10926               casting functions rather than unchecked casts.
10927            5) Removed the JSCell::marked function and other GC-related
10928               functions because these operations are no longer things that
10929               code other than the core GC code needs to do directly. Fixed
10930               callers that were calling them.
10931
10932        * runtime/Collector.cpp:
10933        (JSC::Heap::markConservatively): Removed unneeded call to MarkStack::drain.
10934        (JSC::Heap::markProtectedObjects): Removed unneeded check of the mark
10935        bit and call to MarkStack::drain.
10936        (JSC::Heap::collect): Removed unneeded checks of the mark bit and also
10937        changed call to SmallStrings::mark to call markChildren instead to match
10938        the rest of the objects.
10939        (JSC::typeName): Removed unneeded cast to JSObject*.
10940
10941        * runtime/JSArray.h:
10942        (JSC::asArray): Added an overload for JSCell* and changed the JSValue
10943        version to call it. Removed some unneeded casts.
10944        (JSC::JSArray::markChildrenDirect): Marked this function inline. It's in
10945        a header, and if not marked inline this could lead to linking problems.
10946        (JSC::MarkStack::markChildren): Added. This helper function is used by
10947        the drain function to avoid repating code. Also added the code here to
10948        check fro default mark violations in debug code. If a markChildren
10949        function adds something to the mark stack, but the type info claimed
10950        hasDefaultMark was true, then we will get an assertion now. Also fixed
10951        the assertion about the mark bit to use the Heap function directly
10952        because we don't have a JSCell::marked function any more.
10953        (JSC::MarkStack::drain): Changed a local variable from "v" to "value",
10954        and from "currentCell" to "cell". Changed to call markChildren in two
10955        places instead of repeating a chain of if statements twice. Changed
10956        code that reads and writes the mark bit to use Heap::isCellMarked and
10957        Heap::markCell so we can eliminate the JSCell::marked and
10958        JSCell::markCellDirect functions.
10959
10960        * runtime/JSCell.h: Removed JSCell's markCellDirect and marked member
10961        functions. Added a comment explaining that asCell should be deprecated
10962        in favor of the JSValue asCell member function.
10963        (JSC::MarkStack::append): Added the assertion that catches callers
10964        that have set the HasDefaultMark bit incorrectly. Changed
10965        code that reads and writes the mark bit to use Heap::isCellMarked and
10966        Heap::markCell so we can eliminate the JSCell::marked and
10967        JSCell::markCellDirect functions. Moved the overload of
10968        MarkStack::append for JSValue here so it can call through to the cell
10969        version. The old version had a copy of all the code instead, but that
10970        repeated the conversion from JSValue to JSCell* and the check for
10971        whether a value is a cell multiple times.
10972        (JSC::Structure::markAggregate): Moved this function here to avoid
10973        dependencies for Structure.h, since this calls MarkStack::append.
10974
10975        * runtime/JSObject.cpp:
10976        (JSC::JSObject::markChildren): Added code to clear
10977        m_isCheckingForDefaultMarkViolation so the marking done by JSObject
10978        doesn't trigger the assertion.
10979
10980        * runtime/JSValue.h: Moved some stray includes that were outside the
10981        header guard inside it. Not sure how that happened! Removed the
10982        GC-related member functions markChildren, hasChildren, marked, and
10983        markDirect.
10984
10985        * runtime/JSWrapperObject.h: Made markChildren private.
10986        (JSC::JSWrapperObject::createStructure): Added. Fixes a bug where the
10987        HasDefaultMark bit was set.
10988
10989        * runtime/MarkStack.h: Added m_isCheckingForDefaultMarkViolation and
10990        initialized it to false. Moved the append function body from here to
10991        JSCell.h. Added a declaration of a private markChildren function used
10992        inside the drain function.
10993
10994        * runtime/SmallStrings.cpp:
10995        (JSC::SmallStrings::markChildren): Changed the name and style of this
10996        function to match other functions. This allows us to share the normal
10997        mark stack code path.
10998
10999        * runtime/SmallStrings.h: Changed the name and interface of mark to
11000        the more-normal markChildren style.
11001
11002        * runtime/Structure.h: Moved the body of markAggregate into the
11003        JSCell.h to avoid a circular dependency with JSCell.h.
11004
110052009-09-04  Darin Adler  <darin@apple.com>
11006
11007        Reviewed by Geoff Garen.
11008
11009        DateInstance object collected on ARM JIT (JSValue: WTF_USE_JSVALUE32)
11010        https://bugs.webkit.org/show_bug.cgi?id=28909
11011
11012        Part one.
11013
11014        Make some improvements to garbage collection code:
11015
11016            1) Fix the two classes that had the default mark bit set but
11017               should not.
11018            2) Remove checks of the mark bit outside the MarkStack::append
11019               function; they are redundant.
11020            3) Make more callers use the checked asCell and asObject
11021               casting functions rather than unchecked casts.
11022            4) Removed some GC-related functions because these operations are
11023               no longer things that code other than the core GC code needs
11024               to do directly. Fixed callers that were calling them.
11025
11026        * bytecode/CodeBlock.cpp:
11027        (JSC::CodeBlock::markAggregate): Removed unneeded check of the mark
11028        bit before calling MarkStack::append.
11029
11030        * interpreter/Register.h: Removed unneeded marked and markChildren
11031        functions.
11032
11033        * jit/JITStubs.cpp:
11034        (op_eq): Removed unneeded assertions, instead using checked casting
11035        functions such as asObject.
11036
11037        * runtime/ArgList.h: Added now-needed forward declaration of MarkStack.
11038
11039        * runtime/GetterSetter.cpp:
11040        (JSC::GetterSetter::markChildren): Remmoved unneeded check of the mark bit.
11041
11042        * runtime/GlobalEvalFunction.h:
11043        (JSC::GlobalEvalFunction::createStructure): Added. Fixes a bug where the
11044        HasDefaultMark bit was set.
11045
11046        * runtime/JSCell.cpp:
11047        (JSC::JSCell::getObject): Use asObject to avoid a direct static_cast.
11048
11049        * runtime/JSObject.h:
11050        (JSC::asObject): Added an overload for JSCell* and changed the JSValue
11051        version to call it.
11052        (JSC::JSValue::get): Use asObject to avoid a direct static_cast.
11053
11054        * runtime/JSWrapperObject.h: Made markChildren private.
11055        (JSC::JSWrapperObject::createStructure): Added. Fixes a bug where the
11056        HasDefaultMark bit was set. Later we may want to optimize this for
11057        wrapper types that never have cells in their internal values, but there
11058        is no measured performance regression in SunSpider or V8 doing this
11059        all the time.
11060
11061        * runtime/MarkStack.cpp: Tweaked formatting.
11062
110632009-09-04  Kevin Ollivier  <kevino@theolliviers.com>
11064
11065        wx build fix. Switch USE_ defines over to the compiler so that they can be
11066        checked by files not including config.h (like WebCorePrefix.h).
11067
11068        * wtf/Platform.h:
11069
110702009-09-03  Yong Li  <yong.li@torchmobile.com>
11071
11072        Reviewed by David Levin.
11073
11074        Remove unnecessary dependency on unistd.h
11075        https://bugs.webkit.org/show_bug.cgi?id=28962
11076
11077        * runtime/Completion.cpp:
11078
110792009-09-03  Fumitoshi Ukai  <ukai@chromium.org>
11080
11081        Reviewed by Eric Seidel.
11082
11083        Add strnstr for Linux and Windows in StringExtras.h
11084        https://bugs.webkit.org/show_bug.cgi?id=28901
11085
11086        * wtf/StringExtras.h:
11087        (strnstr):
11088
110892009-09-03  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
11090
11091        Reviewed by Darin Adler.
11092
11093        Allow custom memory allocation control for JavaScriptCore's HashEntry class
11094        https://bugs.webkit.org/show_bug.cgi?id=27830
11095
11096        Inherits HashEntry class from FastAllocBase because it has been
11097        instantiated by 'new' JavaScriptCore/runtime/Lookup.cpp:32.
11098
11099        * runtime/Lookup.h:
11100
111012009-09-02  Gavin Barraclough  <barraclough@apple.com>
11102
11103        Should crash if JIT code buffer allocation fails.
11104
11105        https://bugs.webkit.org/show_bug.cgi?id=28926
11106        <rdar://problem/7031922>
11107
11108        * jit/ExecutableAllocatorPosix.cpp:
11109        (JSC::ExecutablePool::systemAlloc):
11110        * jit/ExecutableAllocatorWin.cpp:
11111        (JSC::ExecutablePool::systemAlloc):
11112
111132009-09-02  Kevin Ollivier  <kevino@theolliviers.com>
11114
11115        waf build fixes for Windows/MSVC.
11116
11117        * wscript:
11118
111192009-09-02  Kevin Ollivier  <kevino@theolliviers.com>
11120
11121        Build fix for building on Windows.
11122
11123        * wtf/ThreadingPthreads.cpp:
11124
111252009-09-02  Norbert Leser  <norbert.leser@nokia.com>
11126
11127        Reviewed by Eric Seidel.
11128
11129        Use fastMalloc when neither MMAP nor VIRTUALALLOC are enabled
11130
11131        RegisterFile constructor currently throws #error when both
11132        MMAP and VIRTUALALLOC conditions fail.
11133        On any platform that does not provide these features
11134        (for instance, Symbian),
11135        the fallback should be regular malloc (or fastMalloc).
11136        It is functionally equivalent in this case, even though it may
11137        have certain drawbacks such as lack of dynamic pre-allocation.
11138
11139        * interpreter/RegisterFile.cpp:
11140        (JSC::RegisterFile::~RegisterFile):
11141        * interpreter/RegisterFile.h:
11142        (JSC::RegisterFile::RegisterFile):
11143
111442009-08-31  Robert Agoston  <Agoston.Robert@stud.u-szeged.hu>
11145
11146        Reviewed by Gavin Barraclough.
11147
11148        Fixed typo.
11149        https://bugs.webkit.org/show_bug.cgi?id=28691
11150
11151        * parser/Parser.h:
11152        (JSC::Parser::parse):
11153
111542009-08-27  Oliver Hunt  <oliver@apple.com>
11155
11156        Reviewed by Maciej Stachowiak.
11157
11158        JSON Stringifier does not follow ES5 spec for handling of Number, String and Boolean objects
11159        https://bugs.webkit.org/show_bug.cgi?id=28797
11160
11161        Fixed unwrapBoxedPrimitive to do the right thing, which necessitated a couple of new exception
11162        checks, and corrected the logic in gap to correctly convert Number and String objects.
11163
11164        * runtime/JSONObject.cpp:
11165        (JSC::unwrapBoxedPrimitive):
11166        (JSC::gap):
11167        (JSC::Stringifier::Stringifier):
11168        (JSC::Stringifier::appendStringifiedValue):
11169
111702009-08-27  Oliver Hunt  <oliver@apple.com>
11171
11172        Reviewed by Adam Roben.
11173
11174        JSON.stringify replacer array does not accept values that are not string primitives.
11175        https://bugs.webkit.org/show_bug.cgi?id=28788
11176
11177        Update the JSON stringifier to initialise its replacer array according to the most
11178        recent version of the spec.
11179
11180        * runtime/Identifier.h:
11181        (JSC::Identifier::from):
11182        * runtime/JSONObject.cpp:
11183        (JSC::Stringifier::Stringifier):
11184
111852009-08-27  Alexey Proskuryakov  <ap@apple.com>
11186
11187        Reviewed by Oliver Hunt.
11188
11189        https://bugs.webkit.org/show_bug.cgi?id=28753
11190        <rdar://problem/7173448> Excessive number of threads (and a crash)
11191
11192        * wtf/Threading.h: (WTF::atomicIncrement): Changed atomicIncrement to match decrement
11193        and return the new value. Also added using directives for these functions, to match
11194        te rest of WTF.
11195
111962009-08-27  Brent Fulgham  <bfulgham@webkit.org>
11197
11198        Reviewed by Adam Roben.
11199
11200        Link the testapi against CFLite when building the WinCairo port.
11201
11202        * JavaScriptCore.vcproj/testapi/testapi.vcproj: Add new Release_CFLite
11203          target.  Update all targets to inherit from either the
11204          JavaScriptCF.vsprops (Apple target) or the JavaScriptCFLite.vsprops
11205          file (WinCairo target).
11206        * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Remove
11207          input file CoreFoundation.lib. This is provided by either the
11208          JavaScriptCF.vsprops or JavaScriptCFLite.vsprops file.
11209
112102009-08-27  Steve Falkenburg  <sfalken@apple.com>
11211
11212        Reviewed by Geoff Garen.
11213
11214        Fix Windows-specific crash due to missing memory clearing call.
11215
11216        * runtime/Collector.cpp:
11217        (JSC::Heap::allocateBlock):
11218
112192009-08-27  Brent Fulgham  <bfulgham@webkit.org>
11220
11221        Build fix: JavaScriptCore_debug.def missing some exports.  Apple
11222        Windows build does not use this file, so it was not noticed previously.
11223
11224        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
11225
112262009-08-27  Gavin Barraclough  <barraclough@apple.com>
11227
11228        Reviewed by Oliver Hunt.
11229
11230        x86-64 GTK broken due to code offsets changing, pointers sometimes packed into immediates.
11231        https://bugs.webkit.org/show_bug.cgi?id=28317
11232
11233        Missed one, fix part II.
11234
11235        * assembler/MacroAssemblerX86Common.h:
11236        (JSC::MacroAssemblerX86Common::move):
11237        * assembler/X86Assembler.h:
11238        (JSC::CAN_SIGN_EXTEND_8_32):
11239
112402009-08-27  Oliver Hunt  <oliver@apple.com>
11241
11242        Reviewed by Adam Roben.
11243
11244        JSON.stringify replacer array does not accept values that are not string primitives.
11245        https://bugs.webkit.org/show_bug.cgi?id=28788
11246
11247        Update the JSON stringifier to initialise its replacer array according to the most
11248        recent version of the spec.
11249
11250        * runtime/Identifier.h:
11251        (JSC::Identifier::from):
11252        * runtime/JSONObject.cpp:
11253        (JSC::Stringifier::Stringifier):
11254
112552009-08-27  Oliver Hunt  <oliver@apple.com>
11256
11257        Reviewed by Alexey Proskuryakov.
11258
11259        JSON parser accepts trailing comma in array literals
11260        https://bugs.webkit.org/show_bug.cgi?id=28779
11261
11262        Update parser to correctly fail if there's a trailing comma.
11263
11264        * runtime/LiteralParser.cpp:
11265        (JSC::LiteralParser::parse):
11266
112672009-08-26  Oliver Hunt  <oliver@apple.com>
11268
11269        Reviewed by Gavin Barraclough.
11270
11271        'this' in JSON.parse reviver is the global object
11272        https://bugs.webkit.org/show_bug.cgi?id=28752
11273
11274        This is a technically simple change, we merely update the code for calling
11275        the reviver function to pass the correct this object.  Doing so however
11276        exposes the holder to arbitrary mutation by the reviver function so it is
11277        necessary for us to now guard all property accesses against the possibility
11278        of failure.
11279
11280        * runtime/JSArray.h:
11281          JSON needs to delete a property from the array, so we friend its
11282          Walker class so that we can make a non-virtual call to the arrays
11283          delete and getOwnPropertySlot methods.
11284        * runtime/JSONObject.cpp:
11285        (JSC::Walker::callReviver):
11286          We need to pass the correct this object
11287        (JSC::Walker::walk):
11288          Update calls to callReviver, and update property logic logic
11289          to correctly handle the holder being mutated by the reviver
11290          function.
11291
112922009-08-26  Alice Liu  <alice.liu@apple.com>
11293
11294        Windows build fix: added some exported symbols
11295
11296        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
11297        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
11298
112992009-08-26  Geoffrey Garen  <ggaren@apple.com>
11300
11301        Windows build fix: Removed some exported symbols that no longer exist.
11302
11303        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
11304        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
11305
113062009-08-26  Gavin Barraclough  <barraclough@apple.com>
11307
11308        Reviewed by Olliejver Hunt.
11309
11310        x86-64 GTK broken due to code offsets changing, pointers sometimes packed into immediates.
11311        https://bugs.webkit.org/show_bug.cgi?id=28317
11312
11313        We rely on a slightly OS X specific behaviour, that x86-64 applications have a 4Gb zero page,
11314        so pointers are never representable as a 32-bit integer, and always have to be represented by
11315        a separate immediate load instruction, rather than within the immediate field of an arithmetic
11316        or memory operation.
11317
11318        We explicitly check for a couple of cases where a value might be representable in 32-bit, but
11319        these probably never kick in on Mac OS, and only kick in to hose GTK.  Deleting these does not
11320        show a performance degradation on SunSpider.  Remove.
11321
11322        * assembler/MacroAssemblerX86_64.h:
11323        (JSC::MacroAssemblerX86_64::storePtr):
11324        (JSC::MacroAssemblerX86_64::branchPtr):
11325
113262009-08-26  Geoffrey Garen  <ggaren@apple.com>
11327
11328        Reviewed by Oliver Hunt.
11329
11330        A bit of Collector refatoring.
11331
11332        SunSpider says no change. v8 says 1.003x faster (1.02x faster on splay).
11333
11334        * JavaScriptCore.exp:
11335
11336        * runtime/JSCell.cpp:
11337        (JSC::JSCell::toPrimitive):
11338        (JSC::JSCell::getPrimitiveNumber):
11339        (JSC::JSCell::toBoolean):
11340        (JSC::JSCell::toNumber):
11341        (JSC::JSCell::toString):
11342        (JSC::JSCell::toObject): Removed pure virtual functions from
11343        JSCell, so the collector can construct one. This allowed
11344        me to remove a bunch of ASSERT_NOT_REACHED throughout the
11345        code, too.
11346
11347        * runtime/JSCell.h:
11348        (JSC::JSCell::JSCell): ditto
11349        (JSC::Heap::heap): Inlined this function because it's trivial.
11350
11351        * JavaScriptCore.exp:
11352
11353        * runtime/Collector.cpp:
11354        (JSC::Heap::destroy):
11355        (JSC::Heap::allocateBlock):
11356        (JSC::Heap::freeBlock):
11357        (JSC::Heap::freeBlocks): Renamed freeHeap to freeBlocks, since
11358        it doesn't actually free the Heap object.
11359        (JSC::Heap::heapAllocate):
11360        (JSC::Heap::sweep):
11361        * runtime/Collector.h: Refactored block allocation and destruction
11362        into helper functions.
11363
11364        * runtime/GetterSetter.cpp:
11365        * runtime/JSAPIValueWrapper.cpp:
11366        * runtime/JSPropertyNameIterator.cpp: Removed dummy implementations
11367        of pure virtual functions. (See above.)
11368
11369=== End re-roll-in of r47738:47740 with Windows crash fixed ===
11370
113712009-08-26  Geoffrey Garen  <ggaren@apple.com>
11372
11373        Build fix: start out with a 32-bit value to avoid a shortening warning.
11374
11375        * runtime/Collector.cpp:
11376        (JSC::Heap::sweep):
11377
113782009-08-24  Geoffrey Garen  <ggaren@apple.com>
11379
11380        Reviewed by Oliver Hunt.
11381
11382        Substantially reduced VM thrash in the GC heap.
11383
11384        1.08x faster on v8 (1.60x faster on v8-splay).
11385
11386        1.40x faster on bench-alloc-nonretained.
11387
11388        1.90x faster on bench-alloc-retained.
11389
11390        SunSpider says no change.
11391
11392        * runtime/Collector.cpp:
11393        (JSC::Heap::heapAllocate): Fixed a long-standing bug: update a few local
11394        variables unconditionally after calling collect(), since they may be used
11395        even if we don't "goto scan". (In the bug I saw, usedBlocks got out of
11396        sync with heap.usedBlocks).
11397        (JSC::Heap::sweep): Keep enough free heap space to accomodate
11398        the number of objects we'll allocate before the next GC, plus 25%, for
11399        good measure.
11400        * runtime/Collector.h: Bumped the block size to 256k. This seems to give
11401        the best cache performance, and it prevents us from initiating lots of
11402        VM traffic to recover very small chunks of memory.
11403
11404=== Begin re-roll-in of r47738:47740 with Windows crash fixed ===
11405
114062009-08-25  Drew Wilson  <atwilson@google.com>
11407
11408        Reviewed by David Levin.
11409
11410        postMessage() spec now supports sending arrays of ports
11411        https://bugs.webkit.org/show_bug.cgi?id=26902
11412
11413        Added OwnPtr to VectorTraits so we can store OwnPtrs in Vectors.
11414
11415        * wtf/VectorTraits.h:
11416
114172009-08-26  Xan Lopez  <xlopez@igalia.com>
11418
11419        Rubber-stamped by Gustavo Noronha.
11420
11421        Remove duplicated files from file list.
11422
11423        * GNUmakefile.am:
11424
114252009-08-26  Oliver Hunt  <oliver@apple.com>
11426
11427        Reviewed by NOBODY (Build fix).
11428
11429        More export fixes.
11430
11431        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
11432        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
11433
114342009-08-26  Oliver Hunt  <oliver@apple.com>
11435
11436        Reviewed by NOBODY (Build fix).
11437
11438        Hopefully fix all the exports from JSC on windows
11439
11440        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
11441        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
11442
114432009-08-26  Oliver Hunt  <oliver@apple.com>
11444
11445        Reviewed by NOBODY (Build fixes).
11446
11447        Forgot I added files to JavaScriptCore.
11448
11449        * GNUmakefile.am:
11450        * JavaScriptCore.gypi:
11451        * JavaScriptCore.pri:
11452        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
11453        * JavaScriptCoreSources.bkl:
11454
114552009-08-25  Oliver Hunt  <oliver@apple.com>
11456
11457        Reviewed by Gavin Barraclough.
11458
11459        [ES5] Implement getOwnPropertyDescriptor
11460        https://bugs.webkit.org/show_bug.cgi?id=28724
11461
11462        Implement the core runtime support for getOwnPropertyDescriptor.
11463        This adds a virtual getOwnPropertyDescriptor method to every class
11464        that implements getOwnPropertySlot that shadows the behaviour of
11465        getOwnPropertySlot.  The alternative would be to make getOwnPropertySlot
11466        (or PropertySlots in general) provide property attribute information,
11467        but quick testing showed this to be a regression.
11468
11469        * JavaScriptCore.exp:
11470        * JavaScriptCore.xcodeproj/project.pbxproj:
11471        * runtime/Arguments.cpp:
11472        (JSC::Arguments::getOwnPropertyDescriptor):
11473        * runtime/Arguments.h:
11474        * runtime/ArrayPrototype.cpp:
11475        (JSC::ArrayPrototype::getOwnPropertyDescriptor):
11476        * runtime/ArrayPrototype.h:
11477        * runtime/CommonIdentifiers.h:
11478        * runtime/DatePrototype.cpp:
11479        (JSC::DatePrototype::getOwnPropertyDescriptor):
11480        * runtime/DatePrototype.h:
11481        * runtime/JSArray.cpp:
11482        (JSC::JSArray::getOwnPropertyDescriptor):
11483        * runtime/JSArray.h:
11484        * runtime/JSByteArray.cpp:
11485        (JSC::JSByteArray::getOwnPropertyDescriptor):
11486        * runtime/JSByteArray.h:
11487        * runtime/JSFunction.cpp:
11488        (JSC::JSFunction::getOwnPropertyDescriptor):
11489        * runtime/JSFunction.h:
11490        * runtime/JSGlobalObject.h:
11491        (JSC::JSGlobalObject::getOwnPropertyDescriptor):
11492        * runtime/JSNotAnObject.cpp:
11493        (JSC::JSNotAnObject::getOwnPropertyDescriptor):
11494        * runtime/JSNotAnObject.h:
11495        * runtime/JSONObject.cpp:
11496        (JSC::JSONObject::getOwnPropertySlot):
11497        (JSC::JSONObject::getOwnPropertyDescriptor):
11498        * runtime/JSONObject.h:
11499        * runtime/JSObject.cpp:
11500        (JSC::JSObject::getOwnPropertyDescriptor):
11501        (JSC::JSObject::getPropertyDescriptor):
11502        * runtime/JSObject.h:
11503        * runtime/JSString.cpp:
11504        (JSC::JSString::getStringPropertyDescriptor):
11505        (JSC::JSString::getOwnPropertyDescriptor):
11506        * runtime/JSString.h:
11507        * runtime/JSVariableObject.cpp:
11508        (JSC::JSVariableObject::symbolTableGet):
11509        * runtime/JSVariableObject.h:
11510        * runtime/Lookup.h:
11511        (JSC::getStaticPropertyDescriptor):
11512        (JSC::getStaticFunctionDescriptor):
11513        (JSC::getStaticValueDescriptor):
11514          Add property descriptor equivalents of the lookup
11515          table access functions
11516
11517        * runtime/MathObject.cpp:
11518        (JSC::MathObject::getOwnPropertySlot):
11519        (JSC::MathObject::getOwnPropertyDescriptor):
11520        * runtime/MathObject.h:
11521        * runtime/NumberConstructor.cpp:
11522        (JSC::NumberConstructor::getOwnPropertyDescriptor):
11523        * runtime/NumberConstructor.h:
11524        * runtime/ObjectConstructor.cpp:
11525        (JSC::ObjectConstructor::ObjectConstructor):
11526        (JSC::objectConstructorGetOwnPropertyDescriptor):
11527        * runtime/PropertyDescriptor.cpp: Added.
11528        (JSC::PropertyDescriptor::writable):
11529        (JSC::PropertyDescriptor::enumerable):
11530        (JSC::PropertyDescriptor::configurable):
11531        (JSC::PropertyDescriptor::hasAccessors):
11532        (JSC::PropertyDescriptor::setUndefined):
11533        (JSC::PropertyDescriptor::getter):
11534        (JSC::PropertyDescriptor::setter):
11535        (JSC::PropertyDescriptor::setDescriptor):
11536        (JSC::PropertyDescriptor::setAccessorDescriptor):
11537        * runtime/PropertyDescriptor.h: Added.
11538        (JSC::PropertyDescriptor::PropertyDescriptor):
11539        (JSC::PropertyDescriptor::attributes):
11540        (JSC::PropertyDescriptor::isValid):
11541        (JSC::PropertyDescriptor::value):
11542        * runtime/RegExpConstructor.cpp:
11543        (JSC::RegExpConstructor::getOwnPropertyDescriptor):
11544        * runtime/RegExpConstructor.h:
11545        * runtime/RegExpMatchesArray.h:
11546        (JSC::RegExpMatchesArray::getOwnPropertyDescriptor):
11547        * runtime/RegExpObject.cpp:
11548        (JSC::RegExpObject::getOwnPropertyDescriptor):
11549        * runtime/RegExpObject.h:
11550        * runtime/StringObject.cpp:
11551        (JSC::StringObject::getOwnPropertyDescriptor):
11552        * runtime/StringObject.h:
11553        * runtime/StringPrototype.cpp:
11554        (JSC::StringPrototype::getOwnPropertyDescriptor):
11555        * runtime/StringPrototype.h:
11556
115572009-08-24  Gavin Barraclough  <barraclough@apple.com>
11558
11559        Reviewed by Darin Adler.
11560
11561        How many copies of the parameters do you need?
11562        https://bugs.webkit.org/show_bug.cgi?id=28701
11563
11564        The function parameters in JSC get copied a lot - and unnecessarily so.
11565
11566        Originally this happened due to duplicating FunctionBodyNodes on recompilation,
11567        though the problem has been exacerbated by copying the parameters from the
11568        original function body onto the executable, then back onto the real body that
11569        will be generated (this happens on every function).  And this is all made worse
11570        since the data structures in question are a little ugly - C style arrays of C++
11571        objects containing ref counts, so they need a full copy-construct (rather than
11572        a simple memcpy).
11573
11574        This can all be greatly simplified by just punting the parameters off into
11575        their own ref-counted object, and forgoing all the copying.
11576
11577        ~no performance change, possible slight progression.
11578
11579        * bytecompiler/BytecodeGenerator.cpp:
11580        (JSC::BytecodeGenerator::BytecodeGenerator):
11581        * bytecompiler/BytecodeGenerator.h:
11582        (JSC::BytecodeGenerator::makeFunction):
11583        * parser/Nodes.cpp:
11584        (JSC::FunctionParameters::FunctionParameters):
11585        (JSC::FunctionBodyNode::FunctionBodyNode):
11586        (JSC::FunctionBodyNode::finishParsing):
11587        * parser/Nodes.h:
11588        (JSC::FunctionBodyNode::parameters):
11589        (JSC::FunctionBodyNode::parameterCount):
11590        * runtime/Executable.cpp:
11591        (JSC::FunctionExecutable::~FunctionExecutable):
11592        (JSC::FunctionExecutable::compile):
11593        (JSC::FunctionExecutable::reparseExceptionInfo):
11594        (JSC::FunctionExecutable::fromGlobalCode):
11595        (JSC::FunctionExecutable::paramString):
11596        * runtime/Executable.h:
11597        (JSC::FunctionExecutable::FunctionExecutable):
11598        (JSC::FunctionExecutable::parameterCount):
11599
116002009-08-25  Brent Fulgham  <bfulgham@webkit.org>
11601
11602        Reviewed by NOBODY (Buildfix).
11603
11604        * JavaScriptCore.vcproj/jsc/jsc.vcproj: Add Debug_CFLite target
11605          that inherits from the debug_wincairo property sheet and therefore
11606          links to the proper debug library.
11607        * JavaScriptCore.vcproj/testapi/testapi.vcproj: Add Debug_CFLite target
11608          that inherits from the debug_wincairo property sheet and therefore
11609          links to the proper debug library.
11610
116112009-08-25  Chris Marrin  <cmarrin@apple.com>
11612
11613        Reviewed by Simon Fraser.
11614
11615        Export tryFastMalloc for Canvas3D work
11616        https://bugs.webkit.org/show_bug.cgi?id=28018
11617
11618        * JavaScriptCore.exp:
11619
116202009-08-25  David Levin  <levin@chromium.org>
11621
11622        Reviewed by Adam Roben.
11623
11624        PLATFORM(CFNETWORK) should be USE(CFNETWORK).
11625        https://bugs.webkit.org/show_bug.cgi?id=28713
11626
11627        * wtf/Platform.h: Added a #define to catch this issue in the
11628        future. The define would generate an error on gcc without the
11629        space in the expansion, but Visual C++ needs the space to cause an error.
11630
116312009-08-24  Brent Fulgham  <bfulgham@webkit.org>
11632
11633        Reviewed by Steve Falkenburg.
11634
11635        Revise CFLite Debug build to emit DLL's with _debug label.
11636        https://bugs.webkit.org/show_bug.cgi?id=28695.
11637
11638        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Modify
11639          Cairo debug build to inherit from new debug_cairo property sheet.
11640        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops:
11641          Modify to look for debug CFLite when in debug build.
11642
116432009-08-24  Gavin Barraclough  <barraclough@apple.com>
11644
11645        Reviewed by Oliver Adler & Darin Hunt.
11646
11647        https://bugs.webkit.org/show_bug.cgi?id=28691
11648        Do not retain ScopeNodes outside of parsing
11649
11650        There is now no need for these to exist outside of parsing - their use in the runtime is replaced by Executable types.
11651
11652        * bytecode/EvalCodeCache.h:
11653        (JSC::EvalCodeCache::get):
11654        * bytecompiler/BytecodeGenerator.cpp:
11655        (JSC::BytecodeGenerator::BytecodeGenerator):
11656        (JSC::BytecodeGenerator::emitNewFunction):
11657        (JSC::BytecodeGenerator::emitNewFunctionExpression):
11658        * bytecompiler/BytecodeGenerator.h:
11659        (JSC::BytecodeGenerator::makeFunction):
11660        * debugger/Debugger.cpp:
11661        (JSC::Debugger::recompileAllJSFunctions):
11662        (JSC::evaluateInGlobalCallFrame):
11663        * debugger/DebuggerCallFrame.cpp:
11664        (JSC::DebuggerCallFrame::evaluate):
11665        * interpreter/Interpreter.cpp:
11666        (JSC::Interpreter::execute):
11667        (JSC::Interpreter::prepareForRepeatCall):
11668        (JSC::Interpreter::privateExecute):
11669        * jit/JITStubs.cpp:
11670        (JSC::DEFINE_STUB_FUNCTION):
11671        * parser/Nodes.cpp:
11672        (JSC::ScopeNodeData::ScopeNodeData):
11673        (JSC::ProgramNode::create):
11674        (JSC::EvalNode::create):
11675        (JSC::FunctionBodyNode::create):
11676        * parser/Nodes.h:
11677        (JSC::ScopeNode::adoptData):
11678        (JSC::FunctionBodyNode::parameterCount):
11679        * parser/Parser.cpp:
11680        * parser/Parser.h:
11681        (JSC::Parser::arena):
11682        (JSC::Parser::Parser):
11683        (JSC::Parser::parse):
11684        * runtime/ArrayPrototype.cpp:
11685        (JSC::isNumericCompareFunction):
11686        (JSC::arrayProtoFuncSort):
11687        * runtime/Completion.cpp:
11688        (JSC::checkSyntax):
11689        (JSC::evaluate):
11690        * runtime/Executable.cpp:
11691        (JSC::FunctionExecutable::~FunctionExecutable):
11692        (JSC::EvalExecutable::compile):
11693        (JSC::ProgramExecutable::checkSyntax):
11694        (JSC::ProgramExecutable::compile):
11695        (JSC::FunctionExecutable::compile):
11696        (JSC::EvalExecutable::generateJITCode):
11697        (JSC::ProgramExecutable::generateJITCode):
11698        (JSC::FunctionExecutable::generateJITCode):
11699        (JSC::FunctionExecutable::reparseExceptionInfo):
11700        (JSC::EvalExecutable::reparseExceptionInfo):
11701        (JSC::FunctionExecutable::recompile):
11702        (JSC::FunctionExecutable::fromGlobalCode):
11703        (JSC::FunctionExecutable::copyParameters):
11704        (JSC::FunctionExecutable::paramString):
11705        * runtime/Executable.h:
11706        (JSC::ScriptExecutable::ScriptExecutable):
11707        (JSC::ScriptExecutable::sourceID):
11708        (JSC::ScriptExecutable::sourceURL):
11709        (JSC::ScriptExecutable::lineNo):
11710        (JSC::ScriptExecutable::lastLine):
11711        (JSC::ScriptExecutable::usesEval):
11712        (JSC::ScriptExecutable::usesArguments):
11713        (JSC::ScriptExecutable::needsActivation):
11714        (JSC::ScriptExecutable::recordParse):
11715        (JSC::EvalExecutable::bytecode):
11716        (JSC::EvalExecutable::jitCode):
11717        (JSC::ProgramExecutable::bytecode):
11718        (JSC::ProgramExecutable::reparseExceptionInfo):
11719        (JSC::ProgramExecutable::jitCode):
11720        (JSC::FunctionExecutable::FunctionExecutable):
11721        (JSC::FunctionExecutable::make):
11722        (JSC::FunctionExecutable::bytecode):
11723        (JSC::FunctionExecutable::isGenerated):
11724        (JSC::FunctionExecutable::name):
11725        (JSC::FunctionExecutable::parameterCount):
11726        (JSC::FunctionExecutable::jitCode):
11727        * runtime/FunctionConstructor.cpp:
11728        (JSC::constructFunction):
11729        * runtime/JSGlobalData.cpp:
11730        (JSC::JSGlobalData::numericCompareFunction):
11731        * runtime/JSGlobalObjectFunctions.cpp:
11732        (JSC::globalFuncEval):
11733
117342009-08-24  Darin Adler  <darin@apple.com>
11735
11736        * runtime/ObjectPrototype.cpp:
11737        (JSC::ObjectPrototype::put): Landed revised version I had tested but forgot
11738        to land. Leave out the branch, since we don't need one.
11739
117402009-08-24  Darin Adler  <darin@apple.com>
11741
11742        Reviewed by Geoff Garen.
11743
11744        Array index miss case creates a string every time
11745        https://bugs.webkit.org/show_bug.cgi?id=28664
11746
11747        SunSpider test results I saw:
11748
11749            0.5% faster overall
11750            1% faster on crypto-aes
11751            20% faster on crypto-md5
11752            13% faster on crypto-sha1
11753
11754        * runtime/ObjectPrototype.cpp:
11755        (JSC::ObjectPrototype::ObjectPrototype): Initialize m_hasNoPropertiesWithUInt32Names
11756        to true.
11757        (JSC::ObjectPrototype::put): Clearly m_hasNoPropertiesWithUInt32Names if the new
11758        property has a name that is the string form of a UInt32.
11759        (JSC::ObjectPrototype::getOwnPropertySlot): Don't call JSObject::getOwnPropertySlot
11760        if m_hasNoPropertiesWithUInt32Names is true, and it is highly likely to be true.
11761
11762        * runtime/ObjectPrototype.h: Added declarations for the above.
11763
117642009-08-24  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
11765
11766        Unreviewed. Fix a typo in my distcheck build fix.
11767
11768        * GNUmakefile.am:
11769
117702009-08-23  Gustavo Noronha Silva  <gns@gnome.org>
11771
11772        Unreviewed build fix for make distcheck.
11773
11774        * GNUmakefile.am: Added files required for the build.
11775
117762009-08-22  Maciej Stachowiak  <mjs@apple.com>
11777
11778        Reviewed by Mark Rowe.
11779
11780        REGRESSION(r47639-r47660): Webkit crashes on launch on PowerPC
11781        https://bugs.webkit.org/show_bug.cgi?id=28655
11782
11783        * runtime/JSFunction.cpp:
11784        (JSC::JSFunction::JSFunction): Initialize properly with a VPtrHackExecutable.
11785        * wtf/Platform.h:
11786
117872009-08-22  Darin Adler  <darin@apple.com>
11788
11789        Fix storage leak from syntax tree arena allocation patch.
11790
11791        * parser/Nodes.h: CommaNode needs to inherit from ParserArenaDeletable
11792        because it has a vector.
11793
117942009-08-21  Darin Adler  <darin@apple.com>
11795
11796        Fix Qt build.
11797
11798        * parser/Nodes.cpp:
11799        (JSC::ScopeNodeData::ScopeNodeData): Made non-inline again.
11800        This is used outside Nodes.cpp so can't be inline unless
11801        it is in the header.
11802
118032009-08-21  Darin Adler  <darin@apple.com>
11804
11805        Two loose ends from the last commit.
11806
11807        * JavaScriptCore.xcodeproj/project.pbxproj: Made ParserArena.h
11808        and create_hash_table project-internal instead of "private".
11809        * runtime/Executable.h: Removed accidentally-added constructor.
11810
118112009-08-21  Darin Adler  <darin@apple.com>
11812
11813        Reviewed by Gavin Barraclough.
11814
11815        Syntax tree nodes should use arena allocation
11816        https://bugs.webkit.org/show_bug.cgi?id=25674
11817
11818        Use an actual arena now. 0.6% speedup on SunSpider.
11819
11820        New and improved with 100% less leaking of the universe.
11821
11822        * JavaScriptCore.exp:
11823        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
11824        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
11825        Removed all exports involving the class FunctionBodyNode, which no
11826        longer needs to be used outside JavaScriptCore.
11827
11828        * JavaScriptCore.xcodeproj/project.pbxproj: Made Nodes.h and
11829        Executable.h project-internal instead of "private".
11830
11831        * bytecompiler/BytecodeGenerator.cpp:
11832        (JSC::BytecodeGenerator::BytecodeGenerator): Updated since VarStack
11833        contains const Identifier* now.
11834
11835        * parser/Grammar.y: Made identifiers from the lexer be const
11836        Identifier* and updated since VarStack contains const Identifier* now.
11837
11838        * parser/Lexer.cpp:
11839        (JSC::Lexer::setCode): Pass in ParserArena, used for identifiers.
11840        (JSC::Lexer::makeIdentifier): Changed return type to const Identifier*
11841        and changed to call ParserArena.
11842        (JSC::Lexer::clear): Removed the code to manage m_identifiers and
11843        added code to set m_arena to 0.
11844        * parser/Lexer.h: Updated for changes above.
11845
11846        * parser/NodeConstructors.h:
11847        (JSC::ParserArenaFreeable::operator new): Added. Calls allocateFreeable
11848        on the arena.
11849        (JSC::ParserArenaDeletable::operator new): Changed to call the
11850        allocateDeletable function on the arena instead of deleteWithArena.
11851        (JSC::PropertyNode::PropertyNode): Added new constructor that makes
11852        numeric identifiers. Some day we might want to optimize this for
11853        integers so it doesn't create a string for each one.
11854        (JSC::ContinueNode::ContinueNode): Initialize m_ident to nullIdentifier
11855        since it's now a const Identifier& so it can't be left uninitialized.
11856        (JSC::BreakNode::BreakNode): Ditto.
11857        (JSC::CaseClauseNode::CaseClauseNode): Updated to use SourceElements*
11858        to keep track of the statements rather than a separate statement vector.
11859        (JSC::BlockNode::BlockNode): Ditto.
11860        (JSC::ForInNode::ForInNode): Initialize m_ident to nullIdentifier.
11861
11862        * parser/Nodes.cpp: Moved the comment explaining emitBytecode in here.
11863        It seemed strangely out of place in the header.
11864        (JSC::ThrowableExpressionData::emitThrowError): Added an overload for
11865        UString as well as Identifier.
11866        (JSC::SourceElements::singleStatement): Added.
11867        (JSC::SourceElements::lastStatement): Added.
11868        (JSC::RegExpNode::emitBytecode): Changed the throwError code to use
11869        the substitution mechanism instead of doing a string append.
11870        (JSC::SourceElements::emitBytecode): Added. Replaces the old
11871        statementListEmitCode function, since we now keep the SourceElements
11872        objects around.
11873        (JSC::BlockNode::lastStatement): Added.
11874        (JSC::BlockNode::emitBytecode): Changed to use emitBytecode instead of
11875        statementListEmitCode.
11876        (JSC::CaseClauseNode::emitBytecode): Added.
11877        (JSC::CaseBlockNode::emitBytecodeForBlock): Changed to use emitBytecode
11878        instead of statementListEmitCode.
11879        (JSC::ScopeNodeData::ScopeNodeData): Changed to store the
11880        SourceElements* instead of using releaseContentsIntoVector.
11881        (JSC::ScopeNode::emitStatementsBytecode): Added.
11882        (JSC::ScopeNode::singleStatement): Added.
11883        (JSC::ProgramNode::emitBytecode): Call emitStatementsBytecode instead
11884        of statementListEmitCode.
11885        (JSC::EvalNode::emitBytecode): Ditto.
11886        (JSC::FunctionBodyNode::emitBytecode): Call emitStatementsBytecode
11887        insetad of statementListEmitCode and check for the return node using
11888        the new functions.
11889
11890        * parser/Nodes.h: Changed VarStack to store const Identifier* instead
11891        of Identifier and rely on the arena to control lifetime. Added a new
11892        ParserArenaFreeable class. Made ParserArenaDeletable inherit from
11893        FastAllocBase instead of having its own operator new. Base the Node
11894        class on ParserArenaFreeable. Changed the various Node classes
11895        to use const Identifier& instead of Identifier to avoid the need to
11896        call their destructors and allow them to function as "freeable" in the
11897        arena. Removed extraneous JSC_FAST_CALL on definitions of inline functions.
11898        Changed ElementNode, PropertyNode, ArgumentsNode, ParameterNode,
11899        CaseClauseNode, ClauseListNode, and CaseBlockNode to use ParserArenaFreeable
11900        as a base class since they do not descend from Node. Eliminated the
11901        StatementVector type and instead have various classes use SourceElements*
11902        instead of StatementVector. This prevents those classes from having to
11903        use ParserArenaDeletable to make sure the vector destructor is called.
11904
11905        * parser/Parser.cpp:
11906        (JSC::Parser::parse): Pass the arena to the lexer.
11907
11908        * parser/Parser.h: Added an include of ParserArena.h, which is no longer
11909        included by Nodes.h.
11910        (JSC::Parser::parseFunctionFromGlobalCode): Changed to use the
11911        singleStatement function, since there is no longer any children function.
11912        Removed some unneeded use of RefPtr.
11913
11914        * parser/ParserArena.cpp:
11915        (JSC::ParserArena::ParserArena): Added. Initializes the new members,
11916        m_freeableMemory, m_freeablePoolEnd, and m_identifiers.
11917        (JSC::ParserArena::freeablePool): Added. Computes the pool pointer,
11918        since we store only the current pointer and the end of pool pointer.
11919        (JSC::ParserArena::deallocateObjects): Added. Contains the common
11920        memory-deallocation logic used by both the destructor and the
11921        reset function.
11922        (JSC::ParserArena::~ParserArena): Changed to call deallocateObjects.
11923        (JSC::ParserArena::reset): Ditto. Also added code to zero out the
11924        new structures, and switched to use clear() instead of shrink(0) since
11925        we don't really reuse arenas.
11926        (JSC::ParserArena::makeNumericIdentifier): Added.
11927        (JSC::ParserArena::allocateFreeablePool): Added. Used when the pool
11928        is empty.
11929        (JSC::ParserArena::isEmpty): Added. No longer inline, which is fine
11930        since this is used only for assertions at the moment.
11931        (JSC::ParserArena::derefWithArena): Make non-inline.
11932
11933        * parser/ParserArena.h: Added an actual arena of "freeable" objects,
11934        ones that don't need destructors to be called. Also added a separate
11935        IdentifierArena object, a segmented vector of identifiers that used
11936        to be in the Lexer.
11937
11938        * runtime/Executable.h: Moved the definition of the
11939        FunctionExecutable::make function here. It can't go in JSFunction.h
11940        since that header has to be used outside JavaScriptCore and so can't
11941        include this, which includes Nodes.h. The function could be moved
11942        elswhere if we don't want to include JSFunction.h in this header, but
11943        for now this seems to be the best place.
11944
11945        * runtime/JSFunction.h: Removed the include of Executable.h and
11946        definition of the FunctionExecutable::make function.
11947
11948        * wtf/FastMalloc.cpp: Fixed an incorrect comment.
11949
119502009-08-21  Mark Rowe  <mrowe@apple.com>
11951
11952        Fix the non-JIT build.
11953
11954        * runtime/Executable.cpp:
11955        * runtime/Executable.h:
11956
119572009-08-21  Gavin Barraclough  <barraclough@apple.com>
11958
11959        Speculative QuickTime build fix.
11960
11961        * runtime/JSArray.cpp:
11962
119632009-08-21  Gavin Barraclough  <barraclough@apple.com>
11964
11965        Speculative QT build fix.
11966
11967        * runtime/StringPrototype.cpp:
11968
119692009-08-21  Gavin Barraclough  <barraclough@apple.com>
11970
11971        Reviewed by Oliver Hunt.
11972
11973        Restructure Executable types so that host functions do not hold a FunctionExecutable.
11974        https://bugs.webkit.org/show_bug.cgi?id=28621
11975
11976        All JSFunction objects have a pointer to an Executable*.  This is currently always a
11977        FunctionExecutable, however this has a couple of drawbacks.  Host functions do not
11978        store a range of information that the FunctionExecutable provides (source, name,
11979        CodeBlock & information presently held on the FunctionBodyNode).
11980
11981        [ * nearly all... see below! ]
11982
11983        Instead, make JSFunctions hold a pointer to an ExecutableBase, move fields specific
11984        to JS sourced executable types (source, node) into a new subclass (ScriptExecutable),
11985        and create a new NativeExecutable type.  We now provide a new method in JSFunction
11986        to access & downcast to FunctionExecutable, but in doing so we can make an early
11987        check (with an ASSERT) to ensure that the Executable read from a function will only
11988        be treated as a FunctionExecutable (and thus the JS sepcific fields will only be
11989        accessed) if the JSFunction is not a host function.
11990
11991        There is one JSFunction that currently does not have an Executable, which is the
11992        object created to allow us to read out the vtable pointer.  By making this change
11993        we can also add a new Executable type fror this object (VPtrHackExecutable).
11994        Since this means that really all JSFunctions have an Executable we no longer have
11995        to null-check m_executable before us it - particularly in isHostFunction().
11996
11997        This patch removes CacheableEvalExecutable, since all subclasses of ExecutableBase
11998        can now be ref-counted - since both JSFunction holds (and ref-counts) an ExecutableBase
11999        that might be a FunctionExecutable or a NativeExecutable.  This does now mean that all
12000        ProgramExecutables and EvalExecutables (unnecessarily) provide an interface to be
12001        ref-counted, however this seems less-bad than host functions unnecessarily providing
12002        interface to access non-host specific information.
12003
12004        The class hierarcy has changed from this:
12005
12006        - ExecutableBase
12007            - ProgramExecutable
12008            - EvalExecutable
12009                - CacheableEvalExecutable (also RefCounted by multiple-inheritance)
12010            - FunctionExecutable (also RefCounted by multiple-inheritance, 'special' FunctionExecutable also used for host functions)
12011
12012        To this:
12013
12014        - RefCounted
12015            - ExecutableBase
12016                - NativeExecutable
12017                - VPtrHackExecutable
12018                - ScriptExecutable
12019                    - ProgramExecutable
12020                    - EvalExecutable
12021                    - FunctionExecutable
12022
12023        This patch speeds up sunspidey by a couple of ms (presumably due to the changes to isHostFunction()).
12024
12025        * bytecode/CodeBlock.cpp:
12026        (JSC::CodeBlock::CodeBlock):
12027        * bytecode/CodeBlock.h:
12028        (JSC::CodeBlock::ownerExecutable):
12029        (JSC::GlobalCodeBlock::GlobalCodeBlock):
12030        * bytecode/EvalCodeCache.h:
12031        (JSC::EvalCodeCache::get):
12032        * debugger/Debugger.cpp:
12033        (JSC::Debugger::recompileAllJSFunctions):
12034        * interpreter/CachedCall.h:
12035        (JSC::CachedCall::CachedCall):
12036        * interpreter/Interpreter.cpp:
12037        (JSC::Interpreter::callEval):
12038        (JSC::Interpreter::privateExecute):
12039        * jit/JITStubs.cpp:
12040        (JSC::DEFINE_STUB_FUNCTION):
12041        * profiler/Profiler.cpp:
12042        (JSC::createCallIdentifierFromFunctionImp):
12043        * runtime/Arguments.h:
12044        (JSC::Arguments::getArgumentsData):
12045        (JSC::Arguments::Arguments):
12046        * runtime/Executable.cpp:
12047        (JSC::NativeExecutable::~NativeExecutable):
12048        (JSC::VPtrHackExecutable::~VPtrHackExecutable):
12049        * runtime/Executable.h:
12050        (JSC::ExecutableBase::ExecutableBase):
12051        (JSC::ExecutableBase::~ExecutableBase):
12052        (JSC::ExecutableBase::isHostFunction):
12053        (JSC::NativeExecutable::NativeExecutable):
12054        (JSC::VPtrHackExecutable::VPtrHackExecutable):
12055        (JSC::ScriptExecutable::ScriptExecutable):
12056        (JSC::ScriptExecutable::source):
12057        (JSC::ScriptExecutable::sourceID):
12058        (JSC::ScriptExecutable::sourceURL):
12059        (JSC::ScriptExecutable::lineNo):
12060        (JSC::ScriptExecutable::lastLine):
12061        (JSC::ScriptExecutable::usesEval):
12062        (JSC::ScriptExecutable::usesArguments):
12063        (JSC::ScriptExecutable::needsActivation):
12064        (JSC::EvalExecutable::EvalExecutable):
12065        (JSC::EvalExecutable::create):
12066        (JSC::ProgramExecutable::ProgramExecutable):
12067        (JSC::FunctionExecutable::FunctionExecutable):
12068        * runtime/FunctionPrototype.cpp:
12069        (JSC::functionProtoFuncToString):
12070        * runtime/JSFunction.cpp:
12071        (JSC::JSFunction::JSFunction):
12072        (JSC::JSFunction::~JSFunction):
12073        (JSC::JSFunction::markChildren):
12074        (JSC::JSFunction::getCallData):
12075        (JSC::JSFunction::call):
12076        (JSC::JSFunction::lengthGetter):
12077        (JSC::JSFunction::getConstructData):
12078        (JSC::JSFunction::construct):
12079        * runtime/JSFunction.h:
12080        (JSC::JSFunction::executable):
12081        (JSC::JSFunction::jsExecutable):
12082        (JSC::JSFunction::isHostFunction):
12083
120842009-08-20  Oliver Hunt  <oliver@apple.com>
12085
12086        Reviewed by Maciej Stachowiak.
12087
12088        Browser hangs on opening Web Inspector.
12089        https://bugs.webkit.org/show_bug.cgi?id=28438
12090
12091        Code generation needs to be able to walk the entire scopechain in some
12092        cases, however the symbol table used by activations was a member of the
12093        codeblock.  Following recompilation this may no longer exist, leading
12094        to a crash or hang on lookup.
12095
12096        We fix this by introducing a refcounted SymbolTable subclass, SharedSymbolTable,
12097        for the CodeBlocks used by function code.  This allows activations to
12098        maintain ownership of a copy of the symbol table even after recompilation so
12099        they can continue to work.
12100
12101        * bytecode/CodeBlock.cpp:
12102        (JSC::CodeBlock::CodeBlock):
12103        * bytecode/CodeBlock.h:
12104        (JSC::CodeBlock::symbolTable):
12105        (JSC::CodeBlock::sharedSymbolTable):
12106        (JSC::GlobalCodeBlock::GlobalCodeBlock):
12107        (JSC::FunctionCodeBlock::FunctionCodeBlock):
12108        (JSC::FunctionCodeBlock::~FunctionCodeBlock):
12109        * interpreter/Interpreter.cpp:
12110        (JSC::Interpreter::retrieveArguments):
12111        * runtime/Executable.cpp:
12112        (JSC::EvalExecutable::generateBytecode):
12113        (JSC::FunctionExecutable::generateBytecode):
12114        (JSC::FunctionExecutable::reparseExceptionInfo):
12115        (JSC::EvalExecutable::reparseExceptionInfo):
12116        * runtime/JSActivation.h:
12117        (JSC::JSActivation::JSActivationData::JSActivationData):
12118        (JSC::JSActivation::JSActivationData::~JSActivationData):
12119        * runtime/SymbolTable.h:
12120
121212009-08-20  Xan Lopez  <xlopez@igalia.com>
12122
12123        Add new file to GTK+ build.
12124
12125        * GNUmakefile.am:
12126
121272009-08-20  Geoffrey Garen  <ggaren@apple.com>
12128
12129        Reviewed by Maciej Stachowiak.
12130
12131        Added a number => string cache.
12132
12133        1.07x faster on v8 (1.7x faster on v8-splay).
12134        1.004x faster on SunSpider.
12135
12136        * runtime/JSCell.h: Moved JSValue::toString to JSString.h.
12137        * runtime/JSGlobalData.h: Holds the cache.
12138        * runtime/JSNumberCell.cpp:
12139        (JSC::JSNumberCell::toString):
12140        (JSC::JSNumberCell::toThisString): Removed -0 special case.
12141        UString handles this now, since too many clients were
12142        special-casing it.
12143
12144        * runtime/JSString.h:
12145        (JSC::JSValue::toString): Use the cache when converting
12146        an int or double to string.
12147
12148        * runtime/Operations.h:
12149        (JSC::concatenateStrings): Call toString to take advantage
12150        of the cache.
12151
12152        * runtime/SmallStrings.h:
12153        (JSC::NumericStrings::add):
12154        (JSC::NumericStrings::lookup): The cache.
12155
12156        * runtime/UString.cpp:
12157        (JSC::UString::from): Added -0 special case mentioned above.
12158        Removed appendNumeric because it's mutually exclusive with the
12159        cache.
12160
121612009-08-20  Oliver Hunt  <oliver@apple.com>
12162
12163        Reviewed by Gavin Barraclough.
12164
12165        REGRESSION: fast/profiler/call.html is crashing occasionally
12166        https://bugs.webkit.org/show_bug.cgi?id=28476
12167
12168        Using the codeblock for information about how many parameters and
12169        locals a function has is unsafe in certain circumstances.  The
12170        basic scenario is all function code being cleared in response to
12171        the debugger or profiler being enabled, and then an activation is
12172        marked before its associated function is re-executed.
12173
12174        To deal with this scenario we store the variable count of a function
12175        directly in the FunctionExecutable, and then use that information.
12176
12177        * runtime/Arguments.h:
12178        (JSC::Arguments::getArgumentsData):
12179        * runtime/Executable.cpp:
12180        (JSC::FunctionExecutable::generateBytecode):
12181        * runtime/Executable.h:
12182        (JSC::FunctionExecutable::FunctionExecutable):
12183        (JSC::FunctionExecutable::variableCount):
12184        * runtime/JSActivation.cpp:
12185        (JSC::JSActivation::markChildren):
12186
121872009-08-20  Gavin Barraclough  <barraclough@apple.com>
12188
12189        Reviewed by Oliver Hunt.
12190
12191        Numbering of arguments to emitGetJITStubArg/emitPutJITStubArg incorrect
12192        <bug lost in the great bug disasteroony of 08/20/09!>
12193
12194        The argumentNumber argument to emitGetJITStubArg/emitPutJITStubArg should match
12195        the argument number used within the stub functions in JITStubs.cpp, but it doesn't.
12196
12197        Firstly, all the numbers changed when we added a void* 'reserved' as the first slot
12198        (rather than leaving argument 0 unused), and secondly in 32_64 builds the index to
12199        peek/poke needs to be multiplies by 2 (since the argument to peek/poke is a number
12200        of machine words, and on 32_64 build the argument slots to stub functions are two
12201        words wide).
12202
12203        * jit/JIT.h:
12204        * jit/JITCall.cpp:
12205        (JSC::JIT::compileOpCallSetupArgs):
12206        (JSC::JIT::compileOpConstructSetupArgs):
12207        (JSC::JIT::compileOpCallVarargsSetupArgs):
12208        (JSC::JIT::compileOpCall):
12209        * jit/JITInlineMethods.h:
12210        (JSC::JIT::emitPutJITStubArg):
12211        (JSC::JIT::emitPutJITStubArgConstant):
12212        (JSC::JIT::emitGetJITStubArg):
12213        (JSC::JIT::emitPutJITStubArgFromVirtualRegister):
12214        * jit/JITOpcodes.cpp:
12215        (JSC::JIT::privateCompileCTIMachineTrampolines):
12216        * jit/JITPropertyAccess.cpp:
12217        (JSC::JIT::privateCompilePutByIdTransition):
12218
122192009-08-20  Oliver Hunt  <oliver@apple.com>
12220
12221        Reviewed by Geoff Garen.
12222
12223        REGRESSION: significant slowdown on Celtic Kane "AJAX declaration" subtest
12224        https://bugs.webkit.org/show_bug.cgi?id=28332
12225
12226        Follow up style fixes that were missed in review.
12227
12228        * runtime/Structure.cpp:
12229        (JSC::Structure::hasTransition):
12230        * runtime/Structure.h:
12231        (JSC::Structure::get):
12232        (JSC::StructureTransitionTable::contains):
12233        * runtime/StructureTransitionTable.h:
12234        (JSC::StructureTransitionTable::add):
12235
122362009-08-20  Oliver Hunt  <oliver@apple.com>
12237
12238        Add new exports to windows jsc build
12239
12240        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
12241        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
12242
122432009-08-20  Oliver Hunt  <oliver@apple.com>
12244
12245        Reviewed by Gavin Barraclough.
12246
12247        REGRESSION: significant slowdown on Celtic Kane "AJAX declaration" subtest
12248        https://bugs.webkit.org/show_bug.cgi?id=28332
12249
12250        The method check optimisation made transitions aware of the value being
12251        assigned when a transition was assigning a function.  This had the side
12252        effect of making every assignment of a function expression result in a
12253        new transition, and thus a new Structure.  The net result of this is that
12254        the common JS idiom of
12255
12256            function MyObject() {
12257                this.myFunction = function(...){...};
12258            }
12259            new MyObject();
12260
12261        Will produce a unique structure on every iteration, meaning that all
12262        caching is defeated and there is a significant amount of structure churn.
12263
12264        The fix is to return the transition to its original form where it is
12265        keyed off a property name + attributes tuple, but have each transition
12266        support an optional transition on a specific value.
12267
12268        * JavaScriptCore.exp:
12269        * runtime/JSObject.h:
12270        (JSC::JSObject::putDirectInternal):
12271        * runtime/Structure.cpp:
12272        (JSC::Structure::~Structure):
12273        (JSC::Structure::addPropertyTransitionToExistingStructure):
12274        (JSC::Structure::addPropertyTransition):
12275        (JSC::Structure::hasTransition):
12276        * runtime/Structure.h:
12277        (JSC::Structure::transitionedFor):
12278        (JSC::Structure::hasTransition):
12279        (JSC::Structure::):
12280        (JSC::StructureTransitionTable::contains):
12281        (JSC::StructureTransitionTable::get):
12282        * runtime/StructureTransitionTable.h:
12283        (JSC::StructureTransitionTableHashTraits::emptyValue):
12284        (JSC::StructureTransitionTable::hasTransition):
12285        (JSC::StructureTransitionTable::remove):
12286        (JSC::StructureTransitionTable::add):
12287
122882009-08-20  Gavin Barraclough  <barraclough@apple.com>
12289
12290        Reviewed by Oliver Hunt.
12291
12292        Remove FunctionCodeBlock.
12293        https://bugs.webkit.org/show_bug.cgi?id=28502
12294
12295        These only exist to allow JIT code to dereference properties off the
12296        CodeBlock for any callee, regardless of whether it is a host function.
12297
12298        Instead just use the FunctionExecutable.  Copy the m_parameters field
12299        from the CodeBlock into the Executable, and use this to distinguish
12300        between host functions, functions that have been bytecompiled, and
12301        functions that have not.
12302
12303        m_parameters is moved to ExecutableBase rather than FunctionExecutable
12304        so that (as a separate change) we can move make a separate class of
12305        executable for host code, which is not devived from FunctionExecutable
12306        (host code does not feature any of the properties that normal executable
12307        do and will provide, such as source, attributes, and a parsed name).
12308
12309        1% win on v8 tests, 0.5% on sunspider.
12310
12311        * bytecode/CodeBlock.cpp:
12312        (JSC::CodeBlock::derefStructures):
12313        (JSC::CodeBlock::refStructures):
12314        (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
12315        (JSC::CodeBlock::handlerForBytecodeOffset):
12316        (JSC::CodeBlock::lineNumberForBytecodeOffset):
12317        (JSC::CodeBlock::expressionRangeForBytecodeOffset):
12318        (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
12319        (JSC::CodeBlock::functionRegisterForBytecodeOffset):
12320        (JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset):
12321        (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset):
12322        * bytecode/CodeBlock.h:
12323        (JSC::):
12324        (JSC::CodeBlock::source):
12325        (JSC::CodeBlock::sourceOffset):
12326        (JSC::CodeBlock::evalCodeCache):
12327        (JSC::CodeBlock::createRareDataIfNecessary):
12328
12329            remove NativeCodeBlocks and the NativeCode code type.
12330
12331        * jit/JIT.cpp:
12332        (JSC::JIT::linkCall):
12333
12334            Revert to previous behaviour (as currently still commented!) that Hhost functions have a null codeblock.
12335
12336        * jit/JITCall.cpp:
12337        (JSC::JIT::compileOpCallInitializeCallFrame):
12338        (JSC::JIT::compileOpCallSetupArgs):
12339        (JSC::JIT::compileOpCallVarargsSetupArgs):
12340        (JSC::JIT::compileOpConstructSetupArgs):
12341        (JSC::JIT::compileOpCallVarargs):
12342        (JSC::JIT::compileOpCall):
12343        (JSC::JIT::compileOpCallSlowCase):
12344
12345            Bring the 32_64 & non-32_64 JITs into line with each other, callee in regT0.
12346
12347        * jit/JITOpcodes.cpp:
12348        (JSC::JIT::privateCompileCTIMachineTrampolines):
12349
12350            Rewrite call trampolines to not use the CodeBlock.
12351
12352        * jit/JITStubs.cpp:
12353        (JSC::DEFINE_STUB_FUNCTION):
12354
12355            Make call_JSFunction & call_arityCheck return the callee, don't expect to be passed the CodeBlock.
12356
12357        * runtime/Executable.cpp:
12358        (JSC::FunctionExecutable::generateBytecode):
12359        (JSC::FunctionExecutable::recompile):
12360        (JSC::FunctionExecutable::FunctionExecutable):
12361        * runtime/Executable.h:
12362        (JSC::ExecutableBase::):
12363        (JSC::ExecutableBase::ExecutableBase):
12364        (JSC::FunctionExecutable::isHostFunction):
12365
12366            Add m_numParameters.
12367
12368        * runtime/JSFunction.cpp:
12369        (JSC::JSFunction::~JSFunction):
12370
12371            Only call generatedBytecode() on JSFunctions non-host FunctionExecutables.
12372
123732009-08-20  Yongjun Zhang  <yongjun.zhang@nokia.com>
12374
12375        Reviewed by Eric Seidel.
12376
12377        https://bugs.webkit.org/show_bug.cgi?id=28054
12378
12379        Use a helper function to work around winscw compiler forward declaration bug
12380        regarding templated classes.
12381
12382        Add parenthesis around (PassRefPtr::*UnspecifiedBoolType) to make winscw compiler
12383        work with the default UnSpecifiedBoolType() operator, which removes the winscw
12384        specific bool cast hack.
12385
12386        * wtf/PassRefPtr.h:
12387        (WTF::derefIfNotNull):
12388        (WTF::PassRefPtr::~PassRefPtr):
12389
123902009-08-19  Yong Li  <yong.li@torchmobile.com>
12391
12392        Reviewed by Gavin Barraclough.
12393
12394        Change namespace ARM to ARMRegisters
12395        X86 to X86Registers to avoid conflict with macros
12396        https://bugs.webkit.org/show_bug.cgi?id=28428
12397
12398        * assembler/ARMAssembler.cpp:
12399        * assembler/ARMAssembler.h:
12400        * assembler/ARMv7Assembler.h:
12401        * assembler/MacroAssemblerARM.h:
12402        * assembler/MacroAssemblerARMv7.h:
12403        * assembler/MacroAssemblerX86Common.h:
12404        * assembler/MacroAssemblerX86_64.h:
12405        * assembler/X86Assembler.h:
12406        * jit/JIT.h:
12407        * jit/JITArithmetic.cpp:
12408        * jit/JITInlineMethods.h:
12409        * jit/JITOpcodes.cpp:
12410        * wrec/WRECGenerator.cpp:
12411        * wrec/WRECGenerator.h:
12412        * yarr/RegexJIT.cpp:
12413
124142009-08-19  Oliver Hunt  <oliver@apple.com>
12415
12416        Reviewed by Gavin Barraclough.
12417
12418        Devirtualise marking
12419        https://bugs.webkit.org/show_bug.cgi?id=28294
12420
12421        We actually need to mark the value in a number object if we're using the
12422        32bit number representation.
12423
12424        * runtime/NumberObject.h:
12425        (JSC::NumberObject::createStructure):
12426
124272009-08-19  Gavin Barraclough  <barraclough@apple.com>
12428
12429        Reviewed by Darin Adler.
12430
12431         We probably shouldn't be keeping the AST for eval nodes around forevar.
12432        https://bugs.webkit.org/show_bug.cgi?id=28469
12433
12434        EvalNodes don't destroyData() (delete their parser data) since they need to hold onto
12435        their varStack.  Copy a list of variable onto EvalCodeBlock, and this can go away.
12436
12437        * bytecode/CodeBlock.h:
12438        (JSC::EvalCodeBlock::variable):
12439        (JSC::EvalCodeBlock::numVariables):
12440        (JSC::EvalCodeBlock::adoptVariables):
12441        * bytecompiler/BytecodeGenerator.cpp:
12442        (JSC::BytecodeGenerator::BytecodeGenerator):
12443        * interpreter/Interpreter.cpp:
12444        (JSC::Interpreter::execute):
12445        * parser/Nodes.h:
12446        * runtime/Executable.cpp:
12447        (JSC::EvalExecutable::generateBytecode):
12448        * runtime/Executable.h:
12449
124502009-08-19  Jungshik Shin  <jshin@chromium.org>
12451
12452        Reviewed by Darin Adler.
12453
12454        http://bugs.webkit.org/show_bug.cgi?id=28441
12455
12456        Fix a build issue with ICU 4.2 or later on Windows with Visual C++.
12457        Instead of defining all isXXX and toupper/tolower as
12458          WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h,
12459        #define them to be different by prepending 'WTF_...ASCIIType_h' with
12460        the originial names like 'toupper_WTF_...ASCIIType_h'.
12461
12462        * wtf/DisallowCType.h:
12463
124642009-08-18  Oliver Hunt  <oliver@apple.com>
12465
12466        Reviewed by Gavin Barraclough.
12467
12468        Assigning a function to an object should always use the existing transition, even if the transition is not specialized
12469        https://bugs.webkit.org/show_bug.cgi?id=28442
12470
12471        Check for an unspecialized transition as an alternative to always failing if specialisation does not match.
12472
12473        * runtime/Structure.cpp:
12474        (JSC::Structure::addPropertyTransitionToExistingStructure):
12475
124762009-08-18  Dirk Schulze  <krit@webkit.org>
12477
12478        Reviewed by Oliver Hunt.
12479
12480        Added additional getter to ByteArray with an unsigned char as return.
12481        ByteArray can take unsigned char directly now.
12482
12483        * wtf/ByteArray.h:
12484        (WTF::ByteArray::set):
12485        (WTF::ByteArray::get):
12486
124872009-08-18  Peter Kasting  <pkasting@google.com>
12488
12489        Reviewed by Eric Seidel.
12490
12491        https://bugs.webkit.org/show_bug.cgi?id=28415
12492        Set svn:eol-style CRLF on all .sln and .vcproj files that don't already
12493        have it.
12494
12495        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
12496        * JavaScriptCore.vcproj/testapi/testapi.vcproj:
12497
124982009-08-18  Xan Lopez  <xlopez@igalia.com>
12499
12500        Try to fix the GTK+ build.
12501
12502        * GNUmakefile.am:
12503
125042009-08-17  Gavin Barraclough  <barraclough@apple.com>
12505
12506        Reviewed by Sam Weinig.
12507
12508        No, silly runtime, AST nodes are not for you.
12509
12510        We still use AST nodes (ScopeNodes, particularly FunctionBodyNodes) within
12511        the runtime, which means that these nodes must be persisted outside of the
12512        arena, contain both parser & runtime data, etc.  This is all a bit of a mess.
12513
12514        Move functionality into a new FunctionExecutable class.
12515
12516        * API/JSCallbackFunction.cpp:
12517        * API/JSObjectRef.cpp:
12518        * JavaScriptCore.exp:
12519        * JavaScriptCore.xcodeproj/project.pbxproj:
12520        * bytecode/CodeBlock.cpp:
12521        (JSC::CodeBlock::CodeBlock):
12522        (JSC::CodeBlock::markAggregate):
12523        (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
12524        (JSC::CodeBlock::lineNumberForBytecodeOffset):
12525        (JSC::CodeBlock::shrinkToFit):
12526        * bytecode/CodeBlock.h:
12527        (JSC::CodeBlock::getBytecodeIndex):
12528        (JSC::CodeBlock::discardBytecode):
12529        (JSC::CodeBlock::instructionCount):
12530        (JSC::CodeBlock::getJITCode):
12531        (JSC::CodeBlock::executablePool):
12532        (JSC::CodeBlock::ownerExecutable):
12533        (JSC::CodeBlock::extractExceptionInfo):
12534        (JSC::CodeBlock::addFunctionDecl):
12535        (JSC::CodeBlock::functionDecl):
12536        (JSC::CodeBlock::numberOfFunctionDecls):
12537        (JSC::CodeBlock::addFunctionExpr):
12538        (JSC::CodeBlock::functionExpr):
12539        (JSC::GlobalCodeBlock::GlobalCodeBlock):
12540        (JSC::ProgramCodeBlock::ProgramCodeBlock):
12541        (JSC::EvalCodeBlock::EvalCodeBlock):
12542        (JSC::FunctionCodeBlock::FunctionCodeBlock):
12543        (JSC::NativeCodeBlock::NativeCodeBlock):
12544        * bytecode/EvalCodeCache.h:
12545        * bytecode/SamplingTool.cpp:
12546        (JSC::SamplingTool::doRun):
12547        * bytecompiler/BytecodeGenerator.cpp:
12548        (JSC::BytecodeGenerator::BytecodeGenerator):
12549        (JSC::BytecodeGenerator::emitNewFunction):
12550        (JSC::BytecodeGenerator::emitNewFunctionExpression):
12551        * bytecompiler/BytecodeGenerator.h:
12552        * debugger/Debugger.cpp:
12553        (JSC::Debugger::recompileAllJSFunctions):
12554        * interpreter/CachedCall.h:
12555        (JSC::CachedCall::CachedCall):
12556        * interpreter/CallFrameClosure.h:
12557        * interpreter/Interpreter.cpp:
12558        (JSC::Interpreter::unwindCallFrame):
12559        (JSC::Interpreter::throwException):
12560        (JSC::Interpreter::execute):
12561        (JSC::Interpreter::prepareForRepeatCall):
12562        (JSC::Interpreter::debug):
12563        (JSC::Interpreter::privateExecute):
12564        (JSC::Interpreter::retrieveLastCaller):
12565        * interpreter/Interpreter.h:
12566        * jit/JIT.cpp:
12567        (JSC::JIT::privateCompile):
12568        * jit/JIT.h:
12569        (JSC::JIT::compile):
12570        * jit/JITOpcodes.cpp:
12571        (JSC::JIT::privateCompileCTIMachineTrampolines):
12572        (JSC::JIT::emit_op_new_func):
12573        (JSC::JIT::emit_op_new_func_exp):
12574        * jit/JITStubs.cpp:
12575        (JSC::DEFINE_STUB_FUNCTION):
12576        * jit/JITStubs.h:
12577        (JSC::):
12578        * parser/Nodes.cpp:
12579        (JSC::FunctionBodyNode::reparseDataIfNecessary):
12580        * parser/Nodes.h:
12581        (JSC::EvalNode::partialDestroyData):
12582        * parser/Parser.h:
12583        * profiler/ProfileGenerator.cpp:
12584        * profiler/Profiler.cpp:
12585        (JSC::Profiler::createCallIdentifier):
12586        (JSC::createCallIdentifierFromFunctionImp):
12587        * runtime/Arguments.h:
12588        (JSC::Arguments::getArgumentsData):
12589        (JSC::Arguments::Arguments):
12590        (JSC::JSActivation::copyRegisters):
12591        * runtime/ArrayPrototype.cpp:
12592        (JSC::isNumericCompareFunction):
12593        * runtime/CallData.h:
12594        (JSC::):
12595        * runtime/Collector.cpp:
12596        (JSC::Heap::collect):
12597        * runtime/ConstructData.h:
12598        (JSC::):
12599        * runtime/ExceptionHelpers.cpp:
12600        (JSC::createUndefinedVariableError):
12601        (JSC::createInvalidParamError):
12602        (JSC::createNotAConstructorError):
12603        (JSC::createNotAFunctionError):
12604        (JSC::createNotAnObjectError):
12605        * runtime/Executable.cpp: Added.
12606        (JSC::EvalExecutable::generateBytecode):
12607        (JSC::ProgramExecutable::generateBytecode):
12608        (JSC::FunctionExecutable::generateBytecode):
12609        (JSC::EvalExecutable::generateJITCode):
12610        (JSC::ProgramExecutable::generateJITCode):
12611        (JSC::FunctionExecutable::generateJITCode):
12612        (JSC::FunctionExecutable::isHostFunction):
12613        (JSC::FunctionExecutable::markAggregate):
12614        (JSC::FunctionExecutable::reparseExceptionInfo):
12615        (JSC::EvalExecutable::reparseExceptionInfo):
12616        (JSC::FunctionExecutable::recompile):
12617        (JSC::FunctionExecutable::FunctionExecutable):
12618        * runtime/Executable.h:
12619        (JSC::ExecutableBase::~ExecutableBase):
12620        (JSC::ExecutableBase::ExecutableBase):
12621        (JSC::ExecutableBase::source):
12622        (JSC::ExecutableBase::sourceID):
12623        (JSC::ExecutableBase::lastLine):
12624        (JSC::ExecutableBase::usesEval):
12625        (JSC::ExecutableBase::usesArguments):
12626        (JSC::ExecutableBase::needsActivation):
12627        (JSC::ExecutableBase::astNode):
12628        (JSC::ExecutableBase::generatedJITCode):
12629        (JSC::ExecutableBase::getExecutablePool):
12630        (JSC::EvalExecutable::EvalExecutable):
12631        (JSC::EvalExecutable::bytecode):
12632        (JSC::EvalExecutable::varStack):
12633        (JSC::EvalExecutable::evalNode):
12634        (JSC::EvalExecutable::jitCode):
12635        (JSC::ProgramExecutable::ProgramExecutable):
12636        (JSC::ProgramExecutable::reparseExceptionInfo):
12637        (JSC::ProgramExecutable::bytecode):
12638        (JSC::ProgramExecutable::programNode):
12639        (JSC::ProgramExecutable::jitCode):
12640        (JSC::FunctionExecutable::FunctionExecutable):
12641        (JSC::FunctionExecutable::name):
12642        (JSC::FunctionExecutable::bytecode):
12643        (JSC::FunctionExecutable::generatedBytecode):
12644        (JSC::FunctionExecutable::usesEval):
12645        (JSC::FunctionExecutable::usesArguments):
12646        (JSC::FunctionExecutable::parameterCount):
12647        (JSC::FunctionExecutable::paramString):
12648        (JSC::FunctionExecutable::isGenerated):
12649        (JSC::FunctionExecutable::body):
12650        (JSC::FunctionExecutable::jitCode):
12651        (JSC::FunctionExecutable::createNativeThunk):
12652        * runtime/FunctionConstructor.cpp:
12653        (JSC::constructFunction):
12654        * runtime/FunctionPrototype.cpp:
12655        (JSC::functionProtoFuncToString):
12656        * runtime/JSActivation.cpp:
12657        (JSC::JSActivation::JSActivation):
12658        (JSC::JSActivation::markChildren):
12659        (JSC::JSActivation::isDynamicScope):
12660        (JSC::JSActivation::argumentsGetter):
12661        * runtime/JSActivation.h:
12662        (JSC::JSActivation::JSActivationData::JSActivationData):
12663        * runtime/JSFunction.cpp:
12664        (JSC::JSFunction::isHostFunction):
12665        (JSC::JSFunction::JSFunction):
12666        (JSC::JSFunction::~JSFunction):
12667        (JSC::JSFunction::markChildren):
12668        (JSC::JSFunction::getCallData):
12669        (JSC::JSFunction::call):
12670        (JSC::JSFunction::lengthGetter):
12671        (JSC::JSFunction::getConstructData):
12672        (JSC::JSFunction::construct):
12673        * runtime/JSFunction.h:
12674        (JSC::JSFunction::executable):
12675        (JSC::FunctionExecutable::make):
12676        * runtime/JSGlobalData.cpp:
12677        (JSC::JSGlobalData::JSGlobalData):
12678        (JSC::JSGlobalData::numericCompareFunction):
12679        * runtime/JSGlobalData.h:
12680
126812009-08-17  Mark Rowe  <mrowe@apple.com>
12682
12683        Reviewed by Darin Adler.
12684
12685        Fix 300,000+ leaks seen during the regression tests.
12686
12687        EvalCodeCache::get was heap-allocating an EvalExecutable instance without adopting the initial reference.
12688        While fixing this we noticed that EvalExecutable was a RefCounted type that was sometimes stack allocated.
12689        To make this cleaner and to prevent clients from attempting to ref a stack-allocated instance, we move the
12690        refcounting down to a new CacheableEvalExecutable class that derives from EvalExecutable. EvalCodeCache::get
12691        now uses CacheableEvalExecutable::create and avoids the leak.
12692
12693        * bytecode/EvalCodeCache.h:
12694        (JSC::EvalCodeCache::get):
12695        * interpreter/Interpreter.cpp:
12696        (JSC::Interpreter::callEval):
12697        * runtime/Executable.h:
12698        (JSC::CacheableEvalExecutable::create):
12699        (JSC::CacheableEvalExecutable::CacheableEvalExecutable):
12700
127012009-08-17  Oliver Hunt  <oliver@apple.com>
12702
12703        RS=Mark Rowe.
12704
12705        REGRESSION (r47292): Prototype.js is broken by ES5 Arguments changes
12706        https://bugs.webkit.org/show_bug.cgi?id=28341
12707        <rdar://problem/7145615>
12708
12709        Reverting r47292.  Alas Prototype.js breaks with Arguments inheriting
12710        from Array as ES5 attempted.  Prototype.js defines $A in terms of a
12711        function it places on (among other global objects) the Array prototype,
12712        thus breaking $A for arrays.
12713
12714        * runtime/Arguments.h:
12715        (JSC::Arguments::Arguments):
12716        * runtime/JSGlobalObject.cpp:
12717        (JSC::JSGlobalObject::reset):
12718        (JSC::JSGlobalObject::markChildren):
12719        * runtime/JSGlobalObject.h:
12720        (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
12721        * runtime/ObjectPrototype.cpp:
12722        (JSC::ObjectPrototype::ObjectPrototype):
12723        * runtime/ObjectPrototype.h:
12724        * tests/mozilla/ecma_3/Function/arguments-001.js:
12725
127262009-08-17  Peter Kasting  <pkasting@google.com>
12727
12728        Reviewed by Steve Falkenburg.
12729
12730        https://bugs.webkit.org/show_bug.cgi?id=27323
12731        Only add Cygwin to the path when it isn't already there.  This avoids
12732        causing problems for people who purposefully have non-Cygwin versions of
12733        executables like svn in front of the Cygwin ones in their paths.
12734
12735        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
12736        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
12737        * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
12738        * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
12739        * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
12740
127412009-08-17  Xan Lopez  <xlopez@igalia.com>
12742
12743        Reviewed by Mark Rowe.
12744
12745        Fix build with FAST_MALLOC_MATCH_VALIDATION enabled.
12746
12747        * wtf/FastMalloc.cpp:
12748        (WTF::fastMalloc):
12749        (WTF::fastCalloc):
12750        (WTF::fastRealloc):
12751
127522009-08-16  Holger Hans Peter Freyther  <zecke@selfish.org>
12753
12754        Reviewed by Mark Rowe.
12755
12756        Fix crash on ./ecma_2/RegExp/exec-002.js.
12757        https://bugs.webkit.org/show_bug.cgi?id=28353
12758
12759        Change the order of freeParenthesesDisjunctionContext and
12760        popParenthesesDisjunctionContext on all call sites as the pop
12761        method is accessing backTrack->lastContext which is the context
12762        that is about to be freed.
12763
12764        * yarr/RegexInterpreter.cpp:
12765        (JSC::Yarr::Interpreter::parenthesesDoBacktrack):
12766        (JSC::Yarr::Interpreter::backtrackParentheses):
12767
127682009-08-16  Holger Hans Peter Freyther  <zecke@selfish.org>
12769
12770        Reviewed by Mark Rowe.
12771
12772        https://bugs.webkit.org/show_bug.cgi?id=28352
12773
12774        Fix coding style violations. Use m_ for C++ class members. Remove
12775        trailing whitespace on empty lines.
12776
12777        * yarr/RegexInterpreter.cpp:
12778        (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::ParenthesesDisjunctionContext):
12779        (JSC::Yarr::Interpreter::tryConsumeCharacter):
12780        (JSC::Yarr::Interpreter::tryConsumeBackReference):
12781        (JSC::Yarr::Interpreter::parenthesesDoBacktrack):
12782        (JSC::Yarr::Interpreter::backtrackParentheses):
12783        (JSC::Yarr::ByteCompiler::ByteCompiler):
12784        (JSC::Yarr::ByteCompiler::compile):
12785        (JSC::Yarr::ByteCompiler::checkInput):
12786        (JSC::Yarr::ByteCompiler::assertionBOL):
12787        (JSC::Yarr::ByteCompiler::assertionEOL):
12788        (JSC::Yarr::ByteCompiler::assertionWordBoundary):
12789        (JSC::Yarr::ByteCompiler::atomPatternCharacter):
12790        (JSC::Yarr::ByteCompiler::atomCharacterClass):
12791        (JSC::Yarr::ByteCompiler::atomBackReference):
12792        (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
12793        (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin):
12794        (JSC::Yarr::ByteCompiler::popParenthesesStack):
12795        (JSC::Yarr::ByteCompiler::closeAlternative):
12796        (JSC::Yarr::ByteCompiler::closeBodyAlternative):
12797        (JSC::Yarr::ByteCompiler::atomParenthesesEnd):
12798        (JSC::Yarr::ByteCompiler::regexBegin):
12799        (JSC::Yarr::ByteCompiler::alterantiveBodyDisjunction):
12800        (JSC::Yarr::ByteCompiler::alterantiveDisjunction):
12801        (JSC::Yarr::ByteCompiler::emitDisjunction):
12802
128032009-08-15  Mark Rowe  <mrowe@apple.com>
12804
12805        Fix the build with JIT disabled.
12806
12807        * runtime/Arguments.h: Only compile the jitCode method when the JIT is enabled.
12808        * runtime/Executable.h: Include PrototypeFunction.h so the compiler knows what
12809        NativeFunctionWrapper is when the JIT is disabled.
12810
128112009-08-15  Adam Bergkvist  <adam.bergkvist@ericsson.com>
12812
12813        Reviewed by Sam Weinig.
12814
12815        Added ENABLE_EVENTSOURCE flag.
12816        https://bugs.webkit.org/show_bug.cgi?id=14997
12817
12818        * Configurations/FeatureDefines.xcconfig:
12819
128202009-08-14  Gavin Barraclough  <barraclough@apple.com>
12821
12822        * parser/Parser.h:
12823        (JSC::EvalExecutable::parse):
12824        (JSC::ProgramExecutable::parse):
12825        * runtime/Executable.h:
12826
128272009-08-14  Gavin Barraclough  <barraclough@apple.com>
12828
12829        Reviewed by Oliver Hunt.
12830
12831        Remove AST nodes from use within the Runtime (outside of parsing), stage 1
12832        https://bugs.webkit.org/show_bug.cgi?id=28330
12833
12834        Remove the EvalNode and ProgramNode from use in the runtime.  They still exist
12835        after this patch, but are hidden behind EvalExecutable and FunctionExecutable,
12836        and are also still reachable behind CodeBlock::m_ownerNode.
12837
12838        The next step will be to beat back FunctionBodyNode in the same fashion.
12839        Then remove the usage via CodeBlock, then only construct these nodes only on
12840        demand during bytecode generation.
12841
12842        * JavaScriptCore.xcodeproj/project.pbxproj:
12843        * bytecode/CodeBlock.h:
12844        (JSC::GlobalCodeBlock::GlobalCodeBlock):
12845        (JSC::GlobalCodeBlock::~GlobalCodeBlock):
12846        (JSC::ProgramCodeBlock::ProgramCodeBlock):
12847        (JSC::EvalCodeBlock::EvalCodeBlock):
12848        (JSC::FunctionCodeBlock::FunctionCodeBlock):
12849        (JSC::NativeCodeBlock::NativeCodeBlock):
12850        * bytecode/EvalCodeCache.h:
12851        (JSC::EvalCodeCache::get):
12852        * debugger/Debugger.cpp:
12853        (JSC::evaluateInGlobalCallFrame):
12854        * debugger/DebuggerCallFrame.cpp:
12855        (JSC::DebuggerCallFrame::evaluate):
12856        * interpreter/Interpreter.cpp:
12857        (JSC::Interpreter::callEval):
12858        (JSC::Interpreter::execute):
12859        * interpreter/Interpreter.h:
12860        * parser/Nodes.cpp:
12861        (JSC::FunctionBodyNode::createNativeThunk):
12862        (JSC::FunctionBodyNode::generateBytecode):
12863        (JSC::FunctionBodyNode::bytecodeForExceptionInfoReparse):
12864        * parser/Parser.h:
12865        (JSC::Parser::parse):
12866        (JSC::Parser::reparse):
12867        (JSC::Parser::parseFunctionFromGlobalCode):
12868        (JSC::::parse):
12869        * runtime/Completion.cpp:
12870        (JSC::checkSyntax):
12871        (JSC::evaluate):
12872        * runtime/Error.cpp:
12873        (JSC::throwError):
12874        * runtime/Error.h:
12875        * runtime/Executable.h: Added.
12876        (JSC::TemplateExecutable::TemplateExecutable):
12877        (JSC::TemplateExecutable::markAggregate):
12878        (JSC::TemplateExecutable::sourceURL):
12879        (JSC::TemplateExecutable::lineNo):
12880        (JSC::TemplateExecutable::bytecode):
12881        (JSC::TemplateExecutable::jitCode):
12882        (JSC::EvalExecutable::EvalExecutable):
12883        (JSC::ProgramExecutable::ProgramExecutable):
12884        * runtime/FunctionConstructor.cpp:
12885        (JSC::constructFunction):
12886        * runtime/FunctionConstructor.h:
12887        * runtime/JSGlobalData.cpp:
12888        (JSC::JSGlobalData::numericCompareFunction):
12889        * runtime/JSGlobalObject.cpp:
12890        (JSC::JSGlobalObject::~JSGlobalObject):
12891        (JSC::JSGlobalObject::markChildren):
12892        * runtime/JSGlobalObject.h:
12893        (JSC::JSGlobalObject::codeBlocks):
12894        * runtime/JSGlobalObjectFunctions.cpp:
12895        (JSC::globalFuncEval):
12896
128972009-08-14  Darin Adler  <darin@apple.com>
12898
12899        Reviewed by Sam Weinig.
12900
12901        Rename the confusing isObject(<class>) to inherits(<class>).
12902        It still works on non-objects, returning false.
12903
12904        * runtime/ArrayConstructor.cpp:
12905        (JSC::arrayConstructorIsArray): Removed unneeded isObject call
12906        and updated remaining isObject call to new name, inherits.
12907
12908        * runtime/JSCell.h: Renamed isObject(<class>) to inherits(<class>)
12909        but more importantly, made it non-virtual (it was already inline)
12910        so it is now as fast as JSObject::inherits was.
12911
12912        * runtime/JSObject.h: Removed inherits function since the one
12913        in the base class is fine as-is. Also made various JSCell functions
12914        that should not be called on JSObject uncallable by making them
12915        both private and not implemented.
12916        (JSC::JSCell::inherits): Updated name.
12917        (JSC::JSValue::inherits): Ditto.
12918
12919        * debugger/Debugger.cpp:
12920        (JSC::Debugger::recompileAllJSFunctions):
12921        * interpreter/Interpreter.cpp:
12922        (JSC::Interpreter::unwindCallFrame):
12923        * runtime/ArrayPrototype.cpp:
12924        (JSC::arrayProtoFuncToString):
12925        (JSC::arrayProtoFuncToLocaleString):
12926        (JSC::arrayProtoFuncConcat):
12927        * runtime/BooleanPrototype.cpp:
12928        (JSC::booleanProtoFuncToString):
12929        (JSC::booleanProtoFuncValueOf):
12930        * runtime/DateConstructor.cpp:
12931        (JSC::constructDate):
12932        * runtime/DatePrototype.cpp:
12933        (JSC::dateProtoFuncToString):
12934        (JSC::dateProtoFuncToUTCString):
12935        (JSC::dateProtoFuncToISOString):
12936        (JSC::dateProtoFuncToDateString):
12937        (JSC::dateProtoFuncToTimeString):
12938        (JSC::dateProtoFuncToLocaleString):
12939        (JSC::dateProtoFuncToLocaleDateString):
12940        (JSC::dateProtoFuncToLocaleTimeString):
12941        (JSC::dateProtoFuncGetTime):
12942        (JSC::dateProtoFuncGetFullYear):
12943        (JSC::dateProtoFuncGetUTCFullYear):
12944        (JSC::dateProtoFuncToGMTString):
12945        (JSC::dateProtoFuncGetMonth):
12946        (JSC::dateProtoFuncGetUTCMonth):
12947        (JSC::dateProtoFuncGetDate):
12948        (JSC::dateProtoFuncGetUTCDate):
12949        (JSC::dateProtoFuncGetDay):
12950        (JSC::dateProtoFuncGetUTCDay):
12951        (JSC::dateProtoFuncGetHours):
12952        (JSC::dateProtoFuncGetUTCHours):
12953        (JSC::dateProtoFuncGetMinutes):
12954        (JSC::dateProtoFuncGetUTCMinutes):
12955        (JSC::dateProtoFuncGetSeconds):
12956        (JSC::dateProtoFuncGetUTCSeconds):
12957        (JSC::dateProtoFuncGetMilliSeconds):
12958        (JSC::dateProtoFuncGetUTCMilliseconds):
12959        (JSC::dateProtoFuncGetTimezoneOffset):
12960        (JSC::dateProtoFuncSetTime):
12961        (JSC::setNewValueFromTimeArgs):
12962        (JSC::setNewValueFromDateArgs):
12963        (JSC::dateProtoFuncSetYear):
12964        (JSC::dateProtoFuncGetYear):
12965        * runtime/FunctionPrototype.cpp:
12966        (JSC::functionProtoFuncToString):
12967        * runtime/JSActivation.cpp:
12968        (JSC::JSActivation::argumentsGetter):
12969        * runtime/JSValue.h:
12970        * runtime/RegExpConstructor.cpp:
12971        (JSC::constructRegExp):
12972        * runtime/RegExpPrototype.cpp:
12973        (JSC::regExpProtoFuncTest):
12974        (JSC::regExpProtoFuncExec):
12975        (JSC::regExpProtoFuncCompile):
12976        (JSC::regExpProtoFuncToString):
12977        * runtime/ScopeChain.cpp:
12978        (JSC::ScopeChain::localDepth):
12979        * runtime/StringPrototype.cpp:
12980        (JSC::stringProtoFuncReplace):
12981        (JSC::stringProtoFuncToString):
12982        (JSC::stringProtoFuncMatch):
12983        (JSC::stringProtoFuncSearch):
12984        (JSC::stringProtoFuncSplit):
12985        Updated to new name, inherits, from old name, isObject.
12986
129872009-07-31  Harald Fernengel  <harald.fernengel@nokia.com>
12988
12989        Reviewed by Simon Hausmann.
12990
12991        Adding QNX as a platform. Currently only tested with Qt.
12992
12993        https://bugs.webkit.org/show_bug.cgi?id=27885
12994
12995        * JavaScriptCore/runtime/Collector.cpp: Added retrieving of stack base
12996          since QNX doesn't have the pthread _nt functions
12997        * JavaScriptCore/wtf/Platform.h: Added WTF_PLATFORM_QNX and corresponding
12998          defines
12999        * WebCore/bridge/npapi.h: Build fix for missing typedefs on QNX
13000
130012009-08-14  Gabor Loki  <loki@inf.u-szeged.hu>
13002
13003        Reviewed by Simon Hausmann.
13004
13005        Currently generic ARM and ARMv7 platforms work only with JSVALUE32
13006        https://bugs.webkit.org/show_bug.cgi?id=28300
13007
13008        * wtf/Platform.h:
13009
130102009-08-14  Gabor Loki  <loki@inf.u-szeged.hu>
13011
13012        Reviewed by Simon Hausmann.
13013
13014        Enable JIT on ARM for QT by default
13015        https://bugs.webkit.org/show_bug.cgi?id=28259
13016
13017        * wtf/Platform.h:
13018
130192009-08-14  Gabor Loki  <loki@inf.u-szeged.hu>
13020
13021        Reviewed by Simon Hausmann.
13022
13023        Enable YARR_JIT on ARM for QT by default
13024        https://bugs.webkit.org/show_bug.cgi?id=28259
13025
13026        * wtf/Platform.h:
13027
130282009-08-14  Oliver Hunt  <oliver@apple.com>
13029
13030        Reviewed by Gavin Barraclough.
13031
13032        [ES5] Arguments object should inherit from Array
13033        https://bugs.webkit.org/show_bug.cgi?id=28298
13034
13035        Make the Arguments object conform to the behaviour specified in ES5.
13036        The simple portion of this is to make Arguments use Array.prototype
13037        as its prototype rather than Object.prototype.
13038
13039        The spec then requires us to set instance.constructor to the pristine
13040        Object constructor, and instance.toString and instance.toLocaleString
13041        to the pristine versions from Object.prototype.  To do this we now
13042        make the ObjectPrototype constructor return its toString and
13043        toLocaleString functions (similar to the call and apply functions
13044        from FunctionPrototype).
13045
13046        Oddly enough this reports itself as a slight win, but given the code
13047        isn't hit in the tests that claim to have improved I put this down to
13048        code motion.
13049
13050        * runtime/Arguments.h:
13051        (JSC::Arguments::Arguments):
13052        (JSC::Arguments::initializeStandardProperties):
13053        * runtime/JSGlobalObject.cpp:
13054        (JSC::JSGlobalObject::reset):
13055        (JSC::JSGlobalObject::markChildren):
13056        * runtime/JSGlobalObject.h:
13057        (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
13058        (JSC::JSGlobalObject::objectConstructor):
13059        (JSC::JSGlobalObject::objectToStringFunction):
13060        (JSC::JSGlobalObject::objectToLocaleStringFunction):
13061        * runtime/ObjectPrototype.cpp:
13062        (JSC::ObjectPrototype::ObjectPrototype):
13063        * runtime/ObjectPrototype.h:
13064        * tests/mozilla/ecma_3/Function/arguments-001.js:
13065          Update test to new es5 behaviour
13066
130672009-08-14  Oliver Hunt  <oliver@apple.com>
13068
13069        Remove MarkStack::drain from the JSC exports file
13070
13071        MarkStack::drain is now marked inline, the including it in the exports file
13072        produces an ld warning
13073
13074        * JavaScriptCore.exp:
13075
130762009-08-13  Sam Weinig  <sam@webkit.org>
13077
13078        Reviewed by Oliver Hunt.
13079
13080        Remove accidentally left in debugging statement.
13081
13082        * runtime/JSArray.h:
13083        (JSC::MarkStack::drain):
13084
130852009-08-13  Oliver Hunt  <oliver@apple.com>
13086
13087        Reviewed by Maciej Stachowiak.
13088
13089        [ES5] Implement Array.isArray
13090        https://bugs.webkit.org/show_bug.cgi?id=28296
13091
13092        Add support for Array.isArray to the Array constructor
13093
13094        * runtime/ArrayConstructor.cpp:
13095        (JSC::ArrayConstructor::ArrayConstructor):
13096        (JSC::arrayConstructorIsArray):
13097        * runtime/ArrayConstructor.h:
13098        * runtime/CommonIdentifiers.h:
13099        * runtime/JSArray.h:
13100        (JSC::MarkStack::drain):
13101        * runtime/JSGlobalObject.cpp:
13102        (JSC::JSGlobalObject::reset):
13103
131042009-08-13  Oliver Hunt  <oliver@apple.com>
13105
13106        Reviewed by NOBODY (Buildfix).
13107
13108        Attempt to fix windows build
13109
13110        * runtime/Collector.cpp:
13111
131122009-08-13  Oliver Hunt  <oliver@apple.com>
13113
13114        Reviewed by Maciej Stachowiak.
13115
13116        Devirtualise marking
13117        https://bugs.webkit.org/show_bug.cgi?id=28294
13118
13119        Add a bit to TypeInfo to indicate that an object uses the standard
13120        JSObject::markChildren method.  This allows us to devirtualise marking
13121        of most objects (though a branch is still needed).  We also add a branch
13122        to identify arrays thus devirtualising marking in that case as well.
13123
13124        In order to make the best use of this devirtualisation I've also reworked
13125        the MarkStack::drain() logic to make the iteration more efficient.
13126
13127        * API/JSCallbackConstructor.h:
13128        (JSC::JSCallbackConstructor::createStructure):
13129        * API/JSCallbackFunction.h:
13130        (JSC::JSCallbackFunction::createStructure):
13131        * JavaScriptCore.exp:
13132        * runtime/BooleanObject.h:
13133        (JSC::BooleanObject::createStructure):
13134        * runtime/FunctionPrototype.h:
13135        (JSC::FunctionPrototype::createStructure):
13136        * runtime/InternalFunction.h:
13137        (JSC::InternalFunction::createStructure):
13138        * runtime/JSAPIValueWrapper.h:
13139        (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
13140        * runtime/JSArray.cpp:
13141        (JSC::JSArray::markChildren):
13142        * runtime/JSArray.h:
13143        (JSC::JSArray::markChildrenDirect):
13144        (JSC::MarkStack::drain):
13145        * runtime/JSByteArray.cpp:
13146        (JSC::JSByteArray::createStructure):
13147        * runtime/JSCell.h:
13148        (JSC::MarkStack::append):
13149        * runtime/JSGlobalData.cpp:
13150        (JSC::JSGlobalData::JSGlobalData):
13151        * runtime/JSNumberCell.h:
13152        (JSC::JSNumberCell::createStructure):
13153        * runtime/JSONObject.h:
13154        (JSC::JSONObject::createStructure):
13155        * runtime/JSObject.cpp:
13156        (JSC::JSObject::markChildren):
13157        * runtime/JSObject.h:
13158        (JSC::JSObject::markChildrenDirect):
13159        (JSC::JSObject::createStructure):
13160        * runtime/JSString.h:
13161        (JSC::JSString::createStructure):
13162        * runtime/JSType.h:
13163        (JSC::):
13164        * runtime/MarkStack.h:
13165        (JSC::MarkStack::MarkStack):
13166        (JSC::MarkStack::MarkSet::MarkSet):
13167        (JSC::MarkStack::MarkStackArray::last):
13168        * runtime/MathObject.h:
13169        (JSC::MathObject::createStructure):
13170        * runtime/NumberConstructor.h:
13171        (JSC::NumberConstructor::createStructure):
13172        * runtime/NumberObject.h:
13173        (JSC::NumberObject::createStructure):
13174        * runtime/RegExpConstructor.h:
13175        (JSC::RegExpConstructor::createStructure):
13176        * runtime/RegExpObject.h:
13177        (JSC::RegExpObject::createStructure):
13178        * runtime/StringObjectThatMasqueradesAsUndefined.h:
13179        (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
13180        * runtime/TypeInfo.h:
13181        (JSC::TypeInfo::hasDefaultMark):
13182
131832009-08-13  Darin Adler  <darin@apple.com>
13184
13185        Reviewed by Mark Rowe.
13186
13187        Some small bits of housekeeping.
13188
13189        * JavaScriptCore.xcodeproj/project.pbxproj: Make Parser.h
13190        project instead of private. Remove JSONObject.lut.h.
13191
13192        * assembler/ARMAssembler.h: Remove unneeded WTF prefix.
13193        * assembler/AssemblerBufferWithConstantPool.h: Ditto.
13194        * bytecompiler/BytecodeGenerator.h: Ditto.
13195
13196        * wtf/SegmentedVector.h: Add a "using" statement as we do
13197        with the other WTF headers.
13198
131992009-08-13  Darin Adler  <darin@apple.com>
13200
13201        Fix Tiger build.
13202
13203        * parser/Grammar.y: Use a template function so we can compile
13204        setStatementLocation even if it comes before YYLTYPE is defined.
13205
132062009-08-13  Darin Adler  <darin@apple.com>
13207
13208        Reviewed by George Staikos.
13209
13210        Too much use of void* in Grammar.y
13211        https://bugs.webkit.org/show_bug.cgi?id=28287
13212
13213        * parser/Grammar.y: Changed all the helper functions to
13214        take a JSGlobalData* instead of a void*. A couple formatting
13215        tweaks that I missed when breaking this into pieces.
13216
132172009-08-13  Darin Adler  <darin@apple.com>
13218
13219        Reviewed by George Staikos.
13220
13221        Another part of https://bugs.webkit.org/show_bug.cgi?id=28287
13222
13223        * parser/Grammar.y: Reduced and sorted includes. Tweaked comment
13224        format. Marked a few more functions inline.
13225
132262009-08-13  Darin Adler  <darin@apple.com>
13227
13228        Reviewed by George Staikos.
13229
13230        Another part of https://bugs.webkit.org/show_bug.cgi?id=28287
13231
13232        * parser/Grammar.y: Pass the number to the PropertyNode instead of
13233        first turning it into an Identifier.
13234
13235        * parser/NodeConstructors.h:
13236        (JSC::PropertyNode::PropertyNode): Add an overload that takes a double
13237        so the code to convert to a string can be here instead of Grammar.y.
13238        * parser/Nodes.h: Ditto.
13239
132402009-08-13  Darin Adler  <darin@apple.com>
13241
13242        Reviewed by George Staikos.
13243
13244        Another part of https://bugs.webkit.org/show_bug.cgi?id=28287
13245
13246        * parser/Grammar.y: Eliminate the DBG macro.
13247
132482009-08-13  Darin Adler  <darin@apple.com>
13249
13250        Reviewed by George Staikos.
13251
13252        Another part of https://bugs.webkit.org/show_bug.cgi?id=28287
13253
13254        * parser/Grammar.y: Eliminate the SET_EXCEPTION_LOCATION macro.
13255
132562009-08-13  Darin Adler  <darin@apple.com>
13257
13258        Reviewed by George Staikos.
13259
13260        George asked me to break the patch from
13261        https://bugs.webkit.org/show_bug.cgi?id=28287
13262        into smaller pieces and land it in stages.
13263
13264        * parser/Grammar.y: Eliminate the LEXER macro.
13265
132662009-08-13  Mark Rowe  <mrowe@apple.com>
13267
13268        Try some more to fix the Windows build.
13269
13270        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export a new symbol.
13271        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Ditto.
13272
132732009-08-13  Mark Rowe  <mrowe@apple.com>
13274
13275        Try and fix the Windows build.
13276
13277        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export a new symbol.
13278        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Ditto.
13279
132802009-08-13  Darin Adler  <darin@apple.com>
13281
13282        Reviewed by David Levin.
13283
13284        JavaScriptCore tweaks to get ready for the parser arena
13285        https://bugs.webkit.org/show_bug.cgi?id=28243
13286
13287        Eliminate dependencies on Nodes.h outside JavaScriptCore,
13288        and cut down on them inside JavaScriptCore.
13289
13290        Change regular expression parsing to use identifiers as
13291        with other strings we parse.
13292
13293        Fix a couple things that are needed to use const Identifier
13294        more, which will be part of the parser arena work.
13295
13296        * JavaScriptCore.exp: Resorted and updated.
13297
13298        * JavaScriptCore.xcodeproj/project.pbxproj: Changed
13299        CollectorHeapIterator.h to be project-internal.
13300
13301        * bytecompiler/BytecodeGenerator.cpp:
13302        (JSC::BytecodeGenerator::emitPushNewScope): Added const.
13303        * bytecompiler/BytecodeGenerator.h: Ditto.
13304
13305        * debugger/Debugger.cpp:
13306        (JSC::Debugger::recompileAllJSFunctions): Moved this function
13307        here from WebCore. Here is better since it uses so many internals.
13308        Removed unimportant optimization for the no listener case.
13309        * debugger/Debugger.h: Ditto. Also removed unneeded include
13310        and tweaked formatting and comments.
13311
13312        * debugger/DebuggerCallFrame.cpp:
13313        (JSC::DebuggerCallFrame::functionName): Call asFunction instead
13314        of doing the unchecked static_cast.
13315        (JSC::DebuggerCallFrame::calculatedFunctionName): Ditto.
13316
13317        * jit/JITStubs.cpp:
13318        (JSC::op_call_JSFunction): Call isHostFunction on the body rather
13319        than on the JSFunction.
13320        (JSC::vm_lazyLinkCall): Ditto.
13321        (JSC::op_construct_JSConstruct): Ditto.
13322
13323        * parser/Grammar.y: Changed callers to use new scanRegExp with
13324        out arguments instead of relying on state in the Lexer. And
13325        callers that just want to skip a regular expression to use
13326        skipRegExp.
13327
13328        * parser/Lexer.cpp:
13329        (JSC::Lexer::scanRegExp): Changed to use out arguments, and to
13330        add a prefix argument so we can add in the "=" character as needed.
13331        Also rewrote to streamline the logic a bit inspired by suggestions
13332        by David Levin.
13333        (JSC::Lexer::skipRegExp): Added. Version of the function above that
13334        does not actually put the regular expression into a string.
13335        (JSC::Lexer::clear): Removed code to clear m_pattern and m_flags.
13336        * parser/Lexer.h: Changed scanRegExp to have out arguments. Added
13337        skipRegExp. Eliminated pattern, flags, m_pattern, and m_flags.
13338
13339        * parser/NodeConstructors.h:
13340        (JSC::RegExpNode::RegExpNode): Changed to take const Identifier&.
13341        * parser/Nodes.cpp:
13342        (JSC::RegExpNode::emitBytecode): Changed since m_pattern and
13343        m_flags are now Identifier instead of UString.
13344        (JSC::FunctionBodyNode::make): Moved this function here instead
13345        of putting it in the JSFunction.h header.
13346        * parser/Nodes.h: Changed RegExpNode to use Identifier.
13347
13348        * profiler/Profiler.cpp:
13349        (JSC::Profiler::createCallIdentifier): Changed to use isHostFunction
13350        on the body instead of on the JSFunction object.
13351        * runtime/FunctionPrototype.cpp:
13352        (JSC::functionProtoFuncToString): Ditto.
13353
13354        * runtime/JSFunction.cpp:
13355        (JSC::JSFunction::isHostFunction): Moved here from header.
13356        (JSC::JSFunction::isHostFunctionNonInline): Added.
13357        (JSC::JSFunction::JSFunction): Removed unneeded initialization of
13358        m_body to 0.
13359        (JSC::JSFunction::setBody): Moved here from header.
13360
13361        * runtime/JSFunction.h: Removed unneeded includes. Moved private
13362        constructor down to the private section. Made virtual functions
13363        private. Removed unneeded overload of setBody and moved the body
13364        of the function into the .cpp file. Changed assertions to use
13365        the non-inline version of isHostFunction.
13366
13367        * runtime/PropertySlot.cpp:
13368        (JSC::PropertySlot::functionGetter): Use asFunction instead
13369        of doing the unchecked static_cast.
13370
13371        * wtf/SegmentedVector.h:
13372        (WTF::SegmentedVector::isEmpty): Added.
13373
133742009-08-13  Mark Rowe  <mrowe@apple.com>
13375
13376        Rubber-stamped by Darin Adler.
13377
13378        Use the version of operator new that takes a JSGlobalData when allocating FuncDeclNode and FuncExprNode
13379        from within the grammar to prevent these nodes from being leaked.
13380
13381        * parser/Grammar.y:
13382
133832009-08-13  Simon Hausmann  <simon.hausmann@nokia.com>
13384
13385        Reviewed by Ariya Hidayat.
13386
13387        Remove the special-case for Qt wrt JSVALUE_32 introduced in
13388        r46709. It must've been a dependency issue on the bot, as
13389        after a manual build all the tests pass on amd64 and ia32.
13390
13391        * wtf/Platform.h:
13392
133932009-08-12  Gabor Loki  <loki@inf.u-szeged.hu>
13394
13395        Reviewed by Gavin Barraclough.
13396
13397        Add optimize call and property access support for ARM JIT.
13398        https://bugs.webkit.org/show_bug.cgi?id=24986
13399
13400        For tightly coupled sequences the BEGIN_UNINTERRUPTED_SEQUENCE and
13401        END_UNINTERRUPTED_SEQUENCE macros have been introduced which ensure
13402        space for instructions and constants of the named sequence. This
13403        method is vital for those architecture which are using constant pool.
13404
13405        The 'latePatch' method - which was linked to JmpSrc - is replaced with
13406        a port specific solution (each calls are marked to place their address
13407        on the constant pool).
13408
13409        * assembler/ARMAssembler.cpp:
13410        (JSC::ARMAssembler::linkBranch):
13411        (JSC::ARMAssembler::executableCopy): Add extra align for constant pool.
13412        * assembler/ARMAssembler.h:
13413        (JSC::ARMAssembler::JmpSrc::JmpSrc):
13414        (JSC::ARMAssembler::sizeOfConstantPool):
13415        (JSC::ARMAssembler::jmp):
13416        (JSC::ARMAssembler::linkCall):
13417        * assembler/ARMv7Assembler.h:
13418        * assembler/AbstractMacroAssembler.h:
13419        * assembler/AssemblerBufferWithConstantPool.h:
13420        (JSC::AssemblerBufferWithConstantPool::flushIfNoSpaceFor): Fix the
13421        computation of the remaining space.
13422        * assembler/MacroAssemblerARM.h:
13423        (JSC::MacroAssemblerARM::branch32):
13424        (JSC::MacroAssemblerARM::nearCall):
13425        (JSC::MacroAssemblerARM::call):
13426        (JSC::MacroAssemblerARM::branchPtrWithPatch):
13427        (JSC::MacroAssemblerARM::ensureSpace):
13428        (JSC::MacroAssemblerARM::sizeOfConstantPool):
13429        (JSC::MacroAssemblerARM::prepareCall):
13430        * assembler/X86Assembler.h:
13431        * jit/JIT.h:
13432        * jit/JITCall.cpp:
13433        (JSC::JIT::compileOpCall):
13434        * jit/JITInlineMethods.h:
13435        (JSC::JIT::beginUninterruptedSequence):
13436        (JSC::JIT::endUninterruptedSequence):
13437        * jit/JITPropertyAccess.cpp:
13438        (JSC::JIT::emit_op_method_check):
13439        (JSC::JIT::compileGetByIdHotPath):
13440        (JSC::JIT::compileGetByIdSlowCase):
13441        (JSC::JIT::emit_op_put_by_id):
13442
134432009-08-12  Gavin Barraclough  <barraclough@apple.com>
13444
13445        Rubber Stamped by Dave Kilzer.
13446
13447        Disable WTF_USE_JSVALUE32_64 on iPhone for now (support not yet added for ARMv7).
13448
13449        * wtf/Platform.h:
13450
134512009-08-12  Gavin Barraclough  <barraclough@apple.com>
13452
13453        Reviewed by Maciej Stachoviak.
13454
13455        Ooops - moved code that had been accidentally added to op_new_func instead of
13456        op_new_func_exp, to where it shoulds be.
13457
13458        * interpreter/Interpreter.cpp:
13459        (JSC::Interpreter::privateExecute):
13460        * wtf/Platform.h:
13461
134622009-08-12  Ada Chan  <adachan@apple.com>
13463
13464        Added workaround for the limitation that VirtualFree with MEM_RELEASE
13465        can only accept the base address returned by VirtualAlloc when the region
13466        was reserved and it can only free the entire region, and not a part of it.
13467
13468        Reviewed by Oliver Hunt.
13469
13470        * runtime/MarkStack.h:
13471        (JSC::MarkStack::MarkStackArray::shrinkAllocation):
13472        * runtime/MarkStackWin.cpp:
13473        (JSC::MarkStack::releaseStack):
13474
134752009-08-12  Balazs Kelemen  <kelemen.balazs.3@stud.u-szeged.hu>
13476
13477        Reviewed by Ariya Hidayat.
13478
13479        Build fix: use std::numeric_limits<long long>::min() instead of LLONG_MIN
13480        since LLONG_MIN is not defined in standard c++.
13481
13482        * runtime/UString.cpp:
13483        (JSC::UString::from):
13484
134852009-08-12  Benjamin Otte  <otte@gnome.org>
13486
13487        Reviewed by Jan Alonzo.
13488
13489        Buildfix for Gtk platforms debug builds.
13490
13491        * GNUmakefile.am: Choose MarkStackPosix.cpp or MarkStackWin.cpp
13492        depending on platform.
13493
134942009-08-12  Simon Hausmann  <simon.hausmann@nokia.com>
13495
13496        Prospective build fix for Mac and 32-bit Windows.
13497
13498        * runtime/UString.cpp: Include wtf/StringExtras.h for snprintf.
13499        (JSC::UString::from): Use %lld instead of %I64d for snprintf
13500        on non-windows platforms.
13501
135022009-08-12  Prasanth Ullattil  <prasanth.ullattil@nokia.com>
13503
13504        Reviewed by Simon Hausmann.
13505
13506        Fix compile error on 64Bit Windows, when UString::from
13507        is called with an intptr_t.
13508
13509        Added new UString::From overload with long long parameter.
13510
13511        Thanks to Holger for the long long idea.
13512
13513        * runtime/UString.cpp:
13514        (JSC::UString::from):
13515        * runtime/UString.h:
13516
135172009-08-11  Oliver Hunt  <oliver@apple.com>
13518
13519        Reviewed by Mark Rowe.
13520
13521        Minor style fixes.
13522
13523        * runtime/UString.h:
13524        (JSC::UString::Rep::createEmptyBuffer):
13525        * wtf/FastMalloc.h:
13526        (WTF::TryMallocReturnValue::getValue):
13527
135282009-08-11  Oliver Hunt  <oliver@apple.com>
13529
13530        Reviewed by Gavin Barraclough.
13531
13532        Make it harder to misuse try* allocation routines
13533        https://bugs.webkit.org/show_bug.cgi?id=27469
13534
13535        Jump through a few hoops to make it much harder to accidentally
13536        miss null-checking of values returned by the try-* allocation
13537        routines.
13538
13539        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
13540        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
13541        * JavaScriptCore.xcodeproj/project.pbxproj:
13542        * runtime/JSArray.cpp:
13543        (JSC::JSArray::putSlowCase):
13544        (JSC::JSArray::increaseVectorLength):
13545        * runtime/StringPrototype.cpp:
13546        (JSC::stringProtoFuncFontsize):
13547        (JSC::stringProtoFuncLink):
13548        * runtime/UString.cpp:
13549        (JSC::allocChars):
13550        (JSC::reallocChars):
13551        (JSC::expandCapacity):
13552        (JSC::UString::Rep::reserveCapacity):
13553        (JSC::UString::expandPreCapacity):
13554        (JSC::createRep):
13555        (JSC::concatenate):
13556        (JSC::UString::spliceSubstringsWithSeparators):
13557        (JSC::UString::replaceRange):
13558        (JSC::UString::append):
13559        (JSC::UString::operator=):
13560        * runtime/UString.h:
13561        (JSC::UString::Rep::createEmptyBuffer):
13562        * wtf/FastMalloc.cpp:
13563        (WTF::tryFastZeroedMalloc):
13564        (WTF::tryFastMalloc):
13565        (WTF::tryFastCalloc):
13566        (WTF::tryFastRealloc):
13567        (WTF::TCMallocStats::tryFastMalloc):
13568        (WTF::TCMallocStats::tryFastCalloc):
13569        (WTF::TCMallocStats::tryFastRealloc):
13570        * wtf/FastMalloc.h:
13571        (WTF::TryMallocReturnValue::TryMallocReturnValue):
13572        (WTF::TryMallocReturnValue::~TryMallocReturnValue):
13573        (WTF::TryMallocReturnValue::operator PossiblyNull<T>):
13574        (WTF::TryMallocReturnValue::getValue):
13575        * wtf/Platform.h:
13576        * wtf/PossiblyNull.h: Added.
13577        (WTF::PossiblyNull::PossiblyNull):
13578        (WTF::PossiblyNull::~PossiblyNull):
13579        (WTF::::getValue):
13580
135812009-08-11  Gavin Barraclough  <barraclough@apple.com>
13582
13583        Reviewed by NOBODY (build fix part deux).
13584
13585        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
13586        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
13587
135882009-08-11  Gavin Barraclough  <barraclough@apple.com>
13589
13590        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
13591        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
13592
135932009-08-11  Gavin Barraclough  <barraclough@apple.com>
13594
13595        Reviewed by Oliver Hunt.
13596
13597        Restrict use of FuncDeclNode & FuncExprNode to the parser.
13598        https://bugs.webkit.org/show_bug.cgi?id=28209
13599
13600        These objects were also being referenced from the CodeBlock.  By changing this
13601        to just retain pointers to FunctionBodyNodes these classes can be restricted to
13602        use during parsing.
13603
13604        No performance impact (or sub-percent progression).
13605
13606        * JavaScriptCore.exp:
13607            Update symbols.
13608
13609        * bytecode/CodeBlock.cpp:
13610        (JSC::CodeBlock::mark):
13611        (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
13612        (JSC::CodeBlock::shrinkToFit):
13613        * bytecode/CodeBlock.h:
13614        (JSC::CodeBlock::addFunction):
13615        (JSC::CodeBlock::function):
13616            Unify m_functions & m_functionExpressions into a single Vector<RefPtr<FuncExprNode> >.
13617
13618        * bytecompiler/BytecodeGenerator.cpp:
13619        (JSC::BytecodeGenerator::BytecodeGenerator):
13620        (JSC::BytecodeGenerator::addConstant):
13621        (JSC::BytecodeGenerator::emitNewFunction):
13622        (JSC::BytecodeGenerator::emitNewFunctionExpression):
13623        * bytecompiler/BytecodeGenerator.h:
13624            FunctionStacks now contain FunctionBodyNodes not FuncDeclNodes.
13625
13626        * interpreter/Interpreter.cpp:
13627        (JSC::Interpreter::execute):
13628        (JSC::Interpreter::privateExecute):
13629            Update to reflect chnages in CodeBlock.
13630
13631        * jit/JITOpcodes.cpp:
13632        (JSC::JIT::emit_op_new_func_exp):
13633        * jit/JITStubs.cpp:
13634        (JSC::DEFINE_STUB_FUNCTION):
13635        * jit/JITStubs.h:
13636        (JSC::):
13637            Update to reflect chnages in CodeBlock.
13638
13639        * parser/Grammar.y:
13640            FunctionStacks now contain FunctionBodyNodes not FuncDeclNodes.
13641
13642        * parser/NodeConstructors.h:
13643        (JSC::FuncExprNode::FuncExprNode):
13644        (JSC::FuncDeclNode::FuncDeclNode):
13645        * parser/Nodes.cpp:
13646        (JSC::ScopeNodeData::mark):
13647        (JSC::FunctionBodyNode::finishParsing):
13648        * parser/Nodes.h:
13649        (JSC::FunctionBodyNode::ident):
13650            Move m_ident & make methods from FuncDeclNode & FuncExprNode to FunctionBodyNode.
13651
13652        * runtime/JSFunction.h:
13653        (JSC::FunctionBodyNode::make):
13654            Make this method inline (was FuncDeclNode::makeFunction).
13655
136562009-08-11  Oliver Hunt  <oliver@apple.com>
13657
13658        Reviewed by Gavin Barraclough.
13659
13660        Native JSON.stringify does not omit functions
13661        https://bugs.webkit.org/show_bug.cgi?id=28117
13662
13663        Objects that are callable should be treated as undefined when
13664        serialising to JSON.
13665
13666        * runtime/JSONObject.cpp:
13667        (JSC::Stringifier::appendStringifiedValue):
13668
136692009-08-11  Oliver Hunt  <oliver@apple.com>
13670
13671        Reviewed by Geoff Garen.
13672
13673        REGRESSION: Hang/crash in BytecodeGenerator::constRegisterFor loading simple page
13674        https://bugs.webkit.org/show_bug.cgi?id=28169
13675
13676        Handle the case where someone has attempted to shadow a property
13677        on the global object with a constant.
13678
13679        * bytecompiler/BytecodeGenerator.cpp:
13680        (JSC::BytecodeGenerator::constRegisterFor):
13681        * parser/Nodes.cpp:
13682        (JSC::ConstDeclNode::emitCodeSingle):
13683
136842009-08-11  John Gregg  <johnnyg@google.com>
13685
13686        Reviewed by Maciej Stachowiak.
13687
13688        Desktop Notifications API
13689        https://bugs.webkit.org/show_bug.cgi?id=25463
13690
13691        Adds ENABLE_NOTIFICATION flag.
13692
13693        * Configurations/FeatureDefines.xcconfig:
13694        * wtf/Platform.h:
13695
136962009-08-11  Maxime Simon  <simon.maxime@gmail.com>
13697
13698        Reviewed by Eric Seidel.
13699
13700        Modifications on JavaScriptCore to allow Haiku port.
13701        https://bugs.webkit.org/show_bug.cgi?id=28121
13702
13703        * runtime/Collector.cpp: Haiku doesn't have sys/mman.h, using OS.h instead.
13704        (JSC::currentThreadStackBase): Haiku uses its own threading system.
13705        * wtf/Platform.h: Defining all Haiku platform values.
13706        * wtf/haiku/MainThreadHaiku.cpp: Adding a missing header (NotImplemented.h).
13707
137082009-08-11  Jessie Berlin  <jberlin@apple.com>
13709
13710        Reviewed by Adam Roben.
13711
13712        Fix windows build.
13713
13714        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
13715
137162009-08-11  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
13717
13718        Reviewed by Tor Arne Vestbø.
13719
13720        Buildfix for Qt-win platforms.
13721
13722        * JavaScriptCore.pri: Choose MarkStackPosix.cpp or MarkStackWin.cpp depend on platform.
13723
137242009-08-10  Oliver Hunt  <oliver@apple.com>
13725
13726        Reviewed by NOBODY (And another build fix).
13727
13728        Add new exports for MSVC
13729
13730        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
13731        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
13732        * JavaScriptCore.xcodeproj/project.pbxproj:
13733
137342009-08-10  Oliver Hunt  <oliver@apple.com>
13735
13736        Reviewed by NOBODY (yet another build fix).
13737
13738        Remove obsolete entries from MSVC exports file
13739
13740        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
13741        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
13742
137432009-08-10  Oliver Hunt  <oliver@apple.com>
13744
13745        Add includes needed for non-allinonefile builds
13746
13747        * runtime/GetterSetter.h:
13748        * runtime/ScopeChain.h:
13749
137502009-08-10  Oliver Hunt  <oliver@apple.com>
13751
13752        Fix export file for last build fix
13753
13754        * JavaScriptCore.exp:
13755
137562009-08-10  Oliver Hunt  <oliver@apple.com>
13757
13758        Hoist page size initialization into platform specific code.
13759
13760        * jit/ExecutableAllocatorPosix.cpp:
13761        * jit/ExecutableAllocatorWin.cpp:
13762        * runtime/MarkStack.h:
13763        (JSC::MarkStack::pageSize):
13764        * runtime/MarkStackPosix.cpp:
13765        (JSC::MarkStack::initializePagesize):
13766        * runtime/MarkStackWin.cpp:
13767        (JSC::MarkStack::initializePagesize):
13768
137692009-08-07  Oliver Hunt  <oliver@apple.com>
13770
13771        Reviewed by Gavin Barraclough.
13772
13773        Stack overflow crash in JavaScript garbage collector mark pass
13774        https://bugs.webkit.org/show_bug.cgi?id=12216
13775
13776        Make the GC mark phase iterative by using an explicit mark stack.
13777        To do this marking any single object is performed in multiple stages
13778          * The object is appended to the MarkStack, this sets the marked
13779            bit for the object using the new markDirect() function, and then
13780            returns
13781          * When the MarkStack is drain()ed the object is popped off the stack
13782            and markChildren(MarkStack&) is called on the object to collect
13783            all of its children.  drain() then repeats until the stack is empty.
13784
13785        Additionally I renamed a number of methods from 'mark' to 'markAggregate'
13786        in order to make it more clear that marking of those object was not
13787        going to result in an actual recursive mark.
13788
13789        * GNUmakefile.am
13790        * JavaScriptCore.exp:
13791        * JavaScriptCore.gypi:
13792        * JavaScriptCore.pri:
13793        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
13794        * JavaScriptCore.xcodeproj/project.pbxproj:
13795        * bytecode/CodeBlock.cpp:
13796        (JSC::CodeBlock::markAggregate):
13797        * bytecode/CodeBlock.h:
13798        * bytecode/EvalCodeCache.h:
13799        (JSC::EvalCodeCache::markAggregate):
13800        * debugger/DebuggerActivation.cpp:
13801        (JSC::DebuggerActivation::markChildren):
13802        * debugger/DebuggerActivation.h:
13803        * interpreter/Register.h:
13804        * interpreter/RegisterFile.h:
13805        (JSC::RegisterFile::markGlobals):
13806        (JSC::RegisterFile::markCallFrames):
13807        * parser/Nodes.cpp:
13808        (JSC::ScopeNodeData::markAggregate):
13809        (JSC::EvalNode::markAggregate):
13810        (JSC::FunctionBodyNode::markAggregate):
13811        * parser/Nodes.h:
13812        (JSC::ScopeNode::markAggregate):
13813        * runtime/ArgList.cpp:
13814        (JSC::MarkedArgumentBuffer::markLists):
13815        * runtime/ArgList.h:
13816        * runtime/Arguments.cpp:
13817        (JSC::Arguments::markChildren):
13818        * runtime/Arguments.h:
13819        * runtime/Collector.cpp:
13820        (JSC::Heap::markConservatively):
13821        (JSC::Heap::markCurrentThreadConservativelyInternal):
13822        (JSC::Heap::markCurrentThreadConservatively):
13823        (JSC::Heap::markOtherThreadConservatively):
13824        (JSC::Heap::markStackObjectsConservatively):
13825        (JSC::Heap::markProtectedObjects):
13826        (JSC::Heap::collect):
13827        * runtime/Collector.h:
13828        * runtime/GetterSetter.cpp:
13829        (JSC::GetterSetter::markChildren):
13830        * runtime/GetterSetter.h:
13831        (JSC::GetterSetter::GetterSetter):
13832        (JSC::GetterSetter::createStructure):
13833        * runtime/GlobalEvalFunction.cpp:
13834        (JSC::GlobalEvalFunction::markChildren):
13835        * runtime/GlobalEvalFunction.h:
13836        * runtime/JSActivation.cpp:
13837        (JSC::JSActivation::markChildren):
13838        * runtime/JSActivation.h:
13839        * runtime/JSArray.cpp:
13840        (JSC::JSArray::markChildren):
13841        * runtime/JSArray.h:
13842        * runtime/JSCell.h:
13843        (JSC::JSCell::markCellDirect):
13844        (JSC::JSCell::markChildren):
13845        (JSC::JSValue::markDirect):
13846        (JSC::JSValue::markChildren):
13847        (JSC::JSValue::hasChildren):
13848        (JSC::MarkStack::append):
13849        (JSC::MarkStack::drain):
13850        * runtime/JSFunction.cpp:
13851        (JSC::JSFunction::markChildren):
13852        * runtime/JSFunction.h:
13853        * runtime/JSGlobalData.cpp:
13854        (JSC::JSGlobalData::JSGlobalData):
13855        * runtime/JSGlobalData.h:
13856        * runtime/JSGlobalObject.cpp:
13857        (JSC::markIfNeeded):
13858        (JSC::JSGlobalObject::markChildren):
13859        * runtime/JSGlobalObject.h:
13860        * runtime/JSNotAnObject.cpp:
13861        (JSC::JSNotAnObject::markChildren):
13862        * runtime/JSNotAnObject.h:
13863        * runtime/JSONObject.cpp:
13864        (JSC::Stringifier::markAggregate):
13865        (JSC::JSONObject::markStringifiers):
13866        * runtime/JSONObject.h:
13867        * runtime/JSObject.cpp:
13868        (JSC::JSObject::markChildren):
13869        (JSC::JSObject::defineGetter):
13870        (JSC::JSObject::defineSetter):
13871        * runtime/JSObject.h:
13872        * runtime/JSPropertyNameIterator.cpp:
13873        (JSC::JSPropertyNameIterator::markChildren):
13874        * runtime/JSPropertyNameIterator.h:
13875        (JSC::JSPropertyNameIterator::createStructure):
13876        (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
13877        (JSC::JSPropertyNameIterator::create):
13878        * runtime/JSStaticScopeObject.cpp:
13879        (JSC::JSStaticScopeObject::markChildren):
13880        * runtime/JSStaticScopeObject.h:
13881        * runtime/JSType.h:
13882        (JSC::):
13883        * runtime/JSValue.h:
13884        * runtime/JSWrapperObject.cpp:
13885        (JSC::JSWrapperObject::markChildren):
13886        * runtime/JSWrapperObject.h:
13887        * runtime/MarkStack.cpp: Added.
13888        (JSC::MarkStack::compact):
13889        * runtime/MarkStack.h: Added.
13890        (JSC::):
13891        (JSC::MarkStack::MarkStack):
13892        (JSC::MarkStack::append):
13893        (JSC::MarkStack::appendValues):
13894        (JSC::MarkStack::~MarkStack):
13895        (JSC::MarkStack::MarkSet::MarkSet):
13896        (JSC::MarkStack::pageSize):
13897
13898        MarkStackArray is a non-shrinking, mmap-based vector type
13899        used for storing objects to be marked.
13900        (JSC::MarkStack::MarkStackArray::MarkStackArray):
13901        (JSC::MarkStack::MarkStackArray::~MarkStackArray):
13902        (JSC::MarkStack::MarkStackArray::expand):
13903        (JSC::MarkStack::MarkStackArray::append):
13904        (JSC::MarkStack::MarkStackArray::removeLast):
13905        (JSC::MarkStack::MarkStackArray::isEmpty):
13906        (JSC::MarkStack::MarkStackArray::size):
13907        (JSC::MarkStack::MarkStackArray::shrinkAllocation):
13908        * runtime/MarkStackPosix.cpp: Added.
13909        (JSC::MarkStack::allocateStack):
13910        (JSC::MarkStack::releaseStack):
13911        * runtime/MarkStackWin.cpp: Added.
13912        (JSC::MarkStack::allocateStack):
13913        (JSC::MarkStack::releaseStack):
13914
13915        * runtime/ScopeChain.h:
13916        * runtime/ScopeChainMark.h:
13917        (JSC::ScopeChain::markAggregate):
13918        * runtime/SmallStrings.cpp:
13919        (JSC::SmallStrings::mark):
13920        * runtime/Structure.h:
13921        (JSC::Structure::markAggregate):
13922
139232009-08-10  Mark Rowe  <mrowe@apple.com>
13924
13925        Reviewed by Darin Adler.
13926
13927        Fix hundreds of "pointer being freed was not allocated" errors seen on the build bot.
13928
13929        * wtf/FastMalloc.h: Implement nothrow variants of the delete and delete[] operators since
13930        we implement the nothrow variants of new and new[].  The nothrow variant of delete is called
13931        explicitly in the implementation of std::sort which was resulting in FastMalloc-allocated
13932        memory being passed to the system allocator to free.
13933
139342009-08-10  Jan Michael Alonzo  <jmalonzo@webkit.org>
13935
13936        [Gtk] Unreviewed build fix. Move JSAPIValueWrapper.cpp/.h in the debug
13937        section. This file is already part of AllInOneFile in Release builds.
13938
13939        * GNUmakefile.am:
13940
139412009-08-10  Darin Adler  <darin@apple.com>
13942
13943        * wtf/FastMalloc.h: Fix build.
13944
139452009-08-10  Darin Adler  <darin@apple.com>
13946
13947        Reviewed by Mark Rowe.
13948
13949        FastMalloc.h has cross-platform code but marked as WinCE-only
13950        https://bugs.webkit.org/show_bug.cgi?id=28160
13951
13952        1) The support for nothrow was inside #if PLATFORM(WINCE) even though it is
13953           not platform-specific.
13954        2) The code tried to override operator delete nothrow, which does not exist.
13955        3) The code in the header checks the value of USE_SYSTEM_MALLOC, but the code
13956           in FastMalloc.cpp checks only if the macro is defined.
13957
13958        * wtf/FastMalloc.h: See above.
13959        * wtf/FastMalloc.cpp: Ditto.
13960
139612009-08-10  Sam Weinig  <sam@webkit.org>
13962
13963        Reviewed by Anders Carlsson.
13964
13965        Fix an annoying indentation issue.
13966
13967        * runtime/DateConstructor.cpp:
13968        (JSC::constructDate):
13969
139702009-08-10  Xan Lopez  <xlopez@igalia.com>
13971
13972        Unreviewed build fix.
13973
13974        Add new files to makefile.
13975
13976        * GNUmakefile.am:
13977
139782009-08-10  Simon Hausmann  <simon.hausmann@nokia.com>
13979
13980        Fix compilation with the interpreter instead of the JIT by including
13981        PrototypeFunction.h as forward-declared through NativeFunctionWrapper.h.
13982
13983        * runtime/ObjectConstructor.cpp:
13984
139852009-08-09  Oliver Hunt  <oliver@apple.com>
13986
13987        Reviewed by George Staikos.
13988
13989        JSON.stringify replacer returning undefined does not omit object properties
13990        https://bugs.webkit.org/show_bug.cgi?id=28118
13991
13992        Correct behaviour of stringify when using a replacer function that returns
13993        undefined.  This is a simple change to move the undefined value check to
13994        after the replacer function is called.  This means that the replacer function
13995        is now called for properties with the value undefined, however i've confirmed
13996        that this behaviour is correct.
13997
13998        In addition I've made the cyclic object exception have a more useful error
13999        message.
14000
14001        * runtime/JSONObject.cpp:
14002        (JSC::Stringifier::appendStringifiedValue):
14003
140042009-08-08  Oliver Hunt  <oliver@apple.com>
14005
14006        Reviewed by Eric Seidel and Sam Weinig.
14007
14008        [ES5] Implement Object.getPrototypeOf
14009        https://bugs.webkit.org/show_bug.cgi?id=28114
14010
14011        Implement getPrototypeOf
14012
14013        * runtime/CommonIdentifiers.h:
14014        * runtime/JSGlobalObject.cpp:
14015        (JSC::JSGlobalObject::reset):
14016        * runtime/ObjectConstructor.cpp:
14017        (JSC::ObjectConstructor::ObjectConstructor):
14018        (JSC::objectConsGetPrototypeOf):
14019        * runtime/ObjectConstructor.h:
14020
140212009-08-07  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
14022
14023        Reviewed by Eric Seidel.
14024
14025        Allow custom memory allocation control for Noncopyable class
14026        https://bugs.webkit.org/show_bug.cgi?id=27879
14027
14028        Several classes which are inherited from Noncopyable are instantiated by
14029        operator new, so Noncopyable class has been inherited from FastAllocBase.
14030
14031        * wtf/Noncopyable.h:
14032
140332009-08-07  George Staikos <george.staikos@torchmobile.com>
14034
14035        Reviewed by Eric Seidel.
14036
14037        https://bugs.webkit.org/show_bug.cgi?id=27305
14038        Implement WinCE-specific unicode layer.
14039        Written by George Staikos <george.staikos@torchmobile.com>
14040        with bug fixes by Yong Li <yong.li@torchmobile.com>
14041        refactored by Joe Mason <joe.mason@torchmobile.com>
14042
14043        * wtf/Platform.h:
14044        * wtf/unicode/Unicode.h:
14045        * wtf/unicode/wince/UnicodeWince.cpp: Added.
14046        (WTF::Unicode::toLower):
14047        (WTF::Unicode::toUpper):
14048        (WTF::Unicode::foldCase):
14049        (WTF::Unicode::isPrintableChar):
14050        (WTF::Unicode::isSpace):
14051        (WTF::Unicode::isLetter):
14052        (WTF::Unicode::isUpper):
14053        (WTF::Unicode::isLower):
14054        (WTF::Unicode::isDigit):
14055        (WTF::Unicode::isPunct):
14056        (WTF::Unicode::toTitleCase):
14057        (WTF::Unicode::direction):
14058        (WTF::Unicode::category):
14059        (WTF::Unicode::decompositionType):
14060        (WTF::Unicode::combiningClass):
14061        (WTF::Unicode::mirroredChar):
14062        (WTF::Unicode::digitValue):
14063        * wtf/unicode/wince/UnicodeWince.h: Added.
14064        (WTF::Unicode::):
14065        (WTF::Unicode::isSeparatorSpace):
14066        (WTF::Unicode::isHighSurrogate):
14067        (WTF::Unicode::isLowSurrogate):
14068        (WTF::Unicode::isArabicChar):
14069        (WTF::Unicode::hasLineBreakingPropertyComplexContext):
14070        (WTF::Unicode::umemcasecmp):
14071        (WTF::Unicode::surrogateToUcs4):
14072
140732009-08-07  Yongjun Zhang  <yongjun.zhang@nokia.com>
14074
14075        Reviewed by Eric Seidel.
14076
14077        https://bugs.webkit.org/show_bug.cgi?id=28069
14078
14079        Add inline to help winscw compiler resolve specialized argument in
14080        templated functions.
14081
14082        * runtime/LiteralParser.cpp:
14083        (JSC::LiteralParser::Lexer::lexString):
14084
140852009-08-07  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
14086
14087        Reviewed by Eric Seidel.
14088
14089        Allow custom memory allocation control for RegExpObjectData struct
14090        http://bugs.webkit.org/show_bug.cgi?id=26750
14091
14092        Inherits RegExpObjectData struct from FastAllocBase because
14093        it has been instantiated by 'new' in JavaScriptCore/runtime/RegExpObject.cpp:62
14094
14095        * runtime/RegExpObject.h:
14096
140972009-08-06  Norbert Leser  <norbert.leser@nokia.com>
14098
14099        Reviewed by Darin Adler.
14100
14101        Updated patch for bug #27059:
14102        Symbian platform always uses little endian encoding,
14103        regardless of compiler.
14104        We need to make sure that we correctly detect EABI architecture
14105        for armv5 targets on Symbian,
14106        where __EABI__ is set but not __ARM_EABI__
14107
14108        * wtf/Platform.h:
14109
141102009-08-06  Adam Barth  <abarth@webkit.org>
14111
14112        Unreviewed revert.
14113
14114        http://bugs.webkit.org/show_bug.cgi?id=27879
14115
14116        Revert 46877 because it broke GTK.
14117
14118        * wtf/Noncopyable.h:
14119
141202009-08-06  Gavin Barraclough  <barraclough@apple.com>
14121
14122        Reviewed by Oliver Hunt.
14123
14124        Make get_by_id/put_by_id/method_check/call defer optimization using a data flag rather than a code modification.
14125        ( https://bugs.webkit.org/show_bug.cgi?id=27635 )
14126
14127        This improves performance of ENABLE(ASSEMBLER_WX_EXCLUSIVE) builds by 2-2.5%, reducing the overhead to about 2.5%.
14128        (No performance impact with ASSEMBLER_WX_EXCLUSIVE disabled).
14129
14130        * bytecode/CodeBlock.cpp:
14131        (JSC::printStructureStubInfo):
14132            - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
14133
14134        * bytecode/CodeBlock.h:
14135        (JSC::):
14136        (JSC::CallLinkInfo::seenOnce):
14137        (JSC::CallLinkInfo::setSeen):
14138        (JSC::MethodCallLinkInfo::seenOnce):
14139        (JSC::MethodCallLinkInfo::setSeen):
14140            - Change a pointer in CallLinkInfo/MethodCallLinkInfo to use a PtrAndFlags, use a flag to track when an op has been executed once.
14141
14142        * bytecode/StructureStubInfo.cpp:
14143        (JSC::StructureStubInfo::deref):
14144            - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
14145
14146        * bytecode/StructureStubInfo.h:
14147        (JSC::StructureStubInfo::StructureStubInfo):
14148        (JSC::StructureStubInfo::initGetByIdSelf):
14149        (JSC::StructureStubInfo::initGetByIdProto):
14150        (JSC::StructureStubInfo::initGetByIdChain):
14151        (JSC::StructureStubInfo::initGetByIdSelfList):
14152        (JSC::StructureStubInfo::initGetByIdProtoList):
14153        (JSC::StructureStubInfo::initPutByIdTransition):
14154        (JSC::StructureStubInfo::initPutByIdReplace):
14155        (JSC::StructureStubInfo::seenOnce):
14156        (JSC::StructureStubInfo::setSeen):
14157            - Make StructureStubInfo store the type as an integer, rather than an OpcodeID, add a flag to track when an op has been executed once.
14158
14159        * bytecompiler/BytecodeGenerator.cpp:
14160        (JSC::BytecodeGenerator::emitGetById):
14161        (JSC::BytecodeGenerator::emitPutById):
14162            - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
14163
14164        * jit/JIT.cpp:
14165        (JSC::JIT::privateCompileCTIMachineTrampolines):
14166        (JSC::JIT::unlinkCall):
14167            - Remove the "don't lazy link" stage of calls.
14168
14169        * jit/JIT.h:
14170        (JSC::JIT::compileCTIMachineTrampolines):
14171            - Remove the "don't lazy link" stage of calls.
14172
14173        * jit/JITCall.cpp:
14174        (JSC::JIT::compileOpCallSlowCase):
14175            - Remove the "don't lazy link" stage of calls.
14176
14177        * jit/JITStubs.cpp:
14178        (JSC::JITThunks::JITThunks):
14179        (JSC::JITThunks::tryCachePutByID):
14180        (JSC::JITThunks::tryCacheGetByID):
14181        (JSC::JITStubs::DEFINE_STUB_FUNCTION):
14182        (JSC::JITStubs::getPolymorphicAccessStructureListSlot):
14183            - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check.
14184
14185        * jit/JITStubs.h:
14186        (JSC::JITThunks::ctiStringLengthTrampoline):
14187        (JSC::JITStubs::):
14188            - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check.
14189
14190        * wtf/PtrAndFlags.h:
14191        (WTF::PtrAndFlags::PtrAndFlags):
14192        (WTF::PtrAndFlags::operator!):
14193        (WTF::PtrAndFlags::operator->):
14194            - Add ! and -> operators, add constuctor with pointer argument.
14195
141962009-08-06  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
14197
14198        Reviewed by Adam Barth.
14199
14200        Allow custom memory allocation control for Noncopyable class
14201        https://bugs.webkit.org/show_bug.cgi?id=27879
14202
14203        Several classes which inherited from Noncopyable are instantiated by
14204        operator new, so Noncopyable class has been inherited from FastAllocBase.
14205
14206        * wtf/Noncopyable.h:
14207
142082009-08-06  Mark Rowe  <mrowe@apple.com>
14209
14210        Rubber-stamped by Sam Weinig.
14211
14212        Add explicit dependencies for our build verification scripts to ensure that they always run after linking has completed.
14213
14214        * JavaScriptCore.xcodeproj/project.pbxproj:
14215
142162009-08-06  Mark Rowe  <mrowe@apple.com>
14217
14218        Bring a little order to our otherwise out of control lives.
14219
14220        * JavaScriptCore.xcodeproj/project.pbxproj:
14221
142222009-08-06  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
14223
14224        Reviewed by Darin Adler.
14225
14226        Allow custom memory allocation control for JavaScriptCore's PolymorphicAccessStructureList struct
14227        https://bugs.webkit.org/show_bug.cgi?id=27877
14228
14229        Inherits PolymorphicAccessStructureList struct from FastAllocBase because it has been instantiated by
14230        'new' in JavaScriptCore/jit/JITStubs.cpp:1229.
14231
14232        * bytecode/Instruction.h:
14233
142342009-08-05  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
14235
14236        Reviewed by Darin Adler.
14237
14238        Allow custom memory allocation control for JavaScriptCore's ScopeNodeData struct
14239        https://bugs.webkit.org/show_bug.cgi?id=27875
14240
14241        Inherits ScopeNodeData struct from FastAllocBase because it has been instantiated by
14242        'new' in JavaScriptCore/parser/Nodes.cpp:1848.
14243
14244        * parser/Nodes.h:
14245
142462009-08-05  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
14247
14248        Reviewed by Gavin Barraclough.
14249
14250        Add floating point support for generic ARM port.
14251        https://bugs.webkit.org/show_bug.cgi?id=24986
14252
14253        * assembler/ARMAssembler.cpp:
14254        (JSC::ARMAssembler::doubleTransfer):
14255        * assembler/ARMAssembler.h:
14256        (JSC::ARM::):
14257        (JSC::ARMAssembler::):
14258        (JSC::ARMAssembler::faddd_r):
14259        (JSC::ARMAssembler::fsubd_r):
14260        (JSC::ARMAssembler::fmuld_r):
14261        (JSC::ARMAssembler::fcmpd_r):
14262        (JSC::ARMAssembler::fdtr_u):
14263        (JSC::ARMAssembler::fdtr_d):
14264        (JSC::ARMAssembler::fmsr_r):
14265        (JSC::ARMAssembler::fsitod_r):
14266        (JSC::ARMAssembler::fmstat):
14267        * assembler/MacroAssemblerARM.h:
14268        (JSC::MacroAssemblerARM::):
14269        (JSC::MacroAssemblerARM::supportsFloatingPoint):
14270        (JSC::MacroAssemblerARM::loadDouble):
14271        (JSC::MacroAssemblerARM::storeDouble):
14272        (JSC::MacroAssemblerARM::addDouble):
14273        (JSC::MacroAssemblerARM::subDouble):
14274        (JSC::MacroAssemblerARM::mulDouble):
14275        (JSC::MacroAssemblerARM::convertInt32ToDouble):
14276        (JSC::MacroAssemblerARM::branchDouble):
14277        * jit/JIT.h:
14278
142792009-08-05  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
14280
14281        Reviewed by Gavin Barraclough.
14282
14283        Add JIT support for generic ARM port without optimizations.
14284        https://bugs.webkit.org/show_bug.cgi?id=24986
14285
14286        All JIT optimizations are disabled.
14287
14288        Signed off by Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
14289        Signed off by Gabor Loki <loki@inf.u-szeged.hu>
14290
14291        * assembler/ARMAssembler.cpp:
14292        (JSC::ARMAssembler::baseIndexTransfer32):
14293        * assembler/AbstractMacroAssembler.h:
14294        (JSC::AbstractMacroAssembler::Imm32::Imm32):
14295        * assembler/MacroAssemblerARM.h:
14296        (JSC::MacroAssemblerARM::store32):
14297        (JSC::MacroAssemblerARM::move):
14298        (JSC::MacroAssemblerARM::branch32):
14299        (JSC::MacroAssemblerARM::add32):
14300        (JSC::MacroAssemblerARM::sub32):
14301        (JSC::MacroAssemblerARM::load32):
14302        * bytecode/CodeBlock.h:
14303        (JSC::CodeBlock::getBytecodeIndex):
14304        * jit/JIT.h:
14305        * jit/JITInlineMethods.h:
14306        (JSC::JIT::restoreArgumentReference):
14307        * jit/JITOpcodes.cpp:
14308        * jit/JITStubs.cpp:
14309        * jit/JITStubs.h:
14310        (JSC::JITStackFrame::returnAddressSlot):
14311        * wtf/Platform.h:
14312
143132009-08-04  Gavin Barraclough  <barraclough@apple.com>
14314
14315        Rubber Stamped by Oiver Hunt.
14316
14317        Revert r46643 since this breaks the Yarr::Interpreter running the v8 tests.
14318        https://bugs.webkit.org/show_bug.cgi?id=27874
14319
14320        * yarr/RegexInterpreter.cpp:
14321        (JSC::Yarr::Interpreter::allocDisjunctionContext):
14322        (JSC::Yarr::Interpreter::freeDisjunctionContext):
14323        (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
14324        (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
14325
143262009-08-04  Oliver Hunt  <oliver@apple.com>
14327
14328        PPC64 Build fix
14329
14330        * wtf/Platform.h:
14331
143322009-08-04  Benjamin C Meyer  <benjamin.meyer@torchmobile.com>
14333
14334        Reviewed by Adam Treat
14335
14336        Explicitly include limits.h header when using INT_MAX and INT_MIN
14337
14338        * interpreter/Interpreter.cpp
14339
143402009-08-03  Harald Fernengel  <harald.fernengel@nokia.com>
14341
14342        Reviewed by Darin Adler.
14343
14344        Fix compile error for ambigous call to abs()
14345        https://bugs.webkit.org/show_bug.cgi?id=27873
14346
14347        Fix ambiguity in abs(long int) call by calling labs() instead
14348
14349        * wtf/DateMath.cpp: replace call to abs() with labs()
14350
143512009-08-03  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
14352
14353        Reviewed by Eric Seidel.
14354
14355        [Qt] Consolidate common gcc flags to WebKit.pri
14356        https://bugs.webkit.org/show_bug.cgi?id=27934
14357
14358        * JavaScriptCore.pro:
14359
143602009-08-03  Ada Chan  <adachan@apple.com>
14361
14362        Fixed the Tiger build.
14363
14364        * wtf/FastMalloc.cpp:
14365
143662009-08-03  Ada Chan  <adachan@apple.com>
14367
14368        Reviewed by Darin Adler.
14369
14370        Don't use background thread to scavenge memory on Tiger until we figure out why it causes a crash.
14371        https://bugs.webkit.org/show_bug.cgi?id=27900
14372
14373        * wtf/FastMalloc.cpp:
14374
143752009-08-03  Fumitoshi Ukai  <ukai@chromium.org>
14376
14377        Reviewed by Jan Alonzo.
14378
14379        Fix build break on Gtk/x86_64.
14380        https://bugs.webkit.org/show_bug.cgi?id=27936
14381
14382        Use JSVALUE64 for X86_64 LINUX, except Qt.
14383
14384        * wtf/Platform.h:
14385
143862009-08-02  Xan Lopez  <xlopez@igalia.com>
14387
14388        Fix the GTK+ build.
14389
14390        * wtf/Platform.h:
14391
143922009-08-02  Geoffrey Garen  <ggaren@apple.com>
14393
14394        Reviewed by Sam Weinig.
14395
14396        Disabled JSVALUE32_64 on Qt builds, since all layout tests mysteriously
14397        crash with it enabled.
14398
14399        * wtf/Platform.h:
14400
144012009-08-02  Geoffrey Garen  <ggaren@apple.com>
14402
14403        Qt build fix.
14404
14405        Added JSAPIValueWrapper.cpp to the build.
14406
14407        * JavaScriptCore.pri:
14408
144092009-08-02  Geoffrey Garen  <ggaren@apple.com>
14410
14411        Windows build fix.
14412
14413        Exported symbols for JSAPIValueWrapper.
14414
14415        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
14416        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
14417
144182009-08-02  Geoffrey Garen  <ggaren@apple.com>
14419
14420        GTK build fix.
14421
14422        * jit/JITStubs.cpp: #include <stdarg.h>, for a definition of va_start.
14423
144242009-08-02  Geoffrey Garen  <ggaren@apple.com>
14425
14426        Qt build fix.
14427
14428        * runtime/Collector.cpp: #include <limits.h>, for a definition of ULONG_MAX.
14429
144302009-08-02  Geoffrey Garen  <ggaren@apple.com>
14431
14432        Windows build fix: Nixed JSImmediate::prototype, JSImmediate::toObject,
14433        and JSImmediate::toThisObject, and removed their exported symbols.
14434
14435        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
14436        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
14437        * runtime/JSImmediate.cpp:
14438        * runtime/JSImmediate.h:
14439
144402009-08-02  Geoffrey Garen  <ggaren@apple.com>
14441
14442        Reviewed by Mark Rowe.
14443
14444        Enabled JSVALUE32_64 by default on all platforms other than x86_64 (which uses JSVALUE64).
14445
14446        * wtf/Platform.h:
14447
144482009-08-02  Kevin Ollivier  <kevino@theolliviers.com>
14449
14450        Reviewed by Jan Alonzo.
14451
14452        Script for building the JavaScriptCore library for wx.
14453        https://bugs.webkit.org/show_bug.cgi?id=27619
14454
14455        * wscript: Added.
14456
144572009-08-02  Yong Li  <yong.li@torchmobile.com>
14458
14459        Reviewed by George Staikos.
14460
14461        DateMath depends on strftime and localtime, which need to be imported manually on WinCE
14462        https://bugs.webkit.org/show_bug.cgi?id=26558
14463
14464        * wtf/DateMath.cpp:
14465
144662009-08-01  David Kilzer  <ddkilzer@apple.com>
14467
14468        wtf/Threading.h: added include of Platform.h
14469
14470        Reviewed by Mark Rowe.
14471
14472        * wtf/Threading.h: Added #include "Platform.h" since this header
14473        uses PLATFORM() and other macros.
14474
144752009-08-01  Mark Rowe  <mrowe@apple.com>
14476
14477        Rubber-stamped by Oliver Hunt.
14478
14479        Roll out r46668 as it was misinformed.  ScopeChain is only used with placement new.
14480
14481        * runtime/ScopeChain.h:
14482
144832009-08-01  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
14484
14485        Allow custom memory allocation control for JavaScriptCore's HashMap class
14486        http://bugs.webkit.org/show_bug.cgi?id=27871
14487
14488        Inherits HashMap class from FastAllocBase because it has been
14489        instantiated by 'new' in JavaScriptCore/API/JSClassRef.cpp:148.
14490
14491        * wtf/RefPtrHashMap.h:
14492        (WTF::):
14493
144942009-08-01  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
14495
14496        Allow custom memory allocation control for JavaScriptCore's ScopeChain class
14497        https://bugs.webkit.org/show_bug.cgi?id=27834
14498
14499        Inherits ScopeChain class from FastAllocBase because it has been
14500        instantiated by 'new' in JavaScriptCore/runtime/JSFunction.h:109.
14501
14502        * runtime/ScopeChain.h:
14503
145042009-08-01  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
14505
14506        Reviewed by Darin Adler.
14507
14508        Allow custom memory allocation control for JavaScriptCore's RegExpConstructorPrivate struct
14509        https://bugs.webkit.org/show_bug.cgi?id=27833
14510
14511        Inherits RegExpConstructorPrivate class from FastAllocBase because it has been
14512        instantiated by 'new' in JavaScriptCore/runtime/RegExpConstructor.cpp:152.
14513
14514        * runtime/RegExpConstructor.cpp:
14515
145162009-07-31  Yong Li  <yong.li@torchmobile.com>
14517
14518        Reviewed by George Staikos.
14519
14520        Resurrect the old GetTickCount implementation of currentTime, controlled by WTF_USE_QUERY_PERFORMANCE_COUNTER
14521        currentSystemTime taken from older WebKit; currentTime written by Yong Li <yong.li@torchmobile.com>; cleanup by Joe Mason <joe.mason@torchmobile.com>
14522        https://bugs.webkit.org/show_bug.cgi?id=27848
14523
14524        * wtf/CurrentTime.cpp:
14525        (WTF::currentSystemTime): get current time with GetCurrentFT
14526        (WTF::currentTime): track msec elapsed since first currentSystemTime call using GetTickCount
14527        * wtf/Platform.h:
14528
145292009-07-31  Ada Chan  <adachan@apple.com>
14530
14531        Fixes the Windows release-PGO build.
14532
14533        Reviewed by Jon Honeycutt.
14534
14535        * JavaScriptCore.vcproj/WTF/WTF.vcproj: Suppresses the warning about unreachable code that we get by adding "return 0" to WTF::TCMalloc_PageHeap::runScavengerThread().
14536        * wtf/FastMalloc.cpp:
14537        (WTF::TCMalloc_PageHeap::runScavengerThread): Fixes the error about the method not returning a value in the release-PGO build.
14538
145392009-07-31  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
14540
14541        Change malloc to fastMalloc and free to fastFree in Yarr's RegexInterpreter.cpp
14542        https://bugs.webkit.org/show_bug.cgi?id=27874
14543
14544        Use fastMalloc and fastFree instead of malloc and free in RegexInterpreter.cpp's methods.
14545
14546        * yarr/RegexInterpreter.cpp:
14547        (JSC::Yarr::Interpreter::allocDisjunctionContext):
14548        (JSC::Yarr::Interpreter::freeDisjunctionContext):
14549        (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
14550        (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
14551
145522009-07-30  Xan Lopez  <xlopez@igalia.com>
14553
14554        Reviewed by Jan Alonzo.
14555
14556        Fix compiler warning.
14557
14558        GCC does not like C++-style comments in preprocessor directives.
14559
14560        * wtf/Platform.h:
14561
145622009-07-30  John McCall  <rjmccall@apple.com>
14563
14564        Reviewed by Gavin Barraclough.
14565
14566        Optimize the X86_64 trampolines: avoid the need for filler arguments
14567        and move the stub-args area closer to the stack pointer.
14568
14569        * jit/JIT.h: adjust patch offsets because of slight code-size change
14570        * jit/JITCode.h:
14571        (JSC::JITCode::execute): don't pass filler args
14572        * jit/JITStubs.cpp:
14573        (ctiTrampoline): (X86_64): push args onto stack, use args directly
14574        (ctiVMThrowTrampoline): (X86_64): adjust %rsp by correct displacement
14575        (ctiOpThrowNotCaught): (X86_64): adjust %rsp by correct displacement
14576        * jit/JITStubs.h:
14577        (JITStackFrame): (X86_64): move args area earlier
14578        (ctiTrampoline): remove filler args from prototype
14579
145802009-07-30  Gavin Barraclough  <barraclough@apple.com>
14581
14582        Temporarily revert r46618 since this is b0rking on Linux.
14583
145842009-07-23  Gavin Barraclough  <barraclough@apple.com>
14585
14586        Reviewed by Oliver Hunt.
14587
14588        Make get_by_id/put_by_id/method_check/call defer optimization using a data flag rather than a code modification.
14589        ( https://bugs.webkit.org/show_bug.cgi?id=27635 )
14590
14591        This improves performance of ENABLE(ASSEMBLER_WX_EXCLUSIVE) builds by 2-2.5%, reducing the overhead to about 2.5%.
14592        (No performance impact with ASSEMBLER_WX_EXCLUSIVE disabled).
14593
14594        * bytecode/CodeBlock.cpp:
14595        (JSC::printStructureStubInfo):
14596            - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
14597
14598        * bytecode/CodeBlock.h:
14599        (JSC::):
14600        (JSC::CallLinkInfo::seenOnce):
14601        (JSC::CallLinkInfo::setSeen):
14602        (JSC::MethodCallLinkInfo::seenOnce):
14603        (JSC::MethodCallLinkInfo::setSeen):
14604            - Change a pointer in CallLinkInfo/MethodCallLinkInfo to use a PtrAndFlags, use a flag to track when an op has been executed once.
14605
14606        * bytecode/StructureStubInfo.cpp:
14607        (JSC::StructureStubInfo::deref):
14608            - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
14609
14610        * bytecode/StructureStubInfo.h:
14611        (JSC::StructureStubInfo::StructureStubInfo):
14612        (JSC::StructureStubInfo::initGetByIdSelf):
14613        (JSC::StructureStubInfo::initGetByIdProto):
14614        (JSC::StructureStubInfo::initGetByIdChain):
14615        (JSC::StructureStubInfo::initGetByIdSelfList):
14616        (JSC::StructureStubInfo::initGetByIdProtoList):
14617        (JSC::StructureStubInfo::initPutByIdTransition):
14618        (JSC::StructureStubInfo::initPutByIdReplace):
14619        (JSC::StructureStubInfo::seenOnce):
14620        (JSC::StructureStubInfo::setSeen):
14621            - Make StructureStubInfo store the type as an integer, rather than an OpcodeID, add a flag to track when an op has been executed once.
14622
14623        * bytecompiler/BytecodeGenerator.cpp:
14624        (JSC::BytecodeGenerator::emitGetById):
14625        (JSC::BytecodeGenerator::emitPutById):
14626            - Make StructureStubInfo store the type as an integer, rather than an OpcodeID.
14627
14628        * jit/JIT.cpp:
14629        (JSC::JIT::privateCompileCTIMachineTrampolines):
14630        (JSC::JIT::unlinkCall):
14631            - Remove the "don't lazy link" stage of calls.
14632
14633        * jit/JIT.h:
14634        (JSC::JIT::compileCTIMachineTrampolines):
14635            - Remove the "don't lazy link" stage of calls.
14636
14637        * jit/JITCall.cpp:
14638        (JSC::JIT::compileOpCallSlowCase):
14639            - Remove the "don't lazy link" stage of calls.
14640
14641        * jit/JITStubs.cpp:
14642        (JSC::JITThunks::JITThunks):
14643        (JSC::JITThunks::tryCachePutByID):
14644        (JSC::JITThunks::tryCacheGetByID):
14645        (JSC::JITStubs::DEFINE_STUB_FUNCTION):
14646        (JSC::JITStubs::getPolymorphicAccessStructureListSlot):
14647            - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check.
14648
14649        * jit/JITStubs.h:
14650        (JSC::JITThunks::ctiStringLengthTrampoline):
14651        (JSC::JITStubs::):
14652            - Remove the "don't lazy link" stage of calls, and the "_second" stage of get_by_id/put_by_id/method_check.
14653
14654        * wtf/PtrAndFlags.h:
14655        (WTF::PtrAndFlags::PtrAndFlags):
14656        (WTF::PtrAndFlags::operator!):
14657        (WTF::PtrAndFlags::operator->):
14658            - Add ! and -> operators, add constuctor with pointer argument.
14659
146602009-07-30  Geoffrey Garen  <ggaren@apple.com>
14661
14662        Reviewed by Gavin Barraclough.
14663
14664        Fixed failing tests seen on Windows buildbot.
14665
14666        * jit/JITStubs.cpp:
14667        (JSC::DEFINE_STUB_FUNCTION):
14668        * jit/JITStubs.h:
14669        (JSC::): Use "int" instead of "bool" to guarantee a 32-bit result,
14670        regardless of compiler. gcc on mac uses 32-bit values for bool,
14671        but gcc on linux and MSVC on Windows use 8-bit values.
14672
146732009-07-30  Geoffrey Garen  <ggaren@apple.com>
14674
14675        Windows build fix: added missing symbols on Windows.
14676
14677        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
14678        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
14679
146802009-07-30  Geoffrey Garen  <ggaren@apple.com>
14681
14682        Windows build fix: removed stale symbols on Windows.
14683
14684        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
14685        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
14686
14687=== End merge of nitro-extreme branch 2009-07-30 ===
14688
146892009-07-20  Geoffrey Garen  <ggaren@apple.com>
14690
14691        Fixed a post-review typo in r46066 that caused tons of test failures.
14692
14693        SunSpider reports no change.
14694
14695        * runtime/JSArray.cpp:
14696        (JSC::JSArray::JSArray): Initialize the full vector capacity, to avoid
14697        uninitialized members at the end.
14698
146992009-07-20  Geoffrey Garen  <ggaren@apple.com>
14700
14701        Windows WebKit build fix: Added some missing exports.
14702
14703        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
14704        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
14705
147062009-07-17  Geoffrey Garen  <ggaren@apple.com>
14707
14708        Reviewed by Sam Weinig.
14709
14710        Get the branch working on windows.
14711        https://bugs.webkit.org/show_bug.cgi?id=27391
14712
14713        SunSpider says 0.3% faster.
14714
14715        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
14716        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def: Updated
14717        MSVC export lists to fix linker errors.
14718
14719        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Added / removed
14720        new / old project files.
14721
14722        * jit/JIT.cpp:
14723        (JSC::JIT::privateCompileCTIMachineTrampolines): Used #pragma pack to tell
14724        MSVC that these structures represent actual memory layout, and should not be
14725        automatically aligned. Changed the return value load to load a 64bit quantity
14726        into the canonical registers.
14727
14728        * jit/JIT.h: Moved OBJECT_OFFSETOF definition to StdLibExtras.h because
14729        it's needed by more than just the JIT, and it supplements a standard library
14730        macro (offsetof).
14731
14732        * jit/JITCall.cpp:
14733        (JSC::JIT::compileOpCallInitializeCallFrame): Fixed an incorrectly signed
14734        cast to resolve an MSVC warning.
14735
14736        * jit/JITStubs.h: Used #pragma pack to tell MSVC that these structures
14737        represent actual memory layout, and should not be automatically aligned.
14738
14739        * runtime/JSArray.cpp:
14740        (JSC::JSArray::JSArray): Replaced memset_pattern8 with a for loop, since
14741        memset_pattern8 is not portable. (I verified that this version of the loop
14742        gives the best performance / generated code in GCC.)
14743
14744        * runtime/JSObject.h:
14745        (JSC::JSObject::JSObject): Removed accidental usage of FIELD_OFFSET --
14746        OBJECT_OFFSETOF is our new macro name. (FIELD_OFFSET conflicts with a
14747        definition in winnt.h.)
14748
14749        * runtime/JSValue.cpp: Added some headers needed by non-all-in-one builds.
14750
14751        * runtime/JSValue.h:
14752        (JSC::JSValue::): Made the tag signed, to match MSVC's signed enum values.
14753        (GCC doesn't seem to care one way or the other.)
14754
14755        * wtf/MainThread.cpp: Moved the StdLibExtras.h #include -- I did this a
14756        while ago to resolve a conflict with winnt.h. I can't remember if it's truly
14757        still needed, but what the heck.
14758
14759        * wtf/StdLibExtras.h: Moved OBJECT_OFFSETOF definition here.
14760
147612009-07-06  Geoffrey Garen  <ggaren@apple.com>
14762
14763        Reviewed by Sam Weinig (?).
14764
14765        Fixed an assertion seen during the stress test.
14766
14767        Don't assume that, if op1 is constant, op2 is not, and vice versa. Sadly,
14768        not all constants get folded.
14769
14770        * jit/JITArithmetic.cpp:
14771        (JSC::JIT::emit_op_jnless):
14772        (JSC::JIT::emitSlow_op_jnless):
14773        (JSC::JIT::emit_op_jnlesseq):
14774        (JSC::JIT::emitSlow_op_jnlesseq):
14775
147762009-07-06  Geoffrey Garen  <ggaren@apple.com>
14777
14778        Reviewed by Sam Weinig.
14779
14780        Include op_convert_this in result caching.
14781
14782        No change on SunSpider or v8.
14783
14784        * jit/JITOpcodes.cpp:
14785        (JSC::JIT::emit_op_convert_this):
14786
14787        * jit/JITStubs.cpp:
14788        (JSC::DEFINE_STUB_FUNCTION):
14789        * jit/JITStubs.h:
14790        (JSC::): Made the op_convert_this JIT stub return an EncodedJSValue, so
14791        to maintain the result caching contract that { tag, payload } can be
14792        found in { regT1, regT0 }.
14793
147942009-07-06  Geoffrey Garen  <ggaren@apple.com>
14795
14796        Reviewed by Sam Weinig.
14797
14798        Implemented result chaining.
14799
14800        1% faster on SunSpider. 4%-5% faster on v8.
14801
14802        * assembler/MacroAssemblerX86Common.h:
14803        (JSC::MacroAssemblerX86Common::move):
14804        * assembler/X86Assembler.h:
14805        (JSC::X86Assembler::movl_rr): Added an optimization to eliminate
14806        no-op mov instructions, to simplify chaining.
14807
14808        * jit/JIT.cpp:
14809        (JSC::JIT::JIT):
14810        * jit/JIT.h: Added data members and helper functions for recording
14811        chained results. We record both a mapping from virtual to machine register
14812        and the opcode for which the mapping is valid, to help ensure that the
14813        mapping isn't used after the mapped register has been stomped by other
14814        instructions.
14815
14816        * jit/JITCall.cpp:
14817        (JSC::JIT::compileOpCallVarargs):
14818        (JSC::JIT::compileOpCallVarargsSlowCase):
14819        (JSC::JIT::emit_op_ret):
14820        (JSC::JIT::emit_op_construct_verify):
14821        (JSC::JIT::compileOpCall):
14822        (JSC::JIT::compileOpCallSlowCase): Chain function call results.
14823
14824        * jit/JITInlineMethods.h:
14825        (JSC::JIT::emitLoadTag):
14826        (JSC::JIT::emitLoadPayload):
14827        (JSC::JIT::emitLoad):
14828        (JSC::JIT::emitLoad2):
14829        (JSC::JIT::isLabeled):
14830        (JSC::JIT::map):
14831        (JSC::JIT::unmap):
14832        (JSC::JIT::isMapped):
14833        (JSC::JIT::getMappedPayload):
14834        (JSC::JIT::getMappedTag): Use helper functions when loading virtual
14835        registers into machine registers, in case the loads can be eliminated
14836        by chaining.
14837
14838        * jit/JITOpcodes.cpp:
14839        (JSC::JIT::emit_op_mov):
14840        (JSC::JIT::emit_op_end):
14841        (JSC::JIT::emit_op_instanceof):
14842        (JSC::JIT::emit_op_get_global_var):
14843        (JSC::JIT::emit_op_put_global_var):
14844        (JSC::JIT::emit_op_get_scoped_var):
14845        (JSC::JIT::emit_op_put_scoped_var):
14846        (JSC::JIT::emit_op_to_primitive):
14847        (JSC::JIT::emit_op_resolve_global):
14848        (JSC::JIT::emit_op_jneq_ptr):
14849        (JSC::JIT::emit_op_next_pname):
14850        (JSC::JIT::emit_op_to_jsnumber):
14851        (JSC::JIT::emit_op_catch): Chain results from these opcodes.
14852
14853        (JSC::JIT::emit_op_profile_will_call):
14854        (JSC::JIT::emit_op_profile_did_call): Load the profiler into regT2 to
14855        avoid stomping a chained result.
14856
14857        * jit/JITPropertyAccess.cpp:
14858        (JSC::JIT::emit_op_method_check):
14859        (JSC::JIT::emit_op_get_by_val):
14860        (JSC::JIT::emit_op_get_by_id): Chain results from these opcodes.
14861
14862        * jit/JITStubCall.h:
14863        (JSC::JITStubCall::addArgument): Always use { regT1, regT0 }, to facilitate
14864        chaining.
14865
14866        (JSC::JITStubCall::call): Unmap all mapped registers, since our callee
14867        stub might stomp them.
14868
148692009-07-01  Sam Weinig  <sam@webkit.org>
14870
14871        Reviewed by Gavin Barraclough.
14872
14873        Don't reload values in emitBinaryDoubleOp.
14874
14875        SunSpider reports a 0.6% progression.
14876
14877        * jit/JIT.h:
14878        * jit/JITArithmetic.cpp:
14879        (JSC::JIT::emit_op_jnless):
14880        (JSC::JIT::emit_op_jnlesseq):
14881        (JSC::JIT::emitBinaryDoubleOp):
14882
148832009-07-01  Sam Weinig  <sam@webkit.org>
14884
14885        Reviewed by Geoffrey Garen.
14886
14887        Convert op_div to load op1 and op2 up front.
14888
14889        * jit/JITArithmetic.cpp:
14890        (JSC::JIT::emit_op_div):
14891
148922009-07-01  Sam Weinig  <sam@webkit.org>
14893
14894        Reviewed by Geoffrey Garen.
14895
14896        Don't emit code in emitBinaryDoubleOp if code is unreachable, observable
14897        via an empty (unlinked) jumplist passed in.  This only effects op_jnless
14898        and op_jnlesseq at present.
14899
14900        * jit/JITArithmetic.cpp:
14901        (JSC::JIT::emitSlow_op_jnless):
14902        (JSC::JIT::emitSlow_op_jnlesseq):
14903        (JSC::JIT::emitBinaryDoubleOp):
14904
149052009-07-01  Geoffrey Garen  <ggaren@apple.com>
14906
14907        Reviewed by Sam Weinig.
14908
14909        Converted op_mod to put { tag, payload } in { regT1, regT0 }, and
14910        tidied up its constant case.
14911
14912        SunSpider reports a 0.2% regression, but a micro-benchmark of op_mod
14913        shows a 12% speedup, and the SunSpider test that uses op_mod most should
14914        benefit a lot from result caching in the end, since it almost always
14915        performs (expression) % constant.
14916
14917        * jit/JITArithmetic.cpp:
14918        (JSC::JIT::emit_op_mod):
14919        (JSC::JIT::emitSlow_op_mod):
14920
149212009-06-30  Sam Weinig  <sam@webkit.org>
14922
14923        Reviewed by Geoffrey Garen.
14924
14925        Converted some more arithmetic ops to put { tag, payload } in
14926        { regT1, regT0 }.
14927
14928        * jit/JITArithmetic.cpp:
14929        (JSC::JIT::emit_op_mul):
14930        (JSC::JIT::emitSlow_op_mul):
14931
149322009-06-30  Geoffrey Garen  <ggaren@apple.com>
14933
14934        Reviewed by Sam Weinig.
14935
14936        Converted some more arithmetic ops to put { tag, payload } in
14937        { regT1, regT0 }, and added a case for subtract constant.
14938
14939        SunSpider says no change. v8 says 0.3% slower.
14940
14941        * jit/JIT.h:
14942        * jit/JITArithmetic.cpp:
14943        (JSC::JIT::emit_op_add):
14944        (JSC::JIT::emitAdd32Constant):
14945        (JSC::JIT::emitSlow_op_add):
14946        (JSC::JIT::emit_op_sub):
14947        (JSC::JIT::emitSub32Constant):
14948        (JSC::JIT::emitSlow_op_sub):
14949
149502009-06-30  Gavin Barraclough  <barraclough@apple.com>
14951
14952        Reviewed by Sam Weinig.
14953
14954        Remove more uses of addressFor(), load double constants directly from
14955        the constantpool in the CodeBlock, rather than from the register file.
14956
14957        * jit/JITArithmetic.cpp:
14958        (JSC::JIT::emitAdd32Constant):
14959        (JSC::JIT::emitBinaryDoubleOp):
14960
149612009-06-30  Geoffrey Garen  <ggaren@apple.com>
14962
14963        Reviewed by Sam Weinig.
14964
14965        Fixed a bug in postfix ops, where we would treat x = x++ and x = x--
14966        as a no-op, even if x were not an int, and the ++/-- could have side-effects.
14967
14968        * jit/JITArithmetic.cpp:
14969        (JSC::JIT::emit_op_post_inc):
14970        (JSC::JIT::emitSlow_op_post_inc):
14971        (JSC::JIT::emit_op_post_dec):
14972        (JSC::JIT::emitSlow_op_post_dec):
14973
149742009-06-30  Geoffrey Garen  <ggaren@apple.com>
14975
14976        Reviewed by Sam Weinig.
14977
14978        Converted some arithmetic ops to put { tag, payload } in
14979        { regT1, regT0 }.
14980
14981        SunSpider says 0.7% faster. v8 says no change.
14982
14983        * jit/JIT.h:
14984        * jit/JITArithmetic.cpp:
14985        (JSC::JIT::emit_op_jnless):
14986        (JSC::JIT::emit_op_jnlesseq):
14987        (JSC::JIT::emit_op_lshift):
14988        (JSC::JIT::emit_op_rshift):
14989        (JSC::JIT::emit_op_bitand):
14990        (JSC::JIT::emit_op_bitor):
14991        (JSC::JIT::emit_op_bitxor):
14992        * jit/JITInlineMethods.h:
14993        (JSC::JIT::isOperandConstantImmediateInt):
14994        (JSC::JIT::getOperandConstantImmediateInt):
14995
149962009-06-30  Gavin Barraclough  <barraclough@apple.com>
14997
14998        Reviewed by Sam Weinig.
14999
15000        Start removing cases of addressFor().
15001
15002        * jit/JIT.h:
15003        * jit/JITArithmetic.cpp:
15004        (JSC::JIT::emitAdd32Constant):
15005        (JSC::JIT::emitBinaryDoubleOp):
15006        (JSC::JIT::emit_op_div):
15007        * jit/JITInlineMethods.h:
15008        (JSC::JIT::emitLoadDouble):
15009        (JSC::JIT::emitLoadInt32ToDouble):
15010        (JSC::JIT::emitStoreDouble):
15011        * jit/JITOpcodes.cpp:
15012        (JSC::JIT::emit_op_jfalse):
15013        (JSC::JIT::emit_op_jtrue):
15014
150152009-06-30  Geoffrey Garen  <ggaren@apple.com>
15016
15017        Rolled back in my last patch with regression fixed.
15018
15019        * jit/JIT.cpp:
15020        (JSC::JIT::privateCompileSlowCases):
15021        * jit/JIT.h:
15022        * jit/JITOpcodes.cpp:
15023        (JSC::JIT::emit_op_loop_if_less):
15024        (JSC::JIT::emit_op_loop_if_lesseq):
15025        (JSC::JIT::emit_op_resolve_global):
15026        (JSC::JIT::emitSlow_op_resolve_global):
15027        (JSC::JIT::emit_op_eq):
15028        (JSC::JIT::emitSlow_op_eq):
15029        (JSC::JIT::emit_op_neq):
15030        (JSC::JIT::emitSlow_op_neq):
15031
150322009-06-30  Geoffrey Garen  <ggaren@apple.com>
15033
15034        Rolled out my last patch because it was a 2% SunSpider regression.
15035
15036        * jit/JIT.cpp:
15037        (JSC::JIT::privateCompileSlowCases):
15038        * jit/JIT.h:
15039        * jit/JITOpcodes.cpp:
15040        (JSC::JIT::emit_op_loop_if_less):
15041        (JSC::JIT::emit_op_loop_if_lesseq):
15042        (JSC::JIT::emit_op_resolve_global):
15043        (JSC::JIT::emit_op_eq):
15044        (JSC::JIT::emitSlow_op_eq):
15045        (JSC::JIT::emit_op_neq):
15046        (JSC::JIT::emitSlow_op_neq):
15047
150482009-06-30  Geoffrey Garen  <ggaren@apple.com>
15049
15050        Reviewed by Gavin "Sam Weinig" Barraclough.
15051
15052        Standardized the rest of our opcodes to put { tag, payload } in
15053        { regT1, regT0 } where possible.
15054
15055        * jit/JIT.cpp:
15056        (JSC::JIT::privateCompileSlowCases):
15057        * jit/JIT.h:
15058        * jit/JITOpcodes.cpp:
15059        (JSC::JIT::emit_op_loop_if_less):
15060        (JSC::JIT::emit_op_loop_if_lesseq):
15061        (JSC::JIT::emit_op_resolve_global):
15062        (JSC::JIT::emitSlow_op_resolve_global):
15063        (JSC::JIT::emit_op_eq):
15064        (JSC::JIT::emitSlow_op_eq):
15065        (JSC::JIT::emit_op_neq):
15066        (JSC::JIT::emitSlow_op_neq):
15067
150682009-06-30  Gavin Barraclough  <barraclough@apple.com>
15069
15070        Reviewed by Geoffrey Garen.
15071
15072        Replace calls to store32(tagFor()) and store32(payloadFor())
15073        with emitStoreInt32(), emitStoreBool(), and emitStoreCell().
15074
15075        * jit/JIT.h:
15076        * jit/JITArithmetic.cpp:
15077        (JSC::JIT::emit_op_negate):
15078        (JSC::JIT::emit_op_lshift):
15079        (JSC::JIT::emit_op_rshift):
15080        (JSC::JIT::emit_op_bitand):
15081        (JSC::JIT::emitBitAnd32Constant):
15082        (JSC::JIT::emit_op_bitor):
15083        (JSC::JIT::emitBitOr32Constant):
15084        (JSC::JIT::emit_op_bitxor):
15085        (JSC::JIT::emitBitXor32Constant):
15086        (JSC::JIT::emit_op_bitnot):
15087        (JSC::JIT::emit_op_post_inc):
15088        (JSC::JIT::emit_op_post_dec):
15089        (JSC::JIT::emit_op_pre_inc):
15090        (JSC::JIT::emit_op_pre_dec):
15091        (JSC::JIT::emit_op_add):
15092        (JSC::JIT::emitAdd32Constant):
15093        (JSC::JIT::emit_op_sub):
15094        (JSC::JIT::emitSub32ConstantLeft):
15095        (JSC::JIT::emitSub32ConstantRight):
15096        (JSC::JIT::emit_op_mul):
15097        (JSC::JIT::emitSlow_op_mul):
15098        (JSC::JIT::emit_op_div):
15099        (JSC::JIT::emit_op_mod):
15100        * jit/JITCall.cpp:
15101        (JSC::JIT::emit_op_load_varargs):
15102        * jit/JITInlineMethods.h:
15103        (JSC::JIT::emitStoreInt32):
15104        (JSC::JIT::emitStoreCell):
15105        (JSC::JIT::emitStoreBool):
15106        (JSC::JIT::emitStore):
15107        * jit/JITOpcodes.cpp:
15108        (JSC::JIT::emit_op_instanceof):
15109        (JSC::JIT::emit_op_not):
15110        (JSC::JIT::emit_op_eq):
15111        (JSC::JIT::emitSlow_op_eq):
15112        (JSC::JIT::emit_op_neq):
15113        (JSC::JIT::emitSlow_op_neq):
15114        (JSC::JIT::compileOpStrictEq):
15115        (JSC::JIT::emit_op_eq_null):
15116        (JSC::JIT::emit_op_neq_null):
15117        * jit/JITStubCall.h:
15118        (JSC::JITStubCall::call):
15119
151202009-06-30  Geoffrey Garen  <ggaren@apple.com>
15121
15122        Reviewed by Sam Weinig.
15123
15124        Standardized the rest of the property access instructions to put { tag,
15125        payload } in { regT1, regT0 }.
15126
15127        Small v8 speedup, 0.2% SunSpider slowdown.
15128
15129        * jit/JIT.h:
15130        * jit/JITInlineMethods.h:
15131        (JSC::JIT::emitLoad):
15132        (JSC::JIT::emitLoad2):
15133        * jit/JITPropertyAccess.cpp:
15134        (JSC::JIT::emit_op_get_by_val):
15135        (JSC::JIT::emitSlow_op_get_by_val):
15136        (JSC::JIT::emit_op_put_by_val):
15137        (JSC::JIT::emitSlow_op_put_by_val):
15138        (JSC::JIT::emit_op_put_by_id):
15139        (JSC::JIT::emitSlow_op_put_by_id):
15140        (JSC::JIT::patchPutByIdReplace):
15141
151422009-06-29  Sam Weinig  <sam@webkit.org>
15143
15144        Reviewed by Gavin Barraclough.
15145
15146        Various cleanups.
15147        - Use fpRegT* instead of X86::xmm*.
15148        - Use a switch statement in emitBinaryDoubleOp instead of a bunch of
15149          if/elses.
15150
15151        * jit/JITArithmetic.cpp:
15152        (JSC::JIT::emitAdd32Constant):
15153        (JSC::JIT::emitBinaryDoubleOp):
15154        (JSC::JIT::emit_op_div):
15155
151562009-06-29  Sam Weinig  <sam@webkit.org>
15157
15158        Reviewed by Geoffrey Garen.
15159
15160        Add inline code dealing with doubles for op_jfalse and op_jtrue.
15161
15162        * assembler/MacroAssemblerX86Common.h:
15163        (JSC::MacroAssemblerX86Common::):
15164        (JSC::MacroAssemblerX86Common::zeroDouble):
15165        * jit/JITOpcodes.cpp:
15166        (JSC::JIT::emit_op_jfalse):
15167        (JSC::JIT::emit_op_jtrue):
15168
151692009-06-28  Geoffrey Garen  <ggaren@apple.com>
15170
15171        Reviewed by Sam Weinig.
15172
15173        Standardized op_get_by_id to put { tag, payload } in { regT1, regT0 }.
15174
15175        SunSpider and v8 report maybe 0.2%-0.4% regressions, but the optimization
15176        this enables will win much more than that back.
15177
15178        * jit/JIT.cpp:
15179        (JSC::JIT::privateCompileCTIMachineTrampolines):
15180        * jit/JIT.h:
15181        * jit/JITPropertyAccess.cpp:
15182        (JSC::JIT::emit_op_method_check):
15183        (JSC::JIT::emit_op_get_by_id):
15184        (JSC::JIT::compileGetByIdHotPath):
15185        (JSC::JIT::compileGetByIdSlowCase):
15186        (JSC::JIT::patchGetByIdSelf):
15187        (JSC::JIT::privateCompilePatchGetArrayLength):
15188        (JSC::JIT::privateCompileGetByIdProto):
15189        (JSC::JIT::privateCompileGetByIdSelfList):
15190        (JSC::JIT::privateCompileGetByIdProtoList):
15191        (JSC::JIT::privateCompileGetByIdChainList):
15192        (JSC::JIT::privateCompileGetByIdChain):
15193
151942009-06-26  Geoffrey Garen  <ggaren@apple.com>
15195
15196        Reviewed by Maciej Stachowiak.
15197
15198        Standardized op_call to put { tag, payload } in { regT1, regT0 }.
15199
15200        SunSpider and v8 report no change.
15201
15202        * jit/JIT.cpp:
15203        (JSC::JIT::privateCompileCTIMachineTrampolines):
15204        * jit/JITCall.cpp:
15205        (JSC::JIT::compileOpCallInitializeCallFrame):
15206        (JSC::JIT::compileOpCallSetupArgs):
15207        (JSC::JIT::compileOpConstructSetupArgs):
15208        (JSC::JIT::compileOpCallVarargsSetupArgs):
15209        (JSC::JIT::compileOpCallVarargs):
15210        (JSC::JIT::compileOpCall):
15211        (JSC::JIT::compileOpCallSlowCase):
15212
152132009-06-26  Sam Weinig  <sam@webkit.org>
15214
15215        Reviewed by Geoffrey Garen.
15216
15217        Handle multiplying by zero a little better by
15218        inlining the case that both operands are non-negative
15219        into the slowpath.
15220
15221        * assembler/MacroAssemblerX86Common.h:
15222        (JSC::MacroAssemblerX86Common::branchOr32):
15223        * jit/JITArithmetic.cpp:
15224        (JSC::JIT::emit_op_mul):
15225        (JSC::JIT::emitSlow_op_mul):
15226
152272009-06-25  Geoffrey Garen  <ggaren@apple.com>
15228
15229        Reviewed by Sam Weinig.
15230
15231        Optimize x++ to ++x inside for loops.
15232
15233        Sadly, no measurable speedup, but this should help with result chaining.
15234
15235        * parser/Nodes.cpp:
15236        (JSC::ForNode::emitBytecode):
15237
152382009-06-25  Geoffrey Garen  <ggaren@apple.com>
15239
15240        Reviewed by Sam Weinig.
15241
15242        Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }.
15243
15244        * jit/JITArithmetic.cpp:
15245        (JSC::JIT::emitSlow_op_bitnot):
15246        (JSC::JIT::emit_op_post_inc):
15247
152482009-06-25  Geoffrey Garen  <ggaren@apple.com>
15249
15250        Reviewed by Sam Weinig.
15251
15252        Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }.
15253
15254        * jit/JITArithmetic.cpp:
15255        (JSC::JIT::emit_op_bitnot):
15256        (JSC::JIT::emit_op_post_dec):
15257        (JSC::JIT::emit_op_pre_inc):
15258        (JSC::JIT::emitSlow_op_pre_inc):
15259        (JSC::JIT::emit_op_pre_dec):
15260        (JSC::JIT::emitSlow_op_pre_dec):
15261
152622009-06-25  Geoffrey Garen  <ggaren@apple.com>
15263
15264        Reviewed by Sam Weinig.
15265
15266        Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }.
15267
15268        * jit/JITArithmetic.cpp:
15269        (JSC::JIT::emit_op_negate):
15270        (JSC::JIT::emitSlow_op_negate):
15271        * jit/JITCall.cpp:
15272        (JSC::JIT::emit_op_construct_verify):
15273        (JSC::JIT::emitSlow_op_construct_verify):
15274
152752009-06-25  Geoffrey Garen  <ggaren@apple.com>
15276
15277        Reviewed by Sam Weinig.
15278
15279        Standardized some more opcodes to put { tag, payload } in { regT1, regT0 }.
15280
15281        * jit/JITOpcodes.cpp:
15282        (JSC::JIT::emit_op_loop_if_true):
15283        (JSC::JIT::emit_op_jfalse):
15284        (JSC::JIT::emit_op_jtrue):
15285        (JSC::JIT::emit_op_jeq_null):
15286        (JSC::JIT::emit_op_jneq_null):
15287        (JSC::JIT::emit_op_eq_null):
15288        (JSC::JIT::emit_op_neq_null):
15289
152902009-06-25  Geoffrey Garen  <ggaren@apple.com>
15291
15292        Reviewed by Sam Weinig (sort of, maybe).
15293
15294        Fixed some ASSERTs in http/tests/security.
15295
15296        These ASSERTs were introduced by http://trac.webkit.org/changeset/45057,
15297        but the underlying problem was actually older. http://trac.webkit.org/changeset/45057
15298        just exposed the problem by enabling optimization in more cases.
15299
15300        The ASSERTs fired because we tested PropertySlot::slotBase() for validity,
15301        but slotBase() ASSERTs if it's invalid, so we would ASSERT before
15302        the test could happen. Solution: Remove the ASSERT. Maybe it was valid
15303        once, but it clearly goes against a pattern we've deployed of late.
15304
15305        The underlying problem was that WebCore would re-use a PropertySlot in
15306        the case of a forwarding access, and the second use would not completely
15307        overwrite the first use. Solution: Make sure to overwrite m_offset when
15308        setting a value on a PropertySlot. (Other values already get implicitly
15309        overwritten during reuse.)
15310
15311        * runtime/PropertySlot.h:
15312        (JSC::PropertySlot::PropertySlot):
15313        (JSC::PropertySlot::setValueSlot):
15314        (JSC::PropertySlot::setValue):
15315        (JSC::PropertySlot::setRegisterSlot):
15316        (JSC::PropertySlot::setUndefined):
15317        (JSC::PropertySlot::slotBase):
15318        (JSC::PropertySlot::clearOffset):
15319
153202009-06-24  Gavin Barraclough  <barraclough@apple.com>
15321
15322        Reviewed by Geoff Garen.
15323
15324        Enable JIT_OPTIMIZE_METHOD_CALLS on the branch, implementation matches current implemenatation in ToT.
15325
15326        * jit/JIT.h:
15327        * jit/JITPropertyAccess.cpp:
15328        (JSC::JIT::emit_op_method_check):
15329        (JSC::JIT::emitSlow_op_method_check):
15330        (JSC::JIT::emit_op_get_by_id):
15331        (JSC::JIT::compileGetByIdHotPath):
15332        (JSC::JIT::emitSlow_op_get_by_id):
15333        (JSC::JIT::compileGetByIdSlowCase):
15334
153352009-06-23  Geoffrey Garen  <ggaren@apple.com>
15336
15337        Reviewed by Sam Weinig.
15338
15339        Bit off a tiny bit more of standardizing opcode behavior to help with result
15340        caching.
15341
15342        SunSpider reports no change, v8 maybe a tiny speedup.
15343
15344        * jit/JITOpcodes.cpp:
15345        (JSC::JIT::emit_op_to_jsnumber):
15346        (JSC::JIT::emitSlow_op_to_jsnumber):
15347        (JSC::JIT::emit_op_convert_this):
15348        (JSC::JIT::emitSlow_op_convert_this):
15349
153502009-06-23  Geoffrey Garen  <ggaren@apple.com>
15351
15352        Reviewed by Sam Weinig.
15353
15354        Bit off a tiny bit more of standardizing opcode behavior to help with result
15355        caching -- including removing my old enemy, op_resolve_function, because
15356        it was non-standard, and removing it felt better than helping it limp along.
15357
15358        SunSpider reports no change, v8 maybe a tiny speedup.
15359
15360        * bytecode/CodeBlock.cpp:
15361        (JSC::CodeBlock::dump):
15362        * bytecode/Opcode.h:
15363        * bytecompiler/BytecodeGenerator.cpp:
15364        * bytecompiler/BytecodeGenerator.h:
15365        * interpreter/Interpreter.cpp:
15366        (JSC::Interpreter::privateExecute):
15367        * jit/JIT.cpp:
15368        (JSC::JIT::privateCompileMainPass):
15369        * jit/JIT.h:
15370        * jit/JITOpcodes.cpp:
15371        (JSC::JIT::emit_op_get_scoped_var):
15372        (JSC::JIT::emit_op_put_scoped_var):
15373        (JSC::JIT::emit_op_to_primitive):
15374        (JSC::JIT::emitSlow_op_to_primitive):
15375        * jit/JITStubs.cpp:
15376        * jit/JITStubs.h:
15377        * parser/Nodes.cpp:
15378        (JSC::FunctionCallResolveNode::emitBytecode):
15379
153802009-06-23  Geoffrey Garen  <ggaren@apple.com>
15381
15382        Reviewed by Sam Weinig.
15383
15384        Bit off a tiny bit of standardizing opcode behavior to help with result
15385        caching.
15386
15387        0.6% SunSpider speedup. 0.3% v8 speedup.
15388
15389        * jit/JITInlineMethods.h:
15390        (JSC::JIT::emitLoad): Accomodate a base register that overlaps with payload
15391        by loading tag before payload, to avoid stomping base/payload.
15392
15393        * jit/JITOpcodes.cpp:
15394        (JSC::JIT::emit_op_mov): Abide by the standard "tag in regT1, payload in
15395        regT0" semantics.
15396
15397        (JSC::JIT::emit_op_get_global_var):
15398        (JSC::JIT::emit_op_put_global_var): Ditto. Also, removed some irrelevent
15399        loads while I was at it. The global object's "d" pointer never changes
15400        after construction.
15401
154022009-06-23  Gavin Barraclough  <barraclough@apple.com>
15403
15404        Reviewed by Sam Weinig.
15405
15406        Remove 'arguments' field from Register union (again).
15407        This time do so without breaking tests (radical, I know).
15408
15409        * interpreter/CallFrame.h:
15410        (JSC::ExecState::optionalCalleeArguments):
15411        (JSC::ExecState::setArgumentCount):
15412        (JSC::ExecState::init):
15413        * interpreter/Interpreter.cpp:
15414        (JSC::Interpreter::dumpRegisters):
15415        (JSC::Interpreter::unwindCallFrame):
15416        (JSC::Interpreter::privateExecute):
15417        (JSC::Interpreter::retrieveArguments):
15418        * interpreter/Register.h:
15419        (JSC::Register::withInt):
15420        (JSC::Register::):
15421        (JSC::Register::Register):
15422        (JSC::Register::i):
15423        * jit/JITStubs.cpp:
15424        (JSC::JITStubs::cti_op_tear_off_arguments):
15425        * runtime/Arguments.h:
15426        (JSC::JSActivation::copyRegisters):
15427        (JSC::Register::arguments):
15428        * runtime/JSActivation.cpp:
15429        (JSC::JSActivation::argumentsGetter):
15430        * runtime/JSActivation.h:
15431
154322009-06-23  Geoffrey Garen  <ggaren@apple.com>
15433
15434        Reviewed by Sam Weinig.
15435
15436        Removed some result register tracking cruft in preparation for a new
15437        result tracking mechanism.
15438
15439        SunSpider reports no change.
15440
15441        * assembler/AbstractMacroAssembler.h:
15442        * assembler/X86Assembler.h:
15443        (JSC::X86Assembler::JmpDst::JmpDst): No need to track jump targets in
15444        machine code; we already do this in bytecode.
15445
15446        * jit/JIT.cpp:
15447        (JSC::JIT::JIT):
15448        (JSC::JIT::emitTimeoutCheck): Make sure to save and restore the result
15449        registers, so an opcode with a timeout check can still benefit from result
15450        register caching.
15451
15452        (JSC::JIT::privateCompileMainPass):
15453        (JSC::JIT::privateCompileSlowCases): Removed calls to killLastResultRegister()
15454        in preparation for something new.
15455
15456        * jit/JIT.h:
15457        * jit/JITArithmetic.cpp:
15458        (JSC::JIT::emit_op_jnless):
15459        (JSC::JIT::emit_op_jnlesseq):
15460        * jit/JITInlineMethods.h:
15461        (JSC::JIT::emitGetFromCallFrameHeaderPtr):
15462        (JSC::JIT::emitGetFromCallFrameHeader32):
15463        * jit/JITOpcodes.cpp:
15464        (JSC::JIT::emit_op_jmp):
15465        (JSC::JIT::emit_op_jfalse):
15466        (JSC::JIT::emit_op_jtrue):
15467        (JSC::JIT::emit_op_jeq_null):
15468        (JSC::JIT::emit_op_jneq_null):
15469        (JSC::JIT::emit_op_jneq_ptr):
15470        (JSC::JIT::emit_op_jsr):
15471        (JSC::JIT::emit_op_sret):
15472        (JSC::JIT::emit_op_jmp_scopes): ditto
15473
15474        * jit/JITStubCall.h:
15475        (JSC::JITStubCall::JITStubCall):
15476        (JSC::JITStubCall::getArgument): added a mechanism for reloading an argument
15477        you passed to a JIT stub, for use in emitTimeoutCheck.
15478
154792009-06-23  Sam Weinig  <sam@webkit.org>
15480
15481        Reviewed by Geoffrey Garen.
15482
15483        Remove now-useless inplace variants of binary ops.
15484
15485        * jit/JIT.h:
15486        * jit/JITArithmetic.cpp:
15487        (JSC::JIT::emit_op_bitand):
15488        (JSC::JIT::emit_op_bitor):
15489        (JSC::JIT::emit_op_bitxor):
15490        (JSC::JIT::emit_op_add):
15491        (JSC::JIT::emit_op_sub):
15492        (JSC::JIT::emit_op_mul):
15493
154942009-06-23  Sam Weinig  <sam@webkit.org>
15495
15496        Reviewed by Geoffrey Garen.
15497
15498        Move off memory operands to aid in re-enabling result caching.
15499
15500        - No regression measured.
15501
15502        * jit/JIT.h:
15503        * jit/JITArithmetic.cpp:
15504        (JSC::JIT::emit_op_negate):
15505        (JSC::JIT::emit_op_jnless):
15506        (JSC::JIT::emit_op_jnlesseq):
15507        (JSC::JIT::emit_op_lshift):
15508        (JSC::JIT::emit_op_rshift):
15509        (JSC::JIT::emit_op_bitand):
15510        (JSC::JIT::emitBitAnd32Constant):
15511        (JSC::JIT::emitBitAnd32InPlace):
15512        (JSC::JIT::emit_op_bitor):
15513        (JSC::JIT::emitBitOr32Constant):
15514        (JSC::JIT::emitBitOr32InPlace):
15515        (JSC::JIT::emit_op_bitxor):
15516        (JSC::JIT::emitBitXor32Constant):
15517        (JSC::JIT::emitBitXor32InPlace):
15518        (JSC::JIT::emit_op_bitnot):
15519        (JSC::JIT::emit_op_post_inc):
15520        (JSC::JIT::emit_op_post_dec):
15521        (JSC::JIT::emit_op_pre_inc):
15522        (JSC::JIT::emitSlow_op_pre_inc):
15523        (JSC::JIT::emit_op_pre_dec):
15524        (JSC::JIT::emitSlow_op_pre_dec):
15525        (JSC::JIT::emit_op_add):
15526        (JSC::JIT::emitAdd32Constant):
15527        (JSC::JIT::emitAdd32InPlace):
15528        (JSC::JIT::emitSlow_op_add):
15529        (JSC::JIT::emitSlowAdd32Constant):
15530        (JSC::JIT::emit_op_sub):
15531        (JSC::JIT::emitSlow_op_sub):
15532        (JSC::JIT::emitSub32ConstantLeft):
15533        (JSC::JIT::emitSub32ConstantRight):
15534        (JSC::JIT::emitSub32InPlaceLeft):
15535        (JSC::JIT::emitSub32InPlaceRight):
15536        (JSC::JIT::emitBinaryDoubleOp):
15537        (JSC::JIT::emit_op_mul):
15538        (JSC::JIT::emitMul32InPlace):
15539        (JSC::JIT::emit_op_div):
15540        (JSC::JIT::emit_op_mod):
15541        * jit/JITCall.cpp:
15542        (JSC::JIT::compileOpCallVarargs):
15543        * jit/JITOpcodes.cpp:
15544        (JSC::JIT::emit_op_loop_if_less):
15545        (JSC::JIT::emit_op_loop_if_lesseq):
15546        (JSC::JIT::emit_op_instanceof):
15547        (JSC::JIT::emit_op_to_primitive):
15548        (JSC::JIT::emit_op_not):
15549        (JSC::JIT::emit_op_jneq_ptr):
15550        (JSC::JIT::emit_op_eq):
15551        (JSC::JIT::emit_op_neq):
15552        (JSC::JIT::emit_op_to_jsnumber):
15553        * jit/JITPropertyAccess.cpp:
15554        (JSC::JIT::emit_op_get_by_val):
15555        (JSC::JIT::emit_op_put_by_val):
15556
155572009-06-23  Geoffrey Garen  <ggaren@apple.com>
15558
15559        Reviewed by Sam Weinig.
15560
15561        Fixed some missing and/or misplaced labels in bytecode generation, so
15562        we don't have to work around them in JIT code generation.
15563
15564        * bytecompiler/BytecodeGenerator.cpp:
15565        (JSC::BytecodeGenerator::emitJumpSubroutine):
15566        * parser/Nodes.cpp:
15567        (JSC::TryNode::emitBytecode):
15568
155692009-06-22  Geoffrey Garen  <ggaren@apple.com>
15570
15571        Reviewed by Sam Weinig.
15572
15573        For member function calls, emit "this" directly into the "this" slot
15574        for the function call, instead of moving it there later. This reduces
15575        time spent in op_mov during certain calls, like "a.b.c()".
15576
15577        1%-2% speedup on v8, mostly richards and delta-blue.
15578
15579        * parser/Nodes.cpp:
15580        (JSC::FunctionCallDotNode::emitBytecode):
15581
155822009-06-22  Gavin Barraclough  <barraclough@apple.com>
15583
15584        Reviewed by Sam Weinig.
15585
15586        Remove 'arguments' field from Register union.  Having JSCell derived types in the union is
15587        dangerous since it opens the possibility for the field to be written as a raw pointer but
15588        then read as a JSValue.  This will lead to statle data being read for the tag, which may
15589        be dangerous.  Having removed Arguments* types form Register, all arguments objects must
15590        always explicitly be stored in the register file as JSValues.
15591
15592        * interpreter/CallFrame.h:
15593        (JSC::ExecState::optionalCalleeArguments):
15594        * interpreter/Interpreter.cpp:
15595        (JSC::Interpreter::unwindCallFrame):
15596        (JSC::Interpreter::privateExecute):
15597        (JSC::Interpreter::retrieveArguments):
15598        * interpreter/Register.h:
15599        (JSC::Register::):
15600        * jit/JITStubs.cpp:
15601        (JSC::JITStubs::cti_op_tear_off_arguments):
15602        * runtime/Arguments.h:
15603        (JSC::JSActivation::copyRegisters):
15604        * runtime/JSActivation.cpp:
15605        (JSC::JSActivation::argumentsGetter):
15606        * runtime/JSActivation.h:
15607
156082009-06-03  Sam Weinig  <sam@webkit.org>
15609
15610        Reviewed by Geoffrey Garen.
15611
15612        Add back known this value optimization by abstracting
15613        slow case if not JSCell jumps.
15614
15615        * jit/JIT.h:
15616        * jit/JITCall.cpp:
15617        (JSC::JIT::compileOpCallVarargs):
15618        (JSC::JIT::compileOpCallVarargsSlowCase):
15619        (JSC::JIT::compileOpCall):
15620        (JSC::JIT::compileOpCallSlowCase):
15621        * jit/JITInlineMethods.h:
15622        (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
15623        (JSC::JIT::linkSlowCaseIfNotJSCell):
15624        * jit/JITOpcodes.cpp:
15625        (JSC::JIT::emit_op_instanceof):
15626        (JSC::JIT::emitSlow_op_instanceof):
15627        * jit/JITPropertyAccess.cpp:
15628        (JSC::JIT::emit_op_get_by_val):
15629        (JSC::JIT::emitSlow_op_get_by_val):
15630        (JSC::JIT::emit_op_put_by_val):
15631        (JSC::JIT::emitSlow_op_put_by_val):
15632        (JSC::JIT::emit_op_get_by_id):
15633        (JSC::JIT::emitSlow_op_get_by_id):
15634        (JSC::JIT::emit_op_put_by_id):
15635        (JSC::JIT::emitSlow_op_put_by_id):
15636
156372009-06-01  Geoffrey Garen  <ggaren@apple.com>
15638
15639        Reviewed by Sam Weinig.
15640
15641        Fixed some of the regression in crypto-aes.js. (8.5% speedup in
15642        crypto-aes.js.)
15643
15644        SunSpider reports no change overall.
15645
15646        Division was producing double results, which took the slow path through
15647        array access code.
15648
15649        Strangely, all my attempts at versions of this patch that modified array
15650        access code to accept ints encoded as doubles along the fast or slow paths
15651        were regressions. So I did this instead.
15652
15653        * jit/JITArithmetic.cpp:
15654        (JSC::JIT::emit_op_div): When dividing an int by an int, go ahead and try
15655        to turn the result into an int. Don't just do int division, though, because
15656        testing shows it to be slower than SSE double division, and the corner
15657        cases are pretty complicated / lengthy on top of that. Also, don't try
15658        to canonicalize division of known tiny numerators into ints, since that's a
15659        waste of time.
15660
156612009-05-26  Geoffrey Garen  <ggaren@apple.com>
15662
15663        Reviewed by Oliver Hunt.
15664
15665        Fixed a regression caused by my recent fix for NaN.
15666
15667        * jit/JITArithmetic.cpp:
15668        (JSC::JIT::emitBinaryDoubleOp): Actually do the comparison in reverse
15669        order, like the ChangeLog said we would, bokay?
15670
156712009-05-26  Geoffrey Garen  <ggaren@apple.com>
15672
15673        Reviewed by Sam Weinig and Oliver Hunt.
15674
15675        Fixed two edge cases in %:
15676
15677        - Don't do -2147483648 % x as a fast case, since you might do -2147483648 % -1,
15678        which will signal a hardware exception due to overflow.
15679
15680        - In the case of a zero remainder, be sure to store negative zero if the
15681        dividend was zero.
15682
15683        SunSpider reports no change.
15684
15685        * jit/JITArithmetic.cpp:
15686        (JSC::JIT::emit_op_mod):
15687        (JSC::JIT::emitSlow_op_mod):
15688
156892009-05-25  Geoffrey Garen  <ggaren@apple.com>
15690
15691        Reviewed by Maciej Stachowiak.
15692
15693        Fixed a regression when comparing to NaN.
15694
15695        * jit/JITArithmetic.cpp:
15696        (JSC::JIT::emitBinaryDoubleOp): For op_jnless and op_jnless_eq, do the
15697        comparison in reverse order, and jump if the result is below or
15698        below-or-equal. This ensures that we do jump in the case of NaN.
15699
157002009-05-25  Geoffrey Garen  <ggaren@apple.com>
15701
15702        Reviewed by Oliver Hunt.
15703
15704        SunSpider says no change.
15705
15706        Fixed regressions in fast/js/var-declarations-shadowing.html and
15707        fast/js/equality.html, caused by recent == and != optimizations.
15708
15709        * jit/JITStubs.cpp:
15710        (JSC::JITStubs::cti_op_eq): Don't treat "compare to string" as always
15711        numeric or string comparison. If the second operand is an object, you
15712        need to ToPrimitive it, and start all over again. Also, I wrote out each
15713        of the possible cases explicitly, to cut down on redundant branching.
15714
157152009-05-25  Sam Weinig  <sam@webkit.org>
15716
15717        Reviewed by Mark Rowe.
15718
15719        Fix bug in fast/js/constant-folding.html where we were not negating
15720        -0 properly.
15721
15722        * jit/JITArithmetic.cpp:
15723        (JSC::JIT::emit_op_negate):
15724
157252009-05-23  Geoffrey Garen  <ggaren@apple.com>
15726
15727        Reviewed by Oliver Hunt.
15728
15729        Refactored new slow case codegen for == and !=.
15730
15731        SunSpider reports no change, maybe a tiny speedup.
15732
15733        * jit/JITOpcodes.cpp:
15734        (JSC::JIT::emitSlow_op_eq):
15735        (JSC::JIT::emitSlow_op_neq): Made a vptr comparison a *Ptr operation,
15736        instead of *32, to make it portable to 64bit. Reorganized the string
15737        and generic cases to make their control flow a little clearer.
15738
157392009-05-23  Geoffrey Garen  <ggaren@apple.com>
15740
15741        Reviewed by Maciej Stachowiak.
15742
15743        Optimized == and != for our new value representation -- especially for strings.
15744
15745        14% speedup on date-format-tofte.
15746
15747        * jit/JITOpcodes.cpp:
15748        (JSC::JIT::emit_op_eq):
15749        (JSC::JIT::emitSlow_op_eq):
15750        (JSC::JIT::emit_op_neq):
15751        (JSC::JIT::emitSlow_op_neq):
15752        * jit/JITStubCall.h:
15753        (JSC::JITStubCall::JITStubCall):
15754        * jit/JITStubs.cpp:
15755        (JSC::JITStubs::cti_op_eq):
15756        (JSC::JITStubs::cti_op_eq_strings):
15757        (JSC::JITStubs::cti_op_call_eval):
15758        * jit/JITStubs.h:
15759        (JSC::):
15760        * runtime/JSValue.h:
15761
157622009-05-22  Sam Weinig  <sam@webkit.org>
15763
15764        Reviewed by Gavin Barraclough.
15765
15766        Fix non-SSE enabled builds.
15767
15768        * jit/JITArithmetic.cpp:
15769        (JSC::JIT::emitSlow_op_add): Don't early return here, we still need to call the JIT stub.
15770        (JSC::JIT::emitSlow_op_sub): Ditto.
15771
157722009-05-22  Geoffrey Garen  <ggaren@apple.com>
15773
15774        Reviewed by Sam Weinig.
15775
15776        Here's a thought: let's not take a jit stub call just to multiply by 1,
15777        bokay?
15778
15779        imul doesn't set the zero flag, so to test for a zero result, we need
15780        an explicit instruction. (Luckily, it does set the overflow flag, so
15781        we can still use that.)
15782
15783        * jit/JIT.h:
15784        * jit/JITArithmetic.cpp:
15785        (JSC::JIT::emit_op_mul):
15786        (JSC::JIT::emitSlow_op_mul):
15787        (JSC::JIT::emitMul32InPlace):
15788
157892009-05-22  Sam Weinig  <sam@webkit.org>
15790
15791        Reviewed by Geoffrey "Premature Commit" Garen.
15792
15793        Add back constant integer cases for op_add.
15794
15795        * jit/JIT.h:
15796        * jit/JITArithmetic.cpp:
15797        (JSC::JIT::emit_op_add):
15798        (JSC::JIT::emitAdd32Constant):
15799        (JSC::JIT::emitSlow_op_add):
15800        (JSC::JIT::emitSlowAdd32Constant):
15801        * jit/JITInlineMethods.h:
15802        (JSC::JIT::getConstantOperandImmediateDouble):
15803        (JSC::JIT::isOperandConstantImmediateDouble):
15804
158052009-05-22  Geoffrey Garen  <ggaren@apple.com>
15806
15807        Reviewed by Sam Weinig.
15808
15809        Added fast double cases for op_jnless and op_jnlesseq.
15810
15811        * assembler/AbstractMacroAssembler.h:
15812        (JSC::AbstractMacroAssembler::JumpList::jumps): New accesor, used by
15813        addSlowCase.
15814
15815        * assembler/X86Assembler.h:
15816        (JSC::X86Assembler::ucomisd_rm): New method for comparing register to
15817        memory.
15818
15819        * jit/JIT.h:
15820        * jit/JITArithmetic.cpp:
15821        (JSC::JIT::emit_op_jnless):
15822        (JSC::JIT::emitSlow_op_jnless):
15823        (JSC::JIT::emit_op_jnlesseq):
15824        (JSC::JIT::emitSlow_op_jnlesseq):
15825        (JSC::JIT::emit_op_add):
15826        (JSC::JIT::emit_op_sub):
15827        (JSC::JIT::emitBinaryDoubleOp):
15828        (JSC::JIT::emit_op_mul):
15829        (JSC::JIT::emit_op_div): Modified emitBinaryDoubleOp to accept comparison/jump
15830        operations in addition to operations with explicit result registers.
15831
15832        * jit/JITInlineMethods.h:
15833        (JSC::JIT::addSlowCase): Added an "addSlowCase" for JumpLists, so clients
15834        can track multiple jumps to the same slow case condition together.
15835
158362009-05-21  Sam Weinig  <sam@webkit.org>
15837
15838        Reviewed by Gavin Barraclough.
15839
15840        Implement op_negate inline fast cases.
15841
15842        * assembler/MacroAssemblerX86Common.h:
15843        (JSC::MacroAssemblerX86Common::neg32):
15844        * assembler/X86Assembler.h:
15845        (JSC::X86Assembler::):
15846        (JSC::X86Assembler::negl_m):
15847        (JSC::X86Assembler::xorpd_rr):
15848        * jit/JIT.cpp:
15849        (JSC::JIT::privateCompileMainPass):
15850        (JSC::JIT::privateCompileSlowCases):
15851        * jit/JIT.h:
15852        * jit/JITArithmetic.cpp:
15853        (JSC::JIT::emit_op_negate):
15854        (JSC::JIT::emitSlow_op_negate):
15855
158562009-05-20  Sam Weinig  <sam@webkit.org>
15857
15858        Reviewed by Gavin Barraclough.
15859
15860        Update the patchOffsetGetByIdSlowCaseCall constant for the
15861        case that OPCODE_SAMPLING is enabled.
15862
15863        * jit/JIT.h:
15864
158652009-05-20  Geoffrey Garen  <ggaren@apple.com>
15866
15867        Reviewed by Sam Weinig.
15868
15869        Added support for inline subtraction of doubles.
15870
15871        * jit/JITArithmetic.cpp:
15872        (JSC::JIT::emit_op_sub):
15873        (JSC::JIT::emitSlow_op_sub):
15874        (JSC::JIT::emitSlowSub32InPlaceLeft):
15875        (JSC::JIT::emitBinaryDoubleOp):
15876
158772009-05-20  Sam Weinig  <sam@webkit.org>
15878
15879        Reviewed by Geoffrey Garen.
15880
15881        Added support for inline division.
15882
15883        * assembler/X86Assembler.h:
15884        (JSC::X86Assembler::):
15885        (JSC::X86Assembler::divsd_rr):
15886        (JSC::X86Assembler::divsd_mr):
15887        * bytecode/CodeBlock.cpp:
15888        (JSC::CodeBlock::dump):
15889        * bytecode/Opcode.h:
15890        * bytecompiler/BytecodeGenerator.cpp:
15891        (JSC::BytecodeGenerator::emitBinaryOp):
15892        * interpreter/Interpreter.cpp:
15893        (JSC::Interpreter::privateExecute):
15894        * jit/JIT.cpp:
15895        (JSC::JIT::privateCompileMainPass):
15896        (JSC::JIT::privateCompileSlowCases):
15897        * jit/JIT.h:
15898        * jit/JITArithmetic.cpp:
15899        (JSC::JIT::emitBinaryDoubleOp):
15900        (JSC::JIT::emit_op_div):
15901        (JSC::JIT::emitSlow_op_div):
15902
159032009-05-20  Geoffrey Garen  <ggaren@apple.com>
15904
15905        Reviewed by Sam Weinig.
15906
15907        Added support for inline addition of doubles.
15908
15909        * jit/JITArithmetic.cpp:
15910        (JSC::JIT::emit_op_add):
15911        (JSC::JIT::emitSlow_op_add):
15912        (JSC::JIT::emitSlowAdd32InPlace):
15913        (JSC::JIT::emitBinaryDoubleOp):
15914        (JSC::JIT::emit_op_mul):
15915        (JSC::JIT::emitSlow_op_mul):
15916
159172009-05-20  Geoffrey Garen  <ggaren@apple.com>
15918
15919        Reviewed by Sam Weinig.
15920
15921        Factored inline double operations into a helper function, so that we
15922        can reuse this code for other math operations.
15923
15924        * jit/JIT.h:
15925        * jit/JITArithmetic.cpp:
15926        (JSC::JIT::emitBinaryDoubleOp):
15927        (JSC::JIT::emit_op_mul):
15928        * jit/JITCall.cpp:
15929        (JSC::JIT::compileOpCallInitializeCallFrame):
15930
159312009-05-20  Geoffrey Garen  <ggaren@apple.com>
15932
15933        Reviewed by Sam Weinig.
15934
15935        Added support for inline multiplication of doubles.
15936
15937        * assembler/X86Assembler.h:
15938        (JSC::X86Assembler::cvtsi2sd_mr): New function, useful for loading an
15939        int32 into a double register.
15940
15941        * jit/JITArithmetic.cpp:
15942        (JSC::JIT::emit_op_mul):
15943        (JSC::JIT::emitSlow_op_mul): Filled out these cases for double arithmetic.
15944
15945        * jit/JIT.h:
15946        * jit/JITInlineMethods.h:
15947        (JSC::JIT::addressFor): New function, useful for addressing a JSValue's
15948        full 64bits as a double.
15949
159502009-05-19  Sam Weinig  <sam@webkit.org>
15951
15952        Reviewed by Geoffrey Garen.
15953
15954        Implement and enable optimized calls.
15955
15956        * jit/JIT.cpp:
15957        (JSC::JIT::privateCompileCTIMachineTrampolines): Add ENABLE(JIT_OPTIMIZE_CALL) guards
15958        around the the optimize call only trampolines (virtualCallPreLink and virtualCallLink).
15959        Update the trampolines to account for the new JSValue representation.
15960        (JSC::JIT::unlinkCall): Use NULL instead of JSValue noValue.
15961
15962        * jit/JITCall.cpp:
15963        (JSC::JIT::compileOpCall): Update to account for the new JSValue representation
15964        (JSC::JIT::compileOpCallSlowCase): Ditto.
15965
15966        * jit/JITStubs.h: Remove incorrect !ENABLE(JIT_OPTIMIZE_CALL) guard.
15967
15968        * wtf/Platform.h: Enable ENABLE_JIT_OPTIMIZE_CALL.
15969
159702009-05-19  Sam Weinig  <sam@webkit.org>
15971
15972        Reviewed by Geoffrey Garen.
15973
15974        Implement and enable optimized property access.
15975
15976        * assembler/AbstractMacroAssembler.h: Fix comment.
15977        * jit/JIT.cpp:
15978        (JSC::JIT::privateCompileCTIMachineTrampolines): Remove array length trampoline
15979        and implement the string length trampoline.
15980        * jit/JIT.h: Add new constants for patch offsets.
15981        * jit/JITInlineMethods.h: Remove FIELD_OFFSET which is now in StdLibExtras.h.
15982        * jit/JITPropertyAccess.cpp:
15983        (JSC::JIT::emit_op_get_by_id):
15984        (JSC::JIT::emitSlow_op_get_by_id):
15985        (JSC::JIT::emit_op_put_by_id):
15986        (JSC::JIT::emitSlow_op_put_by_id):
15987        (JSC::JIT::compilePutDirectOffset):
15988        (JSC::JIT::compileGetDirectOffset):
15989        (JSC::JIT::privateCompilePutByIdTransition):
15990        (JSC::JIT::patchGetByIdSelf):
15991        (JSC::JIT::patchPutByIdReplace):
15992        (JSC::JIT::privateCompilePatchGetArrayLength):
15993        (JSC::JIT::privateCompileGetByIdProto):
15994        (JSC::JIT::privateCompileGetByIdSelfList):
15995        (JSC::JIT::privateCompileGetByIdProtoList):
15996        (JSC::JIT::privateCompileGetByIdChainList):
15997        (JSC::JIT::privateCompileGetByIdChain):
15998        * jit/JITStubCall.h:
15999        (JSC::JITStubCall::addArgument): Add version of addArgument that takes
16000        two registers for the tag and payload.
16001        * jit/JITStubs.cpp:
16002        (JSC::JITStubs::JITStubs): Remove array length trampoline pointer.
16003        (JSC::JITStubs::cti_op_get_by_id_self_fail):
16004        * jit/JITStubs.h:
16005        * runtime/JSObject.h:
16006        (JSC::JSObject::JSObject): Move m_inheritorID below the property storage
16007        to align it to a 16 byte boundary.
16008        * wtf/Platform.h: Enable ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS
16009        * wtf/StdLibExtras.h: Move FIELD_OFFSET here.
16010
160112009-05-17  Sam Weinig  <sam@webkit.org>
16012
16013        Reviewed by Geoffrey Garen.
16014
16015        Remove unneeded ExecState parameter from the number JSValue constructors.
16016
16017        * runtime/JSValue.h:
16018        (JSC::jsNumber):
16019        (JSC::jsNaN):
16020        (JSC::JSValue::JSValue):
16021
160222009-05-15  Sam Weinig  <sam@webkit.org>
16023
16024        Reviewed by Geoffrey Garen.
16025
16026        Implemented fast path for op_put_by_val when putting to arrays.
16027
16028        * jit/JITPropertyAccess.cpp:
16029        (JSC::JIT::emit_op_put_by_val):
16030        (JSC::JIT::emitSlow_op_put_by_val):
16031
160322009-05-15  Geoffrey Garen  <ggaren@apple.com> (Mostly by Sam)
16033
16034        Reviewed by Sam Weinig.
16035
16036        Implemented fast path for op_get_by_val when accessing array.
16037
16038        * jit/JIT.cpp:
16039        * jit/JITPropertyAccess.cpp:
16040        (JSC::JIT::emit_op_get_by_val):
16041        (JSC::JIT::emitSlow_op_get_by_val):
16042
160432009-05-14  Geoffrey Garen  <ggaren@apple.com>
16044
16045        Reviewed by Sam Weinig.
16046
16047        Fixed a failure in fast/js/math-transforms.html caused by failing to
16048        preserve -0 in multiplication.
16049
16050        * assembler/X86Assembler.h:
16051        (JSC::X86Assembler::jz):
16052        * jit/JITArithmetic.cpp:
16053        (JSC::JIT::emit_op_mul):
16054        (JSC::JIT::emitSlow_op_mul):
16055        (JSC::JIT::emitMul32Constant):
16056        (JSC::JIT::emitMul32InPlace): Check both for overflow and for zero when
16057        doing multiplication. Use a slow case to get these right.
16058
160592009-05-14  Geoffrey Garen  <ggaren@apple.com>
16060
16061        Reviewed by Sam Weinig.
16062
16063        Fixed a bug in the varargs calling convention.
16064
16065        * jit/JITCall.cpp:
16066        (JSC::JIT::compileOpCallVarargs): Move the argument count into regT1,
16067        since that's where ctiVirtualCall expects it to be.
16068
160692009-05-14  Geoffrey Garen  <ggaren@apple.com>
16070
16071        Reviewed by Sam Weinig.
16072
16073        Fixed a small bug in instanceof's looping code.
16074
16075        * jit/JITOpcodes.cpp:
16076        (JSC::JIT::emit_op_instanceof): NULL means the object has no prototype,
16077        so only loop when *not* equal to NULL.
16078
160792009-05-14  Geoffrey Garen  <ggaren@apple.com>
16080
16081        Reviewed by Sam Weinig.
16082
16083        Fixed a small bug in instanceof's result writing code.
16084
16085        * jit/JITOpcodes.cpp:
16086        (JSC::JIT::emit_op_instanceof): Make sure to fill out the payload bits
16087        in all cases.
16088
160892009-05-14  Sam Weinig  <sam@webkit.org>
16090
16091        Reviewed by Geoffrey Garen.
16092
16093        Removed an invalid assertion in cti_op_urshift which
16094        depended on a fast path for op_urshift which has
16095        never existed.
16096
16097        * jit/JITStubs.cpp:
16098        (JSC::JITStubs::cti_op_urshift):
16099
161002009-05-14  Geoffrey Garen  <ggaren@apple.com>
16101
16102        Reviewed by Sam Weinig.
16103
16104        Fixed loop_if_true, which had the same reversed test that jtrue had.
16105
16106        * jit/JITOpcodes.cpp:
16107        (JSC::JIT::emit_op_loop_if_true):
16108
161092009-05-14  Sam Weinig  <sam@webkit.org>
16110
16111        Reviewed by Geoffrey Garen.
16112
16113        In op_neq, we apparently want to check that one value
16114        does *not* equal another.  Go figure.
16115
16116        * jit/JITOpcodes.cpp:
16117        (JSC::JIT::emit_op_neq):
16118
161192009-05-14  Sam Weinig  <sam@webkit.org>
16120
16121        Reviewed by Geoffrey Garen.
16122
16123        The slow case of op_mod should call op_mod's jit stub,
16124        not op_mul.  That would be dumb.
16125
16126        * jit/JITArithmetic.cpp:
16127        (JSC::JIT::emitSlow_op_mod):
16128
161292009-05-14  Geoffrey Garen  <ggaren@apple.com>
16130
16131        Reviewed by Sam Weinig.
16132
16133        Fixed problems when using 'arguments' due to a half-initialized register.
16134
16135        * interpreter/CallFrame.h:
16136        (JSC::ExecState::setCalleeArguments):
16137        (JSC::ExecState::init): Require a full JSValue when setting up the
16138        'arguments' virtual register, since this register is accessible from JIT
16139        code and bytecode, and needs to be a true JSValue.
16140
16141        * interpreter/CallFrameClosure.h:
16142        (JSC::CallFrameClosure::resetCallFrame): ditto
16143
16144        * interpreter/Interpreter.cpp:
16145        (JSC::Interpreter::privateExecute): ditto
16146
16147        * interpreter/Register.h: Removed the constructor that allowed assignment
16148        of a JSArguments* to a register. That is not safe. See above.
16149
16150        * jit/JITStubs.cpp:
16151        (JSC::JITStubs::cti_op_create_arguments):
16152        (JSC::JITStubs::cti_op_create_arguments_no_params): ditto
16153
161542009-05-14  Sam Weinig  <sam@webkit.org>
16155
16156        Reviewed by Geoffrey Garen.
16157
16158        We really want to go to the slow case in op_jfalse and
16159        op_jtrue if the value is *not* boolean.
16160
16161        * jit/JITOpcodes.cpp:
16162        (JSC::JIT::emit_op_jfalse):
16163        (JSC::JIT::emit_op_jtrue):
16164
161652009-05-14  Sam Weinig  <sam@webkit.org>
16166
16167        Reviewed by Geoffrey Garen.
16168
16169        Flipped the condition when emitting a an op_loop_if_less or op_loop_if_lesseq
16170        if the first operand is a constant.
16171
16172        * jit/JITOpcodes.cpp:
16173        (JSC::JIT::emit_op_loop_if_less):
16174        (JSC::JIT::emit_op_loop_if_lesseq):
16175
161762009-05-14  Sam Weinig  <sam@webkit.org>
16177
16178        Reviewed by Geoffrey Garen.
16179
16180        Added missing return in op_jnless and op_jnlesseq.
16181
16182        * jit/JITArithmetic.cpp:
16183        (JSC::JIT::emit_op_jnless):
16184        (JSC::JIT::emit_op_jnlesseq):
16185
161862009-05-14  Sam Weinig  <sam@webkit.org>
16187
16188        Reviewed by Geoffrey Garen.
16189
16190        Load constants into the the register file as a temporary measure to
16191        aid bring up.  This allows us to use to treat constants like any
16192        other virtual register.
16193
16194        * jit/JITOpcodes.cpp:
16195        (JSC::JIT::emit_op_enter):
16196        (JSC::JIT::emit_op_enter_with_activation):
16197
161982009-05-14  Geoffrey Garen  <ggaren@apple.com>
16199
16200        Reviewed by Sam Weinig.
16201
16202        Implemented op_strict_eq. Original patch by Snowy, by way of Sam and Gavin.
16203
16204        * assembler/MacroAssemblerX86Common.h:
16205        (JSC::MacroAssemblerX86Common::set8): Added set8, since it's slightly
16206        faster than set32, and the new value representation usually doesn't
16207        need set32.
16208
16209        * jit/JIT.cpp:
16210        * jit/JIT.h:
16211        * jit/JITInlineMethods.h:
16212        (JSC::JIT::emitLoadTag):
16213        (JSC::JIT::emitLoadPayload): Added helper functions for dealing with
16214        constants. Eventually, we should write special cases for all constants,
16215        but these are helpful in the short term.
16216
16217        * jit/JITOpcodes.cpp:
16218        (JSC::JIT::compileOpStrictEq):
16219        (JSC::JIT::emitSlow_op_stricteq):
16220        (JSC::JIT::emitSlow_op_nstricteq): teh opcodez.
16221
16222        * runtime/JSValue.h:
16223        (JSC::JSValue::):
16224        (JSC::JSValue::isDouble): Added a LowestTag for clarity.
16225
162262009-05-13  Geoffrey Garen  <ggaren@apple.com>
16227
16228        Reviewed by Sam Weinig.
16229
16230        Fixed some bugs in host function calls.
16231
16232        testapi now passes!
16233
16234        * jit/JIT.cpp: Changed some registers around to avoid overwriting edx:eax,
16235        which is how JSValues are now returned. Also changed the code that
16236        passes thisValue to pass the full 64bits of the value. Also added
16237        an #error compiler directive to other platform builds, since the JSValue
16238        return signature probably won't return in edx:eax on those platforms,
16239        and we'll have to investigate a solution.
16240
162412009-05-13  Geoffrey Garen  <ggaren@apple.com>
16242
16243        Reviewed by Sam Weinig.
16244
16245        Removed parameters from functions that are intended never to use their
16246        parameters.
16247
16248        * jit/JITPropertyAccess.cpp:
16249        (JSC::JIT::emitSlow_op_get_by_val):
16250        (JSC::JIT::emitSlow_op_put_by_val):
16251
162522009-05-13  Geoffrey Garen  <ggaren@apple.com>
16253
16254        Reviewed by Sam Weinig.
16255
16256        Ported op_instance_of from TOT. It's basically the same, but some register
16257        stuff changed to memory stuff.
16258
16259        * jit/JITInlineMethods.h:
16260        (JSC::JIT::emitPutJITStubArgFromVirtualRegister):
16261        (JSC::JIT::emitStore): Changed to use helper functions.
16262
16263        * jit/JITOpcodes.cpp:
16264        (JSC::JIT::emit_op_instanceof):
16265        (JSC::JIT::emitSlow_op_instanceof): Ported from TOT.
16266
162672009-05-13  Geoffrey Garen  <ggaren@apple.com>
16268
16269        Reviewed by Gavin Barraclough.
16270
16271        Added a comment to explain an exception-handling subtelty that we found
16272        hard to remember when reviewing my last patch.
16273
16274        * jit/JITOpcodes.cpp:
16275        (JSC::JIT::emit_op_catch):
16276
162772009-05-13  Geoffrey Garen  <ggaren@apple.com>
16278
16279        Reviewed by Sam Weinig.
16280
16281        Implemented try/catch.
16282
16283        * jit/JITOpcodes.cpp:
16284        (JSC::JIT::emit_op_throw): Updated to use JITStackFrame abstraction.
16285        (JSC::JIT::emit_op_catch): Filled out.
16286
162872009-05-13  Sam Weinig  <sam@webkit.org>
16288
16289        Reviewed by Geoffrey Garen.
16290
16291        Implemented op_loop_if_true, op_jfalse, op_jtrue, op_jeq_null and op_jneq_null
16292
16293        * jit/JITOpcodes.cpp:
16294        (JSC::JIT::emitSlow_op_instanceof): Moved from below to be next to its
16295        fast brother.
16296
16297        (JSC::JIT::emit_op_loop_if_true): Similar to the old version
16298        in that it tries to do the integer case first and reduce the
16299        number of jumps you might need to take.
16300        (JSC::JIT::emitSlow_op_loop_if_true):
16301
16302        (JSC::JIT::emit_op_jfalse): Very similar to op_loop_if_true, only
16303        the inverse and without a timeout check.
16304        (JSC::JIT::emitSlow_op_jfalse):
16305
16306        (JSC::JIT::emit_op_jtrue): Very similar to op_loop_if_true except
16307        without the timeout check.
16308        (JSC::JIT::emitSlow_op_jtrue):
16309
16310        (JSC::JIT::emit_op_jeq_null): Very similar to the implementation
16311        of op_eq, except it takes jumps instead of copying the condition
16312        to a dst.
16313        (JSC::JIT::emit_op_jneq_null): Ditto but for op_neq.
16314
163152009-05-13  Geoffrey Garen  <ggaren@apple.com>
16316
16317        Reviewed by Sam Weinig.
16318
16319        Implemented op_call_varargs.
16320
16321        * jit/JITCall.cpp:
16322        (JSC::JIT::compileOpCallVarargsSetupArgs):
16323        (JSC::JIT::compileOpCallVarargs):
16324        (JSC::JIT::emit_op_call):
16325        (JSC::JIT::emit_op_call_eval):
16326        (JSC::JIT::emit_op_load_varargs):
16327        (JSC::JIT::emit_op_call_varargs):
16328        (JSC::JIT::emit_op_construct):
16329        * jit/JITOpcodes.cpp:
16330        (JSC::JIT::emit_op_jneq_ptr):
16331
163322009-05-13  Geoffrey Garen  <ggaren@apple.com>
16333
16334        Reviewed by Sam Weinig.
16335
16336        Implemented op_call_eval.
16337
16338        * jit/JITCall.cpp:
16339        (JSC::JIT::compileOpCallVarargsSetupArgs):
16340        (JSC::JIT::compileOpCall):
16341        * jit/JITStubCall.h:
16342        (JSC::CallEvalJITStub::CallEvalJITStub):
16343
163442009-05-13  Sam Weinig  <sam@webkit.org>
16345
16346        Reviewed by Gavin Barraclough.
16347
16348        Implemented op_not. (Gavin did most of the work!)
16349
16350        * jit/JITOpcodes.cpp:
16351        (JSC::JIT::emit_op_not):
16352        (JSC::JIT::emitSlow_op_not):
16353
163542009-05-13  Geoffrey Garen  <ggaren@apple.com>
16355
16356        Reviewed by Sam Weinig.
16357
16358        Implemented op_global_resolve.
16359
16360        * jit/JITOpcodes.cpp:
16361        (JSC::JIT::emit_op_loop_if_less):
16362        (JSC::JIT::emit_op_loop_if_lesseq): Added back accidentally removed
16363        early returns.
16364
16365        (JSC::JIT::emit_op_resolve_global):
16366        * jit/JITStubs.cpp:
16367        (JSC::JITStubs::cti_op_resolve_global): Pretty similar to the old code,
16368        but we need two reads and a TimesEight step in order to account for the
16369        64bit value size.
16370
16371        * jit/JITStubs.h:
16372        (JSC::): Slightly tweaked this code to specialize for a JSGlobalObject*,
16373        to avoid having to pass an irrelevant tag pointer to the stub.
16374
163752009-05-13  Sam Weinig  <sam@webkit.org>
16376
16377        Reviewed by Geoffrey Garen.
16378
16379        Implemented op_to_jsnumber.
16380
16381        * jit/JITOpcodes.cpp:
16382        (JSC::JIT::emit_op_to_jsnumber):
16383        (JSC::JIT::emitSlow_op_to_jsnumber):
16384
163852009-05-13  Sam Weinig  <sam@webkit.org>
16386
16387        Reviewed by Geoffrey Garen.
16388
16389        Implemented op_convert_this.
16390
16391        * jit/JITOpcodes.cpp:
16392        (JSC::JIT::emit_op_convert_this):
16393        (JSC::JIT::emitSlow_op_convert_this):
16394
163952009-05-13  Geoffrey Garen  <ggaren@apple.com>
16396
16397        Reviewed by Sam Weinig.
16398
16399        Got basic JS function and constructor calls working.
16400
16401        * jit/JIT.cpp:
16402        (JSC::JIT::privateCompileCTIMachineTrampolines):
16403        * jit/JIT.h:
16404        * jit/JITCall.cpp:
16405        (JSC::JIT::compileOpCallSetupArgs):
16406        (JSC::JIT::compileOpCallVarargsSetupArgs):
16407        (JSC::JIT::compileOpConstructSetupArgs):
16408        (JSC::JIT::emit_op_ret):
16409        (JSC::JIT::emit_op_construct_verify):
16410        (JSC::JIT::emitSlow_op_construct_verify):
16411        (JSC::JIT::emitSlow_op_call):
16412        (JSC::JIT::emitSlow_op_call_eval):
16413        (JSC::JIT::emitSlow_op_call_varargs):
16414        (JSC::JIT::emitSlow_op_construct):
16415        (JSC::JIT::compileOpCall): Filled out these cases, with call_eval #if'd out.
16416
16417        * jit/JITInlineMethods.h:
16418        (JSC::JIT::emitPutJITStubArgFromVirtualRegister):
16419        (JSC::JIT::emitLoad): Restored some legacy "*CTIArg*" functions,
16420        since I wanted to avoid the complexity of revamping the API here while
16421        trying to bring it up. Eventually, we should re-remove all of these functions.
16422
16423        (JSC::JIT::recordJumpTarget): Removed unnecessary macro cruft. You will
16424        not silence me, Sam Weinig! The world will know that you are a crufty,
16425        crufty, crufty programmer!!!
16426
16427        * jit/JITOpcodes.cpp:
16428        * jit/JITStubs.cpp:
16429        (JSC::):
16430        * jit/JITStubs.h: Changed up some offsets in the JITStackFrame class, since
16431        and off-by-one error was causing stack misalignment.
16432
164332009-05-13  Sam Weinig  <sam@webkit.org>
16434
16435        Reviewed by Geoffrey Garen.
16436
16437        Implement op_eq_null and op_neq_null.
16438
16439        * assembler/MacroAssemblerX86Common.h:
16440        (JSC::MacroAssemblerX86Common::set8):
16441        (JSC::MacroAssemblerX86Common::setTest8):
16442        * jit/JITOpcodes.cpp:
16443        (JSC::JIT::emit_op_stricteq):
16444        (JSC::JIT::emitSlow_op_stricteq):
16445        (JSC::JIT::emit_op_nstricteq):
16446        (JSC::JIT::emitSlow_op_nstricteq):
16447        (JSC::JIT::emit_op_eq_null):
16448        (JSC::JIT::emit_op_neq_null):
16449        * jsc.cpp:
16450
164512009-05-12  Sam Weinig  <sam@webkit.org>
16452
16453        Reviewed by Geoffrey Garen.
16454
16455        Implement op_new_error.
16456
16457        * jit/JITOpcodes.cpp:
16458        (JSC::JIT::emit_op_new_error):
16459        * jit/JITStubCall.h:
16460        (JSC::JITStubCall::addArgument): Add a version of addArgument
16461        that takes a constant JSValue.
16462
164632009-05-12  Sam Weinig  <sam@webkit.org>
16464
16465        Reviewed by Geoffrey Garen.
16466
16467        Remove now unused emitGetVariableObjectRegister and emitPutVariableObjectRegister.
16468
16469        * jit/JIT.cpp:
16470        * jit/JIT.h:
16471
164722009-05-12  Sam Weinig  <sam@webkit.org>
16473
16474        Reviewed by Geoffrey Garen.
16475
16476        Implement op_to_primitive and op_next_pname.
16477
16478        * jit/JITOpcodes.cpp:
16479        (JSC::JIT::emitSlow_op_construct_verify):
16480        (JSC::JIT::emit_op_to_primitive):
16481        (JSC::JIT::emitSlow_op_to_primitive):
16482        (JSC::JIT::emitSlow_op_loop_if_true):
16483        (JSC::JIT::emit_op_jtrue):
16484        (JSC::JIT::emit_op_next_pname):
16485
164862009-05-12  Sam Weinig  <sam@webkit.org>
16487
16488        Reviewed by Geoffrey Garen.
16489
16490        Add op_get_global_var, op_put_global_var, emit_op_get_scoped_var, emit_op_put_scoped_var and
16491        op_unexpected_load.
16492
16493        * jit/JIT.h:
16494        * jit/JITInlineMethods.h:
16495        (JSC::JIT::tagFor):
16496        (JSC::JIT::payloadFor):
16497        (JSC::JIT::emitLoad):
16498        (JSC::JIT::emitStore):
16499        (JSC::JIT::emitLoadReturnValue):
16500        * jit/JITOpcodes.cpp:
16501        (JSC::JIT::emit_op_get_global_var):
16502        (JSC::JIT::emit_op_put_global_var):
16503        (JSC::JIT::emit_op_get_scoped_var):
16504        (JSC::JIT::emit_op_put_scoped_var):
16505        (JSC::JIT::emit_op_unexpected_load):
16506
165072009-05-12  Geoffrey Garen  <ggaren@apple.com>
16508
16509        Reviewed by Sam Weinig.
16510
16511        Added overflow handling to op_sub.
16512
16513        * jit/JIT.h:
16514        * jit/JITArithmetic.cpp:
16515        (JSC::JIT::emitSlow_op_sub):
16516        (JSC::JIT::emitSlowSub32InPlaceLeft):
16517
165182009-05-12  Sam Weinig  <sam@webkit.org>
16519
16520        Reviewed by Geoffrey Garen.
16521
16522        Remove a function call by folding op_get_by_id and op_put_by_id into
16523        their respective compile functions.
16524
16525        * jit/JIT.h:
16526        * jit/JITPropertyAccess.cpp:
16527        (JSC::JIT::emit_op_get_by_id):
16528        (JSC::JIT::emitSlow_op_get_by_id):
16529        (JSC::JIT::emit_op_put_by_id):
16530        (JSC::JIT::emitSlow_op_put_by_id):
16531
165322009-05-12  Sam Weinig  <sam@webkit.org>
16533
16534        Reviewed by Geoffrey Garen.
16535
16536        Make JITStubCall work in 64bit by making the stack index
16537        step dependent on the size of void*.
16538
16539        * jit/JITStubCall.h:
16540        (JSC::JITStubCall::JITStubCall):
16541        (JSC::JITStubCall::addArgument):
16542
165432009-05-12  Sam Weinig  <sam@webkit.org>
16544
16545        Reviewed by Geoffrey Garen.
16546
16547        Implement simple version of property access opcodes
16548        which just call a stub functions.
16549
16550        * jit/JITOpcodes.cpp:
16551        * jit/JITPropertyAccess.cpp:
16552        (JSC::JIT::emitSlow_op_put_by_id):
16553        (JSC::JIT::emitSlow_op_get_by_id):
16554        (JSC::JIT::emit_op_get_by_val):
16555        (JSC::JIT::emitSlow_op_get_by_val):
16556        (JSC::JIT::emit_op_put_by_val):
16557        (JSC::JIT::emitSlow_op_put_by_val):
16558        (JSC::JIT::emit_op_put_by_index):
16559        (JSC::JIT::emit_op_put_getter):
16560        (JSC::JIT::emit_op_put_setter):
16561        (JSC::JIT::emit_op_del_by_id):
16562        (JSC::JIT::compileGetByIdHotPath):
16563        (JSC::JIT::compilePutByIdHotPath):
16564        * jit/JITStubCall.h:
16565        (JSC::JITStubCall::addArgument):
16566        * jsc.cpp:
16567
165682009-05-12  Geoffrey Garen  <ggaren@apple.com>
16569
16570        Reviewed by Sam Weinig.
16571
16572        Added work-around for XCode debugging echo problem.
16573
16574        * jsc.cpp:
16575        (runInteractive):
16576
165772009-05-12  Geoffrey Garen  <ggaren@apple.com>
16578
16579        Reviewed by Sam Weinig.
16580
16581        Added overflow handling to op_add.
16582
16583        * jit/JIT.h:
16584        * jit/JITArithmetic.cpp:
16585        (JSC::JIT::emitSlow_op_add):
16586        (JSC::JIT::emitSlowAdd32InPlace):
16587
165882009-05-12  Sam Weinig  <sam@webkit.org>
16589
16590        Reviewed by Geoffrey Garen.
16591
16592        Add slow cases for op_jnless or emit_op_jnlesseq.
16593
16594        * jit/JITArithmetic.cpp:
16595        (JSC::JIT::emitSlow_op_jnless):
16596        (JSC::JIT::emitSlow_op_jnlesseq):
16597
165982009-05-12  Sam Weinig  <sam@webkit.org>
16599
16600        Reviewed by Geoffrey Garen.
16601
16602        Add implementations for op_jnless, emit_op_jnlesseq, op_loop_if_less and op_loop_if_lesseq.
16603        No slow cases for op_jnless or emit_op_jnlesseq yet.
16604
16605        * jit/JITArithmetic.cpp:
16606        (JSC::JIT::emit_op_jnless):
16607        (JSC::JIT::emitSlow_op_jnless):
16608        (JSC::JIT::emit_op_jnlesseq):
16609        (JSC::JIT::emitSlow_op_jnlesseq):
16610        * jit/JITOpcodes.cpp:
16611        (JSC::JIT::emit_op_loop_if_less):
16612        (JSC::JIT::emitSlow_op_loop_if_less):
16613        (JSC::JIT::emit_op_loop_if_lesseq):
16614        (JSC::JIT::emitSlow_op_loop_if_lesseq):
16615
166162009-05-12  Sam Weinig  <sam@webkit.org>
16617
16618        Reviewed by Geoffrey Garen.
16619
16620        Turn the RECORD_JUMP_TARGET macro into an inline function.
16621
16622        * jit/JIT.h:
16623        * jit/JITInlineMethods.h:
16624        (JSC::JIT::recordJumpTarget):
16625        * jit/JITOpcodes.cpp:
16626        (JSC::JIT::emit_op_jmp):
16627        (JSC::JIT::emit_op_jsr):
16628        (JSC::JIT::emit_op_jmp_scopes):
16629
166302009-05-12  Sam Weinig  <sam@webkit.org>
16631
16632        Add MacroAssemblerX86Common::set8 to fix the build.
16633
16634        * assembler/MacroAssemblerX86Common.h:
16635        (JSC::MacroAssemblerX86Common::set8):
16636
166372009-05-12  Geoffrey Garen  <ggaren@apple.com>
16638
16639        Reviewed by Sam Weinig.
16640
16641        Added overflow recovery for pre_inc and pre_dec.
16642
16643        Turned some short-circuit code into early returns, as is the WebKit style.
16644
16645        * jit/JITArithmetic.cpp:
16646        (JSC::JIT::emit_op_post_inc):
16647        (JSC::JIT::emitSlow_op_post_inc):
16648        (JSC::JIT::emit_op_post_dec):
16649        (JSC::JIT::emitSlow_op_post_dec):
16650        (JSC::JIT::emitSlow_op_pre_inc):
16651        (JSC::JIT::emitSlow_op_pre_dec):
16652
166532009-05-12  Sam Weinig  <sam@webkit.org>
16654
16655        Reviewed by Geoffrey Garen.
16656
16657        Implement op_jmp, op_loop, op_eq and op_neq.
16658
16659        * jit/JITOpcodes.cpp:
16660        (JSC::JIT::emit_op_jmp):
16661        (JSC::JIT::emit_op_loop):
16662        (JSC::JIT::emit_op_eq):
16663        (JSC::JIT::emitSlow_op_eq):
16664        (JSC::JIT::emit_op_neq):
16665        (JSC::JIT::emitSlow_op_neq):
16666        (JSC::JIT::emit_op_enter):
16667        (JSC::JIT::emit_op_enter_with_activation):
16668
166692009-05-12  Sam Weinig  <sam@webkit.org>
16670
16671        Reviewed by Geoffrey Garen.
16672
16673        Implement the slow cases for arithmetic opcodes.
16674
16675        * jit/JITArithmetic.cpp:
16676        (JSC::JIT::emitSlow_op_lshift):
16677        (JSC::JIT::emitSlow_op_rshift):
16678        (JSC::JIT::emitSlow_op_bitand):
16679        (JSC::JIT::emitSlow_op_bitor):
16680        (JSC::JIT::emitSlow_op_bitxor):
16681        (JSC::JIT::emitSlow_op_bitnot):
16682        (JSC::JIT::emitSlow_op_sub):
16683        (JSC::JIT::emitSlow_op_mul):
16684        (JSC::JIT::emitSlow_op_mod):
16685        (JSC::JIT::emit_op_mod):
16686
166872009-05-12  Sam Weinig  <sam@webkit.org>
16688
16689        Reviewed by Geoffrey Garen.
16690
16691        Implement op_bitnot.
16692
16693        * assembler/MacroAssemblerX86Common.h:
16694        (JSC::MacroAssemblerX86Common::not32):
16695        * assembler/X86Assembler.h:
16696        (JSC::X86Assembler::notl_m):
16697        * jit/JITArithmetic.cpp:
16698        (JSC::JIT::emit_op_bitnot):
16699
167002009-05-12  Sam Weinig  <sam@webkit.org>
16701
16702        Reviewed by Geoffrey Garen.
16703
16704        Add arithmetic opcode implementations from the old nitro-extreme branch.
16705
16706        * jit/JIT.h:
16707        * jit/JITArithmetic.cpp:
16708        (JSC::JIT::emit_op_jnless):
16709        (JSC::JIT::emitSlow_op_jnless):
16710        (JSC::JIT::emit_op_jnlesseq):
16711        (JSC::JIT::emitSlow_op_jnlesseq):
16712        (JSC::JIT::emit_op_lshift):
16713        (JSC::JIT::emitSlow_op_lshift):
16714        (JSC::JIT::emit_op_rshift):
16715        (JSC::JIT::emitSlow_op_rshift):
16716        (JSC::JIT::emit_op_bitand):
16717        (JSC::JIT::emitBitAnd32Constant):
16718        (JSC::JIT::emitBitAnd32InPlace):
16719        (JSC::JIT::emit_op_bitor):
16720        (JSC::JIT::emitSlow_op_bitor):
16721        (JSC::JIT::emitBitOr32Constant):
16722        (JSC::JIT::emitBitOr32InPlace):
16723        (JSC::JIT::emit_op_bitxor):
16724        (JSC::JIT::emitSlow_op_bitxor):
16725        (JSC::JIT::emitBitXor32Constant):
16726        (JSC::JIT::emitBitXor32InPlace):
16727        (JSC::JIT::emit_op_bitnot):
16728        (JSC::JIT::emitSlow_op_bitnot):
16729        (JSC::JIT::emit_op_post_inc):
16730        (JSC::JIT::emitSlow_op_post_inc):
16731        (JSC::JIT::emit_op_post_dec):
16732        (JSC::JIT::emitSlow_op_post_dec):
16733        (JSC::JIT::emit_op_pre_inc):
16734        (JSC::JIT::emitSlow_op_pre_inc):
16735        (JSC::JIT::emit_op_pre_dec):
16736        (JSC::JIT::emitSlow_op_pre_dec):
16737        (JSC::JIT::emit_op_add):
16738        (JSC::JIT::emitAdd32Constant):
16739        (JSC::JIT::emitAdd32InPlace):
16740        (JSC::JIT::emitSlow_op_add):
16741        (JSC::JIT::emit_op_sub):
16742        (JSC::JIT::emitSlow_op_sub):
16743        (JSC::JIT::emitSub32ConstantLeft):
16744        (JSC::JIT::emitSub32ConstantRight):
16745        (JSC::JIT::emitSub32InPlaceLeft):
16746        (JSC::JIT::emitSub32InPlaceRight):
16747        (JSC::JIT::emit_op_mul):
16748        (JSC::JIT::emitSlow_op_mul):
16749        (JSC::JIT::emitMul32Constant):
16750        (JSC::JIT::emitMul32InPlace):
16751        (JSC::JIT::emit_op_mod):
16752        (JSC::JIT::emitSlow_op_mod):
16753        * jit/JITOpcodes.cpp:
16754
167552009-05-12  Geoffrey Garen  <ggaren@apple.com>
16756
16757        Removed JIT_OPTIMIZE_ARITHMETIC setting, since it was all about 32bit
16758        value representations.
16759
16760        Added JSAPIValueWrapper to the repository.
16761
16762        * jit/JIT.h:
16763        * jit/JITArithmetic.cpp:
16764        * runtime/JSAPIValueWrapper.cpp: Added.
16765        (JSC::JSAPIValueWrapper::toPrimitive):
16766        (JSC::JSAPIValueWrapper::getPrimitiveNumber):
16767        (JSC::JSAPIValueWrapper::toBoolean):
16768        (JSC::JSAPIValueWrapper::toNumber):
16769        (JSC::JSAPIValueWrapper::toString):
16770        (JSC::JSAPIValueWrapper::toObject):
16771        * runtime/JSAPIValueWrapper.h: Added.
16772        (JSC::JSAPIValueWrapper::value):
16773        (JSC::JSAPIValueWrapper::isAPIValueWrapper):
16774        (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
16775        (JSC::jsAPIValueWrapper):
16776        * wtf/Platform.h:
16777
167782009-05-12  Geoffrey Garen  <ggaren@apple.com>
16779
16780        Turned on the JIT and got it building and running the most trivial of
16781        programs.
16782
16783        All configurable optimizations are turned off, and a few opcodes are ad
16784        hoc #if'd out.
16785
16786        So far, I've only merged op_mov and op_end, but some stub-reliant
16787        opcodes work as-is from TOT.
16788
16789        * bytecode/CodeBlock.cpp:
16790        (JSC::CodeBlock::~CodeBlock):
16791        * bytecode/CodeBlock.h:
16792        * jit/JIT.cpp:
16793        (JSC::JIT::compileOpStrictEq):
16794        * jit/JIT.h:
16795        * jit/JITArithmetic.cpp:
16796        (JSC::JIT::emit_op_lshift):
16797        (JSC::JIT::emitSlow_op_lshift):
16798        (JSC::JIT::emit_op_rshift):
16799        (JSC::JIT::emitSlow_op_rshift):
16800        (JSC::JIT::emit_op_jnless):
16801        (JSC::JIT::emitSlow_op_jnless):
16802        (JSC::JIT::emit_op_jnlesseq):
16803        (JSC::JIT::emitSlow_op_jnlesseq):
16804        (JSC::JIT::emit_op_bitand):
16805        (JSC::JIT::emitSlow_op_bitand):
16806        (JSC::JIT::emit_op_post_inc):
16807        (JSC::JIT::emitSlow_op_post_inc):
16808        (JSC::JIT::emit_op_post_dec):
16809        (JSC::JIT::emitSlow_op_post_dec):
16810        (JSC::JIT::emit_op_pre_inc):
16811        (JSC::JIT::emitSlow_op_pre_inc):
16812        (JSC::JIT::emit_op_pre_dec):
16813        (JSC::JIT::emitSlow_op_pre_dec):
16814        (JSC::JIT::emit_op_mod):
16815        (JSC::JIT::emitSlow_op_mod):
16816        (JSC::JIT::emit_op_add):
16817        (JSC::JIT::emit_op_mul):
16818        (JSC::JIT::emit_op_sub):
16819        (JSC::JIT::compileBinaryArithOpSlowCase):
16820        (JSC::JIT::emitSlow_op_add):
16821        (JSC::JIT::emitSlow_op_mul):
16822        * jit/JITCall.cpp:
16823        (JSC::JIT::compileOpCallInitializeCallFrame):
16824        (JSC::JIT::compileOpConstructSetupArgs):
16825        (JSC::JIT::compileOpCallVarargs):
16826        (JSC::JIT::compileOpCall):
16827        (JSC::JIT::compileOpCallSlowCase):
16828        * jit/JITInlineMethods.h:
16829        (JSC::JIT::getConstantOperandImmediateInt):
16830        (JSC::JIT::isOperandConstantImmediateInt):
16831        (JSC::JIT::emitInitRegister):
16832        (JSC::JIT::addSlowCase):
16833        (JSC::JIT::addJump):
16834        (JSC::JIT::emitJumpSlowToHot):
16835        (JSC::JIT::tagFor):
16836        (JSC::JIT::payloadFor):
16837        (JSC::JIT::emitLoad):
16838        (JSC::JIT::emitLoadReturnValue):
16839        (JSC::JIT::emitStore):
16840        (JSC::JIT::emitStoreReturnValue):
16841        * jit/JITOpcodes.cpp:
16842        (JSC::JIT::emit_op_mov):
16843        (JSC::JIT::emit_op_end):
16844        (JSC::JIT::emit_op_jmp):
16845        (JSC::JIT::emit_op_loop):
16846        (JSC::JIT::emit_op_loop_if_less):
16847        (JSC::JIT::emit_op_loop_if_lesseq):
16848        (JSC::JIT::emit_op_instanceof):
16849        (JSC::JIT::emit_op_get_global_var):
16850        (JSC::JIT::emit_op_put_global_var):
16851        (JSC::JIT::emit_op_get_scoped_var):
16852        (JSC::JIT::emit_op_put_scoped_var):
16853        (JSC::JIT::emit_op_tear_off_activation):
16854        (JSC::JIT::emit_op_ret):
16855        (JSC::JIT::emit_op_construct_verify):
16856        (JSC::JIT::emit_op_to_primitive):
16857        (JSC::JIT::emit_op_loop_if_true):
16858        (JSC::JIT::emit_op_resolve_global):
16859        (JSC::JIT::emit_op_not):
16860        (JSC::JIT::emit_op_jfalse):
16861        (JSC::JIT::emit_op_jeq_null):
16862        (JSC::JIT::emit_op_jneq_null):
16863        (JSC::JIT::emit_op_jneq_ptr):
16864        (JSC::JIT::emit_op_unexpected_load):
16865        (JSC::JIT::emit_op_eq):
16866        (JSC::JIT::emit_op_bitnot):
16867        (JSC::JIT::emit_op_jtrue):
16868        (JSC::JIT::emit_op_neq):
16869        (JSC::JIT::emit_op_bitxor):
16870        (JSC::JIT::emit_op_bitor):
16871        (JSC::JIT::emit_op_throw):
16872        (JSC::JIT::emit_op_next_pname):
16873        (JSC::JIT::emit_op_push_scope):
16874        (JSC::JIT::emit_op_to_jsnumber):
16875        (JSC::JIT::emit_op_push_new_scope):
16876        (JSC::JIT::emit_op_catch):
16877        (JSC::JIT::emit_op_switch_imm):
16878        (JSC::JIT::emit_op_switch_char):
16879        (JSC::JIT::emit_op_switch_string):
16880        (JSC::JIT::emit_op_new_error):
16881        (JSC::JIT::emit_op_eq_null):
16882        (JSC::JIT::emit_op_neq_null):
16883        (JSC::JIT::emit_op_convert_this):
16884        (JSC::JIT::emit_op_profile_will_call):
16885        (JSC::JIT::emit_op_profile_did_call):
16886        (JSC::JIT::emitSlow_op_construct_verify):
16887        (JSC::JIT::emitSlow_op_get_by_val):
16888        (JSC::JIT::emitSlow_op_loop_if_less):
16889        (JSC::JIT::emitSlow_op_loop_if_lesseq):
16890        (JSC::JIT::emitSlow_op_put_by_val):
16891        (JSC::JIT::emitSlow_op_not):
16892        (JSC::JIT::emitSlow_op_instanceof):
16893        * jit/JITPropertyAccess.cpp:
16894        (JSC::JIT::emit_op_get_by_val):
16895        (JSC::JIT::emit_op_put_by_val):
16896        (JSC::JIT::emit_op_put_by_index):
16897        (JSC::JIT::emit_op_put_getter):
16898        (JSC::JIT::emit_op_put_setter):
16899        (JSC::JIT::emit_op_del_by_id):
16900        (JSC::JIT::compileGetByIdHotPath):
16901        (JSC::JIT::compilePutByIdHotPath):
16902        * jit/JITStubCall.h:
16903        (JSC::JITStubCall::JITStubCall):
16904        (JSC::JITStubCall::addArgument):
16905        (JSC::JITStubCall::call):
16906        (JSC::JITStubCall::):
16907        (JSC::CallEvalJITStub::CallEvalJITStub):
16908        * jit/JITStubs.cpp:
16909        (JSC::):
16910        (JSC::JITStubs::cti_op_add):
16911        (JSC::JITStubs::cti_op_pre_inc):
16912        (JSC::JITStubs::cti_op_mul):
16913        (JSC::JITStubs::cti_op_get_by_val):
16914        (JSC::JITStubs::cti_op_get_by_val_string):
16915        (JSC::JITStubs::cti_op_get_by_val_byte_array):
16916        (JSC::JITStubs::cti_op_sub):
16917        (JSC::JITStubs::cti_op_put_by_val):
16918        (JSC::JITStubs::cti_op_put_by_val_array):
16919        (JSC::JITStubs::cti_op_put_by_val_byte_array):
16920        (JSC::JITStubs::cti_op_negate):
16921        (JSC::JITStubs::cti_op_div):
16922        (JSC::JITStubs::cti_op_pre_dec):
16923        (JSC::JITStubs::cti_op_post_inc):
16924        (JSC::JITStubs::cti_op_eq):
16925        (JSC::JITStubs::cti_op_lshift):
16926        (JSC::JITStubs::cti_op_bitand):
16927        (JSC::JITStubs::cti_op_rshift):
16928        (JSC::JITStubs::cti_op_bitnot):
16929        (JSC::JITStubs::cti_op_mod):
16930        (JSC::JITStubs::cti_op_neq):
16931        (JSC::JITStubs::cti_op_post_dec):
16932        (JSC::JITStubs::cti_op_urshift):
16933        (JSC::JITStubs::cti_op_bitxor):
16934        (JSC::JITStubs::cti_op_bitor):
16935        (JSC::JITStubs::cti_op_switch_imm):
16936        * jit/JITStubs.h:
16937        * runtime/JSArray.cpp:
16938        (JSC::JSArray::JSArray):
16939        * runtime/JSFunction.cpp:
16940        (JSC::JSFunction::~JSFunction):
16941        * runtime/JSValue.h:
16942        (JSC::JSValue::payload):
16943        * wtf/Platform.h:
16944
169452009-05-07  Sam Weinig  <sam@webkit.org>
16946
16947        Reviewed by Geoffrey Garen.
16948
16949        Add some new MacroAssembler and assembler functions that will be needed shortly.
16950
16951        * assembler/MacroAssemblerX86Common.h:
16952        (JSC::MacroAssemblerX86Common::add32):
16953        (JSC::MacroAssemblerX86Common::and32):
16954        (JSC::MacroAssemblerX86Common::mul32):
16955        (JSC::MacroAssemblerX86Common::neg32):
16956        (JSC::MacroAssemblerX86Common::or32):
16957        (JSC::MacroAssemblerX86Common::sub32):
16958        (JSC::MacroAssemblerX86Common::xor32):
16959        (JSC::MacroAssemblerX86Common::branchAdd32):
16960        (JSC::MacroAssemblerX86Common::branchMul32):
16961        (JSC::MacroAssemblerX86Common::branchSub32):
16962        * assembler/X86Assembler.h:
16963        (JSC::X86Assembler::):
16964        (JSC::X86Assembler::addl_rm):
16965        (JSC::X86Assembler::andl_mr):
16966        (JSC::X86Assembler::andl_rm):
16967        (JSC::X86Assembler::andl_im):
16968        (JSC::X86Assembler::negl_r):
16969        (JSC::X86Assembler::notl_r):
16970        (JSC::X86Assembler::orl_rm):
16971        (JSC::X86Assembler::orl_im):
16972        (JSC::X86Assembler::subl_rm):
16973        (JSC::X86Assembler::xorl_mr):
16974        (JSC::X86Assembler::xorl_rm):
16975        (JSC::X86Assembler::xorl_im):
16976        (JSC::X86Assembler::imull_mr):
16977
169782009-05-11  Sam Weinig  <sam@webkit.org>
16979
16980        Reviewed by Cameron Zwarich.
16981
16982        Remove the NumberHeap.
16983
16984        * JavaScriptCore.exp:
16985        * runtime/Collector.cpp:
16986        (JSC::Heap::Heap):
16987        (JSC::Heap::destroy):
16988        (JSC::Heap::recordExtraCost):
16989        (JSC::Heap::heapAllocate):
16990        (JSC::Heap::markConservatively):
16991        (JSC::Heap::sweep):
16992        (JSC::Heap::collect):
16993        (JSC::Heap::objectCount):
16994        (JSC::Heap::statistics):
16995        (JSC::typeName):
16996        (JSC::Heap::isBusy):
16997        * runtime/Collector.h:
16998        (JSC::Heap::globalData):
16999        * runtime/JSCell.h:
17000
170012009-05-11  Geoffrey Garen  <ggaren@apple.com>
17002
17003        Reviewed by Sam Weinig.
17004
17005        Land initial commit of new number representation for 32 bit platforms,
17006        with JIT disabled.
17007
17008        * API/APICast.h:
17009        (toJS):
17010        (toRef):
17011        * API/JSCallbackObjectFunctions.h:
17012        (JSC::::hasInstance):
17013        (JSC::::toNumber):
17014        (JSC::::toString):
17015        * API/tests/testapi.c:
17016        (EvilExceptionObject_convertToType):
17017        * AllInOneFile.cpp:
17018        * JavaScriptCore.exp:
17019        * JavaScriptCore.xcodeproj/project.pbxproj:
17020        * bytecode/CodeBlock.cpp:
17021        (JSC::valueToSourceString):
17022        * bytecompiler/BytecodeGenerator.cpp:
17023        (JSC::BytecodeGenerator::emitLoad):
17024        (JSC::BytecodeGenerator::emitUnexpectedLoad):
17025        (JSC::keyForImmediateSwitch):
17026        * bytecompiler/BytecodeGenerator.h:
17027        * interpreter/Interpreter.cpp:
17028        (JSC::Interpreter::dumpRegisters):
17029        (JSC::Interpreter::privateExecute):
17030        * parser/Nodes.cpp:
17031        (JSC::ArrayNode::emitBytecode):
17032        (JSC::processClauseList):
17033        * runtime/ArgList.h:
17034        * runtime/Collector.h:
17035        (JSC::sizeof):
17036        * runtime/DateMath.cpp:
17037        * runtime/ExceptionHelpers.h:
17038        * runtime/InitializeThreading.cpp:
17039        * runtime/JSArray.cpp:
17040        (JSC::JSArray::JSArray):
17041        * runtime/JSCell.cpp:
17042        * runtime/JSCell.h:
17043        (JSC::JSCell::isAPIValueWrapper):
17044        (JSC::JSValue::isString):
17045        (JSC::JSValue::isGetterSetter):
17046        (JSC::JSValue::isObject):
17047        (JSC::JSValue::getString):
17048        (JSC::JSValue::getObject):
17049        (JSC::JSValue::getCallData):
17050        (JSC::JSValue::getConstructData):
17051        (JSC::JSValue::getUInt32):
17052        (JSC::JSValue::marked):
17053        (JSC::JSValue::toPrimitive):
17054        (JSC::JSValue::getPrimitiveNumber):
17055        (JSC::JSValue::toBoolean):
17056        (JSC::JSValue::toNumber):
17057        (JSC::JSValue::toString):
17058        (JSC::JSValue::needsThisConversion):
17059        (JSC::JSValue::toThisString):
17060        (JSC::JSValue::getJSNumber):
17061        (JSC::JSValue::toObject):
17062        (JSC::JSValue::toThisObject):
17063        * runtime/JSGlobalData.cpp:
17064        (JSC::JSGlobalData::JSGlobalData):
17065        * runtime/JSGlobalData.h:
17066        * runtime/JSGlobalObject.h:
17067        (JSC::Structure::prototypeForLookup):
17068        * runtime/JSGlobalObjectFunctions.cpp:
17069        (JSC::globalFuncParseInt):
17070        * runtime/JSImmediate.h:
17071        * runtime/JSNumberCell.cpp: Removed.
17072        * runtime/JSNumberCell.h: Removed.
17073        * runtime/JSObject.h:
17074        (JSC::JSValue::get):
17075        (JSC::JSValue::put):
17076        * runtime/JSString.h:
17077        (JSC::JSValue::toThisJSString):
17078        * runtime/JSValue.cpp:
17079        (JSC::JSValue::toInteger):
17080        (JSC::JSValue::toIntegerPreserveNaN):
17081        (JSC::JSValue::toObjectSlowCase):
17082        (JSC::JSValue::toThisObjectSlowCase):
17083        (JSC::JSValue::synthesizeObject):
17084        (JSC::JSValue::synthesizePrototype):
17085        (JSC::JSValue::description):
17086        (JSC::nonInlineNaN):
17087        * runtime/JSValue.h:
17088        (JSC::JSValue::):
17089        (JSC::EncodedJSValueHashTraits::emptyValue):
17090        (JSC::jsNaN):
17091        (JSC::operator==):
17092        (JSC::operator!=):
17093        (JSC::toInt32):
17094        (JSC::toUInt32):
17095        (JSC::JSValue::encode):
17096        (JSC::JSValue::decode):
17097        (JSC::JSValue::JSValue):
17098        (JSC::JSValue::operator bool):
17099        (JSC::JSValue::operator==):
17100        (JSC::JSValue::operator!=):
17101        (JSC::JSValue::isUndefined):
17102        (JSC::JSValue::isNull):
17103        (JSC::JSValue::isUndefinedOrNull):
17104        (JSC::JSValue::isCell):
17105        (JSC::JSValue::isInt32):
17106        (JSC::JSValue::isUInt32):
17107        (JSC::JSValue::isDouble):
17108        (JSC::JSValue::isTrue):
17109        (JSC::JSValue::isFalse):
17110        (JSC::JSValue::tag):
17111        (JSC::JSValue::asInt32):
17112        (JSC::JSValue::asUInt32):
17113        (JSC::JSValue::asDouble):
17114        (JSC::JSValue::asCell):
17115        (JSC::JSValue::isNumber):
17116        (JSC::JSValue::isBoolean):
17117        (JSC::JSValue::getBoolean):
17118        (JSC::JSValue::uncheckedGetNumber):
17119        (JSC::JSValue::toJSNumber):
17120        (JSC::JSValue::getNumber):
17121        (JSC::JSValue::toInt32):
17122        (JSC::JSValue::toUInt32):
17123        * runtime/Operations.h:
17124        (JSC::JSValue::equal):
17125        (JSC::JSValue::equalSlowCaseInline):
17126        (JSC::JSValue::strictEqual):
17127        (JSC::JSValue::strictEqualSlowCaseInline):
17128        (JSC::jsLess):
17129        (JSC::jsLessEq):
17130        (JSC::jsAdd):
17131        * runtime/PropertySlot.h:
17132        * runtime/StringPrototype.cpp:
17133        (JSC::stringProtoFuncCharAt):
17134        (JSC::stringProtoFuncCharCodeAt):
17135        (JSC::stringProtoFuncIndexOf):
17136        * wtf/Platform.h:
17137
17138=== Start merge of nitro-extreme branch 2009-07-30 ===
17139
171402009-07-29  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
17141
17142        Reviewed by George Staikos.
17143
17144        Resolve class/struct mixup in forward declarations
17145        https://bugs.webkit.org/show_bug.cgi?id=27708
17146
17147        * API/JSClassRef.h:
17148        * bytecode/SamplingTool.h:
17149        * interpreter/Interpreter.h:
17150        * jit/JIT.h:
17151        * profiler/ProfileGenerator.h:
17152        * profiler/Profiler.h:
17153        * runtime/ClassInfo.h:
17154        * runtime/ExceptionHelpers.h:
17155        * runtime/JSByteArray.h:
17156        * runtime/JSCell.h:
17157        * runtime/JSFunction.h:
17158        * runtime/JSGlobalData.h:
17159        * runtime/JSObject.h:
17160        * runtime/JSString.h:
17161
171622009-07-28  Ada Chan  <adachan@apple.com>
17163
17164        Reviewed by Darin Adler.
17165
17166        https://bugs.webkit.org/show_bug.cgi?id=27236
17167        - Implement TCMalloc_SystemRelease and TCMalloc_SystemCommit for Windows.
17168        - Use a background thread to periodically scavenge memory to release back to the system.
17169
17170        * wtf/FastMalloc.cpp:
17171        (WTF::TCMalloc_PageHeap::init):
17172        (WTF::TCMalloc_PageHeap::runScavengerThread):
17173        (WTF::TCMalloc_PageHeap::scavenge):
17174        (WTF::TCMalloc_PageHeap::shouldContinueScavenging):
17175        (WTF::TCMalloc_PageHeap::New):
17176        (WTF::TCMalloc_PageHeap::AllocLarge):
17177        (WTF::TCMalloc_PageHeap::Delete):
17178        (WTF::TCMalloc_PageHeap::GrowHeap):
17179        (WTF::sleep):
17180        (WTF::TCMalloc_PageHeap::scavengerThread):
17181        * wtf/TCSystemAlloc.cpp:
17182        (TCMalloc_SystemRelease):
17183        (TCMalloc_SystemCommit):
17184        * wtf/TCSystemAlloc.h:
17185
171862009-07-28  Xan Lopez  <xlopez@igalia.com>
17187
17188        Add new files, fixes distcheck.
17189
17190        * GNUmakefile.am:
17191
171922009-07-28  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
17193
17194        Reviewed by Simon Hausmann.
17195
17196        [Qt] Determining whether to use JIT or interpreter
17197        moved from JavaScriptCore.pri to Platform.h
17198
17199        * JavaScriptCore.pri:
17200        * wtf/Platform.h:
17201
172022009-07-27  Brian Weinstein  <bweinstein@apple.com>
17203
17204        Fix of misuse of sort command.
17205
17206        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
17207        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
17208
172092009-07-27  Brian Weinstein  <bweinstein@apple.com>
17210
17211        Build fix for Windows.
17212
17213        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
17214        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
17215
172162009-07-27  Gavin Barraclough  <barraclough@apple.com>
17217
17218        Rubber stamped by Oliver Hunt.
17219
17220        Fix tyop in JIT, renamed preverveReturnAddressAfterCall -> preserveReturnAddressAfterCall.
17221
17222        * jit/JIT.cpp:
17223        (JSC::JIT::privateCompile):
17224        (JSC::JIT::privateCompileCTIMachineTrampolines):
17225        * jit/JIT.h:
17226        * jit/JITInlineMethods.h:
17227        (JSC::JIT::preserveReturnAddressAfterCall):
17228        * jit/JITPropertyAccess.cpp:
17229        (JSC::JIT::privateCompilePutByIdTransition):
17230
172312009-07-27  Alexey Proskuryakov  <ap@webkit.org>
17232
17233        Gtk build fix.
17234
17235        * runtime/JSLock.cpp: (JSC::JSLock::JSLock): Fix "no threading" case.
17236
172372009-07-27  Alexey Proskuryakov  <ap@webkit.org>
17238
17239        Release build fix.
17240
17241        * runtime/JSLock.h: (JSC::JSLock::~JSLock):
17242
172432009-07-27  Alexey Proskuryakov  <ap@webkit.org>
17244
17245        Reviewed by Darin Adler.
17246
17247        https://bugs.webkit.org/show_bug.cgi?id=27735
17248        Give a helpful name to JSLock constructor argument
17249
17250        * API/JSBase.cpp:
17251        (JSGarbageCollect):
17252        * API/JSContextRef.cpp:
17253        * API/JSObjectRef.cpp:
17254        (JSPropertyNameArrayRelease):
17255        (JSPropertyNameAccumulatorAddName):
17256        * JavaScriptCore.exp:
17257        * jsc.cpp:
17258        (functionGC):
17259        (cleanupGlobalData):
17260        (jscmain):
17261        * runtime/Collector.cpp:
17262        (JSC::Heap::destroy):
17263        * runtime/JSLock.cpp:
17264        (JSC::JSLock::JSLock):
17265        (JSC::JSLock::lock):
17266        (JSC::JSLock::unlock):
17267        (JSC::JSLock::DropAllLocks::DropAllLocks):
17268        (JSC::JSLock::DropAllLocks::~DropAllLocks):
17269        * runtime/JSLock.h:
17270        (JSC::):
17271        (JSC::JSLock::JSLock):
17272        (JSC::JSLock::~JSLock):
17273
172742009-07-25  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
17275
17276        Reviewed by Eric Seidel.
17277
17278        Allow custom memory allocation control for OpaqueJSPropertyNameArray struct
17279        https://bugs.webkit.org/show_bug.cgi?id=27342
17280
17281        Inherits OpaqueJSPropertyNameArray struct from FastAllocBase because it has been
17282        instantiated by 'new' JavaScriptCore/API/JSObjectRef.cpp:473.
17283
17284        * API/JSObjectRef.cpp:
17285
172862009-07-24  Ada Chan  <adachan@apple.com>
17287
17288        In preparation for https://bugs.webkit.org/show_bug.cgi?id=27236:
17289        Remove TCMALLOC_TRACK_DECOMMITED_SPANS.  We'll always track decommitted spans.
17290        We have tested this and show it has little impact on performance.
17291
17292        Reviewed by Mark Rowe.
17293
17294        * wtf/FastMalloc.cpp:
17295        (WTF::TCMalloc_PageHeap::New):
17296        (WTF::TCMalloc_PageHeap::AllocLarge):
17297        (WTF::propagateDecommittedState):
17298        (WTF::mergeDecommittedStates):
17299        (WTF::TCMalloc_PageHeap::Delete):
17300        (WTF::TCMalloc_PageHeap::IncrementalScavenge):
17301
173022009-07-24  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
17303
17304        Reviewed by Darin Adler and Adam Barth.
17305
17306        Build fix for x86 platforms.
17307        https://bugs.webkit.org/show_bug.cgi?id=27602
17308
17309        * jit/JIT.cpp:
17310
173112009-07-23  Kevin Ollivier  <kevino@theolliviers.com>
17312
17313        wx build fix, adding missing header.
17314
17315        * jit/JIT.cpp:
17316
173172009-07-22  Yong Li  <yong.li@torchmobile.com>
17318
17319        Reviewed by George Staikos.
17320
17321        Add wince specific memory files into wtf/wince
17322        https://bugs.webkit.org/show_bug.cgi?id=27550
17323
17324        * wtf/wince/FastMallocWince.h: Added.
17325        * wtf/wince/MemoryManager.cpp: Added.
17326        * wtf/wince/MemoryManager.h: Added.
17327
173282009-07-23  Norbert Leser  <norbert.leser@nokia.com>
17329
17330        Reviewed by Simon Hausmann.
17331
17332        Fix for missing mmap features in Symbian
17333        https://bugs.webkit.org/show_bug.cgi?id=24540
17334
17335        Fix, conditionally for PLATFORM(SYMBIAN), as an alternative
17336        to missing support for the MAP_ANON property flag in mmap.
17337        It utilizes Symbian specific memory allocation features.
17338
17339        * runtime/Collector.cpp
17340
173412009-07-22  Gavin Barraclough  <barraclough@apple.com>
17342
17343        Reviewed by Sam Weinig.
17344
17345        With ENABLE(ASSEMBLER_WX_EXCLUSIVE), only change permissions once per repatch event.
17346        ( https://bugs.webkit.org/show_bug.cgi?id=27564 )
17347
17348        Currently we change permissions forwards and backwards for each instruction modified,
17349        instead we should only change permissions once per complete repatching event.
17350
17351        2.5% progression running with ENABLE(ASSEMBLER_WX_EXCLUSIVE) enabled,
17352        which recoups 1/3 of the penalty of running with this mode enabled.
17353
17354        * assembler/ARMAssembler.cpp:
17355        (JSC::ARMAssembler::linkBranch):
17356            - Replace usage of MakeWritable with cacheFlush.
17357
17358        * assembler/ARMAssembler.h:
17359        (JSC::ARMAssembler::patchPointerInternal):
17360        (JSC::ARMAssembler::repatchLoadPtrToLEA):
17361            - Replace usage of MakeWritable with cacheFlush.
17362
17363        * assembler/ARMv7Assembler.h:
17364        (JSC::ARMv7Assembler::relinkJump):
17365        (JSC::ARMv7Assembler::relinkCall):
17366        (JSC::ARMv7Assembler::repatchInt32):
17367        (JSC::ARMv7Assembler::repatchPointer):
17368        (JSC::ARMv7Assembler::repatchLoadPtrToLEA):
17369        (JSC::ARMv7Assembler::setInt32):
17370            - Replace usage of MakeWritable with cacheFlush.
17371
17372        * assembler/LinkBuffer.h:
17373        (JSC::LinkBuffer::performFinalization):
17374            - Make explicit call to cacheFlush.
17375
17376        * assembler/MacroAssemblerCodeRef.h:
17377        (JSC::MacroAssemblerCodeRef::MacroAssemblerCodeRef):
17378            - Make size always available.
17379
17380        * assembler/RepatchBuffer.h:
17381        (JSC::RepatchBuffer::RepatchBuffer):
17382        (JSC::RepatchBuffer::~RepatchBuffer):
17383            - Add calls to MakeWritable & makeExecutable.
17384
17385        * assembler/X86Assembler.h:
17386        (JSC::X86Assembler::relinkJump):
17387        (JSC::X86Assembler::relinkCall):
17388        (JSC::X86Assembler::repatchInt32):
17389        (JSC::X86Assembler::repatchPointer):
17390        (JSC::X86Assembler::repatchLoadPtrToLEA):
17391            - Remove usage of MakeWritable.
17392
17393        * bytecode/CodeBlock.h:
17394        (JSC::CodeBlock::getJITCode):
17395            - Provide access to CodeBlock's JITCode.
17396
17397        * jit/ExecutableAllocator.h:
17398        (JSC::ExecutableAllocator::makeExecutable):
17399        (JSC::ExecutableAllocator::cacheFlush):
17400            - Remove MakeWritable, make cacheFlush public.
17401
17402        * jit/JIT.cpp:
17403        (JSC::ctiPatchNearCallByReturnAddress):
17404        (JSC::ctiPatchCallByReturnAddress):
17405        (JSC::JIT::privateCompile):
17406        (JSC::JIT::unlinkCall):
17407        (JSC::JIT::linkCall):
17408            - Add CodeBlock argument to RepatchBuffer.
17409
17410        * jit/JIT.h:
17411            - Pass CodeBlock argument for use by RepatchBuffer.
17412
17413        * jit/JITCode.h:
17414        (JSC::JITCode::start):
17415        (JSC::JITCode::size):
17416            - Provide access to code start & size.
17417
17418        * jit/JITPropertyAccess.cpp:
17419        (JSC::JIT::privateCompilePutByIdTransition):
17420        (JSC::JIT::patchGetByIdSelf):
17421        (JSC::JIT::patchMethodCallProto):
17422        (JSC::JIT::patchPutByIdReplace):
17423        (JSC::JIT::privateCompilePatchGetArrayLength):
17424        (JSC::JIT::privateCompileGetByIdProto):
17425        (JSC::JIT::privateCompileGetByIdSelfList):
17426        (JSC::JIT::privateCompileGetByIdProtoList):
17427        (JSC::JIT::privateCompileGetByIdChainList):
17428        (JSC::JIT::privateCompileGetByIdChain):
17429            - Add CodeBlock argument to RepatchBuffer.
17430
17431        * jit/JITStubs.cpp:
17432        (JSC::JITThunks::tryCachePutByID):
17433        (JSC::JITThunks::tryCacheGetByID):
17434        (JSC::JITStubs::DEFINE_STUB_FUNCTION):
17435            - Pass CodeBlock argument for use by RepatchBuffer.
17436
174372009-07-21  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
17438
17439        Reviewed by Gavin Barraclough.
17440
17441        Cache not only the structure of the method, but the
17442        structure of its prototype as well.
17443        https://bugs.webkit.org/show_bug.cgi?id=27077
17444
17445        * bytecode/CodeBlock.cpp:
17446        (JSC::CodeBlock::~CodeBlock):
17447        * bytecode/CodeBlock.h:
17448        (JSC::MethodCallLinkInfo::MethodCallLinkInfo):
17449        * jit/JITPropertyAccess.cpp:
17450        (JSC::JIT::patchMethodCallProto):
17451
174522009-07-21  Gavin Barraclough  <barraclough@apple.com>
17453
17454        Reviewed by Sam Weinig.
17455
17456        Move call linking / repatching down from AbstractMacroAssembler into MacroAssemblerARCH classes.
17457        ( https://bugs.webkit.org/show_bug.cgi?id=27527 )
17458
17459        This allows the implementation to be defined per architecture.  Specifically this addresses the
17460        fact that x86-64 MacroAssembler implements far calls as a load to register, followed by a call
17461        to register.  Patching the call actually requires the pointer load to be patched, rather than
17462        the call to be patched.  This is implementation detail specific to MacroAssemblerX86_64, and as
17463        such is best handled there.
17464
17465        * assembler/AbstractMacroAssembler.h:
17466        * assembler/MacroAssemblerARM.h:
17467        (JSC::MacroAssemblerARM::linkCall):
17468        (JSC::MacroAssemblerARM::repatchCall):
17469        * assembler/MacroAssemblerARMv7.h:
17470        (JSC::MacroAssemblerARMv7::linkCall):
17471        (JSC::MacroAssemblerARMv7::repatchCall):
17472        * assembler/MacroAssemblerX86.h:
17473        (JSC::MacroAssemblerX86::linkCall):
17474        (JSC::MacroAssemblerX86::repatchCall):
17475        * assembler/MacroAssemblerX86_64.h:
17476        (JSC::MacroAssemblerX86_64::linkCall):
17477        (JSC::MacroAssemblerX86_64::repatchCall):
17478
174792009-07-21  Adam Treat  <adam.treat@torchmobile.com>
17480
17481        Reviewed by George Staikos.
17482
17483        Every wtf file includes other wtf files with <> style includes
17484        except this one.  Fix the exception.
17485
17486        * wtf/ByteArray.h:
17487
174882009-07-21  Gavin Barraclough  <barraclough@apple.com>
17489
17490        Reviewed by Oliver Hunt.
17491
17492        Move LinkBuffer/RepatchBuffer out of AbstractMacroAssembler.
17493        ( https://bugs.webkit.org/show_bug.cgi?id=27485 )
17494
17495        This change is the first step in a process to move code that should be in
17496        the architecture-specific MacroAssembler classes up out of Assmbler and
17497        AbstractMacroAssembler.
17498
17499        * JavaScriptCore.xcodeproj/project.pbxproj:
17500            - added new files
17501
17502        * assembler/ARMAssembler.h:
17503        (JSC::ARMAssembler::linkPointer):
17504            - rename patchPointer to bring it in line with the current link/repatch naming scheme
17505
17506        * assembler/ARMv7Assembler.h:
17507        (JSC::ARMv7Assembler::linkCall):
17508        (JSC::ARMv7Assembler::linkPointer):
17509        (JSC::ARMv7Assembler::relinkCall):
17510        (JSC::ARMv7Assembler::repatchInt32):
17511        (JSC::ARMv7Assembler::repatchPointer):
17512        (JSC::ARMv7Assembler::setInt32):
17513        (JSC::ARMv7Assembler::setPointer):
17514            - rename patchPointer to bring it in line with the current link/repatch naming scheme
17515
17516        * assembler/AbstractMacroAssembler.h:
17517        (JSC::AbstractMacroAssembler::linkJump):
17518        (JSC::AbstractMacroAssembler::linkCall):
17519        (JSC::AbstractMacroAssembler::linkPointer):
17520        (JSC::AbstractMacroAssembler::getLinkerAddress):
17521        (JSC::AbstractMacroAssembler::getLinkerCallReturnOffset):
17522        (JSC::AbstractMacroAssembler::repatchJump):
17523        (JSC::AbstractMacroAssembler::repatchCall):
17524        (JSC::AbstractMacroAssembler::repatchNearCall):
17525        (JSC::AbstractMacroAssembler::repatchInt32):
17526        (JSC::AbstractMacroAssembler::repatchPointer):
17527        (JSC::AbstractMacroAssembler::repatchLoadPtrToLEA):
17528            - remove the LinkBuffer/RepatchBuffer classes, but leave a set of (private, friended) methods to interface to the Assembler
17529
17530        * assembler/LinkBuffer.h: Added.
17531        (JSC::LinkBuffer::LinkBuffer):
17532        (JSC::LinkBuffer::~LinkBuffer):
17533        (JSC::LinkBuffer::link):
17534        (JSC::LinkBuffer::patch):
17535        (JSC::LinkBuffer::locationOf):
17536        (JSC::LinkBuffer::locationOfNearCall):
17537        (JSC::LinkBuffer::returnAddressOffset):
17538        (JSC::LinkBuffer::finalizeCode):
17539        (JSC::LinkBuffer::finalizeCodeAddendum):
17540        (JSC::LinkBuffer::code):
17541        (JSC::LinkBuffer::performFinalization):
17542            - new file containing the LinkBuffer class, previously a member of AbstractMacroAssembler
17543
17544        * assembler/RepatchBuffer.h: Added.
17545        (JSC::RepatchBuffer::RepatchBuffer):
17546        (JSC::RepatchBuffer::relink):
17547        (JSC::RepatchBuffer::repatch):
17548        (JSC::RepatchBuffer::repatchLoadPtrToLEA):
17549        (JSC::RepatchBuffer::relinkCallerToTrampoline):
17550        (JSC::RepatchBuffer::relinkCallerToFunction):
17551        (JSC::RepatchBuffer::relinkNearCallerToTrampoline):
17552            - new file containing the RepatchBuffer class, previously a member of AbstractMacroAssembler
17553
17554        * assembler/X86Assembler.h:
17555        (JSC::X86Assembler::linkJump):
17556        (JSC::X86Assembler::linkCall):
17557        (JSC::X86Assembler::linkPointerForCall):
17558        (JSC::X86Assembler::linkPointer):
17559        (JSC::X86Assembler::relinkJump):
17560        (JSC::X86Assembler::relinkCall):
17561        (JSC::X86Assembler::repatchInt32):
17562        (JSC::X86Assembler::repatchPointer):
17563        (JSC::X86Assembler::setPointer):
17564        (JSC::X86Assembler::setInt32):
17565        (JSC::X86Assembler::setRel32):
17566            - rename patchPointer to bring it in line with the current link/repatch naming scheme
17567
17568        * jit/JIT.cpp:
17569        (JSC::ctiPatchNearCallByReturnAddress):
17570        (JSC::ctiPatchCallByReturnAddress):
17571            - include new headers
17572            - remove MacroAssembler:: specification from RepatchBuffer usage
17573
17574        * jit/JITPropertyAccess.cpp:
17575        * yarr/RegexJIT.cpp:
17576            - include new headers
17577
175782009-07-21  Robert Agoston  <Agoston.Robert@stud.u-szeged.hu>
17579
17580        Reviewed by David Levin.
17581
17582        Fixed #undef typo.
17583        https://bugs.webkit.org/show_bug.cgi?id=27506
17584
17585        * bytecode/Opcode.h:
17586
175872009-07-21  Adam Roben  <aroben@apple.com>
17588
17589        Roll out r46153, r46154, and r46155
17590
17591        These changes were causing build failures and assertion failures on
17592        Windows.
17593
17594        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
17595        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
17596        * JavaScriptCore.xcodeproj/project.pbxproj:
17597        * runtime/JSArray.cpp:
17598        * runtime/StringPrototype.cpp:
17599        * runtime/UString.cpp:
17600        * runtime/UString.h:
17601        * wtf/FastMalloc.cpp:
17602        * wtf/FastMalloc.h:
17603        * wtf/Platform.h:
17604        * wtf/PossiblyNull.h: Removed.
17605
176062009-07-21  Roland Steiner  <rolandsteiner@google.com>
17607
17608        Reviewed by David Levin.
17609
17610        Add ENABLE_RUBY to list of build options
17611        https://bugs.webkit.org/show_bug.cgi?id=27324
17612
17613        * Configurations/FeatureDefines.xcconfig: Added flag ENABLE_RUBY.
17614
176152009-07-20  Oliver Hunt  <oliver@apple.com>
17616
17617        Build fix attempt #2
17618
17619        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
17620        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
17621
176222009-07-20  Oliver Hunt  <oliver@apple.com>
17623
17624        Build fix attempt #1
17625
17626        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
17627        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
17628
176292009-07-20  Oliver Hunt  <oliver@apple.com>
17630
17631        Reviewed by Gavin Barraclough.
17632
17633        Make it harder to misuse try* allocation routines
17634        https://bugs.webkit.org/show_bug.cgi?id=27469
17635
17636        Jump through a few hoops to make it much harder to accidentally
17637        miss null-checking of values returned by the try-* allocation
17638        routines.
17639
17640        * JavaScriptCore.xcodeproj/project.pbxproj:
17641        * runtime/JSArray.cpp:
17642        (JSC::JSArray::putSlowCase):
17643        (JSC::JSArray::increaseVectorLength):
17644        * runtime/StringPrototype.cpp:
17645        (JSC::stringProtoFuncFontsize):
17646        (JSC::stringProtoFuncLink):
17647        * runtime/UString.cpp:
17648        (JSC::allocChars):
17649        (JSC::reallocChars):
17650        (JSC::expandCapacity):
17651        (JSC::UString::Rep::reserveCapacity):
17652        (JSC::UString::expandPreCapacity):
17653        (JSC::createRep):
17654        (JSC::concatenate):
17655        (JSC::UString::spliceSubstringsWithSeparators):
17656        (JSC::UString::replaceRange):
17657        (JSC::UString::append):
17658        (JSC::UString::operator=):
17659        * runtime/UString.h:
17660        (JSC::UString::Rep::createEmptyBuffer):
17661        * wtf/FastMalloc.cpp:
17662        (WTF::tryFastZeroedMalloc):
17663        (WTF::tryFastMalloc):
17664        (WTF::tryFastCalloc):
17665        (WTF::tryFastRealloc):
17666        (WTF::TCMallocStats::tryFastMalloc):
17667        (WTF::TCMallocStats::tryFastCalloc):
17668        (WTF::TCMallocStats::tryFastRealloc):
17669        * wtf/FastMalloc.h:
17670        (WTF::TryMallocReturnValue::TryMallocReturnValue):
17671        (WTF::TryMallocReturnValue::~TryMallocReturnValue):
17672        (WTF::TryMallocReturnValue::operator Maybe<T>):
17673        (WTF::TryMallocReturnValue::getValue):
17674        * wtf/PossiblyNull.h:
17675        (WTF::PossiblyNull::PossiblyNull):
17676        (WTF::PossiblyNull::~PossiblyNull):
17677        (WTF::PossiblyNull::getValue):
17678        * wtf/Platform.h:
17679
176802009-07-20  Gavin Barraclough  <barraclough@apple.com>
17681
17682        RS Oliver Hunt.
17683
17684        Add ARM assembler files to xcodeproj, for convenience editing.
17685
17686        * JavaScriptCore.xcodeproj/project.pbxproj:
17687
176882009-07-20  Jessie Berlin  <jberlin@apple.com>
17689
17690        Reviewed by David Levin.
17691
17692        Fix an incorrect assertion in Vector::remove.
17693
17694        https://bugs.webkit.org/show_bug.cgi?id=27477
17695
17696        * wtf/Vector.h:
17697        (WTF::::remove):
17698        Assert that the position at which to start removing elements + the
17699        length (the number of elements to remove) is less than or equal to the
17700        size of the entire Vector.
17701
177022009-07-20  Peter Kasting  <pkasting@google.com>
17703
17704        Reviewed by Mark Rowe.
17705
17706        https://bugs.webkit.org/show_bug.cgi?id=27468
17707        Back out r46060, which caused problems for some Apple developers.
17708
17709        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
17710        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
17711        * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
17712        * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
17713        * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
17714
177152009-07-20  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
17716
17717        Reviewed by Oliver Hunt.
17718
17719        Allow custom memory allocation control in NewThreadContext
17720        https://bugs.webkit.org/show_bug.cgi?id=27338
17721
17722        Inherits NewThreadContext struct from FastAllocBase because it
17723        has been instantiated by 'new' JavaScriptCore/wtf/Threading.cpp:76.
17724
17725        * wtf/Threading.cpp:
17726
177272009-07-20  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
17728
17729        Reviewed by Oliver Hunt.
17730
17731        Allow custom memory allocation control in JavaScriptCore's JSClassRef.h
17732        https://bugs.webkit.org/show_bug.cgi?id=27340
17733
17734        Inherit StaticValueEntry and StaticFunctionEntry struct from FastAllocBase because these
17735        have been instantiated by 'new' in JavaScriptCore/API/JSClassRef.cpp:153
17736        and in JavaScriptCore/API/JSClassRef.cpp:166.
17737
17738        * API/JSClassRef.h:
17739
177402009-07-20  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
17741
17742        Reviewed by Darin Adler.
17743
17744        Allow custom memory allocation control in JavaScriptCore's RegexPattern.h
17745        https://bugs.webkit.org/show_bug.cgi?id=27343
17746
17747        Inherits RegexPattern.h's structs (which have been instantiated by operator new) from FastAllocBase:
17748
17749        CharacterClass (new call: JavaScriptCore/yarr/RegexCompiler.cpp:144)
17750        PatternAlternative (new call: JavaScriptCore/yarr/RegexPattern.h:221)
17751        PatternDisjunction (new call: JavaScriptCore/yarr/RegexCompiler.cpp:446)
17752
17753        * yarr/RegexPattern.h:
17754
177552009-07-20  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
17756
17757        Reviewed by Darin Adler.
17758
17759        Allow custom memory allocation control for JavaScriptCore's MatchFrame struct
17760        https://bugs.webkit.org/show_bug.cgi?id=27344
17761
17762        Inherits MatchFrame struct from FastAllocBase because it has
17763        been instantiated by 'new' JavaScriptCore/pcre/pcre_exec.cpp:359.
17764
17765        * pcre/pcre_exec.cpp:
17766
177672009-07-20  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
17768
17769        Reviewed by Holger Freyther.
17770
17771        Remove some outdated S60 platform specific code
17772        https://bugs.webkit.org/show_bug.cgi?id=27423
17773
17774        * wtf/Platform.h:
17775
177762009-07-20  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
17777
17778        Reviewed by Simon Hausmann.
17779
17780        Qt build fix with MSVC and MinGW.
17781
17782        * jsc.pro: Make sure jsc is a console application, and turn off
17783        exceptions and stl support to fix the build.
17784
177852009-07-20  Xan Lopez  <xlopez@igalia.com>
17786
17787        Reviewed by Gustavo Noronha.
17788
17789        Do not use C++-style comments in preprocessor directives.
17790
17791        GCC does not like this in some configurations, using C-style
17792        comments is safer.
17793
17794        * wtf/Platform.h:
17795
177962009-07-17  Peter Kasting  <pkasting@google.com>
17797
17798        Reviewed by Steve Falkenburg.
17799
17800        https://bugs.webkit.org/show_bug.cgi?id=27323
17801        Only add Cygwin to the path when it isn't already there.  This avoids
17802        causing problems for people who purposefully have non-Cygwin versions of
17803        executables like svn in front of the Cygwin ones in their paths.
17804
17805        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
17806        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
17807        * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
17808        * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
17809        * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
17810
178112009-07-17  Gabor Loki  <loki@inf.u-szeged.hu>
17812
17813        Reviewed by Gavin Barraclough.
17814
17815        Add YARR support for generic ARM platforms (disabled by default).
17816        https://bugs.webkit.org/show_bug.cgi?id=24986
17817
17818        Add generic ARM port for MacroAssembler. It supports the whole
17819        MacroAssembler functionality except floating point.
17820
17821        The class JmpSrc is extended with a flag which enables to patch
17822        the jump destination offset during execution. This feature is
17823        required for generic ARM port.
17824
17825        Signed off by Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
17826        Signed off by Gabor Loki <loki@inf.u-szeged.hu>
17827
17828        * JavaScriptCore.pri:
17829        * assembler/ARMAssembler.cpp: Added.
17830        (JSC::ARMAssembler::getLdrImmAddress):
17831        (JSC::ARMAssembler::linkBranch):
17832        (JSC::ARMAssembler::patchConstantPoolLoad):
17833        (JSC::ARMAssembler::getOp2):
17834        (JSC::ARMAssembler::genInt):
17835        (JSC::ARMAssembler::getImm):
17836        (JSC::ARMAssembler::moveImm):
17837        (JSC::ARMAssembler::dataTransfer32):
17838        (JSC::ARMAssembler::baseIndexTransfer32):
17839        (JSC::ARMAssembler::executableCopy):
17840        * assembler/ARMAssembler.h: Added.
17841        (JSC::ARM::):
17842        (JSC::ARMAssembler::ARMAssembler):
17843        (JSC::ARMAssembler::):
17844        (JSC::ARMAssembler::JmpSrc::JmpSrc):
17845        (JSC::ARMAssembler::JmpSrc::enableLatePatch):
17846        (JSC::ARMAssembler::JmpDst::JmpDst):
17847        (JSC::ARMAssembler::JmpDst::isUsed):
17848        (JSC::ARMAssembler::JmpDst::used):
17849        (JSC::ARMAssembler::emitInst):
17850        (JSC::ARMAssembler::and_r):
17851        (JSC::ARMAssembler::ands_r):
17852        (JSC::ARMAssembler::eor_r):
17853        (JSC::ARMAssembler::eors_r):
17854        (JSC::ARMAssembler::sub_r):
17855        (JSC::ARMAssembler::subs_r):
17856        (JSC::ARMAssembler::rsb_r):
17857        (JSC::ARMAssembler::rsbs_r):
17858        (JSC::ARMAssembler::add_r):
17859        (JSC::ARMAssembler::adds_r):
17860        (JSC::ARMAssembler::adc_r):
17861        (JSC::ARMAssembler::adcs_r):
17862        (JSC::ARMAssembler::sbc_r):
17863        (JSC::ARMAssembler::sbcs_r):
17864        (JSC::ARMAssembler::rsc_r):
17865        (JSC::ARMAssembler::rscs_r):
17866        (JSC::ARMAssembler::tst_r):
17867        (JSC::ARMAssembler::teq_r):
17868        (JSC::ARMAssembler::cmp_r):
17869        (JSC::ARMAssembler::orr_r):
17870        (JSC::ARMAssembler::orrs_r):
17871        (JSC::ARMAssembler::mov_r):
17872        (JSC::ARMAssembler::movs_r):
17873        (JSC::ARMAssembler::bic_r):
17874        (JSC::ARMAssembler::bics_r):
17875        (JSC::ARMAssembler::mvn_r):
17876        (JSC::ARMAssembler::mvns_r):
17877        (JSC::ARMAssembler::mul_r):
17878        (JSC::ARMAssembler::muls_r):
17879        (JSC::ARMAssembler::mull_r):
17880        (JSC::ARMAssembler::ldr_imm):
17881        (JSC::ARMAssembler::ldr_un_imm):
17882        (JSC::ARMAssembler::dtr_u):
17883        (JSC::ARMAssembler::dtr_ur):
17884        (JSC::ARMAssembler::dtr_d):
17885        (JSC::ARMAssembler::dtr_dr):
17886        (JSC::ARMAssembler::ldrh_r):
17887        (JSC::ARMAssembler::ldrh_d):
17888        (JSC::ARMAssembler::ldrh_u):
17889        (JSC::ARMAssembler::strh_r):
17890        (JSC::ARMAssembler::push_r):
17891        (JSC::ARMAssembler::pop_r):
17892        (JSC::ARMAssembler::poke_r):
17893        (JSC::ARMAssembler::peek_r):
17894        (JSC::ARMAssembler::clz_r):
17895        (JSC::ARMAssembler::bkpt):
17896        (JSC::ARMAssembler::lsl):
17897        (JSC::ARMAssembler::lsr):
17898        (JSC::ARMAssembler::asr):
17899        (JSC::ARMAssembler::lsl_r):
17900        (JSC::ARMAssembler::lsr_r):
17901        (JSC::ARMAssembler::asr_r):
17902        (JSC::ARMAssembler::size):
17903        (JSC::ARMAssembler::ensureSpace):
17904        (JSC::ARMAssembler::label):
17905        (JSC::ARMAssembler::align):
17906        (JSC::ARMAssembler::jmp):
17907        (JSC::ARMAssembler::patchPointerInternal):
17908        (JSC::ARMAssembler::patchConstantPoolLoad):
17909        (JSC::ARMAssembler::patchPointer):
17910        (JSC::ARMAssembler::repatchInt32):
17911        (JSC::ARMAssembler::repatchPointer):
17912        (JSC::ARMAssembler::repatchLoadPtrToLEA):
17913        (JSC::ARMAssembler::linkJump):
17914        (JSC::ARMAssembler::relinkJump):
17915        (JSC::ARMAssembler::linkCall):
17916        (JSC::ARMAssembler::relinkCall):
17917        (JSC::ARMAssembler::getRelocatedAddress):
17918        (JSC::ARMAssembler::getDifferenceBetweenLabels):
17919        (JSC::ARMAssembler::getCallReturnOffset):
17920        (JSC::ARMAssembler::getOp2Byte):
17921        (JSC::ARMAssembler::placeConstantPoolBarrier):
17922        (JSC::ARMAssembler::RM):
17923        (JSC::ARMAssembler::RS):
17924        (JSC::ARMAssembler::RD):
17925        (JSC::ARMAssembler::RN):
17926        (JSC::ARMAssembler::getConditionalField):
17927        * assembler/ARMv7Assembler.h:
17928        (JSC::ARMv7Assembler::JmpSrc::enableLatePatch):
17929        * assembler/AbstractMacroAssembler.h:
17930        (JSC::AbstractMacroAssembler::Call::enableLatePatch):
17931        (JSC::AbstractMacroAssembler::Jump::enableLatePatch):
17932        * assembler/MacroAssembler.h:
17933        * assembler/MacroAssemblerARM.h: Added.
17934        (JSC::MacroAssemblerARM::):
17935        (JSC::MacroAssemblerARM::add32):
17936        (JSC::MacroAssemblerARM::and32):
17937        (JSC::MacroAssemblerARM::lshift32):
17938        (JSC::MacroAssemblerARM::mul32):
17939        (JSC::MacroAssemblerARM::not32):
17940        (JSC::MacroAssemblerARM::or32):
17941        (JSC::MacroAssemblerARM::rshift32):
17942        (JSC::MacroAssemblerARM::sub32):
17943        (JSC::MacroAssemblerARM::xor32):
17944        (JSC::MacroAssemblerARM::load32):
17945        (JSC::MacroAssemblerARM::load32WithAddressOffsetPatch):
17946        (JSC::MacroAssemblerARM::loadPtrWithPatchToLEA):
17947        (JSC::MacroAssemblerARM::load16):
17948        (JSC::MacroAssemblerARM::store32WithAddressOffsetPatch):
17949        (JSC::MacroAssemblerARM::store32):
17950        (JSC::MacroAssemblerARM::pop):
17951        (JSC::MacroAssemblerARM::push):
17952        (JSC::MacroAssemblerARM::move):
17953        (JSC::MacroAssemblerARM::swap):
17954        (JSC::MacroAssemblerARM::signExtend32ToPtr):
17955        (JSC::MacroAssemblerARM::zeroExtend32ToPtr):
17956        (JSC::MacroAssemblerARM::branch32):
17957        (JSC::MacroAssemblerARM::branch16):
17958        (JSC::MacroAssemblerARM::branchTest32):
17959        (JSC::MacroAssemblerARM::jump):
17960        (JSC::MacroAssemblerARM::branchAdd32):
17961        (JSC::MacroAssemblerARM::mull32):
17962        (JSC::MacroAssemblerARM::branchMul32):
17963        (JSC::MacroAssemblerARM::branchSub32):
17964        (JSC::MacroAssemblerARM::breakpoint):
17965        (JSC::MacroAssemblerARM::nearCall):
17966        (JSC::MacroAssemblerARM::call):
17967        (JSC::MacroAssemblerARM::ret):
17968        (JSC::MacroAssemblerARM::set32):
17969        (JSC::MacroAssemblerARM::setTest32):
17970        (JSC::MacroAssemblerARM::tailRecursiveCall):
17971        (JSC::MacroAssemblerARM::makeTailRecursiveCall):
17972        (JSC::MacroAssemblerARM::moveWithPatch):
17973        (JSC::MacroAssemblerARM::branchPtrWithPatch):
17974        (JSC::MacroAssemblerARM::storePtrWithPatch):
17975        (JSC::MacroAssemblerARM::supportsFloatingPoint):
17976        (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
17977        (JSC::MacroAssemblerARM::loadDouble):
17978        (JSC::MacroAssemblerARM::storeDouble):
17979        (JSC::MacroAssemblerARM::addDouble):
17980        (JSC::MacroAssemblerARM::subDouble):
17981        (JSC::MacroAssemblerARM::mulDouble):
17982        (JSC::MacroAssemblerARM::convertInt32ToDouble):
17983        (JSC::MacroAssemblerARM::branchDouble):
17984        (JSC::MacroAssemblerARM::branchTruncateDoubleToInt32):
17985        (JSC::MacroAssemblerARM::ARMCondition):
17986        (JSC::MacroAssemblerARM::prepareCall):
17987        (JSC::MacroAssemblerARM::call32):
17988        * assembler/X86Assembler.h:
17989        (JSC::X86Assembler::JmpSrc::enableLatePatch):
17990        * jit/ExecutableAllocator.h:
17991        (JSC::ExecutableAllocator::cacheFlush):
17992        * wtf/Platform.h:
17993        * yarr/RegexJIT.cpp:
17994        (JSC::Yarr::RegexGenerator::generateEnter):
17995        (JSC::Yarr::RegexGenerator::generateReturn):
17996
179972009-07-17  Gabor Loki  <loki@inf.u-szeged.hu>
17998
17999        Reviewed by Gavin Barraclough.
18000
18001        Extend AssemblerBuffer with constant pool handling mechanism.
18002        https://bugs.webkit.org/show_bug.cgi?id=24986
18003
18004        Add a platform independed constant pool framework.
18005        This pool can store 32 or 64 bits values which is enough to hold
18006        any integer, pointer or double constant.
18007
18008        * assembler/AssemblerBuffer.h:
18009        (JSC::AssemblerBuffer::putIntUnchecked):
18010        (JSC::AssemblerBuffer::putInt64Unchecked):
18011        (JSC::AssemblerBuffer::append):
18012        (JSC::AssemblerBuffer::grow):
18013        * assembler/AssemblerBufferWithConstantPool.h: Added.
18014        (JSC::):
18015
180162009-07-17  Eric Roman  <eroman@chromium.org>
18017
18018        Reviewed by Darin Adler.
18019
18020        Build fix for non-Darwin.
18021        Add a guard for inclusion of RetainPtr.h which includes CoreFoundation.h
18022
18023        https://bugs.webkit.org/show_bug.cgi?id=27382
18024
18025        * wtf/unicode/icu/CollatorICU.cpp:
18026
180272009-07-17  Alexey Proskuryakov  <ap@webkit.org>
18028
18029        Reviewed by John Sullivan.
18030
18031        Get user default collation order via a CFLocale API when available.
18032
18033        * wtf/unicode/icu/CollatorICU.cpp: (WTF::Collator::userDefault):
18034
180352009-07-17  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
18036
18037        Reviewed by Simon Hausmann.
18038
18039        [Qt] Fix the include path for the Symbian port
18040        https://bugs.webkit.org/show_bug.cgi?id=27358
18041
18042        * JavaScriptCore.pri:
18043
180442009-07-17  Csaba Osztrogonac  <oszi@inf.u-szeged.hu>
18045
18046        Reviewed by David Levin.
18047
18048        Build fix on platforms don't have MMAP.
18049        https://bugs.webkit.org/show_bug.cgi?id=27365
18050
18051        * interpreter/RegisterFile.h: Including stdio.h irrespectively of HAVE(MMAP)
18052
180532009-07-16  Fumitoshi Ukai  <ukai@chromium.org>
18054
18055        Reviewed by David Levin.
18056
18057        Add --web-sockets flag and ENABLE_WEB_SOCKETS define.
18058        https://bugs.webkit.org/show_bug.cgi?id=27206
18059
18060        Add ENABLE_WEB_SOCKETS
18061
18062        * Configurations/FeatureDefines.xcconfig: add ENABLE_WEB_SOCKETS
18063
180642009-07-16  Maxime Simon  <simon.maxime@gmail.com>
18065
18066        Reviewed by Eric Seidel.
18067
18068        Added Haiku-specific files for JavaScriptCore.
18069        https://bugs.webkit.org/show_bug.cgi?id=26620
18070
18071        * wtf/haiku/MainThreadHaiku.cpp: Added.
18072        (WTF::initializeMainThreadPlatform):
18073        (WTF::scheduleDispatchFunctionsOnMainThread):
18074
180752009-07-16  Gavin Barraclough  <barraclough@apple.com>
18076
18077        RS by Oliver Hunt.
18078
18079        Revert r45969, this fix does not appear to be valid.
18080        https://bugs.webkit.org/show_bug.cgi?id=27077
18081
18082        * bytecode/CodeBlock.cpp:
18083        (JSC::CodeBlock::~CodeBlock):
18084        (JSC::CodeBlock::unlinkCallers):
18085        * jit/JIT.cpp:
18086        * jit/JIT.h:
18087
180882009-07-16  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
18089
18090        Reviewed by Oliver Hunt.
18091
18092        Allow custom memory allocation control in ExceptionInfo and RareData struct
18093        https://bugs.webkit.org/show_bug.cgi?id=27336
18094
18095        Inherits ExceptionInfo and RareData struct from FastAllocBase because these
18096        have been instantiated by 'new' in JavaScriptCore/bytecode/CodeBlock.cpp:1289 and
18097        in JavaScriptCore/bytecode/CodeBlock.h:453.
18098
18099        Remove unnecessary WTF:: namespace from CodeBlock inheritance.
18100
18101        * bytecode/CodeBlock.h:
18102
181032009-07-16  Mark Rowe  <mrowe@apple.com>
18104
18105        Rubber-stamped by Geoff Garen.
18106
18107        Fix FeatureDefines.xcconfig to not be out of sync with the rest of the world.
18108
18109        * Configurations/FeatureDefines.xcconfig:
18110
181112009-07-16  Yong Li  <yong.li@torchmobile.com>
18112
18113         Reviewed by George Staikos.
18114
18115         https://bugs.webkit.org/show_bug.cgi?id=27320
18116         _countof is only included in CE6; for CE5 we need to define it ourself
18117
18118         * wtf/Platform.h:
18119
181202009-07-16  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
18121
18122        Reviewed by Oliver Hunt.
18123
18124        Workers + garbage collector: weird crashes
18125        https://bugs.webkit.org/show_bug.cgi?id=27077
18126
18127        We need to unlink cached method call sites when a function is destroyed.
18128
18129        * JavaScriptCore.xcodeproj/project.pbxproj:
18130        * bytecode/CodeBlock.cpp:
18131        (JSC::CodeBlock::~CodeBlock):
18132        (JSC::CodeBlock::unlinkCallers):
18133        * jit/JIT.cpp:
18134        (JSC::JIT::unlinkMethodCall):
18135        * jit/JIT.h:
18136
181372009-07-15  Steve Falkenburg  <sfalken@apple.com>
18138
18139        Windows Build fix.
18140
18141        Visual Studio reset our intermediate directory on us.
18142        This sets it back.
18143
18144        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
18145        * JavaScriptCore.vcproj/testapi/testapi.vcproj:
18146
181472009-07-15  Kwang Yul Seo  <skyul@company100.net>
18148
18149        Reviewed by Eric Seidel.
18150
18151        https://bugs.webkit.org/show_bug.cgi?id=26794
18152        Make Yacc-generated parsers to use fastMalloc/fastFree.
18153
18154        Define YYMALLOC and YYFREE to fastMalloc and fastFree
18155        respectively.
18156
18157        * parser/Grammar.y:
18158
181592009-07-15  Darin Adler  <darin@apple.com>
18160
18161        Fix a build for a particular Apple configuration.
18162
18163        * wtf/FastAllocBase.h: Change include to use "" style for
18164        including another wtf header. This is the style we use for
18165        including other public headers in the same directory.
18166
181672009-07-15  George Staikos  <george.staikos@torchmobile.com>
18168
18169        Reviewed by Adam Treat.
18170
18171        https://bugs.webkit.org/show_bug.cgi?id=27303
18172        Implement createThreadInternal for WinCE.
18173        Contains changes by George Staikos <george.staikos@torchmobile.com> and Joe Mason <joe.mason@torchmobile.com>
18174
18175        * wtf/ThreadingWin.cpp:
18176        (WTF::createThreadInternal):
18177
181782009-07-15  Joe Mason  <joe.mason@torchmobile.com>
18179
18180         Reviewed by George Staikos.
18181
18182         https://bugs.webkit.org/show_bug.cgi?id=27298
18183         Platform defines for WINCE.
18184         Contains changes by Yong Li <yong.li@torchmobile.com>,
18185         George Staikos <george.staikos@torchmobile.com> and Joe Mason <joe.mason@torchmobile.com>
18186
18187         * wtf/Platform.h:
18188
181892009-07-15  Yong Li  <yong.li@torchmobile.com>
18190
18191         Reviewed by Adam Treat.
18192
18193         https://bugs.webkit.org/show_bug.cgi?id=27306
18194         Use RegisterClass instead of RegisterClassEx on WinCE.
18195
18196         * wtf/win/MainThreadWin.cpp:
18197         (WTF::initializeMainThreadPlatform):
18198
181992009-07-15  Yong Li  <yong.li@torchmobile.com>
18200
18201         Reviewed by George Staikos.
18202
18203         https://bugs.webkit.org/show_bug.cgi?id=27301
18204         Use OutputDebugStringW on WinCE since OutputDebugStringA is not supported
18205         Originally written by Yong Li <yong.li@torchmobile.com> and refactored by
18206         Joe Mason <joe.mason@torchmobile.com>
18207
18208         * wtf/Assertions.cpp: vprintf_stderr_common
18209
182102009-07-15  Yong Li  <yong.li@torchmobile.com>
18211
18212         Reviewed by George Staikos.
18213
18214         https://bugs.webkit.org/show_bug.cgi?id=27020
18215         msToGregorianDateTime should set utcOffset to 0 when outputIsUTC is false
18216
18217         * wtf/DateMath.cpp:
18218         (WTF::gregorianDateTimeToMS):
18219
182202009-07-15  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
18221
18222        Reviewed by Simon Hausmann.
18223
18224        [Qt] Cleanup - Remove obsolete code from the make system
18225        https://bugs.webkit.org/show_bug.cgi?id=27299
18226
18227        * JavaScriptCore.pro:
18228        * jsc.pro:
18229
182302009-07-07  Norbert Leser  <norbert.leser@nokia.com>
18231
18232        Reviewed by Simon Hausmann.
18233
18234        https://bugs.webkit.org/show_bug.cgi?id=27056
18235
18236        Alternate bool operator for codewarrior compiler (WINSCW).
18237        Compiler (latest b482) reports error for UnspecifiedBoolType construct:
18238        "illegal explicit conversion from 'WTF::OwnArrayPtr<JSC::Register>' to 'bool'"
18239
18240        Same fix as in r38391.
18241
18242        * JavaScriptCore/wtf/OwnArrayPtr.h:
18243
182442009-07-15  Norbert Leser  <norbert.leser@nokia.com>
18245
18246        Reviewed by Darin Adler.
18247
18248        Qualify include path with wtf to fix compilation
18249        on Symbian.
18250        https://bugs.webkit.org/show_bug.cgi?id=27055
18251
18252        * interpreter/Interpreter.h:
18253
182542009-07-15  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
18255
18256        Reviewed by Dave Kilzer.
18257
18258        Turn off non-portable date manipulations for SYMBIAN
18259        https://bugs.webkit.org/show_bug.cgi?id=27064
18260
18261        Introduce HAVE(TM_GMTOFF), HAVE(TM_ZONE) and HAVE(TIMEGM) guards
18262        and place the rules for controlling the guards in Platform.h.
18263        Turn off these newly introduced guards for SYMBIAN.
18264
18265        * wtf/DateMath.cpp:
18266        (WTF::calculateUTCOffset):
18267        * wtf/DateMath.h:
18268        (WTF::GregorianDateTime::GregorianDateTime):
18269        (WTF::GregorianDateTime::operator tm):
18270        * wtf/Platform.h:
18271
182722009-07-15  Norbert Leser  <norbert.leser@nokia.com>
18273
18274        Reviewed by Simon Hausmann.
18275
18276        Undef ASSERT on Symbian, to avoid excessive warnings
18277        https://bugs.webkit.org/show_bug.cgi?id=27052
18278
18279        * wtf/Assertions.h:
18280
182812009-07-15  Oliver Hunt  <oliver@apple.com>
18282
18283        Reviewed by Simon Hausmann.
18284
18285        REGRESSION: fast/js/postfix-syntax.html fails with interpreter
18286        https://bugs.webkit.org/show_bug.cgi?id=27294
18287
18288        When postfix operators operating on locals assign to the same local
18289        the order of operations has to be to store the incremented value, then
18290        store the unmodified number.  Rather than implementing this subtle
18291        semantic in the interpreter I've just made the logic explicit in the
18292        bytecode generator, so x=x++ effectively becomes x=ToNumber(x) (for a
18293        local var x).
18294
18295        * parser/Nodes.cpp:
18296        (JSC::emitPostIncOrDec):
18297
182982009-07-15  Oliver Hunt  <oliver@apple.com>
18299
18300        Reviewed by Simon Hausmann.
18301
18302        REGRESSION(43559): fast/js/kde/arguments-scope.html fails with interpreter
18303        https://bugs.webkit.org/show_bug.cgi?id=27259
18304
18305        The interpreter was incorrectly basing its need to create the arguments object
18306        based on the presence of the callframe's argument reference rather than the local
18307        arguments reference.  Based on this it then overrode the local variable reference.
18308
18309        * interpreter/Interpreter.cpp:
18310        (JSC::Interpreter::privateExecute):
18311
183122009-07-14  Steve Falkenburg  <sfalken@apple.com>
18313
18314        Reorganize JavaScriptCore headers into:
18315        API: include/JavaScriptCore/
18316        Private: include/private/JavaScriptCore/
18317
18318        Reviewed by Darin Adler.
18319
18320        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
18321        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
18322        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
18323        * JavaScriptCore.vcproj/testapi/testapi.vcproj:
18324        * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
18325
183262009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
18327
18328        Reviewed by Darin Adler.
18329
18330        Change JSCell's superclass to NoncopyableCustomAllocated
18331        https://bugs.webkit.org/show_bug.cgi?id=27248
18332
18333        JSCell class customizes operator new, since Noncopyable will be
18334        inherited from FastAllocBase, NoncopyableCustomAllocated has
18335        to be used.
18336
18337        * runtime/JSCell.h:
18338
183392009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
18340
18341        Reviewed by Darin Adler.
18342
18343        Change all Noncopyable inheriting visibility to public.
18344        https://bugs.webkit.org/show_bug.cgi?id=27225
18345
18346        Change all Noncopyable inheriting visibility to public because
18347        it is needed to the custom allocation framework (bug #20422).
18348
18349        * bytecode/SamplingTool.h:
18350        * bytecompiler/RegisterID.h:
18351        * interpreter/CachedCall.h:
18352        * interpreter/RegisterFile.h:
18353        * parser/Lexer.h:
18354        * parser/Parser.h:
18355        * runtime/ArgList.h:
18356        * runtime/BatchedTransitionOptimizer.h:
18357        * runtime/Collector.h:
18358        * runtime/CommonIdentifiers.h:
18359        * runtime/JSCell.h:
18360        * runtime/JSGlobalObject.h:
18361        * runtime/JSLock.h:
18362        * runtime/JSONObject.cpp:
18363        * runtime/SmallStrings.cpp:
18364        * runtime/SmallStrings.h:
18365        * wtf/CrossThreadRefCounted.h:
18366        * wtf/GOwnPtr.h:
18367        * wtf/Locker.h:
18368        * wtf/MessageQueue.h:
18369        * wtf/OwnArrayPtr.h:
18370        * wtf/OwnFastMallocPtr.h:
18371        * wtf/OwnPtr.h:
18372        * wtf/RefCounted.h:
18373        * wtf/ThreadSpecific.h:
18374        * wtf/Threading.h:
18375        * wtf/Vector.h:
18376        * wtf/unicode/Collator.h:
18377
183782009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
18379
18380        Reviewed by Darin Adler.
18381
18382        Change ParserArenaRefCounted's superclass to RefCountedCustomAllocated
18383        https://bugs.webkit.org/show_bug.cgi?id=27249
18384
18385        ParserArenaDeletable customizes operator new, to avoid double inheritance
18386        ParserArenaDeletable's superclass has been changed to RefCountedCustomAllocated.
18387
18388        * parser/Nodes.h:
18389
183902009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
18391
18392        Reviewed by Darin Adler.
18393
18394        Add RefCountedCustomAllocated to RefCounted.h
18395        https://bugs.webkit.org/show_bug.cgi?id=27232
18396
18397        Some class which are inherited from RefCounted customize
18398        operator new, but RefCounted is inherited from Noncopyable
18399        which will be inherited from FastAllocBase. To avoid
18400        conflicts Noncopyable inheriting was moved down to RefCounted
18401        and to avoid double inheritance this class has been added.
18402
18403        * wtf/RefCounted.h:
18404        (WTF::RefCountedCustomAllocated::deref):
18405        (WTF::RefCountedCustomAllocated::~RefCountedCustomAllocated):
18406
184072009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
18408
18409        Reviewed by Darin Adler.
18410
18411        Add NoncopyableCustomAllocated to Noncopyable.h.
18412        https://bugs.webkit.org/show_bug.cgi?id=27228
18413
18414        Some classes which inherited from Noncopyable overrides operator new
18415        since Noncopyable'll be inherited from FastAllocBase, Noncopyable.h
18416        needs to be extended with this new class to support the overriding.
18417
18418        * wtf/Noncopyable.h:
18419        (WTFNoncopyable::NoncopyableCustomAllocated::NoncopyableCustomAllocated):
18420        (WTFNoncopyable::NoncopyableCustomAllocated::~NoncopyableCustomAllocated):
18421
184222009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
18423
18424        Reviewed by Darin Adler.
18425
18426        Allow custom memory allocation control for JavaScriptCore's IdentifierTable class
18427        https://bugs.webkit.org/show_bug.cgi?id=27260
18428
18429        Inherits IdentifierTable class from FastAllocBase because it has been
18430        instantiated by 'new' in JavaScriptCore/runtime/Identifier.cpp:70.
18431
18432        * runtime/Identifier.cpp:
18433
184342009-07-14  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
18435
18436        Reviewed by Darin Adler.
18437
18438        Allow custom memory allocation control for JavaScriptCore's Profiler class
18439        https://bugs.webkit.org/show_bug.cgi?id=27253
18440
18441        Inherits Profiler class from FastAllocBase because it has been instantiated by
18442        'new' in JavaScriptCore/profiler/Profiler.cpp:56.
18443
18444        * profiler/Profiler.h:
18445
184462009-07-06  George Staikos  <george.staikos@torchmobile.com>
18447
18448        Reviewed by Adam Treat.
18449
18450        Authors: George Staikos <george.staikos@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>, Makoto Matsumoto <matumoto@math.keio.ac.jp>, Takuji Nishimura
18451
18452        https://bugs.webkit.org/show_bug.cgi?id=27030
18453        Implement custom RNG for WinCE using Mersenne Twister
18454
18455        * wtf/RandomNumber.cpp:
18456        (WTF::randomNumber):
18457        * wtf/RandomNumberSeed.h:
18458        (WTF::initializeRandomNumberGenerator):
18459        * wtf/wince/mt19937ar.c: Added.
18460        (init_genrand):
18461        (init_by_array):
18462        (genrand_int32):
18463        (genrand_int31):
18464        (genrand_real1):
18465        (genrand_real2):
18466        (genrand_real3):
18467        (genrand_res53):
18468
184692009-07-13  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
18470
18471        Unreviewed make dist build fix.
18472
18473        * GNUmakefile.am:
18474
184752009-07-13  Drew Wilson  <atwilson@google.com>
18476
18477        Reviewed by David Levin.
18478
18479        Add ENABLE(SHARED_WORKERS) flag and define SharedWorker APIs
18480        https://bugs.webkit.org/show_bug.cgi?id=26932
18481
18482        Added ENABLE(SHARED_WORKERS) flag (off by default).
18483
18484        * Configurations/FeatureDefines.xcconfig:
18485
184862009-07-07  Norbert Leser  <norbert.leser@nokia.com>
18487
18488        Reviewed by Maciej Stachoviak.
18489
18490        https://bugs.webkit.org/show_bug.cgi?id=27058
18491
18492        Removed superfluous parenthesis around single expression.
18493        Compilers on Symbian platform fail to properly parse and compile.
18494
18495        * JavaScriptCore/wtf/Platform.h:
18496
184972009-07-13  Norbert Leser  <norbert.leser@nokia.com>
18498
18499        Reviewed by Maciej Stachoviak.
18500
18501        https://bugs.webkit.org/show_bug.cgi?id=27054
18502
18503        Renamed Translator to HashTranslator
18504
18505        Codewarrior compiler (WINSCW) latest b482 cannot resolve typename
18506        mismatch between template declaration and definition
18507        (HashTranslator / Translator)
18508
18509        * wtf/HashSet.h:
18510
185112009-07-13  Norbert Leser  <norbert.leser@nokia.com>
18512
18513        Reviewed by Eric Seidel.
18514
18515        https://bugs.webkit.org/show_bug.cgi?id=27053
18516
18517        Ambiguity in LabelScope initialization
18518
18519        Codewarrior compiler (WINSCW) latest b482 on Symbian cannot resolve
18520        type of "0" unambiguously. Set expression explicitly to
18521        PassRefPtr<Label>::PassRefPtr()
18522
18523        * bytecompiler/BytecodeGenerator.cpp
18524
185252009-07-11  Simon Fraser  <simon.fraser@apple.com>
18526
18527        Enable support for accelerated compositing and 3d transforms on Leopard.
18528        <https://bugs.webkit.org/show_bug.cgi?id=20166>
18529        <rdar://problem/6120614>
18530
18531        Reviewed by Oliver Hunt.
18532
18533        * Configurations/FeatureDefines.xcconfig:
18534        * wtf/Platform.h:
18535
185362009-07-10  Mark Rowe  <mrowe@apple.com>
18537
18538        Second part of the "make Windows happier" dance.
18539
18540        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
18541        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
18542
185432009-07-10  Mark Rowe  <mrowe@apple.com>
18544
18545        Try and make the Windows build happy.
18546
18547        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
18548        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
18549
185502009-07-10  Kevin McCullough  <kmccullough@apple.com>
18551
18552        Reviewed by Geoffrey Garen.
18553
18554        * debugger/Debugger.h: Made this function virtual for use in WebCore's
18555        WebInspector.
18556
185572009-07-10  Kwang Yul Seo  <skyul@company100.net>
18558
18559        Reviewed by Darin Adler.
18560
18561        ParserArenaDeletable should override delete
18562        https://bugs.webkit.org/show_bug.cgi?id=26790
18563
18564        ParserArenaDeletable overrides new, but it does not override delete.
18565        ParserArenaDeletable must be freed by fastFree
18566        because it is allocated by fastMalloc.
18567
18568        * parser/NodeConstructors.h:
18569        (JSC::ParserArenaDeletable::operator delete):
18570        * parser/Nodes.h:
18571
185722009-07-10  Adam Roben  <aroben@apple.com>
18573
18574        Sort all our Xcode projects
18575
18576        Accomplished using sort-Xcode-project-file.
18577
18578        Requested by Dave Kilzer.
18579
18580        * JavaScriptCore.xcodeproj/project.pbxproj:
18581
185822009-07-09  Maciej Stachowiak  <mjs@apple.com>
18583
18584        Not reviewed, build fix.
18585
18586        Windows build fix for the last change.
18587
18588        * wtf/dtoa.cpp: Forgot to include Vector.h
18589
185902009-07-09  Maciej Stachowiak  <mjs@apple.com>
18591
18592        Reviewed by Darin Adler.
18593
18594        REGRESSION: crash in edge cases of floating point parsing.
18595        https://bugs.webkit.org/show_bug.cgi?id=27110
18596        <rdar://problem/7044458>
18597
18598        Tests: fast/css/number-parsing-crash.html
18599               fast/css/number-parsing-crash.html
18600               fast/js/number-parsing-crash.html
18601
18602        * wtf/dtoa.cpp:
18603        (WTF::BigInt::BigInt): Converted this to more a proper class, using a Vector
18604        with inline capacity
18605
18606        (WTF::lshift): Rearranged logic somewhat nontrivially to deal with the new way of sizing BigInts.
18607        Added an assertion to verify that invariants are maintained.
18608
18609        All other functions are adapted fairly mechanically to the above changes.
18610        (WTF::BigInt::clear):
18611        (WTF::BigInt::size):
18612        (WTF::BigInt::resize):
18613        (WTF::BigInt::words):
18614        (WTF::BigInt::append):
18615        (WTF::multadd):
18616        (WTF::s2b):
18617        (WTF::i2b):
18618        (WTF::mult):
18619        (WTF::cmp):
18620        (WTF::diff):
18621        (WTF::b2d):
18622        (WTF::d2b):
18623        (WTF::ratio):
18624        (WTF::strtod):
18625        (WTF::quorem):
18626        (WTF::dtoa):
18627
186282009-07-09  Drew Wilson  <atwilson@google.com>
18629
18630        Reviewed by Alexey Proskuryakov.
18631
18632        Turned on CHANNEL_MESSAGING by default because the MessageChannel API
18633        can now be implemented for Web Workers and is reasonably stable.
18634
18635        * Configurations/FeatureDefines.xcconfig:
18636
186372009-07-09  Oliver Hunt  <oliver@apple.com>
18638
18639        * interpreter/Interpreter.cpp:
18640        (JSC::Interpreter::privateExecute):
18641
186422009-07-09  Oliver Hunt  <oliver@apple.com>
18643
18644        Reviewed by Darin Adler.
18645
18646        Bug 27016 - Interpreter crashes due to invalid array indexes
18647        <https://bugs.webkit.org/show_bug.cgi?id=27016>
18648
18649        Unsigned vs signed conversions results in incorrect behaviour in
18650        64bit interpreter builds.
18651
18652        * interpreter/Interpreter.cpp:
18653        (JSC::Interpreter::privateExecute):
18654
186552009-07-09  Dimitri Glazkov  <dglazkov@chromium.org>
18656
18657        Reviewed by Darin Fisher.
18658
18659        [Chromium] Upstream JavaScriptCore.gypi, the project file for Chromium build.
18660        https://bugs.webkit.org/show_bug.cgi?id=27135
18661
18662        * JavaScriptCore.gypi: Added.
18663
186642009-07-09  Joe Mason  <joe.mason@torchmobile.com>
18665
18666        Reviewed by George Staikos.
18667
18668        Authors: Yong Li <yong.li@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>
18669
18670        https://bugs.webkit.org/show_bug.cgi?id=27031
18671        Add an override for deleteOwnedPtr(HDC) on Windows
18672
18673        * wtf/OwnPtrCommon.h:
18674        * wtf/OwnPtrWin.cpp:
18675        (WTF::deleteOwnedPtr):
18676
186772009-07-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
18678
18679        Reviewed by Darin Adler.
18680
18681        Guard singal.h dependency with HAVE(SIGNAL_H) to enable building jsc
18682        on SYMBIAN.
18683
18684        https://bugs.webkit.org/show_bug.cgi?id=27026
18685
18686        Based on Norbert Leser's work.
18687
18688        * jsc.cpp:
18689        (printUsageStatement):
18690        (parseArguments):
18691        * wtf/Platform.h:
18692
186932009-07-07  Gavin Barraclough  <barraclough@apple.com>
18694
18695        Reviewed by Sam Weinig.
18696
18697        Stop loading constants into the register file.
18698
18699        Instead, use high register values (highest bit bar the sign bit set) to indicate
18700        constants in the instruction stream, and when we encounter such a value load it
18701        directly from the CodeBlock.
18702
18703        Since constants are no longer copied into the register file, this patch renders
18704        the 'unexpected constant' mechanism redundant, and removes it.
18705
18706        2% improvement, thanks to Sam Weinig.
18707
18708        * bytecode/CodeBlock.cpp:
18709        (JSC::CodeBlock::dump):
18710        (JSC::CodeBlock::CodeBlock):
18711        (JSC::CodeBlock::mark):
18712        (JSC::CodeBlock::shrinkToFit):
18713        * bytecode/CodeBlock.h:
18714        (JSC::CodeBlock::isTemporaryRegisterIndex):
18715        (JSC::CodeBlock::constantRegister):
18716        (JSC::CodeBlock::isConstantRegisterIndex):
18717        (JSC::CodeBlock::getConstant):
18718        (JSC::ExecState::r):
18719        * bytecode/Opcode.h:
18720        * bytecompiler/BytecodeGenerator.cpp:
18721        (JSC::BytecodeGenerator::preserveLastVar):
18722        (JSC::BytecodeGenerator::BytecodeGenerator):
18723        (JSC::BytecodeGenerator::addConstantValue):
18724        (JSC::BytecodeGenerator::emitEqualityOp):
18725        (JSC::BytecodeGenerator::emitLoad):
18726        (JSC::BytecodeGenerator::emitResolveBase):
18727        (JSC::BytecodeGenerator::emitResolveWithBase):
18728        (JSC::BytecodeGenerator::emitNewError):
18729        * bytecompiler/BytecodeGenerator.h:
18730        (JSC::BytecodeGenerator::emitNode):
18731        * interpreter/CallFrame.h:
18732        (JSC::ExecState::noCaller):
18733        (JSC::ExecState::hasHostCallFrameFlag):
18734        (JSC::ExecState::addHostCallFrameFlag):
18735        (JSC::ExecState::removeHostCallFrameFlag):
18736        * interpreter/Interpreter.cpp:
18737        (JSC::Interpreter::resolve):
18738        (JSC::Interpreter::resolveSkip):
18739        (JSC::Interpreter::resolveGlobal):
18740        (JSC::Interpreter::resolveBase):
18741        (JSC::Interpreter::resolveBaseAndProperty):
18742        (JSC::Interpreter::resolveBaseAndFunc):
18743        (JSC::Interpreter::dumpRegisters):
18744        (JSC::Interpreter::throwException):
18745        (JSC::Interpreter::createExceptionScope):
18746        (JSC::Interpreter::privateExecute):
18747        (JSC::Interpreter::retrieveArguments):
18748        * jit/JIT.cpp:
18749        (JSC::JIT::privateCompileMainPass):
18750        * jit/JITInlineMethods.h:
18751        (JSC::JIT::emitLoadDouble):
18752        (JSC::JIT::emitLoadInt32ToDouble):
18753        * jit/JITOpcodes.cpp:
18754        (JSC::JIT::emit_op_new_error):
18755        (JSC::JIT::emit_op_enter):
18756        (JSC::JIT::emit_op_enter_with_activation):
18757        * parser/Nodes.cpp:
18758        (JSC::DeleteResolveNode::emitBytecode):
18759        (JSC::DeleteValueNode::emitBytecode):
18760        (JSC::PrefixResolveNode::emitBytecode):
18761        * runtime/JSActivation.cpp:
18762        (JSC::JSActivation::JSActivation):
18763        * wtf/Platform.h:
18764
187652009-07-07  Mark Rowe  <mrowe@apple.com>
18766
18767        Reviewed by Darin Adler.
18768
18769        Fix <https://bugs.webkit.org/show_bug.cgi?id=27025> / <rdar://problem/7033448>.
18770        Bug 27025: Crashes and regression test failures related to regexps in 64-bit
18771
18772        For x86_64 RegexGenerator uses rbx, a callee-save register, as a scratch register but
18773        neglects to save and restore it.  The change in handling of the output vector in r45545
18774        altered code generation so that the RegExp::match was now storing important data in rbx,
18775        which caused crashes and bogus results when it was clobbered.
18776
18777        * yarr/RegexJIT.cpp:
18778        (JSC::Yarr::RegexGenerator::generateEnter): Save rbx.
18779        (JSC::Yarr::RegexGenerator::generateReturn): Restore rbx.
18780
187812009-07-06  Ada Chan  <adachan@apple.com>
18782
18783        Reviewed by Darin Adler and Mark Rowe.
18784
18785        Decommitted spans are added to the list of normal spans rather than
18786        the returned spans in TCMalloc_PageHeap::Delete().
18787        https://bugs.webkit.org/show_bug.cgi?id=26998
18788
18789        In TCMalloc_PageHeap::Delete(), the deleted span can be decommitted in
18790        the process of merging with neighboring spans that are also decommitted.
18791        The merged span needs to be placed in the list of returned spans (spans
18792        whose memory has been returned to the system).  Right now it's always added
18793        to the list of the normal spans which can theoretically cause thrashing.
18794
18795        * wtf/FastMalloc.cpp:
18796        (WTF::TCMalloc_PageHeap::Delete):
18797
187982009-07-05  Lars Knoll  <lars.knoll@nokia.com>
18799
18800        Reviewed by Maciej Stachowiak.
18801
18802        https://bugs.webkit.org/show_bug.cgi?id=26843
18803
18804        Fix run-time crashes in JavaScriptCore with the Metrowerks compiler on Symbian.
18805
18806        The Metrowerks compiler on the Symbian platform moves the globally
18807        defined Hashtables into read-only memory, despite one of the members
18808        being mutable. This causes crashes at run-time due to write access to
18809        read-only memory.
18810
18811        Avoid the use of const with this compiler by introducing the
18812        JSC_CONST_HASHTABLE macro.
18813
18814        Based on idea by Norbert Leser.
18815
18816        * runtime/Lookup.h: Define JSC_CONST_HASHTABLE as const for !WINSCW.
18817        * create_hash_table: Use JSC_CONST_HASHTABLE for hashtables.
18818        * runtime/JSGlobalData.cpp: Import various global hashtables via the macro.
18819
188202009-07-04  Dan Bernstein  <mitz@apple.com>
18821
18822        - debug build fix
18823
18824        * runtime/RegExpConstructor.cpp:
18825        (JSC::RegExpConstructor::getLastParen):
18826
188272009-07-03  Yong Li  <yong.li@torchmobile.com>
18828
18829        Reviewed by Maciej Stachowiak (and revised slightly)
18830
18831        RegExp::match to be optimized
18832        https://bugs.webkit.org/show_bug.cgi?id=26957
18833
18834        Allow regexp matching to use Vectors with inline capacity instead of
18835        allocating a new ovector buffer every time.
18836
18837        ~5% speedup on SunSpider string-unpack-code test, 0.3% on SunSpider overall.
18838
18839        * runtime/RegExp.cpp:
18840        (JSC::RegExp::match):
18841        * runtime/RegExp.h:
18842        * runtime/RegExpConstructor.cpp:
18843        (JSC::RegExpConstructorPrivate::RegExpConstructorPrivate):
18844        (JSC::RegExpConstructorPrivate::lastOvector):
18845        (JSC::RegExpConstructorPrivate::tempOvector):
18846        (JSC::RegExpConstructorPrivate::changeLastOvector):
18847        (JSC::RegExpConstructor::performMatch):
18848        (JSC::RegExpMatchesArray::RegExpMatchesArray):
18849        (JSC::RegExpMatchesArray::fillArrayInstance):
18850        (JSC::RegExpConstructor::getBackref):
18851        (JSC::RegExpConstructor::getLastParen):
18852        (JSC::RegExpConstructor::getLeftContext):
18853        (JSC::RegExpConstructor::getRightContext):
18854        * runtime/StringPrototype.cpp:
18855        (JSC::stringProtoFuncSplit):
18856
188572009-06-30  Kwang Yul Seo  <skyul@company100.net>
18858
18859        Reviewed by Eric Seidel.
18860
18861        Override operator new/delete with const std::nothrow_t& as the second
18862        argument.
18863        https://bugs.webkit.org/show_bug.cgi?id=26792
18864
18865        On Windows CE, operator new/delete, new[]/delete[] with const
18866        std::nothrow_t& must be overrided because some standard template
18867        libraries use these operators.
18868
18869        The problem occurs when memory allocated by new(size_t s, const
18870        std::nothrow_t&) is freed by delete(void* p). This causes the umatched
18871        malloc/free problem.
18872
18873        The patch overrides all new, delete, new[] and delete[] to use
18874        fastMaloc and fastFree consistently.
18875
18876        * wtf/FastMalloc.h:
18877        (throw):
18878
188792009-06-30  Gabor Loki  <loki@inf.u-szeged.hu>
18880
18881        Reviewed by Sam Weinig.
18882
18883        <https://bugs.webkit.org/show_bug.cgi?id=24986>
18884
18885        Remove unnecessary references to AssemblerBuffer.
18886
18887        * interpreter/Interpreter.cpp:
18888        * interpreter/Interpreter.h:
18889
188902009-06-29  David Levin  <levin@chromium.org>
18891
18892        Reviewed by Oliver Hunt.
18893
18894        Still seeing occasional leaks from UString::sharedBuffer code
18895        https://bugs.webkit.org/show_bug.cgi?id=26420
18896
18897        The problem is that the pointer to the memory allocation isn't visible
18898        by "leaks" due to the lower bits being used as flags.  The fix is to
18899        make the pointer visible in memory (in debug only). The downside of
18900        this fix that the memory allocated by sharedBuffer will still look like
18901        a leak in non-debug builds when any flags are set.
18902
18903        * wtf/PtrAndFlags.h:
18904        (WTF::PtrAndFlags::set):
18905
189062009-06-29  Sam Weinig  <sam@webkit.org>
18907
18908        Reviewed by Mark Rowe.
18909
18910        Remove more unused scons support.
18911
18912        * SConstruct: Removed.
18913
189142009-06-29  Oliver Hunt  <oliver@apple.com>
18915
18916        Reviewed by Gavin Barraclough.
18917
18918        <rdar://problem/7016214> JSON.parse fails to parse valid JSON with most Unicode characters
18919        <https://bugs.webkit.org/show_bug.cgi?id=26802>
18920
18921        In the original JSON.parse patch unicode was handled correctly, however in some last
18922        minute "clean up" I oversimplified isSafeStringCharacter.  This patch corrects this bug.
18923
18924        * runtime/LiteralParser.cpp:
18925        (JSC::isSafeStringCharacter):
18926        (JSC::LiteralParser::Lexer::lexString):
18927
189282009-06-26  Oliver Hunt  <oliver@apple.com>
18929
18930        Reviewed by Dan Bernstein.
18931
18932        <rdar://problem/7009684> REGRESSION(r45039): Crashes inside JSEvent::put on PowerPC (26746)
18933        <https://bugs.webkit.org/show_bug.cgi?id=26746>
18934
18935        Fix for r45039 incorrectly uncached a get_by_id by converting it to put_by_id.  Clearly this
18936        is less than correct.  This patch corrects that error.
18937
18938        * interpreter/Interpreter.cpp:
18939        (JSC::Interpreter::tryCacheGetByID):
18940
189412009-06-26  Eric Seidel  <eric@webkit.org>
18942
18943        No review, only rolling out r45259.
18944
18945        Roll out r45259 after crash appeared on the bots:
18946        plugins/undefined-property-crash.html
18947        ASSERTION FAILED: s <= HeapConstants<heapType>::cellSize
18948        (leopard-intel-debug-tests/build/JavaScriptCore/runtime/Collector.cpp:278
18949        void* JSC::Heap::heapAllocate(size_t) [with JSC::HeapType heapType = PrimaryHeap])
18950
18951        * runtime/DateInstance.cpp:
18952        * runtime/Identifier.cpp:
18953        * runtime/Lookup.h:
18954        * runtime/RegExpConstructor.cpp:
18955        * runtime/RegExpObject.h:
18956        * runtime/ScopeChain.h:
18957        * runtime/UString.h:
18958
189592009-06-26  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
18960
18961        Reviewed by Simon Hausmann.
18962
18963        Add support for QDataStream operators to Vector.
18964
18965        * wtf/Vector.h:
18966        (WTF::operator<<):
18967        (WTF::operator>>):
18968
189692009-06-24  Sam Weinig  <sam@webkit.org>
18970
18971        Reviewed by Gavin Barraclough.
18972
18973        Make the opcode sampler work once again.
18974
18975        * jit/JIT.h:
18976        (JSC::JIT::compileGetByIdProto):
18977        (JSC::JIT::compileGetByIdSelfList):
18978        (JSC::JIT::compileGetByIdProtoList):
18979        (JSC::JIT::compileGetByIdChainList):
18980        (JSC::JIT::compileGetByIdChain):
18981        (JSC::JIT::compilePutByIdTransition):
18982        (JSC::JIT::compileCTIMachineTrampolines):
18983        (JSC::JIT::compilePatchGetArrayLength):
18984        * jit/JITStubCall.h:
18985        (JSC::JITStubCall::call):
18986
189872009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
18988
18989        Reviewed by Maciej Stachowiak.
18990
18991        Extend FastAllocBase.h with 'using WTF::FastAllocBase' to avoid
18992        unnecessary WTF:: usings.
18993        Remove existing unnecessary WTF:: usings.
18994
18995        * interpreter/Interpreter.h:
18996        * profiler/CallIdentifier.h:
18997        * runtime/ScopeChain.h:
18998        * wtf/FastAllocBase.h:
18999
190002009-06-24  David Levin  <levin@chromium.org>
19001
19002        Fix all builds.
19003
19004        * bytecode/CodeBlock.h:
19005        * bytecompiler/BytecodeGenerator.h:
19006        * interpreter/Register.h:
19007
190082009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
19009
19010        Reviewed by Maciej Stachowiak.
19011
19012        https://bugs.webkit.org/show_bug.cgi?id=26677
19013
19014        Inherits CodeBlock class from FastAllocBase because it
19015        has been instantiated by 'new' in JavaScriptCore/bytecode/CodeBlock.h:217.
19016
19017        * bytecode/CodeBlock.h:
19018
190192009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
19020
19021        Reviewed by Maciej Stachowiak.
19022
19023        https://bugs.webkit.org/show_bug.cgi?id=26676
19024
19025        Inherits BytecodeGenerator class from FastAllocBase because it has been
19026        instantiated by 'new' in JavaScriptCore/parser/Nodes.cpp:1892.
19027
19028        * bytecompiler/BytecodeGenerator.h:
19029
190302009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
19031
19032        Reviewed by Maciej Stachowiak.
19033
19034        https://bugs.webkit.org/show_bug.cgi?id=26675
19035
19036        Inherits Register class from FastAllocBase because it has been
19037        instantiated by 'new' in JavaScriptCore/runtime/JSVariableObject.h:149.
19038
19039        * interpreter/Register.h:
19040
190412009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
19042
19043        Reviewed by Darin Adler.
19044
19045        https://bugs.webkit.org/show_bug.cgi?id=26674
19046
19047        Inherits HashMap class from FastAllocBase because it has been
19048        instantiated by 'new' in JavaScriptCore/runtime/Structure.cpp:458.
19049
19050        * wtf/HashMap.h:
19051
190522009-06-24  Oliver Hunt  <oliver@apple.com>
19053
19054        Reviewed by Darin Adler.
19055
19056        <rdar://problem/6940519> REGRESSION (Safari 4 Public Beta - TOT): google.com/adplanner shows blank page instead of site details in "basic research'
19057
19058        The problem was caused by the page returned with a function using a
19059        var declaration list containing around ~3000 variables.  The solution
19060        to this is to flatten the comma expression representation and make
19061        codegen comma expressions and initializer lists iterative rather than
19062        recursive.
19063
19064        * parser/Grammar.y:
19065        * parser/NodeConstructors.h:
19066        (JSC::CommaNode::CommaNode):
19067        * parser/Nodes.cpp:
19068        (JSC::CommaNode::emitBytecode):
19069        * parser/Nodes.h:
19070        (JSC::ExpressionNode::isCommaNode):
19071        (JSC::CommaNode::isCommaNode):
19072        (JSC::CommaNode::append):
19073
190742009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
19075
19076        Reviewed by Maciej Stachowiak.
19077
19078        https://bugs.webkit.org/show_bug.cgi?id=26645
19079
19080        Inherits ScopeChainNode class from FastAllocBase because it has been
19081        instantiated by 'new' in JavaScriptCore/runtime/ScopeChain.h:95.
19082
19083        * wtf/RefPtr.h:
19084
190852009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
19086
19087        Reviewed by Darin Adler.
19088
19089        https://bugs.webkit.org/show_bug.cgi?id=26648
19090
19091        Inherits Deque class from FastAllocBase because it has been
19092        instantiated by 'new' with DEFINE_STATIC_LOCAL macro in
19093        JavaScriptCore/wtf/MainThread.cpp:62.
19094
19095        * wtf/Deque.h:
19096
190972009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
19098
19099        Reviewed by Darin Adler.
19100
19101        https://bugs.webkit.org/show_bug.cgi?id=26644
19102
19103        Inherits RefPtr class from FastAllocBase because it has been
19104        instantiated by 'new' in JavaScriptCore/runtime/StructureChain.cpp:41.
19105
19106        * wtf/RefPtr.h:
19107
191082009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
19109
19110        Reviewed by Darin Adler.
19111
19112        Inherits HashSet class from FastAllocBase, because it has been
19113        instantiated by 'new' in JavaScriptCore/runtime/Collector.h:116.
19114
19115        * wtf/HashSet.h:
19116
191172009-06-24  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
19118
19119        Reviewed by Darin Adler.
19120
19121        Inherits Vector class from FastAllocBase because it has been
19122        instantiated by 'new' in JavaScriptCore/runtime/Structure.cpp:633.
19123
19124        * wtf/Vector.h:
19125
191262009-06-24  Norbert Leser  <norbert.leser@nokia.com>
19127
19128        Reviewed by Maciej Stachoviak.
19129
19130        The BytecodeGenerator objects were instantiated on stack, which takes up ~38kB per instance
19131        (each instance includes copy of JSC::CodeBlock with large SymbolTable, etc.).
19132        Specifically, since there is nested invocation (e.g., GlobalCode --> FunctionCode),
19133        the stack overflows immediately on Symbian hardware (max. 80 kB).
19134        Proposed change allocates generator objects on heap.
19135        Performance impact (if any) should be negligible and change is proposed as general fix,
19136        rather than ifdef'd for SYMBIAN.
19137
19138        * parser/Nodes.cpp:
19139        (JSC::ProgramNode::generateBytecode):
19140        (JSC::EvalNode::generateBytecode):
19141        (JSC::EvalNode::bytecodeForExceptionInfoReparse):
19142        (JSC::FunctionBodyNode::generateBytecode):
19143        (JSC::FunctionBodyNode::bytecodeForExceptionInfoReparse):
19144
191452009-06-23  Oliver Hunt  <oliver@apple.com>
19146
19147        Reviewed by Gavin Barraclough.
19148
19149        <rdar://problem/6992806> REGRESSION: Enumeration can skip new properties in cases of prototypes that have more than 64 (26593)
19150        <https://bugs.webkit.org/show_bug.cgi?id=26593>
19151
19152        Do not attempt to cache structure chains if they contain a dictionary at any level.
19153
19154        * interpreter/Interpreter.cpp:
19155        (JSC::Interpreter::tryCachePutByID):
19156        (JSC::Interpreter::tryCacheGetByID):
19157        * jit/JITStubs.cpp:
19158        (JSC::JITThunks::tryCachePutByID):
19159        * runtime/Structure.cpp:
19160        (JSC::Structure::getEnumerablePropertyNames):
19161        (JSC::Structure::addPropertyTransition):
19162        * runtime/StructureChain.cpp:
19163        (JSC::StructureChain::isCacheable):
19164        * runtime/StructureChain.h:
19165
191662009-06-23  Yong Li  <yong.li@torchmobile.com>
19167
19168        Reviewed by George Staikos.
19169
19170        https://bugs.webkit.org/show_bug.cgi?id=26654
19171        Add the proper export define for the JavaScriptCore API when building for WINCE.
19172
19173        * API/JSBase.h:
19174
191752009-06-23  Joe Mason  <joe.mason@torchmobile.com>
19176
19177        Reviewed by Adam Treat.
19178
19179        Authors: Yong Li <yong.li@torchmobile.com>, Joe Mason <joe.mason@torchmobile.com>
19180
19181        https://bugs.webkit.org/show_bug.cgi?id=26611
19182        Implement currentThreadStackBase on WINCE by adding a global,
19183        g_stackBase, which must be set to the address of a local variable
19184        by the caller before calling any WebKit function that invokes JSC.
19185
19186        * runtime/Collector.cpp:
19187        (JSC::isPageWritable):
19188        (JSC::getStackBase):
19189          Starts at the top of the stack and returns the entire range of
19190          consecutive writable pages as an estimate of the actual stack.
19191          This will be much bigger than the actual stack range, so some
19192          dead objects can't be collected, but it guarantees live objects
19193          aren't collected prematurely.
19194
19195        (JSC::currentThreadStackBase):
19196          On WinCE, returns g_stackBase if set or call getStackBase as a
19197          fallback if not.
19198
191992009-06-23  Oliver Hunt  <oliver@apple.com>
19200
19201        Reviewed by Alexey Proskuryakov.
19202
19203        Fix stupid performance problem in the LiteralParser
19204
19205        The LiteralParser was making a new UString in order to use
19206        toDouble, however UString's toDouble allows a much wider range
19207        of numberic strings than the LiteralParser accepts, and requires
19208        an additional heap allocation or two for the construciton of the
19209        UString.  To rectify this we just call WTF::dtoa directly using
19210        a stack allocated buffer to hold the validated numeric literal.
19211
19212        * runtime/LiteralParser.cpp:
19213        (JSC::LiteralParser::Lexer::lexNumber):
19214        (JSC::LiteralParser::parse):
19215        * runtime/LiteralParser.h:
19216
192172009-06-22  Oliver Hunt  <oliver@apple.com>
19218
19219        Reviewed by Alexey Proskuryakov.
19220
19221        Bug 26640: JSON.stringify needs to special case Boolean objects
19222        <https://bugs.webkit.org/show_bug.cgi?id=26640>
19223
19224        Add special case handling of the Boolean object so we match current
19225        ES5 errata.
19226
19227        * runtime/JSONObject.cpp:
19228        (JSC::unwrapBoxedPrimitive): renamed from unwrapNumberOrString
19229        (JSC::gap):
19230        (JSC::Stringifier::appendStringifiedValue):
19231
192322009-06-22  Oliver Hunt  <oliver@apple.com>
19233
19234        Reviewed by Darin Adler.
19235
19236        Bug 26591: Support revivers in JSON.parse
19237        <https://bugs.webkit.org/show_bug.cgi?id=26591>
19238
19239        Add reviver support to JSON.parse.  This completes the JSON object.
19240
19241        * runtime/JSONObject.cpp:
19242        (JSC::Walker::Walker):
19243        (JSC::Walker::callReviver):
19244        (JSC::Walker::walk):
19245        (JSC::JSONProtoFuncParse):
19246
192472009-06-21  Oliver Hunt  <oliver@apple.com>
19248
19249        Reviewed by Darin Adler.
19250
19251        Bug 26592: Support standard toJSON functions
19252        <https://bugs.webkit.org/show_bug.cgi?id=26592>
19253
19254        Add support for the standard Date.toJSON function.
19255
19256        * runtime/DatePrototype.cpp:
19257        (JSC::dateProtoFuncToJSON):
19258
192592009-06-21  Oliver Hunt  <oliver@apple.com>
19260
19261        Reviewed by Sam Weinig.
19262
19263        Bug 26594: JSC needs to support Date.toISOString
19264        <https://bugs.webkit.org/show_bug.cgi?id=26594>
19265
19266        Add support for Date.toISOString.
19267
19268        * runtime/DatePrototype.cpp:
19269        (JSC::dateProtoFuncToISOString):
19270
192712009-06-21  Oliver Hunt  <oliver@apple.com>
19272
19273        Remove dead code.
19274
19275        * runtime/LiteralParser.cpp:
19276        (JSC::LiteralParser::parse):
19277
192782009-06-21  Oliver Hunt  <oliver@apple.com>
19279
19280        Reviewed by Darin Adler and Cameron Zwarich.
19281
19282        Bug 26587: Support JSON.parse
19283        <https://bugs.webkit.org/show_bug.cgi?id=26587>
19284
19285        Extend the LiteralParser to support the full strict JSON
19286        grammar, fix a few places where the grammar was incorrectly
19287        lenient.   Doesn't yet support the JSON.parse reviver function
19288        but that does not block the JSON.parse functionality itself.
19289
19290        * interpreter/Interpreter.cpp:
19291        (JSC::Interpreter::callEval):
19292        * runtime/JSGlobalObjectFunctions.cpp:
19293        (JSC::globalFuncEval):
19294        * runtime/JSONObject.cpp:
19295        (JSC::JSONProtoFuncParse):
19296        * runtime/LiteralParser.cpp:
19297        (JSC::LiteralParser::Lexer::lex):
19298        (JSC::isSafeStringCharacter):
19299        (JSC::LiteralParser::Lexer::lexString):
19300        (JSC::LiteralParser::parse):
19301        * runtime/LiteralParser.h:
19302        (JSC::LiteralParser::LiteralParser):
19303        (JSC::LiteralParser::tryJSONParse):
19304        (JSC::LiteralParser::):
19305        (JSC::LiteralParser::Lexer::Lexer):
19306
193072009-06-21  David Levin  <levin@chromium.org>
19308
19309        Reviewed by NOBODY (speculative build fix for windows).
19310
19311        Simply removed some whitespace form this file to make windows build wtf and
19312        hopefully copy the new MessageQueque.h so that WebCore picks it up.
19313
19314        * wtf/Assertions.cpp:
19315
193162009-06-21  Drew Wilson  <atwilson@google.com>
19317
19318        Reviewed by David Levin.
19319
19320        <https://bugs.webkit.org/show_bug.cgi?id=25043>
19321        Added support for multi-threaded MessagePorts.
19322
19323        * wtf/MessageQueue.h:
19324        (WTF::::appendAndCheckEmpty):
19325            Added API to test whether the queue was empty before adding an element.
19326
193272009-06-20  David D. Kilzer  <ddkilzer@webkit.org>
19328
19329        Fix namespace comment in SegmentedVector.h
19330
19331        * wtf/SegmentedVector.h: Updated namespace comment to reflect
19332        new namespace after r44897.
19333
193342009-06-20  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
19335
19336        Bug 24986: ARM JIT port
19337        <https://bugs.webkit.org/show_bug.cgi?id=24986>
19338
19339        Reviewed by Oliver Hunt.
19340
19341        An Iterator added for SegmentedVector. Currently
19342        only the pre ++ operator is supported.
19343
19344        * wtf/SegmentedVector.h:
19345        (WTF::SegmentedVectorIterator::~SegmentedVectorIterator):
19346        (WTF::SegmentedVectorIterator::operator*):
19347        (WTF::SegmentedVectorIterator::operator->):
19348        (WTF::SegmentedVectorIterator::operator++):
19349        (WTF::SegmentedVectorIterator::operator==):
19350        (WTF::SegmentedVectorIterator::operator!=):
19351        (WTF::SegmentedVectorIterator::operator=):
19352        (WTF::SegmentedVectorIterator::SegmentedVectorIterator):
19353        (WTF::SegmentedVector::alloc):
19354        (WTF::SegmentedVector::begin):
19355        (WTF::SegmentedVector::end):
19356
193572009-06-20  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
19358
19359        Bug 24986: ARM JIT port
19360        <https://bugs.webkit.org/show_bug.cgi?id=24986>
19361
19362        Reviewed by Oliver Hunt.
19363
19364        Move SegmentedVector to /wtf subdirectory
19365        and change "namespace JSC" to "namespace WTF"
19366
19367        Additional build file updates by David Kilzer.
19368
19369        * GNUmakefile.am: Updated path to SegmentedVector.h.
19370        * JavaScriptCore.order: Updated SegmentedVector namespace from
19371        JSC to WTF in mangled C++ method name.
19372        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
19373        Removed reference to bytecompiler\SegmentedVector.h.
19374        * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added reference to
19375        wtf\SegmentedVector.h.
19376        * JavaScriptCore.xcodeproj/project.pbxproj: Moved
19377        SegmentedVector.h definition from bytecompiler subdirectory to
19378        wtf subdirectory.
19379        * bytecompiler/BytecodeGenerator.h: Updated #include path to
19380        SegmentedVector.h and prepended WTF:: namespace to its use.
19381        * parser/Lexer.h: Ditto.
19382        * wtf/SegmentedVector.h: Renamed from JavaScriptCore/bytecompiler/SegmentedVector.h.
19383        (WTF::SegmentedVector::SegmentedVector):
19384        (WTF::SegmentedVector::~SegmentedVector):
19385        (WTF::SegmentedVector::size):
19386        (WTF::SegmentedVector::at):
19387        (WTF::SegmentedVector::operator[]):
19388        (WTF::SegmentedVector::last):
19389        (WTF::SegmentedVector::append):
19390        (WTF::SegmentedVector::removeLast):
19391        (WTF::SegmentedVector::grow):
19392        (WTF::SegmentedVector::clear):
19393        (WTF::SegmentedVector::deleteAllSegments):
19394        (WTF::SegmentedVector::segmentExistsFor):
19395        (WTF::SegmentedVector::segmentFor):
19396        (WTF::SegmentedVector::subscriptFor):
19397        (WTF::SegmentedVector::ensureSegmentsFor):
19398        (WTF::SegmentedVector::ensureSegment):
19399
194002009-06-19  Gavin Barraclough  <barraclough@apple.com>
19401
19402        Reviewed by NOBODY (build fix take 2 - rename FIELD_OFFSET to something that doesn't conflict with winnt.h).
19403
19404        * jit/JIT.cpp:
19405        (JSC::JIT::privateCompile):
19406        (JSC::JIT::privateCompileCTIMachineTrampolines):
19407        (JSC::JIT::emitGetVariableObjectRegister):
19408        (JSC::JIT::emitPutVariableObjectRegister):
19409        * jit/JIT.h:
19410        * jit/JITArithmetic.cpp:
19411        (JSC::JIT::emit_op_rshift):
19412        (JSC::JIT::emitSlow_op_jnless):
19413        (JSC::JIT::emitSlow_op_jnlesseq):
19414        (JSC::JIT::compileBinaryArithOp):
19415        * jit/JITCall.cpp:
19416        (JSC::JIT::compileOpCallInitializeCallFrame):
19417        (JSC::JIT::compileOpCall):
19418        * jit/JITInlineMethods.h:
19419        (JSC::JIT::restoreArgumentReference):
19420        (JSC::JIT::checkStructure):
19421        * jit/JITOpcodes.cpp:
19422        (JSC::JIT::emit_op_instanceof):
19423        (JSC::JIT::emit_op_get_scoped_var):
19424        (JSC::JIT::emit_op_put_scoped_var):
19425        (JSC::JIT::emit_op_construct_verify):
19426        (JSC::JIT::emit_op_resolve_global):
19427        (JSC::JIT::emit_op_jeq_null):
19428        (JSC::JIT::emit_op_jneq_null):
19429        (JSC::JIT::emit_op_to_jsnumber):
19430        (JSC::JIT::emit_op_catch):
19431        (JSC::JIT::emit_op_eq_null):
19432        (JSC::JIT::emit_op_neq_null):
19433        (JSC::JIT::emit_op_convert_this):
19434        (JSC::JIT::emit_op_profile_will_call):
19435        (JSC::JIT::emit_op_profile_did_call):
19436        (JSC::JIT::emitSlow_op_get_by_val):
19437        * jit/JITPropertyAccess.cpp:
19438        (JSC::JIT::emit_op_get_by_val):
19439        (JSC::JIT::emit_op_put_by_val):
19440        (JSC::JIT::emit_op_method_check):
19441        (JSC::JIT::compileGetByIdHotPath):
19442        (JSC::JIT::emit_op_put_by_id):
19443        (JSC::JIT::compilePutDirectOffset):
19444        (JSC::JIT::compileGetDirectOffset):
19445        (JSC::JIT::privateCompilePutByIdTransition):
19446        (JSC::JIT::privateCompilePatchGetArrayLength):
19447        * jit/JITStubs.cpp:
19448        (JSC::JITThunks::JITThunks):
19449
194502009-06-19  Gavin Barraclough  <barraclough@apple.com>
19451
19452        Reviewed by NOBODY (Windows build fix).
19453
19454        * jit/JIT.h:
19455        * jit/JITInlineMethods.h:
19456
194572009-06-19  Gabor Loki  <loki@inf.u-szeged.hu>
19458
19459        Reviewed by Gavin Barraclough.
19460
19461        Reorganize ARM architecture specific macros.
19462        Use PLATFORM_ARM_ARCH(7) instead of PLATFORM(ARM_V7).
19463
19464        Bug 24986: ARM JIT port
19465        <https://bugs.webkit.org/show_bug.cgi?id=24986>
19466
19467        * assembler/ARMv7Assembler.h:
19468        * assembler/AbstractMacroAssembler.h:
19469        (JSC::AbstractMacroAssembler::Imm32::Imm32):
19470        * assembler/MacroAssembler.h:
19471        * assembler/MacroAssemblerCodeRef.h:
19472        (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
19473        * jit/ExecutableAllocator.h:
19474        (JSC::ExecutableAllocator::cacheFlush):
19475        * jit/JIT.h:
19476        * jit/JITInlineMethods.h:
19477        (JSC::JIT::restoreArgumentReferenceForTrampoline):
19478        * jit/JITStubs.cpp:
19479        * jit/JITStubs.h:
19480        * wtf/Platform.h:
19481        * yarr/RegexJIT.cpp:
19482        (JSC::Yarr::RegexGenerator::generateEnter):
19483        (JSC::Yarr::RegexGenerator::generateReturn):
19484
194852009-06-19  Gavin Barraclough  <barraclough@apple.com>
19486
19487        Reviewed by Oliver Hunt.
19488
19489        Fix armv7 JIT build issues.
19490
19491        Unfortunate the arm compiler does not like the use of offsetof on JITStackFrame (since it now contains non POD types),
19492        and the FIELD_OFFSET macro does not appear constantish enough for it to be happy with its use in COMPILE_ASSERT macros.
19493
19494        * Replace offsetofs with FIELD_OFFSETs (safe on C++ objects).
19495        * Move COMPILE_ASSERTs defending layout of JITStackFrame structure on armv7 into JITThunks constructor.
19496
19497        * jit/JIT.cpp:
19498        * jit/JIT.h:
19499        * jit/JITInlineMethods.h:
19500        (JSC::JIT::restoreArgumentReference):
19501        * jit/JITOpcodes.cpp:
19502        (JSC::JIT::emit_op_catch):
19503        * jit/JITStubs.cpp:
19504        (JSC::JITThunks::JITThunks):
19505
195062009-06-19  Adam Treat  <adam.treat@torchmobile.com>
19507
19508        Blind attempt at build fix.
19509
19510        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
19511        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
19512
195132009-06-19  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
19514
19515        Reviewed by Oliver Hunt.
19516
19517        Inherits CallIdentifier struct from FastAllocBase because it has been
19518        instantiated by 'new' in JavaScriptCore/profiler/CallIdentifier.h:86.
19519
19520        * wtf/HashCountedSet.h:
19521
195222009-06-19  Adam Treat  <adam.treat@torchmobile.com>
19523
19524        Reviewed by Oliver Hunt.
19525
19526        https://bugs.webkit.org/show_bug.cgi?id=26540
19527        Modify the test shell to add a new function 'checkSyntax' that will
19528        only parse the source instead of executing it. In this way we can test
19529        pure parsing performance against some of the larger scripts in the wild.
19530
19531        * jsc.cpp:
19532        (GlobalObject::GlobalObject):
19533        (functionCheckSyntax):
19534
195352009-06-19  Zoltan Horvath  <hzoltan@inf.u-szeged.hu>
19536
19537        Reviewed by Darin Adler.
19538
19539        Inherits HashCountedSet class from FastAllocBase because it has been
19540        instantiated by 'new' in JavaScriptCore/runtime/Collector.cpp:1095.
19541
19542        * wtf/HashCountedSet.h:
19543
195442009-06-19  Yong Li  <yong.li@torchmobile.com>
19545
19546        Reviewed by George Staikos.
19547
19548        https://bugs.webkit.org/show_bug.cgi?id=26558
19549        Declare these symbols extern for WINCE as they are provided by libce.
19550
19551        * runtime/DateConstructor.cpp:
19552        * runtime/DatePrototype.cpp:
19553        (JSC::formatLocaleDate):
19554
195552009-06-19  Oliver Hunt  <oliver@apple.com>
19556
19557        Reviewed by Maciej Stachowiak.
19558
19559        <rdar://problem/6988973> ScopeChain leak in interpreter builds
19560
19561        Move the Scopechain destruction code in JSFunction outside of the ENABLE(JIT)
19562        path.
19563
19564        * runtime/JSFunction.cpp:
19565        (JSC::JSFunction::~JSFunction):
19566        * wtf/Platform.h:
19567
195682009-06-19  Yong Li  <yong.li@torchmobile.com>
19569
19570        Reviewed by George Staikos.
19571
19572        https://bugs.webkit.org/show_bug.cgi?id=26543
19573        Windows CE uses 'GetLastError' instead of 'errno.'
19574
19575        * interpreter/RegisterFile.h:
19576        (JSC::RegisterFile::RegisterFile):
19577        (JSC::RegisterFile::grow):
19578
195792009-06-19  David Levin  <levin@chromium.org>
19580
19581        Reviewed by NOBODY (Windows build fix).
19582
19583        Add export for Windows corresponding to OSX export done in r44844.
19584        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
19585        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
19586
195872009-06-18  Oliver Hunt  <oliver@apple.com>
19588
19589        Reviewed by Gavin "Viceroy of Venezuela" Barraclough.
19590
19591        Bug 26532: Native functions do not correctly unlink from optimised callsites when they're collected
19592        <https://bugs.webkit.org/show_bug.cgi?id=26532> <rdar://problem/6625385>
19593
19594        We need to make sure that each native function instance correctly unlinks any references to it
19595        when it is collected.  Allowing this to happen required a few changes:
19596            * Every native function needs a codeblock to track the link information
19597            * To have this codeblock, every function now also needs its own functionbodynode
19598              so we no longer get to have a single shared instance.
19599            * Identifying a host function is now done by looking for CodeBlock::codeType() == NativeCode
19600
19601        * JavaScriptCore.exp:
19602        * bytecode/CodeBlock.cpp:
19603        (JSC::CodeBlock::CodeBlock):
19604           Constructor for NativeCode CodeBlock
19605        (JSC::CodeBlock::derefStructures):
19606        (JSC::CodeBlock::refStructures):
19607        (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
19608        (JSC::CodeBlock::handlerForBytecodeOffset):
19609        (JSC::CodeBlock::lineNumberForBytecodeOffset):
19610        (JSC::CodeBlock::expressionRangeForBytecodeOffset):
19611        (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
19612        (JSC::CodeBlock::functionRegisterForBytecodeOffset):
19613        (JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset):
19614        (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset):
19615        (JSC::CodeBlock::setJITCode):
19616           Add assertions to ensure we don't try and use NativeCode CodeBlocks as
19617           a normal codeblock.
19618
19619        * bytecode/CodeBlock.h:
19620        (JSC::):
19621        (JSC::CodeBlock::source):
19622        (JSC::CodeBlock::sourceOffset):
19623        (JSC::CodeBlock::evalCodeCache):
19624        (JSC::CodeBlock::createRareDataIfNecessary):
19625          More assertions.
19626
19627        * jit/JIT.cpp:
19628        (JSC::JIT::privateCompileCTIMachineTrampolines):
19629        (JSC::JIT::linkCall):
19630          Update logic to allow native function caching
19631
19632        * jit/JITStubs.cpp:
19633        * parser/Nodes.cpp:
19634        (JSC::FunctionBodyNode::createNativeThunk):
19635        (JSC::FunctionBodyNode::isHostFunction):
19636        * parser/Nodes.h:
19637        * runtime/JSFunction.cpp:
19638        (JSC::JSFunction::JSFunction):
19639        (JSC::JSFunction::~JSFunction):
19640        (JSC::JSFunction::mark):
19641        * runtime/JSGlobalData.cpp:
19642        (JSC::JSGlobalData::~JSGlobalData):
19643        * runtime/JSGlobalData.h:
19644
196452009-06-18  Gavin Barraclough  <barraclough@apple.com>
19646
19647        Reviewed by NOBODY (Windows build fix).
19648
19649        * wtf/DateMath.cpp:
19650        (WTF::calculateUTCOffset):
19651
196522009-06-18  Gavin Barraclough  <barraclough@apple.com>
19653
19654        Reviewed by Geoff Garen.
19655
19656        Timezone calculation incorrect in Venezuela.
19657
19658        https://bugs.webkit.org/show_bug.cgi?id=26531
19659        <rdar://problem/6646169> Time is incorrectly reported to JavaScript in both Safari 3 and Firefox 3
19660
19661        The problem is that we're calculating the timezone relative to 01/01/2000,
19662        but the VET timezone changed from -4 hours to -4:30 hours on 12/09/2007.
19663        According to the spec, section 15.9.1.9 states "the time since the beginning
19664        of the year", presumably meaning the *current* year.  Change the calculation
19665        to be based on whatever the current year is, rather than a canned date.
19666
19667        No performance impact.
19668
19669        * wtf/DateMath.cpp:
19670        (WTF::calculateUTCOffset):
19671
196722009-06-18  Gavin Barraclough  <barraclough@apple.com>
19673
19674        Rubber Stamped by Mark Rowe (originally reviewed by Sam Weinig).
19675
19676        (Reintroducing patch added in r44492, and reverted in r44796.)
19677
19678        Change the implementation of op_throw so the stub function always modifies its
19679        return address - if it doesn't find a 'catch' it will switch to a trampoline
19680        to force a return from JIT execution.  This saves memory, by avoiding the need
19681        for a unique return for every op_throw.
19682
19683        * jit/JITOpcodes.cpp:
19684        (JSC::JIT::emit_op_throw):
19685            JITStubs::cti_op_throw now always changes its return address,
19686            remove return code generated after the stub call (this is now
19687            handled by ctiOpThrowNotCaught).
19688        * jit/JITStubs.cpp:
19689        (JSC::):
19690            Add ctiOpThrowNotCaught definitions.
19691        (JSC::JITStubs::DEFINE_STUB_FUNCTION):
19692            Change cti_op_throw to always change its return address.
19693        * jit/JITStubs.h:
19694            Add ctiOpThrowNotCaught declaration.
19695
196962009-06-18  Kevin McCullough  <kmccullough@apple.com>
19697
19698        Reviewed by Oliver Hunt.
19699
19700        <rdar://problem/6940880> REGRESSION: Breakpoints don't break in 64-bit
19701
19702        - Exposed functions now needed by WebCore.
19703
19704        * JavaScriptCore.exp:
19705
197062009-06-17  Darin Adler  <darin@apple.com>
19707
19708        Reviewed by Oliver Hunt.
19709
19710        Bug 26429: Make JSON.stringify non-recursive so it can handle objects
19711        of arbitrary complexity
19712        https://bugs.webkit.org/show_bug.cgi?id=26429
19713
19714        For marking I decided not to use gcProtect, because this is inside the engine
19715        so it's easy enough to just do marking. And that darned gcProtect does locking!
19716        Oliver tried to convince me to used MarkedArgumentBuffer, but the constructor
19717        for that class says "FIXME: Remove all clients of this API, then remove this API."
19718
19719        * runtime/Collector.cpp:
19720        (JSC::Heap::collect): Add a call to JSONObject::markStringifiers.
19721
19722        * runtime/CommonIdentifiers.cpp:
19723        (JSC::CommonIdentifiers::CommonIdentifiers): Added emptyIdentifier.
19724        * runtime/CommonIdentifiers.h: Ditto.
19725
19726        * runtime/JSGlobalData.cpp:
19727        (JSC::JSGlobalData::JSGlobalData): Initialize firstStringifierToMark to 0.
19728        * runtime/JSGlobalData.h: Added firstStringifierToMark.
19729
19730        * runtime/JSONObject.cpp: Cut down the includes to the needed ones only.
19731        (JSC::unwrapNumberOrString): Added. Helper for unwrapping number and string
19732        objects to get their number and string values.
19733        (JSC::ReplacerPropertyName::ReplacerPropertyName): Added. The class is used
19734        to wrap an identifier or integer so we don't have to do any work unless we
19735        actually call a replacer.
19736        (JSC::ReplacerPropertyName::value): Added.
19737        (JSC::gap): Added. Helper function for the Stringifier constructor.
19738        (JSC::PropertyNameForFunctionCall::PropertyNameForFunctionCall): Added.
19739        The class is used to wrap an identifier or integer so we don't have to
19740        allocate a number or string until we actually call toJSON or a replacer.
19741        (JSC::PropertyNameForFunctionCall::asJSValue): Added.
19742        (JSC::Stringifier::Stringifier): Updated and moved out of the class
19743        definition. Added code to hook this into a singly linked list for marking.
19744        (JSC::Stringifier::~Stringifier): Remove from the singly linked list.
19745        (JSC::Stringifier::mark): Mark all the objects in the holder stacks.
19746        (JSC::Stringifier::stringify): Updated.
19747        (JSC::Stringifier::appendQuotedString): Tweaked and streamlined a bit.
19748        (JSC::Stringifier::toJSON): Renamed from toJSONValue.
19749        (JSC::Stringifier::appendStringifiedValue): Renamed from stringify.
19750        Added code to use the m_holderStack to do non-recursive stringify of
19751        objects and arrays. This code also uses the timeout checker since in
19752        pathological cases it could be slow even without calling into the
19753        JavaScript virtual machine.
19754        (JSC::Stringifier::willIndent): Added.
19755        (JSC::Stringifier::indent): Added.
19756        (JSC::Stringifier::unindent): Added.
19757        (JSC::Stringifier::startNewLine): Added.
19758        (JSC::Stringifier::Holder::Holder): Added.
19759        (JSC::Stringifier::Holder::appendNextProperty): Added. This is the
19760        function that handles the format of arrays and objects.
19761        (JSC::JSONObject::getOwnPropertySlot): Moved this down to the bottom
19762        of the file so the JSONObject class is not interleaved with the
19763        Stringifier class.
19764        (JSC::JSONObject::markStringifiers): Added. Calls mark.
19765        (JSC::JSONProtoFuncStringify): Streamlined the code here. The code
19766        to compute the gap string is now a separate function.
19767
19768        * runtime/JSONObject.h: Made everything private. Added markStringifiers.
19769
197702009-06-17  Oliver Hunt  <oliver@apple.com>
19771
19772        Reviewed by Gavin Barraclough.
19773
19774        <rdar://problem/6974140> REGRESSION(r43849): Crash in cti_op_call_NotJSFunction when getting directions on maps.google.com
19775
19776        Roll out r43849 as it appears that we cannot rely on the address of
19777        an objects property storage being constant even if the structure is
19778        unchanged.
19779
19780        * jit/JIT.h:
19781        * jit/JITPropertyAccess.cpp:
19782        (JSC::JIT::compileGetDirectOffset):
19783        (JSC::JIT::privateCompileGetByIdProto):
19784        (JSC::JIT::privateCompileGetByIdProtoList):
19785        (JSC::JIT::privateCompileGetByIdChainList):
19786        (JSC::JIT::privateCompileGetByIdChain):
19787
197882009-06-17  Gavin Barraclough  <barraclough@apple.com>
19789
19790        Rubber Stamped by Mark Rowe.
19791
19792        Fully revert r44492 & r44748 while we fix a bug they cause on internal builds <rdar://problem/6955963>.
19793
19794        * jit/JITOpcodes.cpp:
19795        (JSC::JIT::emit_op_throw):
19796        * jit/JITStubs.cpp:
19797        (JSC::):
19798        (JSC::JITStubs::DEFINE_STUB_FUNCTION):
19799        * jit/JITStubs.h:
19800
198012009-06-17  Gavin Barraclough  <barraclough@apple.com>
19802
19803        Reviewed by Mark Rowe.
19804
19805        <rdar://problem/6947426> sunspider math-cordic.js exhibits different intermediate results running 32-bit vs. 64-bit
19806
19807        On 64-bit, NaN-encoded values must be detagged before they can be used in rshift.
19808
19809        No performance impact.
19810
19811        * jit/JITArithmetic.cpp:
19812        (JSC::JIT::emit_op_rshift):
19813
198142009-06-17  Adam Treat  <adam.treat@torchmobile.com>
19815
19816        Reviewed by George Staikos.
19817
19818        https://bugs.webkit.org/show_bug.cgi?id=23155
19819        Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks.
19820
19821        * jsc.cpp:
19822        (main):
19823
198242009-06-17  George Staikos  <george.staikos@torchmobile.com>
19825
19826        Reviewed by Adam Treat.
19827
19828        https://bugs.webkit.org/show_bug.cgi?id=23155
19829        Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks.
19830
19831        * config.h:
19832        * jsc.cpp:
19833        * wtf/Assertions.cpp:
19834        * wtf/Assertions.h:
19835        * wtf/CurrentTime.cpp:
19836        (WTF::lowResUTCTime):
19837        * wtf/DateMath.cpp:
19838        (WTF::getLocalTime):
19839        * wtf/MathExtras.h:
19840        * wtf/Platform.h:
19841        * wtf/StringExtras.h:
19842        * wtf/Threading.h:
19843        * wtf/win/MainThreadWin.cpp:
19844
198452009-06-17  Gavin Barraclough  <barraclough@apple.com>
19846
19847        Reviewed by Oliver Hunt.
19848
19849        <rdar://problem/6974175> ASSERT in JITStubs.cpp at appsaccess.apple.com
19850
19851        Remove PropertySlot::putValue - PropertySlots should only be used for getting,
19852        not putting.  Rename JSGlobalObject::getOwnPropertySlot to hasOwnPropertyForWrite,
19853        which is what it really was being used to ask, and remove some other getOwnPropertySlot
19854        & getOwnPropertySlotForWrite methods, which were unused and likely to lead to confusion.
19855
19856        * runtime/JSGlobalObject.h:
19857        (JSC::JSGlobalObject::hasOwnPropertyForWrite):
19858        * runtime/JSObject.h:
19859        * runtime/JSStaticScopeObject.cpp:
19860        * runtime/JSStaticScopeObject.h:
19861        * runtime/PropertySlot.h:
19862
198632009-06-16  Gavin Barraclough  <barraclough@apple.com>
19864
19865        Reviewed by Oliver hunt.
19866
19867        Temporarily partially disable r44492, since this is causing some problems on internal builds.
19868
19869        * jit/JITOpcodes.cpp:
19870        (JSC::JIT::emit_op_throw):
19871        * jit/JITStubs.cpp:
19872        (JSC::JITStubs::DEFINE_STUB_FUNCTION):
19873
198742009-06-16  Sam Weinig  <sam@webkit.org>
19875
19876        Fix windows build.
19877
19878        * jit/JIT.cpp:
19879        (JSC::JIT::JIT):
19880
198812009-06-16  Sam Weinig  <sam@webkit.org>
19882
19883        Reviewed by Oliver Hunt.
19884
19885        Initialize m_bytecodeIndex to -1 in JIT, and correctly initialize
19886        it for each type of stub using the return address to find the correct
19887        offset.
19888
19889        * jit/JIT.cpp:
19890        (JSC::JIT::JIT):
19891        * jit/JIT.h:
19892        (JSC::JIT::compileGetByIdProto):
19893        (JSC::JIT::compileGetByIdSelfList):
19894        (JSC::JIT::compileGetByIdProtoList):
19895        (JSC::JIT::compileGetByIdChainList):
19896        (JSC::JIT::compileGetByIdChain):
19897        (JSC::JIT::compilePutByIdTransition):
19898        (JSC::JIT::compileCTIMachineTrampolines):
19899        (JSC::JIT::compilePatchGetArrayLength):
19900        * jit/JITStubCall.h:
19901        (JSC::JITStubCall::call):
19902
19903== Rolled over to ChangeLog-2009-06-16 ==
19904