2010-02-08 Maciej Stachowiak <mjs@apple.com>
[WebKit-https.git] / JavaScriptCore / ChangeLog
1 2010-02-08  Maciej Stachowiak  <mjs@apple.com>
2
3         Reviewed by Cameron Zwarich.
4
5         Restore ENABLE_RUBY flag so vendors can ship with Ruby disabled if they choose.
6         https://bugs.webkit.org/show_bug.cgi?id=34698
7
8         * Configurations/FeatureDefines.xcconfig:
9
10 2010-02-10  Kevin Watters  <kevinwatters@gmail.com>
11
12         Reviewed by Kevin Ollivier.
13
14         [wx] Add Windows complex text support and Mac support for containsCharacters.
15         
16         https://bugs.webkit.org/show_bug.cgi?id=34759
17
18         * wscript:
19
20 2010-02-10  Alexey Proskuryakov  <ap@apple.com>
21
22         Addressing issues found by style bot.
23
24         * wtf/ValueCheck.h: Renamed header guard to match final file name.
25
26         * wtf/Vector.h: (WTF::::checkConsistency): Remove braces around a one-line clause.
27
28 2010-02-09  Alexey Proskuryakov  <ap@apple.com>
29
30         Reviewed by Geoffrey Garen.
31
32         https://bugs.webkit.org/show_bug.cgi?id=34490
33         WebCore::ImageEventSender::dispatchPendingEvents() crashes in certain conditions
34
35         * GNUmakefile.am:
36         * JavaScriptCore.gypi:
37         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
38         * JavaScriptCore.xcodeproj/project.pbxproj:
39         Added ValueCheck.h.
40
41         * wtf/ValueCheck.h: Added. Moved code out of HashTraits, since it would be awkward to
42         include that from Vector.h.
43         (WTF::ValueCheck::checkConsistency): Allow null pointers, those are pretty consistent.
44
45         * wtf/HashTraits.h: Moved value checking code out of here.
46
47         * wtf/HashTable.h: (WTF::::checkTableConsistencyExceptSize): Updated for the above changes.
48
49         * wtf/Vector.h:
50         (WTF::::checkConsistency): Check all vector elements.
51         (WTF::ValueCheck): Support checking a Vector as an element in other containers. Currently
52         unused.
53
54 2010-02-10  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
55
56         Reviewed by Simon Hausmann.
57
58         Fix QScriptValue::toBool.
59
60         Fix ECMA compliance in the QScriptValue for values like 0, NaN and
61         empty strings.
62
63         [Qt] QScriptValue::toBool problem
64         https://bugs.webkit.org/show_bug.cgi?id=34793
65
66         * qt/api/qscriptvalue_p.h:
67         (QScriptValuePrivate::toBool):
68         * qt/tests/qscriptvalue/tst_qscriptvalue.h:
69         * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp:
70         (tst_QScriptValue::toBool_initData):
71         (tst_QScriptValue::toBool_makeData):
72         (tst_QScriptValue::toBool_test):
73         (tst_QScriptValue::toBoolean_initData):
74         (tst_QScriptValue::toBoolean_makeData):
75         (tst_QScriptValue::toBoolean_test):
76
77 2009-10-06  Yongjun Zhang  <yongjun.zhang@nokia.com>
78
79         Reviewed by Simon Hausmann.
80
81         Use derefIfNotNull() to work around WINSCW compiler forward declaration bug
82
83         The compiler bug is reported at
84         https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812.
85
86         The change should be reverted when the above bug is fixed in WINSCW compiler.
87
88         https://bugs.webkit.org/show_bug.cgi?id=28054
89
90 2009-10-06  Yongjun Zhang  <yongjun.zhang@nokia.com>
91
92         Reviewed by Simon Hausmann.
93
94         Get rid of WINSCW hack for UnSpecifiedBoolType
95
96         Add parenthesis around (RefPtr::*UnspecifiedBoolType) to make the WINSCW
97         compiler work with the default UnSpecifiedBoolType() operator.
98
99         https://bugs.webkit.org/show_bug.cgi?id=28054
100
101         * wtf/RefPtr.h:
102
103 2010-02-09  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
104
105         Reviewed by Simon Hausmann.
106
107         New functions nullValue() and undefinedValue().
108
109         [Qt] QScriptEngine should contain nullValue and undefinedValue methods
110         https://bugs.webkit.org/show_bug.cgi?id=34749
111
112         * qt/api/qscriptengine.cpp:
113         (QScriptEngine::nullValue):
114         (QScriptEngine::undefinedValue):
115         * qt/api/qscriptengine.h:
116         * qt/tests/qscriptengine/tst_qscriptengine.cpp:
117         (tst_QScriptEngine::nullValue):
118         (tst_QScriptEngine::undefinedValue):
119
120 2010-02-09  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
121
122         Reviewed by Simon Hausmann.
123
124         Fixes for QScriptValue::toNumber().
125
126         Fix ECMA compliance in QScriptValue for values unbound
127         to a QScriptEngine.
128
129         [Qt] QScriptValue::toNumber() is broken
130         https://bugs.webkit.org/show_bug.cgi?id=34592
131
132         * qt/api/qscriptvalue_p.h:
133         (QScriptValuePrivate::toNumber):
134         * qt/tests/qscriptvalue/tst_qscriptvalue.h:
135         * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp:
136         (tst_QScriptValue::toNumber_initData):
137         (tst_QScriptValue::toNumber_makeData):
138         (tst_QScriptValue::toNumber_test):
139
140 2010-02-09  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
141
142         Reviewed by Simon Hausmann.
143
144         Fix QScriptValue::isNumber().
145
146         The isNumber() should return 'true' if the value is in the CNumber
147         state.
148
149         [Qt] QScriptValue::isNumber() returns an incorrect value
150         https://bugs.webkit.org/show_bug.cgi?id=34575
151
152         * qt/api/qscriptvalue_p.h:
153         (QScriptValuePrivate::isNumber):
154         * qt/tests/qscriptvalue/tst_qscriptvalue.h:
155         * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp:
156         (tst_QScriptValue::isNumber_initData):
157         (tst_QScriptValue::isNumber_makeData):
158         (tst_QScriptValue::isNumber_test):
159
160 2010-02-09  Geoffrey Garen  <ggaren@apple.com>
161
162         Reviewed by Oliver Hunt.
163
164         Small refactoring to the small strings cache to allow it to be cleared
165         dynamically.
166
167         * runtime/SmallStrings.cpp:
168         (JSC::SmallStrings::SmallStrings):
169         (JSC::SmallStrings::clear):
170         * runtime/SmallStrings.h: Moved initialization code into a shared function,
171         and changed the constructor to call it.
172
173 2010-02-09  Gavin Barraclough  <barraclough@apple.com>
174
175         Rubber Stamped by Geoff Garen.
176
177         Rename StringBuilder::release && JSStringBuilder::releaseJSString
178         to 'build()'.
179
180         * runtime/ArrayPrototype.cpp:
181         (JSC::arrayProtoFuncToLocaleString):
182         (JSC::arrayProtoFuncJoin):
183         * runtime/Executable.cpp:
184         (JSC::FunctionExecutable::paramString):
185         * runtime/FunctionConstructor.cpp:
186         (JSC::constructFunction):
187         * runtime/JSGlobalObjectFunctions.cpp:
188         (JSC::encode):
189         (JSC::decode):
190         (JSC::globalFuncEscape):
191         (JSC::globalFuncUnescape):
192         * runtime/JSONObject.cpp:
193         (JSC::Stringifier::stringify):
194         * runtime/JSStringBuilder.h:
195         (JSC::JSStringBuilder::build):
196         * runtime/LiteralParser.cpp:
197         (JSC::LiteralParser::Lexer::lexString):
198         * runtime/NumberPrototype.cpp:
199         (JSC::integerPartNoExp):
200         (JSC::numberProtoFuncToFixed):
201         * runtime/StringBuilder.h:
202         (JSC::StringBuilder::build):
203
204 2010-02-09  John Sullivan  <sullivan@apple.com>
205
206         https://bugs.webkit.org/show_bug.cgi?id=34772
207         Overzealous new assertion in URStringImpl::adopt()
208
209         Reviewed by Adam Barth.
210
211         * runtime/UStringImpl.h:
212         (JSC::UStringImpl::adopt):
213         Only assert that vector.data() is non-zero if vector.size() is non-zero.
214
215 2010-02-09  Nikolas Zimmermann  <nzimmermann@rim.com>
216
217         Not reviewed. Try to fix build problem on SnowLeopard slaves to bring them back.
218
219         * API/JSClassRef.cpp:
220         (tryCreateStringFromUTF8): Mark method as 'static inline' to suppress "warning: no previous prototype for ..."
221
222 2010-02-09  Gavin Barraclough  <barraclough@apple.com>
223
224         Reviewed by Oliver Hunt.
225
226         Three small string fixes:
227         (1) StringBuilder::release should CRASH if the buffer allocation failed.
228         (2) Remove weird, dead code from JSString::tryGetValue, replace with an ASSERT.
229         (3) Move UString::createFromUTF8 out to the API, as tryCreateStringFromUTF8.
230             This is only used from the API, and (now) unlike other UString::create
231             methods may return UString::null() to indicate failure cases.  Better
232             handle these in the API.
233
234         * API/JSClassRef.cpp:
235         (tryCreateStringFromUTF8):
236         (OpaqueJSClass::OpaqueJSClass):
237         (OpaqueJSClassContextData::OpaqueJSClassContextData):
238         * runtime/JSString.h:
239         (JSC::Fiber::tryGetValue):
240         * runtime/StringBuilder.h:
241         (JSC::StringBuilder::release):
242         * runtime/UString.cpp:
243         (JSC::UString::UString):
244         (JSC::UString::from):
245         (JSC::UString::find):
246         * runtime/UString.h:
247
248 2010-02-09  Janne Koskinen  <janne.p.koskinen@digia.com>
249
250         Reviewed by Laszlo Gombos.
251
252         [Qt] use nanval() for Symbian as nonInlineNaN
253         https://bugs.webkit.org/show_bug.cgi?id=34170
254
255         numeric_limits<double>::quiet_NaN is broken in Symbian
256         causing NaN to be evaluated as a number.
257
258         * runtime/JSValue.cpp:
259         (JSC::nonInlineNaN):
260
261 2010-02-09  Tamas Szirbucz  <szirbucz@inf.u-szeged.hu>
262
263         Reviewed by Gavin Barraclough.
264
265         Add a soft modulo operation to ARM JIT using a trampoline function.
266         The performance progression is about ~1.8% on ARMv7
267         https://bugs.webkit.org/show_bug.cgi?id=34424
268
269         Developed in cooperation with Gabor Loki.
270
271         * jit/JIT.h:
272         * jit/JITArithmetic.cpp:
273         (JSC::JIT::emit_op_mod):
274         (JSC::JIT::emitSlow_op_mod):
275         * jit/JITOpcodes.cpp:
276         (JSC::JIT::softModulo):
277         * jit/JITStubs.h:
278         (JSC::JITThunks::ctiSoftModulo):
279         * wtf/Platform.h:
280
281 2010-02-08  Gavin Barraclough  <barraclough@apple.com>
282
283         Reviewed by NOBODY (SL/win build fixes).
284
285         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
286         * runtime/StringPrototype.cpp:
287
288 2010-02-08  Gavin Barraclough  <barraclough@apple.com>
289
290         Reviewed by Oliver Hunt
291
292         Make String.replace throw an exception on out-of-memory, rather than
293         returning a null (err, empty-ish) string.  Move String::replaceRange
294         and String::spliceSubstringsWithSeparators out to StringPrototype -
295         these were fairly specific use anyway, and we can better integrate
296         throwing the JS expcetion this way.
297
298         Also removes redundant assignment operator from UString.
299
300         * JavaScriptCore.exp:
301         * runtime/StringPrototype.cpp:
302         (JSC::StringRange::StringRange):
303         (JSC::jsSpliceSubstringsWithSeparators):
304         (JSC::jsReplaceRange):
305         (JSC::stringProtoFuncReplace):
306         * runtime/UString.cpp:
307         * runtime/UString.h:
308
309 2010-02-08  Kwang Yul Seo  <skyul@company100.net>
310
311         Reviewed by Eric Seidel.
312
313         [BREWMP] Undefine WTF_OS_WINDOWS and WTF_PLATFORM_WIN
314         https://bugs.webkit.org/show_bug.cgi?id=34561
315
316         As the binary for simulator is built with MSVC 2005,
317         WTF_OS_WINDOWS and WTF_PLATFORM_WIN are defined.
318         Undefine them as we don't target Windows.
319
320         * wtf/Platform.h:
321
322 2010-02-08  Chris Rogers  <crogers@google.com>
323
324         Reviewed by Darin Adler.
325
326         audio engine: add Vector3 class
327         https://bugs.webkit.org/show_bug.cgi?id=34548
328
329         * wtf/Vector3.h: Added.
330         (WebCore::Vector3::Vector3):
331         (WebCore::Vector3::abs):
332         (WebCore::Vector3::isZero):
333         (WebCore::Vector3::normalize):
334         (WebCore::Vector3::x):
335         (WebCore::Vector3::y):
336         (WebCore::Vector3::z):
337         (WebCore::operator+):
338         (WebCore::operator-):
339         (WebCore::operator*):
340         (WebCore::dot):
341         (WebCore::cross):
342         (WebCore::distance):
343
344 2010-02-08  Oliver Hunt  <oliver@apple.com>
345
346         Reviewed by Gavin Barraclough.
347
348         Fix warning in clang++
349
350         * runtime/Structure.h:
351         (JSC::Structure::propertyStorageSize):
352
353 2010-02-08  Gavin Barraclough  <barraclough@apple.com>
354
355         Reviewed by Geoff Garen.
356
357         Make makeString CRASH if we fail to allocate a string.
358
359         (tryMakeString or jsMakeNontrivialString can be used where we
360         expect allocation may fail and want to handle the error).
361
362         * runtime/JSStringBuilder.h:
363         (JSC::jsMakeNontrivialString):
364         * runtime/UString.h:
365         (JSC::tryMakeString):
366         (JSC::makeString):
367
368 2010-02-08  Gavin Barraclough  <barraclough@apple.com>
369
370         Rubber Stamped by Oliver Hunt.
371
372         Remove a couple of unnecesary C-style casts spotted by Darin.
373
374         * runtime/JSGlobalObjectFunctions.cpp:
375         (JSC::encode):
376         (JSC::globalFuncEscape):
377
378 2010-02-08  Gavin Barraclough  <barraclough@apple.com>
379
380         Reviewed by Geoff Garen.
381
382         Switch some more StringBuilder/jsNontrivialString code to use
383         JSStringBuilder/jsMakeNontrivialString - these methods will
384         throw an exception if we hit out-of-memory, rather than just
385         CRASHing.
386
387         * runtime/FunctionPrototype.cpp:
388         (JSC::functionProtoFuncToString):
389         * runtime/JSGlobalObjectFunctions.cpp:
390         (JSC::encode):
391         (JSC::decode):
392         (JSC::globalFuncEscape):
393
394 2010-02-08  Gavin Barraclough  <barraclough@apple.com>
395
396         Reviewed by Sam Weinig.
397
398         Use an empty identifier instead of a null identifier for parse
399         tokens without an identifier.
400
401         This helps encapsulate the null UStringImpl within UString.
402
403         * parser/Grammar.y:
404         * parser/NodeConstructors.h:
405         (JSC::ContinueNode::ContinueNode):
406         (JSC::BreakNode::BreakNode):
407         (JSC::ForInNode::ForInNode):
408         * runtime/CommonIdentifiers.cpp:
409         (JSC::CommonIdentifiers::CommonIdentifiers):
410         * runtime/CommonIdentifiers.h:
411         * runtime/FunctionPrototype.cpp:
412         (JSC::FunctionPrototype::FunctionPrototype):
413
414 2010-02-08  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
415
416         Build fix for make distcheck.
417
418         * GNUmakefile.am:
419
420 2010-02-08  Simon Hausmann  <simon.hausmann@nokia.com>
421
422         Unreviewed RVCT build fix.
423
424         Similar to r54391, don't import the cmath functions from std:: for RVCT.
425
426         * wtf/MathExtras.h:
427
428 2010-02-05  Gavin Barraclough  <barraclough@apple.com>
429
430         Reviewed by Geoff Garen.
431
432         Change UStringImpl::create to CRASH if the string cannot be allocated,
433         rather than returning a null string (which will behave like a zero-length
434         string if used).
435
436         Also move createRep function from UString to become new overloaded
437         UStringImpl::create methods.  In doing so, bring their behaviour closer to
438         being in line with WebCore::StringImpl, in removing the behaviour that they
439         can be used to produce null UStrings (ASSERT the char* provided is non-null).
440         This behaviour of converting null C-strings to null UStrings is inefficient
441         (cmompared to just using UString::null()), incompatible with WebCore::StringImpl's
442         behaviour, and may generate unexpected behaviour, since in many cases a null
443         UString can be used like an empty string.
444
445         With these changes UStringImpl need not have a concept of null impls, we can
446         start transitioning this to become an implementation detail of UString, that
447         internally it chooses to use a null-object rather than an actually zero impl
448         pointer.
449
450         * JavaScriptCore.exp:
451         * debugger/Debugger.cpp:
452         (JSC::Debugger::recompileAllJSFunctions):
453         * debugger/DebuggerCallFrame.cpp:
454         (JSC::DebuggerCallFrame::calculatedFunctionName):
455         * parser/Parser.cpp:
456         (JSC::Parser::parse):
457         * profiler/Profile.cpp:
458         (JSC::Profile::Profile):
459         * profiler/ProfileGenerator.cpp:
460         (JSC::ProfileGenerator::stopProfiling):
461         * runtime/Error.cpp:
462         (JSC::Error::create):
463         (JSC::throwError):
464         * runtime/ExceptionHelpers.cpp:
465         (JSC::createError):
466         * runtime/Identifier.cpp:
467         (JSC::Identifier::add):
468         * runtime/PropertyNameArray.cpp:
469         (JSC::PropertyNameArray::add):
470         * runtime/UString.cpp:
471         (JSC::initializeUString):
472         (JSC::UString::UString):
473         (JSC::UString::operator=):
474         * runtime/UString.h:
475         (JSC::UString::isNull):
476         (JSC::UString::null):
477         (JSC::UString::rep):
478         (JSC::UString::UString):
479         * runtime/UStringImpl.cpp:
480         (JSC::UStringImpl::create):
481         * runtime/UStringImpl.h:
482
483 2010-02-05  Kwang Yul Seo  <skyul@company100.net>
484
485         Reviewed by Eric Seidel.
486
487         [BREWMP] Define SYSTEM_MALLOC 1
488         https://bugs.webkit.org/show_bug.cgi?id=34640
489
490         Make BREWMP use system malloc because FastMalloc is not ported.
491
492         * wtf/Platform.h:
493
494 2010-02-05  Kwang Yul Seo  <skyul@company100.net>
495
496         Reviewed by Alexey Proskuryakov.
497
498         Don't call CRASH() in fastMalloc and fastCalloc when the requested memory size is 0
499         https://bugs.webkit.org/show_bug.cgi?id=34569
500
501         With USE_SYSTEM_MALLOC=1, fastMalloc and fastCalloc call CRASH()
502         if the return value of malloc and calloc is 0.
503         
504         However, these functions can return 0 when the request size is 0.
505         Libc manual says, "If size is 0, then malloc() returns either NULL,
506         or a unique pointer value that can later be successfully passed to free()."
507         Though malloc returns a unique pointer in most systems,
508         0 can be returned in some systems. For instance, BREW's MALLOC returns 0
509         when size is 0.
510
511         If malloc or calloc returns 0 due to allocation size, increase the size
512         to 1 and try again.
513
514         * wtf/FastMalloc.cpp:
515         (WTF::fastMalloc):
516         (WTF::fastCalloc):
517
518 2010-02-04  Mark Rowe  <mrowe@apple.com>
519
520         Reviewed by Timothy Hatcher.
521
522         Build fix.  Remove a symbol corresponding to an inline function from the linker export
523         file to prevent a weak external failure.
524
525         * JavaScriptCore.xcodeproj/project.pbxproj: Accommodate rename of script.
526
527 2010-02-04  Daniel Bates  <dbates@webkit.org>
528
529         [Qt] Unreviewed, build fix for Qt bot.
530
531         * runtime/JSStringBuilder.h: Changed #include <X.h> notation #include "X.h".
532
533 2010-02-04  Geoffrey Garen  <ggaren@apple.com>
534
535         Reviewed by Oliver Hunt.
536
537         Clearing a WeakGCPtr is weird
538         https://bugs.webkit.org/show_bug.cgi?id=34627
539
540         Added a WeakGCPtr::clear interface.
541         
542         As discussed in https://bugs.webkit.org/show_bug.cgi?id=33383, the old
543         interface made it pretty weird for a client to conditionally clear a
544         WeakGCPtr, which is exactly what clients want to do when objects are
545         finalized.
546
547         * API/JSClassRef.cpp:
548         (clearReferenceToPrototype): Use the new WeakGCPtr::clear() interface. 
549
550         * runtime/WeakGCPtr.h:
551         (JSC::WeakGCPtr::clear): Added an interface for clearing a WeakGCPtr,
552         iff its current value is the value passed in. It's cumbersome for the
553         client to do this test, since WeakGCPtr sometimes pretends to be null.
554
555 2010-02-04  Geoffrey Garen  <ggaren@apple.com>
556
557         Build fix: export a header.
558
559         * JavaScriptCore.xcodeproj/project.pbxproj:
560
561 2010-02-04  Gavin Barraclough  <barraclough@apple.com>
562
563         Reviewed by Oliver Hunt.
564
565         Add a JSStringBuilder class (similar-to, and derived-from StringBuilder) to
566         construct JSStrings, throwing a JS exception should we run out of memory whilst
567         allocating storage for the string.
568
569         Similarly, add jsMakeNontrivialString methods to use in cases where previously
570         we were calling makeString & passing the result to jsNontrivialString.  Again,
571         these new methods throw if we hit an out of memory condition.
572
573         Move throwOutOfMemoryError into ExceptionHelpers, to make it more widely available.
574
575         * JavaScriptCore.xcodeproj/project.pbxproj:
576         * runtime/ArrayPrototype.cpp:
577         (JSC::arrayProtoFuncToString):
578         (JSC::arrayProtoFuncToLocaleString):
579         (JSC::arrayProtoFuncJoin):
580         * runtime/DateConstructor.cpp:
581         (JSC::callDate):
582         * runtime/DatePrototype.cpp:
583         (JSC::dateProtoFuncToString):
584         (JSC::dateProtoFuncToUTCString):
585         (JSC::dateProtoFuncToGMTString):
586         * runtime/ErrorPrototype.cpp:
587         (JSC::errorProtoFuncToString):
588         * runtime/ExceptionHelpers.cpp:
589         (JSC::throwOutOfMemoryError):
590         * runtime/ExceptionHelpers.h:
591         * runtime/JSStringBuilder.h: Added.
592         (JSC::JSStringBuilder::releaseJSString):
593         (JSC::jsMakeNontrivialString):
594         * runtime/NumberPrototype.cpp:
595         (JSC::numberProtoFuncToPrecision):
596         * runtime/ObjectPrototype.cpp:
597         (JSC::objectProtoFuncToString):
598         * runtime/Operations.cpp:
599         * runtime/Operations.h:
600         * runtime/RegExpPrototype.cpp:
601         (JSC::regExpProtoFuncToString):
602         * runtime/StringBuilder.h:
603         (JSC::StringBuilder::append):
604         * runtime/StringPrototype.cpp:
605         (JSC::stringProtoFuncBig):
606         (JSC::stringProtoFuncSmall):
607         (JSC::stringProtoFuncBlink):
608         (JSC::stringProtoFuncBold):
609         (JSC::stringProtoFuncFixed):
610         (JSC::stringProtoFuncItalics):
611         (JSC::stringProtoFuncStrike):
612         (JSC::stringProtoFuncSub):
613         (JSC::stringProtoFuncSup):
614         (JSC::stringProtoFuncFontcolor):
615         (JSC::stringProtoFuncFontsize):
616         (JSC::stringProtoFuncAnchor):
617
618 2010-02-04  Steve Falkenburg  <sfalken@apple.com>
619
620         Windows build fix.
621
622         * wtf/MathExtras.h:
623
624 2010-02-04  Darin Adler  <darin@apple.com>
625
626         Reviewed by David Levin.
627
628         Make MathExtras.h compatible with <cmath>
629         https://bugs.webkit.org/show_bug.cgi?id=34618
630
631         * wtf/MathExtras.h: Include <cmath> instead of <math.h>.
632         Use "using" as we do elsewhere in WTF for the four functions from <cmath>
633         we want to use without the prefix. Later we could consider making the std
634         explicit at call sites instead.
635
636 2010-02-04  Tamas Szirbucz  <szirbucz@inf.u-szeged.hu>
637
638         Reviewed by Gavin Barraclough.
639
640         Use an easily appendable structure for trampolines instead of pointer parameters.
641         https://bugs.webkit.org/show_bug.cgi?id=34424
642
643         * assembler/ARMAssembler.cpp:
644         (JSC::ARMAssembler::executableCopy):
645         * jit/JIT.h:
646         (JSC::JIT::compileCTIMachineTrampolines):
647         * jit/JITOpcodes.cpp:
648         (JSC::JIT::privateCompileCTIMachineTrampolines):
649         * jit/JITStubs.cpp:
650         (JSC::JITThunks::JITThunks):
651         * jit/JITStubs.h:
652         (JSC::JITThunks::ctiStringLengthTrampoline):
653         (JSC::JITThunks::ctiVirtualCallLink):
654         (JSC::JITThunks::ctiVirtualCall):
655         (JSC::JITThunks::ctiNativeCallThunk):
656
657 2010-02-04  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
658
659         Reviewed by Simon Hausmann.
660
661         Increase test coverage for the QScriptValue.
662
663         https://bugs.webkit.org/show_bug.cgi?id=34533
664
665         * qt/tests/qscriptvalue/qscriptvalue.pro:
666         * qt/tests/qscriptvalue/tst_qscriptvalue.cpp:
667         (tst_QScriptValue::tst_QScriptValue):
668         (tst_QScriptValue::~tst_QScriptValue):
669         (tst_QScriptValue::dataHelper):
670         (tst_QScriptValue::newRow):
671         (tst_QScriptValue::testHelper):
672         (tst_QScriptValue::ctor):
673         * qt/tests/qscriptvalue/tst_qscriptvalue.h: Added.
674         * qt/tests/qscriptvalue/tst_qscriptvalue_generated.cpp: Added.
675         (tst_QScriptValue::initScriptValues):
676         (tst_QScriptValue::isValid_initData):
677         (tst_QScriptValue::isValid_makeData):
678         (tst_QScriptValue::isValid_test):
679         (tst_QScriptValue::isBool_initData):
680         (tst_QScriptValue::isBool_makeData):
681         (tst_QScriptValue::isBool_test):
682         (tst_QScriptValue::isBoolean_initData):
683         (tst_QScriptValue::isBoolean_makeData):
684         (tst_QScriptValue::isBoolean_test):
685         (tst_QScriptValue::isFunction_initData):
686         (tst_QScriptValue::isFunction_makeData):
687         (tst_QScriptValue::isFunction_test):
688         (tst_QScriptValue::isNull_initData):
689         (tst_QScriptValue::isNull_makeData):
690         (tst_QScriptValue::isNull_test):
691         (tst_QScriptValue::isString_initData):
692         (tst_QScriptValue::isString_makeData):
693         (tst_QScriptValue::isString_test):
694         (tst_QScriptValue::isUndefined_initData):
695         (tst_QScriptValue::isUndefined_makeData):
696         (tst_QScriptValue::isUndefined_test):
697         (tst_QScriptValue::isObject_initData):
698         (tst_QScriptValue::isObject_makeData):
699         (tst_QScriptValue::isObject_test):
700
701 2010-02-03  Kwang Yul Seo  <skyul@company100.net>
702
703         Reviewed by Eric Seidel.
704
705         [BREWMP] Define WTF_PLATFORM_BREWMP_SIMULATOR when AEE_SIMULATOR is defined
706         https://bugs.webkit.org/show_bug.cgi?id=34514
707
708         PLATFORM(BREWMP_SIMULATOR) guard is needed to make distinction between BREWMP
709         and BREWMP simulator.
710
711         * wtf/Platform.h:
712
713 2010-02-03  Kwang Yul Seo  <skyul@company100.net>
714
715         Reviewed by Eric Seidel.
716
717         [BREWMP] Remove COMPILE_ASSERT conflict with the underlying PLATFORM
718         https://bugs.webkit.org/show_bug.cgi?id=34190
719
720         COMPILE_ASSERT conflicts with the underlying PLATFORM because it is defined
721         both in WTF's Assertions.h and BREWMP's AEEClassIDs.h. Include AEEClassIDs.h
722         in Assertions.h and undef COMPILE_ASSERT to avoid redefining COMPILE_ASSERT.
723
724         * wtf/Assertions.h:
725
726 2010-02-03  Kwang Yul Seo  <skyul@company100.net>
727
728         Reviewed by Eric Seidel.
729
730         [BREWMP] Implement OwnPtrBrew to make sure BREW instances are freed.
731         https://bugs.webkit.org/show_bug.cgi?id=34518
732
733         Add OwnPtrBrew to release IFile, IFileMgr and IBitmap instances.
734
735         * wtf/brew/OwnPtrBrew.cpp: Added.
736         (WTF::IFileMgr):
737         (WTF::IFile):
738         (WTF::IBitmap):
739         (WTF::freeOwnedPtrBrew):
740         * wtf/brew/OwnPtrBrew.h: Added.
741         (WTF::OwnPtrBrew::OwnPtrBrew):
742         (WTF::OwnPtrBrew::~OwnPtrBrew):
743         (WTF::OwnPtrBrew::get):
744         (WTF::OwnPtrBrew::release):
745         (WTF::OwnPtrBrew::outPtr):
746         (WTF::OwnPtrBrew::set):
747         (WTF::OwnPtrBrew::clear):
748         (WTF::OwnPtrBrew::operator*):
749         (WTF::OwnPtrBrew::operator->):
750         (WTF::OwnPtrBrew::operator!):
751         (WTF::OwnPtrBrew::operator UnspecifiedBoolType):
752         (WTF::OwnPtrBrew::swap):
753         (WTF::swap):
754         (WTF::operator==):
755         (WTF::operator!=):
756         (WTF::getPtr):
757
758 2010-02-03  Kwang Yul Seo  <skyul@company100.net>
759
760         Reviewed by Darin Adler.
761
762         Export WTF::fastStrDup symbol
763         https://bugs.webkit.org/show_bug.cgi?id=34526
764
765         * JavaScriptCore.exp:
766
767 2010-02-03  Kevin Watters  <kevinwatters@gmail.com>
768
769         Reviewed by Kevin Ollivier.
770
771         [wx] Enable JIT compilation for wx.
772         
773         https://bugs.webkit.org/show_bug.cgi?id=34536
774
775         * wtf/Platform.h:
776
777 2010-02-02  Oliver Hunt  <oliver@apple.com>
778
779         Reviewed by Geoffrey Garen.
780
781         Crash in CollectorBitmap::get at nbcolympics.com
782         https://bugs.webkit.org/show_bug.cgi?id=34504
783
784         This was caused by the use of m_offset to determine the offset of
785         a new property into the property storage.  This patch corrects
786         the effected cases by incorporating the anonymous slot count. It
787         also removes the duplicate copy of anonymous slot count from the
788         property table as keeping this up to date merely increased the
789         chance of a mismatch.  Finally I've added a large number of
790         assertions in an attempt to prevent such a bug from happening
791         again.
792
793         With the new assertions in place the existing anonymous slot tests
794         all fail without the m_offset fixes.
795
796         * runtime/PropertyMapHashTable.h:
797         * runtime/Structure.cpp:
798         (JSC::Structure::materializePropertyMap):
799         (JSC::Structure::addPropertyTransitionToExistingStructure):
800         (JSC::Structure::addPropertyTransition):
801         (JSC::Structure::removePropertyTransition):
802         (JSC::Structure::flattenDictionaryStructure):
803         (JSC::Structure::addPropertyWithoutTransition):
804         (JSC::Structure::removePropertyWithoutTransition):
805         (JSC::Structure::copyPropertyTable):
806         (JSC::Structure::get):
807         (JSC::Structure::put):
808         (JSC::Structure::remove):
809         (JSC::Structure::insertIntoPropertyMapHashTable):
810         (JSC::Structure::createPropertyMapHashTable):
811         (JSC::Structure::rehashPropertyMapHashTable):
812         (JSC::Structure::checkConsistency):
813
814 2010-02-02  Steve Falkenburg  <sfalken@apple.com>
815
816         Reviewed by Darin Adler.
817
818         Copyright year updating for Windows version resources should be automatic
819         https://bugs.webkit.org/show_bug.cgi?id=34503
820
821         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc:
822
823 2010-02-02  Kwang Yul Seo  <skyul@company100.net>
824
825         Reviewed by Eric Seidel.
826
827         [BREWMP] Add dummy main thread functions
828         https://bugs.webkit.org/show_bug.cgi?id=33569
829
830         Add dummy initializeMainThreadPlatform and
831         scheduleDispatchFunctionsOnMainThread.
832
833         * wtf/brew/MainThreadBrew.cpp: Added.
834         (WTF::initializeMainThreadPlatform):
835         (WTF::scheduleDispatchFunctionsOnMainThread):
836
837 2010-02-02  Kwang Yul Seo  <skyul@company100.net>
838
839         Reviewed by Darin Adler.
840
841         Add using WTF::getLocalTime to CurrentTime.h
842         https://bugs.webkit.org/show_bug.cgi?id=34493
843
844         * wtf/CurrentTime.h:
845
846 2010-02-02  Kwang Yul Seo  <skyul@company100.net>
847
848         Reviewed by Eric Seidel.
849
850         [BREWMP] Add HAVE_XXX definitions
851         https://bugs.webkit.org/show_bug.cgi?id=34414
852
853         Add HAVE_ERRNO_H=1
854
855         * wtf/Platform.h:
856
857 2010-02-02  Kwang Yul Seo  <skyul@company100.net>
858
859         Reviewed by Eric Seidel.
860
861         [BREWMP] Don't define HAVE_TM_GMTOFF, HAVE_TM_ZONE and HAVE_TIMEGM
862         https://bugs.webkit.org/show_bug.cgi?id=34388
863
864         BREWMP does not have these features.
865
866         * wtf/Platform.h:
867
868 2010-02-02  Kwang Yul Seo  <skyul@company100.net>
869
870         Reviewed by Eric Seidel.
871
872         [BREWMP] Define WTF_PLATFORM_BREWMP=1 when BUILDING_BREWMP is defined
873         https://bugs.webkit.org/show_bug.cgi?id=34386
874
875         Define WTF_PLATFORM_BREWMP=1 so that PLATFORM(BREWMP) guard can be used.
876
877         * wtf/Platform.h:
878
879 2010-02-01  Kent Tamura  <tkent@chromium.org>
880
881         Reviewed by Darin Adler.
882
883         Date.UTC() should apply TimeClip operation.
884         https://bugs.webkit.org/show_bug.cgi?id=34461
885
886         ECMAScript 5 15.9.4.3:
887         > 9 Return TimeClip(MakeDate(MakeDay(yr, m, dt), MakeTime(h, min, s, milli))).
888
889         * runtime/DateConstructor.cpp:
890         (JSC::dateUTC): Calls WTF::timeClip().
891
892 2010-02-01  Kent Tamura  <tkent@chromium.org>
893
894         Reviewed by Darin Adler.
895
896         Fix a bug that Math.round() retunrs incorrect results for huge integers
897         https://bugs.webkit.org/show_bug.cgi?id=34462
898
899         * runtime/MathObject.cpp:
900         (JSC::mathProtoFuncRound): Avoid "arg + 0.5".
901
902 2010-02-01  Kwang Yul Seo  <skyul@company100.net>
903
904         Reviewed by Eric Seidel.
905
906         [BREWMP] Port WTF's currentTime
907         https://bugs.webkit.org/show_bug.cgi?id=33567
908
909         Combine GETUTCSECONDS and GETTIMEMS to calculate the number
910         of milliseconds since 1970/01/01 00:00:00 UTC.
911
912         * wtf/CurrentTime.cpp:
913         (WTF::currentTime):
914
915 2010-02-01  Patrick Gansterer  <paroga@paroga.com>
916
917         Reviewed by Darin Adler.
918
919         [Qt] WinCE buildfix after r52729 and fix for Q_BIG_ENDIAN typo.
920         https://bugs.webkit.org/show_bug.cgi?id=34378
921
922         * wtf/Platform.h:
923
924 2010-02-01  Oliver Hunt  <oliver@apple.com>
925
926         Reviewed by Gavin Barraclough.
927
928         Structure not accounting for anonymous slots when computing property storage size
929         https://bugs.webkit.org/show_bug.cgi?id=34441
930
931         Previously any Structure with anonymous storage would have a property map, so we
932         were only including anonymous slot size if there was a property map.  Given this
933         is no longer the case we should always include the anonymous slot count in the
934         property storage size.
935
936         * runtime/Structure.h:
937         (JSC::Structure::propertyStorageSize):
938
939 2010-02-01  Oliver Hunt  <oliver@apple.com>
940
941         Windows build fix, update exports file (again)
942
943         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
944
945 2010-02-01  Oliver Hunt  <oliver@apple.com>
946
947         Windows build fix, update exports file
948
949         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
950
951 2010-01-31  Oliver Hunt  <oliver@apple.com>
952
953         Reviewed by Maciej Stachowiak.
954
955         JSC is failing to propagate anonymous slot count on some transitions
956         https://bugs.webkit.org/show_bug.cgi?id=34321
957
958         Remove secondary Structure constructor, and make Structure store a copy
959         of the number of anonymous slots directly so saving an immediate allocation
960         of a property map for all structures with anonymous storage, which also
961         avoids the leaked property map on new property transition in the original
962         version of this patch.
963
964         We need to propagate the the anonymous slot count otherwise we can end up
965         with a structure recording incorrect information about the available and
966         needed space for property storage, or alternatively incorrectly reusing
967         some slots.
968
969         * JavaScriptCore.exp:
970         * runtime/Structure.cpp:
971         (JSC::Structure::Structure):
972         (JSC::Structure::materializePropertyMap):
973         (JSC::Structure::addPropertyTransition):
974         (JSC::Structure::changePrototypeTransition):
975         (JSC::Structure::despecifyFunctionTransition):
976         (JSC::Structure::getterSetterTransition):
977         (JSC::Structure::toDictionaryTransition):
978         (JSC::Structure::flattenDictionaryStructure):
979         (JSC::Structure::copyPropertyTable):
980         (JSC::Structure::put):
981         (JSC::Structure::remove):
982         (JSC::Structure::insertIntoPropertyMapHashTable):
983         (JSC::Structure::createPropertyMapHashTable):
984         * runtime/Structure.h:
985         (JSC::Structure::create):
986         (JSC::Structure::hasAnonymousSlots):
987         (JSC::Structure::anonymousSlotCount):
988
989 2010-01-31  Patrick Gansterer  <paroga@paroga.com>
990
991         Reviewed by Darin Adler.
992
993         Buildfix for WinCE + style fixes (TLS_OUT_OF_INDEXES is not defined).
994         https://bugs.webkit.org/show_bug.cgi?id=34380
995
996         * wtf/ThreadSpecific.h:
997
998 2010-01-31  Kent Tamura  <tkent@chromium.org>
999
1000         Reviewed by Darin Adler.
1001
1002         [Windows] Fix a bug of round() with huge integral numbers
1003         https://bugs.webkit.org/show_bug.cgi?id=34297
1004
1005         Fix a bug that round() for huge integral numbers returns incorrect
1006         results. For example, round(8639999913600001) returns
1007         8639999913600002 without this change though the double type can
1008         represent 8639999913600001 precisely.
1009
1010         Math.round() of JavaScript has a similar problem. But this change
1011         doesn't fix it because Math.round() doesn't use round() of
1012         MathExtra.h.
1013
1014         * wtf/MathExtras.h:
1015         (round): Avoid to do "num + 0.5" or "num - 0.5".
1016         (roundf): Fixed similarly.
1017         (llround): Calls round().
1018         (llroundf): Calls roundf().
1019         (lround): Calls round().
1020         (lroundf): Calls roundf().
1021
1022 2010-01-29  Mark Rowe  <mrowe@apple.com>
1023
1024         Sort Xcode projects.
1025
1026         * JavaScriptCore.xcodeproj/project.pbxproj:
1027
1028 2010-01-29  Mark Rowe  <mrowe@apple.com>
1029
1030         Fix the Mac build.
1031
1032         Disable ENABLE_INDEXED_DATABASE since it is "completely non-functional".
1033
1034         As the comment in FeatureDefines.xcconfig notes, the list of feature defines
1035         needs to be kept in sync across the various files.  The default values also
1036         need to be kept in sync between these files and build-webkit.
1037
1038         * Configurations/FeatureDefines.xcconfig:
1039
1040 2010-01-29  Simon Hausmann  <simon.hausmann@nokia.com>
1041
1042         Rubber-stamped by Maciej Stachowiak.
1043
1044         Fix the ARM build.
1045
1046         * runtime/JSNumberCell.h:
1047         (JSC::JSNumberCell::createStructure): Call the right Structure::create overload.
1048
1049 2010-01-28  Kevin Ollivier  <kevino@theolliviers.com>
1050
1051         [wx] Build fix for MSW, use ThreadingWin.cpp as the Windows pthreads implementation
1052         implements pthread_t in a way that makes it impossible to check its validity,
1053         which is needed by ThreadingPthreads.cpp.
1054
1055         * wscript:
1056
1057 2010-01-28  Oliver Hunt  <oliver@apple.com>
1058
1059         Reviewed by Gavin Barraclough.
1060
1061         DOM Objects shouldn't all require custom mark functions
1062         https://bugs.webkit.org/show_bug.cgi?id=34291
1063
1064         Make getAnonymousValue const-friendly
1065
1066         * runtime/JSObject.h:
1067         (JSC::JSObject::getAnonymousValue):
1068
1069 2010-01-28  Oliver Hunt  <oliver@apple.com>
1070
1071         Reviewed by Gavin Barraclough.
1072
1073         Simplify anonymous slot implementation
1074         https://bugs.webkit.org/show_bug.cgi?id=34282
1075
1076         A class must now specify the number of slots it needs at construction time
1077         rather than later on with a transition.  This makes many things simpler,
1078         we no longer need to need an additional transition on object creation to
1079         add the anonymous slots, and we remove the need for a number of transition
1080         type checks. 
1081
1082         * API/JSCallbackConstructor.h:
1083         (JSC::JSCallbackConstructor::createStructure):
1084         * API/JSCallbackFunction.h:
1085         (JSC::JSCallbackFunction::createStructure):
1086         * API/JSCallbackObject.h:
1087         (JSC::JSCallbackObject::createStructure):
1088         * JavaScriptCore.exp:
1089         * debugger/DebuggerActivation.h:
1090         (JSC::DebuggerActivation::createStructure):
1091         * runtime/Arguments.h:
1092         (JSC::Arguments::createStructure):
1093         * runtime/BooleanObject.h:
1094         (JSC::BooleanObject::createStructure):
1095         * runtime/DateInstance.h:
1096         (JSC::DateInstance::createStructure):
1097         * runtime/DatePrototype.h:
1098         (JSC::DatePrototype::createStructure):
1099         * runtime/FunctionPrototype.h:
1100         (JSC::FunctionPrototype::createStructure):
1101         * runtime/GetterSetter.h:
1102         (JSC::GetterSetter::createStructure):
1103         * runtime/GlobalEvalFunction.h:
1104         (JSC::GlobalEvalFunction::createStructure):
1105         * runtime/InternalFunction.h:
1106         (JSC::InternalFunction::createStructure):
1107         * runtime/JSAPIValueWrapper.h:
1108         (JSC::JSAPIValueWrapper::createStructure):
1109         * runtime/JSActivation.h:
1110         (JSC::JSActivation::createStructure):
1111         * runtime/JSArray.h:
1112         (JSC::JSArray::createStructure):
1113         * runtime/JSByteArray.cpp:
1114         (JSC::JSByteArray::createStructure):
1115         * runtime/JSCell.h:
1116         (JSC::JSCell::createDummyStructure):
1117         * runtime/JSFunction.h:
1118         (JSC::JSFunction::createStructure):
1119         * runtime/JSGlobalObject.h:
1120         (JSC::JSGlobalObject::createStructure):
1121         * runtime/JSNotAnObject.h:
1122         (JSC::JSNotAnObject::createStructure):
1123         * runtime/JSONObject.h:
1124         (JSC::JSONObject::createStructure):
1125         * runtime/JSObject.h:
1126         (JSC::JSObject::createStructure):
1127         (JSC::JSObject::putAnonymousValue):
1128         (JSC::JSObject::getAnonymousValue):
1129         * runtime/JSPropertyNameIterator.h:
1130         (JSC::JSPropertyNameIterator::createStructure):
1131         * runtime/JSStaticScopeObject.h:
1132         (JSC::JSStaticScopeObject::createStructure):
1133         * runtime/JSString.h:
1134         (JSC::Fiber::createStructure):
1135         * runtime/JSVariableObject.h:
1136         (JSC::JSVariableObject::createStructure):
1137         * runtime/JSWrapperObject.h:
1138         (JSC::JSWrapperObject::createStructure):
1139         (JSC::JSWrapperObject::JSWrapperObject):
1140         * runtime/MathObject.h:
1141         (JSC::MathObject::createStructure):
1142         * runtime/NumberConstructor.h:
1143         (JSC::NumberConstructor::createStructure):
1144         * runtime/NumberObject.h:
1145         (JSC::NumberObject::createStructure):
1146         * runtime/RegExpConstructor.h:
1147         (JSC::RegExpConstructor::createStructure):
1148         * runtime/RegExpObject.h:
1149         (JSC::RegExpObject::createStructure):
1150         * runtime/StringObject.h:
1151         (JSC::StringObject::createStructure):
1152         * runtime/StringObjectThatMasqueradesAsUndefined.h:
1153         (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
1154         * runtime/Structure.cpp:
1155         (JSC::Structure::~Structure):
1156         (JSC::Structure::materializePropertyMap):
1157         * runtime/Structure.h:
1158         (JSC::Structure::create):
1159         (JSC::Structure::anonymousSlotCount):
1160         * runtime/StructureTransitionTable.h:
1161
1162 2010-01-27  Oliver Hunt  <oliver@apple.com>
1163
1164         Windows build fix.
1165
1166         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1167
1168 2010-01-27  Oliver Hunt  <oliver@apple.com>
1169
1170         Reviewed by Maciej Stachowiak.
1171
1172         MessageEvent.data should deserialize in the context of the MessageEvent's global object
1173         https://bugs.webkit.org/show_bug.cgi?id=34227
1174
1175         Add logic to allow us to create an Object, Array, or Date instance
1176         so we can create them in the context of a specific global object,
1177         rather than just using the current lexical global object.
1178
1179         * JavaScriptCore.exp:
1180         * runtime/DateInstance.cpp:
1181         (JSC::DateInstance::DateInstance):
1182         * runtime/DateInstance.h:
1183         * runtime/JSGlobalObject.h:
1184         (JSC::constructEmptyObject):
1185         (JSC::constructEmptyArray):
1186
1187 2010-01-27  Alexey Proskuryakov  <ap@apple.com>
1188
1189         Reviewed by Darin Adler.
1190
1191         https://bugs.webkit.org/show_bug.cgi?id=34150
1192         WebKit needs a mechanism to catch stale HashMap entries
1193
1194         It is very difficult to catch stale pointers that are HashMap keys - since a pointer's hash
1195         is just its value, it is very unlikely that any observable problem is reproducible.
1196
1197         This extends hash table consistency checks to check that pointers are referencing allocated
1198         memory blocks, and makes it possible to invoke the checks explicitly (it is not feasible
1199         to enable CHECK_HASHTABLE_CONSISTENCY by default, because that affects performance too much).
1200
1201         * wtf/HashMap.h: (WTF::::checkConsistency): Call through to HashTable implementation. We can
1202         add similar calls to HashSet and HashCountedSet, but I haven't seen hard to debug problems
1203         with those yet.
1204
1205         * wtf/HashSet.h: (WTF::::remove): The version of checkTableConsistency that's guarded by
1206         CHECK_HASHTABLE_CONSISTENCY is now called internalCheckTableConsistency().
1207
1208         * wtf/HashTable.h:
1209         (WTF::HashTable::internalCheckTableConsistency):
1210         (WTF::HashTable::internalCheckTableConsistencyExceptSize):
1211         (WTF::HashTable::checkTableConsistencyExceptSize):
1212         Expose checkTableConsistency() even if CHECK_HASHTABLE_CONSISTENCY is off.
1213         (WTF::::add): Updated for checkTableConsistency renaming.
1214         (WTF::::addPassingHashCode): Ditto.
1215         (WTF::::removeAndInvalidate): Ditto.
1216         (WTF::::remove): Ditto.
1217         (WTF::::rehash): Ditto.
1218         (WTF::::checkTableConsistency): The assertion for !shouldExpand() was not correct - this
1219         function returns true for tables with m_table == 0.
1220         (WTF::::checkTableConsistencyExceptSize): Call checkValueConsistency for key. Potentially,
1221         we could do the same for values.
1222
1223         * wtf/HashTraits.h:
1224         (WTF::GenericHashTraits::checkValueConsistency): An empty function that can be overridden
1225         to add checks. Currently, the only override is for pointer hashes.
1226
1227         * wtf/RefPtrHashMap.h: (WTF::::remove): Updated for checkTableConsistency renaming.
1228
1229 2010-01-27  Anton Muhin  <antonm@chromium.org>
1230
1231         Reviewed by Darin Adler.
1232
1233         Remove trailing \ from inline function code
1234         https://bugs.webkit.org/show_bug.cgi?id=34223
1235
1236         * assembler/ARMv7Assembler.h:
1237         (JSC::ARMThumbImmediate::countLeadingZerosPartial):
1238
1239 2010-01-27  Kwang Yul Seo  <skyul@company100.net>
1240
1241         Reviewed by Eric Seidel.
1242
1243         [BREWMP] Port WTF's randomNumber
1244         https://bugs.webkit.org/show_bug.cgi?id=33566
1245
1246         Use GETRAND to generate 4 byte random byte sequence to implement
1247         weakRandomNumber. Create a secure random number generator with
1248         AEECLSID_RANDOM to implement randomNumber.
1249
1250         * wtf/RandomNumber.cpp:
1251         (WTF::weakRandomNumber):
1252         (WTF::randomNumber):
1253
1254 2010-01-27  Kwang Yul Seo  <skyul@company100.net>
1255
1256         Reviewed by Eric Seidel.
1257
1258         [BREWMP] Port getCPUTime
1259         https://bugs.webkit.org/show_bug.cgi?id=33572
1260
1261         Use GETUPTIMEMS which returns a continuously and
1262         linearly increasing millisecond timer from the time the device
1263         was powered on. This function is enough to implement getCPUTime.
1264
1265         * runtime/TimeoutChecker.cpp:
1266         (JSC::getCPUTime):
1267
1268 2010-01-27  Kwang Yul Seo  <skyul@company100.net>
1269
1270         Reviewed by Oliver Hunt.
1271
1272         [BREWMP] Add MarkStack fastMalloc implementation for platforms without VirtualAlloc or mmap.
1273         https://bugs.webkit.org/show_bug.cgi?id=33582
1274
1275         Use fastMalloc and fastFree to implement MarkStack::allocateStack and
1276         MarkStack::releaseStack for platforms without page level allocation.
1277
1278         * runtime/MarkStack.h:
1279         (JSC::MarkStack::MarkStackArray::shrinkAllocation):
1280         * runtime/MarkStackNone.cpp: Added.
1281         (JSC::MarkStack::initializePagesize):
1282         (JSC::MarkStack::allocateStack):
1283         (JSC::MarkStack::releaseStack):
1284
1285 2010-01-27  Kwang Yul Seo  <skyul@company100.net>
1286
1287         Reviewed by Eric Seidel.
1288
1289         [BREWMP] Don't use time function
1290         https://bugs.webkit.org/show_bug.cgi?id=33577
1291
1292         Calling time(0) in BREW devices causes a crash because time
1293         is not properly ported in most devices. Cast currentTime() to
1294         time_t to get the same result as time(0).
1295
1296         * wtf/DateMath.cpp:
1297         (WTF::calculateUTCOffset):
1298
1299 2010-01-27  Alexey Proskuryakov  <ap@apple.com>
1300
1301         Revert r53899 (HashMap<AtomicStringImpl*, Value> key checks) and subsequent build fixes,
1302         because they make SVG tests crash in release builds.
1303
1304         * wtf/HashMap.h:
1305         (WTF::::remove):
1306         * wtf/HashSet.h:
1307         (WTF::::remove):
1308         * wtf/HashTable.h:
1309         (WTF::::add):
1310         (WTF::::addPassingHashCode):
1311         (WTF::::removeAndInvalidate):
1312         (WTF::::remove):
1313         (WTF::::rehash):
1314         (WTF::::checkTableConsistency):
1315         (WTF::::checkTableConsistencyExceptSize):
1316         * wtf/HashTraits.h:
1317         (WTF::GenericHashTraits::emptyValue):
1318         (WTF::):
1319         * wtf/RefPtrHashMap.h:
1320         (WTF::::remove):
1321
1322 2010-01-26  Alexey Proskuryakov  <ap@apple.com>
1323
1324         More Windows build fixing.
1325
1326         * wtf/HashTraits.h: _msize takes void*, remove const qualifier from type.
1327
1328 2010-01-26  Alexey Proskuryakov  <ap@apple.com>
1329
1330         Windows build fix.
1331
1332         * wtf/HashTraits.h: Include malloc.h for _msize().
1333
1334 2010-01-26  Alexey Proskuryakov  <ap@apple.com>
1335
1336         Build fix.
1337
1338         * wtf/HashTable.h: (WTF::HashTable::checkTableConsistencyExceptSize): Remove const from a
1339         static (empty) version of this function.
1340
1341 2010-01-26  Alexey Proskuryakov  <ap@apple.com>
1342
1343         Reviewed by Darin Adler.
1344
1345         https://bugs.webkit.org/show_bug.cgi?id=34150
1346         WebKit needs a mechanism to catch stale HashMap entries
1347
1348         It is very difficult to catch stale pointers that are HashMap keys - since a pointer's hash
1349         is just its value, it is very unlikely that any observable problem is reproducible.
1350
1351         This extends hash table consistency checks to check that pointers are referencing allocated
1352         memory blocks, and makes it possible to invoke the checks explicitly (it is not feasible
1353         to enable CHECK_HASHTABLE_CONSISTENCY by default, because that affects performance too much).
1354
1355         * wtf/HashMap.h: (WTF::::checkConsistency): Call through to HashTable implementation. We can
1356         add similar calls to HashSet and HashCountedSet, but I haven't seen hard to debug problems
1357         with those yet.
1358
1359         * wtf/HashSet.h: (WTF::::remove): The version of checkTableConsistency that's guarded by
1360         CHECK_HASHTABLE_CONSISTENCY is now called internalCheckTableConsistency().
1361
1362         * wtf/HashTable.h:
1363         (WTF::HashTable::internalCheckTableConsistency):
1364         (WTF::HashTable::internalCheckTableConsistencyExceptSize):
1365         (WTF::HashTable::checkTableConsistencyExceptSize):
1366         Expose checkTableConsistency() even if CHECK_HASHTABLE_CONSISTENCY is off.
1367         (WTF::::add): Updated for checkTableConsistency renaming.
1368         (WTF::::addPassingHashCode): Ditto.
1369         (WTF::::removeAndInvalidate): Ditto.
1370         (WTF::::remove): Ditto.
1371         (WTF::::rehash): Ditto.
1372         (WTF::::checkTableConsistency): The assertion for !shouldExpand() was not correct - this
1373         function returns true for tables with m_table == 0.
1374         (WTF::::checkTableConsistencyExceptSize): Call checkValueConsistency for key. Potentially,
1375         we could do the same for values.
1376
1377         * wtf/HashTraits.h:
1378         (WTF::GenericHashTraits::checkValueConsistency): An empty function that can be overridden
1379         to add checks. Currently, the only override is for pointer hashes.
1380
1381         * wtf/RefPtrHashMap.h: (WTF::::remove): Updated for checkTableConsistency renaming.
1382
1383 2010-01-26  Lyon Chen  <liachen@rim.com>
1384
1385         Reviewed by Maciej Stachowiak.
1386
1387         Opcode.h use const void* for Opcode cause error #1211 for RVCT compiler
1388         https://bugs.webkit.org/show_bug.cgi?id=33902
1389
1390         * bytecode/Opcode.h:
1391
1392 2010-01-26  Steve Falkenburg  <sfalken@apple.com>
1393
1394         Reviewed by Oliver Hunt.
1395
1396         Windows build references non-existent include paths
1397         https://bugs.webkit.org/show_bug.cgi?id=34175
1398
1399         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1400         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
1401         * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
1402         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
1403         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
1404         * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
1405
1406 2010-01-26  Oliver Hunt  <oliver@apple.com>
1407
1408         Reviewed by Geoffrey Garen.
1409
1410         Using JavaScriptCore API with a webkit vended context can result in slow script dialog
1411         https://bugs.webkit.org/show_bug.cgi?id=34172
1412
1413         Make the APIShim correctly increment and decrement the timeout
1414         entry counter.
1415
1416         * API/APIShims.h:
1417         (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
1418         (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
1419         (JSC::APICallbackShim::APICallbackShim):
1420         (JSC::APICallbackShim::~APICallbackShim):
1421
1422 2010-01-26  Simon Hausmann  <simon.hausmann@nokia.com>
1423
1424         [Qt] Fix compilation of QtScript with non-gcc compilers
1425
1426         Variable length stack arrays are a gcc extension. Use QVarLengthArray
1427         as a more portable solution that still tries to allocate on the stack
1428         first.
1429
1430         * qt/api/qscriptvalue_p.h:
1431         (QScriptValuePrivate::call):
1432
1433 2010-01-26  Simon Hausmann  <simon.hausmann@nokia.com>
1434
1435         Reviewed by Tor Arne Vestbø.
1436
1437         [Qt] Fix the build on platforms without JIT support.
1438
1439         The JIT support should be determined at compile-time via wtf/Platform.h
1440
1441         * qt/api/QtScript.pro:
1442
1443 2010-01-26  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
1444
1445         Reviewed by Simon Hausmann.
1446
1447         First steps of the QtScript API.
1448         
1449         Two new classes were created; QScriptEngine and QScriptValue.
1450         The first should encapsulate a javascript context and the second a script
1451         value.
1452         
1453         This API is still in development, so it isn't compiled by default.
1454         To trigger compilation, pass --qmakearg="CONFIG+=build-qtscript" to
1455         build-webkit.
1456
1457         https://bugs.webkit.org/show_bug.cgi?id=32565
1458
1459         * qt/api/QtScript.pro: Added.
1460         * qt/api/qscriptconverter_p.h: Added.
1461         (QScriptConverter::toString):
1462         * qt/api/qscriptengine.cpp: Added.
1463         (QScriptEngine::QScriptEngine):
1464         (QScriptEngine::~QScriptEngine):
1465         (QScriptEngine::evaluate):
1466         (QScriptEngine::collectGarbage):
1467         * qt/api/qscriptengine.h: Added.
1468         * qt/api/qscriptengine_p.cpp: Added.
1469         (QScriptEnginePrivate::QScriptEnginePrivate):
1470         (QScriptEnginePrivate::~QScriptEnginePrivate):
1471         (QScriptEnginePrivate::evaluate):
1472         * qt/api/qscriptengine_p.h: Added.
1473         (QScriptEnginePrivate::get):
1474         (QScriptEnginePrivate::collectGarbage):
1475         (QScriptEnginePrivate::makeJSValue):
1476         (QScriptEnginePrivate::context):
1477         * qt/api/qscriptvalue.cpp: Added.
1478         (QScriptValue::QScriptValue):
1479         (QScriptValue::~QScriptValue):
1480         (QScriptValue::isValid):
1481         (QScriptValue::isBool):
1482         (QScriptValue::isBoolean):
1483         (QScriptValue::isNumber):
1484         (QScriptValue::isNull):
1485         (QScriptValue::isString):
1486         (QScriptValue::isUndefined):
1487         (QScriptValue::isError):
1488         (QScriptValue::isObject):
1489         (QScriptValue::isFunction):
1490         (QScriptValue::toString):
1491         (QScriptValue::toNumber):
1492         (QScriptValue::toBool):
1493         (QScriptValue::toBoolean):
1494         (QScriptValue::toInteger):
1495         (QScriptValue::toInt32):
1496         (QScriptValue::toUInt32):
1497         (QScriptValue::toUInt16):
1498         (QScriptValue::call):
1499         (QScriptValue::engine):
1500         (QScriptValue::operator=):
1501         (QScriptValue::equals):
1502         (QScriptValue::strictlyEquals):
1503         * qt/api/qscriptvalue.h: Added.
1504         (QScriptValue::):
1505         * qt/api/qscriptvalue_p.h: Added.
1506         (QScriptValuePrivate::):
1507         (QScriptValuePrivate::get):
1508         (QScriptValuePrivate::QScriptValuePrivate):
1509         (QScriptValuePrivate::isValid):
1510         (QScriptValuePrivate::isBool):
1511         (QScriptValuePrivate::isNumber):
1512         (QScriptValuePrivate::isNull):
1513         (QScriptValuePrivate::isString):
1514         (QScriptValuePrivate::isUndefined):
1515         (QScriptValuePrivate::isError):
1516         (QScriptValuePrivate::isObject):
1517         (QScriptValuePrivate::isFunction):
1518         (QScriptValuePrivate::toString):
1519         (QScriptValuePrivate::toNumber):
1520         (QScriptValuePrivate::toBool):
1521         (QScriptValuePrivate::toInteger):
1522         (QScriptValuePrivate::toInt32):
1523         (QScriptValuePrivate::toUInt32):
1524         (QScriptValuePrivate::toUInt16):
1525         (QScriptValuePrivate::equals):
1526         (QScriptValuePrivate::strictlyEquals):
1527         (QScriptValuePrivate::assignEngine):
1528         (QScriptValuePrivate::call):
1529         (QScriptValuePrivate::engine):
1530         (QScriptValuePrivate::context):
1531         (QScriptValuePrivate::value):
1532         (QScriptValuePrivate::object):
1533         (QScriptValuePrivate::inherits):
1534         (QScriptValuePrivate::isJSBased):
1535         (QScriptValuePrivate::isNumberBased):
1536         (QScriptValuePrivate::isStringBased):
1537         * qt/api/qtscriptglobal.h: Added.
1538         * qt/tests/qscriptengine/qscriptengine.pro: Added.
1539         * qt/tests/qscriptengine/tst_qscriptengine.cpp: Added.
1540         (tst_QScriptEngine::tst_QScriptEngine):
1541         (tst_QScriptEngine::~tst_QScriptEngine):
1542         (tst_QScriptEngine::init):
1543         (tst_QScriptEngine::cleanup):
1544         (tst_QScriptEngine::collectGarbage):
1545         (tst_QScriptEngine::evaluate):
1546         * qt/tests/qscriptvalue/qscriptvalue.pro: Added.
1547         * qt/tests/qscriptvalue/tst_qscriptvalue.cpp: Added.
1548         (tst_QScriptValue::tst_QScriptValue):
1549         (tst_QScriptValue::~tst_QScriptValue):
1550         (tst_QScriptValue::init):
1551         (tst_QScriptValue::cleanup):
1552         (tst_QScriptValue::ctor):
1553         (tst_QScriptValue::toString_data):
1554         (tst_QScriptValue::toString):
1555         (tst_QScriptValue::copyConstructor_data):
1556         (tst_QScriptValue::copyConstructor):
1557         (tst_QScriptValue::assignOperator_data):
1558         (tst_QScriptValue::assignOperator):
1559         (tst_QScriptValue::dataSharing):
1560         (tst_QScriptValue::constructors_data):
1561         (tst_QScriptValue::constructors):
1562         (tst_QScriptValue::call):
1563         * qt/tests/tests.pri: Added.
1564         * qt/tests/tests.pro: Added.
1565
1566 2010-01-25  Dmitry Titov  <dimich@chromium.org>
1567
1568         Reviewed by David Levin.
1569
1570         Fix Chromium Linux tests: the pthread functions on Linux produce segfault if they receive 0 thread handle.
1571         After r53714, we can have 0 thread handles passed to pthread_join and pthread_detach if corresponding threads
1572         were already terminated and their threadMap entries cleared.
1573         Add a 0 check.
1574
1575         * wtf/ThreadingPthreads.cpp:
1576         (WTF::waitForThreadCompletion):
1577         (WTF::detachThread):
1578
1579 2010-01-24  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1580
1581         Reviewed by Maciej Stachowiak.
1582
1583         Refactor JITStubs.cpp so that DEFINE_STUB_FUNCTION is only used once for each function
1584         https://bugs.webkit.org/show_bug.cgi?id=33866
1585
1586         Place the guard USE(JSVALUE32_64) inside the body of the DEFINE_STUB_FUNCTION
1587         macro for those functions that are always present.
1588
1589         * jit/JITStubs.cpp:
1590         (JSC::DEFINE_STUB_FUNCTION):
1591
1592 2010-01-22  Kevin Watters  <kevinwatters@gmail.com>
1593
1594         Reviewed by Kevin Ollivier.
1595
1596         [wx] Remove the Bakefile build system, which is no longer being used.
1597         
1598         https://bugs.webkit.org/show_bug.cgi?id=34022
1599
1600         * JavaScriptCoreSources.bkl: Removed.
1601         * jscore.bkl: Removed.
1602
1603 2010-01-22  Steve Falkenburg  <sfalken@apple.com>
1604
1605         Reviewed by Darin Adler.
1606
1607         https://bugs.webkit.org/show_bug.cgi?id=34025
1608         Enable client-based Geolocation abstraction for Mac, Windows AppleWebKit targets.
1609
1610         * Configurations/FeatureDefines.xcconfig:
1611
1612 2010-01-22  Dmitry Titov  <dimich@chromium.org>
1613
1614         Not reviewed, attempted Snow Leopard build fix.
1615
1616         * wtf/ThreadingPthreads.cpp: Add a forward declaration of a function which is not 'static'.
1617
1618 2009-01-22  Dmitry Titov  <dimich@chromium.org>
1619
1620         Reviewed by Maciej Stachowiak.
1621
1622         Fix the leak of ThreadIdentifiers in threadMap across threads.
1623         https://bugs.webkit.org/show_bug.cgi?id=32689
1624
1625         Test is added to DumpRenderTree.mm.
1626
1627         * Android.mk: Added file ThreadIdentifierDataPthreads.(h|cpp) to build.
1628         * Android.v8.wtf.mk: Ditto.
1629         * GNUmakefile.am: Ditto.
1630         * JavaScriptCore.gyp/JavaScriptCore.gyp: Ditto.
1631         * JavaScriptCore.gypi: Ditto.
1632         * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
1633
1634         * wtf/ThreadIdentifierDataPthreads.cpp: Added. Contains custom implementation of thread-specific data that uses custom destructor.
1635         (WTF::ThreadIdentifierData::~ThreadIdentifierData): Removes the ThreadIdentifier from the threadMap.
1636         (WTF::ThreadIdentifierData::identifier):
1637         (WTF::ThreadIdentifierData::initialize):
1638         (WTF::ThreadIdentifierData::destruct): Custom thread-specific destructor. Resets the value for the key again to cause second invoke.
1639         (WTF::ThreadIdentifierData::initializeKeyOnceHelper):
1640         (WTF::ThreadIdentifierData::initializeKeyOnce): Need to use pthread_once since initialization may come on any thread(s).
1641         * wtf/ThreadIdentifierDataPthreads.h: Added.
1642         (WTF::ThreadIdentifierData::ThreadIdentifierData):
1643
1644         * wtf/Threading.cpp:
1645         (WTF::threadEntryPoint): Move initializeCurrentThreadInternal to after the lock to make
1646                                  sure it is invoked when ThreadIdentifier is already established.
1647
1648         * wtf/Threading.h: Rename setThreadNameInternal -> initializeCurrentThreadInternal since it does more then only set the name now.
1649         * wtf/ThreadingNone.cpp:
1650         (WTF::initializeCurrentThreadInternal): Ditto.
1651         * wtf/ThreadingWin.cpp:
1652         (WTF::initializeCurrentThreadInternal): Ditto.
1653         (WTF::initializeThreading): Ditto.
1654         * wtf/gtk/ThreadingGtk.cpp:
1655         (WTF::initializeCurrentThreadInternal): Ditto.
1656         * wtf/qt/ThreadingQt.cpp:
1657         (WTF::initializeCurrentThreadInternal): Ditto.
1658
1659         * wtf/ThreadingPthreads.cpp:
1660         (WTF::establishIdentifierForPthreadHandle):
1661         (WTF::clearPthreadHandleForIdentifier): Make it not 'static' so the ~ThreadIdentifierData() in another file can call it.
1662         (WTF::initializeCurrentThreadInternal): Set the thread-specific data. The ThreadIdentifier is already established by creating thread.
1663         (WTF::waitForThreadCompletion): Remove call to clearPthreadHandleForIdentifier(threadID) since it is now done in ~ThreadIdentifierData().
1664         (WTF::detachThread): Ditto.
1665         (WTF::currentThread): Use the thread-specific data to get the ThreadIdentifier. It's many times faster then Mutex-protected iteration through the map.
1666                               Also, set the thread-specific data if called first time on the thread.
1667
1668 2010-01-21  Kwang Yul Seo  <skyul@company100.net>
1669
1670         Reviewed by Alexey Proskuryakov.
1671
1672         Add ThreadSpecific for ENABLE(SINGLE_THREADED)
1673         https://bugs.webkit.org/show_bug.cgi?id=33878
1674
1675         Implement ThreadSpecific with a simple getter/setter
1676         when ENABLE(SINGLE_THREADED) is true.
1677
1678         Due to the change in https://bugs.webkit.org/show_bug.cgi?id=33236,
1679         an implementation of ThreadSpecific must be available to build WebKit.
1680         This causes a build failure for platforms without a proper
1681         ThreadSpecific implementation.
1682
1683         * wtf/ThreadSpecific.h:
1684         (WTF::::ThreadSpecific):
1685         (WTF::::~ThreadSpecific):
1686         (WTF::::get):
1687         (WTF::::set):
1688         (WTF::::destroy):
1689
1690 2010-01-21  Kwang Yul Seo  <skyul@company100.net>
1691
1692         Reviewed by Maciej Stachowiak.
1693
1694         Add fastStrDup to FastMalloc
1695         https://bugs.webkit.org/show_bug.cgi?id=33937
1696
1697         The new string returned by fastStrDup is obtained with fastMalloc,
1698         and can be freed with fastFree. This makes the memory management 
1699         more consistent because we don't need to keep strdup allocated pointers
1700         and free them with free(). Instead we can use fastFree everywhere.
1701
1702         * wtf/FastMalloc.cpp:
1703         (WTF::fastStrDup):
1704         * wtf/FastMalloc.h:
1705
1706 2010-01-21  Brady Eidson  <beidson@apple.com>
1707
1708         Reviewed by Maciej Stachowiak.
1709
1710         history.back() for same-document history traversals isn't synchronous as the specification states.
1711         <rdar://problem/7535011> and https://bugs.webkit.org/show_bug.cgi?id=33538
1712
1713         * wtf/Platform.h: Add a "HISTORY_ALWAYS_ASYNC" enable and turn it on for Chromium.
1714
1715 2010-01-21  Geoffrey Garen  <ggaren@apple.com>
1716
1717         Reviewed by Oliver Hunt.
1718
1719         Always create a prototype for automatically managed classes.
1720         
1721         This fixes some errors where prototype chains were not correctly hooked
1722         up, and also ensures that API classes work correctly with features like
1723         instanceof.
1724
1725         * API/JSClassRef.cpp:
1726         (OpaqueJSClass::create): Cleaned up some of this code. Also changed it
1727         to always create a prototype class.
1728
1729         * API/tests/testapi.c:
1730         (Derived2_class):
1731         (main): Fixed a null value crash in the exception checking code.
1732         * API/tests/testapi.js: Added some tests for the case where a prototype
1733         chain would not be hooked up correctly.
1734
1735 2010-01-21  Oliver Hunt  <oliver@apple.com>
1736
1737         Reviewed by Geoff Garen.
1738
1739         Force JSC to create a prototype chain for API classes with a
1740         parent class but no static functions.
1741
1742         * API/JSClassRef.cpp:
1743         (OpaqueJSClass::create):
1744
1745 2010-01-21  Kent Hansen  <kent.hansen@nokia.com>
1746
1747         Reviewed by Geoffrey Garen.
1748
1749         Object.getOwnPropertyDescriptor always returns undefined for JS API objects
1750         https://bugs.webkit.org/show_bug.cgi?id=33946
1751
1752         Ideally the getOwnPropertyDescriptor() reimplementation should return an
1753         access descriptor that wraps the property getter and setter callbacks, but
1754         that approach is much more involved than returning a value descriptor.
1755         Keep it simple for now.
1756
1757         * API/JSCallbackObject.h:
1758         * API/JSCallbackObjectFunctions.h:
1759         (JSC::::getOwnPropertyDescriptor):
1760         * API/tests/testapi.js:
1761
1762 2010-01-20  Mark Rowe  <mrowe@apple.com>
1763
1764         Build fix.
1765
1766         * wtf/FastMalloc.cpp:
1767         (WTF::TCMalloc_PageHeap::initializeScavenger): Remove unnecessary function call.
1768
1769 2010-01-20  Mark Rowe  <mrowe@apple.com>
1770
1771         Reviewed by Oliver Hunt.
1772
1773         Use the inline i386 assembly for x86_64 as well rather than falling back to using pthread mutexes.
1774
1775         * wtf/TCSpinLock.h:
1776         (TCMalloc_SpinLock::Lock):
1777         (TCMalloc_SpinLock::Unlock):
1778         (TCMalloc_SlowLock):
1779
1780 2010-01-20  Mark Rowe  <mrowe@apple.com>
1781
1782         Reviewed by Oliver Hunt.
1783
1784         <rdar://problem/7215063> Use GCD instead of an extra thread for FastMalloc scavenging on platforms where it is supported
1785
1786         Abstract the background scavenging slightly so that an alternate implementation that uses GCD can be used on platforms
1787         where it is supported.
1788
1789         * wtf/FastMalloc.cpp:
1790         (WTF::TCMalloc_PageHeap::init):
1791         (WTF::TCMalloc_PageHeap::initializeScavenger):
1792         (WTF::TCMalloc_PageHeap::signalScavenger):
1793         (WTF::TCMalloc_PageHeap::shouldContinueScavenging):
1794         (WTF::TCMalloc_PageHeap::Delete):
1795         (WTF::TCMalloc_PageHeap::periodicScavenge):
1796         * wtf/Platform.h:
1797
1798 2010-01-20  Geoffrey Garen  <ggaren@apple.com>
1799
1800         Reviewed by Oliver Hunt.
1801
1802         <rdar://problem/7562708> REGRESSION(53460): Heap::destroy may not run
1803         all destructors
1804
1805         * runtime/Collector.cpp:
1806         (JSC::Heap::freeBlocks): Instead of fully marking protected objects,
1807         just set their mark bits. This prevents protected objects from keeping
1808         unprotected objects alive. Destructor order is not guaranteed, so it's
1809         OK to destroy objects pointed to by protected objects before destroying
1810         protected objects.
1811
1812 2010-01-19  David Levin  <levin@chromium.org>
1813
1814         Reviewed by Oliver Hunt.
1815
1816         CrossThreadCopier needs to support ThreadSafeShared better.
1817         https://bugs.webkit.org/show_bug.cgi?id=33698
1818
1819         * wtf/TypeTraits.cpp: Added tests for the new type traits.
1820         * wtf/TypeTraits.h:
1821         (WTF::IsSubclass): Determines if a class is a derived from another class.
1822         (WTF::IsSubclassOfTemplate): Determines if a class is a derived from a
1823         template class (with one parameter that is unknown).
1824         (WTF::RemoveTemplate): Reveals the type for a template parameter.
1825
1826 2010-01-20  Steve Falkenburg  <sfalken@apple.com>
1827
1828         Reviewed by Darin Adler and Adam Roben.
1829
1830         Feature defines are difficult to maintain on Windows builds
1831         https://bugs.webkit.org/show_bug.cgi?id=33883
1832
1833         FeatureDefines.vsprops are now maintained in a way similar to
1834         Configurations/FeatureDefines.xcconfig, with the added advantage
1835         of having a single FeatureDefines file across all projects.
1836
1837         * Configurations/FeatureDefines.xcconfig: Add comments about keeping feature definitions in sync.
1838         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add FeatureDefines.vsprops inherited property sheet.
1839         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add FeatureDefines.vsprops inherited property sheet.
1840
1841 2010-01-20  Csaba Osztrogonác  <ossy@webkit.org>
1842
1843         [Qt] Unreviewed buildfix for r53547.
1844
1845         * DerivedSources.pro:
1846
1847 2010-01-20  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
1848
1849         Reviewed by Simon Hausmann.
1850
1851         [Qt] Make extraCompilers for generated sources depend on their scripts
1852
1853         * DerivedSources.pro:
1854
1855 2010-01-19  Brian Weinstein  <bweinstein@apple.com>
1856
1857         Reviewed by Tim Hatcher.
1858
1859         When JavaScriptCore calls Debugger::Exception, have it pass a
1860         hasHandler variable that represents if exception is being handled
1861         in the same function (not in a parent on the call stack).
1862         
1863         This just adds a new parameter, no behavior is changed.
1864
1865         * debugger/Debugger.h:
1866         * interpreter/Interpreter.cpp:
1867         (JSC::Interpreter::throwException):
1868
1869 2010-01-18  Maciej Stachowiak  <mjs@apple.com>
1870
1871         Reviewed by Adam Barth.
1872
1873         Inline functions that are hot in DOM manipulation
1874         https://bugs.webkit.org/show_bug.cgi?id=33820
1875         
1876         (3% speedup on Dromaeo DOM Core tests)
1877
1878         * runtime/WeakGCMap.h:
1879         (JSC::::get): inline
1880
1881 2010-01-19  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1882
1883         Unreviewed build fix for JIT with RVCT.
1884
1885         Remove IMPORT statement; cti_vm_throw is already defined in JITStubs.h.
1886         Remove extra ')'.
1887
1888         * jit/JITStubs.cpp:
1889         (JSC::ctiVMThrowTrampoline):
1890
1891 2010-01-19  Geoffrey Garen  <ggaren@apple.com>
1892
1893         Reviewed by Oliver Hunt.
1894
1895         REGRESSION (52082): Crash on worker thread when reloading http://radnan.public.iastate.edu/procedural/
1896         https://bugs.webkit.org/show_bug.cgi?id=33826
1897
1898         This bug was caused by a GC-protected object being destroyed early by
1899         Heap::destroy. Clients of the GC protect APIs (reasonably) expect pointers
1900         to GC-protected memory to be valid.
1901
1902         The solution is to do two passes of tear-down in Heap::destroy. The first
1903         pass tears down all unprotected objects. The second pass ASSERTs that all
1904         previously protected objects are now unprotected, and then tears down
1905         all perviously protected objects. These two passes simulate the two passes
1906         that would have been required to free a protected object during normal GC.
1907         
1908         * API/JSContextRef.cpp: Removed some ASSERTs that have moved into Heap.
1909
1910         * runtime/Collector.cpp:
1911         (JSC::Heap::destroy): Moved ASSERTs to here.
1912         (JSC::Heap::freeBlock): Tidied up the use of didShrink by moving its
1913         setter to the function that does the shrinking.
1914         (JSC::Heap::freeBlocks): Implemented above algorithm.
1915         (JSC::Heap::shrinkBlocks): Tidied up the use of didShrink.
1916
1917 2010-01-19  Gavin Barraclough  <barraclough@apple.com>
1918
1919         Reviewed by NOBODY (build fix).
1920
1921         Reverting r53455, breaks 2 javascriptcore tests.
1922
1923         * API/JSContextRef.cpp:
1924         * runtime/Collector.cpp:
1925         (JSC::Heap::destroy):
1926         (JSC::Heap::freeBlock):
1927         (JSC::Heap::freeBlocks):
1928         (JSC::Heap::shrinkBlocks):
1929
1930 2010-01-18  Gavin Barraclough  <barraclough@apple.com>
1931
1932         Reviewed by NOBODY (build fix).
1933
1934         Revert r53454, since it causes much sadness in this world.
1935
1936         * runtime/UString.cpp:
1937         (JSC::UString::spliceSubstringsWithSeparators):
1938         (JSC::UString::replaceRange):
1939         * runtime/UStringImpl.cpp:
1940         (JSC::UStringImpl::baseSharedBuffer):
1941         (JSC::UStringImpl::sharedBuffer):
1942         (JSC::UStringImpl::~UStringImpl):
1943         * runtime/UStringImpl.h:
1944         (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield):
1945         (JSC::UntypedPtrAndBitfield::asPtr):
1946         (JSC::UntypedPtrAndBitfield::operator&=):
1947         (JSC::UntypedPtrAndBitfield::operator|=):
1948         (JSC::UntypedPtrAndBitfield::operator&):
1949         (JSC::UStringImpl::create):
1950         (JSC::UStringImpl::cost):
1951         (JSC::UStringImpl::isIdentifier):
1952         (JSC::UStringImpl::setIsIdentifier):
1953         (JSC::UStringImpl::ref):
1954         (JSC::UStringImpl::deref):
1955         (JSC::UStringImpl::checkConsistency):
1956         (JSC::UStringImpl::UStringImpl):
1957         (JSC::UStringImpl::bufferOwnerString):
1958         (JSC::UStringImpl::bufferOwnership):
1959         (JSC::UStringImpl::isStatic):
1960         * wtf/StringHashFunctions.h:
1961         (WTF::stringHash):
1962
1963 2010-01-18  Geoffrey Garen  <ggaren@apple.com>
1964
1965         Reviewed by Oliver Hunt.
1966
1967         REGRESSION (52082): Crash on worker thread when reloading http://radnan.public.iastate.edu/procedural/
1968         https://bugs.webkit.org/show_bug.cgi?id=33826
1969
1970         This bug was caused by a GC-protected object being destroyed early by
1971         Heap::destroy. Clients of the GC protect APIs (reasonably) expect pointers
1972         to GC-protected memory to be valid.
1973
1974         The solution is to do two passes of tear-down in Heap::destroy. The first
1975         pass tears down all unprotected objects. The second pass ASSERTs that all
1976         previously protected objects are now unprotected, and then tears down
1977         all perviously protected objects. These two passes simulate the two passes
1978         that would have been required to free a protected object during normal GC.
1979         
1980         * API/JSContextRef.cpp: Removed some ASSERTs that have moved into Heap.
1981
1982         * runtime/Collector.cpp:
1983         (JSC::Heap::destroy): Moved ASSERTs to here.
1984         (JSC::Heap::freeBlock): Tidied up the use of didShrink by moving its
1985         setter to the function that does the shrinking.
1986         (JSC::Heap::freeBlocks): Implemented above algorithm.
1987         (JSC::Heap::shrinkBlocks): Tidied up the use of didShrink.
1988
1989 2010-01-18  Gavin Barraclough  <barraclough@apple.com>
1990
1991         Reviewed by Oliver Hunt.
1992
1993         https://bugs.webkit.org/show_bug.cgi?id=33731
1994         Remove UntypedPtrAndBitfield from UStringImpl (akin to PtrAndFlags).
1995
1996         This break the OS X Leaks tool.  Instead, free up some more bits from the refCount.
1997
1998         * runtime/UStringImpl.cpp:
1999         (JSC::UStringImpl::sharedBuffer):
2000         (JSC::UStringImpl::~UStringImpl):
2001         * runtime/UStringImpl.h:
2002         (JSC::UStringImpl::cost):
2003         (JSC::UStringImpl::checkConsistency):
2004         (JSC::UStringImpl::UStringImpl):
2005         (JSC::UStringImpl::bufferOwnerString):
2006         (JSC::UStringImpl::):
2007         * wtf/StringHashFunctions.h:
2008         (WTF::stringHash):
2009
2010 2010-01-18  Kent Tamura  <tkent@chromium.org>
2011
2012         Reviewed by Darin Adler.
2013
2014         HTMLInputElement::valueAsDate setter support for type=month.
2015         https://bugs.webkit.org/show_bug.cgi?id=33021
2016
2017         Expose the following functions to be used by WebCore:
2018          - WTF::msToyear()
2019          - WTF::dayInYear()
2020          - WTF::monthFromDayInYear()
2021          - WTF::dayInMonthFromDayInYear()
2022
2023         * JavaScriptCore.exp:
2024         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2025         * wtf/DateMath.cpp:
2026         (WTF::msToYear): Remove "static inline".
2027         (WTF::dayInYear): Remove "static inline".
2028         (WTF::monthFromDayInYear): Remove "static inline".
2029         (WTF::dayInMonthFromDayInYear): Remove "static inline".
2030         * wtf/DateMath.h: Declare the above functions.
2031
2032 2010-01-18  Darin Adler  <darin@apple.com>
2033
2034         Fix build by reverting the previous change.
2035
2036         * runtime/UString.h: Rolled out the FastAllocBase base class.
2037         It was making UString larger, and therefore JSString larger,
2038         and too big for a garbage collection cell.
2039
2040         This raises the unpleasant possibility that many classes became
2041         larger because we added the FastAllocBase base class. I am
2042         worried about this, and it needs to be investigated.
2043
2044 2010-01-18  Zoltan Horvath  <zoltan@webkit.org>
2045
2046         Reviewed by Darin Adler.
2047
2048         Allow custom memory allocation control for UString class
2049         https://bugs.webkit.org/show_bug.cgi?id=27831
2050
2051         Inherits the following class from FastAllocBase because it is
2052         instantiated by 'new' and no need to be copyable:
2053
2054         class name     - instantiated at:
2055         classs UString - JavaScriptCore/runtime/UString.cpp:160
2056
2057         * runtime/UString.h:
2058
2059 2010-01-18  Evan Cheng  <evan.cheng@apple.com>
2060
2061         Reviewed by Darin Adler.
2062
2063         Add some ALWAYS_INLINE for key functions not inlined by some versions of GCC.
2064         rdar://problem/7553780
2065
2066         * runtime/JSObject.h:
2067         (JSC::JSObject::getPropertySlot): ALWAYS_INLINE both overloads.
2068         * runtime/JSString.h:
2069         (JSC::JSString::JSString): ALWAYS_INLINE the version that takes a UString.
2070         * runtime/UString.h:
2071         (JSC::operator==): ALWAYS_INLINE the version that compares two UString objects.
2072
2073 2010-01-18  Csaba Osztrogonác  <ossy@webkit.org>
2074
2075         Reviewed by Darin Adler.
2076
2077         Delete dftables-xxxxxxxx.in files automatically.
2078         https://bugs.webkit.org/show_bug.cgi?id=33796
2079
2080         * pcre/dftables: unlink unnecessary temporary file.
2081
2082 2010-01-18  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2083
2084         Reviewed by Simon Hausmann.
2085
2086         [Qt] Force qmake to generate a single makefile for DerivedSources.pro
2087
2088         * DerivedSources.pro:
2089
2090 2010-01-18  Csaba Osztrogonác  <ossy@webkit.org>
2091
2092         Rubber-stamped by Gustavo Noronha Silva.
2093
2094         Rolling out r53391 and r53392 because of random crashes on buildbots.
2095         https://bugs.webkit.org/show_bug.cgi?id=33731
2096
2097         * bytecode/CodeBlock.h:
2098         (JSC::CallLinkInfo::seenOnce):
2099         (JSC::CallLinkInfo::setSeen):
2100         (JSC::MethodCallLinkInfo::MethodCallLinkInfo):
2101         (JSC::MethodCallLinkInfo::seenOnce):
2102         (JSC::MethodCallLinkInfo::setSeen):
2103         * jit/JIT.cpp:
2104         (JSC::JIT::unlinkCall):
2105         * jit/JITPropertyAccess.cpp:
2106         (JSC::JIT::patchMethodCallProto):
2107         * runtime/UString.cpp:
2108         (JSC::UString::spliceSubstringsWithSeparators):
2109         (JSC::UString::replaceRange):
2110         * runtime/UString.h:
2111         * runtime/UStringImpl.cpp:
2112         (JSC::UStringImpl::baseSharedBuffer):
2113         (JSC::UStringImpl::sharedBuffer):
2114         (JSC::UStringImpl::~UStringImpl):
2115         * runtime/UStringImpl.h:
2116         (JSC::UntypedPtrAndBitfield::UntypedPtrAndBitfield):
2117         (JSC::UntypedPtrAndBitfield::asPtr):
2118         (JSC::UntypedPtrAndBitfield::operator&=):
2119         (JSC::UntypedPtrAndBitfield::operator|=):
2120         (JSC::UntypedPtrAndBitfield::operator&):
2121         (JSC::UStringImpl::create):
2122         (JSC::UStringImpl::cost):
2123         (JSC::UStringImpl::isIdentifier):
2124         (JSC::UStringImpl::setIsIdentifier):
2125         (JSC::UStringImpl::ref):
2126         (JSC::UStringImpl::deref):
2127         (JSC::UStringImpl::checkConsistency):
2128         (JSC::UStringImpl::UStringImpl):
2129         (JSC::UStringImpl::bufferOwnerString):
2130         (JSC::UStringImpl::bufferOwnership):
2131         (JSC::UStringImpl::isStatic):
2132         * wtf/StringHashFunctions.h:
2133         (WTF::stringHash):
2134
2135 2010-01-18  Simon Hausmann  <simon.hausmann@nokia.com>
2136
2137         Reviewed by Kenneth Rohde Christiansen.
2138
2139         Fix the build with strict gcc and RVCT versions: It's not legal to cast a
2140         pointer to a function to a void* without an intermediate cast to a non-pointer
2141         type. A cast to a ptrdiff_t inbetween fixes it.
2142
2143         * runtime/JSString.h:
2144         (JSC::Fiber::JSString):
2145
2146 2010-01-15  Gavin Barraclough  <barraclough@apple.com>
2147
2148         Reviewed by Oliver Hunt.
2149
2150         https://bugs.webkit.org/show_bug.cgi?id=33731
2151         Remove UntypedPtrAndBitfield from UStringImpl (akin to PtrAndFlags).
2152
2153         This break the OS X Leaks tool.  Instead, free up some more bits from the refCount.
2154
2155         * runtime/UStringImpl.cpp:
2156         (JSC::UStringImpl::sharedBuffer):
2157         (JSC::UStringImpl::~UStringImpl):
2158         * runtime/UStringImpl.h:
2159         (JSC::UStringImpl::cost):
2160         (JSC::UStringImpl::checkConsistency):
2161         (JSC::UStringImpl::UStringImpl):
2162         (JSC::UStringImpl::bufferOwnerString):
2163         (JSC::UStringImpl::):
2164         * wtf/StringHashFunctions.h:
2165         (WTF::stringHash):
2166
2167 2010-01-15  Gavin Barraclough  <barraclough@apple.com>
2168
2169         Reviewed by Oliver Hunt.
2170
2171         https://bugs.webkit.org/show_bug.cgi?id=33731
2172         Remove uses of PtrAndFlags from JIT data stuctures.
2173
2174         These break the OS X Leaks tool.  Free up a bit in CallLinkInfo, and invalid
2175         permutation of pointer states in MethodCallLinkInfo to represent the removed bits.
2176
2177         * bytecode/CodeBlock.h:
2178         (JSC::CallLinkInfo::seenOnce):
2179         (JSC::CallLinkInfo::setSeen):
2180         (JSC::MethodCallLinkInfo::MethodCallLinkInfo):
2181         (JSC::MethodCallLinkInfo::seenOnce):
2182         (JSC::MethodCallLinkInfo::setSeen):
2183         * jit/JIT.cpp:
2184         (JSC::JIT::unlinkCall):
2185         * jit/JITPropertyAccess.cpp:
2186         (JSC::JIT::patchMethodCallProto):
2187         * runtime/UString.h:
2188
2189 2010-01-16  Maciej Stachowiak  <mjs@apple.com>
2190
2191         Reviewed by Oliver Hunt.
2192
2193         Cache JS string values made from DOM strings (Dromaeo speedup)
2194         https://bugs.webkit.org/show_bug.cgi?id=33768
2195         <rdar://problem/7353576>
2196
2197         * runtime/JSString.h:
2198         (JSC::jsStringWithFinalizer): Added new mechanism for a string to have an optional
2199         finalizer callback, for the benefit of weak-referencing caches.
2200         (JSC::):
2201         (JSC::Fiber::JSString):
2202         (JSC::Fiber::~JSString):
2203         * runtime/JSString.cpp:
2204         (JSC::JSString::resolveRope): Clear fibers so this doesn't look like a string with a finalizer.
2205         * runtime/WeakGCMap.h: Include "Collector.h" to make this header includable by itself.
2206
2207 2010-01-15  Sam Weinig  <sam@webkit.org>
2208
2209         Reviewed by Maciej Stachowiak.
2210
2211         Fix for <rdar://problem/7548432>
2212         Add ALWAYS_INLINE to jsLess for a 1% speedup on llvm-gcc.
2213
2214         * runtime/Operations.h:
2215         (JSC::jsLess):
2216
2217 2010-01-14  Geoffrey Garen  <ggaren@apple.com>
2218
2219         Reviewed by Oliver Hunt.
2220
2221         REGRESISON: Google maps buttons not working properly
2222         https://bugs.webkit.org/show_bug.cgi?id=31871
2223
2224         REGRESSION(r52948): JavaScript exceptions thrown on Google Maps when
2225         getting directions for a second time
2226         https://bugs.webkit.org/show_bug.cgi?id=33446
2227         
2228         SunSpider and v8 report no change.
2229
2230         * interpreter/Interpreter.cpp:
2231         (JSC::Interpreter::tryCacheGetByID): Update our cached offset in case
2232         flattening the dictionary changed any of its offsets.
2233
2234         * jit/JITStubs.cpp:
2235         (JSC::JITThunks::tryCacheGetByID):
2236         (JSC::DEFINE_STUB_FUNCTION):
2237         * runtime/Operations.h:
2238         (JSC::normalizePrototypeChain): ditto
2239
2240 2010-01-14  Gavin Barraclough  <barraclough@apple.com>
2241
2242         Reviewed by Oliver Hunt.
2243
2244         https://bugs.webkit.org/show_bug.cgi?id=33705
2245         UStringImpl::create() should use internal storage
2246
2247         When creating a UStringImpl copying of a UChar*, we can use an internal buffer,
2248         by calling UStringImpl::tryCreateUninitialized().
2249
2250         Also, remove duplicate of copyChars from JSString, call UStringImpl's version.
2251
2252         Small (max 0.5%) progression on Sunspidey.
2253
2254         * runtime/JSString.cpp:
2255         (JSC::JSString::resolveRope):
2256         * runtime/UStringImpl.h:
2257         (JSC::UStringImpl::create):
2258
2259 2010-01-14  Gavin Barraclough  <barraclough@apple.com>
2260
2261         Reviewed by Sam Weinig.
2262
2263         Make naming & behaviour of UString[Impl] methods more consistent.
2264         https://bugs.webkit.org/show_bug.cgi?id=33702
2265
2266         UString::create() creates a copy of the UChar* passed, but UStringImpl::create() assumes
2267         that it should assume ownership of the provided buffer (with UString::createNonCopying()
2268         and UStringImpl::createCopying() providing the alternate behaviours).  Unify on create()
2269         taking a copy of the provided buffer.  For non-copying cases, use the name 'adopt', and
2270         make this method take a Vector<UChar>&.  For cases where non-copying construction was being
2271         used, other than from a Vector<UChar>, change the code to allocate the storage along with
2272         the UStringImpl using UStringImpl::createUninitialized().  (The adopt() method also more
2273         closely matches that of WebCore::StringImpl).
2274
2275         Also, UString::createUninitialized() and UStringImpl::createUninitialized() have incompatible
2276         behaviours, in that the UString form sets the provided UChar* to a null or non-null value to
2277         indicate success or failure, but UStringImpl uses the returned PassRefPtr<UStringImpl> to
2278         indicate when allocation has failed (potentially leaving the output Char* uninitialized).
2279         This is also incompatible with WebCore::StringImpl's behaviour, in that
2280         StringImpl::createUninitialized() will CRASH() if unable to allocate.  Some uses of
2281         createUninitialized() in JSC are unsafe, since they do not test the result for null.
2282         UStringImpl's indication is preferable, since we may want a successful call to set the result
2283         buffer to 0 (specifically, StringImpl returns 0 for the buffer where createUninitialized()
2284         returns the empty string, which seems reasonable to catch bugs early).  UString's method
2285         cannot support UStringImpl's behaviour directly, since it returns an object rather than a
2286         pointer.
2287             - remove UString::createUninitialized(), replace with calls to UStringImpl::createUninitialized()
2288             - create a UStringImpl::tryCreateUninitialized() form UStringImpl::createUninitialized(),
2289               with current behaviour, make createUninitialized() crash on failure to allocate.
2290             - make cases in JSC that do not check the result call createUninitialized(), and cases that do
2291               check call tryCreateUninitialized().
2292
2293         Rename computedHash() to existingHash(), to bring this in line wih WebCore::StringImpl.
2294
2295         * API/JSClassRef.cpp:
2296         (OpaqueJSClassContextData::OpaqueJSClassContextData):
2297         * JavaScriptCore.exp:
2298         * runtime/ArrayPrototype.cpp:
2299         (JSC::arrayProtoFuncToString):
2300         * runtime/Identifier.cpp:
2301         (JSC::CStringTranslator::translate):
2302         (JSC::UCharBufferTranslator::translate):
2303         * runtime/JSString.cpp:
2304         (JSC::JSString::resolveRope):
2305         * runtime/Lookup.cpp:
2306         (JSC::HashTable::createTable):
2307         * runtime/Lookup.h:
2308         (JSC::HashTable::entry):
2309         * runtime/StringBuilder.h:
2310         (JSC::StringBuilder::release):
2311         * runtime/StringConstructor.cpp:
2312         (JSC::stringFromCharCodeSlowCase):
2313         * runtime/StringPrototype.cpp:
2314         (JSC::substituteBackreferencesSlow):
2315         (JSC::stringProtoFuncToLowerCase):
2316         (JSC::stringProtoFuncToUpperCase):
2317         (JSC::stringProtoFuncFontsize):
2318         (JSC::stringProtoFuncLink):
2319         * runtime/Structure.cpp:
2320         (JSC::Structure::despecifyDictionaryFunction):
2321         (JSC::Structure::get):
2322         (JSC::Structure::despecifyFunction):
2323         (JSC::Structure::put):
2324         (JSC::Structure::remove):
2325         (JSC::Structure::insertIntoPropertyMapHashTable):
2326         (JSC::Structure::checkConsistency):
2327         * runtime/Structure.h:
2328         (JSC::Structure::get):
2329         * runtime/StructureTransitionTable.h:
2330         (JSC::StructureTransitionTableHash::hash):
2331         * runtime/UString.cpp:
2332         (JSC::createRep):
2333         (JSC::UString::UString):
2334         (JSC::UString::spliceSubstringsWithSeparators):
2335         (JSC::UString::replaceRange):
2336         (JSC::UString::operator=):
2337         * runtime/UString.h:
2338         (JSC::UString::adopt):
2339         (JSC::IdentifierRepHash::hash):
2340         (JSC::makeString):
2341         * runtime/UStringImpl.h:
2342         (JSC::UStringImpl::adopt):
2343         (JSC::UStringImpl::create):
2344         (JSC::UStringImpl::createUninitialized):
2345         (JSC::UStringImpl::tryCreateUninitialized):
2346         (JSC::UStringImpl::existingHash):
2347
2348 2010-01-13  Kent Hansen  <kent.hansen@nokia.com>
2349
2350         Reviewed by Oliver Hunt.
2351
2352         JSON.stringify and JSON.parse needlessly process properties in the prototype chain
2353         https://bugs.webkit.org/show_bug.cgi?id=33053
2354
2355         * runtime/JSONObject.cpp:
2356         (JSC::Stringifier::Holder::appendNextProperty):
2357         (JSC::Walker::walk):
2358
2359 2010-01-13  Gavin Barraclough  <barraclough@apple.com>
2360
2361         Reviewed by NOBODY (buildfix).
2362
2363         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2364
2365 2010-01-13  Alexey Proskuryakov  <ap@apple.com>
2366
2367         Reviewed by Darin Adler.
2368
2369         https://bugs.webkit.org/show_bug.cgi?id=33641
2370         Assertion failure in Lexer.cpp if input stream ends while in string escape
2371
2372         Test: fast/js/end-in-string-escape.html
2373
2374         * parser/Lexer.cpp: (JSC::Lexer::lex): Bail out quickly on end of stream, not giving the
2375         assertion a chance to fire.
2376
2377 2010-01-13  Gavin Barraclough  <barraclough@apple.com>
2378
2379         Reviewed by NOBODY (buildfix).
2380
2381         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2382
2383 2010-01-13  Gavin Barraclough  <barraclough@apple.com>
2384
2385         Rubber stamped by Sam Weinig & Darin Adler.
2386
2387         Three quick fixes to UStringImpl.
2388             - The destroy() method can be switched back to a normal destructor; since we've switched
2389               the way we protect static strings to be using an odd ref-count the destroy() won't abort.
2390             - The cost() calculation logic was wrong.  If you have multiple JSStrings wrapping substrings
2391               of a base string, they would each report the full cost of the base string to the heap.
2392               Instead we should only be reporting once for the base string.
2393             - Remove the overloaded new operator calling fastMalloc, replace this with a 'using' to pick
2394               up the implementation from the parent class.
2395
2396         * JavaScriptCore.exp:
2397         * runtime/UStringImpl.cpp:
2398         (JSC::UStringImpl::~UStringImpl):
2399         * runtime/UStringImpl.h:
2400         (JSC::UStringImpl::cost):
2401         (JSC::UStringImpl::deref):
2402
2403 2010-01-13  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2404
2405         Reviewed by Simon Hausmann.
2406
2407         [Qt] Split the build process in two different .pro files.
2408         This allows qmake to be run once all source files are available.
2409
2410         * DerivedSources.pro: Added.
2411         * JavaScriptCore.pri: Moved source generation to DerivedSources.pro
2412         * pcre/pcre.pri: Moved source generation to DerivedSources.pro
2413
2414 2010-01-12  Kent Hansen  <kent.hansen@nokia.com>
2415
2416         Reviewed by Geoffrey Garen.
2417
2418         [ES5] Implement Object.getOwnPropertyNames
2419         https://bugs.webkit.org/show_bug.cgi?id=32242
2420
2421         Add an extra argument to getPropertyNames() and getOwnPropertyNames()
2422         (and all reimplementations thereof) that indicates whether non-enumerable
2423         properties should be added.
2424
2425         * API/JSCallbackObject.h:
2426         * API/JSCallbackObjectFunctions.h:
2427         (JSC::::getOwnPropertyNames):
2428         * JavaScriptCore.exp:
2429         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2430         * debugger/DebuggerActivation.cpp:
2431         (JSC::DebuggerActivation::getOwnPropertyNames):
2432         * debugger/DebuggerActivation.h:
2433         * runtime/Arguments.cpp:
2434         (JSC::Arguments::getOwnPropertyNames):
2435         * runtime/Arguments.h:
2436         * runtime/CommonIdentifiers.h:
2437         * runtime/JSArray.cpp:
2438         (JSC::JSArray::getOwnPropertyNames):
2439         * runtime/JSArray.h:
2440         * runtime/JSByteArray.cpp:
2441         (JSC::JSByteArray::getOwnPropertyNames):
2442         * runtime/JSByteArray.h:
2443         * runtime/JSFunction.cpp:
2444         (JSC::JSFunction::getOwnPropertyNames):
2445         * runtime/JSFunction.h:
2446         * runtime/JSNotAnObject.cpp:
2447         (JSC::JSNotAnObject::getOwnPropertyNames):
2448         * runtime/JSNotAnObject.h:
2449         * runtime/JSObject.cpp:
2450         (JSC::getClassPropertyNames):
2451         (JSC::JSObject::getPropertyNames):
2452         (JSC::JSObject::getOwnPropertyNames):
2453         * runtime/JSObject.h:
2454         * runtime/JSVariableObject.cpp:
2455         (JSC::JSVariableObject::getOwnPropertyNames):
2456         * runtime/JSVariableObject.h:
2457         * runtime/ObjectConstructor.cpp:
2458         (JSC::ObjectConstructor::ObjectConstructor):
2459         (JSC::objectConstructorGetOwnPropertyNames):
2460         * runtime/RegExpMatchesArray.h:
2461         (JSC::RegExpMatchesArray::getOwnPropertyNames):
2462         * runtime/StringObject.cpp:
2463         (JSC::StringObject::getOwnPropertyNames):
2464         * runtime/StringObject.h:
2465         * runtime/Structure.cpp: Rename getEnumerablePropertyNames() to getPropertyNames(), which takes an extra argument.
2466         (JSC::Structure::getPropertyNames):
2467         * runtime/Structure.h:
2468         (JSC::):
2469
2470 2010-01-12  Alexey Proskuryakov  <ap@apple.com>
2471
2472         Reviewed by Darin Adler.
2473
2474         https://bugs.webkit.org/show_bug.cgi?id=33540
2475         Make it possible to build in debug mode with assertions disabled
2476
2477         * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION):
2478         * runtime/Identifier.cpp: (JSC::Identifier::checkSameIdentifierTable):
2479         * wtf/FastMalloc.cpp:
2480         * wtf/HashTable.h: (WTF::HashTableConstIterator::checkValidity):
2481         * yarr/RegexCompiler.cpp: (JSC::Yarr::compileRegex):
2482
2483 2009-11-23  Yong Li  <yoli@rim.com>
2484
2485         Reviewed by Adam Treat.
2486
2487         Make GIF decoder support down-sampling
2488         https://bugs.webkit.org/show_bug.cgi?id=31806
2489
2490         * platform/image-decoders/ImageDecoder.cpp:
2491         (WebCore::ImageDecoder::upperBoundScaledY):
2492         (WebCore::ImageDecoder::lowerBoundScaledY):
2493         * platform/image-decoders/ImageDecoder.h:
2494         (WebCore::RGBA32Buffer::scaledRect):
2495         (WebCore::RGBA32Buffer::setScaledRect):
2496         (WebCore::ImageDecoder::scaledSize):
2497         * platform/image-decoders/gif/GIFImageDecoder.cpp:
2498         (WebCore::GIFImageDecoder::sizeNowAvailable):
2499         (WebCore::GIFImageDecoder::initFrameBuffer):
2500         (WebCore::copyOnePixel):
2501         (WebCore::GIFImageDecoder::haveDecodedRow):
2502         (WebCore::GIFImageDecoder::frameComplete):
2503
2504 2010-01-12  Adam Barth  <abarth@webkit.org>
2505
2506         Reviewed by Eric Seidel.
2507
2508         ecma/Date/15.9.5.12-1.js fails every night at midnight
2509         https://bugs.webkit.org/show_bug.cgi?id=28041
2510
2511         Change the test to use a concrete time instead of "now".
2512
2513         * tests/mozilla/ecma/Date/15.9.5.10-1.js:
2514         * tests/mozilla/ecma/Date/15.9.5.12-1.js:
2515
2516 2010-01-11  Csaba Osztrogonác  <ossy@webkit.org>
2517
2518         Reviewed by Ariya Hidayat.
2519
2520         [Qt] Enable JIT and YARR_JIT if (CPU(X86_64) && OS(LINUX) && GCC_VERSION >= 40100)
2521
2522         * wtf/Platform.h:
2523
2524 2010-01-11  Geoffrey Garen  <ggaren@apple.com>
2525
2526         Reviewed by Alexey Proskuryakov.
2527
2528         https://bugs.webkit.org/show_bug.cgi?id=33481
2529         Uninitialized data members in ArrayStorage
2530         
2531         SunSpider reports no change.
2532
2533         * runtime/JSArray.cpp:
2534         (JSC::JSArray::JSArray): Initialize missing data members in the two cases
2535         where we don't use fastZeroedMalloc, so it doesn't happen automatically.
2536
2537 2010-01-11  Steve Falkenburg  <sfalken@apple.com>
2538
2539         Reviewed by Sam Weinig.
2540
2541         https://bugs.webkit.org/show_bug.cgi?id=33480
2542         
2543         Improve debugging reliability for WTF on Windows.
2544         Store WTF static library's PDB file into a better location.
2545
2546         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2547
2548 2010-01-11  Steve Falkenburg  <sfalken@apple.com>
2549
2550         Windows build fix.
2551         Remove extraneous entries from def file causing build warning.
2552
2553         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2554
2555 2010-01-10  Kent Hansen  <kent.hansen@nokia.com>
2556
2557         Reviewed by Darin Adler.
2558
2559         RegExp.prototype.toString returns "//" for empty regular expressions
2560         https://bugs.webkit.org/show_bug.cgi?id=33319
2561
2562         "//" starts a single-line comment, hence "/(?:)/" should be used, according to ECMA.
2563
2564         * runtime/RegExpPrototype.cpp:
2565         (JSC::regExpProtoFuncToString):
2566
2567         * tests/mozilla/ecma_2/RegExp/properties-001.js:
2568         (AddRegExpCases):
2569         * tests/mozilla/js1_2/regexp/toString.js:
2570         Update relevant Mozilla tests (Mozilla has had this behavior since November 2003).
2571
2572 2010-01-10  Darin Adler  <darin@apple.com>
2573
2574         * tests/mozilla/ecma/Array/15.4.1.1.js: Added property allow-tabs.
2575         * tests/mozilla/ecma/Array/15.4.1.2.js: Added property allow-tabs.
2576         * tests/mozilla/ecma/Array/15.4.2.1-1.js: Added property allow-tabs.
2577         * tests/mozilla/ecma/Array/15.4.2.2-1.js: Added property allow-tabs.
2578         * tests/mozilla/ecma/Array/15.4.2.2-2.js: Added property allow-tabs.
2579         * tests/mozilla/ecma/Array/15.4.2.3.js: Added property allow-tabs.
2580         * tests/mozilla/ecma/Array/15.4.3.2.js: Added property allow-tabs.
2581         * tests/mozilla/ecma/Array/15.4.3.js: Added property allow-tabs.
2582         * tests/mozilla/ecma/Array/15.4.4.1.js: Added property allow-tabs.
2583         * tests/mozilla/ecma/Array/15.4.4.js: Added property allow-tabs.
2584         * tests/mozilla/ecma/LexicalConventions/7.7.4.js: Added property allow-tabs.
2585         * tests/mozilla/ecma/Math/15.8.2.13.js: Added property allow-tabs.
2586         * tests/mozilla/ecma/Math/15.8.2.16.js: Added property allow-tabs.
2587         * tests/mozilla/ecma/Math/15.8.2.18.js: Added property allow-tabs.
2588         * tests/mozilla/ecma/Math/15.8.2.2.js: Added property allow-tabs.
2589         * tests/mozilla/ecma/Math/15.8.2.4.js: Added property allow-tabs.
2590         * tests/mozilla/ecma/Math/15.8.2.5.js: Added property allow-tabs.
2591         * tests/mozilla/ecma/Math/15.8.2.7.js: Added property allow-tabs.
2592         * tests/mozilla/ecma/String/15.5.1.js: Added property allow-tabs.
2593         * tests/mozilla/ecma/String/15.5.2.js: Added property allow-tabs.
2594         * tests/mozilla/ecma/String/15.5.3.1-3.js: Added property allow-tabs.
2595         * tests/mozilla/ecma/String/15.5.3.1-4.js: Added property allow-tabs.
2596         * tests/mozilla/ecma/String/15.5.3.js: Added property allow-tabs.
2597         * tests/mozilla/ecma/TypeConversion/9.5-2.js: Added property allow-tabs.
2598         * tests/mozilla/ecma/jsref.js: Modified property allow-tabs.
2599         * tests/mozilla/ecma/shell.js: Modified property allow-tabs.
2600         * tests/mozilla/ecma_2/LexicalConventions/keywords-001.js: Added property allow-tabs.
2601         * tests/mozilla/ecma_2/RegExp/exec-001.js: Added property allow-tabs.
2602         * tests/mozilla/ecma_2/String/match-004.js: Added property allow-tabs.
2603         * tests/mozilla/ecma_2/String/replace-001.js: Added property allow-tabs.
2604         * tests/mozilla/ecma_2/String/split-002.js: Added property allow-tabs.
2605         * tests/mozilla/ecma_2/jsref.js: Modified property allow-tabs.
2606         * tests/mozilla/ecma_2/shell.js: Added property allow-tabs.
2607         * tests/mozilla/ecma_3/Date/shell.js: Modified property allow-tabs.
2608         * tests/mozilla/ecma_3/Exceptions/regress-181654.js: Added property allow-tabs.
2609         * tests/mozilla/ecma_3/RegExp/regress-209067.js: Added property allow-tabs.
2610         * tests/mozilla/ecma_3/RegExp/regress-85721.js: Added property allow-tabs.
2611         * tests/mozilla/importList.html: Added property allow-tabs.
2612         * tests/mozilla/js1_1/shell.js: Added property allow-tabs.
2613         * tests/mozilla/js1_2/Array/general1.js: Added property allow-tabs.
2614         * tests/mozilla/js1_2/Array/general2.js: Added property allow-tabs.
2615         * tests/mozilla/js1_2/Array/slice.js: Added property allow-tabs.
2616         * tests/mozilla/js1_2/Array/splice1.js: Added property allow-tabs.
2617         * tests/mozilla/js1_2/Array/splice2.js: Added property allow-tabs.
2618         * tests/mozilla/js1_2/Objects/toString-001.js: Added property allow-tabs.
2619         * tests/mozilla/js1_2/String/charCodeAt.js: Added property allow-tabs.
2620         * tests/mozilla/js1_2/String/concat.js: Modified property allow-tabs.
2621         * tests/mozilla/js1_2/String/match.js: Added property allow-tabs.
2622         * tests/mozilla/js1_2/String/slice.js: Added property allow-tabs.
2623         * tests/mozilla/js1_2/function/Function_object.js: Added property allow-tabs.
2624         * tests/mozilla/js1_2/function/Number.js: Modified property allow-tabs.
2625         * tests/mozilla/js1_2/function/String.js: Modified property allow-tabs.
2626         * tests/mozilla/js1_2/function/nesting.js: Added property allow-tabs.
2627         * tests/mozilla/js1_2/function/regexparg-1.js: Added property allow-tabs.
2628         * tests/mozilla/js1_2/function/regexparg-2-n.js: Added property allow-tabs.
2629         * tests/mozilla/js1_2/jsref.js: Added property allow-tabs.
2630         * tests/mozilla/js1_2/operator/equality.js: Added property allow-tabs.
2631         * tests/mozilla/js1_2/operator/strictEquality.js: Added property allow-tabs.
2632         * tests/mozilla/js1_2/regexp/RegExp_dollar_number.js: Added property allow-tabs.
2633         * tests/mozilla/js1_2/regexp/RegExp_input.js: Added property allow-tabs.
2634         * tests/mozilla/js1_2/regexp/RegExp_input_as_array.js: Added property allow-tabs.
2635         * tests/mozilla/js1_2/regexp/RegExp_lastIndex.js: Added property allow-tabs.
2636         * tests/mozilla/js1_2/regexp/RegExp_lastMatch.js: Added property allow-tabs.
2637         * tests/mozilla/js1_2/regexp/RegExp_lastMatch_as_array.js: Added property allow-tabs.
2638         * tests/mozilla/js1_2/regexp/RegExp_lastParen.js: Added property allow-tabs.
2639         * tests/mozilla/js1_2/regexp/RegExp_lastParen_as_array.js: Added property allow-tabs.
2640         * tests/mozilla/js1_2/regexp/RegExp_leftContext.js: Added property allow-tabs.
2641         * tests/mozilla/js1_2/regexp/RegExp_leftContext_as_array.js: Added property allow-tabs.
2642         * tests/mozilla/js1_2/regexp/RegExp_multiline.js: Added property allow-tabs.
2643         * tests/mozilla/js1_2/regexp/RegExp_multiline_as_array.js: Added property allow-tabs.
2644         * tests/mozilla/js1_2/regexp/RegExp_object.js: Added property allow-tabs.
2645         * tests/mozilla/js1_2/regexp/RegExp_rightContext.js: Added property allow-tabs.
2646         * tests/mozilla/js1_2/regexp/RegExp_rightContext_as_array.js: Added property allow-tabs.
2647         * tests/mozilla/js1_2/regexp/alphanumeric.js: Added property allow-tabs.
2648         * tests/mozilla/js1_2/regexp/asterisk.js: Added property allow-tabs.
2649         * tests/mozilla/js1_2/regexp/backslash.js: Added property allow-tabs.
2650         * tests/mozilla/js1_2/regexp/backspace.js: Added property allow-tabs.
2651         * tests/mozilla/js1_2/regexp/beginLine.js: Added property allow-tabs.
2652         * tests/mozilla/js1_2/regexp/character_class.js: Added property allow-tabs.
2653         * tests/mozilla/js1_2/regexp/compile.js: Added property allow-tabs.
2654         * tests/mozilla/js1_2/regexp/control_characters.js: Added property allow-tabs.
2655         * tests/mozilla/js1_2/regexp/digit.js: Added property allow-tabs.
2656         * tests/mozilla/js1_2/regexp/dot.js: Added property allow-tabs.
2657         * tests/mozilla/js1_2/regexp/endLine.js: Added property allow-tabs.
2658         * tests/mozilla/js1_2/regexp/everything.js: Added property allow-tabs.
2659         * tests/mozilla/js1_2/regexp/exec.js: Added property allow-tabs.
2660         * tests/mozilla/js1_2/regexp/flags.js: Added property allow-tabs.
2661         * tests/mozilla/js1_2/regexp/global.js: Added property allow-tabs.
2662         * tests/mozilla/js1_2/regexp/hexadecimal.js: Added property allow-tabs.
2663         * tests/mozilla/js1_2/regexp/ignoreCase.js: Added property allow-tabs.
2664         * tests/mozilla/js1_2/regexp/interval.js: Added property allow-tabs.
2665         * tests/mozilla/js1_2/regexp/octal.js: Added property allow-tabs.
2666         * tests/mozilla/js1_2/regexp/parentheses.js: Added property allow-tabs.
2667         * tests/mozilla/js1_2/regexp/plus.js: Added property allow-tabs.
2668         * tests/mozilla/js1_2/regexp/question_mark.js: Added property allow-tabs.
2669         * tests/mozilla/js1_2/regexp/simple_form.js: Added property allow-tabs.
2670         * tests/mozilla/js1_2/regexp/source.js: Added property allow-tabs.
2671         * tests/mozilla/js1_2/regexp/special_characters.js: Added property allow-tabs.
2672         * tests/mozilla/js1_2/regexp/string_replace.js: Added property allow-tabs.
2673         * tests/mozilla/js1_2/regexp/string_search.js: Added property allow-tabs.
2674         * tests/mozilla/js1_2/regexp/string_split.js: Added property allow-tabs.
2675         * tests/mozilla/js1_2/regexp/test.js: Added property allow-tabs.
2676         * tests/mozilla/js1_2/regexp/toString.js: Added property allow-tabs.
2677         * tests/mozilla/js1_2/regexp/vertical_bar.js: Added property allow-tabs.
2678         * tests/mozilla/js1_2/regexp/whitespace.js: Added property allow-tabs.
2679         * tests/mozilla/js1_2/regexp/word_boundary.js: Added property allow-tabs.
2680         * tests/mozilla/js1_2/shell.js: Added property allow-tabs.
2681         * tests/mozilla/js1_2/statements/break.js: Added property allow-tabs.
2682         * tests/mozilla/js1_2/statements/continue.js: Added property allow-tabs.
2683         * tests/mozilla/js1_2/statements/do_while.js: Added property allow-tabs.
2684         * tests/mozilla/js1_2/statements/switch.js: Added property allow-tabs.
2685         * tests/mozilla/js1_2/statements/switch2.js: Added property allow-tabs.
2686         * tests/mozilla/js1_3/shell.js: Added property allow-tabs.
2687         * tests/mozilla/js1_4/shell.js: Added property allow-tabs.
2688         * tests/mozilla/js1_5/Regress/regress-111557.js: Added property allow-tabs.
2689         * tests/mozilla/js1_5/Regress/regress-216320.js: Added property allow-tabs.
2690         * tests/mozilla/menuhead.html: Added property allow-tabs.
2691         * tests/mozilla/mklistpage.pl: Added property allow-tabs.
2692         * tests/mozilla/runtests.pl: Added property allow-tabs.
2693
2694 2010-01-08  Daniel Bates  <dbates@webkit.org>
2695
2696         Reviewed by Adam Barth.
2697
2698         https://bugs.webkit.org/show_bug.cgi?id=33417
2699
2700         Cleans up style errors exposed by the patch for bug #33198.
2701         Moreover, fixes all "Weird number of spaces at line-start. Are you using a 4-space indent?"
2702         errors reported by check-webkit-style.
2703
2704         No functionality was changed. So, no new tests.
2705
2706         * wtf/Platform.h:
2707
2708 2010-01-08  Kent Hansen  <kent.hansen@nokia.com>
2709
2710         Reviewed by Eric Seidel.
2711
2712         Don't store RegExp flags string representation
2713         https://bugs.webkit.org/show_bug.cgi?id=33321
2714
2715         It's unused; the string representation is reconstructed from flags.
2716
2717         * runtime/RegExp.cpp:
2718         (JSC::RegExp::RegExp):
2719         * runtime/RegExp.h:
2720
2721 2010-01-08  Geoffrey Garen  <ggaren@apple.com>
2722
2723         Reviewed by Oliver Hunt.
2724
2725         Memory use grows grows possibly unbounded in this JavaScript Array test case
2726         https://bugs.webkit.org/show_bug.cgi?id=31675
2727
2728         This fixes one observed bug in this test case, which is that
2729         arrays don't report extra cost for the sparse value maps.
2730
2731         SunSpider reports a small speedup.
2732
2733         * runtime/JSArray.cpp:
2734         (JSC::JSArray::putSlowCase): Report extra memory cost for
2735         the sparse value map.
2736         * runtime/JSArray.h: 
2737
2738 2010-01-08  Yong Li  <yoli@rim.com>
2739
2740         Reviewed by Darin Adler.
2741
2742         Remove unnecessary #include from FastMalloc.cpp
2743         https://bugs.webkit.org/show_bug.cgi?id=33393
2744
2745         * wtf/FastMalloc.cpp:
2746
2747 2010-01-08  Eric Seidel  <eric@webkit.org>
2748
2749         No review, rolling out r52983.
2750         http://trac.webkit.org/changeset/52983
2751         https://bugs.webkit.org/show_bug.cgi?id=33321
2752
2753         Broke 59 JavaScriptCore tests.  I don't think Kent knew about
2754         run-javascriptcore-tests.  Sadly neither does the commit-bot,
2755         yet.
2756
2757         * runtime/RegExp.cpp:
2758         (JSC::RegExp::RegExp):
2759         * runtime/RegExp.h:
2760         (JSC::RegExp::flags):
2761
2762 2010-01-08  Eric Seidel  <eric@webkit.org>
2763
2764         No review, rolling out r52981.
2765         http://trac.webkit.org/changeset/52981
2766         https://bugs.webkit.org/show_bug.cgi?id=33319
2767
2768         Caused two JS tests to start failing:
2769         ecma_2/RegExp/properties-001.js and js1_2/regexp/toString.js
2770
2771         * runtime/RegExpPrototype.cpp:
2772         (JSC::regExpProtoFuncToString):
2773
2774 2010-01-08  Kent Hansen  <kent.hansen@nokia.com>
2775
2776         Reviewed by Darin Adler.
2777
2778         Don't store RegExp flags string representation
2779         https://bugs.webkit.org/show_bug.cgi?id=33321
2780
2781         It's unused; the string representation is reconstructed from flags.
2782
2783         * runtime/RegExp.cpp:
2784         (JSC::RegExp::RegExp):
2785         * runtime/RegExp.h:
2786
2787 2010-01-08  Kent Hansen  <kent.hansen@nokia.com>
2788
2789         Reviewed by Darin Adler.
2790
2791         RegExp.prototype.toString returns "//" for empty regular expressions
2792         https://bugs.webkit.org/show_bug.cgi?id=33319
2793
2794         "//" starts a single-line comment, hence "/(?:)/" should be used, according to ECMA.
2795
2796         * runtime/RegExpPrototype.cpp:
2797         (JSC::regExpProtoFuncToString):
2798
2799 2010-01-08  Norbert Leser  <norbert.leser@nokia.com>
2800
2801         Reviewed by Darin Adler.
2802
2803         RVCT compiler with "-Otime -O3" optimization tries to optimize out 
2804         inline new'ed pointers that are passed as arguments.
2805         Proposed patch assigns new'ed pointer explicitly outside function call.
2806
2807         https://bugs.webkit.org/show_bug.cgi?id=33084
2808
2809         * API/JSClassRef.cpp:
2810         (OpaqueJSClass::OpaqueJSClass):
2811         (OpaqueJSClassContextData::OpaqueJSClassContextData):
2812
2813 2010-01-08  Gabor Loki  <loki@webkit.org>
2814
2815         Reviewed by Gavin Barraclough.
2816
2817         Remove an unnecessary cacheFlush from ARM_TRADITIONAL JIT
2818         https://bugs.webkit.org/show_bug.cgi?id=33203
2819
2820         * assembler/ARMAssembler.cpp: Remove obsolete linkBranch function.
2821         (JSC::ARMAssembler::executableCopy): Inline a clean linkBranch code.
2822         * assembler/ARMAssembler.h:
2823         (JSC::ARMAssembler::getLdrImmAddress): Use inline function.
2824         (JSC::ARMAssembler::getLdrImmAddressOnPool): Ditto.
2825         (JSC::ARMAssembler::patchPointerInternal): Remove an unnecessary cacheFlush.
2826         (JSC::ARMAssembler::linkJump): Use patchPointerInternal instead of linkBranch.
2827         (JSC::ARMAssembler::linkCall): Ditto.
2828         (JSC::ARMAssembler::relinkCall): Ditto.
2829
2830 2010-01-07  Gabor Loki  <loki@webkit.org>
2831
2832         Reviewed by Gavin Barraclough.
2833
2834         Build fix for JSVALUE32 when ENABLE_JIT_OPTIMIZE* are disabled
2835         https://bugs.webkit.org/show_bug.cgi?id=33311
2836
2837         Move compileGetDirectOffset function to common part of JSVALUE32
2838
2839         * jit/JITPropertyAccess.cpp:
2840         (JSC::JIT::compileGetDirectOffset):
2841
2842 2010-01-07  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2843
2844         Reviewed by Maciej Stachowiak.
2845
2846         Allow call sites to determine if ASSERT_* and LOG_* macros are operational
2847         https://bugs.webkit.org/show_bug.cgi?id=33020
2848
2849         * wtf/Assertions.h: Set ASSERT_MSG_DISABLED, FATAL_DISABLED,
2850         ERROR_DISABLED, LOG_DISABLED to 1 if the compiler does not support
2851         variadic macros. Refactor for better readibility.
2852
2853 2010-01-07  Daniel Bates  <dbates@rim.com>
2854
2855         Reviewed by Eric Seidel.
2856
2857         https://bugs.webkit.org/show_bug.cgi?id=32987
2858
2859         Added ENABLE_XHTMLMP flag. Disabled by default.
2860
2861         * Configurations/FeatureDefines.xcconfig:
2862
2863 2010-01-07  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2864
2865         Reviewed by Gavin Barraclough.
2866
2867         [Symbian] Port ARM traditional JIT Trampolines to RVCT
2868         https://bugs.webkit.org/show_bug.cgi?id=30552
2869
2870         Take the GCC implementation and mechanically convert
2871         it to RVCT syntax.
2872
2873         Use 'bx rX' instead of 'mov pc, rX' when it is available.
2874
2875         Developed in cooperation with Iain Campbell and Gabor Loki.
2876
2877         * JavaScriptCore.pri: Extra step to generate RVCT stubs. The 
2878         script generation intentionally executed all the time not just
2879         for RVCT targets.
2880
2881         * create_rvct_stubs: Added. Perl script to expand precompiler macros
2882         for RVCT assembler - the template is defined in JITStubs.cpp.
2883
2884         * jit/JITStubs.cpp:
2885         (JSC::ctiTrampoline):
2886         (JSC::ctiVMThrowTrampoline):
2887         (JSC::ctiOpThrowNotCaught):
2888
2889 2010-01-07  Geoffrey Garen  <ggaren@apple.com>
2890
2891         Reviewed by Sam Weinig.
2892
2893         Fix a crash seen on the buildbots.
2894
2895         * runtime/JSGlobalObject.cpp:
2896         (JSC::JSGlobalObject::init): Disable specific function tracking here,
2897         instead of in WebCore, to ensure that the disabling happens before a
2898         specific function can be registered.
2899
2900 2010-01-07  Alexey Proskuryakov  <ap@apple.com>
2901
2902         Mac build fix.
2903
2904         * JavaScriptCore.exp: Export new JSGlobalData static data members.
2905
2906 2010-01-07  Alexey Proskuryakov  <ap@apple.com>
2907
2908         Reviewed by Geoffrey Garen.
2909
2910         https://bugs.webkit.org/show_bug.cgi?id=33057
2911         REGRESSION(r49365): typeof(xhr.responseText) != "string" in Windows
2912
2913         <rdar://problem/7296920> REGRESSION: WebKit fails to start PeaceKeeper benchmark
2914
2915         Test: fast/js/webcore-string-comparison.html
2916
2917         In r49365, some code was moved from JSString.cpp to JSString.h, and as a result, WebCore
2918         got a way to directly instantiate JSStrings over DLL borders. Since vftable for JSString was
2919         not exported, objects created from WebCore got a different vptr, and JavaScriptCore
2920         optimizations that relied on vptr of all JSString objects being equal failed.
2921
2922         * config.h: Added a JS_EXPORTCLASS macro for exporting classes. It's currently the same as
2923         JS_EXPORTDATA, but it clearly needed a new name.
2924
2925         * runtime/InitializeThreading.cpp:
2926         (JSC::initializeThreadingOnce):
2927         * runtime/JSGlobalData.cpp:
2928         (JSC::JSGlobalData::storeVPtrs):
2929         (JSC::JSGlobalData::JSGlobalData):
2930         (JSC::JSGlobalData::createNonDefault):
2931         (JSC::JSGlobalData::create):
2932         (JSC::JSGlobalData::sharedInstance):
2933         * runtime/JSGlobalData.h:
2934         Store vptrs just once, no need to repeatedly pick and copy them. This makes it possible to
2935         assert vptr correctness in object destructors (which don't have access to JSGlobalData,
2936         and even Heap::heap(this) will fail for fake objects created from storeVPtrs()).
2937
2938         * runtime/JSArray.cpp: (JSC::JSArray::~JSArray): Assert that vptr is what we expect it to be.
2939         It's important to assert in destructor, because MSVC changes the vptr after constructor
2940         is invoked.
2941         * runtime/JSByteArray.cpp: (JSC::JSByteArray::~JSByteArray): Ditto.
2942         * runtime/JSByteArray.h: Ditto.
2943         * runtime/JSFunction.h: Ditto.
2944         * runtime/JSFunction.cpp: (JSC::JSFunction::~JSFunction): Ditto.
2945
2946         * runtime/JSCell.h: (JSC::JSCell::setVPtr): Added a method to substitute vptr for another
2947         one.
2948
2949         * runtime/JSString.h: Export JSString class together with its vftable, and tell other
2950         libraries tp import it. This is needed on platforms that have a separate JavaScriptCore
2951         dynamic library - and on Mac, we already did the export via JavaScriptCore.exp.
2952         (JSC::JSString::~JSString): Assert tha vptr is what we expect it to be.
2953         (JSC::fixupVPtr): Store a previously saved primary vftable pointer (do nothing if building
2954         JavaScriptCore itself).
2955         (JSC::jsSingleCharacterString): Call fixupVPtr in case this is call across DLL boundary.
2956         (JSC::jsSingleCharacterSubstring): Ditto.
2957         (JSC::jsNontrivialString): Ditto.
2958         (JSC::jsString): Ditto.
2959         (JSC::jsSubstring): Ditto.
2960         (JSC::jsOwnedString): Ditto.
2961
2962         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export the new static
2963         JSGlobalData members that are used in WebCore via inline functions.
2964
2965 2010-01-07  Geoffrey Garen  <ggaren@apple.com>
2966
2967         Reviewed by Sam Weinig.
2968
2969         Safari memory usage skyrockets using new Google AdWords interface
2970         https://bugs.webkit.org/show_bug.cgi?id=33343
2971
2972         The memory use was caused by the global object creating too many structures
2973         as it thrashed between different specific functions.
2974
2975         * runtime/Structure.cpp:
2976         (JSC::Structure::Structure):
2977         (JSC::Structure::addPropertyTransition):
2978         (JSC::Structure::changePrototypeTransition):
2979         (JSC::Structure::despecifyFunctionTransition):
2980         (JSC::Structure::addAnonymousSlotsTransition):
2981         (JSC::Structure::getterSetterTransition):
2982         (JSC::Structure::toDictionaryTransition):
2983         (JSC::Structure::addPropertyWithoutTransition):
2984         (JSC::Structure::despecifyAllFunctions):
2985         * runtime/Structure.h:
2986         (JSC::Structure::disableSpecificFunctionTracking): Track a thrash count
2987         for specific functions. Disable specific function tracking once the
2988         thrash count has been hit.
2989
2990 2010-01-07  Csaba Osztrogonác  <ossy@webkit.org>
2991
2992         Reviewed by Simon Hausmann.
2993
2994         [Qt] Enable JIT in debug mode on win32 after r51141 fixed the crashes.
2995
2996         * JavaScriptCore.pri:
2997
2998 2010-01-07  Zoltan Horvath  <zoltan@webkit.org>
2999
3000         Reviewed by Holger Freyther.
3001
3002         [Mac] Build fix when FAST_MALLOC_MATCH_VALIDATION=1
3003         https://bugs.webkit.org/show_bug.cgi?id=33312
3004
3005         Using of operator += cause compile error on Mac, so it is changed to
3006         "= static_cast<AllocAlignmentInteger*>(old_ptr) + 1".
3007
3008         * wtf/FastMalloc.cpp:
3009         (WTF::TCMallocStats::realloc):
3010
3011 2010-01-07  Zoltan Horvath  <zoltan@webkit.org>
3012
3013         Reviewed by Holger Freyther.
3014
3015         [Qt] Build fix when FAST_MALLOC_MATCH_VALIDATION=1
3016         https://bugs.webkit.org/show_bug.cgi?id=33312
3017
3018         Remove pByte (committed in r42344 from #20422), because pByte doesn't
3019         exist and it is unnecessary.
3020
3021         * wtf/FastMalloc.cpp:
3022         (WTF::TCMallocStats::realloc):
3023
3024 2010-01-06  Gavin Barraclough  <barraclough@apple.com>
3025
3026         QT build fix.
3027
3028         * runtime/Identifier.cpp:
3029         (JSC::createIdentifierTableSpecific):
3030
3031 2010-01-06  Gavin Barraclough  <barraclough@apple.com>
3032
3033         Windows build fix part I.
3034
3035         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3036
3037 2010-01-06  Dan Bernstein  <mitz@apple.com>
3038
3039         Build fix
3040
3041         * runtime/Identifier.cpp:
3042         (JSC::createIdentifierTableSpecificCallback):
3043
3044 2010-01-05  Gavin Barraclough  <barraclough@apple.com>
3045
3046         Reviewed by Sam Weinig.
3047
3048         https://bugs.webkit.org/show_bug.cgi?id=33236
3049         Remove m_identifierTable pointer from UString
3050
3051         Currently every string holds a pointer so that during destruction,
3052         if a string has been used as an identifier, it can remove itself
3053         from the table.  By instead accessing the identifierTable via a
3054         thread specific tracking the table associated with the current
3055         globaldata, we can save the memory cost of this pointer.
3056
3057         * API/APIShims.h:
3058         (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
3059         (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
3060         (JSC::APICallbackShim::APICallbackShim):
3061         (JSC::APICallbackShim::~APICallbackShim):
3062
3063             - change the API shims to track the identifierTable of the current JSGlobalData.
3064
3065         * API/JSContextRef.cpp:
3066         (JSContextGroupCreate):
3067
3068             - update creation of JSGlobalData for API usage to use new create method.
3069             - fix shim instanciation bug in JSGlobalContextCreateInGroup.
3070
3071         * JavaScriptCore.exp:
3072         * runtime/Completion.cpp:
3073         (JSC::checkSyntax):
3074         (JSC::evaluate):
3075
3076             - add asserts to check the identifierTable is being tracked correctly.
3077
3078         * runtime/Identifier.cpp:
3079         (JSC::IdentifierTable::~IdentifierTable):
3080         (JSC::IdentifierTable::add):
3081         (JSC::Identifier::remove):
3082         (JSC::Identifier::checkSameIdentifierTable):
3083         (JSC::createIdentifierTableSpecificCallback):
3084         (JSC::createIdentifierTableSpecific):
3085         (JSC::createDefaultDataSpecific):
3086
3087             - Use currentIdentifierTable() instead of UStringImpl::m_identifierTable.
3088             - Define methods to access the thread specific identifier tables.
3089
3090         * runtime/Identifier.h:
3091         (JSC::ThreadIdentifierTableData::ThreadIdentifierTableData):
3092         (JSC::defaultIdentifierTable):
3093         (JSC::setDefaultIdentifierTable):
3094         (JSC::currentIdentifierTable):
3095         (JSC::setCurrentIdentifierTable):
3096         (JSC::resetCurrentIdentifierTable):
3097
3098             - Declare methods to access the thread specific identifier tables.
3099
3100         * runtime/JSGlobalData.cpp:
3101         (JSC::JSGlobalData::createNonDefault):
3102         (JSC::JSGlobalData::create):
3103         (JSC::JSGlobalData::sharedInstance):
3104
3105             - creation of JSGlobalData objects, other than for API usage, associate themselves with the current thread.
3106
3107         * runtime/JSGlobalData.h:
3108         * runtime/UStringImpl.cpp:
3109         (JSC::UStringImpl::destroy):
3110
3111             - destroy() method should be using isIdentifier().
3112
3113         * runtime/UStringImpl.h:
3114         (JSC::UStringImpl::isIdentifier):
3115         (JSC::UStringImpl::setIsIdentifier):
3116         (JSC::UStringImpl::checkConsistency):
3117         (JSC::UStringImpl::UStringImpl):
3118
3119             - replace m_identifierTable with a single m_isIdentifier bit.
3120
3121         * wtf/StringHashFunctions.h:
3122         (WTF::stringHash):
3123
3124             - change string hash result from 32-bit to 31-bit, to free a bit in UStringImpl for m_isIdentifier.
3125
3126 2009-12-25 Patrick Gansterer <paroga@paroga.com>
3127  
3128         Reviewed by Eric Seidel.
3129
3130         Buildfix for WinCE + style fixes.
3131         https://bugs.webkit.org/show_bug.cgi?id=32939
3132
3133         * jsc.cpp:
3134         (functionPrint):
3135         (functionQuit):
3136         (parseArguments):
3137         (fillBufferWithContentsOfFile):
3138  
3139 2010-01-05  Patrick Gansterer  <paroga@paroga.com>
3140
3141         Reviewed by Eric Seidel.
3142
3143         WinCE buildfix after r52791 (renamed PLATFORM(WINCE) to OS(WINCE)).
3144         https://bugs.webkit.org/show_bug.cgi?id=33205
3145
3146         * jit/ExecutableAllocator.h:
3147
3148 2010-01-05  Patrick Gansterer  <paroga@paroga.com>
3149
3150         Reviewed by Darin Adler.
3151
3152         Added compiler error for unsupported platforms.
3153         https://bugs.webkit.org/show_bug.cgi?id=33112
3154
3155         * jit/JITStubs.cpp:
3156
3157 2010-01-05  Gabor Loki  <loki@webkit.org>
3158
3159         Reviewed by Maciej Stachowiak.
3160
3161         Follow r52729 in ARMAssembler.
3162         https://bugs.webkit.org/show_bug.cgi?id=33208
3163
3164         Use WTF_ARM_ARCH_AT_LEAST instead of ARM_ARCH_VERSION
3165
3166         * assembler/ARMAssembler.cpp:
3167         (JSC::ARMAssembler::encodeComplexImm): Move tmp declaration to ARMv7
3168         * assembler/ARMAssembler.h:
3169         (JSC::ARMAssembler::):
3170         (JSC::ARMAssembler::bkpt):
3171
3172 2010-01-05  Maciej Stachowiak  <mjs@apple.com>
3173
3174         Unreviewed build fix for Gtk+
3175
3176         Don't use // comments in Platform.h, at least some of them seem to make the version of GCC
3177         used on the Gtk buildbot unhappy.
3178
3179         * wtf/Platform.h:
3180
3181 2010-01-04  Maciej Stachowiak  <mjs@apple.com>
3182
3183         Reviewed by Darin Fisher.
3184
3185         Reorganize, document and rename OS() platform macros.
3186         https://bugs.webkit.org/show_bug.cgi?id=33198
3187
3188         * wtf/Platform.h: Rename, reorganize and document OS() macros.
3189
3190         Adapt to name changes. Also fixed a few incorrect OS checks.
3191
3192         * API/JSContextRef.cpp:
3193         * assembler/MacroAssemblerARM.cpp:
3194         (JSC::isVFPPresent):
3195         * assembler/MacroAssemblerX86Common.h:
3196         * bytecode/SamplingTool.cpp:
3197         * config.h:
3198         * interpreter/RegisterFile.cpp:
3199         (JSC::RegisterFile::~RegisterFile):
3200         * interpreter/RegisterFile.h:
3201         (JSC::RegisterFile::RegisterFile):
3202         (JSC::RegisterFile::grow):
3203         * jit/ExecutableAllocator.h:
3204         * jit/ExecutableAllocatorFixedVMPool.cpp:
3205         * jit/ExecutableAllocatorPosix.cpp:
3206         * jit/ExecutableAllocatorSymbian.cpp:
3207         * jit/ExecutableAllocatorWin.cpp:
3208         * jit/JITOpcodes.cpp:
3209         (JSC::JIT::privateCompileCTIMachineTrampolines):
3210         * jit/JITStubs.cpp:
3211         * jsc.cpp:
3212         (main):
3213         * parser/Grammar.y:
3214         * profiler/ProfileNode.cpp:
3215         (JSC::getCount):
3216         * runtime/Collector.cpp:
3217         (JSC::Heap::Heap):
3218         (JSC::Heap::allocateBlock):
3219         (JSC::Heap::freeBlockPtr):
3220         (JSC::currentThreadStackBase):
3221         (JSC::getCurrentPlatformThread):
3222         (JSC::suspendThread):
3223         (JSC::resumeThread):
3224         (JSC::getPlatformThreadRegisters):
3225         (JSC::otherThreadStackPointer):
3226         * runtime/Collector.h:
3227         * runtime/DateConstructor.cpp:
3228         * runtime/DatePrototype.cpp:
3229         (JSC::formatLocaleDate):
3230         * runtime/InitializeThreading.cpp:
3231         (JSC::initializeThreading):
3232         * runtime/MarkStack.h:
3233         (JSC::MarkStack::MarkStackArray::shrinkAllocation):
3234         * runtime/MarkStackPosix.cpp:
3235         * runtime/MarkStackSymbian.cpp:
3236         * runtime/MarkStackWin.cpp:
3237         * runtime/StringPrototype.cpp:
3238         (JSC::stringProtoFuncLastIndexOf):
3239         * runtime/TimeoutChecker.cpp:
3240         (JSC::getCPUTime):
3241         * runtime/UString.cpp:
3242         (JSC::UString::from):
3243         * wtf/Assertions.cpp:
3244         * wtf/Assertions.h:
3245         * wtf/CurrentTime.cpp:
3246         (WTF::lowResUTCTime):
3247         * wtf/CurrentTime.h:
3248         (WTF::getLocalTime):
3249         * wtf/DateMath.cpp:
3250         * wtf/FastMalloc.cpp:
3251         (WTF::TCMalloc_ThreadCache::InitModule):
3252         (WTF::TCMallocStats::):
3253         * wtf/FastMalloc.h:
3254         * wtf/MathExtras.h:
3255         * wtf/RandomNumber.cpp:
3256         (WTF::randomNumber):
3257         * wtf/RandomNumberSeed.h:
3258         (WTF::initializeRandomNumberGenerator):
3259         * wtf/StringExtras.h:
3260         * wtf/TCSpinLock.h:
3261         (TCMalloc_SpinLock::Unlock):
3262         (TCMalloc_SlowLock):
3263         * wtf/TCSystemAlloc.cpp:
3264         * wtf/ThreadSpecific.h:
3265         (WTF::::destroy):
3266         * wtf/Threading.h:
3267         * wtf/ThreadingPthreads.cpp:
3268         (WTF::initializeThreading):
3269         (WTF::isMainThread):
3270         * wtf/ThreadingWin.cpp:
3271         (WTF::wtfThreadEntryPoint):
3272         (WTF::createThreadInternal):
3273         * wtf/VMTags.h:
3274         * wtf/unicode/icu/CollatorICU.cpp:
3275         (WTF::Collator::userDefault):
3276         * wtf/win/MainThreadWin.cpp:
3277         (WTF::initializeMainThreadPlatform):
3278
3279 2010-01-04  Gustavo Noronha Silva  <gns@gnome.org>
3280
3281         Add missing files to the build system - make distcheck build fix.
3282
3283         * GNUmakefile.am:
3284
3285 2010-01-04  Gavin Barraclough <barraclough@apple.com>
3286
3287         Reviewed by Sam Weinig, additional coding by Mark Rowe.
3288
3289         https://bugs.webkit.org/show_bug.cgi?id=33163
3290         Add string hashing functions to WTF.
3291         Use WTF's string hashing functions from UStringImpl.
3292
3293         * GNUmakefile.am:
3294         * JavaScriptCore.exp:
3295         * JavaScriptCore.gypi:
3296         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3297         * JavaScriptCore.xcodeproj/project.pbxproj:
3298         * runtime/UStringImpl.cpp:
3299         * runtime/UStringImpl.h:
3300         (JSC::UStringImpl::computeHash):
3301         * wtf/HashFunctions.h:
3302         * wtf/StringHashFunctions.h: Added.
3303         (WTF::stringHash):
3304
3305 2010-01-04  Dmitry Titov  <dimich@chromium.org>
3306
3307         Not reviewed, attempt to fix ARM bulid.
3308
3309         * wtf/Platform.h:
3310
3311 2010-01-04  Gavin Barraclough  <barraclough@apple.com>
3312
3313         Rubber stamped by Geoff Garen.
3314
3315         Add an 'isIdentifier' to UStringImpl, use this where appropriate
3316         (where previously 'identifierTable' was being tested).
3317
3318         * API/JSClassRef.cpp:
3319         (OpaqueJSClass::~OpaqueJSClass):
3320         (OpaqueJSClassContextData::OpaqueJSClassContextData):
3321         * runtime/Identifier.cpp:
3322         (JSC::Identifier::addSlowCase):
3323         * runtime/Identifier.h:
3324         (JSC::Identifier::add):
3325         * runtime/PropertyNameArray.cpp:
3326         (JSC::PropertyNameArray::add):
3327         * runtime/UStringImpl.h:
3328         (JSC::UStringImpl::isIdentifier):
3329
3330 2010-01-04  Gavin Barraclough  <barraclough@apple.com>
3331
3332         Reviewed by Sam "Shimmey Shimmey" Weinig.
3333
3334         https://bugs.webkit.org/show_bug.cgi?id=33158
3335         Refactor JSC API entry/exit to use RAII instead of copy/pasting code.
3336         Make it easier to change set of actions taken when passing across the API boundary.
3337
3338         * API/APIShims.h: Added.
3339         (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
3340         (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
3341         (JSC::APIEntryShim::APIEntryShim):
3342         (JSC::APICallbackShim::APICallbackShim):
3343         (JSC::APICallbackShim::~APICallbackShim):
3344         * API/JSBase.cpp:
3345         (JSEvaluateScript):
3346         (JSCheckScriptSyntax):
3347         (JSGarbageCollect):
3348         (JSReportExtraMemoryCost):
3349         * API/JSCallbackConstructor.cpp:
3350         (JSC::constructJSCallback):
3351         * API/JSCallbackFunction.cpp:
3352         (JSC::JSCallbackFunction::call):
3353         * API/JSCallbackObjectFunctions.h:
3354         (JSC::::init):
3355         (JSC::::getOwnPropertySlot):
3356         (JSC::::put):
3357         (JSC::::deleteProperty):
3358         (JSC::::construct):
3359         (JSC::::hasInstance):
3360         (JSC::::call):
3361         (JSC::::getOwnPropertyNames):
3362         (JSC::::toNumber):
3363         (JSC::::toString):
3364         (JSC::::staticValueGetter):
3365         (JSC::::callbackGetter):
3366         * API/JSContextRef.cpp:
3367         * API/JSObjectRef.cpp:
3368         (JSObjectMake):
3369         (JSObjectMakeFunctionWithCallback):
3370         (JSObjectMakeConstructor):
3371         (JSObjectMakeFunction):
3372         (JSObjectMakeArray):
3373         (JSObjectMakeDate):
3374         (JSObjectMakeError):
3375         (JSObjectMakeRegExp):
3376         (JSObjectGetPrototype):
3377         (JSObjectSetPrototype):
3378         (JSObjectHasProperty):
3379         (JSObjectGetProperty):
3380         (JSObjectSetProperty):
3381         (JSObjectGetPropertyAtIndex):
3382         (JSObjectSetPropertyAtIndex):
3383         (JSObjectDeleteProperty):
3384         (JSObjectCallAsFunction):
3385         (JSObjectCallAsConstructor):
3386         (JSObjectCopyPropertyNames):
3387         (JSPropertyNameArrayRelease):
3388         (JSPropertyNameAccumulatorAddName):
3389         * API/JSValueRef.cpp:
3390         (JSValueGetType):
3391         (JSValueIsUndefined):
3392         (JSValueIsNull):
3393         (JSValueIsBoolean):
3394         (JSValueIsNumber):
3395         (JSValueIsString):
3396         (JSValueIsObject):
3397         (JSValueIsObjectOfClass):
3398         (JSValueIsEqual):
3399         (JSValueIsStrictEqual):
3400         (JSValueIsInstanceOfConstructor):
3401         (JSValueMakeUndefined):
3402         (JSValueMakeNull):
3403         (JSValueMakeBoolean):
3404         (JSValueMakeNumber):
3405         (JSValueMakeString):
3406         (JSValueToBoolean):
3407         (JSValueToNumber):
3408         (JSValueToStringCopy):
3409         (JSValueToObject):
3410         (JSValueProtect):
3411         (JSValueUnprotect):
3412         * JavaScriptCore.xcodeproj/project.pbxproj:
3413
3414 2010-01-04  Dan Bernstein  <mitz@apple.com>
3415
3416         Reviewed by Ada Chan and Mark Rowe.
3417
3418         Updated copyright string
3419
3420         * Info.plist:
3421         * JavaScriptCore.vcproj/JavaScriptCore.resources/Info.plist:
3422         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc:
3423
3424 2010-01-04  Adam Roben  <aroben@apple.com>
3425
3426         No review, rolling out r52741.
3427         http://trac.webkit.org/changeset/52741
3428         https://bugs.webkit.org/show_bug.cgi?id=33056
3429
3430         * wtf/AlwaysInline.h:
3431
3432 2010-01-04  Patrick Gansterer  <paroga@paroga.com>
3433
3434         Reviewed by Darin Adler.
3435
3436         Add cacheFlush support for WinCE
3437         https://bugs.webkit.org/show_bug.cgi?id=33110
3438
3439         * jit/ExecutableAllocator.h:
3440         (JSC::ExecutableAllocator::cacheFlush):
3441
3442 2010-01-04  Patrick Gansterer  <paroga@paroga.com>
3443
3444         Reviewed by Adam Roben.
3445
3446         Implement NO_RETURN for COMPILER(MSVC).
3447         https://bugs.webkit.org/show_bug.cgi?id=33056
3448
3449         * wtf/AlwaysInline.h:
3450
3451 2010-01-04  Maciej Stachowiak  <mjs@apple.com>
3452
3453         Reviewed by Simon Hausmann.
3454
3455         Fix some PLATFORM(*_ENDIAN) uses to CPU()
3456         https://bugs.webkit.org/show_bug.cgi?id=33148
3457
3458         * runtime/JSCell.cpp:
3459         (JSC::):
3460         * runtime/JSValue.h:
3461         (JSC::JSValue::):
3462
3463 2010-01-04  Maciej Stachowiak  <mjs@apple.com>
3464
3465         Reviewed by Adam Barth.
3466
3467         Document CPU() macros in comments.
3468         https://bugs.webkit.org/show_bug.cgi?id=33147
3469
3470         * wtf/Platform.h:
3471
3472 2010-01-04  Maciej Stachowiak  <mjs@apple.com>
3473
3474         Reviewed by Adam Barth.
3475
3476         Reorganize, document and rename CPU() platform macros.
3477         https://bugs.webkit.org/show_bug.cgi?id=33145
3478         ExecutableAllocatorSymbian appears to have buggy ARM version check
3479         https://bugs.webkit.org/show_bug.cgi?id=33138
3480         
3481         * wtf/Platform.h:
3482         Rename all macros related to detection of particular CPUs or
3483         classes of CPUs to CPU(), reorganize and document them.
3484
3485         All remaining changes are adapting to the renames, plus fixing the
3486         second bug cited above.
3487         
3488         * assembler/ARMAssembler.cpp:
3489         * assembler/ARMAssembler.h:
3490         * assembler/ARMv7Assembler.h:
3491         * assembler/AbstractMacroAssembler.h:
3492         (JSC::AbstractMacroAssembler::Imm32::Imm32):
3493         * assembler/MacroAssembler.h:
3494         * assembler/MacroAssemblerARM.cpp:
3495         * assembler/MacroAssemblerARM.h:
3496         * assembler/MacroAssemblerCodeRef.h:
3497         (JSC::MacroAssemblerCodePtr::MacroAssemblerCodePtr):
3498         * assembler/MacroAssemblerX86.h:
3499         * assembler/MacroAssemblerX86Common.h:
3500         * assembler/MacroAssemblerX86_64.h:
3501         * assembler/X86Assembler.h:
3502         (JSC::X86Registers::):
3503         (JSC::X86Assembler::):
3504         (JSC::X86Assembler::movl_mEAX):
3505         (JSC::X86Assembler::movl_EAXm):
3506         (JSC::X86Assembler::repatchLoadPtrToLEA):
3507         (JSC::X86Assembler::X86InstructionFormatter::memoryModRM):
3508         * jit/ExecutableAllocator.h:
3509         * jit/ExecutableAllocatorFixedVMPool.cpp:
3510         * jit/ExecutableAllocatorPosix.cpp:
3511         * jit/ExecutableAllocatorSymbian.cpp:
3512         (JSC::ExecutableAllocator::intializePageSize):
3513         * jit/JIT.cpp:
3514         * jit/JIT.h:
3515         * jit/JITArithmetic.cpp:
3516         * jit/JITInlineMethods.h:
3517         (JSC::JIT::beginUninterruptedSequence):
3518         (JSC::JIT::restoreArgumentReferenceForTrampoline):
3519         (JSC::JIT::emitCount):
3520         * jit/JITOpcodes.cpp:
3521         (JSC::JIT::privateCompileCTIMachineTrampolines):
3522         * jit/JITPropertyAccess.cpp:
3523         (JSC::JIT::privateCompileGetByIdProto):
3524         (JSC::JIT::privateCompileGetByIdProtoList):
3525         (JSC::JIT::privateCompileGetByIdChainList):
3526         (JSC::JIT::privateCompileGetByIdChain):
3527         * jit/JITStubs.cpp:
3528         (JSC::JITThunks::JITThunks):
3529         * jit/JITStubs.h:
3530         * runtime/Collector.cpp:
3531         (JSC::currentThreadStackBase):
3532         (JSC::getPlatformThreadRegisters):
3533         (JSC::otherThreadStackPointer):
3534         * wrec/WREC.h:
3535         * wrec/WRECGenerator.cpp:
3536         (JSC::WREC::Generator::generateEnter):
3537         (JSC::WREC::Generator::generateReturnSuccess):
3538         (JSC::WREC::Generator::generateReturnFailure):
3539         * wrec/WRECGenerator.h:
3540         * wtf/FastMalloc.cpp:
3541         * wtf/TCSpinLock.h:
3542         (TCMalloc_SpinLock::Lock):
3543         (TCMalloc_SpinLock::Unlock):
3544         (TCMalloc_SlowLock):
3545         * wtf/Threading.h:
3546         * wtf/dtoa.cpp:
3547         * yarr/RegexJIT.cpp:
3548         (JSC::Yarr::RegexGenerator::generateEnter):
3549         (JSC::Yarr::RegexGenerator::generateReturn):
3550         * yarr/RegexJIT.h:
3551
3552 2010-01-04  Maciej Stachowiak  <mjs@apple.com>
3553
3554         Reviewed by Adam Barth.
3555
3556         Clean up COMPILER macros and remove unused ones.
3557         https://bugs.webkit.org/show_bug.cgi?id=33132
3558         
3559         Removed values are COMPILER(BORLAND) and COMPILER(CYGWIN) - they were
3560         not used anywhere.
3561
3562         * wtf/Platform.h:
3563
3564 2010-01-03  Maciej Stachowiak  <mjs@apple.com>