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