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