Revert r53454, since it causes much sadness in this world.
[WebKit-https.git] / JavaScriptCore / ChangeLog
1 2010-01-18  Gavin Barraclough  <barraclough@apple.com>
2
3         Reviewed by NOBODY (build fix).
4
5         Revert r53454, since it causes much sadness in this world.
6
7         * runtime/UString.cpp:
8         (JSC::UString::spliceSubstringsWithSeparators):
9         (JSC::UString::replaceRange):
10         * runtime/UStringImpl.cpp:
11         (JSC::UStringImpl::baseSharedBuffer):
12         (JSC::UStringImpl::sharedBuffer):
13         (JSC::UStringImpl::~UStringImpl):
14         * runtime/UStringImpl.h:
15         (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield):
16         (JSC::UntypedPtrAndBitfield::asPtr):
17         (JSC::UntypedPtrAndBitfield::operator&=):
18         (JSC::UntypedPtrAndBitfield::operator|=):
19         (JSC::UntypedPtrAndBitfield::operator&):
20         (JSC::UStringImpl::create):
21         (JSC::UStringImpl::cost):
22         (JSC::UStringImpl::isIdentifier):
23         (JSC::UStringImpl::setIsIdentifier):
24         (JSC::UStringImpl::ref):
25         (JSC::UStringImpl::deref):
26         (JSC::UStringImpl::checkConsistency):
27         (JSC::UStringImpl::UStringImpl):
28         (JSC::UStringImpl::bufferOwnerString):
29         (JSC::UStringImpl::bufferOwnership):
30         (JSC::UStringImpl::isStatic):
31         * wtf/StringHashFunctions.h:
32         (WTF::stringHash):
33
34 2010-01-18  Geoffrey Garen  <ggaren@apple.com>
35
36         Reviewed by Oliver Hunt.
37
38         REGRESSION (52082): Crash on worker thread when reloading http://radnan.public.iastate.edu/procedural/
39         https://bugs.webkit.org/show_bug.cgi?id=33826
40
41         This bug was caused by a GC-protected object being destroyed early by
42         Heap::destroy. Clients of the GC protect APIs (reasonably) expect pointers
43         to GC-protected memory to be valid.
44
45         The solution is to do two passes of tear-down in Heap::destroy. The first
46         pass tears down all unprotected objects. The second pass ASSERTs that all
47         previously protected objects are now unprotected, and then tears down
48         all perviously protected objects. These two passes simulate the two passes
49         that would have been required to free a protected object during normal GC.
50         
51         * API/JSContextRef.cpp: Removed some ASSERTs that have moved into Heap.
52
53         * runtime/Collector.cpp:
54         (JSC::Heap::destroy): Moved ASSERTs to here.
55         (JSC::Heap::freeBlock): Tidied up the use of didShrink by moving its
56         setter to the function that does the shrinking.
57         (JSC::Heap::freeBlocks): Implemented above algorithm.
58         (JSC::Heap::shrinkBlocks): Tidied up the use of didShrink.
59
60 2010-01-18  Gavin Barraclough  <barraclough@apple.com>
61
62         Reviewed by Oliver Hunt.
63
64         https://bugs.webkit.org/show_bug.cgi?id=33731
65         Remove UntypedPtrAndBitfield from UStringImpl (akin to PtrAndFlags).
66
67         This break the OS X Leaks tool.  Instead, free up some more bits from the refCount.
68
69         * runtime/UStringImpl.cpp:
70         (JSC::UStringImpl::sharedBuffer):
71         (JSC::UStringImpl::~UStringImpl):
72         * runtime/UStringImpl.h:
73         (JSC::UStringImpl::cost):
74         (JSC::UStringImpl::checkConsistency):
75         (JSC::UStringImpl::UStringImpl):
76         (JSC::UStringImpl::bufferOwnerString):
77         (JSC::UStringImpl::):
78         * wtf/StringHashFunctions.h:
79         (WTF::stringHash):
80
81 2010-01-18  Kent Tamura  <tkent@chromium.org>
82
83         Reviewed by Darin Adler.
84
85         HTMLInputElement::valueAsDate setter support for type=month.
86         https://bugs.webkit.org/show_bug.cgi?id=33021
87
88         Expose the following functions to be used by WebCore:
89          - WTF::msToyear()
90          - WTF::dayInYear()
91          - WTF::monthFromDayInYear()
92          - WTF::dayInMonthFromDayInYear()
93
94         * JavaScriptCore.exp:
95         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
96         * wtf/DateMath.cpp:
97         (WTF::msToYear): Remove "static inline".
98         (WTF::dayInYear): Remove "static inline".
99         (WTF::monthFromDayInYear): Remove "static inline".
100         (WTF::dayInMonthFromDayInYear): Remove "static inline".
101         * wtf/DateMath.h: Declare the above functions.
102
103 2010-01-18  Darin Adler  <darin@apple.com>
104
105         Fix build by reverting the previous change.
106
107         * runtime/UString.h: Rolled out the FastAllocBase base class.
108         It was making UString larger, and therefore JSString larger,
109         and too big for a garbage collection cell.
110
111         This raises the unpleasant possibility that many classes became
112         larger because we added the FastAllocBase base class. I am
113         worried about this, and it needs to be investigated.
114
115 2010-01-18  Zoltan Horvath  <zoltan@webkit.org>
116
117         Reviewed by Darin Adler.
118
119         Allow custom memory allocation control for UString class
120         https://bugs.webkit.org/show_bug.cgi?id=27831
121
122         Inherits the following class from FastAllocBase because it is
123         instantiated by 'new' and no need to be copyable:
124
125         class name     - instantiated at:
126         classs UString - JavaScriptCore/runtime/UString.cpp:160
127
128         * runtime/UString.h:
129
130 2010-01-18  Evan Cheng  <evan.cheng@apple.com>
131
132         Reviewed by Darin Adler.
133
134         Add some ALWAYS_INLINE for key functions not inlined by some versions of GCC.
135         rdar://problem/7553780
136
137         * runtime/JSObject.h:
138         (JSC::JSObject::getPropertySlot): ALWAYS_INLINE both overloads.
139         * runtime/JSString.h:
140         (JSC::JSString::JSString): ALWAYS_INLINE the version that takes a UString.
141         * runtime/UString.h:
142         (JSC::operator==): ALWAYS_INLINE the version that compares two UString objects.
143
144 2010-01-18  Csaba Osztrogonác  <ossy@webkit.org>
145
146         Reviewed by Darin Adler.
147
148         Delete dftables-xxxxxxxx.in files automatically.
149         https://bugs.webkit.org/show_bug.cgi?id=33796
150
151         * pcre/dftables: unlink unnecessary temporary file.
152
153 2010-01-18  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
154
155         Reviewed by Simon Hausmann.
156
157         [Qt] Force qmake to generate a single makefile for DerivedSources.pro
158
159         * DerivedSources.pro:
160
161 2010-01-18  Csaba Osztrogonác  <ossy@webkit.org>
162
163         Rubber-stamped by Gustavo Noronha Silva.
164
165         Rolling out r53391 and r53392 because of random crashes on buildbots.
166         https://bugs.webkit.org/show_bug.cgi?id=33731
167
168         * bytecode/CodeBlock.h:
169         (JSC::CallLinkInfo::seenOnce):
170         (JSC::CallLinkInfo::setSeen):
171         (JSC::MethodCallLinkInfo::MethodCallLinkInfo):
172         (JSC::MethodCallLinkInfo::seenOnce):
173         (JSC::MethodCallLinkInfo::setSeen):
174         * jit/JIT.cpp:
175         (JSC::JIT::unlinkCall):
176         * jit/JITPropertyAccess.cpp:
177         (JSC::JIT::patchMethodCallProto):
178         * runtime/UString.cpp:
179         (JSC::UString::spliceSubstringsWithSeparators):
180         (JSC::UString::replaceRange):
181         * runtime/UString.h:
182         * runtime/UStringImpl.cpp:
183         (JSC::UStringImpl::baseSharedBuffer):
184         (JSC::UStringImpl::sharedBuffer):
185         (JSC::UStringImpl::~UStringImpl):
186         * runtime/UStringImpl.h:
187         (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield):
188         (JSC::UntypedPtrAndBitfield::asPtr):
189         (JSC::UntypedPtrAndBitfield::operator&=):
190         (JSC::UntypedPtrAndBitfield::operator|=):
191         (JSC::UntypedPtrAndBitfield::operator&):
192         (JSC::UStringImpl::create):
193         (JSC::UStringImpl::cost):
194         (JSC::UStringImpl::isIdentifier):
195         (JSC::UStringImpl::setIsIdentifier):
196         (JSC::UStringImpl::ref):
197         (JSC::UStringImpl::deref):
198         (JSC::UStringImpl::checkConsistency):
199         (JSC::UStringImpl::UStringImpl):
200         (JSC::UStringImpl::bufferOwnerString):
201         (JSC::UStringImpl::bufferOwnership):
202         (JSC::UStringImpl::isStatic):
203         * wtf/StringHashFunctions.h:
204         (WTF::stringHash):
205
206 2010-01-18  Simon Hausmann  <simon.hausmann@nokia.com>
207
208         Reviewed by Kenneth Rohde Christiansen.
209
210         Fix the build with strict gcc and RVCT versions: It's not legal to cast a
211         pointer to a function to a void* without an intermediate cast to a non-pointer
212         type. A cast to a ptrdiff_t inbetween fixes it.
213
214         * runtime/JSString.h:
215         (JSC::Fiber::JSString):
216
217 2010-01-15  Gavin Barraclough  <barraclough@apple.com>
218
219         Reviewed by Oliver Hunt.
220
221         https://bugs.webkit.org/show_bug.cgi?id=33731
222         Remove UntypedPtrAndBitfield from UStringImpl (akin to PtrAndFlags).
223
224         This break the OS X Leaks tool.  Instead, free up some more bits from the refCount.
225
226         * runtime/UStringImpl.cpp:
227         (JSC::UStringImpl::sharedBuffer):
228         (JSC::UStringImpl::~UStringImpl):
229         * runtime/UStringImpl.h:
230         (JSC::UStringImpl::cost):
231         (JSC::UStringImpl::checkConsistency):
232         (JSC::UStringImpl::UStringImpl):
233         (JSC::UStringImpl::bufferOwnerString):
234         (JSC::UStringImpl::):
235         * wtf/StringHashFunctions.h:
236         (WTF::stringHash):
237
238 2010-01-15  Gavin Barraclough  <barraclough@apple.com>
239
240         Reviewed by Oliver Hunt.
241
242         https://bugs.webkit.org/show_bug.cgi?id=33731
243         Remove uses of PtrAndFlags from JIT data stuctures.
244
245         These break the OS X Leaks tool.  Free up a bit in CallLinkInfo, and invalid
246         permutation of pointer states in MethodCallLinkInfo to represent the removed bits.
247
248         * bytecode/CodeBlock.h:
249         (JSC::CallLinkInfo::seenOnce):
250         (JSC::CallLinkInfo::setSeen):
251         (JSC::MethodCallLinkInfo::MethodCallLinkInfo):
252         (JSC::MethodCallLinkInfo::seenOnce):
253         (JSC::MethodCallLinkInfo::setSeen):
254         * jit/JIT.cpp:
255         (JSC::JIT::unlinkCall):
256         * jit/JITPropertyAccess.cpp:
257         (JSC::JIT::patchMethodCallProto):
258         * runtime/UString.h:
259
260 2010-01-16  Maciej Stachowiak  <mjs@apple.com>
261
262         Reviewed by Oliver Hunt.
263
264         Cache JS string values made from DOM strings (Dromaeo speedup)
265         https://bugs.webkit.org/show_bug.cgi?id=33768
266         <rdar://problem/7353576>
267
268         * runtime/JSString.h:
269         (JSC::jsStringWithFinalizer): Added new mechanism for a string to have an optional
270         finalizer callback, for the benefit of weak-referencing caches.
271         (JSC::):
272         (JSC::Fiber::JSString):
273         (JSC::Fiber::~JSString):
274         * runtime/JSString.cpp:
275         (JSC::JSString::resolveRope): Clear fibers so this doesn't look like a string with a finalizer.
276         * runtime/WeakGCMap.h: Include "Collector.h" to make this header includable by itself.
277
278 2010-01-15  Sam Weinig  <sam@webkit.org>
279
280         Reviewed by Maciej Stachowiak.
281
282         Fix for <rdar://problem/7548432>
283         Add ALWAYS_INLINE to jsLess for a 1% speedup on llvm-gcc.
284
285         * runtime/Operations.h:
286         (JSC::jsLess):
287
288 2010-01-14  Geoffrey Garen  <ggaren@apple.com>
289
290         Reviewed by Oliver Hunt.
291
292         REGRESISON: Google maps buttons not working properly
293         https://bugs.webkit.org/show_bug.cgi?id=31871
294
295         REGRESSION(r52948): JavaScript exceptions thrown on Google Maps when
296         getting directions for a second time
297         https://bugs.webkit.org/show_bug.cgi?id=33446
298         
299         SunSpider and v8 report no change.
300
301         * interpreter/Interpreter.cpp:
302         (JSC::Interpreter::tryCacheGetByID): Update our cached offset in case
303         flattening the dictionary changed any of its offsets.
304
305         * jit/JITStubs.cpp:
306         (JSC::JITThunks::tryCacheGetByID):
307         (JSC::DEFINE_STUB_FUNCTION):
308         * runtime/Operations.h:
309         (JSC::normalizePrototypeChain): ditto
310
311 2010-01-14  Gavin Barraclough  <barraclough@apple.com>
312
313         Reviewed by Oliver Hunt.
314
315         https://bugs.webkit.org/show_bug.cgi?id=33705
316         UStringImpl::create() should use internal storage
317
318         When creating a UStringImpl copying of a UChar*, we can use an internal buffer,
319         by calling UStringImpl::tryCreateUninitialized().
320
321         Also, remove duplicate of copyChars from JSString, call UStringImpl's version.
322
323         Small (max 0.5%) progression on Sunspidey.
324
325         * runtime/JSString.cpp:
326         (JSC::JSString::resolveRope):
327         * runtime/UStringImpl.h:
328         (JSC::UStringImpl::create):
329
330 2010-01-14  Gavin Barraclough  <barraclough@apple.com>
331
332         Reviewed by Sam Weinig.
333
334         Make naming & behaviour of UString[Impl] methods more consistent.
335         https://bugs.webkit.org/show_bug.cgi?id=33702
336
337         UString::create() creates a copy of the UChar* passed, but UStringImpl::create() assumes
338         that it should assume ownership of the provided buffer (with UString::createNonCopying()
339         and UStringImpl::createCopying() providing the alternate behaviours).  Unify on create()
340         taking a copy of the provided buffer.  For non-copying cases, use the name 'adopt', and
341         make this method take a Vector<UChar>&.  For cases where non-copying construction was being
342         used, other than from a Vector<UChar>, change the code to allocate the storage along with
343         the UStringImpl using UStringImpl::createUninitialized().  (The adopt() method also more
344         closely matches that of WebCore::StringImpl).
345
346         Also, UString::createUninitialized() and UStringImpl::createUninitialized() have incompatible
347         behaviours, in that the UString form sets the provided UChar* to a null or non-null value to
348         indicate success or failure, but UStringImpl uses the returned PassRefPtr<UStringImpl> to
349         indicate when allocation has failed (potentially leaving the output Char* uninitialized).
350         This is also incompatible with WebCore::StringImpl's behaviour, in that
351         StringImpl::createUninitialized() will CRASH() if unable to allocate.  Some uses of
352         createUninitialized() in JSC are unsafe, since they do not test the result for null.
353         UStringImpl's indication is preferable, since we may want a successful call to set the result
354         buffer to 0 (specifically, StringImpl returns 0 for the buffer where createUninitialized()
355         returns the empty string, which seems reasonable to catch bugs early).  UString's method
356         cannot support UStringImpl's behaviour directly, since it returns an object rather than a
357         pointer.
358             - remove UString::createUninitialized(), replace with calls to UStringImpl::createUninitialized()
359             - create a UStringImpl::tryCreateUninitialized() form UStringImpl::createUninitialized(),
360               with current behaviour, make createUninitialized() crash on failure to allocate.
361             - make cases in JSC that do not check the result call createUninitialized(), and cases that do
362               check call tryCreateUninitialized().
363
364         Rename computedHash() to existingHash(), to bring this in line wih WebCore::StringImpl.
365
366         * API/JSClassRef.cpp:
367         (OpaqueJSClassContextData::OpaqueJSClassContextData):
368         * JavaScriptCore.exp:
369         * runtime/ArrayPrototype.cpp:
370         (JSC::arrayProtoFuncToString):
371         * runtime/Identifier.cpp:
372         (JSC::CStringTranslator::translate):
373         (JSC::UCharBufferTranslator::translate):
374         * runtime/JSString.cpp:
375         (JSC::JSString::resolveRope):
376         * runtime/Lookup.cpp:
377         (JSC::HashTable::createTable):
378         * runtime/Lookup.h:
379         (JSC::HashTable::entry):
380         * runtime/StringBuilder.h:
381         (JSC::StringBuilder::release):
382         * runtime/StringConstructor.cpp:
383         (JSC::stringFromCharCodeSlowCase):
384         * runtime/StringPrototype.cpp:
385         (JSC::substituteBackreferencesSlow):
386         (JSC::stringProtoFuncToLowerCase):
387         (JSC::stringProtoFuncToUpperCase):
388         (JSC::stringProtoFuncFontsize):
389         (JSC::stringProtoFuncLink):
390         * runtime/Structure.cpp:
391         (JSC::Structure::despecifyDictionaryFunction):
392         (JSC::Structure::get):
393         (JSC::Structure::despecifyFunction):
394         (JSC::Structure::put):
395         (JSC::Structure::remove):
396         (JSC::Structure::insertIntoPropertyMapHashTable):
397         (JSC::Structure::checkConsistency):
398         * runtime/Structure.h:
399         (JSC::Structure::get):
400         * runtime/StructureTransitionTable.h:
401         (JSC::StructureTransitionTableHash::hash):
402         * runtime/UString.cpp:
403         (JSC::createRep):
404         (JSC::UString::UString):
405         (JSC::UString::spliceSubstringsWithSeparators):
406         (JSC::UString::replaceRange):
407         (JSC::UString::operator=):
408         * runtime/UString.h:
409         (JSC::UString::adopt):
410         (JSC::IdentifierRepHash::hash):
411         (JSC::makeString):
412         * runtime/UStringImpl.h:
413         (JSC::UStringImpl::adopt):
414         (JSC::UStringImpl::create):
415         (JSC::UStringImpl::createUninitialized):
416         (JSC::UStringImpl::tryCreateUninitialized):
417         (JSC::UStringImpl::existingHash):
418
419 2010-01-13  Kent Hansen  <kent.hansen@nokia.com>
420
421         Reviewed by Oliver Hunt.
422
423         JSON.stringify and JSON.parse needlessly process properties in the prototype chain
424         https://bugs.webkit.org/show_bug.cgi?id=33053
425
426         * runtime/JSONObject.cpp:
427         (JSC::Stringifier::Holder::appendNextProperty):
428         (JSC::Walker::walk):
429
430 2010-01-13  Gavin Barraclough  <barraclough@apple.com>
431
432         Reviewed by NOBODY (buildfix).
433
434         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
435
436 2010-01-13  Alexey Proskuryakov  <ap@apple.com>
437
438         Reviewed by Darin Adler.
439
440         https://bugs.webkit.org/show_bug.cgi?id=33641
441         Assertion failure in Lexer.cpp if input stream ends while in string escape
442
443         Test: fast/js/end-in-string-escape.html
444
445         * parser/Lexer.cpp: (JSC::Lexer::lex): Bail out quickly on end of stream, not giving the
446         assertion a chance to fire.
447
448 2010-01-13  Gavin Barraclough  <barraclough@apple.com>
449
450         Reviewed by NOBODY (buildfix).
451
452         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
453
454 2010-01-13  Gavin Barraclough  <barraclough@apple.com>
455
456         Rubber stamped by Sam Weinig & Darin Adler.
457
458         Three quick fixes to UStringImpl.
459             - The destroy() method can be switched back to a normal destructor; since we've switched
460               the way we protect static strings to be using an odd ref-count the destroy() won't abort.
461             - The cost() calculation logic was wrong.  If you have multiple JSStrings wrapping substrings
462               of a base string, they would each report the full cost of the base string to the heap.
463               Instead we should only be reporting once for the base string.
464             - Remove the overloaded new operator calling fastMalloc, replace this with a 'using' to pick
465               up the implementation from the parent class.
466
467         * JavaScriptCore.exp:
468         * runtime/UStringImpl.cpp:
469         (JSC::UStringImpl::~UStringImpl):
470         * runtime/UStringImpl.h:
471         (JSC::UStringImpl::cost):
472         (JSC::UStringImpl::deref):
473
474 2010-01-13  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
475
476         Reviewed by Simon Hausmann.
477
478         [Qt] Split the build process in two different .pro files.
479         This allows qmake to be run once all source files are available.
480
481         * DerivedSources.pro: Added.
482         * JavaScriptCore.pri: Moved source generation to DerivedSources.pro
483         * pcre/pcre.pri: Moved source generation to DerivedSources.pro
484
485 2010-01-12  Kent Hansen  <kent.hansen@nokia.com>
486
487         Reviewed by Geoffrey Garen.
488
489         [ES5] Implement Object.getOwnPropertyNames
490         https://bugs.webkit.org/show_bug.cgi?id=32242
491
492         Add an extra argument to getPropertyNames() and getOwnPropertyNames()
493         (and all reimplementations thereof) that indicates whether non-enumerable
494         properties should be added.
495
496         * API/JSCallbackObject.h:
497         * API/JSCallbackObjectFunctions.h:
498         (JSC::::getOwnPropertyNames):
499         * JavaScriptCore.exp:
500         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
501         * debugger/DebuggerActivation.cpp:
502         (JSC::DebuggerActivation::getOwnPropertyNames):
503         * debugger/DebuggerActivation.h:
504         * runtime/Arguments.cpp:
505         (JSC::Arguments::getOwnPropertyNames):
506         * runtime/Arguments.h:
507         * runtime/CommonIdentifiers.h:
508         * runtime/JSArray.cpp:
509         (JSC::JSArray::getOwnPropertyNames):
510         * runtime/JSArray.h:
511         * runtime/JSByteArray.cpp:
512         (JSC::JSByteArray::getOwnPropertyNames):
513         * runtime/JSByteArray.h:
514         * runtime/JSFunction.cpp:
515         (JSC::JSFunction::getOwnPropertyNames):
516         * runtime/JSFunction.h:
517         * runtime/JSNotAnObject.cpp:
518         (JSC::JSNotAnObject::getOwnPropertyNames):
519         * runtime/JSNotAnObject.h:
520         * runtime/JSObject.cpp:
521         (JSC::getClassPropertyNames):
522         (JSC::JSObject::getPropertyNames):
523         (JSC::JSObject::getOwnPropertyNames):
524         * runtime/JSObject.h:
525         * runtime/JSVariableObject.cpp:
526         (JSC::JSVariableObject::getOwnPropertyNames):
527         * runtime/JSVariableObject.h:
528         * runtime/ObjectConstructor.cpp:
529         (JSC::ObjectConstructor::ObjectConstructor):
530         (JSC::objectConstructorGetOwnPropertyNames):
531         * runtime/RegExpMatchesArray.h:
532         (JSC::RegExpMatchesArray::getOwnPropertyNames):
533         * runtime/StringObject.cpp:
534         (JSC::StringObject::getOwnPropertyNames):
535         * runtime/StringObject.h:
536         * runtime/Structure.cpp: Rename getEnumerablePropertyNames() to getPropertyNames(), which takes an extra argument.
537         (JSC::Structure::getPropertyNames):
538         * runtime/Structure.h:
539         (JSC::):
540
541 2010-01-12  Alexey Proskuryakov  <ap@apple.com>
542
543         Reviewed by Darin Adler.
544
545         https://bugs.webkit.org/show_bug.cgi?id=33540
546         Make it possible to build in debug mode with assertions disabled
547
548         * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION):
549         * runtime/Identifier.cpp: (JSC::Identifier::checkSameIdentifierTable):
550         * wtf/FastMalloc.cpp:
551         * wtf/HashTable.h: (WTF::HashTableConstIterator::checkValidity):
552         * yarr/RegexCompiler.cpp: (JSC::Yarr::compileRegex):
553
554 2009-11-23  Yong Li  <yoli@rim.com>
555
556         Reviewed by Adam Treat.
557
558         Make GIF decoder support down-sampling
559         https://bugs.webkit.org/show_bug.cgi?id=31806
560
561         * platform/image-decoders/ImageDecoder.cpp:
562         (WebCore::ImageDecoder::upperBoundScaledY):
563         (WebCore::ImageDecoder::lowerBoundScaledY):
564         * platform/image-decoders/ImageDecoder.h:
565         (WebCore::RGBA32Buffer::scaledRect):
566         (WebCore::RGBA32Buffer::setScaledRect):
567         (WebCore::ImageDecoder::scaledSize):
568         * platform/image-decoders/gif/GIFImageDecoder.cpp:
569         (WebCore::GIFImageDecoder::sizeNowAvailable):
570         (WebCore::GIFImageDecoder::initFrameBuffer):
571         (WebCore::copyOnePixel):
572         (WebCore::GIFImageDecoder::haveDecodedRow):
573         (WebCore::GIFImageDecoder::frameComplete):
574
575 2010-01-12  Adam Barth  <abarth@webkit.org>
576
577         Reviewed by Eric Seidel.
578
579         ecma/Date/15.9.5.12-1.js fails every night at midnight
580         https://bugs.webkit.org/show_bug.cgi?id=28041
581
582         Change the test to use a concrete time instead of "now".
583
584         * tests/mozilla/ecma/Date/15.9.5.10-1.js:
585         * tests/mozilla/ecma/Date/15.9.5.12-1.js:
586
587 2010-01-11  Csaba Osztrogonác  <ossy@webkit.org>
588
589         Reviewed by Ariya Hidayat.
590
591         [Qt] Enable JIT and YARR_JIT if (CPU(X86_64) && OS(LINUX) && GCC_VERSION >= 40100)
592
593         * wtf/Platform.h:
594
595 2010-01-11  Geoffrey Garen  <ggaren@apple.com>
596
597         Reviewed by Alexey Proskuryakov.
598
599         https://bugs.webkit.org/show_bug.cgi?id=33481
600         Uninitialized data members in ArrayStorage
601         
602         SunSpider reports no change.
603
604         * runtime/JSArray.cpp:
605         (JSC::JSArray::JSArray): Initialize missing data members in the two cases
606         where we don't use fastZeroedMalloc, so it doesn't happen automatically.
607
608 2010-01-11  Steve Falkenburg  <sfalken@apple.com>
609
610         Reviewed by Sam Weinig.
611
612         https://bugs.webkit.org/show_bug.cgi?id=33480
613         
614         Improve debugging reliability for WTF on Windows.
615         Store WTF static library's PDB file into a better location.
616
617         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
618
619 2010-01-11  Steve Falkenburg  <sfalken@apple.com>
620
621         Windows build fix.
622         Remove extraneous entries from def file causing build warning.
623
624         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
625
626 2010-01-10  Kent Hansen  <kent.hansen@nokia.com>
627
628         Reviewed by Darin Adler.
629
630         RegExp.prototype.toString returns "//" for empty regular expressions
631         https://bugs.webkit.org/show_bug.cgi?id=33319
632
633         "//" starts a single-line comment, hence "/(?:)/" should be used, according to ECMA.
634
635         * runtime/RegExpPrototype.cpp:
636         (JSC::regExpProtoFuncToString):
637
638         * tests/mozilla/ecma_2/RegExp/properties-001.js:
639         (AddRegExpCases):
640         * tests/mozilla/js1_2/regexp/toString.js:
641         Update relevant Mozilla tests (Mozilla has had this behavior since November 2003).
642
643 2010-01-10  Darin Adler  <darin@apple.com>
644
645         * tests/mozilla/ecma/Array/15.4.1.1.js: Added property allow-tabs.
646         * tests/mozilla/ecma/Array/15.4.1.2.js: Added property allow-tabs.
647         * tests/mozilla/ecma/Array/15.4.2.1-1.js: Added property allow-tabs.
648         * tests/mozilla/ecma/Array/15.4.2.2-1.js: Added property allow-tabs.
649         * tests/mozilla/ecma/Array/15.4.2.2-2.js: Added property allow-tabs.
650         * tests/mozilla/ecma/Array/15.4.2.3.js: Added property allow-tabs.
651         * tests/mozilla/ecma/Array/15.4.3.2.js: Added property allow-tabs.
652         * tests/mozilla/ecma/Array/15.4.3.js: Added property allow-tabs.
653         * tests/mozilla/ecma/Array/15.4.4.1.js: Added property allow-tabs.
654         * tests/mozilla/ecma/Array/15.4.4.js: Added property allow-tabs.
655         * tests/mozilla/ecma/LexicalConventions/7.7.4.js: Added property allow-tabs.
656         * tests/mozilla/ecma/Math/15.8.2.13.js: Added property allow-tabs.
657         * tests/mozilla/ecma/Math/15.8.2.16.js: Added property allow-tabs.
658         * tests/mozilla/ecma/Math/15.8.2.18.js: Added property allow-tabs.
659         * tests/mozilla/ecma/Math/15.8.2.2.js: Added property allow-tabs.
660         * tests/mozilla/ecma/Math/15.8.2.4.js: Added property allow-tabs.
661         * tests/mozilla/ecma/Math/15.8.2.5.js: Added property allow-tabs.
662         * tests/mozilla/ecma/Math/15.8.2.7.js: Added property allow-tabs.
663         * tests/mozilla/ecma/String/15.5.1.js: Added property allow-tabs.
664         * tests/mozilla/ecma/String/15.5.2.js: Added property allow-tabs.
665         * tests/mozilla/ecma/String/15.5.3.1-3.js: Added property allow-tabs.
666         * tests/mozilla/ecma/String/15.5.3.1-4.js: Added property allow-tabs.
667         * tests/mozilla/ecma/String/15.5.3.js: Added property allow-tabs.
668         * tests/mozilla/ecma/TypeConversion/9.5-2.js: Added property allow-tabs.
669         * tests/mozilla/ecma/jsref.js: Modified property allow-tabs.
670         * tests/mozilla/ecma/shell.js: Modified property allow-tabs.
671         * tests/mozilla/ecma_2/LexicalConventions/keywords-001.js: Added property allow-tabs.
672         * tests/mozilla/ecma_2/RegExp/exec-001.js: Added property allow-tabs.
673         * tests/mozilla/ecma_2/String/match-004.js: Added property allow-tabs.
674         * tests/mozilla/ecma_2/String/replace-001.js: Added property allow-tabs.
675         * tests/mozilla/ecma_2/String/split-002.js: Added property allow-tabs.
676         * tests/mozilla/ecma_2/jsref.js: Modified property allow-tabs.
677         * tests/mozilla/ecma_2/shell.js: Added property allow-tabs.
678         * tests/mozilla/ecma_3/Date/shell.js: Modified property allow-tabs.
679         * tests/mozilla/ecma_3/Exceptions/regress-181654.js: Added property allow-tabs.
680         * tests/mozilla/ecma_3/RegExp/regress-209067.js: Added property allow-tabs.
681         * tests/mozilla/ecma_3/RegExp/regress-85721.js: Added property allow-tabs.
682         * tests/mozilla/importList.html: Added property allow-tabs.
683         * tests/mozilla/js1_1/shell.js: Added property allow-tabs.
684         * tests/mozilla/js1_2/Array/general1.js: Added property allow-tabs.
685         * tests/mozilla/js1_2/Array/general2.js: Added property allow-tabs.
686         * tests/mozilla/js1_2/Array/slice.js: Added property allow-tabs.
687         * tests/mozilla/js1_2/Array/splice1.js: Added property allow-tabs.
688         * tests/mozilla/js1_2/Array/splice2.js: Added property allow-tabs.
689         * tests/mozilla/js1_2/Objects/toString-001.js: Added property allow-tabs.
690         * tests/mozilla/js1_2/String/charCodeAt.js: Added property allow-tabs.
691         * tests/mozilla/js1_2/String/concat.js: Modified property allow-tabs.
692         * tests/mozilla/js1_2/String/match.js: Added property allow-tabs.
693         * tests/mozilla/js1_2/String/slice.js: Added property allow-tabs.
694         * tests/mozilla/js1_2/function/Function_object.js: Added property allow-tabs.
695         * tests/mozilla/js1_2/function/Number.js: Modified property allow-tabs.
696         * tests/mozilla/js1_2/function/String.js: Modified property allow-tabs.
697         * tests/mozilla/js1_2/function/nesting.js: Added property allow-tabs.
698         * tests/mozilla/js1_2/function/regexparg-1.js: Added property allow-tabs.
699         * tests/mozilla/js1_2/function/regexparg-2-n.js: Added property allow-tabs.
700         * tests/mozilla/js1_2/jsref.js: Added property allow-tabs.
701         * tests/mozilla/js1_2/operator/equality.js: Added property allow-tabs.
702         * tests/mozilla/js1_2/operator/strictEquality.js: Added property allow-tabs.
703         * tests/mozilla/js1_2/regexp/RegExp_dollar_number.js: Added property allow-tabs.
704         * tests/mozilla/js1_2/regexp/RegExp_input.js: Added property allow-tabs.
705         * tests/mozilla/js1_2/regexp/RegExp_input_as_array.js: Added property allow-tabs.
706         * tests/mozilla/js1_2/regexp/RegExp_lastIndex.js: Added property allow-tabs.
707         * tests/mozilla/js1_2/regexp/RegExp_lastMatch.js: Added property allow-tabs.
708         * tests/mozilla/js1_2/regexp/RegExp_lastMatch_as_array.js: Added property allow-tabs.
709         * tests/mozilla/js1_2/regexp/RegExp_lastParen.js: Added property allow-tabs.
710         * tests/mozilla/js1_2/regexp/RegExp_lastParen_as_array.js: Added property allow-tabs.
711         * tests/mozilla/js1_2/regexp/RegExp_leftContext.js: Added property allow-tabs.
712         * tests/mozilla/js1_2/regexp/RegExp_leftContext_as_array.js: Added property allow-tabs.
713         * tests/mozilla/js1_2/regexp/RegExp_multiline.js: Added property allow-tabs.
714         * tests/mozilla/js1_2/regexp/RegExp_multiline_as_array.js: Added property allow-tabs.
715         * tests/mozilla/js1_2/regexp/RegExp_object.js: Added property allow-tabs.
716         * tests/mozilla/js1_2/regexp/RegExp_rightContext.js: Added property allow-tabs.
717         * tests/mozilla/js1_2/regexp/RegExp_rightContext_as_array.js: Added property allow-tabs.
718         * tests/mozilla/js1_2/regexp/alphanumeric.js: Added property allow-tabs.
719         * tests/mozilla/js1_2/regexp/asterisk.js: Added property allow-tabs.
720         * tests/mozilla/js1_2/regexp/backslash.js: Added property allow-tabs.
721         * tests/mozilla/js1_2/regexp/backspace.js: Added property allow-tabs.
722         * tests/mozilla/js1_2/regexp/beginLine.js: Added property allow-tabs.
723         * tests/mozilla/js1_2/regexp/character_class.js: Added property allow-tabs.
724         * tests/mozilla/js1_2/regexp/compile.js: Added property allow-tabs.
725         * tests/mozilla/js1_2/regexp/control_characters.js: Added property allow-tabs.
726         * tests/mozilla/js1_2/regexp/digit.js: Added property allow-tabs.
727         * tests/mozilla/js1_2/regexp/dot.js: Added property allow-tabs.
728         * tests/mozilla/js1_2/regexp/endLine.js: Added property allow-tabs.
729         * tests/mozilla/js1_2/regexp/everything.js: Added property allow-tabs.
730         * tests/mozilla/js1_2/regexp/exec.js: Added property allow-tabs.
731         * tests/mozilla/js1_2/regexp/flags.js: Added property allow-tabs.
732         * tests/mozilla/js1_2/regexp/global.js: Added property allow-tabs.
733         * tests/mozilla/js1_2/regexp/hexadecimal.js: Added property allow-tabs.
734         * tests/mozilla/js1_2/regexp/ignoreCase.js: Added property allow-tabs.
735         * tests/mozilla/js1_2/regexp/interval.js: Added property allow-tabs.
736         * tests/mozilla/js1_2/regexp/octal.js: Added property allow-tabs.
737         * tests/mozilla/js1_2/regexp/parentheses.js: Added property allow-tabs.
738         * tests/mozilla/js1_2/regexp/plus.js: Added property allow-tabs.
739         * tests/mozilla/js1_2/regexp/question_mark.js: Added property allow-tabs.
740         * tests/mozilla/js1_2/regexp/simple_form.js: Added property allow-tabs.
741         * tests/mozilla/js1_2/regexp/source.js: Added property allow-tabs.
742         * tests/mozilla/js1_2/regexp/special_characters.js: Added property allow-tabs.
743         * tests/mozilla/js1_2/regexp/string_replace.js: Added property allow-tabs.
744         * tests/mozilla/js1_2/regexp/string_search.js: Added property allow-tabs.
745         * tests/mozilla/js1_2/regexp/string_split.js: Added property allow-tabs.
746         * tests/mozilla/js1_2/regexp/test.js: Added property allow-tabs.
747         * tests/mozilla/js1_2/regexp/toString.js: Added property allow-tabs.
748         * tests/mozilla/js1_2/regexp/vertical_bar.js: Added property allow-tabs.
749         * tests/mozilla/js1_2/regexp/whitespace.js: Added property allow-tabs.
750         * tests/mozilla/js1_2/regexp/word_boundary.js: Added property allow-tabs.
751         * tests/mozilla/js1_2/shell.js: Added property allow-tabs.
752         * tests/mozilla/js1_2/statements/break.js: Added property allow-tabs.
753         * tests/mozilla/js1_2/statements/continue.js: Added property allow-tabs.
754         * tests/mozilla/js1_2/statements/do_while.js: Added property allow-tabs.
755         * tests/mozilla/js1_2/statements/switch.js: Added property allow-tabs.
756         * tests/mozilla/js1_2/statements/switch2.js: Added property allow-tabs.
757         * tests/mozilla/js1_3/shell.js: Added property allow-tabs.
758         * tests/mozilla/js1_4/shell.js: Added property allow-tabs.
759         * tests/mozilla/js1_5/Regress/regress-111557.js: Added property allow-tabs.
760         * tests/mozilla/js1_5/Regress/regress-216320.js: Added property allow-tabs.
761         * tests/mozilla/menuhead.html: Added property allow-tabs.
762         * tests/mozilla/mklistpage.pl: Added property allow-tabs.
763         * tests/mozilla/runtests.pl: Added property allow-tabs.
764
765 2010-01-08  Daniel Bates  <dbates@webkit.org>
766
767         Reviewed by Adam Barth.
768
769         https://bugs.webkit.org/show_bug.cgi?id=33417
770
771         Cleans up style errors exposed by the patch for bug #33198.
772         Moreover, fixes all "Weird number of spaces at line-start. Are you using a 4-space indent?"
773         errors reported by check-webkit-style.
774
775         No functionality was changed. So, no new tests.
776
777         * wtf/Platform.h:
778
779 2010-01-08  Kent Hansen  <kent.hansen@nokia.com>
780
781         Reviewed by Eric Seidel.
782
783         Don't store RegExp flags string representation
784         https://bugs.webkit.org/show_bug.cgi?id=33321
785
786         It's unused; the string representation is reconstructed from flags.
787
788         * runtime/RegExp.cpp:
789         (JSC::RegExp::RegExp):
790         * runtime/RegExp.h:
791
792 2010-01-08  Geoffrey Garen  <ggaren@apple.com>
793
794         Reviewed by Oliver Hunt.
795
796         Memory use grows grows possibly unbounded in this JavaScript Array test case
797         https://bugs.webkit.org/show_bug.cgi?id=31675
798
799         This fixes one observed bug in this test case, which is that
800         arrays don't report extra cost for the sparse value maps.
801
802         SunSpider reports a small speedup.
803
804         * runtime/JSArray.cpp:
805         (JSC::JSArray::putSlowCase): Report extra memory cost for
806         the sparse value map.
807         * runtime/JSArray.h: 
808
809 2010-01-08  Yong Li  <yoli@rim.com>
810
811         Reviewed by Darin Adler.
812
813         Remove unnecessary #include from FastMalloc.cpp
814         https://bugs.webkit.org/show_bug.cgi?id=33393
815
816         * wtf/FastMalloc.cpp:
817
818 2010-01-08  Eric Seidel  <eric@webkit.org>
819
820         No review, rolling out r52983.
821         http://trac.webkit.org/changeset/52983
822         https://bugs.webkit.org/show_bug.cgi?id=33321
823
824         Broke 59 JavaScriptCore tests.  I don't think Kent knew about
825         run-javascriptcore-tests.  Sadly neither does the commit-bot,
826         yet.
827
828         * runtime/RegExp.cpp:
829         (JSC::RegExp::RegExp):
830         * runtime/RegExp.h:
831         (JSC::RegExp::flags):
832
833 2010-01-08  Eric Seidel  <eric@webkit.org>
834
835         No review, rolling out r52981.
836         http://trac.webkit.org/changeset/52981
837         https://bugs.webkit.org/show_bug.cgi?id=33319
838
839         Caused two JS tests to start failing:
840         ecma_2/RegExp/properties-001.js and js1_2/regexp/toString.js
841
842         * runtime/RegExpPrototype.cpp:
843         (JSC::regExpProtoFuncToString):
844
845 2010-01-08  Kent Hansen  <kent.hansen@nokia.com>
846
847         Reviewed by Darin Adler.
848
849         Don't store RegExp flags string representation
850         https://bugs.webkit.org/show_bug.cgi?id=33321
851
852         It's unused; the string representation is reconstructed from flags.
853
854         * runtime/RegExp.cpp:
855         (JSC::RegExp::RegExp):
856         * runtime/RegExp.h:
857
858 2010-01-08  Kent Hansen  <kent.hansen@nokia.com>
859
860         Reviewed by Darin Adler.
861
862         RegExp.prototype.toString returns "//" for empty regular expressions
863         https://bugs.webkit.org/show_bug.cgi?id=33319
864
865         "//" starts a single-line comment, hence "/(?:)/" should be used, according to ECMA.
866
867         * runtime/RegExpPrototype.cpp:
868         (JSC::regExpProtoFuncToString):
869
870 2010-01-08  Norbert Leser  <norbert.leser@nokia.com>
871
872         Reviewed by Darin Adler.
873
874         RVCT compiler with "-Otime -O3" optimization tries to optimize out 
875         inline new'ed pointers that are passed as arguments.
876         Proposed patch assigns new'ed pointer explicitly outside function call.
877
878         https://bugs.webkit.org/show_bug.cgi?id=33084
879
880         * API/JSClassRef.cpp:
881         (OpaqueJSClass::OpaqueJSClass):
882         (OpaqueJSClassContextData::OpaqueJSClassContextData):
883
884 2010-01-08  Gabor Loki  <loki@webkit.org>
885
886         Reviewed by Gavin Barraclough.
887
888         Remove an unnecessary cacheFlush from ARM_TRADITIONAL JIT
889         https://bugs.webkit.org/show_bug.cgi?id=33203
890
891         * assembler/ARMAssembler.cpp: Remove obsolete linkBranch function.
892         (JSC::ARMAssembler::executableCopy): Inline a clean linkBranch code.
893         * assembler/ARMAssembler.h:
894         (JSC::ARMAssembler::getLdrImmAddress): Use inline function.
895         (JSC::ARMAssembler::getLdrImmAddressOnPool): Ditto.
896         (JSC::ARMAssembler::patchPointerInternal): Remove an unnecessary cacheFlush.
897         (JSC::ARMAssembler::linkJump): Use patchPointerInternal instead of linkBranch.
898         (JSC::ARMAssembler::linkCall): Ditto.
899         (JSC::ARMAssembler::relinkCall): Ditto.
900
901 2010-01-07  Gabor Loki  <loki@webkit.org>
902
903         Reviewed by Gavin Barraclough.
904
905         Build fix for JSVALUE32 when ENABLE_JIT_OPTIMIZE* are disabled
906         https://bugs.webkit.org/show_bug.cgi?id=33311
907
908         Move compileGetDirectOffset function to common part of JSVALUE32
909
910         * jit/JITPropertyAccess.cpp:
911         (JSC::JIT::compileGetDirectOffset):
912
913 2010-01-07  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
914
915         Reviewed by Maciej Stachowiak.
916
917         Allow call sites to determine if ASSERT_* and LOG_* macros are operational
918         https://bugs.webkit.org/show_bug.cgi?id=33020
919
920         * wtf/Assertions.h: Set ASSERT_MSG_DISABLED, FATAL_DISABLED,
921         ERROR_DISABLED, LOG_DISABLED to 1 if the compiler does not support
922         variadic macros. Refactor for better readibility.
923
924 2010-01-07  Daniel Bates  <dbates@rim.com>
925
926         Reviewed by Eric Seidel.
927
928         https://bugs.webkit.org/show_bug.cgi?id=32987
929
930         Added ENABLE_XHTMLMP flag. Disabled by default.
931
932         * Configurations/FeatureDefines.xcconfig:
933
934 2010-01-07  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
935
936         Reviewed by Gavin Barraclough.
937
938         [Symbian] Port ARM traditional JIT Trampolines to RVCT
939         https://bugs.webkit.org/show_bug.cgi?id=30552
940
941         Take the GCC implementation and mechanically convert
942         it to RVCT syntax.
943
944         Use 'bx rX' instead of 'mov pc, rX' when it is available.
945
946         Developed in cooperation with Iain Campbell and Gabor Loki.
947
948         * JavaScriptCore.pri: Extra step to generate RVCT stubs. The 
949         script generation intentionally executed all the time not just
950         for RVCT targets.
951
952         * create_rvct_stubs: Added. Perl script to expand precompiler macros
953         for RVCT assembler - the template is defined in JITStubs.cpp.
954
955         * jit/JITStubs.cpp:
956         (JSC::ctiTrampoline):
957         (JSC::ctiVMThrowTrampoline):
958         (JSC::ctiOpThrowNotCaught):
959
960 2010-01-07  Geoffrey Garen  <ggaren@apple.com>
961
962         Reviewed by Sam Weinig.
963
964         Fix a crash seen on the buildbots.
965
966         * runtime/JSGlobalObject.cpp:
967         (JSC::JSGlobalObject::init): Disable specific function tracking here,
968         instead of in WebCore, to ensure that the disabling happens before a
969         specific function can be registered.
970
971 2010-01-07  Alexey Proskuryakov  <ap@apple.com>
972
973         Mac build fix.
974
975         * JavaScriptCore.exp: Export new JSGlobalData static data members.
976
977 2010-01-07  Alexey Proskuryakov  <ap@apple.com>
978
979         Reviewed by Geoffrey Garen.
980
981         https://bugs.webkit.org/show_bug.cgi?id=33057
982         REGRESSION(r49365): typeof(xhr.responseText) != "string" in Windows
983
984         <rdar://problem/7296920> REGRESSION: WebKit fails to start PeaceKeeper benchmark
985
986         Test: fast/js/webcore-string-comparison.html
987
988         In r49365, some code was moved from JSString.cpp to JSString.h, and as a result, WebCore
989         got a way to directly instantiate JSStrings over DLL borders. Since vftable for JSString was
990         not exported, objects created from WebCore got a different vptr, and JavaScriptCore
991         optimizations that relied on vptr of all JSString objects being equal failed.
992
993         * config.h: Added a JS_EXPORTCLASS macro for exporting classes. It's currently the same as
994         JS_EXPORTDATA, but it clearly needed a new name.
995
996         * runtime/InitializeThreading.cpp:
997         (JSC::initializeThreadingOnce):
998         * runtime/JSGlobalData.cpp:
999         (JSC::JSGlobalData::storeVPtrs):
1000         (JSC::JSGlobalData::JSGlobalData):
1001         (JSC::JSGlobalData::createNonDefault):
1002         (JSC::JSGlobalData::create):
1003         (JSC::JSGlobalData::sharedInstance):
1004         * runtime/JSGlobalData.h:
1005         Store vptrs just once, no need to repeatedly pick and copy them. This makes it possible to
1006         assert vptr correctness in object destructors (which don't have access to JSGlobalData,
1007         and even Heap::heap(this) will fail for fake objects created from storeVPtrs()).
1008
1009         * runtime/JSArray.cpp: (JSC::JSArray::~JSArray): Assert that vptr is what we expect it to be.
1010         It's important to assert in destructor, because MSVC changes the vptr after constructor
1011         is invoked.
1012         * runtime/JSByteArray.cpp: (JSC::JSByteArray::~JSByteArray): Ditto.
1013         * runtime/JSByteArray.h: Ditto.
1014         * runtime/JSFunction.h: Ditto.
1015         * runtime/JSFunction.cpp: (JSC::JSFunction::~JSFunction): Ditto.
1016
1017         * runtime/JSCell.h: (JSC::JSCell::setVPtr): Added a method to substitute vptr for another
1018         one.
1019
1020         * runtime/JSString.h: Export JSString class together with its vftable, and tell other
1021         libraries tp import it. This is needed on platforms that have a separate JavaScriptCore
1022         dynamic library - and on Mac, we already did the export via JavaScriptCore.exp.
1023         (JSC::JSString::~JSString): Assert tha vptr is what we expect it to be.
1024         (JSC::fixupVPtr): Store a previously saved primary vftable pointer (do nothing if building
1025         JavaScriptCore itself).
1026         (JSC::jsSingleCharacterString): Call fixupVPtr in case this is call across DLL boundary.
1027         (JSC::jsSingleCharacterSubstring): Ditto.
1028         (JSC::jsNontrivialString): Ditto.
1029         (JSC::jsString): Ditto.
1030         (JSC::jsSubstring): Ditto.
1031         (JSC::jsOwnedString): Ditto.
1032
1033         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export the new static
1034         JSGlobalData members that are used in WebCore via inline functions.
1035
1036 2010-01-07  Geoffrey Garen  <ggaren@apple.com>
1037
1038         Reviewed by Sam Weinig.
1039
1040         Safari memory usage skyrockets using new Google AdWords interface
1041         https://bugs.webkit.org/show_bug.cgi?id=33343
1042
1043         The memory use was caused by the global object creating too many structures
1044         as it thrashed between different specific functions.
1045
1046         * runtime/Structure.cpp:
1047         (JSC::Structure::Structure):
1048         (JSC::Structure::addPropertyTransition):
1049         (JSC::Structure::changePrototypeTransition):
1050         (JSC::Structure::despecifyFunctionTransition):
1051         (JSC::Structure::addAnonymousSlotsTransition):
1052         (JSC::Structure::getterSetterTransition):
1053         (JSC::Structure::toDictionaryTransition):
1054         (JSC::Structure::addPropertyWithoutTransition):
1055         (JSC::Structure::despecifyAllFunctions):
1056         * runtime/Structure.h:
1057         (JSC::Structure::disableSpecificFunctionTracking): Track a thrash count
1058         for specific functions. Disable specific function tracking once the
1059         thrash count has been hit.
1060
1061 2010-01-07  Csaba Osztrogonác  <ossy@webkit.org>
1062
1063         Reviewed by Simon Hausmann.
1064
1065         [Qt] Enable JIT in debug mode on win32 after r51141 fixed the crashes.
1066
1067         * JavaScriptCore.pri:
1068
1069 2010-01-07  Zoltan Horvath  <zoltan@webkit.org>
1070
1071         Reviewed by Holger Freyther.
1072
1073         [Mac] Build fix when FAST_MALLOC_MATCH_VALIDATION=1
1074         https://bugs.webkit.org/show_bug.cgi?id=33312
1075
1076         Using of operator += cause compile error on Mac, so it is changed to
1077         "= static_cast<AllocAlignmentInteger*>(old_ptr) + 1".
1078
1079         * wtf/FastMalloc.cpp:
1080         (WTF::TCMallocStats::realloc):
1081
1082 2010-01-07  Zoltan Horvath  <zoltan@webkit.org>
1083
1084         Reviewed by Holger Freyther.
1085
1086         [Qt] Build fix when FAST_MALLOC_MATCH_VALIDATION=1
1087         https://bugs.webkit.org/show_bug.cgi?id=33312
1088
1089         Remove pByte (committed in r42344 from #20422), because pByte doesn't
1090         exist and it is unnecessary.
1091
1092         * wtf/FastMalloc.cpp:
1093         (WTF::TCMallocStats::realloc):
1094
1095 2010-01-06  Gavin Barraclough  <barraclough@apple.com>
1096
1097         QT build fix.
1098
1099         * runtime/Identifier.cpp:
1100         (JSC::createIdentifierTableSpecific):
1101
1102 2010-01-06  Gavin Barraclough  <barraclough@apple.com>
1103
1104         Windows build fix part I.
1105
1106         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1107
1108 2010-01-06  Dan Bernstein  <mitz@apple.com>
1109
1110         Build fix
1111
1112         * runtime/Identifier.cpp:
1113         (JSC::createIdentifierTableSpecificCallback):
1114
1115 2010-01-05  Gavin Barraclough  <barraclough@apple.com>
1116
1117         Reviewed by Sam Weinig.
1118
1119         https://bugs.webkit.org/show_bug.cgi?id=33236
1120         Remove m_identifierTable pointer from UString
1121
1122         Currently every string holds a pointer so that during destruction,
1123         if a string has been used as an identifier, it can remove itself
1124         from the table.  By instead accessing the identifierTable via a
1125         thread specific tracking the table associated with the current
1126         globaldata, we can save the memory cost of this pointer.
1127
1128         * API/APIShims.h:
1129         (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
1130         (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
1131         (JSC::APICallbackShim::APICallbackShim):
1132         (JSC::APICallbackShim::~APICallbackShim):
1133
1134             - change the API shims to track the identifierTable of the current JSGlobalData.
1135
1136         * API/JSContextRef.cpp:
1137         (JSContextGroupCreate):
1138
1139             - update creation of JSGlobalData for API usage to use new create method.
1140             - fix shim instanciation bug in JSGlobalContextCreateInGroup.
1141
1142         * JavaScriptCore.exp:
1143         * runtime/Completion.cpp:
1144         (JSC::checkSyntax):
1145         (JSC::evaluate):
1146
1147             - add asserts to check the identifierTable is being tracked correctly.
1148
1149         * runtime/Identifier.cpp:
1150         (JSC::IdentifierTable::~IdentifierTable):
1151         (JSC::IdentifierTable::add):
1152         (JSC::Identifier::remove):
1153         (JSC::Identifier::checkSameIdentifierTable):
1154         (JSC::createIdentifierTableSpecificCallback):
1155         (JSC::createIdentifierTableSpecific):
1156         (JSC::createDefaultDataSpecific):
1157
1158             - Use currentIdentifierTable() instead of UStringImpl::m_identifierTable.
1159             - Define methods to access the thread specific identifier tables.
1160
1161         * runtime/Identifier.h:
1162         (JSC::ThreadIdentifierTableData::ThreadIdentifierTableData):
1163         (JSC::defaultIdentifierTable):
1164         (JSC::setDefaultIdentifierTable):
1165         (JSC::currentIdentifierTable):
1166         (JSC::setCurrentIdentifierTable):
1167         (JSC::resetCurrentIdentifierTable):
1168
1169             - Declare methods to access the thread specific identifier tables.
1170
1171         * runtime/JSGlobalData.cpp:
1172         (JSC::JSGlobalData::createNonDefault):
1173         (JSC::JSGlobalData::create):
1174         (JSC::JSGlobalData::sharedInstance):
1175
1176             - creation of JSGlobalData objects, other than for API usage, associate themselves with the current thread.
1177
1178         * runtime/JSGlobalData.h:
1179         * runtime/UStringImpl.cpp:
1180         (JSC::UStringImpl::destroy):
1181
1182             - destroy() method should be using isIdentifier().
1183
1184         * runtime/UStringImpl.h:
1185         (JSC::UStringImpl::isIdentifier):
1186         (JSC::UStringImpl::setIsIdentifier):
1187         (JSC::UStringImpl::checkConsistency):
1188         (JSC::UStringImpl::UStringImpl):
1189
1190             - replace m_identifierTable with a single m_isIdentifier bit.
1191
1192         * wtf/StringHashFunctions.h:
1193         (WTF::stringHash):
1194
1195             - change string hash result from 32-bit to 31-bit, to free a bit in UStringImpl for m_isIdentifier.
1196
1197 2009-12-25 Patrick Gansterer <paroga@paroga.com>
1198  
1199         Reviewed by Eric Seidel.
1200
1201         Buildfix for WinCE + style fixes.
1202         https://bugs.webkit.org/show_bug.cgi?id=32939
1203
1204         * jsc.cpp:
1205         (functionPrint):
1206         (functionQuit):
1207         (parseArguments):
1208         (fillBufferWithContentsOfFile):
1209  
1210 2010-01-05  Patrick Gansterer  <paroga@paroga.com>
1211
1212         Reviewed by Eric Seidel.
1213
1214         WinCE buildfix after r52791 (renamed PLATFORM(WINCE) to OS(WINCE)).
1215         https://bugs.webkit.org/show_bug.cgi?id=33205
1216
1217         * jit/ExecutableAllocator.h:
1218
1219 2010-01-05  Patrick Gansterer  <paroga@paroga.com>
1220
1221         Reviewed by Darin Adler.
1222
1223         Added compiler error for unsupported platforms.
1224         https://bugs.webkit.org/show_bug.cgi?id=33112
1225
1226         * jit/JITStubs.cpp:
1227
1228 2010-01-05  Gabor Loki  <loki@webkit.org>
1229
1230         Reviewed by Maciej Stachowiak.
1231
1232         Follow r52729 in ARMAssembler.
1233         https://bugs.webkit.org/show_bug.cgi?id=33208
1234
1235         Use WTF_ARM_ARCH_AT_LEAST instead of ARM_ARCH_VERSION
1236
1237         * assembler/ARMAssembler.cpp:
1238         (JSC::ARMAssembler::encodeComplexImm): Move tmp declaration to ARMv7
1239         * assembler/ARMAssembler.h:
1240         (JSC::ARMAssembler::):
1241         (JSC::ARMAssembler::bkpt):
1242
1243 2010-01-05  Maciej Stachowiak  <mjs@apple.com>
1244
1245         Unreviewed build fix for Gtk+
1246
1247         Don't use // comments in Platform.h, at least some of them seem to make the version of GCC
1248         used on the Gtk buildbot unhappy.
1249
1250         * wtf/Platform.h:
1251
1252 2010-01-04  Maciej Stachowiak  <mjs@apple.com>
1253
1254         Reviewed by Darin Fisher.
1255
1256         Reorganize, document and rename OS() platform macros.
1257         https://bugs.webkit.org/show_bug.cgi?id=33198
1258
1259         * wtf/Platform.h: Rename, reorganize and document OS() macros.
1260
1261         Adapt to name changes. Also fixed a few incorrect OS checks.
1262
1263         * API/JSContextRef.cpp:
1264         * assembler/MacroAssemblerARM.cpp:
1265         (JSC::isVFPPresent):
1266         * assembler/MacroAssemblerX86Common.h:
1267         * bytecode/SamplingTool.cpp:
1268         * config.h:
1269         * interpreter/RegisterFile.cpp:
1270         (JSC::RegisterFile::~RegisterFile):
1271         * interpreter/RegisterFile.h:
1272         (JSC::RegisterFile::RegisterFile):
1273         (JSC::RegisterFile::grow):
1274         * jit/ExecutableAllocator.h:
1275         * jit/ExecutableAllocatorFixedVMPool.cpp:
1276         * jit/ExecutableAllocatorPosix.cpp:
1277         * jit/ExecutableAllocatorSymbian.cpp:
1278         * jit/ExecutableAllocatorWin.cpp:
1279         * jit/JITOpcodes.cpp:
1280         (JSC::JIT::privateCompileCTIMachineTrampolines):
1281         * jit/JITStubs.cpp:
1282         * jsc.cpp:
1283         (main):
1284         * parser/Grammar.y:
1285         * profiler/ProfileNode.cpp:
1286         (JSC::getCount):
1287         * runtime/Collector.cpp:
1288         (JSC::Heap::Heap):
1289         (JSC::Heap::allocateBlock):
1290         (JSC::Heap::freeBlockPtr):
1291         (JSC::currentThreadStackBase):
1292         (JSC::getCurrentPlatformThread):
1293         (JSC::suspendThread):
1294         (JSC::resumeThread):
1295         (JSC::getPlatformThreadRegisters):
1296         (JSC::otherThreadStackPointer):
1297         * runtime/Collector.h:
1298         * runtime/DateConstructor.cpp:
1299         * runtime/DatePrototype.cpp:
1300         (JSC::formatLocaleDate):
1301         * runtime/InitializeThreading.cpp:
1302         (JSC::initializeThreading):
1303         * runtime/MarkStack.h:
1304         (JSC::MarkStack::MarkStackArray::shrinkAllocation):
1305         * runtime/MarkStackPosix.cpp:
1306         * runtime/MarkStackSymbian.cpp:
1307         * runtime/MarkStackWin.cpp:
1308         * runtime/StringPrototype.cpp:
1309         (JSC::stringProtoFuncLastIndexOf):
1310         * runtime/TimeoutChecker.cpp:
1311         (JSC::getCPUTime):
1312         * runtime/UString.cpp:
1313         (JSC::UString::from):
1314         * wtf/Assertions.cpp:
1315         * wtf/Assertions.h:
1316         * wtf/CurrentTime.cpp:
1317         (WTF::lowResUTCTime):
1318         * wtf/CurrentTime.h:
1319         (WTF::getLocalTime):
1320         * wtf/DateMath.cpp:
1321         * wtf/FastMalloc.cpp:
1322         (WTF::TCMalloc_ThreadCache::InitModule):
1323         (WTF::TCMallocStats::):
1324         * wtf/FastMalloc.h:
1325         * wtf/MathExtras.h:
1326         * wtf/RandomNumber.cpp:
1327         (WTF::randomNumber):
1328         * wtf/RandomNumberSeed.h:
1329         (WTF::initializeRandomNumberGenerator):
1330         * wtf/StringExtras.h:
1331         * wtf/TCSpinLock.h:
1332         (TCMalloc_SpinLock::Unlock):
1333         (TCMalloc_SlowLock):
1334         * wtf/TCSystemAlloc.cpp:
1335         * wtf/ThreadSpecific.h:
1336         (WTF::::destroy):
1337         * wtf/Threading.h:
1338         * wtf/ThreadingPthreads.cpp:
1339         (WTF::initializeThreading):
1340         (WTF::isMainThread):
1341         * wtf/ThreadingWin.cpp:
1342         (WTF::wtfThreadEntryPoint):
1343         (WTF::createThreadInternal):
1344         * wtf/VMTags.h:
1345         * wtf/unicode/icu/CollatorICU.cpp:
1346         (WTF::Collator::userDefault):
1347         * wtf/win/MainThreadWin.cpp:
1348         (WTF::initializeMainThreadPlatform):
1349
1350 2010-01-04  Gustavo Noronha Silva  <gns@gnome.org>
1351
1352         Add missing files to the build system - make distcheck build fix.
1353
1354         * GNUmakefile.am:
1355
1356 2010-01-04  Gavin Barraclough <barraclough@apple.com>
1357
1358         Reviewed by Sam Weinig, additional coding by Mark Rowe.
1359
1360         https://bugs.webkit.org/show_bug.cgi?id=33163
1361         Add string hashing functions to WTF.
1362         Use WTF's string hashing functions from UStringImpl.
1363
1364         * GNUmakefile.am:
1365         * JavaScriptCore.exp:
1366         * JavaScriptCore.gypi:
1367         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1368         * JavaScriptCore.xcodeproj/project.pbxproj:
1369         * runtime/UStringImpl.cpp:
1370         * runtime/UStringImpl.h:
1371         (JSC::UStringImpl::computeHash):
1372         * wtf/HashFunctions.h:
1373         * wtf/StringHashFunctions.h: Added.
1374         (WTF::stringHash):
1375
1376 2010-01-04  Dmitry Titov  <dimich@chromium.org>
1377
1378         Not reviewed, attempt to fix ARM bulid.
1379
1380         * wtf/Platform.h:
1381
1382 2010-01-04  Gavin Barraclough  <barraclough@apple.com>
1383
1384         Rubber stamped by Geoff Garen.
1385
1386         Add an 'isIdentifier' to UStringImpl, use this where appropriate
1387         (where previously 'identifierTable' was being tested).
1388
1389         * API/JSClassRef.cpp:
1390         (OpaqueJSClass::~OpaqueJSClass):
1391         (OpaqueJSClassContextData::OpaqueJSClassContextData):
1392         * runtime/Identifier.cpp:
1393         (JSC::Identifier::addSlowCase):
1394         * runtime/Identifier.h:
1395         (JSC::Identifier::add):
1396         * runtime/PropertyNameArray.cpp:
1397         (JSC::PropertyNameArray::add):
1398         * runtime/UStringImpl.h:
1399         (JSC::UStringImpl::isIdentifier):
1400
1401 2010-01-04  Gavin Barraclough  <barraclough@apple.com>
1402
1403         Reviewed by Sam "Shimmey Shimmey" Weinig.
1404
1405         https://bugs.webkit.org/show_bug.cgi?id=33158
1406         Refactor JSC API entry/exit to use RAII instead of copy/pasting code.
1407         Make it easier to change set of actions taken when passing across the API boundary.
1408
1409         * API/APIShims.h: Added.
1410         (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
1411         (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
1412         (JSC::APIEntryShim::APIEntryShim):
1413         (JSC::APICallbackShim::APICallbackShim):
1414         (JSC::APICallbackShim::~APICallbackShim):
1415         * API/JSBase.cpp:
1416         (JSEvaluateScript):
1417         (JSCheckScriptSyntax):
1418         (JSGarbageCollect):
1419         (JSReportExtraMemoryCost):
1420         * API/JSCallbackConstructor.cpp:
1421         (JSC::constructJSCallback):
1422         * API/JSCallbackFunction.cpp:
1423         (JSC::JSCallbackFunction::call):
1424         * API/JSCallbackObjectFunctions.h:
1425         (JSC::::init):
1426         (JSC::::getOwnPropertySlot):
1427         (JSC::::put):
1428         (JSC::::deleteProperty):
1429         (JSC::::construct):
1430         (JSC::::hasInstance):
1431         (JSC::::call):
1432         (JSC::::getOwnPropertyNames):
1433         (JSC::::toNumber):
1434         (JSC::::toString):
1435         (JSC::::staticValueGetter):
1436         (JSC::::callbackGetter):
1437         * API/JSContextRef.cpp:
1438         * API/JSObjectRef.cpp:
1439         (JSObjectMake):
1440         (JSObjectMakeFunctionWithCallback):
1441         (JSObjectMakeConstructor):
1442         (JSObjectMakeFunction):
1443         (JSObjectMakeArray):
1444         (JSObjectMakeDate):
1445         (JSObjectMakeError):
1446         (JSObjectMakeRegExp):
1447         (JSObjectGetPrototype):
1448         (JSObjectSetPrototype):
1449         (JSObjectHasProperty):
1450         (JSObjectGetProperty):
1451         (JSObjectSetProperty):
1452         (JSObjectGetPropertyAtIndex):
1453         (JSObjectSetPropertyAtIndex):
1454         (JSObjectDeleteProperty):
1455         (JSObjectCallAsFunction):
1456         (JSObjectCallAsConstructor):
1457         (JSObjectCopyPropertyNames):
1458         (JSPropertyNameArrayRelease):
1459         (JSPropertyNameAccumulatorAddName):
1460         * API/JSValueRef.cpp:
1461         (JSValueGetType):
1462         (JSValueIsUndefined):
1463         (JSValueIsNull):
1464         (JSValueIsBoolean):
1465         (JSValueIsNumber):
1466         (JSValueIsString):
1467         (JSValueIsObject):
1468         (JSValueIsObjectOfClass):
1469         (JSValueIsEqual):
1470         (JSValueIsStrictEqual):
1471         (JSValueIsInstanceOfConstructor):
1472         (JSValueMakeUndefined):
1473         (JSValueMakeNull):
1474         (JSValueMakeBoolean):
1475         (JSValueMakeNumber):
1476         (JSValueMakeString):
1477         (JSValueToBoolean):
1478         (JSValueToNumber):
1479         (JSValueToStringCopy):
1480         (JSValueToObject):
1481         (JSValueProtect):
1482         (JSValueUnprotect):
1483         * JavaScriptCore.xcodeproj/project.pbxproj:
1484
1485 2010-01-04  Dan Bernstein  <mitz@apple.com>
1486
1487         Reviewed by Ada Chan and Mark Rowe.
1488
1489         Updated copyright string
1490
1491         * Info.plist:
1492         * JavaScriptCore.vcproj/JavaScriptCore.resources/Info.plist:
1493         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc:
1494
1495 2010-01-04  Adam Roben  <aroben@apple.com>
1496
1497         No review, rolling out r52741.
1498         http://trac.webkit.org/changeset/52741
1499         https://bugs.webkit.org/show_bug.cgi?id=33056
1500
1501         * wtf/AlwaysInline.h:
1502
1503 2010-01-04  Patrick Gansterer  <paroga@paroga.com>
1504
1505         Reviewed by Darin Adler.
1506
1507         Add cacheFlush support for WinCE
1508         https://bugs.webkit.org/show_bug.cgi?id=33110
1509
1510         * jit/ExecutableAllocator.h:
1511         (JSC::ExecutableAllocator::cacheFlush):
1512
1513 2010-01-04  Patrick Gansterer  <paroga@paroga.com>
1514
1515         Reviewed by Adam Roben.
1516
1517         Implement NO_RETURN for COMPILER(MSVC).
1518         https://bugs.webkit.org/show_bug.cgi?id=33056
1519
1520         * wtf/AlwaysInline.h:
1521
1522 2010-01-04  Maciej Stachowiak  <mjs@apple.com>
1523
1524         Reviewed by Simon Hausmann.
1525
1526         Fix some PLATFORM(*_ENDIAN) uses to CPU()
1527         https://bugs.webkit.org/show_bug.cgi?id=33148
1528
1529         * runtime/JSCell.cpp:
1530         (JSC::):
1531         * runtime/JSValue.h:
1532         (JSC::JSValue::):
1533
1534 2010-01-04  Maciej Stachowiak  <mjs@apple.com>
1535
1536         Reviewed by Adam Barth.
1537
1538         Document CPU() macros in comments.
1539         https://bugs.webkit.org/show_bug.cgi?id=33147
1540
1541         * wtf/Platform.h:
1542
1543 2010-01-04  Maciej Stachowiak  <mjs@apple.com>
1544
1545         Reviewed by Adam Barth.
1546
1547         Reorganize, document and rename CPU() platform macros.
1548         https://bugs.webkit.org/show_bug.cgi?id=33145
1549         ExecutableAllocatorSymbian appears to have buggy ARM version check
1550         https://bugs.webkit.org/show_bug.cgi?id=33138
1551         
1552         * wtf/Platform.h:
1553         Rename all macros related to detection of particular CPUs or
1554         classes of CPUs to CPU(), reorganize and document them.
1555
1556         All remaining changes are adapting to the renames, plus fixing the
1557         second bug cited above.
1558         
1559         * assembler/ARMAssembler.cpp:
1560         * assembler/ARMAssembler.h:
1561         * assembler/ARMv7Assembler.h:
1562         * assembler/AbstractMacroAssembler.h:
1563         (JSC::AbstractMacroAssembler::Imm32::Imm32):
1564         * assembler/MacroAssembler.h:
1565         * assembler/MacroAssemblerARM.cpp:
1566         * assembler/MacroAssemblerARM.h:
1567         * assembler/MacroAssemblerCodeRef.h:
1568         (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
1569         * assembler/MacroAssemblerX86.h:
1570         * assembler/MacroAssemblerX86Common.h:
1571         * assembler/MacroAssemblerX86_64.h:
1572         * assembler/X86Assembler.h:
1573         (JSC::X86Registers::):
1574         (JSC::X86Assembler::):
1575         (JSC::X86Assembler::movl_mEAX):
1576         (JSC::X86Assembler::movl_EAXm):
1577         (JSC::X86Assembler::repatchLoadPtrToLEA):
1578         (JSC::X86Assembler::X86InstructionFormatter::memoryModRM):
1579         * jit/ExecutableAllocator.h:
1580         * jit/ExecutableAllocatorFixedVMPool.cpp:
1581         * jit/ExecutableAllocatorPosix.cpp:
1582         * jit/ExecutableAllocatorSymbian.cpp:
1583         (JSC::ExecutableAllocator::intializePageSize):
1584         * jit/JIT.cpp:
1585         * jit/JIT.h:
1586         * jit/JITArithmetic.cpp:
1587         * jit/JITInlineMethods.h:
1588         (JSC::JIT::beginUninterruptedSequence):
1589         (JSC::JIT::restoreArgumentReferenceForTrampoline):
1590         (JSC::JIT::emitCount):
1591         * jit/JITOpcodes.cpp:
1592         (JSC::JIT::privateCompileCTIMachineTrampolines):
1593         * jit/JITPropertyAccess.cpp:
1594         (JSC::JIT::privateCompileGetByIdProto):
1595         (JSC::JIT::privateCompileGetByIdProtoList):
1596         (JSC::JIT::privateCompileGetByIdChainList):
1597         (JSC::JIT::privateCompileGetByIdChain):
1598         * jit/JITStubs.cpp:
1599         (JSC::JITThunks::JITThunks):
1600         * jit/JITStubs.h:
1601         * runtime/Collector.cpp:
1602         (JSC::currentThreadStackBase):
1603         (JSC::getPlatformThreadRegisters):
1604         (JSC::otherThreadStackPointer):
1605         * wrec/WREC.h:
1606         * wrec/WRECGenerator.cpp:
1607         (JSC::WREC::Generator::generateEnter):
1608         (JSC::WREC::Generator::generateReturnSuccess):
1609         (JSC::WREC::Generator::generateReturnFailure):
1610         * wrec/WRECGenerator.h:
1611         * wtf/FastMalloc.cpp:
1612         * wtf/TCSpinLock.h:
1613         (TCMalloc_SpinLock::Lock):
1614         (TCMalloc_SpinLock::Unlock):
1615         (TCMalloc_SlowLock):
1616         * wtf/Threading.h:
1617         * wtf/dtoa.cpp:
1618         * yarr/RegexJIT.cpp:
1619         (JSC::Yarr::RegexGenerator::generateEnter):
1620         (JSC::Yarr::RegexGenerator::generateReturn):
1621         * yarr/RegexJIT.h:
1622
1623 2010-01-04  Maciej Stachowiak  <mjs@apple.com>
1624
1625         Reviewed by Adam Barth.
1626
1627         Clean up COMPILER macros and remove unused ones.
1628         https://bugs.webkit.org/show_bug.cgi?id=33132
1629         
1630         Removed values are COMPILER(BORLAND) and COMPILER(CYGWIN) - they were
1631         not used anywhere.
1632
1633         * wtf/Platform.h:
1634
1635 2010-01-03  Maciej Stachowiak  <mjs@apple.com>
1636
1637         Reviewed by Eric Seidel.
1638
1639         Update wtf/Platform.h to document the new system for porting macros.
1640         https://bugs.webkit.org/show_bug.cgi?id=33130
1641
1642         * wtf/Platform.h:
1643
1644 2009-12-29  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1645
1646         Reviewed by Maciej Stachowiak.
1647
1648         PLATFORM(CAIRO) should be defined by WIN_CAIRO define
1649         https://bugs.webkit.org/show_bug.cgi?id=22250
1650
1651         * wtf/Platform.h: Define WTF_PLATFORM_CAIRO for GTK port only
1652         For the WinCairo port WTF_PLATFORM_CAIRO is already defined in config.h
1653
1654 2009-12-28  Shu Chang  <Chang.Shu@nokia.com>
1655
1656         Reviewed by Laszlo Gombos.
1657
1658         [Qt] Delete ThreadPrivate instance after it is finished.
1659         https://bugs.webkit.org/show_bug.cgi?id=32614
1660
1661         * wtf/qt/ThreadingQt.cpp:
1662         (WTF::ThreadMonitor::instance):
1663         (WTF::ThreadMonitor::threadFinished):
1664         (WTF::createThreadInternal):
1665         (WTF::detachThread):
1666
1667 2009-12-28  Patrick Gansterer  <paroga@paroga.com>
1668
1669         Reviewed by Maciej Stachowiak.
1670
1671         Cleanup of #define JS_EXPORT.
1672
1673         * API/JSBase.h:
1674
1675 2009-12-27  Patrick Gansterer  <paroga@paroga.com>
1676
1677         Reviewed by Adam Barth.
1678
1679         WinCE buildfix (HWND_MESSAGE isn't supported there)
1680
1681         * wtf/win/MainThreadWin.cpp:
1682         (WTF::initializeMainThreadPlatform):
1683
1684 2009-12-27  Patrick Gansterer  <paroga@paroga.com>
1685
1686         Reviewed by Adam Barth.
1687
1688         Added a file with WinMain function to link agains in WinCE.
1689
1690         * os-win32/WinMain.cpp: Added.
1691         (convertToUtf8):
1692         (WinMain):
1693
1694 2009-12-24  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1695
1696         Unreviewed; revert of r52550.
1697
1698         The change regressed the following LayoutTests for QtWebKit.
1699
1700         fast/workers/worker-call.html -> crashed
1701         fast/workers/worker-close.html -> crashed
1702
1703         * wtf/qt/ThreadingQt.cpp:
1704         (WTF::waitForThreadCompletion):
1705         (WTF::detachThread):
1706
1707 2009-12-24  Shu Chang  <Chang.Shu@nokia.com>
1708
1709         Reviewed by Laszlo Gombos.
1710
1711         [Qt] Fix memory leak by deleting instance of ThreadPrivate
1712         in function waitForThreadCompletion(), synchronously, or in
1713         detachThread(), asynchronously.
1714         https://bugs.webkit.org/show_bug.cgi?id=32614 
1715
1716         * wtf/qt/ThreadingQt.cpp:
1717         (WTF::waitForThreadCompletion):
1718         (WTF::detachThread):
1719
1720 2009-12-23  Kwang Yul Seo  <skyul@company100.net>
1721
1722         Reviewed by Laszlo Gombos.
1723
1724         Include stddef.h for ptrdiff_t
1725         https://bugs.webkit.org/show_bug.cgi?id=32891
1726
1727         ptrdiff_t is typedef-ed in stddef.h.
1728         Include stddef.h in jit/ExecutableAllocator.h.
1729
1730         * jit/ExecutableAllocator.h:
1731
1732 2009-12-23  Patrick Gansterer  <paroga@paroga.com>
1733
1734         Reviewed by Eric Seidel.
1735
1736         Buildfix after r47092.
1737
1738         * wtf/wince/MemoryManager.cpp:
1739         (WTF::tryFastMalloc):
1740         (WTF::tryFastZeroedMalloc):
1741         (WTF::tryFastCalloc):
1742         (WTF::tryFastRealloc):
1743
1744 2009-12-23  Kent Tamura  <tkent@chromium.org>
1745
1746         Reviewed by Darin Adler.
1747
1748         HTMLInputElement::valueAsDate getter support.
1749         https://bugs.webkit.org/show_bug.cgi?id=32876
1750
1751         Expose dateToDaysFrom1970().
1752
1753         * JavaScriptCore.exp:
1754         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1755         * wtf/DateMath.cpp:
1756         (WTF::dateToDaysFrom1970):
1757         * wtf/DateMath.h:
1758
1759 2009-12-22  Darin Adler  <darin@apple.com>
1760
1761         Reviewed by Mark Rowe.
1762
1763         Turn off datagrid by default, at least for all platforms Apple ships.
1764         The datagrid implementation isn't ready for general web use yet.
1765
1766         * Configurations/FeatureDefines.xcconfig: Turn off datagrid by default.
1767
1768 2009-12-22  Steve Block  <steveblock@google.com>
1769
1770         Reviewed by David Levin.
1771
1772         Updates Android's scheduleDispatchFunctionsOnMainThread() to use new
1773         AndroidThreading class, rather than using JavaSharedClient directly.
1774         This fixes the current layering violation.
1775         https://bugs.webkit.org/show_bug.cgi?id=32651
1776
1777         The pattern is copied from Chromium, which uses the ChromiumThreading
1778         class. This patch also fixes the style in ChromiumThreading.h.
1779
1780         * wtf/android/AndroidThreading.h: Added. Declares AndroidThreading.
1781         * wtf/android/MainThreadAndroid.cpp: Modified
1782         (WTF::scheduleDispatchFunctionsOnMainThread): Uses AndroidThreading.
1783         * wtf/chromium/ChromiumThreading.h: Modified. Fixes style.
1784
1785 2009-12-22  Gavin Barraclough  <barraclough@apple.com>
1786
1787         Reviewed by Sam Weinig.
1788
1789         Fix a couple of problems with UntypedPtrAndBitfield.
1790
1791         Add a m_leaksPtr to reduce false positives from leaks in debug builds
1792         (this isn't perfect because we'd like a solution for release builds,
1793         but this is now at least as good as a PtrAndFlags would be).
1794
1795         Switch SmallStringsto use a regular string for the base, rather than
1796         a static one.  UntypedPtrAndBitfield assumes all strings are at least
1797         8 byte aligned; this migt not be true of static strings.  Shared buffers
1798         are heap allocated, as are all UStringImpls other than static strings.
1799         Static strings cannot end up being the owner string of substrings,
1800         since the only static strings are length 0.
1801
1802         * runtime/SmallStrings.cpp:
1803         (JSC::SmallStringsStorage::SmallStringsStorage):
1804         * runtime/UStringImpl.h:
1805         (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield):
1806         (JSC::UStringImpl::UStringImpl):
1807
1808 2009-12-22  Kwang Yul Seo  <skyul@company100.net>
1809
1810         Reviewed by Darin Adler.
1811
1812         RVCT (__ARMCC_VERSION < 400000) does not provide strcasecmp and strncasecmp
1813         https://bugs.webkit.org/show_bug.cgi?id=32857
1814
1815         Add implementation of strcasecmp and strncasecmp for RVCT < 4.0
1816         because earlier versions of RVCT 4.0 does not provide these functions.
1817
1818         * wtf/StringExtras.cpp: Added.
1819         (strcasecmp):
1820         (strncasecmp):
1821         * wtf/StringExtras.h:
1822
1823 2009-12-22  Kwang Yul Seo  <skyul@company100.net>
1824
1825         Reviewed by Darin Adler.
1826
1827         Define ALWAYS_INLINE and WTF_PRIVATE_INLINE to __forceinline for RVCT
1828         https://bugs.webkit.org/show_bug.cgi?id=32853
1829
1830         Use __forceinline forces RVCT to compile a C or C++ function
1831         inline. The compiler attempts to inline the function, regardless of
1832         the characteristics of the function.
1833
1834         * wtf/AlwaysInline.h:
1835         * wtf/FastMalloc.h:
1836
1837 2009-12-21  Simon Hausmann  <simon.hausmann@nokia.com>
1838
1839         Prospective GTK build fix: Add UStringImpl.cpp/h to the build.
1840
1841         * GNUmakefile.am:
1842
1843 2009-12-21  Simon Hausmann  <simon.hausmann@nokia.com>
1844
1845         Fix the Qt build, add UStringImpl.cpp to the build.
1846
1847         * JavaScriptCore.pri:
1848
1849 2009-12-21  Gavin Barraclough  <barraclough@apple.com>
1850
1851         Windows Build fix part 5.
1852         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1853
1854 2009-12-21  Gavin Barraclough  <barraclough@apple.com>
1855
1856         Reviewed by NOBODY (build fix).
1857         Fix breakage of world introduced in build fix to r52463.
1858
1859         * runtime/UStringImpl.h:
1860
1861 2009-12-21  Gavin Barraclough  <barraclough@apple.com>
1862
1863         Reviewed by Darin Adler.
1864
1865         https://bugs.webkit.org/show_bug.cgi?id=32831
1866         Replace UString::Rep implementation, following introduction of ropes to JSC.
1867
1868             * Remove redundant overcapacity mechanisms.
1869             * Reduce memory cost of Rep's.
1870             * Add an inline storage mechanism akin to that in WebCore's StringImpl.
1871
1872         ~1% Sunspider progression.
1873
1874         * JavaScriptCore.exp:
1875         * JavaScriptCore.xcodeproj/project.pbxproj:
1876         * runtime/JSString.cpp:
1877         (JSC::JSString::resolveRope):
1878         * runtime/SmallStrings.cpp:
1879         (JSC::SmallStringsStorage::SmallStringsStorage):
1880         * runtime/UString.cpp:
1881         (JSC::initializeUString):
1882         (JSC::createRep):
1883         (JSC::UString::createFromUTF8):
1884         (JSC::UString::createUninitialized):
1885         (JSC::UString::spliceSubstringsWithSeparators):
1886         (JSC::UString::replaceRange):
1887         (JSC::UString::ascii):
1888         (JSC::UString::operator=):
1889         (JSC::UString::toStrictUInt32):
1890         (JSC::equal):
1891         * runtime/UString.h:
1892         (JSC::UString::isEmpty):
1893         (JSC::UString::cost):
1894         (JSC::makeString):
1895         * runtime/UStringImpl.cpp: Added.
1896         (JSC::UStringImpl::baseSharedBuffer):
1897         (JSC::UStringImpl::sharedBuffer):
1898         (JSC::UStringImpl::destroy):
1899         (JSC::UStringImpl::computeHash):
1900         * runtime/UStringImpl.h: Added.
1901         (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield):
1902         (JSC::UntypedPtrAndBitfield::asPtr):
1903         (JSC::UntypedPtrAndBitfield::operator&=):
1904         (JSC::UntypedPtrAndBitfield::operator|=):
1905         (JSC::UntypedPtrAndBitfield::operator&):
1906         (JSC::UStringImpl::create):
1907         (JSC::UStringImpl::createCopying):
1908         (JSC::UStringImpl::createUninitialized):
1909         (JSC::UStringImpl::data):
1910         (JSC::UStringImpl::size):
1911         (JSC::UStringImpl::cost):
1912         (JSC::UStringImpl::hash):
1913         (JSC::UStringImpl::computedHash):
1914         (JSC::UStringImpl::setHash):
1915         (JSC::UStringImpl::identifierTable):
1916         (JSC::UStringImpl::setIdentifierTable):
1917         (JSC::UStringImpl::ref):
1918         (JSC::UStringImpl::deref):
1919         (JSC::UStringImpl::allocChars):
1920         (JSC::UStringImpl::copyChars):
1921         (JSC::UStringImpl::computeHash):
1922         (JSC::UStringImpl::null):
1923         (JSC::UStringImpl::empty):
1924         (JSC::UStringImpl::checkConsistency):
1925         (JSC::UStringImpl::):
1926         (JSC::UStringImpl::UStringImpl):
1927         (JSC::UStringImpl::operator new):
1928         (JSC::UStringImpl::bufferOwnerString):
1929         (JSC::UStringImpl::bufferOwnership):
1930         (JSC::UStringImpl::isStatic):
1931
1932 2009-12-18  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1933
1934         Reviewed by Kenneth Rohde Christiansen.
1935
1936         Move some build decisions from Qt build system into source files
1937         https://bugs.webkit.org/show_bug.cgi?id=31956
1938
1939         * JavaScriptCore.pri: Compile files unconditionally
1940         * jit/ExecutableAllocatorPosix.cpp: Guard with PLATFORM(UNIX) && !PLATFORM(SYMBIAN)
1941         * jit/ExecutableAllocatorWin.cpp: Guard with PLATFORM(WIN_OS)
1942         * runtime/MarkStackPosix.cpp: Guard with PLATFORM(UNIX) && !PLATFORM(SYMBIAN)
1943         * runtime/MarkStackSymbian.cpp: Guard with PLATFORM(SYMBIAN)
1944         * runtime/MarkStackWin.cpp: Guard with PLATFORM(WIN_OS)
1945         * wtf/Platform.h: Guard ENABLE_JSC_MULTIPLE_THREADS with ENABLE_SINGLE_THREADED for the Qt port
1946         * wtf/ThreadingNone.cpp: Guard with ENABLE(SINGLE_THREADED)
1947         * wtf/qt/ThreadingQt.cpp: Guard with !ENABLE(SINGLE_THREADED)
1948
1949 2009-12-18  Gavin Barraclough  <barraclough@apple.com>
1950
1951         Reviewed by Sam Weinig.
1952
1953         Add createNonCopying method to UString to make replace constructor passed bool,
1954         to make behaviour more explicit.  Add createFromUTF8 to UString (wrapping method
1955         on UString::Rep), since other cases of transliteration (e.g.  from ascii) are
1956         performed in UString constructors.  Add/use setHash & size() accessors on Rep,
1957         rather than accessing _hash/len directly.
1958
1959         * API/JSClassRef.cpp:
1960         (OpaqueJSClass::OpaqueJSClass):
1961         * API/OpaqueJSString.cpp:
1962         (OpaqueJSString::ustring):
1963         * JavaScriptCore.exp:
1964         * runtime/ArrayPrototype.cpp:
1965         (JSC::arrayProtoFuncToString):
1966         * runtime/Identifier.cpp:
1967         (JSC::Identifier::equal):
1968         (JSC::CStringTranslator::translate):
1969         (JSC::UCharBufferTranslator::translate):
1970         (JSC::Identifier::addSlowCase):
1971         * runtime/JSString.cpp:
1972         (JSC::JSString::resolveRope):
1973         * runtime/JSString.h:
1974         (JSC::JSString::Rope::Fiber::refAndGetLength):
1975         (JSC::JSString::Rope::append):
1976         * runtime/StringBuilder.h:
1977         (JSC::StringBuilder::release):
1978         * runtime/StringConstructor.cpp:
1979         (JSC::stringFromCharCodeSlowCase):
1980         * runtime/StringPrototype.cpp:
1981         (JSC::substituteBackreferencesSlow):
1982         (JSC::stringProtoFuncToLowerCase):
1983         (JSC::stringProtoFuncToUpperCase):
1984         (JSC::stringProtoFuncFontsize):
1985         (JSC::stringProtoFuncLink):
1986         * runtime/UString.cpp:
1987         (JSC::UString::UString):
1988         (JSC::UString::createNonCopying):
1989         (JSC::UString::createFromUTF8):
1990         * runtime/UString.h:
1991         (JSC::UString::Rep::setHash):
1992         (JSC::UString::~UString):
1993         (JSC::makeString):
1994
1995 2009-12-18  Geoffrey Garen  <ggaren@apple.com>
1996
1997         Reviewed by Cameron Zwarich and Gavin Barraclough.
1998         
1999         Changed Register constructors to assignment operators, to streamline
2000         moving values into registers. (In theory, there's no difference between
2001         the two, since the constructor should just inline away, but there seems
2002         to be a big difference in the addled mind of the GCC optimizer.)
2003
2004         In the interpreter, this is a 3.5% SunSpider speedup and a 1K-2K
2005         reduction in stack usage per privateExecute stack frame.
2006
2007         * interpreter/CallFrame.h:
2008         (JSC::ExecState::setCalleeArguments):
2009         (JSC::ExecState::setCallerFrame):
2010         (JSC::ExecState::setScopeChain):
2011         (JSC::ExecState::init):
2012         (JSC::ExecState::setArgumentCount):
2013         (JSC::ExecState::setCallee):
2014         (JSC::ExecState::setCodeBlock): Added a little bit of casting so these
2015         functions could use the new Register assignment operators.
2016
2017         * interpreter/Register.h:
2018         (JSC::Register::withInt):
2019         (JSC::Register::Register):
2020         (JSC::Register::operator=): Swapped in assignment operators for constructors.
2021
2022 2009-12-18  Yongjun Zhang  <yongjun.zhang@nokia.com>
2023
2024         Reviewed by Simon Hausmann.
2025
2026         https://bugs.webkit.org/show_bug.cgi?id=32713
2027         [Qt] make wtf/Assertions.h compile in winscw compiler.
2028
2029         Add string arg before ellipsis to help winscw compiler resolve variadic
2030         macro definitions in wtf/Assertions.h. 
2031
2032         * wtf/Assertions.h:
2033
2034 2009-12-18  Geoffrey Garen  <ggaren@apple.com>
2035
2036         Reviewed by Adam Roben.
2037
2038         Fixed intermittent failure seen on Windows buildbot, and in other JSC
2039         API clients.
2040         
2041         Added a WeakGCPtr class and changed OpaqueJSClass::cachedPrototype to
2042         use it, to avoid vending a stale object as a prototype.
2043
2044         * API/JSClassRef.cpp:
2045         (OpaqueJSClassContextData::OpaqueJSClassContextData):
2046         (OpaqueJSClass::prototype):
2047         * API/JSClassRef.h: Use WeakGCPtr.
2048
2049         * JavaScriptCore.xcodeproj/project.pbxproj:
2050         * runtime/WeakGCPtr.h: Added.
2051         (JSC::WeakGCPtr::WeakGCPtr):
2052         (JSC::WeakGCPtr::get):
2053         (JSC::WeakGCPtr::clear):
2054         (JSC::WeakGCPtr::operator*):
2055         (JSC::WeakGCPtr::operator->):
2056         (JSC::WeakGCPtr::operator!):
2057         (JSC::WeakGCPtr::operator bool):
2058         (JSC::WeakGCPtr::operator UnspecifiedBoolType):
2059         (JSC::WeakGCPtr::assign):
2060         (JSC::::operator):
2061         (JSC::operator==):
2062         (JSC::operator!=):
2063         (JSC::static_pointer_cast):
2064         (JSC::const_pointer_cast):
2065         (JSC::getPtr): Added WeakGCPtr to the project.
2066
2067 2009-12-18  Gavin Barraclough  <barraclough@apple.com>
2068
2069         Reviewed by Sam Weinig.
2070
2071         https://bugs.webkit.org/show_bug.cgi?id=32720
2072
2073         * JavaScriptCore.exp:
2074             - Remove exports for UString::append
2075         * JavaScriptCore.xcodeproj/project.pbxproj:
2076             - Make StringBuilder a private header (was project).
2077
2078 2009-12-18  Martin Robinson  <martin.james.robinson@gmail.com>
2079
2080         Reviewed by Gustavo Noronha Silva.
2081
2082         [GTK] GRefPtr does not take a reference when assigned a raw pointer
2083         https://bugs.webkit.org/show_bug.cgi?id=32709
2084
2085         Ensure that when assigning a raw pointer to a GRefPtr, the reference
2086         count is incremented. Also remove the GRefPtr conversion overload as
2087         GRefPtr types have necessarily incompatible reference counting.
2088
2089         * wtf/gtk/GRefPtr.h:
2090         (WTF::GRefPtr::operator=):
2091
2092 2009-12-18  Simon Hausmann  <simon.hausmann@nokia.com>
2093
2094         Reviewed by Tor Arne Vestbø.
2095
2096         [Qt] Clean up the qmake build system to distinguish between trunk builds and package builds
2097
2098         https://bugs.webkit.org/show_bug.cgi?id=32716
2099
2100         * pcre/pcre.pri: Use standalone_package instead of QTDIR_build
2101
2102 2009-12-18  Martin Robinson  <martin.james.robinson@gmail.com>
2103
2104         Reviewed by Gustavo Noronha Silva.
2105
2106         [GTK] Compile warning from line 29 of GRefPtr.cpp
2107         https://bugs.webkit.org/show_bug.cgi?id=32703
2108
2109         Fix memory leak and compiler warning in GRefPtr GHashTable template
2110         specialization.
2111
2112         * wtf/gtk/GRefPtr.cpp:
2113         (WTF::refGPtr):
2114
2115 2009-12-17  Sam Weinig  <sam@webkit.org>
2116
2117         Reviewed by Mark Rowe.
2118
2119         Add BUILDING_ON_SNOW_LEOPARD and TARGETING_SNOW_LEOPARD #defines.
2120
2121         * wtf/Platform.h:
2122
2123 2009-12-17  Adam Roben  <aroben@apple.com>
2124
2125         Sync JavaScriptCore.vcproj with JavaScriptCore.xcodeproj and the
2126         source tree
2127
2128         Fixes <http://webkit.org/b/32665>.
2129
2130         Reviewed by Ada Chan.
2131
2132         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Moved
2133         around files and filters so that the structure matches
2134         JavaScriptCore.xcodeproj and the source tree. A few headers that were
2135         previously omitted have been added, as well as JSZombie.{cpp,h}.
2136
2137 2009-12-17  Adam Roben  <aroben@apple.com>
2138
2139         Remove HeavyProfile and TreeProfile completely
2140
2141         These were mostly removed in r42808, but the empty files were left in
2142         place.
2143
2144         Fixes <http://webkit.org/b/32664>.
2145
2146         Reviewed by John Sullivan.
2147
2148         * Android.mk:
2149         * GNUmakefile.am:
2150         * JavaScriptCore.gypi:
2151         * JavaScriptCore.pri:
2152         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2153         * JavaScriptCoreSources.bkl:
2154         Removed HeavyProfile/TreeProfile source files.
2155
2156         * profiler/HeavyProfile.cpp: Removed.
2157         * profiler/HeavyProfile.h: Removed.
2158         * profiler/TreeProfile.cpp: Removed.
2159         * profiler/TreeProfile.h: Removed.
2160
2161 2009-12-17  Martin Robinson  <martin.james.robinson@gmail.com>
2162
2163         Reviewed by Gustavo Noronha Silva.
2164
2165         [GTK] WebKit GTK needs a wrapper for ref counted glib/gobject structs
2166         https://bugs.webkit.org/show_bug.cgi?id=21599
2167
2168         Implement GRefPtr, a smart pointer for reference counted GObject types.
2169
2170         * GNUmakefile.am:
2171         * wtf/gtk/GOwnPtr.cpp:
2172         (WTF::GDir):
2173         * wtf/gtk/GRefPtr.h: Added.
2174         (WTF::):
2175         (WTF::GRefPtr::GRefPtr):
2176         (WTF::GRefPtr::~GRefPtr):
2177         (WTF::GRefPtr::clear):
2178         (WTF::GRefPtr::get):
2179         (WTF::GRefPtr::operator*):
2180         (WTF::GRefPtr::operator->):
2181         (WTF::GRefPtr::operator!):
2182         (WTF::GRefPtr::operator UnspecifiedBoolType):
2183         (WTF::GRefPtr::hashTableDeletedValue):
2184         (WTF::::operator):
2185         (WTF::::swap):
2186         (WTF::swap):
2187         (WTF::operator==):
2188         (WTF::operator!=):
2189         (WTF::static_pointer_cast):
2190         (WTF::const_pointer_cast):
2191         (WTF::getPtr):
2192         (WTF::adoptGRef):
2193         (WTF::refGPtr):
2194         (WTF::derefGPtr):
2195
2196 2009-12-17  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
2197
2198         Unreviewed. Build fixes for make distcheck.
2199
2200         * GNUmakefile.am:
2201
2202 2009-12-16  Geoffrey Garen  <ggaren@apple.com>
2203
2204         Reviewed by Oliver Hunt.
2205
2206         Fixed <rdar://problem/7355025> Interpreter::privateExecute macro generates
2207         bloated code
2208         
2209         This patch cuts Interpreter stack use by about a third.
2210
2211         * bytecode/Opcode.h: Changed Opcode to const void* to work with the
2212         const static initiliazation we want to do in Interpreter::privateExecute.
2213
2214         * interpreter/Interpreter.cpp:
2215         (JSC::Interpreter::Interpreter): Moved hashtable initialization here to
2216         avoid polluting Interpreter::privateExecute's stack, and changed it from a
2217         series of add() calls to one add() call in a loop, to cut down on code size.
2218
2219         (JSC::Interpreter::privateExecute): Changed a series of label computations
2220         to a copy of a compile-time constant array to cut down on code size.
2221
2222 2009-12-16  Mark Rowe  <mrowe@apple.com>
2223
2224         Build fix.  Disable debug variants of WebKit frameworks.
2225
2226         * JavaScriptCore.xcodeproj/project.pbxproj:
2227
2228 2009-12-15  Geoffrey Garen  <ggaren@apple.com>
2229
2230         Reviewed by Sam "r=me" Weinig.
2231
2232         https://bugs.webkit.org/show_bug.cgi?id=32498
2233         <rdar://problem/7471495>
2234         REGRESSION(r51978-r52039): AJAX "Mark This Forum Read" function no longer
2235         works
2236         
2237         Fixed a tyop.
2238
2239         * runtime/Operations.h:
2240         (JSC::jsAdd): Use the '&&' operator, not the ',' operator.
2241
2242 2009-12-15  Geoffrey Garen  <ggaren@apple.com>
2243
2244         Try to fix the windows build: don't export this inlined function.
2245
2246         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2247
2248 2009-12-15  Geoffrey Garen  <ggaren@apple.com>
2249
2250         Reviewed by Beth Dakin.
2251
2252         Inlined JSCell's operator new.
2253         
2254         3.7% speedup on bench-allocate-nonretained.js.
2255
2256         * JavaScriptCore.exp:
2257         * runtime/JSCell.cpp:
2258         * runtime/JSCell.h:
2259         (JSC::JSCell::operator new):
2260
2261 2009-12-15  Geoffrey Garen  <ggaren@apple.com>
2262
2263         Reviewed by Oliver Hunt.
2264
2265         Removed the number heap, replacing it with a one-item free list for
2266         numbers, taking advantage of the fact that two number cells fit inside
2267         the space for one regular cell, and number cells don't require destruction.
2268         
2269         SunSpider says 1.6% faster in JSVALUE32 mode (the only mode that
2270         heap-allocates numbers).
2271         
2272         SunSpider says 1.1% faster in JSVALUE32_64 mode. v8 says 0.8% faster
2273         in JSVALUE32_64 mode. 10% speedup on bench-alloc-nonretained.js. 6%
2274         speedup on bench-alloc-retained.js.
2275         
2276         There's a lot of formulaic change in this patch, but not much substance.
2277
2278         * JavaScriptCore.exp:
2279         * debugger/Debugger.cpp:
2280         (JSC::Debugger::recompileAllJSFunctions):
2281         * runtime/Collector.cpp:
2282         (JSC::Heap::Heap):
2283         (JSC::Heap::destroy):
2284         (JSC::Heap::allocateBlock):
2285         (JSC::Heap::freeBlock):
2286         (JSC::Heap::freeBlockPtr):
2287         (JSC::Heap::freeBlocks):
2288         (JSC::Heap::recordExtraCost):
2289         (JSC::Heap::allocate):
2290         (JSC::Heap::resizeBlocks):
2291         (JSC::Heap::growBlocks):
2292         (JSC::Heap::shrinkBlocks):
2293         (JSC::Heap::markConservatively):
2294         (JSC::Heap::clearMarkBits):
2295         (JSC::Heap::markedCells):
2296         (JSC::Heap::sweep):
2297         (JSC::Heap::markRoots):
2298         (JSC::Heap::objectCount):
2299         (JSC::Heap::addToStatistics):
2300         (JSC::Heap::statistics):
2301         (JSC::Heap::isBusy):
2302         (JSC::Heap::reset):
2303         (JSC::Heap::collectAllGarbage):
2304         (JSC::Heap::primaryHeapBegin):
2305         (JSC::Heap::primaryHeapEnd):
2306         * runtime/Collector.h:
2307         (JSC::): Removed all code pertaining to the number heap, and changed all
2308         heap template functions and classes to non-template functions and classes.
2309
2310         (JSC::Heap::allocateNumber): A new optimization to replace the number
2311         heap: allocate half-sized number cells in pairs, returning the first
2312         cell and caching the second cell for the next allocation.
2313
2314         * runtime/CollectorHeapIterator.h:
2315         (JSC::LiveObjectIterator::LiveObjectIterator):
2316         (JSC::LiveObjectIterator::operator++):
2317         (JSC::DeadObjectIterator::DeadObjectIterator):
2318         (JSC::DeadObjectIterator::operator++):
2319         (JSC::ObjectIterator::ObjectIterator):
2320         (JSC::ObjectIterator::operator++):
2321         * runtime/JSCell.h:
2322         (JSC::JSCell::isNumber): Removed all code pertaining to the number heap,
2323         and changed all heap template functions and classes to non-template functions
2324         and classes.
2325
2326 2009-12-15  Zoltan Horvath  <zoltan@webkit.org>
2327
2328         Reviewed by Darin Adler.
2329
2330         Allow custom memory allocation control for WeakGCMap class
2331         https://bugs.webkit.org/show_bug.cgi?id=32547
2332
2333         Inherits WeakGCMap from FastAllocBase because it is instantiated by
2334         'new' at: WebCore/dom/Document.cpp:512.
2335
2336         * runtime/WeakGCMap.h:
2337
2338 2009-12-15  Zoltan Horvath  <zoltan@webkit.org>
2339
2340         Reviewed by Darin Adler.
2341
2342         Allow custom memory allocation control for dtoa's P5Node struct
2343         https://bugs.webkit.org/show_bug.cgi?id=32544
2344
2345         Inherits P5Node struct from Noncopyable because it is instantiated by
2346         'new' at wtf/dtoa.cpp:588 and don't need to be copyable.
2347
2348         * wtf/dtoa.cpp:
2349
2350 2009-12-14  Geoffrey Garen  <ggaren@apple.com>
2351
2352         Reviewed by Simon Fraser.
2353
2354         https://bugs.webkit.org/show_bug.cgi?id=32524
2355         REGRESSION(52084): fast/dom/prototypes.html failing two CSS tests
2356
2357         * wtf/StdLibExtras.h:
2358         (WTF::bitCount): The original patch put the parentheses in the wrong
2359         place, completely changing the calculation and making it almost always
2360         wrong. Moved the parentheses around the '+' operation, like the original
2361         compiler warning suggested.
2362
2363 2009-12-14  Gabor Loki  <loki@inf.u-szeged.hu>
2364
2365         Unreviewed trivial buildfix.
2366
2367         Fix crosses initialization of usedPrimaryBlocks for JSValue32
2368
2369         * runtime/Collector.cpp:
2370         (JSC::Heap::markConservatively):
2371
2372 2009-12-14  Csaba Osztrogonác  <ossy@webkit.org>
2373
2374         Reviewed by Simon Hausmann.
2375
2376         GCC 4.3.x warning fixed. Suggested parantheses added.
2377         warning: ../../../JavaScriptCore/wtf/StdLibExtras.h:77: warning: suggest parentheses around + or - in operand of &
2378
2379         * wtf/StdLibExtras.h:
2380         (WTF::bitCount):
2381
2382 2009-12-13  Geoffrey Garen  <ggaren@apple.com>
2383
2384         Reviewed by Sam Weinig.
2385         
2386         Changed GC from mark-sweep to mark-allocate.
2387         
2388         Added WeakGCMap to keep WebCore blissfully ignorant about objects that
2389         have become garbage but haven't run their destructors yet.
2390         
2391         1% SunSpider speedup.
2392         7.6% v8 speedup (37% splay speedup).
2393         17% speedup on bench-alloc-nonretained.js.
2394         18% speedup on bench-alloc-retained.js.
2395
2396         * API/JSBase.cpp:
2397         (JSGarbageCollect):
2398         * API/JSContextRef.cpp:
2399         * JavaScriptCore.exp:
2400         * JavaScriptCore.xcodeproj/project.pbxproj: Updated for renames and new
2401         files.
2402
2403         * debugger/Debugger.cpp:
2404         (JSC::Debugger::recompileAllJSFunctions): Updated to use the Collector
2405         iterator abstraction.
2406
2407         * jsc.cpp:
2408         (functionGC): Updated for rename.
2409
2410         * runtime/Collector.cpp: Slightly reduced the number of allocations per
2411         collection, so that small workloads only allocate on collector block,
2412         rather than two.
2413
2414         (JSC::Heap::Heap): Updated to use the new allocateBlock function.
2415
2416         (JSC::Heap::destroy): Updated to use the new freeBlocks function.
2417
2418         (JSC::Heap::allocateBlock): New function to initialize a block when
2419         allocating it.
2420
2421         (JSC::Heap::freeBlock): Consolidated the responsibility for running
2422         destructors into this function.
2423
2424         (JSC::Heap::freeBlocks): Updated to use freeBlock.
2425
2426         (JSC::Heap::recordExtraCost): Sweep the heap in this reporting function,
2427         so that allocation, which is more common, doesn't have to check extraCost.
2428
2429         (JSC::Heap::heapAllocate): Run destructors right before recycling a
2430         garbage cell. This has better cache utilization than a separate sweep phase.
2431
2432         (JSC::Heap::resizeBlocks):
2433         (JSC::Heap::growBlocks):
2434         (JSC::Heap::shrinkBlocks): New set of functions for managing the size of
2435         the heap, now that the heap doesn't maintain any information about its
2436         size.
2437
2438         (JSC::isPointerAligned):
2439         (JSC::isHalfCellAligned):
2440         (JSC::isPossibleCell):
2441         (JSC::isCellAligned):
2442         (JSC::Heap::markConservatively): Cleaned up this code a bit.
2443
2444         (JSC::Heap::clearMarkBits):
2445         (JSC::Heap::markedCells): Some helper functions for examining the the mark
2446         bitmap.
2447
2448         (JSC::Heap::sweep): Simplified this function by using a DeadObjectIterator.
2449
2450         (JSC::Heap::markRoots): Reordered some operations for clarity.
2451
2452         (JSC::Heap::objectCount):
2453         (JSC::Heap::addToStatistics):
2454         (JSC::Heap::statistics): Rewrote these functions to calculate an object
2455         count on demand, since the heap doesn't maintain this information by 
2456         itself.
2457
2458         (JSC::Heap::reset): New function for resetting the heap once we've
2459         exhausted heap space.
2460
2461         (JSC::Heap::collectAllGarbage): This function matches the old collect()
2462         behavior, but it's now an uncommon function used only by API.
2463
2464         * runtime/Collector.h:
2465         (JSC::CollectorBitmap::count):
2466         (JSC::CollectorBitmap::isEmpty): Added some helper functions for managing
2467         the collector mark bitmap.
2468
2469         (JSC::Heap::reportExtraMemoryCost): Changed reporting from cell equivalents
2470         to bytes, so it's easier to understand.
2471         
2472         * runtime/CollectorHeapIterator.h:
2473         (JSC::CollectorHeapIterator::CollectorHeapIterator):
2474         (JSC::CollectorHeapIterator::operator!=):
2475         (JSC::CollectorHeapIterator::operator*):
2476         (JSC::CollectorHeapIterator::advance):
2477         (JSC::::LiveObjectIterator):
2478         (JSC::::operator):
2479         (JSC::::DeadObjectIterator):
2480         (JSC::::ObjectIterator): New iterators for encapsulating details about
2481         heap layout, and what's live and dead on the heap.
2482
2483         * runtime/JSArray.cpp:
2484         (JSC::JSArray::putSlowCase):
2485         (JSC::JSArray::increaseVectorLength): Delay reporting extra cost until
2486         we're fully constructed, so the heap mark phase won't visit us in an
2487         invalid state.
2488
2489         * runtime/JSCell.h:
2490         (JSC::JSCell::):
2491         (JSC::JSCell::createDummyStructure):
2492         (JSC::JSCell::JSCell):
2493         * runtime/JSGlobalData.cpp:
2494         (JSC::JSGlobalData::JSGlobalData):
2495         * runtime/JSGlobalData.h: Added a dummy cell to simplify allocation logic.
2496
2497         * runtime/JSString.h:
2498         (JSC::jsSubstring): Don't report extra cost for substrings, since they
2499         share a buffer that's already reported extra cost.
2500
2501         * runtime/Tracing.d:
2502         * runtime/Tracing.h: Changed these dtrace hooks not to report object
2503         counts, since they're no longer cheap to compute.
2504
2505         * runtime/UString.h: Updated for renames.
2506
2507         * runtime/WeakGCMap.h: Added.
2508         (JSC::WeakGCMap::isEmpty):
2509         (JSC::WeakGCMap::uncheckedGet):
2510         (JSC::WeakGCMap::uncheckedBegin):
2511         (JSC::WeakGCMap::uncheckedEnd):
2512         (JSC::::get):
2513         (JSC::::take):
2514         (JSC::::set):
2515         (JSC::::uncheckedRemove): Mentioned above.
2516
2517         * wtf/StdLibExtras.h:
2518         (WTF::bitCount): Added a bit population count function, so the heap can
2519         count live objects to fulfill statistics questions.
2520
2521 The very last cell in the block is not allocated -- should not be marked.
2522
2523 2009-12-13  Geoffrey Garen  <ggaren@apple.com>
2524
2525         Windows build fix: Export some new symbols.
2526
2527         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2528
2529 2009-12-13  Geoffrey Garen  <ggaren@apple.com>
2530
2531         Windows build fix: Removed some old exports.
2532
2533         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2534
2535 2009-12-13  Geoffrey Garen  <ggaren@apple.com>
2536
2537         Windows build fix: Use unsigned instead of uint32_t to avoid dependencies.
2538
2539         * wtf/StdLibExtras.h:
2540         (WTF::bitCount):
2541
2542 2009-12-13  Gavin Barraclough  <barraclough@apple.com>
2543
2544         Reviewed by NOBODY (speculative Windows build fix).
2545
2546         * runtime/JSGlobalObjectFunctions.cpp:
2547
2548 2009-12-13  Gavin Barraclough  <barraclough@apple.com>
2549
2550         Reviewed by Sam Weinig.
2551
2552         https://bugs.webkit.org/show_bug.cgi?id=32496
2553         Switch remaining cases of string construction to use StringBuilder.
2554         Builds strings using a vector rather than using string append / addition.
2555
2556         * JavaScriptCore.exp:
2557         * JavaScriptCore.xcodeproj/project.pbxproj:
2558         * runtime/Executable.cpp:
2559         (JSC::FunctionExecutable::paramString):
2560         * runtime/FunctionConstructor.cpp:
2561         (JSC::constructFunction):
2562         * runtime/JSGlobalObjectFunctions.cpp:
2563         (JSC::encode):
2564         (JSC::decode):
2565         (JSC::globalFuncEscape):
2566         (JSC::globalFuncUnescape):
2567         * runtime/JSONObject.cpp:
2568         (JSC::Stringifier::stringify):
2569         (JSC::Stringifier::indent):
2570         * runtime/JSString.h:
2571         * runtime/LiteralParser.cpp:
2572         (JSC::LiteralParser::Lexer::lexString):
2573         * runtime/NumberPrototype.cpp:
2574         (JSC::integerPartNoExp):
2575         (JSC::numberProtoFuncToFixed):
2576         (JSC::numberProtoFuncToPrecision):
2577         * runtime/Operations.h:
2578         (JSC::jsString):
2579         * runtime/StringPrototype.cpp:
2580         (JSC::substituteBackreferencesSlow):
2581         (JSC::substituteBackreferences):
2582         (JSC::stringProtoFuncConcat):
2583
2584 2009-12-08  Jeremy Moskovich  <jeremy@chromium.org>
2585
2586         Reviewed by Eric Seidel.
2587
2588         Add code to allow toggling ATSUI/Core Text rendering at runtime in ComplexTextController.
2589         https://bugs.webkit.org/show_bug.cgi?id=31802
2590
2591         The goal here is to allow for a zero runtime hit for ports that decide to select
2592         the API at compile time.
2593         When both USE(ATSUI) and USE(CORE_TEXT) are true, the API is toggled
2594         at runtime.  Core Text is used for OS Versions >= 10.6.
2595
2596         * wtf/Platform.h: #define USE_CORE_TEXT and USE_ATSUI on Chrome/Mac.
2597
2598 2009-12-11  Maciej Stachowiak  <mjs@apple.com>
2599
2600         Reviewed by Oliver Hunt.
2601
2602         Unify codegen for forward and backward variants of branches
2603         https://bugs.webkit.org/show_bug.cgi?id=32463
2604
2605         * jit/JIT.h:
2606         (JSC::JIT::emit_op_loop): Implemented in terms of forward variant.
2607         (JSC::JIT::emit_op_loop_if_true): ditto
2608         (JSC::JIT::emitSlow_op_loop_if_true): ditto
2609         (JSC::JIT::emit_op_loop_if_false): ditto
2610         (JSC::JIT::emitSlow_op_loop_if_false): ditto
2611         (JSC::JIT::emit_op_loop_if_less): ditto
2612         (JSC::JIT::emitSlow_op_loop_if_less): ditto
2613         * jit/JITOpcodes.cpp:
2614
2615 2009-12-11  Sam Weinig  <sam@webkit.org>
2616
2617         Reviewed by Anders Carlsson.
2618
2619         Allow WTFs concept of the main thread to differ from pthreads when necessary.
2620
2621         * wtf/ThreadingPthreads.cpp:
2622         (WTF::initializeThreading):
2623         (WTF::isMainThread):
2624         * wtf/mac/MainThreadMac.mm:
2625         (WTF::initializeMainThreadPlatform):
2626         (WTF::scheduleDispatchFunctionsOnMainThread):
2627
2628 2009-12-11  Gavin Barraclough  <barraclough@apple.com>
2629
2630         Reviewed by Oliver Hunt.
2631
2632         https://bugs.webkit.org/show_bug.cgi?id=32454
2633         Refactor construction of simple strings to avoid string concatenation.
2634
2635         Building strings through concatenation has a memory and performance cost -
2636         a memory cost since we must over-allocate the buffer to leave space to append
2637         into, and performance in that the string may still require reallocation (and
2638         thus copying during construction).  Instead move the full construction to
2639         within a single function call (makeString), so that the arguments' lengths
2640         can be calculated and an appropriate sized buffer allocated before copying
2641         any characters.
2642
2643         ~No performance change (~2% progression on date tests).
2644
2645         * bytecode/CodeBlock.cpp:
2646         (JSC::escapeQuotes):
2647         (JSC::valueToSourceString):
2648         (JSC::constantName):
2649         (JSC::idName):
2650         (JSC::CodeBlock::registerName):
2651         (JSC::regexpToSourceString):
2652         (JSC::regexpName):
2653         * bytecompiler/NodesCodegen.cpp:
2654         (JSC::substitute):
2655         * profiler/Profiler.cpp:
2656         (JSC::Profiler::createCallIdentifier):
2657         * runtime/DateConstructor.cpp:
2658         (JSC::callDate):
2659         * runtime/DateConversion.cpp:
2660         (JSC::formatDate):
2661         (JSC::formatDateUTCVariant):
2662         (JSC::formatTime):
2663         (JSC::formatTimeUTC):
2664         * runtime/DateConversion.h:
2665         (JSC::):
2666         * runtime/DatePrototype.cpp:
2667         (JSC::dateProtoFuncToString):
2668         (JSC::dateProtoFuncToUTCString):
2669         (JSC::dateProtoFuncToDateString):
2670         (JSC::dateProtoFuncToTimeString):
2671         (JSC::dateProtoFuncToGMTString):
2672         * runtime/ErrorPrototype.cpp:
2673         (JSC::errorProtoFuncToString):
2674         * runtime/ExceptionHelpers.cpp:
2675         (JSC::createUndefinedVariableError):
2676         (JSC::createErrorMessage):
2677         (JSC::createInvalidParamError):
2678         * runtime/FunctionPrototype.cpp:
2679         (JSC::insertSemicolonIfNeeded):
2680         (JSC::functionProtoFuncToString):
2681         * runtime/ObjectPrototype.cpp:
2682         (JSC::objectProtoFuncToString):
2683         * runtime/RegExpConstructor.cpp:
2684         (JSC::constructRegExp):
2685         * runtime/RegExpObject.cpp:
2686         (JSC::RegExpObject::match):
2687         * runtime/RegExpPrototype.cpp:
2688         (JSC::regExpProtoFuncCompile):
2689         (JSC::regExpProtoFuncToString):
2690         * runtime/StringPrototype.cpp:
2691         (JSC::stringProtoFuncBig):
2692         (JSC::stringProtoFuncSmall):
2693         (JSC::stringProtoFuncBlink):
2694         (JSC::stringProtoFuncBold):
2695         (JSC::stringProtoFuncFixed):
2696         (JSC::stringProtoFuncItalics):
2697         (JSC::stringProtoFuncStrike):
2698         (JSC::stringProtoFuncSub):
2699         (JSC::stringProtoFuncSup):
2700         (JSC::stringProtoFuncFontcolor):
2701         (JSC::stringProtoFuncFontsize):
2702         (JSC::stringProtoFuncAnchor):
2703         * runtime/UString.h:
2704         (JSC::):
2705         (JSC::makeString):
2706
2707 2009-12-10  Gavin Barraclough  <barraclough@apple.com>
2708
2709         Reviewed by Oliver Hunt.
2710
2711         https://bugs.webkit.org/show_bug.cgi?id=32400
2712         Switch remaining cases of string addition to use ropes.
2713
2714         Re-landing r51975 - added toPrimitiveString method,
2715         performs toPrimitive then subsequent toString operations.
2716
2717         ~1% progression on Sunspidey.
2718
2719         * jit/JITStubs.cpp:
2720         (JSC::DEFINE_STUB_FUNCTION):
2721         * runtime/JSString.h:
2722         (JSC::JSString::JSString):
2723         (JSC::JSString::appendStringInConstruct):
2724         * runtime/Operations.cpp:
2725         (JSC::jsAddSlowCase):
2726         * runtime/Operations.h:
2727         (JSC::jsString):
2728         (JSC::jsAdd):
2729
2730 2009-12-11  Adam Roben  <aroben@apple.com>
2731
2732         Windows build fix
2733
2734         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Added
2735         $(WebKitOutputDir)/include/private to the include path.
2736
2737 2009-12-11  Adam Roben  <aroben@apple.com>
2738
2739         Move QuartzCorePresent.h to include/private
2740
2741         This fixes other projects that use wtf/Platform.h
2742
2743         Rubber-stamped by Steve Falkenburg.
2744
2745         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Let VS do its thang.
2746         * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Write
2747         QuartzCorePresent.h to $(WebKitOutputDir)/include/private.
2748
2749         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
2750         * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
2751         Added $(WebKitOutputDir)/include/private to the include path.
2752
2753 2009-12-11  Adam Roben  <aroben@apple.com>
2754
2755         Fix clean builds and everything rebuilding on every build
2756
2757         Reviewed by Sam Weinig.
2758
2759         * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Don't
2760         write out QuartzCorePresent.h if it exists but is older than
2761         QuartzCore.h. Also, create the directory we write QuartzCorePresent.h
2762         into first.
2763
2764 2009-12-11  Adam Roben  <aroben@apple.com>
2765
2766         Windows build fix for systems with spaces in their paths
2767
2768         * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Quote some paths.
2769
2770 2009-12-11  Chris Marrin  <cmarrin@apple.com>
2771
2772         Reviewed by Adam Roben.
2773
2774         Add check for presence of QuartzCore headers
2775         https://bugs.webkit.org/show_bug.cgi?id=31856
2776         
2777         The script now checks for the presence of QuartzCore.h. If present
2778         it will turn on ACCELERATED_COMPOSITING and 3D_RENDERING to enable
2779         HW compositing on Windows. The script writes QuartzCorePresent.h to
2780         the build directory which has a define telling whether QuartzCore is 
2781         present.
2782
2783         * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
2784         * wtf/Platform.h:
2785
2786 2009-12-11  Kent Tamura  <tkent@chromium.org>
2787
2788         Reviewed by Darin Adler.
2789
2790         Fix a problem that JSC::gregorianDateTimeToMS() returns a negative
2791         value for a huge year value.
2792         https://bugs.webkit.org/show_bug.cgi?id=32304
2793
2794         * wtf/DateMath.cpp:
2795         (WTF::dateToDaysFrom1970): Renamed from dateToDayInYear, and changed the return type to double.
2796         (WTF::calculateDSTOffset): Follow the dateToDaysFrom1970() change.
2797         (WTF::timeClip): Use maxECMAScriptTime.
2798         (JSC::gregorianDateTimeToMS): Follow the dateToDaysFrom1970() change.
2799
2800 2009-12-10  Adam Barth  <abarth@webkit.org>
2801
2802         No review, rolling out r51975.
2803         http://trac.webkit.org/changeset/51975
2804
2805         * jit/JITStubs.cpp:
2806         (JSC::DEFINE_STUB_FUNCTION):
2807         * runtime/JSString.h:
2808         (JSC::JSString::JSString):
2809         (JSC::JSString::appendStringInConstruct):
2810         * runtime/Operations.cpp:
2811         (JSC::jsAddSlowCase):
2812         * runtime/Operations.h:
2813         (JSC::jsString):
2814         (JSC::jsAdd):
2815
2816 2009-12-10  Oliver Hunt  <oliver@apple.com>
2817
2818         Reviewed by Gavin Barraclough.
2819
2820         Incorrect caching of prototype lookup with dictionary base
2821         https://bugs.webkit.org/show_bug.cgi?id=32402
2822
2823         Make sure we don't add cached prototype lookup to the proto_list
2824         lookup chain if the top level object is a dictionary.
2825
2826         * jit/JITStubs.cpp:
2827         (JSC::JITThunks::tryCacheGetByID):
2828
2829 2009-12-10  Gavin Barraclough  <barraclough@apple.com>
2830
2831         Reviewed by Oliver Hunt.
2832
2833         https://bugs.webkit.org/show_bug.cgi?id=32400
2834         Switch remaining cases of string addition to use ropes.
2835
2836         ~1% progression on Sunspidey.
2837
2838         * jit/JITStubs.cpp:
2839         (JSC::DEFINE_STUB_FUNCTION):
2840         * runtime/JSString.h:
2841         (JSC::JSString::JSString):
2842         (JSC::JSString::appendStringInConstruct):
2843         * runtime/Operations.cpp:
2844         (JSC::jsAddSlowCase):
2845         * runtime/Operations.h:
2846         (JSC::jsString):
2847         (JSC::jsAdd):
2848
2849 2009-12-10  Kent Hansen  <kent.hansen@nokia.com>
2850
2851         Reviewed by Geoffrey Garen.
2852
2853         Remove JSObject::getPropertyAttributes() and all usage of it.
2854         https://bugs.webkit.org/show_bug.cgi?id=31933
2855
2856         getOwnPropertyDescriptor() should be used instead.
2857
2858         * JavaScriptCore.exp:
2859         * JavaScriptCore.order:
2860         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2861         * debugger/DebuggerActivation.cpp:
2862         (JSC::DebuggerActivation::getOwnPropertyDescriptor):
2863         * debugger/DebuggerActivation.h:
2864         * runtime/JSObject.cpp:
2865         (JSC::JSObject::propertyIsEnumerable):
2866         * runtime/JSObject.h:
2867         * runtime/JSVariableObject.cpp:
2868         * runtime/JSVariableObject.h:
2869
2870 2009-12-10  Gavin Barraclough  <barraclough@apple.com>
2871
2872         Reviewed by Oliver Hunt & Mark Rowe.
2873
2874         https://bugs.webkit.org/show_bug.cgi?id=32367
2875         Add support for short Ropes (up to 3 entries) inline within JSString.
2876         (rather than externally allocating an object to hold the rope).
2877         Switch jsAdd of (JSString* + JSString*) to now make use of Ropes.
2878
2879         ~1% progression on Sunspidey.
2880
2881         * interpreter/Interpreter.cpp:
2882         (JSC::Interpreter::privateExecute):
2883         * jit/JITOpcodes.cpp:
2884         (JSC::JIT::privateCompileCTIMachineTrampolines):
2885         * jit/JITStubs.cpp:
2886         (JSC::DEFINE_STUB_FUNCTION):
2887         * runtime/JSString.cpp:
2888         (JSC::JSString::resolveRope):
2889         (JSC::JSString::toBoolean):
2890         (JSC::JSString::getStringPropertyDescriptor):
2891         * runtime/JSString.h:
2892         (JSC::JSString::Rope::Fiber::deref):
2893         (JSC::JSString::Rope::Fiber::ref):
2894         (JSC::JSString::Rope::Fiber::refAndGetLength):
2895         (JSC::JSString::Rope::append):
2896         (JSC::JSString::JSString):
2897         (JSC::JSString::~JSString):
2898         (JSC::JSString::value):
2899         (JSC::JSString::tryGetValue):
2900         (JSC::JSString::length):
2901         (JSC::JSString::canGetIndex):
2902         (JSC::JSString::appendStringInConstruct):
2903         (JSC::JSString::appendValueInConstructAndIncrementLength):
2904         (JSC::JSString::isRope):
2905         (JSC::JSString::string):
2906         (JSC::JSString::ropeLength):
2907         (JSC::JSString::getStringPropertySlot):
2908         * runtime/Operations.h:
2909         (JSC::jsString):
2910         (JSC::jsAdd):
2911         (JSC::resolveBase):
2912
2913 2009-12-09  Anders Carlsson  <andersca@apple.com>
2914
2915         Reviewed by Geoffrey Garen.
2916
2917         Fix three more things found by compiling with clang++.
2918         
2919         * runtime/Structure.h:
2920         (JSC::StructureTransitionTable::reifySingleTransition):
2921         Add the 'std' qualifier to the call to make_pair.
2922
2923         * wtf/DateMath.cpp:
2924         (WTF::initializeDates):
2925         Incrementing a bool is deprecated according to the C++ specification.
2926         
2927         * wtf/PtrAndFlags.h:
2928         (WTF::PtrAndFlags::PtrAndFlags):
2929         Name lookup should not be done in dependent bases, so explicitly qualify the call to set.
2930
2931 2009-12-09  Maciej Stachowiak  <mjs@apple.com>
2932
2933         Reviewed by Oliver Hunt.
2934
2935         Google reader gets stuck in the "Loading..." state and does not complete
2936         https://bugs.webkit.org/show_bug.cgi?id=32256
2937         <rdar://problem/7456388>
2938
2939         * jit/JITArithmetic.cpp:
2940         (JSC::JIT::emitSlow_op_jless): Fix some backward branches.
2941
2942 2009-12-09  Gavin Barraclough  <barraclough@apple.com>
2943
2944         Reviewed by Oliver Hunt.
2945
2946         https://bugs.webkit.org/show_bug.cgi?id=32228
2947         Make destruction of ropes non-recursive to prevent stack exhaustion.
2948         Also, pass a UString& into initializeFiber rather than a Ustring::Rep*,
2949         since the Rep is not being ref counted this could result in usage of a
2950         Rep with refcount zero (where the Rep comes from a temporary UString
2951         returned from a function).
2952
2953         * runtime/JSString.cpp:
2954         (JSC::JSString::Rope::destructNonRecursive):
2955         (JSC::JSString::Rope::~Rope):
2956         * runtime/JSString.h:
2957         (JSC::JSString::Rope::initializeFiber):
2958         * runtime/Operations.h:
2959         (JSC::concatenateStrings):
2960
2961 2009-12-09  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
2962
2963         Reviewed by Eric Seidel.
2964
2965         https://bugs.webkit.org/show_bug.cgi?id=31930
2966
2967         Update to r51457. ASSERTs changed to COMPILE_ASSERTs.
2968         The speedup is 25%.
2969
2970         * runtime/JSGlobalData.cpp:
2971         (JSC::VPtrSet::VPtrSet):
2972
2973 2009-12-09  Steve Block  <steveblock@google.com>
2974
2975         Reviewed by Adam Barth.
2976
2977         Updates Android Makefiles with latest additions.
2978         https://bugs.webkit.org/show_bug.cgi?id=32278
2979
2980         * Android.mk: Modified.
2981         * Android.v8.wtf.mk: Modified.
2982
2983 2009-12-09  Sam Weinig  <sam@webkit.org>
2984
2985         Reviewed by Gavin Barraclough.
2986
2987         Fix a bug found while trying to compile JavaScriptCore with clang++.
2988
2989         * yarr/RegexPattern.h:
2990         (JSC::Yarr::PatternTerm::PatternTerm): Don't self assign here.  Use false instead.
2991
2992 2009-12-09  Anders Carlsson  <andersca@apple.com>
2993
2994         Reviewed by Sam Weinig.
2995
2996         Attempt to fix the Windows build.
2997         
2998         * wtf/FastMalloc.h:
2999
3000 2009-12-09  Anders Carlsson  <andersca@apple.com>
3001
3002         Reviewed by Sam Weinig.
3003
3004         Fix some things found while trying to compile JavaScriptCore with clang++.
3005
3006         * wtf/FastMalloc.h:
3007         Add correct exception specifications for the allocation/deallocation operators.
3008         
3009         * wtf/Vector.h:
3010         * wtf/VectorTraits.h:
3011         Fix a bunch of struct/class mismatches.
3012
3013 2009-12-08  Maciej Stachowiak  <mjs@apple.com>
3014
3015         Reviewed by Darin Adler.
3016
3017         move code generation portions of Nodes.cpp to bytecompiler directory
3018         https://bugs.webkit.org/show_bug.cgi?id=32284
3019
3020         * bytecompiler/NodesCodegen.cpp: Copied from parser/Nodes.cpp. Removed parts that
3021         are not about codegen.
3022         * parser/Nodes.cpp: Removed everything that is about codegen.
3023
3024         Update build systems:
3025         
3026         * Android.mk:
3027         * GNUmakefile.am:
3028         * JavaScriptCore.gypi:
3029         * JavaScriptCore.pri:
3030         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3031         * JavaScriptCore.xcodeproj/project.pbxproj:
3032         * JavaScriptCoreSources.bkl:
3033
3034 2009-12-08  Kevin Watters  <kevinwatters@gmail.com>
3035
3036         Reviewed by Kevin Ollivier.
3037
3038         [wx] Mac plugins support.
3039         
3040         https://bugs.webkit.org/show_bug.cgi?id=32236
3041
3042         * wtf/Platform.h:
3043
3044 2009-12-08  Dmitry Titov  <dimich@chromium.org>
3045
3046         Rubber-stamped by David Levin.
3047
3048         Revert and reopen "Add asserts to RefCounted to make sure ref/deref happens on the right thread."
3049         It may have caused massive increase of reported leaks on the bots.
3050         https://bugs.webkit.org/show_bug.cgi?id=31639
3051
3052         * GNUmakefile.am:
3053         * JavaScriptCore.gypi:
3054         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3055         * JavaScriptCore.xcodeproj/project.pbxproj:
3056         * runtime/Structure.cpp:
3057         (JSC::Structure::Structure):
3058         * wtf/RefCounted.h:
3059         (WTF::RefCountedBase::ref):
3060         (WTF::RefCountedBase::hasOneRef):
3061         (WTF::RefCountedBase::refCount):
3062         (WTF::RefCountedBase::derefBase):
3063         * wtf/ThreadVerifier.h: Removed.
3064
3065 2009-12-08  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
3066
3067         Reviewed by Darin Adler.
3068
3069         Make WebKit build correctly on FreeBSD, IA64, and Alpha.
3070         Based on work by Petr Salinger <Petr.Salinger@seznam.cz>,
3071         and Colin Watson <cjwatson@ubuntu.com>.
3072
3073         * wtf/Platform.h:
3074
3075 2009-12-08  Dmitry Titov  <dimich@chromium.org>
3076
3077         Reviewed by Darin Adler.
3078
3079         Add asserts to RefCounted to make sure ref/deref happens on the right thread.
3080         https://bugs.webkit.org/show_bug.cgi?id=31639
3081
3082         * runtime/Structure.cpp:
3083         (JSC::Structure::Structure): Disable thread verification on this class since it uses addressOfCount().
3084         * wtf/RefCounted.h:
3085         (WTF::RefCountedBase::ref): Add ASSERT.
3086         (WTF::RefCountedBase::hasOneRef): Ditto.
3087         (WTF::RefCountedBase::refCount): Ditto.
3088         (WTF::RefCountedBase::derefBase): Ditto.
3089         (WTF::RefCountedBase::disableThreadVerification): delegate to ThreadVerifier method.
3090         * wtf/ThreadVerifier.h: Added.
3091         (WTF::ThreadVerifier::ThreadVerifier): New Debug-only class to verify that ref/deref of RefCounted is done on the same thread.
3092         (WTF::ThreadVerifier::activate): Activates checks. Called when ref count becomes above 2.
3093         (WTF::ThreadVerifier::deactivate): Deactivates checks. Called when ref count drops below 2.
3094         (WTF::ThreadVerifier::disableThreadVerification): used on objects that should not be checked (StringImpl etc)
3095         (WTF::ThreadVerifier::verifyThread):
3096         * GNUmakefile.am: Add ThreadVerifier.h to the build file.
3097         * JavaScriptCore.gypi: Ditto.
3098         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
3099         * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
3100
3101 2009-12-08  Steve Block  <steveblock@google.com>
3102
3103         Reviewed by Adam Barth.
3104
3105         [Android] Adds Makefiles for Android port.
3106         https://bugs.webkit.org/show_bug.cgi?id=31325
3107
3108         * Android.mk: Added.
3109         * Android.v8.wtf.mk: Added.
3110
3111 2009-12-07  Dmitry Titov  <dimich@chromium.org>
3112
3113         Rubber-stamped by Darin Adler.
3114
3115         Remove ENABLE_SHARED_SCRIPT flags
3116         https://bugs.webkit.org/show_bug.cgi?id=32245
3117         This patch was obtained by "git revert" command and then un-reverting of ChangeLog files.
3118
3119         * Configurations/FeatureDefines.xcconfig:
3120         * wtf/Platform.h:
3121
3122 2009-12-07  Gavin Barraclough  <barraclough@apple.com>
3123
3124         Reviewed by NOBODY (Windows build fixage part I).
3125
3126         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3127
3128 2009-12-05  Gavin Barraclough  <barraclough@apple.com>
3129
3130         Reviewed by Oliver Hunt.
3131
3132         https://bugs.webkit.org/show_bug.cgi?id=32184
3133         Handle out-of-memory conditions with JSC Ropes with a JS exception, rather than crashing.
3134         Switch from using fastMalloc to tryFastMalloc, pass an ExecState to record the exception on.
3135
3136         * API/JSCallbackObjectFunctions.h:
3137         (JSC::::toString):
3138         * API/JSValueRef.cpp:
3139         (JSValueIsStrictEqual):
3140         * JavaScriptCore.exp:
3141         * bytecompiler/BytecodeGenerator.cpp:
3142         (JSC::BytecodeGenerator::emitEqualityOp):
3143         * debugger/DebuggerCallFrame.cpp:
3144         (JSC::DebuggerCallFrame::functionName):
3145         (JSC::DebuggerCallFrame::calculatedFunctionName):
3146         * interpreter/Interpreter.cpp:
3147         (JSC::Interpreter::callEval):
3148         (JSC::Interpreter::privateExecute):
3149         * jit/JITStubs.cpp:
3150         (JSC::DEFINE_STUB_FUNCTION):
3151         * profiler/ProfileGenerator.cpp:
3152         (JSC::ProfileGenerator::addParentForConsoleStart):
3153         * profiler/Profiler.cpp:
3154         (JSC::Profiler::willExecute):
3155         (JSC::Profiler::didExecute):
3156         (JSC::Profiler::createCallIdentifier):
3157         (JSC::createCallIdentifierFromFunctionImp):
3158         * profiler/Profiler.h:
3159         * runtime/ArrayPrototype.cpp:
3160         (JSC::arrayProtoFuncIndexOf):
3161         (JSC::arrayProtoFuncLastIndexOf):
3162         * runtime/DateConstructor.cpp:
3163         (JSC::constructDate):
3164         * runtime/FunctionPrototype.cpp:
3165         (JSC::functionProtoFuncToString):
3166         * runtime/InternalFunction.cpp:
3167         (JSC::InternalFunction::name):
3168         (JSC::InternalFunction::displayName):
3169         (JSC::InternalFunction::calculatedDisplayName):
3170         * runtime/InternalFunction.h:
3171         * runtime/JSCell.cpp:
3172         (JSC::JSCell::getString):
3173         * runtime/JSCell.h:
3174         (JSC::JSValue::getString):
3175         * runtime/JSONObject.cpp:
3176         (JSC::gap):
3177         (JSC::Stringifier::Stringifier):
3178         (JSC::Stringifier::appendStringifiedValue):
3179         * runtime/JSObject.cpp:
3180         (JSC::JSObject::putDirectFunction):
3181         (JSC::JSObject::putDirectFunctionWithoutTransition):
3182         (JSC::JSObject::defineOwnProperty):
3183         * runtime/JSObject.h:
3184         * runtime/JSPropertyNameIterator.cpp:
3185         (JSC::JSPropertyNameIterator::get):
3186         * runtime/JSString.cpp:
3187         (JSC::JSString::Rope::~Rope):
3188         (JSC::JSString::resolveRope):
3189         (JSC::JSString::getPrimitiveNumber):
3190         (JSC::JSString::toNumber):
3191         (JSC::JSString::toString):
3192         (JSC::JSString::toThisString):
3193         (JSC::JSString::getStringPropertyDescriptor):
3194         * runtime/JSString.h:
3195         (JSC::JSString::Rope::createOrNull):
3196         (JSC::JSString::Rope::operator new):
3197         (JSC::JSString::value):
3198         (JSC::JSString::tryGetValue):
3199         (JSC::JSString::getIndex):
3200         (JSC::JSString::getStringPropertySlot):
3201         (JSC::JSValue::toString):
3202         * runtime/JSValue.h:
3203         * runtime/NativeErrorConstructor.cpp:
3204         (JSC::NativeErrorConstructor::NativeErrorConstructor):
3205         * runtime/Operations.cpp:
3206         (JSC::JSValue::strictEqualSlowCase):
3207         * runtime/Operations.h:
3208         (JSC::JSValue::equalSlowCaseInline):
3209         (JSC::JSValue::strictEqualSlowCaseInline):
3210         (JSC::JSValue::strictEqual):
3211         (JSC::jsLess):
3212         (JSC::jsLessEq):
3213         (JSC::jsAdd):
3214         (JSC::concatenateStrings):
3215         * runtime/PropertyDescriptor.cpp:
3216         (JSC::PropertyDescriptor::equalTo):
3217         * runtime/PropertyDescriptor.h:
3218         * runtime/StringPrototype.cpp:
3219         (JSC::stringProtoFuncReplace):
3220         (JSC::stringProtoFuncToLowerCase):
3221         (JSC::stringProtoFuncToUpperCase):
3222
3223 2009-12-07  Nikolas Zimmermann  <nzimmermann@rim.com>
3224
3225         Reviewed by Holger Freyther.
3226
3227         Turn on (SVG) Filters support, by default.
3228         https://bugs.webkit.org/show_bug.cgi?id=32224
3229
3230         * Configurations/FeatureDefines.xcconfig: Enable FILTERS build flag.
3231
3232 2009-12-07  Steve Falkenburg  <sfalken@apple.com>
3233
3234         Build fix. Be flexible about which version of ICU is used on Windows.
3235
3236         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Add optional xcopy commands to copy ICU 4.2.
3237
3238 2009-12-07  Maciej Stachowiak  <mjs@apple.com>
3239
3240         Reviewed by Oliver Hunt.
3241
3242         op_loop_if_less JIT codegen is broken for 64-bit
3243         https://bugs.webkit.org/show_bug.cgi?id=32221
3244
3245         * jit/JITOpcodes.cpp:
3246         (JSC::JIT::emit_op_loop_if_false): Fix codegen in this version - test was backwards.
3247
3248 2009-12-07  Oliver Hunt  <oliver@apple.com>
3249
3250         Reviewed by Maciej Stachowiak.
3251
3252         Object.create fails if properties on the descriptor are getters
3253         https://bugs.webkit.org/show_bug.cgi?id=32219
3254
3255         Correctly initialise the PropertySlots with the descriptor object.
3256
3257         * runtime/ObjectConstructor.cpp:
3258         (JSC::toPropertyDescriptor):
3259
3260 2009-12-06  Maciej Stachowiak  <mjs@apple.com>
3261
3262         Not reviewed, build fix.
3263
3264         Actually tested 64-bit *and* 32-bit build this time.
3265
3266         * jit/JITOpcodes.cpp:
3267         (JSC::JIT::emit_op_loop_if_false):
3268
3269 2009-12-06  Maciej Stachowiak  <mjs@apple.com>
3270
3271         Not reviewed, build fix.
3272
3273         Really really fix 64-bit build for prior patch (actually tested this time).
3274
3275         * jit/JITOpcodes.cpp:
3276         (JSC::JIT::emit_op_loop_if_false):
3277         (JSC::JIT::emitSlow_op_loop_if_false):
3278
3279 2009-12-06  Maciej Stachowiak  <mjs@apple.com>
3280
3281         Not reviewed, build fix.
3282
3283         Really fix 64-bit build for prior patch.
3284
3285         * jit/JITArithmetic.cpp:
3286         (JSC::JIT::emitSlow_op_jless):
3287
3288 2009-12-06  Maciej Stachowiak  <mjs@apple.com>
3289
3290         Not reviewed, build fix.
3291
3292         Fix 64-bit build for prior patch.
3293
3294         * jit/JITOpcodes.cpp:
3295         (JSC::JIT::emitSlow_op_loop_if_less):
3296
3297 2009-12-05  Maciej Stachowiak  <mjs@apple.com>
3298
3299         Reviewed by Oliver Hunt.
3300
3301         conway benchmark spends half it's time in op_less (jump fusion fails)
3302         https://bugs.webkit.org/show_bug.cgi?id=32190
3303
3304         <1% speedup on SunSpider and V8
3305         2x speedup on "conway" benchmark
3306         
3307         Two optimizations:
3308         1) Improve codegen for logical operators &&, || and ! in a condition context
3309         
3310         When generating code for combinations of &&, || and !, in a
3311         condition context (i.e. in an if statement or loop condition), we
3312         used to produce a value, and then separately jump based on its
3313         truthiness. Now we pass the false and true targets in, and let the
3314         logical operators generate jumps directly. This helps in four
3315         ways:
3316
3317         a) Individual clauses of a short-circuit logical operator can now
3318         jump directly to the then or else clause of an if statement (or to
3319         the top or exit of a loop) instead of jumping to a jump.
3320         
3321         b) It used to be that jump fusion with the condition of the first
3322         clause of a logical operator was inhibited, because the register
3323         was ref'd to be used later, in the actual condition jump; this no
3324         longer happens since a jump straight to the final target is
3325         generated directly.
3326
3327         c) It used to be that jump fusion with the condition of the second
3328         clause of a logical operator was inhibited, because there was a
3329         jump target right after the second clause and before the actual
3330         condition jump. But now it's no longer necessary for the first
3331         clause to jump there so jump fusion is not blocked.
3332
3333         d) We avoid generating excess mov statements in some cases.
3334         
3335         As a concrete example this source:
3336         
3337         if (!((x < q && y < q) || (t < q && z < q))) {
3338             // ...
3339         }
3340         
3341         Used to generate this bytecode:
3342         
3343         [  34] less              r1, r-15, r-19
3344         [  38] jfalse            r1, 7(->45)
3345         [  41] less              r1, r-16, r-19
3346         [  45] jtrue             r1, 14(->59)
3347         [  48] less              r1, r-17, r-19
3348         [  52] jfalse            r1, 7(->59)
3349         [  55] less              r1, r-18, r-19
3350         [  59] jtrue             r1, 17(->76)
3351         
3352         And now generates this bytecode (also taking advantage of the second optimization below):
3353         
3354         [  34] jnless            r-15, r-19, 8(->42)
3355         [  38] jless             r-16, r-19, 26(->64)
3356         [  42] jnless            r-17, r-19, 8(->50)
3357         [  46] jless             r-18, r-19, 18(->64)
3358         
3359         Note the jump fusion and the fact that there's less jump
3360         indirection - three of the four jumps go straight to the target
3361         clause instead of indirecting through another jump.
3362         
3363         2) Implement jless opcode to take advantage of the above, since we'll now often generate
3364         a less followed by a jtrue where fusion is not forbidden.
3365        
3366         * parser/Nodes.h:
3367         (JSC::ExpressionNode::hasConditionContextCodegen): Helper function to determine
3368         whether a node supports special conditional codegen. Return false as this is the default.
3369         (JSC::ExpressionNode::emitBytecodeInConditionContext): Assert not reached - only really
3370         defined for nodes that do have conditional codegen.
3371         (JSC::UnaryOpNode::expr): Add const version.
3372         (JSC::LogicalNotNode::hasConditionContextCodegen): Returne true only if subexpression
3373         supports it.
3374         (JSC::LogicalOpNode::hasConditionContextCodegen): Return true.
3375         * parser/Nodes.cpp:
3376         (JSC::LogicalNotNode::emitBytecodeInConditionContext): Implemented - just swap
3377         the true and false targets for the child node.
3378         (JSC::LogicalOpNode::emitBytecodeInConditionContext): Implemented - handle jumps
3379         directly, improving codegen quality. Also handles further nested conditional codegen.
3380         (JSC::ConditionalNode::emitBytecode): Use condition context codegen when available.
3381         (JSC::IfNode::emitBytecode): ditto
3382         (JSC::IfElseNode::emitBytecode): ditto
3383         (JSC::DoWhileNode::emitBytecode): ditto
3384         (JSC::WhileNode::emitBytecode): ditto
3385         (JSC::ForNode::emitBytecode): ditto
3386
3387         * bytecode/Opcode.h: 
3388         - Added loop_if_false opcode - needed now that falsey jumps can be backwards.
3389         - Added jless opcode to take advantage of new fusion opportunities.
3390         * bytecode/CodeBlock.cpp:
3391         (JSC::CodeBlock::dump): Handle above.
3392         * bytecompiler/BytecodeGenerator.cpp:
3393         (JSC::BytecodeGenerator::emitJumpIfTrue): Add peephole for less + jtrue ==> jless.
3394         (JSC::BytecodeGenerator::emitJumpIfFalse): Add handling of backwrds falsey jumps.
3395         * bytecompiler/BytecodeGenerator.h:
3396         (JSC::BytecodeGenerator::emitNodeInConditionContext): Wrapper to handle tracking of
3397         overly deep expressions etc.
3398         * interpreter/Interpreter.cpp:
3399         (JSC::Interpreter::privateExecute): Implement the two new opcodes (loop_if_false, jless).
3400         * jit/JIT.cpp:
3401         (JSC::JIT::privateCompileMainPass): Implement JIT support for the two new opcodes.
3402         (JSC::JIT::privateCompileSlowCases): ditto
3403         * jit/JIT.h:
3404         * jit/JITArithmetic.cpp:
3405         (JSC::JIT::emit_op_jless):
3406         (JSC::JIT::emitSlow_op_jless): ditto
3407         (JSC::JIT::emitBinaryDoubleOp): ditto
3408         * jit/JITOpcodes.cpp:
3409         (JSC::JIT::emitSlow_op_loop_if_less): ditto
3410         (JSC::JIT::emit_op_loop_if_false): ditto
3411         (JSC::JIT::emitSlow_op_loop_if_false): ditto
3412         * jit/JITStubs.cpp:
3413         * jit/JITStubs.h:
3414         (JSC::):
3415
3416 2009-12-04  Kent Hansen  <kent.hansen@nokia.com>
3417
3418         Reviewed by Darin Adler.
3419
3420         JavaScript delete operator should return false for string properties
3421         https://bugs.webkit.org/show_bug.cgi?id=32012
3422
3423         * runtime/StringObject.cpp:
3424         (JSC::StringObject::deleteProperty):
3425
3426 2009-12-03  Drew Wilson  <atwilson@chromium.org>
3427
3428         Rolled back r51633 because it causes a perf regression in Chromium.
3429
3430         * wtf/Platform.h:
3431
3432 2009-12-03  Gavin Barraclough  <barraclough@apple.com>
3433
3434         Try and fix the Windows build.
3435
3436         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:  Export a symbol that should be exported.
3437
3438 2009-12-03  Mark Rowe  <mrowe@apple.com>
3439
3440         Try and fix the Mac build.
3441
3442         * JavaScriptCore.exp:  Export a symbol that should be exported.
3443
3444 2009-12-03  Oliver Hunt  <oliver@apple.com>
3445
3446         Reviewed by Gavin Barraclough.
3447
3448         REGRESSION(4.0.3-48777): Crash in JSC::ExecState::propertyNames() (Debug-only?)
3449         https://bugs.webkit.org/show_bug.cgi?id=32133
3450
3451         Work around odd GCC-ism and correct the scopechain for use by
3452         calls made while a cachedcall is active on the callstack.
3453
3454         * interpreter/CachedCall.h:
3455         (JSC::CachedCall::newCallFrame):
3456         * runtime/JSArray.cpp:
3457         (JSC::AVLTreeAbstractorForArrayCompare::compare_key_key):
3458         * runtime/StringPrototype.cpp:
3459         (JSC::stringProtoFuncReplace):
3460
3461 2009-12-03  Gavin Barraclough  <barraclough@apple.com>
3462
3463         Reviewed by Oliver "Brraaaaiiiinnnnnzzzzzzzz" Hunt.
3464
3465         https://bugs.webkit.org/show_bug.cgi?id=32136
3466         Add a rope representation to JSString.  Presently JSString always holds its data in UString form.
3467         Instead, allow the result of a string concatenation to be represented in a tree form - with a
3468         variable sized, reference-counted rope node retaining a set of UString::Reps (or other rope nopes).
3469
3470         Strings must still currently be resolved down to a flat UString representation before being used,
3471         but by holding the string in a rope representation during construction we can avoid copying data
3472         until we know the final size of the string.
3473
3474         ~2% progression on SunSpider (~25% on date-format-xparb, ~20% on string-validate-input).
3475
3476         * JavaScriptCore.exp:
3477
3478             - Update exports.
3479
3480         * interpreter/Interpreter.cpp:
3481         (JSC::Interpreter::privateExecute):
3482
3483             - Make use of new JSString::length() method to avoid prematurely resolving ropes.
3484
3485         * jit/JITOpcodes.cpp:
3486         (JSC::JIT::privateCompileCTIMachineTrampolines):
3487
3488             - Switch the string length trampoline to read the length directly from JSString::m_length,
3489               rather than from the JSString's UString::Rep's 'len' property.
3490
3491         * jit/JITStubs.cpp:
3492         (JSC::DEFINE_STUB_FUNCTION):
3493
3494             - Modify op_add such that addition of two strings, where either or both strings are already
3495               in rope representation, produces a rope as a result.
3496
3497         * runtime/JSString.cpp:
3498         (JSC::JSString::Rope::~Rope):
3499         (JSC::copyChars):
3500         (JSC::JSString::resolveRope):
3501         (JSC::JSString::getPrimitiveNumber):
3502         (JSC::JSString::toBoolean):
3503         (JSC::JSString::toNumber):
3504         (JSC::JSString::toString):
3505         (JSC::JSString::toThisString):
3506         (JSC::JSString::getStringPropertyDescriptor):
3507         * runtime/JSString.h:
3508         (JSC::JSString::Rope::Fiber::Fiber):
3509         (JSC::JSString::Rope::Fiber::destroy):
3510         (JSC::JSString::Rope::Fiber::isRope):
3511         (JSC::JSString::Rope::Fiber::rope):
3512         (JSC::JSString::Rope::Fiber::string):
3513         (JSC::JSString::Rope::create):
3514         (JSC::JSString::Rope::initializeFiber):
3515         (JSC::JSString::Rope::ropeLength):
3516         (JSC::JSString::Rope::stringLength):
3517         (JSC::JSString::Rope::fibers):
3518         (JSC::JSString::Rope::Rope):
3519         (JSC::JSString::Rope::operator new):
3520         (JSC::JSString::JSString):
3521         (JSC::JSString::value):
3522         (JSC::JSString::length):
3523         (JSC::JSString::isRope):
3524         (JSC::JSString::rope):
3525         (JSC::JSString::string):
3526         (JSC::JSString::canGetIndex):
3527         (JSC::jsSingleCharacterSubstring):
3528         (JSC::JSString::getIndex):
3529         (JSC::jsSubstring):
3530         (JSC::JSString::getStringPropertySlot):
3531
3532             - Add rope form.
3533
3534         * runtime/Operations.h:
3535         (JSC::jsAdd):
3536         (JSC::concatenateStrings):
3537
3538             - Update string concatenation, and addition of ropes, to produce ropes.
3539
3540         * runtime/StringObject.cpp:
3541         (JSC::StringObject::getOwnPropertyNames):
3542
3543             - Make use of new JSString::length() method to avoid prematurely resolving ropes.
3544
3545 2009-11-23  Jeremy Moskovich  <jeremy@chromium.org>
3546
3547         Reviewed by Eric Seidel.
3548
3549         Switch Chrome/Mac to use Core Text APIs rather than ATSUI APIs.
3550         https://bugs.webkit.org/show_bug.cgi?id=31802
3551
3552         No test since this is already covered by existing pixel tests.
3553
3554         * wtf/Platform.h: #define USE_CORE_TEXT for Chrome/Mac.
3555
3556 2009-12-02  Oliver Hunt  <oliver@apple.com>
3557
3558         Reviewed by Gavin Barraclough.
3559
35