9ac7ca9869bf6a346a066efc5c44b72a436e6e0c
[WebKit-https.git] / JavaScriptCore / ChangeLog
1 2010-09-03  Csaba Osztrogonác  <ossy@webkit.org>
2
3         Reviewed by Simon Hausmann.
4
5         Fix warning in wtf/ByteArray.h
6         https://bugs.webkit.org/show_bug.cgi?id=44672
7
8         * wtf/ByteArray.h: Use maximal sized array for MSVC and unsized array for other compilers.
9
10 2010-09-02  Adam Barth  <abarth@webkit.org>
11
12         Reviewed by Eric Seidel.
13
14         Actually parse a URL from ParsedURL
15         https://bugs.webkit.org/show_bug.cgi?id=45080
16
17         This patch only handles standard URLs.  At some point we'll need to
18         distinguish between standard URLs and other kinds of URLs.
19
20         * wtf/url/api/ParsedURL.cpp:
21         (WTF::ParsedURL::ParsedURL):
22
23 2010-09-02  Adam Barth  <abarth@webkit.org>
24
25         Reviewed by Eric Seidel.
26
27         Add ParsedURL and URLString to WTFURL API
28         https://bugs.webkit.org/show_bug.cgi?id=45078
29
30         Currently there's no actual URL parsing going on, but this patch is a
31         start to sketching out the API.
32
33         * JavaScriptCore.xcodeproj/project.pbxproj:
34         * wtf/url/api/ParsedURL.cpp: Added.
35         (WTF::ParsedURL::ParsedURL):
36         (WTF::ParsedURL::scheme):
37         (WTF::ParsedURL::username):
38         (WTF::ParsedURL::password):
39         (WTF::ParsedURL::host):
40         (WTF::ParsedURL::port):
41         (WTF::ParsedURL::path):
42         (WTF::ParsedURL::query):
43         (WTF::ParsedURL::fragment):
44         (WTF::ParsedURL::segment):
45         * wtf/url/api/ParsedURL.h: Added.
46         (WTF::ParsedURL::spec):
47         * wtf/url/api/URLString.h: Added.
48         (WTF::URLString::URLString):
49         (WTF::URLString::string):
50
51 2010-09-02  Adam Barth  <abarth@webkit.org>
52
53         Reviewed by Eric Seidel.
54
55         Add WTFURL to the JavaScriptCore build on Mac
56         https://bugs.webkit.org/show_bug.cgi?id=45075
57
58         Building code is good.
59
60         * JavaScriptCore.xcodeproj/project.pbxproj:
61
62 2010-09-02  Alexey Proskuryakov  <ap@apple.com>
63
64         Reviewed by Oliver Hunt.
65
66         https://bugs.webkit.org/show_bug.cgi?id=43230
67         <rdar://problem/8254215> REGRESSION: Memory leak within JSParser::JSParser
68
69         One can't delete a ThreadSpecific object that has data in it. It's not even possible to
70         enumerate data objects in all threads, much less destroy them from a thread that's destroying
71         the ThreadSpecific.
72
73         * parser/JSParser.cpp:
74         (JSC::JSParser::JSParser):
75         * runtime/JSGlobalData.h: 
76         * wtf/WTFThreadData.cpp:
77         (WTF::WTFThreadData::WTFThreadData):
78         * wtf/WTFThreadData.h:
79         (WTF::WTFThreadData::approximatedStackStart):
80         Moved stack guard tracking from JSGlobalData to WTFThreadData.
81
82         * wtf/ThreadSpecific.h: Made destructor unimplemented. It's dangerous, and we probably won't
83         ever face a situation where we'd want to delete a ThreadSpecific object.
84
85 2010-09-01  Gavin Barraclough  <barraclough@apple.com>
86
87         Rubber stamped by Oliver Hunt.
88
89         Ecma-262 15.11.1.1 states that if the argument is undefined then an
90         Error object's message property should be set to the empty string.
91
92         * runtime/ErrorInstance.cpp:
93         (JSC::ErrorInstance::ErrorInstance):
94         (JSC::ErrorInstance::create):
95         * runtime/ErrorInstance.h:
96         * runtime/ErrorPrototype.cpp:
97         (JSC::ErrorPrototype::ErrorPrototype):
98
99 2010-08-31  Darin Adler  <darin@apple.com>
100
101         Reviewed by Anders Carlsson.
102
103         * wtf/FastMalloc.cpp:
104         (WTF::TCMalloc_PageHeap::scavenge): Replaced somewhat-quirky code that
105         mixed types with code that uses size_t.
106
107         * wtf/TCPageMap.h: Removed names of unused arguments to avoid warning.
108
109 2010-08-31  Martin Robinson  <mrobinson@igalia.com>
110
111         Reviewed by Gustavo Noronha Silva.
112
113         [GTK] Isolate all GTK+ typedefs into one file
114         https://bugs.webkit.org/show_bug.cgi?id=44900
115
116         * GNUmakefile.am: Add GtkTypedefs.h to the source lists.
117         * wtf/Platform.h: #include GtkTypedefs.h for the GTK+ build.
118         * wtf/ThreadingPrimitives.h: Remove GTK+ typedefs.
119         * wtf/gobject/GOwnPtr.h: Ditto.
120         * wtf/gobject/GRefPtr.h: Ditto.
121         * wtf/gtk/GtkTypedefs.h: Added.
122
123 2010-08-31  Martin Robinson  <mrobinson@igalia.com>
124
125         Reviewed by Gustavo Noronha Silva.
126
127         [GTK] Fix 'make dist' in preparation of the 1.3.3 release
128         https://bugs.webkit.org/show_bug.cgi?id=44978
129
130         * GNUmakefile.am: Adding missing headers to the sources list.
131
132 2010-08-31  Chao-ying Fu  <fu@mips.com>
133
134         Reviewed by Oliver Hunt.
135
136         Support emit_op_mod() for MIPS
137         https://bugs.webkit.org/show_bug.cgi?id=42855
138
139         This patch uses MIPS div instructions for op_mod to improve performance.
140
141         * assembler/MIPSAssembler.h:
142         (JSC::MIPSAssembler::div):
143         * jit/JITArithmetic.cpp:
144         (JSC::JIT::emit_op_mod):
145         (JSC::JIT::emitSlow_op_mod):
146
147 2010-08-31  Csaba Osztrogonác  <ossy@webkit.org>
148
149         Reviewed by Darin Adler.
150
151         Modify ASSERT_UNUSED and UNUSED_PARAM similar to Qt's Q_UNUSED.
152         https://bugs.webkit.org/show_bug.cgi?id=44870
153
154         * wtf/Assertions.h:
155         * wtf/UnusedParam.h:
156
157 2010-08-31  Benjamin Poulain  <benjamin.poulain@nokia.com>
158
159         Reviewed by Kenneth Rohde Christiansen.
160
161         JSC TimeoutChecker::didTimeOut overflows on ARM
162         https://bugs.webkit.org/show_bug.cgi?id=38538
163
164         Make getCPUTime() return values relative to the first call.
165         The previous implementation relied on simply on currentTime(), which
166         return a time since epoch and not a time since the thread started. This
167         made the return value of getCPUTime() overflow on 32 bits.
168
169         * runtime/TimeoutChecker.cpp:
170         (JSC::getCPUTime):
171
172 2010-08-30  Mihai Parparita  <mihaip@chromium.org>
173
174         Reviewed by Adam Barth.
175
176         HISTORY_ALWAYS_ASYNC should be removed (history should always be async)
177         https://bugs.webkit.org/show_bug.cgi?id=44315
178
179         Remove ENABLE_HISTORY_ALWAYS_ASYNC #define.
180
181         * wtf/Platform.h: 
182
183 2010-08-30  Chris Rogers  <crogers@google.com>
184
185         Reviewed by Kenneth Russell.
186
187         Fix namespace for wtf/Complex.h and wtf/Vector3.h
188         https://bugs.webkit.org/show_bug.cgi?id=44892
189
190         * wtf/Complex.h:
191         * wtf/Vector3.h:
192
193 2010-08-30  Andy Estes  <aestes@apple.com>
194
195         Reviewed by Eric Carlson.
196
197         Strings returned by asciiDebug() should be NULL-terminated.
198         https://bugs.webkit.org/show_bug.cgi?id=44866
199
200         * wtf/text/WTFString.cpp:
201         (asciiDebug):
202
203 2010-08-30  Zoltan Herczeg  <zherczeg@webkit.org>
204
205         Reviewed by Darin Adler.
206
207         Refactor number parsing in the lexer
208         https://bugs.webkit.org/show_bug.cgi?id=44104
209
210         Number parsing was full of gotos, and needed a complete
211         redesign to remove them (Only one remained). Furthermore
212         integer arithmetic is empolyed for fast cases (= small
213         integer numbers).
214
215         * parser/Lexer.cpp:
216         (JSC::Lexer::parseHex):
217         (JSC::Lexer::parseOctal):
218         (JSC::Lexer::parseDecimal):
219         (JSC::Lexer::parseNumberAfterDecimalPoint):
220         (JSC::Lexer::parseNumberAfterExponentIndicator):
221         (JSC::Lexer::lex):
222         * parser/Lexer.h:
223
224 2010-08-29  Darin Adler  <darin@apple.com>
225
226         Fix Qt build.
227
228         * wtf/unicode/glib/UnicodeMacrosFromICU.h: Added U_IS_BMP.
229         * wtf/unicode/qt4/UnicodeQt4.h: Ditto.
230         * wtf/unicode/wince/UnicodeWince.h: Ditto.
231
232 2010-08-29  Kwang Yul Seo  <skyul@company100.net>
233
234         Reviewed by Kent Tamura.
235
236         [BREWMP] Port vprintf_stderr_common
237         https://bugs.webkit.org/show_bug.cgi?id=33568
238
239         Use BREW's DBGPRINTF to output debug messages.
240
241         * wtf/Assertions.cpp:
242
243 2010-08-28  Gavin Barraclough  <barraclough@apple.com>
244
245         Reviewed by Oliver Hunt.
246
247         Bug 44830 - In Array's prototype functyions we're incorrectly handing large index values
248
249         We are in places casting doubles to unsigneds, and unsigneds to ints, without always check
250         that the result is within bounds. This is problematic in the case of double-to-unsigned
251         conversion because we should be saturating to array length.
252
253         Also, the error return value from Array.splice should be [], not undefined.
254
255         I don't see any security concerns here. These methods are spec'ed in such a way that they
256         can be applied to non Array objects, so in all cases the (potentially bogus) indices are
257         being passed to functions that will safely check accesses are within bounds.
258
259         * runtime/ArrayPrototype.cpp:
260         (JSC::argumentClampedIndexFromStartOrEnd):
261         (JSC::arrayProtoFuncJoin):
262         (JSC::arrayProtoFuncConcat):
263         (JSC::arrayProtoFuncReverse):
264         (JSC::arrayProtoFuncShift):
265         (JSC::arrayProtoFuncSlice):
266         (JSC::arrayProtoFuncSort):
267         (JSC::arrayProtoFuncSplice):
268         (JSC::arrayProtoFuncUnShift):
269         (JSC::arrayProtoFuncFilter):
270         (JSC::arrayProtoFuncMap):
271         (JSC::arrayProtoFuncEvery):
272         (JSC::arrayProtoFuncForEach):
273         (JSC::arrayProtoFuncSome):
274         (JSC::arrayProtoFuncReduce):
275         (JSC::arrayProtoFuncReduceRight):
276         (JSC::arrayProtoFuncIndexOf):
277         (JSC::arrayProtoFuncLastIndexOf):
278         * runtime/JSValue.h:
279         (JSC::JSValue::toUInt32):
280
281 2010-08-28  Pratik Solanki  <psolanki@apple.com>
282
283         Reviewed by Dan Bernstein.
284
285         Add an ENABLE define for purgeable memory support
286         https://bugs.webkit.org/show_bug.cgi?id=44777
287
288         * wtf/Platform.h:
289
290 2010-08-27  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>
291
292         Reviewed by Kenneth Rohde Christiansen.
293
294         [Qt] NPAPI Plugin metadata should be cached, and loading a plugin should not require loading every plugin
295         https://bugs.webkit.org/show_bug.cgi?id=43179
296
297         Add ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE flag to enable persistent
298         NPAPI Plugin Cache. The flag is enabled by default.
299
300         * wtf/Platform.h: Add ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE
301
302 2010-07-27  Jer Noble  <jer.noble@apple.com>
303
304         Reviewed by Eric Carlson.
305
306         Add JavaScript API to allow a page to go fullscreen.
307         rdar://problem/6867795
308         https://bugs.webkit.org/show_bug.cgi?id=43099
309
310         * wtf/Platform.h: Enable FULLSCREEN_API mode for the Mac (except iOS).
311
312 2010-08-27  Gavin Barraclough  <barraclough@apple.com>
313
314         Windows build fix pt 2.
315
316         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
317
318 2010-08-27  Gavin Barraclough  <barraclough@apple.com>
319
320         Windows build fix pt 1.
321
322         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
323
324 2010-08-27  Gavin Barraclough  <barraclough@apple.com>
325
326         Reviewed by Oliver Hunt.
327
328         Bug 44745 - Number.toFixed/toExponential/toPrecision are inaccurate.
329
330         These methods should be using a version of dtoa that can generate results accurate
331         to the requested precision, whereas our version of dtoa is only currently able to
332         support producing results sufficiently accurate to distinguish the value from any
333         other IEEE-754 double precision number.
334
335         This change has no impact on benchmarks we track.
336
337         On microbenchmarks for these functions, this is a slight regression where a high
338         precision is requested (dtoa now need to iterate further to generate a a greater
339         number of digits), but with smaller precision values (hopefully more common) this
340         improves performance, since it reduced the accurate of result dtoa is required,
341         to produce, and removes the need to pre-round values before calling dtoa. 
342
343         * JavaScriptCore.exp:
344             doubleToStringInJavaScriptFormat renamed to numberToString
345
346         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
347             doubleToStringInJavaScriptFormat renamed to numberToString
348
349         * runtime/UString.cpp:
350         (JSC::UString::number):
351             doubleToStringInJavaScriptFormat renamed to numberToString
352
353         * wtf/DecimalNumber.h:
354         (WTF::DecimalNumber::DecimalNumber):
355         (WTF::DecimalNumber::toStringDecimal):
356         (WTF::DecimalNumber::toStringExponential):
357             Remove all pre-rounding of values, instead call dtoa correctly.
358
359         * wtf/dtoa.cpp:
360         (WTF::dtoa):
361         * wtf/dtoa.h:
362             Reenable support for rounding to specific-figures/decimal-places in dtoa.
363             Modify to remove unbiased rounding, provide ECMA required away-from-zero.
364             Rewrite doubleToStringInJavaScriptFormat to use DecimalNumber, rename to
365             numberToString.
366
367 2010-08-27  Chao-ying Fu  <fu@mips.com>
368
369         Reviewed by Oliver Hunt.
370
371         Byte alignment issue on MIPS
372         https://bugs.webkit.org/show_bug.cgi?id=29415
373
374         MIPS accesses one byte at a time for now to avoid the help from the
375         kernel to fix unaligned accesses.
376
377         * wtf/text/AtomicString.cpp:
378         (WebCore::equal):
379         * wtf/text/StringHash.h:
380         (WebCore::StringHash::equal):
381
382 2010-08-27  Xan Lopez  <xlopez@igalia.com>
383
384         Reviewed by Tor Arne Vestbø.
385
386         Fix a couple of typos in comment.
387
388         * bytecode/CodeBlock.h:
389
390 2010-08-26  Gavin Barraclough  <barraclough@apple.com>
391
392         Windows build fix.
393
394         * wtf/dtoa.cpp:
395
396 2010-08-26  Gavin Barraclough  <baraclough@apple.com>
397
398         Reviewed by Sam Weinig.
399
400         Bug 44735 - Clean up dtoa.cpp
401         Remove unused & unmaintained code paths, reformat code to match
402         coding standard & use platform #defines from Platform.h directly.
403
404         * wtf/dtoa.cpp:
405         (WTF::storeInc):
406         (WTF::multadd):
407         (WTF::s2b):
408         (WTF::lo0bits):
409         (WTF::mult):
410         (WTF::pow5mult):
411         (WTF::lshift):
412         (WTF::diff):
413         (WTF::ulp):
414         (WTF::b2d):
415         (WTF::d2b):
416         (WTF::ratio):
417         (WTF::):
418         (WTF::strtod):
419         (WTF::quorem):
420         (WTF::dtoa):
421
422 2010-08-26  Gavin Barraclough  <barraclough@apple.com>
423
424         Rubber Stamped by Oliver Hunt.
425
426         Partially revert r65959. The toString changes regressed the v8 tests,
427         but keep the toFixed/toExponential/toPrecision changes.
428
429         * JavaScriptCore.exp:
430         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
431         * runtime/NumberPrototype.cpp:
432         * runtime/UString.cpp:
433         (JSC::UString::number):
434         * wtf/DecimalNumber.h:
435         * wtf/dtoa.cpp:
436         (WTF::append):
437         (WTF::doubleToStringInJavaScriptFormat):
438         * wtf/dtoa.h:
439         * wtf/text/WTFString.cpp:
440         * wtf/text/WTFString.h:
441
442 2010-08-26  James Robinson  <jamesr@chromium.org>
443
444         Reviewed by Darin Fisher.
445
446         [chromium] Remove the USE(GLES2_RENDERING) define and associated code
447         https://bugs.webkit.org/show_bug.cgi?id=43761
448
449         Remove WTF_USE_GLES2_RENDERING from the list of defines in chromium, it's unused.
450
451         * wtf/Platform.h:
452
453 2010-08-26  Gavin Barraclough  <barraclough@apple.com>
454
455         Rolling out r64608, this regressed performance.
456
457         * JavaScriptCore.xcodeproj/project.pbxproj:
458         * assembler/ARMAssembler.cpp:
459         (JSC::ARMAssembler::executableCopy):
460         * assembler/LinkBuffer.h:
461         (JSC::LinkBuffer::LinkBuffer):
462         (JSC::LinkBuffer::~LinkBuffer):
463         (JSC::LinkBuffer::performFinalization):
464         * assembler/MIPSAssembler.h:
465         (JSC::MIPSAssembler::executableCopy):
466         * assembler/X86Assembler.h:
467         (JSC::X86Assembler::executableCopy):
468         * bytecode/StructureStubInfo.h:
469         (JSC::StructureStubInfo::initGetByIdProto):
470         (JSC::StructureStubInfo::initGetByIdChain):
471         (JSC::StructureStubInfo::initGetByIdSelfList):
472         (JSC::StructureStubInfo::initGetByIdProtoList):
473         (JSC::StructureStubInfo::initPutByIdTransition):
474         * jit/ExecutableAllocator.cpp:
475         (JSC::ExecutablePool::systemAlloc):
476         * jit/ExecutableAllocator.h:
477         (JSC::ExecutablePool::create):
478         (JSC::ExecutableAllocator::ExecutableAllocator):
479         (JSC::ExecutableAllocator::poolForSize):
480         (JSC::ExecutablePool::ExecutablePool):
481         (JSC::ExecutablePool::poolAllocate):
482         * jit/ExecutableAllocatorFixedVMPool.cpp:
483         (JSC::FixedVMPoolAllocator::allocInternal):
484         * jit/JIT.cpp:
485         (JSC::JIT::privateCompile):
486         * jit/JIT.h:
487         (JSC::JIT::compileGetByIdProto):
488         (JSC::JIT::compileGetByIdSelfList):
489         (JSC::JIT::compileGetByIdProtoList):
490         (JSC::JIT::compileGetByIdChainList):
491         (JSC::JIT::compileGetByIdChain):
492         (JSC::JIT::compilePutByIdTransition):
493         (JSC::JIT::compilePatchGetArrayLength):
494         * jit/JITOpcodes.cpp:
495         (JSC::JIT::privateCompileCTIMachineTrampolines):
496         * jit/JITOpcodes32_64.cpp:
497         (JSC::JIT::privateCompileCTIMachineTrampolines):
498         (JSC::JIT::privateCompileCTINativeCall):
499         * jit/JITPropertyAccess.cpp:
500         (JSC::JIT::stringGetByValStubGenerator):
501         (JSC::JIT::privateCompilePutByIdTransition):
502         (JSC::JIT::privateCompilePatchGetArrayLength):
503         (JSC::JIT::privateCompileGetByIdProto):
504         (JSC::JIT::privateCompileGetByIdSelfList):
505         (JSC::JIT::privateCompileGetByIdProtoList):
506         (JSC::JIT::privateCompileGetByIdChainList):
507         (JSC::JIT::privateCompileGetByIdChain):
508         * jit/JITPropertyAccess32_64.cpp:
509         (JSC::JIT::stringGetByValStubGenerator):
510         (JSC::JIT::privateCompilePutByIdTransition):
511         (JSC::JIT::privateCompilePatchGetArrayLength):
512         (JSC::JIT::privateCompileGetByIdProto):
513         (JSC::JIT::privateCompileGetByIdSelfList):
514         (JSC::JIT::privateCompileGetByIdProtoList):
515         (JSC::JIT::privateCompileGetByIdChainList):
516         (JSC::JIT::privateCompileGetByIdChain):
517         * jit/JITStubs.cpp:
518         (JSC::JITThunks::tryCachePutByID):
519         (JSC::JITThunks::tryCacheGetByID):
520         (JSC::DEFINE_STUB_FUNCTION):
521         (JSC::getPolymorphicAccessStructureListSlot):
522         * jit/JITStubs.h:
523         * jit/SpecializedThunkJIT.h:
524         (JSC::SpecializedThunkJIT::finalize):
525         * runtime/ExceptionHelpers.cpp:
526         * runtime/ExceptionHelpers.h:
527         * runtime/Executable.cpp:
528         (JSC::EvalExecutable::compileInternal):
529         (JSC::ProgramExecutable::compileInternal):
530         (JSC::FunctionExecutable::compileForCallInternal):
531         (JSC::FunctionExecutable::compileForConstructInternal):
532         (JSC::FunctionExecutable::reparseExceptionInfo):
533         (JSC::EvalExecutable::reparseExceptionInfo):
534         * yarr/RegexJIT.cpp:
535         (JSC::Yarr::RegexGenerator::compile):
536
537 2010-08-26  Gavin Barraclough  <barraclough@apple.com>
538
539         Reviewed by Brady Eidson.
540
541         Bug 44655 - Add debug only convenience methods to obtain a Vector<char> from a String/StringImpl.
542
543         * wtf/text/WTFString.cpp:
544         (asciiDebug):
545             Return a Vector<char> containing the contents of a string as ASCII.
546
547 2010-08-26  Sam Weinig  <sam@webkit.org>
548
549         Reviewed by Darin Adler.
550
551         Add PassOwnArrayPtr
552         https://bugs.webkit.org/show_bug.cgi?id=44627
553
554         * GNUmakefile.am:
555         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
556         * JavaScriptCore.xcodeproj/project.pbxproj:
557         Add the new files.
558
559         * wtf/Forward.h:
560         Forward declare PassOwnArrayPtr.
561         
562         * wtf/OwnArrayPtr.h:
563         Mimic the OwnPtr interface.
564
565         * wtf/OwnArrayPtrCommon.h: Added.
566         (WTF::deleteOwnedArrayPtr):
567         Move delete function here so it can be shared by OwnArrayPtr and
568         PassOwnArrayPtr.
569
570         * wtf/PassOwnArrayPtr.h: Added.
571         Mimic the PassOwnPtr interface.
572
573 2010-08-26  Oliver Hunt  <oliver@apple.com>
574
575         Reviewed by Gavin Barraclough.
576
577         [JSC] JavaScript parsing error when loading Equifax web page
578         https://bugs.webkit.org/show_bug.cgi?id=42900
579
580         '-->' is ostensibly only meant to occur when there is only
581         whitespace preceeding it on the line.  However firefox treats
582         multiline comments as a space character, so they are allowed.
583         One side effect of the firefox model is that any line terminators
584         inside the multiline comment are ignored, so
585
586             foo/*
587             */-->
588
589         is treated as
590
591             foo -->
592
593         and so '-->' will not be a comment in this case.  Happily this simply
594         means that to fix this issue all we need to do is stop updating
595         m_atLineStart when handling multiline comments.
596
597         * parser/Lexer.cpp:
598         (JSC::Lexer::lex):
599
600 2010-08-25  Oliver Hunt  <oliver@apple.com>
601
602         Reviewed by Geoffrey Garen.
603
604         Improve overflow handling in StringImpl::Replace
605         https://bugs.webkit.org/show_bug.cgi?id=42502
606         <rdar://problem/8203794>
607
608         Harden StringImpl::replace against overflow -- I can't see how this
609         could be abused, but it's better to be safe than sorry.
610
611         * wtf/text/StringImpl.cpp:
612         (WTF::StringImpl::replace):
613
614 2010-08-26  Martin Robinson  <mrobinson@igalia.com>
615
616         Reviewed by Xan Lopez.
617
618         [GTK] The GNUmakefile.am files contain a myriad of confusing preprocessor and compiler flag definitions
619         https://bugs.webkit.org/show_bug.cgi?id=44624
620
621         Clean up GNUmakefile.am.
622
623         * GNUmakefile.am: Alphabetize the include order in javascriptcore_cppflags. Move
624         a couple include lines from the top-level GNUmakefile.am.
625
626 2010-08-25  Xan Lopez  <xlopez@igalia.com>
627
628         Reviewed by Kent Tamura.
629
630         Local variables 'k' and 'y' in s2b() in dtoa.cpp are computed but not used
631         https://bugs.webkit.org/show_bug.cgi?id=29259
632
633         Remove unused code in dtoa.cpp, spotted by Wan-Teh Chang.
634
635         * wtf/dtoa.cpp:
636         (WTF::s2b):
637
638 2010-08-25  Kwang Yul Seo  <skyul@company100.net>
639
640         Reviewed by Kevin Ollivier.
641
642         [BREWMP] Add build system
643         https://bugs.webkit.org/show_bug.cgi?id=44645
644
645         Make waf script portable so that we can add more ports.
646
647         * wscript:
648
649 2010-08-25  Michael Saboff  <msaboff@apple.com>
650
651         Reviewed by Sam Weinig.
652
653         Remove the single entry regular expression cache introduced as part of
654         the fix for https://bugs.webkit.org/show_bug.cgi?id=41238.
655         The performance problem in Dromaeo that initiated that bug is no 
656         longer present. Dromaeo has been modified so that the regular
657         expression tests are somewhat random and don't benefit from a
658         single entry cache.
659
660         * runtime/RegExp.cpp:
661         (JSC::RegExp::RegExp):
662         (JSC::RegExp::match):
663         * runtime/RegExp.h:
664
665 2010-08-25  Martin Robinson  <mrobinson@igalia.com>
666
667         Reviewed by Gustavo Noronha Silva.
668
669         Cairo and EFL port shouldn't depend on glib.
670         https://bugs.webkit.org/show_bug.cgi?id=44354
671
672         Replace GRefPtr with PlatformRefPtr. Keep GLib specific bits in
673         GRefPtr.h.
674
675         * GNUmakefile.am: Add PlatformRefPtr.h to the source list.
676         * wtf/PlatformRefPtr.h: Migrated from GRefPtr.h.
677         (WTF::PlatformRefPtr::PlatformRefPtr): Ditto.
678         (WTF::PlatformRefPtr::~PlatformRefPtr): Ditto.
679         (WTF::PlatformRefPtr::clear): Ditto.
680         (WTF::PlatformRefPtr::get): Ditto.
681         (WTF::PlatformRefPtr::operator*): Ditto.
682         (WTF::PlatformRefPtr::operator->): Ditto.
683         (WTF::PlatformRefPtr::operator!): Ditto.
684         (WTF::PlatformRefPtr::operator UnspecifiedBoolType): Ditto.
685         (WTF::PlatformRefPtr::hashTableDeletedValue): Ditto.
686         (WTF::::operator): Ditto.
687         (WTF::::swap): Ditto.
688         (WTF::swap): Ditto.
689         (WTF::operator==): Ditto.
690         (WTF::operator!=): Ditto.
691         (WTF::static_pointer_cast): Ditto.
692         (WTF::const_pointer_cast): Ditto.
693         (WTF::getPtr): Ditto.
694         (WTF::adoptPlatformRef): Ditto.
695         * wtf/gobject/GRefPtr.cpp: Changes to reflect new names.
696         (WTF::refPlatformPtr):
697         (WTF::derefPlatformPtr):
698         * wtf/gobject/GRefPtr.h: Ditto.
699         (WTF::refPlatformPtr):
700         (WTF::derefPlatformPtr):
701
702 2010-08-25  Xan Lopez  <xlopez@igalia.com>
703
704         Reviewed by Alexey Proskuryakov.
705
706         Remove dead code in JSGlobalObject
707         https://bugs.webkit.org/show_bug.cgi?id=44615
708
709         The recursion data member in the JSGlobalObject and its getter
710         plus inc/dec methods seems to be unused, remove them.
711
712         * runtime/JSGlobalObject.cpp:
713         (JSC::JSGlobalObject::init):
714         * runtime/JSGlobalObject.h:
715
716 2010-08-25  Michael Saboff  <msaboff@apple.com>
717
718         Reviewed by Geoffrey Garen.
719
720         Changed the initial and subsequent allocation of vector storage to
721         Array()s. The changes are to limit sparse arrays to 100000 entries
722         and fixed the sparse map to vector storage conversion to use the 
723         minimum amount of memory needed to store the current number of entries.
724         These changes address https://bugs.webkit.org/show_bug.cgi?id=43707
725
726         * runtime/JSArray.cpp:
727         (JSC::JSArray::putSlowCase):
728         (JSC::JSArray::getNewVectorLength):
729
730 2010-08-16  Gabor Loki  <loki@webkit.org>
731
732         Reviewed by Gavin Barraclough.
733
734         Avoid increasing required alignment of target type warning
735         https://bugs.webkit.org/show_bug.cgi?id=43963
736
737         Fix platform independent alignment warnings.
738
739         * wtf/ListHashSet.h:
740         (WTF::ListHashSetNodeAllocator::pool):
741
742 2010-08-19  Gabor Loki  <loki@webkit.org>
743
744         Reviewed by Gavin Barraclough.
745
746         Enable truncated floating point feature on ARM
747         https://bugs.webkit.org/show_bug.cgi?id=44233
748
749         Enable truncated floating point feature with the help of VCVTR.S32.F64
750         instruction. If VCVTR.S32.F64 can't fit the result into a 32-bit
751         integer/register, it saturates at INT_MAX or INT_MIN. Testing this
752         looks quicker than testing FPSCR for exception.
753
754         Inspired by Jacob Bramley's patch from JaegerMonkey
755
756         * assembler/ARMAssembler.h:
757         (JSC::ARMAssembler::):
758         (JSC::ARMAssembler::cmn_r):
759         (JSC::ARMAssembler::vcvtr_s32_f64_r):
760         * assembler/MacroAssemblerARM.h:
761         (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
762         (JSC::MacroAssemblerARM::branchTruncateDoubleToInt32):
763
764 2010-08-24  Gavin Barraclough  <barraclough@apple.com>
765
766         Windows build fix.
767
768         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
769
770 2010-08-24  Gavin Barraclough  <barraclough@apple.com>
771
772         Windows build fix.
773
774         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
775         * wtf/DecimalNumber.h:
776         (WTF::DecimalNumber::intPow10):
777         * wtf/dtoa.cpp:
778         * wtf/dtoa.h:
779
780 2010-08-23  Gavin Barraclough  <barraclough@apple.com>
781
782         Reviewed by Oliver Hunt.
783
784         https://bugs.webkit.org/show_bug.cgi?id=44487
785
786         Number.toExponential/toFixed/toPrecision all contain a spaghetti of duplicated
787         code & unnecessary complexity. Add a new DecimalNumber class to encapsulate
788         double to string conversion, share the implementations of rounding &
789         decimal-fraction/exponential formatting.
790
791         * JavaScriptCore.exp:
792             Update exports.
793
794         * runtime/NumberPrototype.cpp:
795         (JSC::toThisNumber):
796         (JSC::getIntegerArgumentInRange):
797             Helper methods used in implementing toExponential/toFixed/toString.
798         (JSC::numberProtoFuncToExponential):
799         (JSC::numberProtoFuncToFixed):
800         (JSC::numberProtoFuncToPrecision):
801             Reimplemented using new DecimalNumber class.
802             
803         * runtime/UString.cpp:
804         (JSC::UString::number):
805             Updated to call numberToString.
806
807         * wtf/DecimalNumber.h: Added.
808         (WTF::):
809         (WTF::DecimalNumber::DecimalNumber):
810         (WTF::DecimalNumber::toStringDecimal):
811         (WTF::DecimalNumber::toStringExponential):
812         (WTF::DecimalNumber::sign):
813         (WTF::DecimalNumber::exponent):
814         (WTF::DecimalNumber::significand):
815         (WTF::DecimalNumber::precision):
816         (WTF::DecimalNumber::init):
817         (WTF::DecimalNumber::isZero):
818         (WTF::DecimalNumber::roundToPrecision):
819             New class to perform double to string conversion.
820             Has three constructors, which allow conversion with no rounding,
821             rounding to significant-figures, or rounding to decimal-places,
822             and two methods for formatting strings, either using decimal
823             fraction or exponential encoding. Internal implementation uses
824             pre-rounding of the values before calling dtoa rather than
825             relying on dtoa to correctly round, which does not produce
826             fully accurate results. Hopefully we can address this in the
827             near future.
828
829         * wtf/dtoa.cpp:
830         (WTF::intPow10):
831         * wtf/dtoa.h:
832             intPow10 is used internally by DecimalNumber.
833             
834         * wtf/text/WTFString.cpp:
835         (WTF::copyToString):
836         (WTF::nanOrInfToString):
837             Used internally in numberToString for NaN/Infinity handling.
838         (WTF::numberToString):
839             Added new method to convert doubles to strings.
840
841         * wtf/text/WTFString.h:
842             Added declaration for numberToString. This is here because
843             we should switch over to using this for all double to string
844             conversion in WebCore (see section 2.4.4.3 of the HTML5 spec).
845
846 2010-08-24  Oliver Hunt  <oliver@apple.com>
847
848         Reviewed by Geoff Garen.
849
850         Don't seed the JS random number generator from time()
851         https://bugs.webkit.org/show_bug.cgi?id=41868
852         <rdar://problem/8171025>
853
854         Switch to using the secure random number generator to
855         seed the fast random generator, and make the generator
856         be per global object.
857
858         * runtime/JSGlobalData.cpp:
859         (JSC::JSGlobalData::JSGlobalData):
860         * runtime/JSGlobalData.h:
861         * runtime/JSGlobalObject.h:
862         (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
863         (JSC::JSGlobalObject::weakRandomNumber):
864         * runtime/MathObject.cpp:
865         (JSC::mathProtoFuncRandom):
866
867 2010-08-24  Oliver Hunt  <oliver@apple.com>
868
869         Reviewed by Beth Dakin.
870
871         Make overflow guards in UString::utf8 explicit
872         https://bugs.webkit.org/show_bug.cgi?id=44540
873
874         Add an explicit overflow check prior to allocating our buffer,
875         rather than implicitly relying on the guard in convertUTF16ToUTF8.
876
877         * runtime/UString.cpp:
878         (JSC::UString::utf8):
879
880 2010-08-24  Yael Aharon  <yael.aharon@nokia.com>
881
882         Reviewed by Simon Hausmann.
883
884         [Symbian] Fix commit/decommit of system memory using RChunk
885
886         Swap accidentially reversed start and m_base values for determining the
887         offset within the RChunk.
888
889         * wtf/PageReservation.h:
890         (WTF::PageReservation::systemCommit):
891         (WTF::PageReservation::systemDecommit):
892
893 2010-08-23  Patrick Gansterer  <paroga@paroga.com>
894
895         Rubber-stamped by Gabor Loki.
896
897         [WINCE] Buildfix for GeneratedJITStubs after r64818
898         https://bugs.webkit.org/show_bug.cgi?id=44469
899
900         Use " THUNK_RETURN_ADDRESS_OFFSET" instead of "#offset#".
901
902         * jit/JITStubs.cpp:
903
904 2010-08-23  Oliver Hunt  <oliver@apple.com>
905
906         Reviewed by Darin Adler.
907
908         [REGRESSION] Interpreter incorrectly excludes prototype chain when validating put_by_id_transition
909         https://bugs.webkit.org/show_bug.cgi?id=44240
910         <rdar://problem/8328995>
911
912         Fix an error I introduced when cleaning up the interpreter side of the logic
913         to prevent setters being called in object initialisers.
914
915         * interpreter/Interpreter.cpp:
916         (JSC::Interpreter::privateExecute):
917
918 2010-08-23  Michael Saboff  <msaboff@apple.com>
919
920         Reviewed by Oliver Hunt.
921
922         Fixed case where a single character search string in a string.replace()
923         did not properly handle back reference replacement.  The fix is to 
924         check for a '$' as part of the check to see if we can execute the
925         single character replace optimization.
926         https://bugs.webkit.org/show_bug.cgi?id=44067
927
928         * runtime/StringPrototype.cpp:
929         (JSC::stringProtoFuncReplace):
930
931 2010-08-23  Oliver Hunt  <oliver@apple.com>
932
933         Reviewed by Gavin Barraclough.
934
935         JSON.stringify is much slower than Firefox on particular pathological input
936         https://bugs.webkit.org/show_bug.cgi?id=44456
937
938         Make StringBuilder::reserveCapacity reserve additional space so we don't end up
939         repeatedly copying the entire result string.
940
941         * runtime/StringBuilder.h:
942         (JSC::StringBuilder::append):
943         (JSC::StringBuilder::reserveCapacity):
944
945 2010-08-23  Jian Li  <jianli@chromium.org>
946
947         Reviewed by Darin Fisher.
948
949         Handle blob resource.
950         https://bugs.webkit.org/show_bug.cgi?id=43941
951
952         * JavaScriptCore.exp: Add an export that is neede by BlobResourceHandle.
953
954 2010-08-19  Andreas Kling  <andreas.kling@nokia.com>
955
956         Reviewed by Geoffrey Garen.
957
958         JSC: Move the static_cast into to(U)Int32 fast case
959         https://bugs.webkit.org/show_bug.cgi?id=44037
960
961         Do the static_cast<(u)int32_t> inline to avoid the function call overhead
962         for easily converted values (within (u)int32_t range.)
963
964         * runtime/JSValue.cpp:
965         (JSC::toInt32SlowCase):
966         (JSC::toUInt32SlowCase):
967         * runtime/JSValue.h:
968         (JSC::JSValue::toInt32):
969         (JSC::JSValue::toUInt32):
970
971 2010-08-18  Andreas Kling  <andreas.kling@nokia.com>
972
973         Reviewed by Geoffrey Garen.
974
975         REGRESSION(r58469): Math.pow() always returns double-backed JSValue which is extremely slow as array subscript
976         https://bugs.webkit.org/show_bug.cgi?id=43742
977
978         Add codegen for pow() to return Int32 values when possible.
979
980         * jit/ThunkGenerators.cpp:
981         (JSC::powThunkGenerator):
982
983 2010-08-18  Gabor Loki  <loki@webkit.org>
984
985         Reviewed by Gavin Barraclough.
986
987         The JITStackFrame is wrong using Thumb-2 JIT with JSVALUE32_64
988         https://bugs.webkit.org/show_bug.cgi?id=43897
989
990         A 64 bits wide member in a structure is aligned to 8 bytes on ARM by
991         default, but this is not taken into account in the offset defines of
992         JITStackFrame.
993
994         * jit/JITStubs.cpp:
995         * jit/JITStubs.h:
996
997 2010-08-18  Gavin Barraclough  <barraclough@apple.com>
998
999         Rubber stamped by Sam Weinig.
1000
1001         Rename UString::substr to substringSharingImpl, add to WTF::String.
1002         Now WTF::String can do everything that JSC::UString can do!
1003
1004         * JavaScriptCore.exp:
1005         * bytecode/CodeBlock.cpp:
1006         (JSC::escapeQuotes):
1007         * bytecompiler/NodesCodegen.cpp:
1008         (JSC::substitute):
1009         * parser/SourceProvider.h:
1010         (JSC::UStringSourceProvider::getRange):
1011         * runtime/FunctionPrototype.cpp:
1012         (JSC::insertSemicolonIfNeeded):
1013         * runtime/JSGlobalObjectFunctions.cpp:
1014         (JSC::parseInt):
1015         * runtime/JSONObject.cpp:
1016         (JSC::gap):
1017         (JSC::Stringifier::indent):
1018         (JSC::Stringifier::unindent):
1019         * runtime/JSString.cpp:
1020         (JSC::JSString::replaceCharacter):
1021         * runtime/NumberPrototype.cpp:
1022         (JSC::numberProtoFuncToFixed):
1023         (JSC::numberProtoFuncToPrecision):
1024         * runtime/StringPrototype.cpp:
1025         (JSC::stringProtoFuncReplace):
1026         (JSC::trimString):
1027         * runtime/UString.cpp:
1028         (JSC::UString::substringSharingImpl):
1029         * runtime/UString.h:
1030         * wtf/text/WTFString.cpp:
1031         (WTF::String::substringSharingImpl):
1032         * wtf/text/WTFString.h:
1033
1034 2010-08-18  Gavin Barraclough  <barraclough@apple.com>
1035
1036         Windows build fix.
1037
1038         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1039         * JavaScriptCore.xcodeproj/project.pbxproj:
1040
1041 2010-08-18  Gavin Barraclough  <barraclough@apple.com>
1042
1043         Windows build fix.
1044
1045         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1046         * JavaScriptCore.xcodeproj/project.pbxproj:
1047
1048 2010-08-17  Gavin Barraclough  <barraclough@apple.com>
1049
1050         Reviewed by Sam Weinig.
1051
1052         Bug 44146 - Remove toDouble/toUInt32 methods from UString.
1053
1054         These methods all implement JavaScript language specific behaviour, and as such
1055         are not suited to being on a generic string object.  They are also inefficient
1056         and incorrectly used, refactor & cleanup.  Uses of these methods really divide
1057         out into two cases.
1058
1059         ToNumber:
1060         Uses of toDouble from JSString and from parseFloat are implementing ecma's
1061         ToNumber conversion from strings (see ecma-262 9.3.1), so UString::toDouble
1062         should largely just be moved out to a global jsToNumber function.  ToNumber is
1063         capable of recognizing either decimal or hexadecimal numbers, but parseFloat
1064         should only recognize decimal values.  This is currently handled by testing for
1065         hexadecimal before calling toDouble, which should unnecessary - instead we can
1066         just split out the two parts to the grammar into separate functions. Also,
1067         strtod recognizes a set of literals (nan, inf, and infinity - all with any
1068         capitalization) - which are not defined by any of the specs we are implementing.
1069         To handle this we need to perform additional work in toDouble to convert the
1070         unsupported cases of infinities back to NaNs.  Instead we should simply remove
1071         support for this literals from strtod.  This should provide a more desirable
1072         behaviour for all clients of strtod.
1073
1074         Indexed properties:
1075         Uses of the toStrictUInt32 methods are were all converting property names to
1076         indices, and all uses of toUInt32 were incorrect; in all cases we should have
1077         been calling toUInt32.  This error results in some incorrect behaviour in the
1078         DOM (accessing property "0 " of a NodeList should fail; it currently does not).
1079         Move this method onto Identifier (our canonical property name), and make it
1080         always perform a strict conversion. Add a layout test to check NodeList does
1081         convert indexed property names correctly.
1082
1083         * JavaScriptCore.exp:
1084         * runtime/Arguments.cpp:
1085         (JSC::Arguments::getOwnPropertySlot):
1086         (JSC::Arguments::getOwnPropertyDescriptor):
1087         (JSC::Arguments::put):
1088         (JSC::Arguments::deleteProperty):
1089         * runtime/Identifier.cpp:
1090         (JSC::Identifier::toUInt32):
1091         * runtime/Identifier.h:
1092         (JSC::Identifier::toUInt32):
1093         * runtime/JSArray.cpp:
1094         (JSC::JSArray::getOwnPropertySlot):
1095         (JSC::JSArray::getOwnPropertyDescriptor):
1096         (JSC::JSArray::put):
1097         (JSC::JSArray::deleteProperty):
1098         * runtime/JSArray.h:
1099         (JSC::Identifier::toArrayIndex):
1100         * runtime/JSByteArray.cpp:
1101         (JSC::JSByteArray::getOwnPropertySlot):
1102         (JSC::JSByteArray::getOwnPropertyDescriptor):
1103         (JSC::JSByteArray::put):
1104         * runtime/JSGlobalObjectFunctions.cpp:
1105         (JSC::isInfinity):
1106         (JSC::jsHexIntegerLiteral):
1107         (JSC::jsStrDecimalLiteral):
1108         (JSC::jsToNumber):
1109         (JSC::parseFloat):
1110         * runtime/JSGlobalObjectFunctions.h:
1111         * runtime/JSString.cpp:
1112         (JSC::JSString::getPrimitiveNumber):
1113         (JSC::JSString::toNumber):
1114         (JSC::JSString::getStringPropertyDescriptor):
1115         * runtime/JSString.h:
1116         (JSC::JSString::getStringPropertySlot):
1117         * runtime/ObjectPrototype.cpp:
1118         (JSC::ObjectPrototype::put):
1119         * runtime/StringObject.cpp:
1120         (JSC::StringObject::deleteProperty):
1121         * runtime/UString.cpp:
1122         * runtime/UString.h:
1123         * wtf/dtoa.cpp:
1124         (WTF::strtod):
1125
1126 2010-08-17  Gavin Barraclough  <barraclough@apple.com>
1127
1128         Reviewed by Sam Weinig.
1129
1130         Bug 44099 - REGRESSION(r65468): Crashes in StringImpl::find
1131
1132         Bug 44080 introuduced a couple of cases in which array bounds could be overrun.
1133         One of these was fixed in r65493, this patch fixes the other and address the
1134         concerns voiced in comment #6 by restructuring the loops to remove the code
1135         dupliction without introducing an additional if check.
1136
1137         * wtf/text/StringImpl.cpp:
1138         (WTF::StringImpl::find):
1139         (WTF::StringImpl::findIgnoringCase):
1140         (WTF::StringImpl::reverseFind):
1141         (WTF::StringImpl::reverseFindIgnoringCase):
1142
1143 2010-08-17  No'am Rosenthal  <noam.rosenthal@nokia.com>
1144
1145         Reviewed by Ariya Hidayat.
1146
1147         [Qt] Move the accelerated compositing build flag to the right place
1148         https://bugs.webkit.org/show_bug.cgi?id=43882
1149
1150         * wtf/Platform.h:
1151
1152 2010-08-17  Yuta Kitamura  <yutak@chromium.org>
1153
1154         Reviewed by Shinichiro Hamaji.
1155
1156         Avoid uninitialized memory read in StringImpl::find().
1157
1158         REGRESSION(r65468): Crashes in StringImpl::find
1159         https://bugs.webkit.org/show_bug.cgi?id=44099
1160
1161         * wtf/text/StringImpl.cpp:
1162         (WTF::StringImpl::find):
1163
1164 2010-08-16  Gavin Barraclough  <barraclough@apple.com>
1165
1166         Rubber stamped by Sam Weinig
1167
1168         Add VectorTraits to String & DefaultHash traits to UString to unify behaviour.
1169
1170         * runtime/UString.h:
1171         (JSC::UStringHash::hash):
1172         (JSC::UStringHash::equal):
1173         (WTF::):
1174         * wtf/text/WTFString.h:
1175         (WTF::):
1176
1177 2010-08-16  Gavin Barraclough  <barraclough@apple.com>
1178
1179         Rubber stamped by Sam Weinig
1180
1181         Remove unnecessary includes from UString.h, add new includes as necessary.
1182
1183         * profiler/CallIdentifier.h:
1184         * profiler/ProfileNode.h:
1185         * runtime/DateConversion.cpp:
1186         * runtime/Identifier.h:
1187         (JSC::IdentifierRepHash::hash):
1188         * runtime/RegExpCache.h:
1189         * runtime/RegExpKey.h:
1190         * runtime/UString.cpp:
1191         (JSC::UString::substr):
1192         * runtime/UString.h:
1193         * wtf/text/WTFString.h:
1194
1195 2010-08-16  Gavin Barraclough  <barraclough@apple.com>
1196
1197         Reviewed by Sam Weinig
1198
1199         Bug 44080 - String find/reverseFind methods need tidying up
1200         These methods have a couple of problems with their interface, and implementation.
1201
1202         These methods take and int index, and return an int - however this is problematic
1203         since on 64-bit string indices may have a full 32-bit range.  This spills out into
1204         surrounding code, which unsafely casts string indices from unsigned to int. Code
1205         checking the result of these methods check for a mix of "== -1", "< 0", and
1206         "== notFound".  Clean this up by changing these methods to take an unsigned
1207         starting index, and return a size_t. with a failed match indicated by notFound.
1208         reverseFind also has a special meaning for the starting index argument, in that a
1209         negative index is interpreted as an offset back from the end of the string. Remove
1210         this functionality, in the (1!) case where it is used we should just calculate the
1211         offset by subtracting from the string's length.
1212
1213         The implementation has a few problems too.  The code is not in webkit style, in
1214         using assorted abbreviations in variable names, and implementations of similar
1215         find methods with differing argument types were unnecessarily inconsistent. When
1216         find is passed const char* data the string would be handled as latin1 (zero
1217         extended to UTF-16) for all characters but the first; this is sign extended.
1218         Case-insensitive find is broken for unicode strings; the hashing optimization is
1219         not unicode safe, and could result in false negatives.
1220
1221         Unify UString find methods to match String.
1222
1223         * JavaScriptCore.exp:
1224         * bytecode/CodeBlock.cpp:
1225         (JSC::escapeQuotes):
1226         * bytecompiler/NodesCodegen.cpp:
1227         (JSC::substitute):
1228         * runtime/JSString.cpp:
1229         (JSC::JSString::replaceCharacter):
1230         * runtime/RegExp.cpp:
1231         (JSC::RegExp::RegExp):
1232         * runtime/RegExpKey.h:
1233         (JSC::RegExpKey::getFlagsValue):
1234         * runtime/StringPrototype.cpp:
1235         (JSC::substituteBackreferencesSlow):
1236         (JSC::substituteBackreferences):
1237         (JSC::stringProtoFuncReplace):
1238         (JSC::stringProtoFuncIndexOf):
1239         (JSC::stringProtoFuncLastIndexOf):
1240         (JSC::stringProtoFuncSplit):
1241         * runtime/UString.cpp:
1242         * runtime/UString.h:
1243         (JSC::UString::find):
1244         (JSC::UString::reverseFind):
1245         * wtf/text/AtomicString.h:
1246         (WTF::AtomicString::find):
1247         * wtf/text/StringImpl.cpp:
1248         (WTF::StringImpl::find):
1249         (WTF::StringImpl::findCaseInsensitive):
1250         (WTF::StringImpl::reverseFind):
1251         (WTF::StringImpl::reverseFindCaseInsensitive):
1252         (WTF::StringImpl::endsWith):
1253         (WTF::StringImpl::replace):
1254         * wtf/text/StringImpl.h:
1255         (WTF::StringImpl::startsWith):
1256         * wtf/text/WTFString.cpp:
1257         (WTF::String::split):
1258         * wtf/text/WTFString.h:
1259         (WTF::String::find):
1260         (WTF::String::reverseFind):
1261         (WTF::String::findCaseInsensitive):
1262         (WTF::String::reverseFindCaseInsensitive):
1263         (WTF::String::contains):
1264         (WTF::find):
1265         (WTF::reverseFind):
1266
1267 2010-08-16  Kevin Ollivier  <kevino@theolliviers.com>
1268
1269         [wx] Build fix, do not build WebCore as a convenience library as this leads to
1270         errors in the Win build w/export symbols and causes problems with DOM bindings
1271         debugging in gdb. 
1272
1273         * wscript:
1274
1275 2010-08-16  Leandro Pereira  <leandro@profusion.mobi>
1276
1277         [EFL] Build fix after r65366.
1278
1279         * CMakeLists.txt: Use if (VAR) instead of if (${VAR}) to check if
1280         they're empty.
1281         * jsc/CMakeLists.txt: Ditto.
1282         * wtf/CMakeLists.txt: Ditto.
1283
1284 2010-08-15  Kevin Ollivier  <kevino@theolliviers.com>
1285
1286         [wx] Build fix, don't build intermediate source in DerivedSources dir.
1287
1288         * wscript:
1289
1290 2010-08-14  Patrick Gansterer  <paroga@paroga.com>
1291
1292         Reviewed by Kenneth Rohde Christiansen.
1293
1294         [CMake] Add preprocessor detection for generator scripts
1295         https://bugs.webkit.org/show_bug.cgi?id=43984
1296
1297         * CMakeLists.txt:
1298
1299 2010-08-14  Patrick Gansterer  <paroga@paroga.com>
1300
1301         Reviewed by Kenneth Rohde Christiansen.
1302
1303         [CMake] Set target properties only if available
1304         https://bugs.webkit.org/show_bug.cgi?id=43978
1305
1306         * CMakeLists.txt:
1307         * jsc/CMakeLists.txt:
1308         * wtf/CMakeLists.txt:
1309
1310 2010-08-13  Kevin Ollivier  <kevino@theolliviers.com>
1311
1312         [wx] Build fix, add CString to the list of forwards.
1313
1314         * wtf/Forward.h:
1315
1316 2010-08-13  Gavin Barraclough  <barraclough@apple.com>
1317
1318         Windows build fix
1319
1320         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1321
1322 2010-08-13  Gavin Barraclough  <barraclough@apple.com>
1323
1324         Windows build fix
1325
1326         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1327
1328 2010-08-13  Gavin Barraclough  <barraclough@apple.com>
1329
1330         Windows build fix
1331
1332         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1333
1334 2010-08-13  Gavin Barraclough  <barraclough@apple.com>
1335
1336         Rubber stamped by Sam Weinig.
1337         Switch String::/UString::ascii() to return a CString.
1338
1339         * JavaScriptCore.exp:
1340         * JavaScriptCore.xcodeproj/project.pbxproj:
1341         * bytecode/CodeBlock.cpp:
1342         (JSC::CodeBlock::dump):
1343         * bytecode/SamplingTool.cpp:
1344         (JSC::SamplingTool::dump):
1345         * interpreter/CallFrame.cpp:
1346         (JSC::CallFrame::dumpCaller):
1347         * jsc.cpp:
1348         (runWithScripts):
1349         (runInteractive):
1350         * runtime/Identifier.h:
1351         (JSC::Identifier::ascii):
1352         * runtime/ScopeChain.cpp:
1353         (JSC::ScopeChainNode::print):
1354         * runtime/UString.cpp:
1355         (JSC::UString::ascii):
1356         (JSC::UString::latin1):
1357         * runtime/UString.h:
1358         * wtf/text/StringImpl.cpp:
1359         (WTF::StringImpl::asciiOLD):
1360         * wtf/text/StringImpl.h:
1361         * wtf/text/WTFString.cpp:
1362         (WTF::String::ascii):
1363         (WTF::String::latin1):
1364         * wtf/text/WTFString.h:
1365
1366 2010-08-13  Gabor Loki  <loki@webkit.org>
1367
1368         Reviewed by Gavin Barraclough.
1369
1370         Avoid increasing required alignment of target type warning on ARM
1371         https://bugs.webkit.org/show_bug.cgi?id=38045
1372
1373         The reinterpret_cast<Type1*>([pointer to Type2]) expressions - where
1374         sizeof(Type1) > sizeof(Type2) - cause the following warning on ARM:
1375         increases required alignment of target type warnings.
1376         Casting the type of [pointer to Type2] object to void* bypasses the
1377         warning.
1378
1379         * assembler/ARMAssembler.cpp:
1380         (JSC::ARMAssembler::executableCopy):
1381         * assembler/AssemblerBuffer.h:
1382         (JSC::AssemblerBuffer::putShortUnchecked):
1383         (JSC::AssemblerBuffer::putIntUnchecked):
1384         (JSC::AssemblerBuffer::putInt64Unchecked):
1385         * interpreter/RegisterFile.h:
1386         (JSC::RegisterFile::RegisterFile):
1387         (JSC::RegisterFile::grow):
1388         * jit/JITStubs.cpp:
1389         * pcre/pcre_compile.cpp:
1390         (jsRegExpCompile):
1391         * runtime/JSArray.cpp:
1392         (JSC::JSArray::putSlowCase):
1393         (JSC::JSArray::increaseVectorLength):
1394         (JSC::JSArray::increaseVectorPrefixLength):
1395         (JSC::JSArray::shiftCount):
1396         (JSC::JSArray::unshiftCount):
1397         * wtf/FastMalloc.cpp:
1398         (WTF::PageHeapAllocator::New):
1399         (WTF::TCMalloc_Central_FreeList::Populate):
1400         * wtf/MD5.cpp:
1401         (WTF::reverseBytes):
1402         (WTF::MD5::addBytes):
1403         (WTF::MD5::checksum):
1404         * wtf/StdLibExtras.h:
1405         (isPointerTypeAlignmentOkay):
1406         (reinterpret_cast_ptr):
1407         * wtf/Vector.h:
1408         (WTF::VectorBuffer::inlineBuffer):
1409         * wtf/qt/StringQt.cpp:
1410         (WTF::String::String):
1411
1412 2010-08-13  Gavin Barraclough  <barraclough@apple.com>
1413
1414         Reviewed by Sam Weinig
1415
1416         Unify UString::UTF8String() & String::utf8() methods,
1417         remove UString::cost() & make atArrayIndex a free function.
1418
1419         * JavaScriptCore.exp:
1420         * bytecode/CodeBlock.cpp:
1421         (JSC::constantName):
1422         (JSC::idName):
1423         (JSC::CodeBlock::registerName):
1424         (JSC::regexpName):
1425         (JSC::printGlobalResolveInfo):
1426         (JSC::printStructureStubInfo):
1427         (JSC::CodeBlock::printStructure):
1428         (JSC::CodeBlock::printStructures):
1429         * jsc.cpp:
1430         (functionPrint):
1431         (functionDebug):
1432         (runInteractive):
1433         (fillBufferWithContentsOfFile):
1434         * pcre/pcre_exec.cpp:
1435         (Histogram::~Histogram):
1436         * profiler/CallIdentifier.h:
1437         (JSC::CallIdentifier::c_str):
1438         * profiler/Profile.cpp:
1439         (JSC::Profile::debugPrintDataSampleStyle):
1440         * profiler/ProfileGenerator.cpp:
1441         (JSC::ProfileGenerator::willExecute):
1442         (JSC::ProfileGenerator::didExecute):
1443         * profiler/ProfileNode.cpp:
1444         (JSC::ProfileNode::debugPrintData):
1445         (JSC::ProfileNode::debugPrintDataSampleStyle):
1446         * runtime/Arguments.cpp:
1447         (JSC::Arguments::getOwnPropertySlot):
1448         (JSC::Arguments::getOwnPropertyDescriptor):
1449         (JSC::Arguments::put):
1450         (JSC::Arguments::deleteProperty):
1451         * runtime/DateConversion.cpp:
1452         (JSC::parseDate):
1453         * runtime/Identifier.h:
1454         (JSC::Identifier::toStrictUInt32):
1455         * runtime/JSArray.cpp:
1456         (JSC::JSArray::getOwnPropertySlot):
1457         (JSC::JSArray::getOwnPropertyDescriptor):
1458         (JSC::JSArray::put):
1459         (JSC::JSArray::deleteProperty):
1460         * runtime/JSArray.h:
1461         (JSC::toArrayIndex):
1462         * runtime/JSGlobalObjectFunctions.cpp:
1463         (JSC::encode):
1464         (JSC::parseInt):
1465         (JSC::globalFuncJSCPrint):
1466         * runtime/JSString.h:
1467         (JSC::RopeBuilder::JSString):
1468         * runtime/UString.cpp:
1469         (JSC::UString::toDouble):
1470         (JSC::putUTF8Triple):
1471         (JSC::UString::utf8):
1472         * runtime/UString.h:
1473         (JSC::UString::~UString):
1474         (JSC::UString::isNull):
1475         (JSC::UString::isEmpty):
1476         (JSC::UString::impl):
1477         * wtf/text/WTFString.cpp:
1478         (WTF::String::utf8):
1479         * wtf/text/WTFString.h:
1480         (WTF::String::~String):
1481         (WTF::String::swap):
1482         (WTF::String::isNull):
1483         (WTF::String::isEmpty):
1484         (WTF::String::impl):
1485         (WTF::String::length):
1486         (WTF::String::String):
1487         (WTF::String::isHashTableDeletedValue):
1488
1489 2010-08-12  Zoltan Herczeg  <zherczeg@webkit.org>
1490
1491         Reviewed by Gavin Barraclough.
1492
1493         Refactoring the fpu code generator for the ARM port
1494         https://bugs.webkit.org/show_bug.cgi?id=43842
1495
1496         Support up to 32 double precision registers, and the
1497         recent VFP instruction formats. This patch is mainly
1498         a style change which keeps the current functionality.
1499
1500         * assembler/ARMAssembler.h:
1501         (JSC::ARMRegisters::):
1502         (JSC::ARMAssembler::):
1503         (JSC::ARMAssembler::emitInst):
1504         (JSC::ARMAssembler::emitDoublePrecisionInst):
1505         (JSC::ARMAssembler::emitSinglePrecisionInst):
1506         (JSC::ARMAssembler::vadd_f64_r):
1507         (JSC::ARMAssembler::vdiv_f64_r):
1508         (JSC::ARMAssembler::vsub_f64_r):
1509         (JSC::ARMAssembler::vmul_f64_r):
1510         (JSC::ARMAssembler::vcmp_f64_r):
1511         (JSC::ARMAssembler::vsqrt_f64_r):
1512         (JSC::ARMAssembler::vmov_vfp_r):
1513         (JSC::ARMAssembler::vmov_arm_r):
1514         (JSC::ARMAssembler::vcvt_f64_s32_r):
1515         (JSC::ARMAssembler::vcvt_s32_f64_r):
1516         (JSC::ARMAssembler::vmrs_apsr):
1517         * assembler/MacroAssemblerARM.h:
1518         (JSC::MacroAssemblerARM::addDouble):
1519         (JSC::MacroAssemblerARM::divDouble):
1520         (JSC::MacroAssemblerARM::subDouble):
1521         (JSC::MacroAssemblerARM::mulDouble):
1522         (JSC::MacroAssemblerARM::sqrtDouble):
1523         (JSC::MacroAssemblerARM::convertInt32ToDouble):
1524         (JSC::MacroAssemblerARM::branchDouble):
1525         (JSC::MacroAssemblerARM::branchConvertDoubleToInt32):
1526
1527 2010-08-12  Sheriff Bot  <webkit.review.bot@gmail.com>
1528
1529         Unreviewed, rolling out r65295.
1530         http://trac.webkit.org/changeset/65295
1531         https://bugs.webkit.org/show_bug.cgi?id=43950
1532
1533         It broke 4 sputnik tests (Requested by Ossy on #webkit).
1534
1535         * JavaScriptCore.exp:
1536         * bytecode/CodeBlock.cpp:
1537         (JSC::constantName):
1538         (JSC::idName):
1539         (JSC::CodeBlock::registerName):
1540         (JSC::regexpName):
1541         (JSC::printGlobalResolveInfo):
1542         (JSC::printStructureStubInfo):
1543         (JSC::CodeBlock::printStructure):
1544         (JSC::CodeBlock::printStructures):
1545         * jsc.cpp:
1546         (functionPrint):
1547         (functionDebug):
1548         (runInteractive):
1549         (fillBufferWithContentsOfFile):
1550         * pcre/pcre_exec.cpp:
1551         (Histogram::~Histogram):
1552         * profiler/CallIdentifier.h:
1553         (JSC::CallIdentifier::c_str):
1554         * profiler/Profile.cpp:
1555         (JSC::Profile::debugPrintDataSampleStyle):
1556         * profiler/ProfileGenerator.cpp:
1557         (JSC::ProfileGenerator::willExecute):
1558         (JSC::ProfileGenerator::didExecute):
1559         * profiler/ProfileNode.cpp:
1560         (JSC::ProfileNode::debugPrintData):
1561         (JSC::ProfileNode::debugPrintDataSampleStyle):
1562         * runtime/Arguments.cpp:
1563         (JSC::Arguments::getOwnPropertySlot):
1564         (JSC::Arguments::getOwnPropertyDescriptor):
1565         (JSC::Arguments::put):
1566         (JSC::Arguments::deleteProperty):
1567         * runtime/DateConversion.cpp:
1568         (JSC::parseDate):
1569         * runtime/Identifier.h:
1570         (JSC::Identifier::Identifier):
1571         (JSC::Identifier::toArrayIndex):
1572         * runtime/JSArray.cpp:
1573         (JSC::JSArray::getOwnPropertySlot):
1574         (JSC::JSArray::getOwnPropertyDescriptor):
1575         (JSC::JSArray::put):
1576         (JSC::JSArray::deleteProperty):
1577         * runtime/JSArray.h:
1578         * runtime/JSGlobalObjectFunctions.cpp:
1579         (JSC::encode):
1580         (JSC::parseInt):
1581         (JSC::globalFuncJSCPrint):
1582         * runtime/JSString.h:
1583         (JSC::RopeBuilder::JSString):
1584         * runtime/UString.cpp:
1585         (JSC::UString::toDouble):
1586         (JSC::UString::UTF8String):
1587         * runtime/UString.h:
1588         (JSC::UString::isNull):
1589         (JSC::UString::isEmpty):
1590         (JSC::UString::impl):
1591         (JSC::UString::cost):
1592         (JSC::UString::~UString):
1593         (JSC::UString::toArrayIndex):
1594         * wtf/text/WTFString.cpp:
1595         (WTF::String::utf8):
1596         * wtf/text/WTFString.h:
1597         (WTF::String::String):
1598         (WTF::String::isHashTableDeletedValue):
1599         (WTF::String::length):
1600         (WTF::String::operator[]):
1601         (WTF::String::isNull):
1602         (WTF::String::isEmpty):
1603         (WTF::String::impl):
1604
1605 2010-08-12  Gavin Barraclough  <barraclough@apple.com>
1606
1607         Windows build fix.
1608
1609         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1610
1611 2010-08-12  Gavin Barraclough  <barraclough@apple.com>
1612
1613         Reviewed by Sam Weinig
1614
1615         Unify UString::UTF8String() & String::utf8() methods,
1616         remove UString::cost() & make atArrayIndex a free function.
1617
1618         * JavaScriptCore.exp:
1619         * bytecode/CodeBlock.cpp:
1620         (JSC::constantName):
1621         (JSC::idName):
1622         (JSC::CodeBlock::registerName):
1623         (JSC::regexpName):
1624         (JSC::printGlobalResolveInfo):
1625         (JSC::printStructureStubInfo):
1626         (JSC::CodeBlock::printStructure):
1627         (JSC::CodeBlock::printStructures):
1628         * jsc.cpp:
1629         (functionPrint):
1630         (functionDebug):
1631         (runInteractive):
1632         (fillBufferWithContentsOfFile):
1633         * pcre/pcre_exec.cpp:
1634         (Histogram::~Histogram):
1635         * profiler/CallIdentifier.h:
1636         (JSC::CallIdentifier::c_str):
1637         * profiler/Profile.cpp:
1638         (JSC::Profile::debugPrintDataSampleStyle):
1639         * profiler/ProfileGenerator.cpp:
1640         (JSC::ProfileGenerator::willExecute):
1641         (JSC::ProfileGenerator::didExecute):
1642         * profiler/ProfileNode.cpp:
1643         (JSC::ProfileNode::debugPrintData):
1644         (JSC::ProfileNode::debugPrintDataSampleStyle):
1645         * runtime/Arguments.cpp:
1646         (JSC::Arguments::getOwnPropertySlot):
1647         (JSC::Arguments::getOwnPropertyDescriptor):
1648         (JSC::Arguments::put):
1649         (JSC::Arguments::deleteProperty):
1650         * runtime/DateConversion.cpp:
1651         (JSC::parseDate):
1652         * runtime/Identifier.h:
1653         (JSC::Identifier::toStrictUInt32):
1654         * runtime/JSArray.cpp:
1655         (JSC::JSArray::getOwnPropertySlot):
1656         (JSC::JSArray::getOwnPropertyDescriptor):
1657         (JSC::JSArray::put):
1658         (JSC::JSArray::deleteProperty):
1659         * runtime/JSArray.h:
1660         (JSC::toArrayIndex):
1661         * runtime/JSGlobalObjectFunctions.cpp:
1662         (JSC::encode):
1663         (JSC::parseInt):
1664         (JSC::globalFuncJSCPrint):
1665         * runtime/JSString.h:
1666         (JSC::RopeBuilder::JSString):
1667         * runtime/UString.cpp:
1668         (JSC::UString::toDouble):
1669         (JSC::putUTF8Triple):
1670         (JSC::UString::utf8):
1671         * runtime/UString.h:
1672         (JSC::UString::~UString):
1673         (JSC::UString::isNull):
1674         (JSC::UString::isEmpty):
1675         (JSC::UString::impl):
1676         * wtf/text/WTFString.cpp:
1677         (WTF::String::utf8):
1678         * wtf/text/WTFString.h:
1679         (WTF::String::~String):
1680         (WTF::String::swap):
1681         (WTF::String::isNull):
1682         (WTF::String::isEmpty):
1683         (WTF::String::impl):
1684         (WTF::String::length):
1685         (WTF::String::String):
1686         (WTF::String::isHashTableDeletedValue):
1687
1688 2010-08-12  Gavin Barraclough  <barraclough@apple.com>
1689
1690         Eeerk! - revert accidentally committed changes in UString!
1691
1692         * JavaScriptCore.exp:
1693         * runtime/UString.cpp:
1694         (JSC::UString::UString):
1695         * runtime/UString.h:
1696
1697 2010-08-12  Gavin Barraclough  <barraclough@apple.com>
1698
1699         Reviewed by Sam Weinig
1700
1701         Change UString constructors to match those in WTF::String.
1702         This changes behaviour of UString((char*)0) to create null
1703         strings, akin to UString() rather than UString::empty().
1704         (This matches String).  Remove unused constructors from
1705         UString, and add null-terminated UTF-16 constructor, to
1706         match String.  Move String's constructor into the .cpp to
1707         match UString.
1708
1709         * JavaScriptCore.exp:
1710         * debugger/DebuggerCallFrame.cpp:
1711         (JSC::DebuggerCallFrame::calculatedFunctionName):
1712         * runtime/RegExpKey.h:
1713         (JSC::RegExpKey::RegExpKey):
1714         * runtime/SmallStrings.cpp:
1715         (JSC::SmallStrings::createSingleCharacterString):
1716         * runtime/UString.cpp:
1717         (JSC::UString::UString):
1718         * runtime/UString.h:
1719         (JSC::UString::UString):
1720         (JSC::UString::swap):
1721         (JSC::UString::adopt):
1722         (JSC::UString::operator[]):
1723         * wtf/text/WTFString.h:
1724         (WTF::String::String):
1725         (WTF::String::adopt):
1726         (WTF::String::operator[]):
1727
1728 2010-08-12  David Levin  <levin@chromium.org>
1729
1730         Reviewed by NOBODY (build fix).
1731
1732         * runtime/UString.h: Removed unneccessary #include.
1733
1734 2010-08-12  Gavin Barraclough  <barraclough@apple.com>
1735
1736         Reviewed by Sam Weinig
1737
1738         Revert changes to ALWAYS_INLINEness of a couple of functions in UString.
1739         This appears to have degraded performance.
1740
1741         * runtime/UString.cpp:
1742         (JSC::UString::ascii):
1743         * runtime/UString.h:
1744         (JSC::UString::length):
1745         (JSC::UString::isEmpty):
1746         (JSC::UString::~UString):
1747
1748 2010-08-12  Csaba Osztrogonác  <ossy@webkit.org>
1749
1750         Reviewed by Antonio Gomes.
1751
1752         [Qt] Fix warnings: unknown conversion type character 'l' in format
1753         https://bugs.webkit.org/show_bug.cgi?id=43359
1754
1755         Qt port doesn't call any printf in String::format(...), consequently
1756         using __attribute__((format(printf,m,n))) is incorrect and causes
1757         false positive warnings on Windows if you build with MinGW.
1758
1759         Qt port calls QString::vsprintf(...) , which is platform
1760         independent, and handles %lli, %llu and %llx on all platforms.
1761         (http://trac.webkit.org/changeset/35712)
1762
1763         * wtf/text/WTFString.h:
1764
1765 2010-08-12  Gabor Loki  <loki@webkit.org>
1766
1767         Reviewed by Geoffrey Garen.
1768
1769         Fix the array subscript is above array bounds warning in ByteArray on ARM.
1770         https://bugs.webkit.org/show_bug.cgi?id=43358
1771
1772         The warning is very similar to this one: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37861
1773
1774         * wtf/ByteArray.cpp:
1775         (WTF::ByteArray::create):
1776
1777 2010-08-12  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
1778
1779         Reviewed by Martin Robinson.
1780
1781         [GTK] Use GSettings to save/restore Web Inspector settings
1782         https://bugs.webkit.org/show_bug.cgi?id=43512
1783
1784         * wtf/gobject/GRefPtr.cpp: Added support for GVariant, used by our
1785         GSettings support.
1786         (WTF::refGPtr):
1787         (WTF::derefGPtr):
1788         * wtf/gobject/GRefPtr.h:
1789
1790 2010-08-12  Gabor Loki  <loki@webkit.org>
1791
1792         Reviewed by Simon Hausmann.
1793
1794         The scratch register should be saved in YARR with ARM JIT
1795         https://bugs.webkit.org/show_bug.cgi?id=43910
1796
1797         Reported by Jocelyn Turcotte.
1798
1799         * yarr/RegexJIT.cpp:
1800         (JSC::Yarr::RegexGenerator::generateEnter):
1801         (JSC::Yarr::RegexGenerator::generateReturn):
1802
1803 2010-08-11  Gavin Barraclough  <barraclough@apple.com>
1804
1805         Windows build fix.
1806
1807         * JavaScriptCore.xcodeproj/project.pbxproj:
1808         * wtf/Forward.h:
1809
1810 2010-08-11  Leo Yang  <leo.yang@torchmobile.com.cn>
1811
1812         Reviewed by Geoffrey Garen.
1813
1814         Date("") should be an invalid date. For IE, Firefox and Chrome, Date("") is invalid date,
1815         which means isNaN(new Date("")) should return true.
1816         https://bugs.webkit.org/show_bug.cgi?id=43793
1817         Tests: fast/js/date-constructor.html
1818
1819         * runtime/JSGlobalData.cpp:
1820         (JSC::JSGlobalData::resetDateCache):
1821
1822 2010-08-11  Gavin Barraclough  <barraclough@apple.com>
1823
1824         Windows & !JIT build fix.
1825
1826         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1827         * JavaScriptCore.xcodeproj/project.pbxproj:
1828         * runtime/RegExp.cpp:
1829         (JSC::RegExp::match):
1830
1831 2010-08-11  Gavin Barraclough  <barraclough@apple.com>
1832
1833         Rubber stamp by sam weinig
1834
1835         Touch a file to stop the bot rolling a bit change out!
1836
1837         * runtime/UString.cpp:
1838         (JSC::UString::ascii):
1839
1840 2010-08-11  Kevin Ollivier  <kevino@theolliviers.com>
1841
1842         [wx] Build fix for wx and WebDOM bindings, add CString classes to the list of forwards.
1843
1844         * wtf/Forward.h:
1845
1846 2010-08-11  Gavin Barraclough  <barraclough@apple.com>
1847
1848         Rubber stamps by Darin Adler & Sam Weinig.
1849
1850         Bug 43867 - Some UString cleanup
1851
1852         Change JSC::UString data(), size(), and from(), to characters(), length(), and number() to match WTF::String.
1853         Move string concatenation methods to a new header to simplify down UString.h.  Remove is8Bit().
1854
1855         * API/JSClassRef.cpp:
1856         (OpaqueJSClass::~OpaqueJSClass):
1857         (OpaqueJSClass::className):
1858         * API/OpaqueJSString.cpp:
1859         (OpaqueJSString::create):
1860         * JavaScriptCore.exp:
1861         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1862         * JavaScriptCore.xcodeproj/project.pbxproj:
1863         * bytecode/CodeBlock.cpp:
1864         (JSC::constantName):
1865         (JSC::idName):
1866         (JSC::CodeBlock::registerName):
1867         (JSC::regexpName):
1868         * bytecode/EvalCodeCache.h:
1869         (JSC::EvalCodeCache::get):
1870         * bytecompiler/NodesCodegen.cpp:
1871         (JSC::ResolveNode::emitBytecode):
1872         (JSC::FunctionCallResolveNode::emitBytecode):
1873         (JSC::ReadModifyResolveNode::emitBytecode):
1874         (JSC::processClauseList):
1875         * parser/ASTBuilder.h:
1876         (JSC::ASTBuilder::createRegex):
1877         * parser/ParserArena.h:
1878         (JSC::IdentifierArena::makeNumericIdentifier):
1879         * parser/SourceProvider.h:
1880         (JSC::UStringSourceProvider::data):
1881         (JSC::UStringSourceProvider::length):
1882         * profiler/Profiler.cpp:
1883         * runtime/Arguments.cpp:
1884         (JSC::Arguments::getOwnPropertySlot):
1885         (JSC::Arguments::getOwnPropertyNames):
1886         (JSC::Arguments::put):
1887         (JSC::Arguments::deleteProperty):
1888         * runtime/ArrayPrototype.cpp:
1889         (JSC::arrayProtoFuncToString):
1890         * runtime/DatePrototype.cpp:
1891         (JSC::formatLocaleDate):
1892         * runtime/ExceptionHelpers.cpp:
1893         * runtime/FunctionConstructor.cpp:
1894         * runtime/FunctionPrototype.cpp:
1895         (JSC::insertSemicolonIfNeeded):
1896         * runtime/Identifier.h:
1897         (JSC::Identifier::characters):
1898         (JSC::Identifier::length):
1899         * runtime/JSGlobalObjectFunctions.cpp:
1900         (JSC::decode):
1901         (JSC::parseInt):
1902         (JSC::parseFloat):
1903         (JSC::globalFuncEscape):
1904         (JSC::globalFuncUnescape):
1905         * runtime/JSNumberCell.cpp:
1906         (JSC::JSNumberCell::toString):
1907         * runtime/JSONObject.cpp:
1908         (JSC::gap):
1909         (JSC::Stringifier::appendQuotedString):
1910         (JSC::Stringifier::appendStringifiedValue):
1911         (JSC::Stringifier::indent):
1912         (JSC::Stringifier::unindent):
1913         (JSC::Walker::walk):
1914         * runtime/JSString.cpp:
1915         (JSC::JSString::replaceCharacter):
1916         (JSC::JSString::getIndexSlowCase):
1917         * runtime/JSString.h:
1918         (JSC::RopeBuilder::JSString):
1919         (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
1920         (JSC::RopeBuilder::fiberCount):
1921         (JSC::jsSingleCharacterSubstring):
1922         (JSC::jsNontrivialString):
1923         (JSC::JSString::getIndex):
1924         (JSC::jsString):
1925         (JSC::jsStringWithFinalizer):
1926         (JSC::jsSubstring):
1927         (JSC::jsOwnedString):
1928         * runtime/JSStringBuilder.h:
1929         (JSC::JSStringBuilder::append):
1930         * runtime/LiteralParser.h:
1931         (JSC::LiteralParser::Lexer::Lexer):
1932         * runtime/NumberPrototype.cpp:
1933         (JSC::numberProtoFuncToString):
1934         (JSC::numberProtoFuncToFixed):
1935         (JSC::numberProtoFuncToExponential):
1936         (JSC::numberProtoFuncToPrecision):
1937         * runtime/NumericStrings.h:
1938         (JSC::NumericStrings::add):
1939         (JSC::NumericStrings::lookupSmallString):
1940         * runtime/Operations.h:
1941         (JSC::jsString):
1942         * runtime/RegExp.cpp:
1943         (JSC::RegExp::match):
1944         * runtime/RegExpCache.cpp:
1945         (JSC::RegExpCache::lookupOrCreate):
1946         (JSC::RegExpCache::create):
1947         * runtime/RegExpConstructor.cpp:
1948         (JSC::RegExpConstructor::getRightContext):
1949         * runtime/RegExpObject.cpp:
1950         (JSC::RegExpObject::match):
1951         * runtime/RegExpPrototype.cpp:
1952         (JSC::regExpProtoFuncToString):
1953         * runtime/StringBuilder.h:
1954         (JSC::StringBuilder::append):
1955         * runtime/StringConcatenate.h: Copied from JavaScriptCore/runtime/UString.h.
1956         (JSC::):
1957         (JSC::sumWithOverflow):
1958         (JSC::tryMakeString):
1959         (JSC::makeString):
1960         * runtime/StringObject.cpp:
1961         (JSC::StringObject::getOwnPropertyNames):
1962         * runtime/StringPrototype.cpp:
1963         (JSC::substituteBackreferencesSlow):
1964         (JSC::localeCompare):
1965         (JSC::jsSpliceSubstringsWithSeparators):
1966         (JSC::stringProtoFuncReplace):
1967         (JSC::stringProtoFuncCharAt):
1968         (JSC::stringProtoFuncCharCodeAt):
1969         (JSC::stringProtoFuncIndexOf):
1970         (JSC::stringProtoFuncLastIndexOf):
1971         (JSC::stringProtoFuncSlice):
1972         (JSC::stringProtoFuncSplit):
1973         (JSC::stringProtoFuncSubstr):
1974         (JSC::stringProtoFuncSubstring):
1975         (JSC::stringProtoFuncToLowerCase):
1976         (JSC::stringProtoFuncToUpperCase):
1977         (JSC::stringProtoFuncFontsize):
1978         (JSC::stringProtoFuncLink):
1979         (JSC::trimString):
1980         * runtime/UString.cpp:
1981         (JSC::UString::number):
1982         (JSC::UString::ascii):
1983         (JSC::UString::operator[]):
1984         (JSC::UString::toDouble):
1985         (JSC::UString::find):
1986         (JSC::UString::rfind):
1987         (JSC::UString::substr):
1988         (JSC::operator==):
1989         (JSC::operator<):
1990         (JSC::operator>):
1991         (JSC::UString::UTF8String):
1992         * runtime/UString.h:
1993         (JSC::UString::UString):
1994         (JSC::UString::adopt):
1995         (JSC::UString::length):
1996         (JSC::UString::characters):
1997         (JSC::UString::isNull):
1998         (JSC::UString::isEmpty):
1999         (JSC::UString::impl):
2000         (JSC::UString::cost):
2001         (JSC::operator==):
2002         (JSC::operator!=):
2003         (JSC::codePointCompare):
2004         (JSC::UString::toArrayIndex):
2005         (JSC::IdentifierRepHash::hash):
2006         (WTF::):
2007         * yarr/RegexJIT.cpp:
2008         (JSC::Yarr::jitCompileRegex):
2009         * yarr/RegexParser.h:
2010         (JSC::Yarr::Parser::Parser):
2011
2012 2010-08-11  Gabor Loki  <loki@webkit.org>
2013
2014         Qt build fix (ARMv7).
2015
2016         Fix invalid conversion from int to Condition.
2017         Add ARMv7Assembler.cpp to JavaScriptCore.pro.
2018
2019         * JavaScriptCore.pro:
2020         * assembler/ARMv7Assembler.h:
2021         (JSC::ARMv7Assembler::):
2022         (JSC::ARMv7Assembler::JmpSrc::JmpSrc):
2023
2024 2010-08-11  Nathan Lawrence  <nlawrence@apple.com>
2025
2026         Reviewed by Geoffrey Garen.
2027
2028         At collection time, we frequently want to mark a cell, while checking
2029         whether it was originally checked.  Previously, this was a get
2030         operation follwed by a set operation.  Fusing the two saves
2031         computation and gives a 0.5% sunspider speedup.
2032
2033         * runtime/Collector.h:
2034         (JSC::CollectorBitmap::getset):
2035         (JSC::Heap::checkMarkCell):
2036         * runtime/JSArray.h:
2037         (JSC::MarkStack::drain):
2038         * runtime/JSCell.h:
2039         (JSC::MarkStack::append):
2040
2041 2010-08-11  Steve Falkenburg  <sfalken@apple.com>
2042
2043         Reviewed by Adam Roben.
2044
2045         Improve vsprops copying for Windows build
2046         https://bugs.webkit.org/show_bug.cgi?id=41982
2047
2048         When we detect a new SDK, always copy a new set of vsprops files.
2049         Previously, if someone updated their SDK after updating their sources,
2050         they could end up with out-of-date vsprops files.
2051
2052         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2053
2054 2010-08-10  Darin Adler  <darin@apple.com>
2055
2056         Reviewed by Sam Weinig.
2057
2058         Add leakRef and clear to all RefPtr variants
2059         https://bugs.webkit.org/show_bug.cgi?id=42389
2060
2061         * API/JSRetainPtr.h: Changed all uses of "template <...>" to instead do
2062         "template<...>". We should probably put this in the style guide and do it
2063         consitently. Fixed other minor style issues. Defined many of the inlined
2064         functions outside the class definition, to avoid style checker warnings
2065         about multiple statements on a single line and for slightly better clarity
2066         of the class definition itself. Renamed releaseRef to leakRef. Added a
2067         releaseRef that calls leakRef so we don't have to rename all callers oat
2068         once. Added a clear function.
2069
2070         * wtf/PassRefPtr.h: Changed all uses of releaseRef to leakRef.
2071
2072         * wtf/RefPtr.h: Changed all uses of "template <...>" to instead do
2073         "template<...>". Tidied up declarations and comments a bit.
2074          Changed all uses of releaseRef to leakRef.
2075
2076         * wtf/RetainPtr.h: Changed all uses of "template <...>" to instead do
2077         "template<...>". Defined many of the inlined functions outside the class
2078         definition, to avoid style checker warnings about multiple statements on
2079         a single line and for slightly better clarity of the class definition itself.
2080         Renamed releaseRef to leakRef. Added a releaseRef that calls leakRef so we
2081         don't have to rename all callers at once. Added a clear function.
2082
2083 2010-08-10  Dumitru Daniliuc  <dumi@chromium.org>
2084
2085         Unreviewed, reverting an unintentional change to a file submitted in r65108.
2086
2087         * bytecode/CodeBlock.h:
2088         (JSC::binaryChop):
2089
2090 2010-08-10  Gavin Barraclough  <barraclough@apple.com>
2091
2092         Rubber stamped by Sam Weinig
2093
2094         Bug 43817 - Remove UString::Rep
2095         UString::Rep has for a long time been replaced by UStringImpl (Rep
2096         remaining as a typedef).  UStringImpl has since been removed too
2097         (unified with StringImpl). Remove Rep, rename rep() to impl() and
2098         m_rep to m_impl.  Also add impl() method to Identifier, and rename
2099         its UString member from _ustring to m_string.
2100
2101         * API/JSCallbackObject.h:
2102         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
2103         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
2104         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::deletePrivateProperty):
2105         * API/JSCallbackObjectFunctions.h:
2106         (JSC::::getOwnPropertySlot):
2107         (JSC::::put):
2108         (JSC::::deleteProperty):
2109         (JSC::::getOwnPropertyNames):
2110         (JSC::::staticValueGetter):
2111         (JSC::::staticFunctionGetter):
2112         * API/JSClassRef.cpp:
2113         (tryCreateStringFromUTF8):
2114         (OpaqueJSClass::OpaqueJSClass):
2115         (OpaqueJSClass::~OpaqueJSClass):
2116         (OpaqueJSClassContextData::OpaqueJSClassContextData):
2117         * API/JSClassRef.h:
2118         * API/OpaqueJSString.cpp:
2119         (OpaqueJSString::ustring):
2120         * bytecode/EvalCodeCache.h:
2121         (JSC::EvalCodeCache::get):
2122         * bytecode/JumpTable.h:
2123         (JSC::StringJumpTable::offsetForValue):
2124         (JSC::StringJumpTable::ctiForValue):
2125         * bytecompiler/BytecodeGenerator.cpp:
2126         (JSC::BytecodeGenerator::addVar):
2127         (JSC::BytecodeGenerator::addGlobalVar):
2128         (JSC::BytecodeGenerator::BytecodeGenerator):
2129         (JSC::BytecodeGenerator::addParameter):
2130         (JSC::BytecodeGenerator::registerFor):
2131         (JSC::BytecodeGenerator::willResolveToArguments):
2132         (JSC::BytecodeGenerator::uncheckedRegisterForArguments):
2133         (JSC::BytecodeGenerator::constRegisterFor):
2134         (JSC::BytecodeGenerator::isLocal):
2135         (JSC::BytecodeGenerator::isLocalConstant):
2136         (JSC::BytecodeGenerator::addConstant):
2137         (JSC::BytecodeGenerator::emitLoad):
2138         (JSC::BytecodeGenerator::findScopedProperty):
2139         (JSC::keyForCharacterSwitch):
2140         (JSC::prepareJumpTableForStringSwitch):
2141         * bytecompiler/BytecodeGenerator.h:
2142         * bytecompiler/NodesCodegen.cpp:
2143         (JSC::processClauseList):
2144         * interpreter/Interpreter.cpp:
2145         (JSC::Interpreter::privateExecute):
2146         * jit/JITStubs.cpp:
2147         (JSC::DEFINE_STUB_FUNCTION):
2148         * parser/JSParser.cpp:
2149         (JSC::JSParser::parseStrictObjectLiteral):
2150         * pcre/pcre_exec.cpp:
2151         (Histogram::add):
2152         * profiler/CallIdentifier.h:
2153         (JSC::CallIdentifier::Hash::hash):
2154         * profiler/Profile.cpp:
2155         * profiler/ProfileNode.cpp:
2156         (JSC::ProfileNode::debugPrintDataSampleStyle):
2157         * profiler/ProfileNode.h:
2158         * runtime/ArrayPrototype.cpp:
2159         (JSC::arrayProtoFuncToString):
2160         * runtime/Identifier.cpp:
2161         (JSC::Identifier::equal):
2162         (JSC::IdentifierCStringTranslator::hash):
2163         (JSC::IdentifierCStringTranslator::equal):
2164         (JSC::IdentifierCStringTranslator::translate):
2165         (JSC::Identifier::add):
2166         (JSC::IdentifierUCharBufferTranslator::hash):
2167         (JSC::IdentifierUCharBufferTranslator::equal):
2168         (JSC::IdentifierUCharBufferTranslator::translate):
2169         (JSC::Identifier::addSlowCase):
2170         * runtime/Identifier.h:
2171         (JSC::Identifier::Identifier):
2172         (JSC::Identifier::ustring):
2173         (JSC::Identifier::impl):
2174         (JSC::Identifier::data):
2175         (JSC::Identifier::size):
2176         (JSC::Identifier::ascii):
2177         (JSC::Identifier::isNull):
2178         (JSC::Identifier::isEmpty):
2179         (JSC::Identifier::toUInt32):
2180         (JSC::Identifier::toStrictUInt32):
2181         (JSC::Identifier::toArrayIndex):
2182         (JSC::Identifier::toDouble):
2183         (JSC::Identifier::equal):
2184         (JSC::Identifier::add):
2185         * runtime/InitializeThreading.cpp:
2186         (JSC::initializeThreadingOnce):
2187         * runtime/InternalFunction.cpp:
2188         (JSC::InternalFunction::displayName):
2189         * runtime/JSFunction.cpp:
2190         (JSC::JSFunction::displayName):
2191         * runtime/JSGlobalObject.h:
2192         (JSC::JSGlobalObject::addStaticGlobals):
2193         * runtime/JSStaticScopeObject.h:
2194         (JSC::JSStaticScopeObject::JSStaticScopeObject):
2195         * runtime/JSString.h:
2196         (JSC::):
2197         (JSC::RopeBuilder::appendStringInConstruct):
2198         (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
2199         (JSC::jsSingleCharacterSubstring):
2200         (JSC::jsSubstring):
2201         * runtime/JSVariableObject.cpp:
2202         (JSC::JSVariableObject::deleteProperty):
2203         (JSC::JSVariableObject::symbolTableGet):
2204         * runtime/JSVariableObject.h:
2205         (JSC::JSVariableObject::symbolTableGet):
2206         (JSC::JSVariableObject::symbolTablePut):
2207         (JSC::JSVariableObject::symbolTablePutWithAttributes):
2208         * runtime/Lookup.cpp:
2209         (JSC::HashTable::createTable):
2210         (JSC::HashTable::deleteTable):
2211         * runtime/Lookup.h:
2212         (JSC::HashEntry::initialize):
2213         (JSC::HashEntry::setKey):
2214         (JSC::HashEntry::key):
2215         (JSC::HashTable::entry):
2216         * runtime/PropertyMapHashTable.h:
2217         (JSC::PropertyMapEntry::PropertyMapEntry):
2218         * runtime/PropertyNameArray.cpp:
2219         (JSC::PropertyNameArray::add):
2220         * runtime/PropertyNameArray.h:
2221         (JSC::PropertyNameArray::add):
2222         (JSC::PropertyNameArray::addKnownUnique):
2223         * runtime/RegExp.cpp:
2224         (JSC::RegExp::match):
2225         * runtime/RegExpCache.cpp:
2226         (JSC::RegExpCache::create):
2227         * runtime/RegExpKey.h:
2228         (JSC::RegExpKey::RegExpKey):
2229         * runtime/SmallStrings.cpp:
2230         (JSC::SmallStringsStorage::rep):
2231         (JSC::SmallStrings::singleCharacterStringRep):
2232         * runtime/SmallStrings.h:
2233         * runtime/StringPrototype.cpp:
2234         (JSC::jsSpliceSubstringsWithSeparators):
2235         (JSC::stringProtoFuncMatch):
2236         (JSC::stringProtoFuncSearch):
2237         * runtime/Structure.cpp:
2238         (JSC::Structure::~Structure):
2239         (JSC::Structure::despecifyDictionaryFunction):
2240         (JSC::Structure::addPropertyTransitionToExistingStructure):
2241         (JSC::Structure::addPropertyTransition):
2242         (JSC::Structure::copyPropertyTable):
2243         (JSC::Structure::get):
2244         (JSC::Structure::despecifyFunction):
2245         (JSC::Structure::put):
2246         (JSC::Structure::hasTransition):
2247         (JSC::Structure::remove):
2248         (JSC::Structure::checkConsistency):
2249         * runtime/Structure.h:
2250         (JSC::Structure::get):
2251         (JSC::Structure::hasTransition):
2252         * runtime/StructureTransitionTable.h:
2253         * runtime/SymbolTable.h:
2254         * runtime/UString.cpp:
2255         (JSC::UString::UString):
2256         (JSC::UString::toStrictUInt32):
2257         (JSC::UString::substr):
2258         * runtime/UString.h:
2259         (JSC::UString::UString):
2260         (JSC::UString::adopt):
2261         (JSC::UString::data):
2262         (JSC::UString::size):
2263         (JSC::UString::isNull):
2264         (JSC::UString::isEmpty):
2265         (JSC::UString::impl):
2266         (JSC::UString::cost):
2267         (JSC::operator==):
2268         (JSC::codePointCompare):
2269         (JSC::IdentifierRepHash::hash):
2270         (WTF::):
2271
2272 2010-08-10  Gavin Barraclough  <barraclough@apple.com>
2273
2274         Bug 43816 - Remove UStringImpl
2275         The class was actually removed a long time ago, replaced by StringImpl.
2276         UStringImpl is just a typedef onto StringImpl.  Remove this.
2277
2278         * API/JSClassRef.cpp:
2279         (OpaqueJSClass::OpaqueJSClass):
2280         * JavaScriptCore.xcodeproj/project.pbxproj:
2281         * runtime/JSString.cpp:
2282         (JSC::JSString::resolveRope):
2283         (JSC::JSString::replaceCharacter):
2284         * runtime/JSString.h:
2285         (JSC::RopeBuilder::RopeIterator::operator*):
2286         (JSC::RopeBuilder::JSString):
2287         (JSC::RopeBuilder::appendStringInConstruct):
2288         (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
2289         (JSC::jsSingleCharacterSubstring):
2290         (JSC::jsSubstring):
2291         * runtime/JSStringBuilder.h:
2292         (JSC::jsMakeNontrivialString):
2293         * runtime/RopeImpl.cpp:
2294         (JSC::RopeImpl::derefFibersNonRecursive):
2295         * runtime/RopeImpl.h:
2296         (JSC::RopeImpl::deref):
2297         * runtime/SmallStrings.cpp:
2298         (JSC::SmallStringsStorage::SmallStringsStorage):
2299         * runtime/StringConstructor.cpp:
2300         (JSC::stringFromCharCodeSlowCase):
2301         * runtime/StringPrototype.cpp:
2302         (JSC::jsSpliceSubstringsWithSeparators):
2303         (JSC::stringProtoFuncFontsize):
2304         (JSC::stringProtoFuncLink):
2305         * runtime/UString.cpp:
2306         (JSC::initializeUString):
2307         * runtime/UString.h:
2308         (JSC::UString::adopt):
2309         (JSC::tryMakeString):
2310         (JSC::makeString):
2311         * runtime/UStringImpl.h: Removed.
2312
2313 2010-08-10  Patrick Gansterer  <paroga@paroga.com>
2314
2315         Reviewed by Eric Seidel.
2316
2317         Make FastMalloc more portable.
2318         https://bugs.webkit.org/show_bug.cgi?id=41790
2319
2320         * wtf/FastMalloc.cpp:
2321         (WTF::TCMalloc_Central_FreeList::Populate):
2322         (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
2323
2324 2010-08-10  Patrick Gansterer  <paroga@paroga.com>
2325
2326         Reviewed by David Levin.
2327
2328         [WINCE] Buildfix for CE 6.0
2329         https://bugs.webkit.org/show_bug.cgi?id=43027
2330
2331         CE 6.0 doesn't define localtime in the system include files.
2332
2333         * wtf/Platform.h: Include ce_time.h on all OS(WINCE).
2334
2335 2010-08-10  Gavin Barraclough  <barraclough@apple.com>
2336
2337         Rubber stamped by Sam Weinig.
2338
2339         Bug 43786 - Move AtomicStringHash from WebCore to WTF
2340         Also remove deprecated string headers from WebCore/platform/text.
2341
2342         * GNUmakefile.am:
2343         * JavaScriptCore.gypi:
2344         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2345         * JavaScriptCore.xcodeproj/project.pbxproj:
2346         * wtf/text/AtomicString.h:
2347         * wtf/text/AtomicStringHash.h: Copied from WebCore/platform/text/AtomicStringHash.h.
2348
2349 2010-08-09  Oliver Hunt  <oliver@apple.com>
2350
2351         Fix Qt/ARM again, this time including the other changed file.
2352
2353         * jit/JIT.h:
2354
2355 2010-08-09  Oliver Hunt  <oliver@apple.com>
2356
2357         Fix Qt/ARM
2358
2359         C++ overload resolution I stab at thee
2360
2361         * jit/JITInlineMethods.h:
2362         (JSC::JIT::beginUninterruptedSequence):
2363         (JSC::JIT::endUninterruptedSequence):
2364
2365 2010-08-09  Oliver Hunt  <oliver@apple.com>
2366
2367         Reviewed by Gavin Barraclough.
2368
2369         Allow an assembler/macroassembler to compact branches to more concise forms when linking
2370         https://bugs.webkit.org/show_bug.cgi?id=43745
2371
2372         This patch makes it possible for an assembler to convert jumps into a different
2373         (presumably more efficient) form at link time.  Currently implemented in the
2374         ARMv7 JIT as that already had logic to delay linking of jumps until the end of
2375         compilation already.  The ARMv7 JIT chooses between either a 4 byte short jump
2376         or a full 32-bit offset (and rewrites ITTT instructions as appropriate), so does
2377         not yet produce the most compact form possible.  The general design of the linker
2378         should make it relatively simple to introduce new branch types with little effort,
2379         as the linker has no knowledge of the exact form of any of the branches.
2380
2381         * JavaScriptCore.xcodeproj/project.pbxproj:
2382         * assembler/ARMv7Assembler.cpp: Added.
2383         (JSC::):
2384           Record jump sizes
2385
2386         * assembler/ARMv7Assembler.h:
2387         (JSC::ARMv7Assembler::LinkRecord::LinkRecord):
2388         (JSC::ARMv7Assembler::LinkRecord::from):
2389         (JSC::ARMv7Assembler::LinkRecord::setFrom):
2390         (JSC::ARMv7Assembler::LinkRecord::to):
2391         (JSC::ARMv7Assembler::LinkRecord::type):
2392         (JSC::ARMv7Assembler::LinkRecord::linkType):
2393         (JSC::ARMv7Assembler::LinkRecord::setLinkType):
2394           Encapsulate LinkRecord fields so we can compress the values somewhat
2395
2396         (JSC::ARMv7Assembler::JmpSrc::JmpSrc):
2397           Need to record the jump type now
2398
2399         (JSC::ARMv7Assembler::b):
2400         (JSC::ARMv7Assembler::blx):
2401         (JSC::ARMv7Assembler::bx):
2402           Need to pass the jump types
2403
2404         (JSC::ARMv7Assembler::executableOffsetFor):
2405         (JSC::ARMv7Assembler::jumpSizeDelta):
2406         (JSC::ARMv7Assembler::linkRecordSourceComparator):
2407         (JSC::ARMv7Assembler::computeJumpType):
2408         (JSC::ARMv7Assembler::convertJumpTo):
2409         (JSC::ARMv7Assembler::recordLinkOffsets):
2410         (JSC::ARMv7Assembler::jumpsToLink):
2411         (JSC::ARMv7Assembler::link):
2412         (JSC::ARMv7Assembler::unlinkedCode):
2413           Helper functions for the linker
2414
2415         (JSC::ARMv7Assembler::linkJump):
2416         (JSC::ARMv7Assembler::canBeShortJump):
2417         (JSC::ARMv7Assembler::linkLongJump):
2418         (JSC::ARMv7Assembler::linkShortJump):
2419         (JSC::ARMv7Assembler::linkJumpAbsolute):
2420            Moving code around for the various jump linking functions
2421
2422         * assembler/AbstractMacroAssembler.h:
2423         (JSC::AbstractMacroAssembler::beginUninterruptedSequence):
2424         (JSC::AbstractMacroAssembler::endUninterruptedSequence):
2425           We have to track uninterrupted sequences in any assembler that compacts
2426           branches as that's not something we're allowed to do in such sequences.
2427           AbstractMacroAssembler has a nop version of these functions as it makes the
2428           code elsewhere nicer.
2429
2430         * assembler/LinkBuffer.h:
2431         (JSC::LinkBuffer::LinkBuffer):
2432         (JSC::LinkBuffer::link):
2433         (JSC::LinkBuffer::patch):
2434         (JSC::LinkBuffer::locationOf):
2435         (JSC::LinkBuffer::locationOfNearCall):
2436         (JSC::LinkBuffer::returnAddressOffset):
2437         (JSC::LinkBuffer::trampolineAt):
2438           Updated these functions to adjust for any changed offsets in the linked code
2439
2440         (JSC::LinkBuffer::applyOffset):
2441           A helper function to deal with the now potentially moved labels
2442
2443         (JSC::LinkBuffer::linkCode):
2444           The new and mighty linker function
2445
2446         * assembler/MacroAssemblerARMv7.h:
2447         (JSC::MacroAssemblerARMv7::MacroAssemblerARMv7):
2448         (JSC::MacroAssemblerARMv7::beginUninterruptedSequence):
2449         (JSC::MacroAssemblerARMv7::endUninterruptedSequence):
2450         (JSC::MacroAssemblerARMv7::jumpsToLink):
2451         (JSC::MacroAssemblerARMv7::unlinkedCode):
2452         (JSC::MacroAssemblerARMv7::computeJumpType):
2453         (JSC::MacroAssemblerARMv7::convertJumpTo):
2454         (JSC::MacroAssemblerARMv7::recordLinkOffsets):
2455         (JSC::MacroAssemblerARMv7::jumpSizeDelta):
2456         (JSC::MacroAssemblerARMv7::link):
2457         (JSC::MacroAssemblerARMv7::jump):
2458         (JSC::MacroAssemblerARMv7::branchMul32):
2459         (JSC::MacroAssemblerARMv7::breakpoint):
2460         (JSC::MacroAssemblerARMv7::nearCall):
2461         (JSC::MacroAssemblerARMv7::call):
2462         (JSC::MacroAssemblerARMv7::ret):
2463         (JSC::MacroAssemblerARMv7::tailRecursiveCall):
2464         (JSC::MacroAssemblerARMv7::executableOffsetFor):
2465         (JSC::MacroAssemblerARMv7::inUninterruptedSequence):
2466         (JSC::MacroAssemblerARMv7::makeJump):
2467         (JSC::MacroAssemblerARMv7::makeBranch):
2468            All branches need to pass on their type now
2469
2470         * jit/ExecutableAllocator.h:
2471         (JSC::ExecutablePool::returnLastBytes):
2472            We can't know ahead of time how much space will be necessary to
2473            hold the linked code if we're compacting branches, this new
2474            function allows us to return the unused bytes at the end of linking
2475
2476         * jit/JIT.cpp:
2477         (JSC::JIT::JIT):
2478         (JSC::JIT::privateCompile):
2479         * jit/JIT.h:
2480         (JSC::JIT::compile):
2481            The JIT class now needs to take a linker offset so that recompilation
2482            can generate the same jumps when using branch compaction.
2483         * jit/JITArithmetic32_64.cpp:
2484         (JSC::JIT::emitSlow_op_mod):
2485         * jit/JITOpcodes.cpp:
2486         (JSC::JIT::privateCompileCTIMachineTrampolines):
2487         * jit/JITOpcodes32_64.cpp:
2488         (JSC::JIT::privateCompileCTIMachineTrampolines):
2489         (JSC::JIT::privateCompileCTINativeCall):
2490           Update for new trampolineAt changes
2491
2492         * wtf/FastMalloc.cpp:
2493         (WTF::TCMallocStats::):
2494         * wtf/Platform.h:
2495
2496 2010-08-09  Gavin Barraclough  <barraclough@apple.com>
2497
2498         Qt build fix III.
2499
2500         * wtf/text/WTFString.h:
2501
2502 2010-08-09  Gavin Barraclough  <barraclough@apple.com>
2503
2504         Qt build fix.
2505
2506         * wtf/qt/StringQt.cpp:
2507
2508 2010-08-06  Gavin Barraclough  <barraclough@apple.com>
2509
2510         Rubber stamped by Sam Weinig
2511
2512         Bug 43594 - Add string forwards to Forward.h
2513         This allows us to remove forward declarations for these classes from
2514         WebCore/WebKit (a step in moving these class from WebCore:: to WTF::).
2515
2516         * JavaScriptCore.xcodeproj/project.pbxproj:
2517         * wtf/Forward.h:
2518
2519 2010-08-07  Sheriff Bot  <webkit.review.bot@gmail.com>
2520
2521         Unreviewed, rolling out r64938.
2522         http://trac.webkit.org/changeset/64938
2523         https://bugs.webkit.org/show_bug.cgi?id=43685
2524
2525         Did not compile on several ports (Requested by abarth on
2526         #webkit).
2527
2528         * Android.mk:
2529         * CMakeLists.txt:
2530         * GNUmakefile.am:
2531         * JavaScriptCore.gypi:
2532         * JavaScriptCore.pro:
2533         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2534         * JavaScriptCore.xcodeproj/project.pbxproj:
2535         * assembler/AbstractMacroAssembler.h:
2536         * assembler/MacroAssembler.h:
2537         * assembler/MacroAssemblerX86.h:
2538         (JSC::MacroAssemblerX86::load32):
2539         (JSC::MacroAssemblerX86::store32):
2540         * assembler/X86Assembler.h:
2541         (JSC::X86Assembler::movl_rm):
2542         (JSC::X86Assembler::movl_mr):
2543         * bytecode/CodeBlock.cpp:
2544         (JSC::CodeBlock::markAggregate):
2545         * bytecode/Instruction.h:
2546         (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::):
2547         (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
2548         (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
2549         * bytecode/StructureStubInfo.cpp:
2550         (JSC::StructureStubInfo::deref):
2551         * bytecode/StructureStubInfo.h:
2552         (JSC::StructureStubInfo::initGetByIdProto):
2553         (JSC::StructureStubInfo::initGetByIdChain):
2554         (JSC::StructureStubInfo::):
2555         * jit/JIT.h:
2556         * jit/JITMarkObjects.cpp: Removed.
2557         * jit/JITPropertyAccess.cpp:
2558         (JSC::JIT::compileGetDirectOffset):
2559         (JSC::JIT::testPrototype):
2560         (JSC::JIT::privateCompilePutByIdTransition):
2561         (JSC::JIT::privateCompileGetByIdProto):
2562         (JSC::JIT::privateCompileGetByIdProtoList):
2563         (JSC::JIT::privateCompileGetByIdChainList):
2564         (JSC::JIT::privateCompileGetByIdChain):
2565         * jit/JITPropertyAccess32_64.cpp:
2566         (JSC::JIT::compileGetDirectOffset):
2567         (JSC::JIT::testPrototype):
2568         (JSC::JIT::privateCompilePutByIdTransition):
2569         (JSC::JIT::privateCompileGetByIdProto):
2570         (JSC::JIT::privateCompileGetByIdProtoList):
2571         (JSC::JIT::privateCompileGetByIdChainList):
2572         (JSC::JIT::privateCompileGetByIdChain):
2573         * jit/JITStubs.cpp:
2574         (JSC::setupPolymorphicProtoList):
2575         * wtf/Platform.h:
2576
2577 2010-08-07  Nathan Lawrence  <nlawrence@apple.com>
2578
2579         Reviewed by Geoffrey Garen.
2580
2581         The JIT code contains a number of direct references to GC'd objects.
2582         When we have movable objects, these references will need to be
2583         updated.
2584
2585         * Android.mk:
2586         * CMakeLists.txt:
2587         * GNUmakefile.am:
2588         * JavaScriptCore.gypi:
2589         * JavaScriptCore.pro:
2590         * JavaScriptCore.xcodeproj/project.pbxproj:
2591         * assembler/AbstractMacroAssembler.h:
2592         (JSC::AbstractMacroAssembler::int32AtLocation):
2593         (JSC::AbstractMacroAssembler::pointerAtLocation):
2594         (JSC::AbstractMacroAssembler::jumpTarget):
2595         * assembler/MacroAssembler.h:
2596         (JSC::MacroAssembler::loadPtrWithPatch):
2597             Normally, loadPtr will optimize when the register is eax.  Since
2598             the slightly smaller instruction changes the offsets, it messes up
2599             our ability to repatch the code.  We added this new instruction
2600             that garuntees a constant size.
2601         * assembler/MacroAssemblerX86.h:
2602         (JSC::MacroAssemblerX86::load32WithPatch):
2603             Changed load32 in the same way described above.
2604         (JSC::MacroAssemblerX86::load32):
2605             Moved the logic to optimize laod32 from movl_mr to load32
2606         (JSC::MacroAssemblerX86::store32):
2607             Moved the logic to optimize store32 from movl_rm to store32
2608         * assembler/X86Assembler.h:
2609         (JSC::X86Assembler::movl_rm):
2610         (JSC::X86Assembler::movl_mr):
2611         (JSC::X86Assembler::int32AtLocation):
2612         (JSC::X86Assembler::pointerAtLocation):
2613         (JSC::X86Assembler::jumpTarget):
2614         * bytecode/CodeBlock.cpp:
2615         (JSC::CodeBlock::markAggregate):
2616         * bytecode/Instruction.h:
2617             As described in StructureStubInfo.h, we needed to add additional
2618             fields to both StructureStubInfo and
2619             PolymorphicAccessStructureList so that we can determine the
2620             structure of the JITed code at patch time.
2621         (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
2622         (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
2623         * bytecode/StructureStubInfo.cpp:
2624         (JSC::StructureStubInfo::markAggregate):
2625             Added this function to mark the JITed code that correosponds to
2626             this structure stub info.
2627         * bytecode/StructureStubInfo.h:
2628         (JSC::StructureStubInfo::initGetByIdProto):
2629         (JSC::StructureStubInfo::initGetByIdChain):
2630         (JSC::StructureStubInfo::):
2631         * jit/JIT.h:
2632         * jit/JITMarkObjects.cpp: Added.
2633         (JSC::JIT::patchPrototypeStructureAddress):
2634         (JSC::JIT::patchGetDirectOffset):
2635         (JSC::JIT::markGetByIdProto):
2636         (JSC::JIT::markGetByIdChain):
2637         (JSC::JIT::markGetByIdProtoList):
2638         (JSC::JIT::markPutByIdTransition):
2639         (JSC::JIT::markGlobalObjectReference):
2640         * jit/JITPropertyAccess.cpp:
2641             Added asserts for the patch offsets.
2642         (JSC::JIT::compileGetDirectOffset):
2643         (JSC::JIT::testPrototype):
2644         (JSC::JIT::privateCompilePutByIdTransition):
2645         (JSC::JIT::privateCompileGetByIdProto):
2646         (JSC::JIT::privateCompileGetByIdProtoList):
2647         (JSC::JIT::privateCompileGetByIdChainList):
2648         (JSC::JIT::privateCompileGetByIdChain):
2649         * jit/JITPropertyAccess32_64.cpp:
2650         (JSC::JIT::compileGetDirectOffset):
2651         (JSC::JIT::testPrototype):
2652         (JSC::JIT::privateCompilePutByIdTransition):
2653         (JSC::JIT::privateCompileGetByIdProto):
2654         (JSC::JIT::privateCompileGetByIdProtoList):
2655         (JSC::JIT::privateCompileGetByIdChainList):
2656         (JSC::JIT::privateCompileGetByIdChain):
2657         * jit/JITStubs.cpp:
2658         (JSC::setupPolymorphicProtoList):
2659         * wtf/Platform.h:
2660             Added ENABLE_MOVABLE_GC_OBJECTS flag
2661
2662 2010-08-07  Michael Saboff  <msaboff@apple.com>
2663
2664         Reviewed by Geoffrey Garen.
2665
2666         Revert JSArray to point to the beginning of the contained ArrayStorage
2667         struct.  This is described in
2668         https://bugs.webkit.org/show_bug.cgi?id=43526.
2669
2670         * jit/JITPropertyAccess.cpp:
2671         (JSC::JIT::emit_op_get_by_val):
2672         (JSC::JIT::emit_op_put_by_val):
2673         (JSC::JIT::privateCompilePatchGetArrayLength):
2674         * jit/JITPropertyAccess32_64.cpp:
2675         (JSC::JIT::emit_op_get_by_val):
2676         (JSC::JIT::emit_op_put_by_val):
2677         (JSC::JIT::privateCompilePatchGetArrayLength):
2678         * runtime/JSArray.cpp:
2679         (JSC::JSArray::JSArray):
2680         (JSC::JSArray::~JSArray):
2681         (JSC::JSArray::getOwnPropertySlot):
2682         (JSC::JSArray::getOwnPropertyDescriptor):
2683         (JSC::JSArray::put):
2684         (JSC::JSArray::putSlowCase):
2685         (JSC::JSArray::deleteProperty):
2686         (JSC::JSArray::getOwnPropertyNames):
2687         (JSC::JSArray::getNewVectorLength):
2688         (JSC::JSArray::increaseVectorLength):
2689         (JSC::JSArray::increaseVectorPrefixLength):
2690         (JSC::JSArray::setLength):
2691         (JSC::JSArray::pop):
2692         (JSC::JSArray::push):
2693         (JSC::JSArray::shiftCount):
2694         (JSC::JSArray::unshiftCount):
2695         (JSC::JSArray::sortNumeric):
2696         (JSC::JSArray::sort):
2697         (JSC::JSArray::fillArgList):
2698         (JSC::JSArray::copyToRegisters):
2699         (JSC::JSArray::compactForSorting):
2700         (JSC::JSArray::subclassData):
2701         (JSC::JSArray::setSubclassData):
2702         (JSC::JSArray::checkConsistency):
2703         * runtime/JSArray.h:
2704         (JSC::JSArray::length):
2705         (JSC::JSArray::canGetIndex):
2706         (JSC::JSArray::getIndex):
2707         (JSC::JSArray::setIndex):
2708         (JSC::JSArray::uncheckedSetIndex):
2709         (JSC::JSArray::markChildrenDirect):
2710
2711 2010-08-07  Kwang Yul Seo  <skyul@company100.net>
2712
2713         Reviewed by Eric Seidel.
2714
2715         Add ENABLE(YARR) guard around JSGlobalData::m_regexAllocator
2716         https://bugs.webkit.org/show_bug.cgi?id=43399
2717
2718         m_regexAllocator is used only by RegExp::compile which is guarded with ENABLE(YARR).
2719
2720         * runtime/JSGlobalData.h:
2721
2722 2010-08-07  Patrick Roland Gansterer  <paroga@paroga.com>
2723
2724         Reviewed by Eric Seidel.
2725
2726         [Qt] Enable JIT on WinCE
2727         https://bugs.webkit.org/show_bug.cgi?id=43303
2728
2729         Add ExtraCompiler for generating GeneratedJITStubs_MSVC.asm.
2730
2731         * DerivedSources.pro:
2732
2733 2010-08-07  Dan Bernstein  <mitz@apple.com>
2734
2735         Reviewed by Anders Carlsson.
2736
2737         Created a separate SimpleFontData constructor exclusively for SVG fonts and moved the CTFontRef
2738         from SimpleFontData to FontPlatformData.
2739         https://bugs.webkit.org/show_bug.cgi?id=43674
2740
2741         * wtf/Platform.h: Moved definitions of WTF_USE_CORE_TEXT and WTF_USE_ATSUI here from WebCore/config.h.
2742
2743 2010-08-07  Zoltan Herczeg  <zherczeg@webkit.org>
2744
2745         Reviewed by Eric Seidel.
2746
2747         Bitmap.h has no default constructor
2748         https://bugs.webkit.org/show_bug.cgi?id=43619
2749
2750         Without a constructor, the initial bits of the Bitmap class
2751         are undefinied. If only a few, or zero bits are 0, the memory
2752         area provided by AlignedMemoryAllocator can be easly exhausted.
2753
2754         Csaba Osztrogonác helped to find this bug.
2755
2756         * wtf/Bitmap.h:
2757         (WTF::::Bitmap):
2758
2759 2010-08-06  Rafael Antognolli  <antognolli@profusion.mobi>
2760
2761         [EFL] Build fix.
2762
2763         * CMakeLists.txt: add runtime/CGHandle.cpp.
2764
2765 2010-08-06  Jessie Berlin  <jberlin@apple.com>
2766
2767         Roll out http://trac.webkit.org/changeset/64801, which broke the Safari Windows Build.
2768         Unreviewed.
2769
2770         * JavaScriptCore.xcodeproj/project.pbxproj:
2771         * wtf/Forward.h:
2772
2773 2010-08-06  Jessie Berlin  <jberlin@apple.com>
2774
2775         Windows Build Fix (continued). Unreviewed.
2776
2777         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2778
2779 2010-08-06  Jessie Berlin  <jberlin@apple.com>
2780
2781         Windows Build Fix. Unreviewed.
2782
2783         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2784         Add GCHandle.h and GCHandle.cpp.
2785
2786 2010-08-06  Nathan Lawrence  <nlawrence@apple.com>
2787
2788         Reviewed by Geoffrey Garen.
2789
2790         https://bugs.webkit.org/show_bug.cgi?id=43207
2791
2792         WeakGCPtr's should instead of directly pointing to the GC'd object
2793         should be directed to an array of pointers that can be updated for
2794         movable objects.
2795
2796         * Android.mk:
2797         * GNUmakefile.am:
2798         * JavaScriptCore.exp:
2799         * JavaScriptCore.gypi:
2800         * JavaScriptCore.pro:
2801         * JavaScriptCore.xcodeproj/project.pbxproj:
2802         * runtime/Collector.cpp:
2803         (JSC::Heap::destroy):
2804         (JSC::Heap::allocateBlock):
2805         (JSC::Heap::freeBlock):
2806         (JSC::Heap::updateWeakGCHandles):
2807         (JSC::WeakGCHandlePool::update):
2808         (JSC::Heap::addWeakGCHandle):
2809         (JSC::Heap::markRoots):
2810         * runtime/Collector.h:
2811         (JSC::Heap::weakGCHandlePool):
2812         * runtime/GCHandle.cpp: Added.
2813         (JSC::WeakGCHandle::pool):
2814         (JSC::WeakGCHandlePool::WeakGCHandlePool):
2815         (JSC::WeakGCHandlePool::allocate):
2816         (JSC::WeakGCHandlePool::free):
2817         (JSC::WeakGCHandlePool::operator new):
2818         * runtime/GCHandle.h: Added.
2819         (JSC::WeakGCHandle::isValidPtr):
2820         (JSC::WeakGCHandle::isPtr):
2821         (JSC::WeakGCHandle::isNext):
2822         (JSC::WeakGCHandle::invalidate):
2823         (JSC::WeakGCHandle::get):
2824         (JSC::WeakGCHandle::set):
2825         (JSC::WeakGCHandle::getNextInFreeList):
2826         (JSC::WeakGCHandle::setNextInFreeList):
2827         (JSC::WeakGCHandlePool::isFull):
2828         * runtime/WeakGCPtr.h:
2829         (JSC::WeakGCPtr::WeakGCPtr):
2830         (JSC::WeakGCPtr::~WeakGCPtr):
2831         (JSC::WeakGCPtr::get):
2832         (JSC::WeakGCPtr::clear):
2833         (JSC::WeakGCPtr::assign):
2834         (JSC::get):
2835
2836 2010-08-06  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2837
2838         Reviewed by Antonio Gomes.
2839
2840         [Qt] Fix warnings about difference in symbol visiblity on Mac OS X
2841
2842         * jsc.pro:
2843
2844 2010-08-06  Zoltan Herczeg  <zherczeg@webkit.org>
2845
2846         Reviewed by Darin Adler.
2847
2848         Refactor identifier parsing in lexer
2849         https://bugs.webkit.org/show_bug.cgi?id=41845
2850
2851         The code is refactored to avoid gotos. The new code
2852         has the same performance as the old one.
2853
2854         SunSpider --parse-only: no change (from 34.0ms to 33.6ms)
2855         SunSpider: no change (from 523.2ms to 523.5ms)
2856
2857         * parser/Lexer.cpp:
2858         (JSC::Lexer::parseIdent):
2859         (JSC::Lexer::lex):
2860         * parser/Lexer.h:
2861
2862 2010-08-06  Gabor Loki  <loki@webkit.org>
2863
2864         Reviewed by Gavin Barraclough.
2865
2866         The ARM JIT does not support JSValue32_64 with RVCT
2867         https://bugs.webkit.org/show_bug.cgi?id=43411
2868
2869         JSValue32_64 is enabled for RVCT by default.
2870
2871         * create_jit_stubs:
2872         * jit/JITStubs.cpp:
2873         (JSC::ctiTrampoline):
2874         (JSC::ctiVMThrowTrampoline):
2875         (JSC::ctiOpThrowNotCaught):
2876         * wtf/Platform.h:
2877
2878 2010-08-05  Chao-ying Fu  <fu@mips.com>
2879
2880         Reviewed by Darin Adler.
2881
2882         Define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER for MIPS
2883         https://bugs.webkit.org/show_bug.cgi?id=43514
2884
2885         MIPS needs to define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER, so that
2886         RenderArena::allocate() can return 8-byte aligned memory to avoid
2887         exceptions on sdc1/ldc1.
2888
2889         * wtf/Platform.h:
2890
2891 2010-08-05  Gavin Barraclough  <barraclough@apple.com>
2892
2893         Rubber stamped by Sam Weinig
2894
2895         Bug 43594 - Add string forwards to Forward.h
2896         This allows us to remove forward declarations for these classes from
2897         WebCore/WebKit (a step in moving these class from WebCore:: to WTF::).
2898
2899         * JavaScriptCore.xcodeproj/project.pbxproj:
2900         * wtf/Forward.h:
2901
2902 2010-08-05  Geoffrey Garen  <ggaren@apple.com>
2903
2904         Reviewed by Mark Rowe.
2905
2906         Fixed leak seen on buildbot.
2907
2908         * runtime/GCActivityCallbackCF.cpp:
2909         (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
2910         (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback):
2911         (JSC::DefaultGCActivityCallback::operator()): Make out timer a RetainPtr,
2912         since anything less would be uncivilized.
2913
2914 2010-08-05  Andy Estes  <aestes@apple.com>
2915
2916         Reviewed by David Kilzer.
2917
2918         Rename iOS-related OS and PLATFORM macros.
2919         https://bugs.webkit.org/show_bug.cgi?id=43493
2920         
2921         Rename WTF_OS_IPHONE_OS to WTF_OS_IOS, WTF_PLATFORM_IPHONE to
2922         WTF_PLATFORM_IOS, and WTF_PLATFORM_IPHONE_SIMULATOR to
2923         WTF_PLATFORM_IOS_SIMULATOR.
2924
2925         * jit/ExecutableAllocator.h:
2926         * jit/JITStubs.cpp:
2927         * profiler/ProfilerServer.mm:
2928         (-[ProfilerServer init]):
2929         * wtf/FastMalloc.cpp:
2930         (WTF::TCMallocStats::):
2931         * wtf/Platform.h:
2932         * wtf/unicode/icu/CollatorICU.cpp:
2933         (WTF::Collator::userDefault):
2934
2935 2010-08-05  Nathan Lawrence  <nlawrence@apple.com>
2936
2937         Reviewed by Darin Adler.
2938
2939         https://bugs.webkit.org/show_bug.cgi?id=43464
2940
2941         Currently, the global object is being embedded in the JavaScriptCore
2942         bytecode, however since the global object is the same for all opcodes
2943         in a code block, we can have the global object just be a member of the
2944         associated code block.
2945
2946         Additionally, I added an assert inside of emitOpcode that verifies
2947         that the last generated opcode was of the correct length.
2948
2949         * bytecode/CodeBlock.cpp:
2950         (JSC::CodeBlock::CodeBlock):
2951         (JSC::CodeBlock::derefStructures):
2952         (JSC::CodeBlock::markAggregate):
2953         * bytecode/CodeBlock.h:
2954         (JSC::CodeBlock::globalObject):
2955         (JSC::GlobalCodeBlock::GlobalCodeBlock):
2956         (JSC::ProgramCodeBlock::ProgramCodeBlock):
2957         (JSC::EvalCodeBlock::EvalCodeBlock):
2958         (JSC::FunctionCodeBlock::FunctionCodeBlock):
2959         * bytecode/Opcode.h:
2960         (JSC::opcodeLength):
2961         * bytecompiler/BytecodeGenerator.cpp:
2962         (JSC::BytecodeGenerator::BytecodeGenerator):
2963         (JSC::BytecodeGenerator::emitOpcode):
2964             Added an assert to check that the last generated opcode is the
2965             correct length.
2966         (JSC::BytecodeGenerator::rewindBinaryOp):
2967             Changed the last opcode to op_end since the length will no longer
2968             be correct.
2969         (JSC::BytecodeGenerator::rewindUnaryOp):
2970             Changed the last opcode to op_end since the length will no longer
2971             be correct.
2972         (JSC::BytecodeGenerator::emitResolve):
2973         (JSC::BytecodeGenerator::emitGetScopedVar):
2974         (JSC::BytecodeGenerator::emitPutScopedVar):
2975         (JSC::BytecodeGenerator::emitResolveWithBase):
2976         * bytecompiler/BytecodeGenerator.h:
2977         * interpreter/Interpreter.cpp:
2978         (JSC::Interpreter::resolveGlobal):
2979         (JSC::Interpreter::resolveGlobalDynamic):
2980         (JSC::Interpreter::privateExecute):
2981         * jit/JITOpcodes.cpp:
2982         (JSC::JIT::emit_op_get_global_var):
2983         (JSC::JIT::emit_op_put_global_var):
2984         (JSC::JIT::emit_op_resolve_global):
2985         (JSC::JIT::emitSlow_op_resolve_global):
2986         (JSC::JIT::emit_op_resolve_global_dynamic):
2987         (JSC::JIT::emitSlow_op_resolve_global_dynamic):
2988         * jit/JITOpcodes32_64.cpp:
2989         (JSC::JIT::emit_op_get_global_var):
2990         (JSC::JIT::emit_op_put_global_var):
2991         (JSC::JIT::emit_op_resolve_global):
2992         (JSC::JIT::emitSlow_op_resolve_global):
2993         * jit/JITStubs.cpp:
2994         (JSC::cti_op_resolve_global):
2995         * runtime/Executable.cpp:
2996         (JSC::FunctionExecutable::compileForCallInternal):
2997         (JSC::FunctionExecutable::compileForConstructInternal):
2998         (JSC::FunctionExecutable::reparseExceptionInfo):
2999
3000 2010-08-05  Gavin Barraclough  <barraclough@apple.com>
3001
3002         Reviewed by Sam Weinig.
3003
3004         Bug 43185 - Switch RegisterFile over to use PageAllocation
3005
3006         Remove platform-specific memory allocation code.
3007
3008         * interpreter/RegisterFile.cpp:
3009         (JSC::RegisterFile::~RegisterFile):
3010         (JSC::RegisterFile::releaseExcessCapacity):
3011         * interpreter/RegisterFile.h:
3012         (JSC::RegisterFile::RegisterFile):
3013         (JSC::RegisterFile::grow):
3014         (JSC::RegisterFile::checkAllocatedOkay):
3015         * wtf/PageAllocation.cpp:
3016         (WTF::PageAllocation::lastError):
3017         * wtf/PageAllocation.h:
3018         (WTF::PageAllocation::allocate):
3019         (WTF::PageAllocation::allocateAt):
3020         (WTF::PageAllocation::allocateAligned):
3021         (WTF::PageAllocation::pageSize):
3022         (WTF::PageAllocation::isPageAligned):
3023         (WTF::PageAllocation::isPowerOfTwo):
3024         * wtf/PageReservation.h:
3025         (WTF::PageReservation::commit):
3026         (WTF::PageReservation::decommit):
3027         (WTF::PageReservation::reserve):
3028         (WTF::PageReservation::reserveAt):
3029
3030 2010-08-05  Michael Saboff  <msaboff@apple.com>
3031
3032         Reviewed by Darin Adler.
3033
3034         Fixed https://bugs.webkit.org/show_bug.cgi?id=43401 where array 
3035         content aren't properly initialized as part of unshift.  
3036
3037         * runtime/JSArray.cpp:
3038         (JSC::JSArray::unshiftCount):
3039
3040 2010-08-05  Jian Li  <jianli@chromium.org>
3041
3042         Reviewed by David Levin.
3043
3044         Unify blob related feature defines to ENABLE(BLOB).
3045         https://bugs.webkit.org/show_bug.cgi?id=43081
3046
3047         * Configurations/FeatureDefines.xcconfig:
3048
3049 2010-08-05  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
3050
3051         Rubber-stamped by Xan Lopez.
3052
3053         Remove GHashTable left-overs. GHashTable is ref-counted, and is
3054         correctly supported by GRefPtr.
3055
3056         * wtf/gobject/GOwnPtr.h:
3057
3058 2010-08-05  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
3059
3060         Unreviewed.
3061
3062         Typo fix that makes distcheck happy.
3063
3064         * GNUmakefile.am:
3065
3066 2010-08-03  Geoffrey Garen  <ggaren@apple.com>
3067
3068         Reviewed by Oliver Hunt and Beth Dakin.
3069
3070         https://bugs.webkit.org/show_bug.cgi?id=43461
3071         Invalid NaN parsing
3072         
3073         * wtf/dtoa.cpp: Turn off the dtoa feature that allows you to specify a
3074         non-standard NaN representation, since our NaN encoding assumes that all
3075         true NaNs have the standard bit pattern.
3076
3077         * API/JSValueRef.cpp:
3078         (JSValueMakeNumber): Don't allow an API client to accidentally specify
3079         a non-standard NaN either.
3080
3081 2010-08-04  Gavin Barraclough  <barraclough@apple.com>
3082
3083         Windows build fix part II.
3084
3085         * wtf/PageReservation.h:
3086         (WTF::PageReservation::systemReserve):
3087
3088 2010-08-04  Gavin Barraclough  <barraclough@apple.com>
3089
3090         Windows build fix.
3091
3092         * wtf/PageReservation.h:
3093         (WTF::PageReservation::systemReserve):
3094
3095 2010-08-04  Gavin Barraclough  <barraclough@apple.com>
3096
3097         Build fix - add new header to !Mac projects.
3098
3099         * GNUmakefile.am:
3100         * JavaScriptCore.gypi:
3101         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3102
3103 2010-08-04  Gavin Barraclough  <barraclough@apple.com>
3104
3105         Reviewed by Sam Weinig.
3106
3107         Bug 43515 - Fix small design issues with PageAllocation, split out PageReservation.
3108
3109         The PageAllocation class has a number of issues:
3110         * Changes in bug #43269 accidentally switched SYMBIAN over to use malloc/free to allocate
3111           blocks of memory for the GC heap, instead of allocating RChunks.  Revert this change in
3112           behaviour.
3113         * In order for PageAllocation to work correctly on WinCE we should be decommitting memory
3114           before deallocating.  In order to simplify understanding the expected state at deallocate,
3115           split behaviour out into PageAllocation and PageReservation classes.  Require that all
3116           memory be decommitted before calling deallocate on a PageReservation, add asserts to
3117           enforce this.
3118         * add many missing asserts.
3119         * inline more functions.
3120         * remove ability to create sub-PageAllocations from an existing PageAllocations object -
3121           this presented an interface that would allow sub regions to be deallocated, which would
3122           not have provided expected behaviour.
3123         * remove writable/executable arguments to commit, this value can be cached at the point
3124           the memory is reserved.
3125         * remove writable/executable arguments to allocateAligned, protection other than RW is not
3126           supported.
3127         * add missing checks for overflow & failed allocation to mmap path through allocateAligned.
3128
3129         * JavaScriptCore.xcodeproj/project.pbxproj:
3130         * jit/ExecutableAllocator.cpp:
3131         (JSC::ExecutableAllocator::intializePageSize):
3132         * jit/ExecutableAllocator.h:
3133         (JSC::ExecutablePool::Allocation::Allocation):
3134         (JSC::ExecutablePool::Allocation::base):
3135         (JSC::ExecutablePool::Allocation::size):
3136         (JSC::ExecutablePool::Allocation::operator!):
3137         * jit/ExecutableAllocatorFixedVMPool.cpp:
3138         (JSC::FixedVMPoolAllocator::reuse):
3139         (JSC::FixedVMPoolAllocator::coalesceFreeSpace):
3140         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
3141         (JSC::FixedVMPoolAllocator::alloc):
3142         (JSC::FixedVMPoolAllocator::free):
3143         (JSC::FixedVMPoolAllocator::allocInternal):
3144         * runtime/AlignedMemoryAllocator.h:
3145         (JSC::::allocate):
3146         (JSC::::AlignedMemoryAllocator):
3147         * runtime/Collector.cpp:
3148         (JSC::Heap::allocateBlock):
3149         * runtime/Collector.h:
3150         * wtf/PageAllocation.cpp:
3151         * wtf/PageAllocation.h:
3152         (WTF::PageAllocation::operator!):
3153         (WTF::PageAllocation::allocate):
3154         (WTF::PageAllocation::allocateAt):
3155         (WTF::PageAllocation::allocateAligned):
3156         (WTF::PageAllocation::deallocate):
3157         (WTF::PageAllocation::pageSize):
3158         (WTF::PageAllocation::systemAllocate):
3159         (WTF::PageAllocation::systemAllocateAt):
3160         (WTF::PageAllocation::systemAllocateAligned):
3161         (WTF::PageAllocation::systemDeallocate):
3162         (WTF::PageAllocation::systemPageSize):
3163         * wtf/PageReservation.h: Copied from JavaScriptCore/wtf/PageAllocation.h.
3164         (WTF::PageReservation::PageReservation):
3165         (WTF::PageReservation::commit):
3166         (WTF::PageReservation::decommit):
3167         (WTF::PageReservation::reserve):
3168         (WTF::PageReservation::reserveAt):
3169         (WTF::PageReservation::deallocate):
3170         (WTF::PageReservation::systemCommit):
3171         (WTF::PageReservation::systemDecommit):
3172         (WTF::PageReservation::systemReserve):
3173         (WTF::PageReservation::systemReserveAt):
3174         * wtf/Platform.h:
3175
3176 2010-08-04  Sheriff Bot  <webkit.review.bot@gmail.com>
3177
3178         Unreviewed, rolling out r64655.
3179         http://trac.webkit.org/changeset/64655
3180         https://bugs.webkit.org/show_bug.cgi?id=43496
3181
3182         JavaScriptCore references patch seems to have caused
3183         regressions in QT and GTK builds (Requested by nlawrence on
3184         #webkit).
3185
3186         * bytecode/CodeBlock.cpp:
3187         (JSC::CodeBlock::markAggregate):
3188         * runtime/Collector.cpp:
3189         (JSC::Heap::markConservatively):
3190         * runtime/JSCell.h:
3191         (JSC::JSValue::asCell):
3192         (JSC::MarkStack::append):
3193         * runtime/JSGlobalObject.cpp:
3194         (JSC::markIfNeeded):
3195         * runtime/JSONObject.cpp:
3196         (JSC::Stringifier::Holder::object):
3197         * runtime/JSObject.h:
3198         (JSC::JSObject::prototype):
3199         * runtime/JSStaticScopeObject.cpp:
3200         (JSC::JSStaticScopeObject::markChildren):
3201         * runtime/JSValue.h:
3202         (JSC::JSValue::):
3203         (JSC::JSValue::JSValue):
3204         (JSC::JSValue::asCell):
3205         * runtime/MarkStack.h:
3206         * runtime/NativeErrorConstructor.cpp:
3207         * runtime/NativeErrorConstructor.h:
3208         * runtime/Structure.h:
3209         (JSC::Structure::storedPrototype):
3210
3211 2010-08-04  Gavin Barraclough  <barraclough@apple.com>
3212
3213         Rubber stamped by Sam Weinig.
3214
3215         Enable JSVALUE64 for CPU(PPC64).
3216         Basic browsing seems to work.
3217
3218         * wtf/Platform.h:
3219
3220 2010-08-04  Nathan Lawrence  <nlawrence@apple.com>
3221
3222         Reviewed by Darin Adler.
3223
3224         Refactoring MarkStack::append to take a reference.  This is in
3225         preparation for movable objects when we will need to update pointers.
3226         http://bugs.webkit.org/show_bug.cgi?id=41177
3227
3228         Unless otherwise noted, all changes are to either return by reference
3229         or pass a reference to MarkStack::append.
3230
3231         * bytecode/CodeBlock.cpp:
3232         (JSC::CodeBlock::markAggregate):
3233         * runtime/Collector.cpp:
3234         (JSC::Heap::markConservatively):
3235             Added a temporary variable to prevent marking from changing an
3236             unknown value on the stack
3237         * runtime/JSCell.h:
3238         (JSC::JSValue::asCell):
3239         (JSC::MarkStack::append):
3240         (JSC::MarkStack::appendInternal):
3241         * runtime/JSGlobalObject.cpp:
3242         (JSC::markIfNeeded):
3243         * runtime/JSONObject.cpp:
3244         (JSC::Stringifier::Holder::object):
3245         * runtime/JSObject.h:
3246         (JSC::JSObject::prototype):
3247         * runtime/JSStaticScopeObject.cpp:
3248         (JSC::JSStaticScopeObject::markChildren):
3249         * runtime/JSValue.h:
3250         (JSC::JSValue::JSValue):
3251         (JSC::JSValue::asCell):
3252         * runtime/MarkStack.h:
3253         * runtime/NativeErrorConstructor.cpp:
3254         (JSC::NativeErrorConstructor::createStructure):
3255             Changed the structure flags to include a custom markChildren.
3256         (JSC::NativeErrorConstructor::markChildren):
3257             Update the prototype of the stored structure.
3258         * runtime/NativeErrorConstructor.h:
3259             Added structure flags.
3260         * runtime/Structure.h:
3261         (JSC::Structure::storedPrototype):
3262
3263 2010-08-03  Nathan Lawrence  <nlawrence@apple.com>
3264
3265         Reviewed by Oliver Hunt.
3266
3267         Tightened up some get_by_id_chain* code generation
3268         https://bugs.webkit.org/show_bug.cgi?id=40935
3269
3270         This is in the style of
3271         https://bugs.webkit.org/show_bug.cgi?id=30539, and changed code to
3272         call accessor functions when it was not necessary to directly access
3273         the private variables.
3274
3275         * jit/JIT.h:
3276         * jit/JITPropertyAccess.cpp:
3277         (JSC::JIT::compileGetDirectOffset):
3278         (JSC::JIT::testPrototype):
3279         (JSC::JIT::privateCompilePutByIdTransition):
3280         (JSC::JIT::privateCompileGetByIdChainList):
3281         (JSC::JIT::privateCompileGetByIdChain):
3282         * jit/JITPropertyAccess32_64.cpp:
3283         (JSC::JIT::testPrototype):
3284         (JSC::JIT::privateCompilePutByIdTransition):
3285         (JSC::JIT::privateCompileGetByIdChainList):
3286         (JSC::JIT::privateCompileGetByIdChain):
3287
3288 2010-08-03  Adam Roben  <aroben@apple.com>
3289
3290         Turn on PLATFORM_STRATEGIES on Windows
3291
3292         Fixes <http://webkit.org/b/43431>.
3293
3294         Reviewed by Anders Carlsson.
3295
3296         * wtf/Platform.h:
3297
3298 2010-08-04  Gabor Loki  <loki@webkit.org>
3299
3300         Reviewed by Geoffrey Garen.
3301
3302         Enable JSValue32_64 for GCC on ARM by default
3303         https://bugs.webkit.org/show_bug.cgi?id=43410
3304
3305         * wtf/Platform.h:
3306
3307 2010-08-03  Gavin Barraclough  <barraclough@apple.com>
3308
3309         Speculative windows build fix.
3310
3311         * wtf/Bitmap.h:
3312
3313 2010-08-03  Gavin Barraclough  <barraclough@apple.com>
3314
3315         Build fix following r64624.
3316
3317         * JavaScriptCore.xcodeproj/project.pbxproj:
3318         * wtf/PageAllocation.h:
3319
3320 2010-08-03  Nathan Lawrence  <nlawrence@apple.com>
3321
3322         Reviewed by Gavin Barraclough.
3323
3324         https://bugs.webkit.org/show_bug.cgi?id=43269
3325
3326         Added new allocateAligned methods to PageAllocation.  In order to
3327         prevent a regress in performance, the function needs to be inlined.
3328
3329         Additionally, I ported the symbian block allocator to use
3330         PageAllocation and added a new WTF::Bitmap class to support this.
3331
3332         * GNUmakefile.am:
3333         * JavaScriptCore.gypi:
3334         * JavaScriptCore.xcodeproj/project.pbxproj:
3335         * runtime/AlignedMemoryAllocator.h: Added.
3336         (JSC::AlignedMemory::deallocate):
3337         (JSC::AlignedMemory::base):
3338         (JSC::AlignedMemory::AlignedMemory):
3339         (JSC::AlignedMemoryAllocator::destroy):
3340         (JSC::AlignedMemoryAllocator::allocate):
3341         (JSC::AlignedMemoryAllocator::AlignedMemoryAllocator):
3342         (JSC::AlignedMemoryAllocator::~AlignedMemoryAllocator):
3343         (JSC::AlignedMemoryAllocator::free):
3344         * runtime/Collector.cpp:
3345         (JSC::Heap::Heap):
3346         (JSC::Heap::destroy):
3347         (JSC::Heap::allocateBlock):
3348         (JSC::Heap::freeBlock):
3349         (JSC::Heap::freeBlocks):
3350         (JSC::Heap::allocate):
3351         (JSC::Heap::shrinkBlocks):
3352         (JSC::Heap::markConservatively):
3353         (JSC::Heap::clearMarkBits):
3354         (JSC::Heap::markedCells):
3355         * runtime/Collector.h:
3356         (JSC::CollectorHeap::collectorBlock):
3357         * runtime/CollectorHeapIterator.h:
3358         (JSC::CollectorHeapIterator::operator*):
3359         (JSC::LiveObjectIterator::operator++):
3360         (JSC::DeadObjectIterator::operator++):
3361         * wtf/Bitmap.h: Added.
3362         (WTF::Bitmap::get):
3363         (WTF::Bitmap::set):
3364         (WTF::Bitmap::clear):
3365         (WTF::Bitmap::clearAll):
3366         (WTF::Bitmap::advanceToNextFreeBit):
3367         (WTF::Bitmap::count):
3368         (WTF::Bitmap::isEmpty):
3369         (WTF::Bitmap::isFull):
3370         * wtf/PageAllocation.h:
3371         (WTF::PageAllocation::operator UnspecifiedBoolType):
3372         (WTF::PageAllocation::allocateAligned):
3373         (WTF::PageAllocation::reserveAligned):
3374         * wtf/Platform.h:
3375         * wtf/symbian: Removed.
3376         * wtf/symbian/BlockAllocatorSymbian.cpp: Removed.
3377         * wtf/symbian/BlockAllocatorSymbian.h: Removed.
3378
3379 2010-08-03  Michael Saboff  <msaboff@apple.com>
3380
3381         Reviewed by Gavin Barraclough.
3382
3383         Fix for https://bugs.webkit.org/show_bug.cgi?id=43314.  The prior code
3384         was using the wrong "length" value to move array contents when adding
3385         space to the beginning of an array for an unshift() or similar
3386         operation.  Instead of using m_vectorLength, the length of the
3387         allocated JSValue array, the code was using m_length, the declared
3388         length of the array.  These two values do not need to match.
3389
3390         * JavaScriptCore.xcodeproj/project.pbxproj:
3391         * runtime/JSArray.cpp:
3392         (JSC::JSArray::increaseVectorPrefixLength):
3393
3394 2010-08-03  Chao-ying Fu  <fu@mips.com>
3395
3396         Reviewed by Gavin Barraclough.
3397
3398         Fix following https://bugs.webkit.org/show_bug.cgi?id=43089
3399         (accidentally inverted a compiler version check).
3400
3401         * jit/ExecutableAllocator.h:
3402         (JSC::ExecutableAllocator::cacheFlush):
3403
3404 2010-08-03  Patrick Gansterer  <paroga@paroga.com>
3405
3406         Reviewed by Gavin Barraclough.
3407
3408         Implement DEFINE_STUB_FUNCTION for WinCE.
3409         https://bugs.webkit.org/show_bug.cgi?id=34953
3410
3411         * jit/JITStubs.cpp:
3412         (JSC::):
3413         (JSC::DEFINE_STUB_FUNCTION):
3414
3415 2010-08-02  Gavin Barraclough  <barraclough@apple.com>
3416
3417         Reviewed by Oliver Hunt.
3418
3419         Bug 43390 - Do not CRASH if we run out of room for jit code.
3420
3421         Change the ExecutableAllocator implementations not to crash, and to return 0 if memory cannot be allocated.
3422         The assemblers should pass this through without trying to use it in executableCopy.
3423         Change the LinkBuffer to handle this, and to provide an allocationSuccessful() method to test for this.
3424
3425         Change the JIT to throw an exception if allocation fails.
3426         Make JIT optimizations fail gracefully if memory cannot be allocated (use non-optimized path).
3427         Change YARR JIT to fallback to PCRE 
3428
3429         * assembler/ARMAssembler.cpp:
3430         (JSC::ARMAssembler::executableCopy):
3431         * assembler/ARMv7Assembler.h:
3432         (JSC::ARMv7Assembler::executableCopy):
3433         * assembler/LinkBuffer.h:
3434         (JSC::LinkBuffer::allocationSuccessful):
3435         * assembler/MIPSAssembler.h:
3436         (JSC::MIPSAssembler::executableCopy):
3437         * assembler/X86Assembler.h:
3438         (JSC::X86Assembler::executableCopy):
3439         * bytecode/StructureStubInfo.h:
3440         (JSC::StructureStubInfo::initGetByIdProto):
3441         (JSC::StructureStubInfo::initGetByIdChain):
3442         (JSC::StructureStubInfo::initGetByIdSelfList):
3443         (JSC::StructureStubInfo::initGetByIdProtoList):
3444         (JSC::StructureStubInfo::initPutByIdTransition):
3445         * jit/ExecutableAllocator.cpp:
3446         (JSC::ExecutablePool::systemAlloc):
3447         * jit/ExecutableAllocatorFixedVMPool.cpp:
3448         (JSC::FixedVMPoolAllocator::allocInternal):
3449         * jit/JIT.cpp:
3450         (JSC::JIT::privateCompile):
3451         * jit/JIT.h:
3452         (JSC::JIT::compileGetByIdProto):
3453         (JSC::JIT::compileGetByIdSelfList):
3454         (JSC::JIT::compileGetByIdProtoList):
3455         (JSC::JIT::compileGetByIdChainList):
3456         (JSC::JIT::compileGetByIdChain):
3457         (JSC::JIT::compilePutByIdTransition):
3458         (JSC::JIT::compilePatchGetArrayLength):
3459         * jit/JITOpcodes.cpp:
3460         (JSC::JIT::privateCompileCTIMachineTrampolines):
3461         * jit/JITOpcodes32_64.cpp:
3462         (JSC::JIT::privateCompileCTIMachineTrampolines):
3463         (JSC::JIT::privateCompileCTINativeCall):
3464         * jit/JITPropertyAccess.cpp:
3465         (JSC::JIT::stringGetByValStubGenerator):
3466         (JSC::JIT::privateCompilePutByIdTransition):
3467         (JSC::JIT::privateCompilePatchGetArrayLength):
3468         (JSC::JIT::privateCompileGetByIdProto):
3469         (JSC::JIT::privateCompileGetByIdSelfList):
3470         (JSC::JIT::privateCompileGetByIdProtoList):
3471         (JSC::JIT::privateCompileGetByIdChainList):
3472         (JSC::JIT::privateCompileGetByIdChain):
3473         * jit/JITPropertyAccess32_64.cpp:
3474         (JSC::JIT::stringGetByValStubGenerator):
3475         (JSC::JIT::privateCompilePutByIdTransition):
3476         (JSC::JIT::privateCompilePatchGetArrayLength):
3477         (JSC::JIT::privateCompileGetByIdProto):
3478         (JSC::JIT::privateCompileGetByIdSelfList):
3479         (JSC::JIT::privateCompileGetByIdProtoList):
3480         (JSC::JIT::privateCompileGetByIdChainList):
3481         (JSC::JIT::privateCompileGetByIdChain):
3482         * jit/JITStubs.cpp:
3483         (JSC::JITThunks::tryCachePutByID):
3484         (JSC::JITThunks::tryCacheGetByID):
3485         (JSC::DEFINE_STUB_FUNCTION):
3486         (JSC::setupPolymorphicProtoList):
3487         * jit/JITStubs.h:
3488         * jit/SpecializedThunkJIT.h:
3489         (JSC::SpecializedThunkJIT::finalize):
3490         * runtime/ExceptionHelpers.cpp:
3491         (JSC::createOutOfMemoryError):
3492         * runtime/ExceptionHelpers.h:
3493         * runtime/Executable.cpp:
3494         (JSC::EvalExecutable::compileInternal):
3495         (JSC::ProgramExecutable::compileInternal):
3496         (JSC::FunctionExecutable::compileForCallInternal):
3497         (JSC::FunctionExecutable::compileForConstructInternal):
3498         (JSC::FunctionExecutable::reparseExceptionInfo):
3499         (JSC::EvalExecutable::reparseExceptionInfo):
3500         * yarr/RegexJIT.cpp:
3501         (JSC::Yarr::RegexGenerator::compile):
3502
3503 2010-08-03  Geoffrey Garen  <ggaren@apple.com>
3504
3505         Reviewed by Oliver Hunt.
3506
3507         Fixed a crash seen on the GTK 64bit buildbot.
3508         
3509         When JSArray is allocated for the vptr stealing hack, it's not allocated
3510         in the heap, so the JSArray constructor can't safely call Heap::heap().
3511         
3512         Since this was subtle enough to confuse smart people, I've changed JSArray
3513         to have an explicit vptr stealing constructor.
3514
3515         * JavaScriptCore.xcodeproj/project.pbxproj:
3516         * runtime/JSArray.cpp:
3517         (JSC::JSArray::JSArray):
3518         * runtime/JSArray.h:
3519         (JSC::JSArray::):
3520         * runtime/JSGlobalData.cpp:
3521         (JSC::JSGlobalData::storeVPtrs):
3522
3523 2010-08-03  Alex Milowski  <alex@milowski.com>
3524
3525         Reviewed by Beth Dakin.
3526
3527         Changed the ENABLE_MATHML value to enable MathML by default.
3528
3529         * Configurations/FeatureDefines.xcconfig:
3530
3531 2010-08-03  Michael Saboff  <msaboff@apple.com>
3532
3533         Reviewed by Gavin Barraclough.
3534
3535         Change to keep returned pointer from malloc family functions to
3536         quiet memory leak detect.  The pointer is saved in the new m_allocBase
3537         member of the ArrayStorage structure.  This fixes the issue found in 
3538         https://bugs.webkit.org/show_bug.cgi?id=43229.
3539
3540         As part of this change, we use m_allocBase when reallocating and
3541         freeing the memory associated with ArrayStorage.
3542
3543         * runtime/JSArray.cpp:
3544         (JSC::JSArray::JSArray):
3545         (JSC::JSArray::~JSArray):
3546         (JSC::JSArray::putSlowCase):
3547         (JSC::JSArray::increaseVectorLength):
3548         (JSC::JSArray::increaseVectorPrefixLength):
3549         * runtime/JSArray.h:
3550
3551 2010-08-03  Geoffrey Garen  <ggaren@apple.com>
3552
3553         Reviewed by Mark Rowe.
3554
3555         https://bugs.webkit.org/show_bug.cgi?id=43444
3556         PLATFORM(CF) is false on Windows in JavaScriptCore
3557
3558         Moved some PLATFORM(WIN) #defines down into JavaScriptCore.
3559
3560         * wtf/Platform.h: Added WTF_PLATFORM_CF 1 and WTF_USE_PTHREADS 0, inherited
3561         from WebCore/config.h. Removed WTF_USE_WININET 1 since WebCore/config.h
3562         just #undefined that later.
3563
3564 2010-08-03  Geoffrey Garen  <ggaren@apple.com>
3565
3566         Try to fix Windows build: Don't use GCActivityCallbackCF on Windows, since
3567         PLATFORM(CF) is not defined on Windows.
3568         
3569         We'll need to enable the GC activity callback some other way, but this
3570         change should get the build back to normal.
3571
3572         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3573
3574         * runtime/GCActivityCallbackCF.cpp: Make it easier to detect this error
3575         in the future with an explicit error message.
3576
3577 2010-08-03  Geoffrey Garen  <ggaren@apple.com>
3578
3579         Try to fix Windows build: update .def file.
3580
3581         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3582
3583 2010-08-03  Nathan Lawrence  <nlawrence@apple.com>
3584
3585         Reviewed by Oliver Hunt.
3586
3587         https://bugs.webkit.org/show_bug.cgi?id=41318
3588         GC should reclaim garbage even when new objects are not being allocated rapidly
3589
3590         Added a callback in JavaScriptCore that gets triggered after an
3591         allocation causes the heap to reset.  This is useful for adding a
3592         timer that will trigger garbage collection after the "last" allocation.
3593
3594         Also needed was to add lock and unlock methods to JSLock that needed
3595         only a JSGlobalData object versus an ExecState object.
3596
3597         * CMakeLists.txt:
3598         * GNUmakefile.am:
3599         * JavaScriptCore.exp:
3600         * JavaScriptCore.gypi:
3601         * JavaScriptCore.pro:
3602         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3603         * JavaScriptCore.xcodeproj/project.pbxproj:
3604         * jit/JITPropertyAccess.cpp:
3605         (JSC::JIT::emit_op_put_by_val):
3606         * runtime/Collector.cpp:
3607         (JSC::Heap::Heap):
3608         (JSC::Heap::reset):
3609         (JSC::Heap::setActivityCallback):
3610         * runtime/Collector.h:
3611         * runtime/GCActivityCallback.cpp: Added.
3612         (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
3613         (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback):
3614         (JSC::DefaultGCActivityCallback::operator()):
3615         * runtime/GCActivityCallback.h: Added.
3616         (JSC::GCActivityCallback::~GCActivityCallback):
3617         (JSC::GCActivityCallback::operator()):
3618         (JSC::GCActivityCallback::GCActivityCallback):
3619         (JSC::DefaultGCActivityCallback::create):
3620         * runtime/GCActivityCallbackCF.cpp: Added.
3621         (JSC::DefaultGCActivityCallbackPlatformData::trigger):
3622         (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
3623         (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback):
3624         (JSC::DefaultGCActivityCallback::operator()):
3625         * runtime/JSLock.cpp:
3626         (JSC::JSLock::JSLock):
3627         * runtime/JSLock.h:
3628
3629 2010-08-02  Kevin Ollivier  <kevino@theolliviers.com>
3630
3631         [wx] Build fix after removal of need to compile ExecutableAllocatorPosix.cpp
3632
3633         * wscript:
3634
3635 2010-08-02  Mahesh Kulkarni  <mahesh.kulkarni@nokia.com>
3636
3637         Reviewed by Simon Hausmann.
3638
3639         [QT] build fix for symbian
3640         https://bugs.webkit.org/show_bug.cgi?id=43234
3641
3642         1) wrong order of passing param's
3643         2) static_cast complains on symbian so using reinterpret_cast
3644
3645         No new tests added. Just a build fix for qt symbian
3646
3647         * wtf/PageAllocation.cpp:
3648         (WTF::PageAllocation::commit):
3649         (WTF::PageAllocation::decommit):
3650         (WTF::PageAllocation::reserve):
3651
3652 2010-07-30  Luiz Agostini  <luiz.agostini@openbossa.org>
3653
3654         Reviewed by Simon Fraser.
3655
3656         Enabling view modes to all platforms
3657         https://bugs.webkit.org/show_bug.cgi?id=37505
3658
3659         Removing ENABLE_WIDGETS_10_SUPPORT flag.
3660
3661         As view mode media feature is not part of widget 1.0 specification
3662         any more the ENABLE_WIDGETS_10_SUPPORT flag may be removed. The only use
3663         of this flag was related to view mode media feature implementation in Qt. 
3664
3665         * wtf/Platform.h:
3666
3667 2010-07-30  Andy Estes  <aestes@apple.com>
3668
3669         Reviewed by David Kilzer.
3670
3671         Add Xcode support for compiling WebKit against iOS SDKs.
3672         https://bugs.webkit.org/show_bug.cgi?id=42796
3673
3674         * Configurations/Base.xcconfig:
3675         * Configurations/DebugRelease.xcconfig:
3676         * Configurations/FeatureDefines.xcconfig:
3677
3678 2010-07-30  Dumitru Daniliuc  <dumi@chromium.org>
3679
3680         Reviewed by Davin Levin.
3681
3682         Added a yield() function.
3683         https://bugs.webkit.org/show_bug.cgi?id=42843
3684
3685         * JavaScriptCore.exp:
3686         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3687         * wtf/Threading.h:
3688         * wtf/ThreadingPthreads.cpp:
3689         (WTF::yield):
3690         * wtf/ThreadingWin.cpp:
3691         (WTF::yield):
3692         * wtf/gtk/ThreadingGtk.cpp:
3693         (WTF::yield):
3694         * wtf/qt/ThreadingQt.cpp:
3695         (WTF::yield):
3696
3697 2010-07-30  Rafael Antognolli  <antognolli@profusion.mobi>
3698
3699         Reviewed by Antonio Gomes.
3700
3701         [EFL] Add library version and soname to EFL generated libraries and binary.
3702         https://bugs.webkit.org/show_bug.cgi?id=43212
3703
3704         Add version and soname to libjavascriptcore.so and libwtf.so in case of
3705         linking as shared libraries, and version to jsc executable.
3706
3707         * CMakeLists.txt:
3708         * jsc/CMakeLists.txt:
3709         * wtf/CMakeLists.txt:
3710
3711 2010-07-30  Mahesh Kulkarni  <mahesh.kulkarni@nokia.com>
3712
3713         Reviewed by Simon Hausmann.
3714
3715         [QT] build fix for symbian
3716         https://bugs.webkit.org/show_bug.cgi?id=43234
3717
3718         * wtf/PageAllocation.h:
3719         (WTF::PageAllocation::PageAllocation):
3720
3721 2010-07-29  Sheriff Bot  <webkit.review.bot@gmail.com>
3722
3723         Unreviewed, rolling out r64313.
3724         http://trac.webkit.org/changeset/64313
3725         https://bugs.webkit.org/show_bug.cgi?id=43233
3726
3727         Some Chromium bots are not happy with it for some unknown
3728         reason. (Requested by dumi on #webkit).
3729
3730         * JavaScriptCore.exp:
3731         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3732         * wtf/Threading.h:
3733         * wtf/ThreadingPthreads.cpp:
3734         * wtf/ThreadingWin.cpp:
3735         * wtf/gtk/ThreadingGtk.cpp:
3736         * wtf/qt/ThreadingQt.cpp:
3737
3738 2010-07-29  Sheriff Bot  <webkit.review.bot@gmail.com>
3739
3740         Unreviewed, rolling out r64302.
3741         http://trac.webkit.org/changeset/64302
3742         https://bugs.webkit.org/show_bug.cgi?id=43223
3743
3744         Assertion is bogus (Requested by olliej on #webkit).
3745
3746         * assembler/ARMAssembler.cpp:
3747         (JSC::ARMAssembler::executableCopy):
3748         * assembler/AssemblerBuffer.h:
3749         (JSC::AssemblerBuffer::putShortUnchecked):
3750         (JSC::AssemblerBuffer::putIntUnchecked):
3751         (JSC::AssemblerBuffer::putInt64Unchecked):
3752         * jit/JITStubs.cpp:
3753         * pcre/pcre_compile.cpp:
3754         (jsRegExpCompile):
3755         * wtf/FastMalloc.cpp:
3756         (WTF::PageHeapAllocator::New):
3757         (WTF::TCMalloc_Central_FreeList::Populate):
3758         * wtf/MD5.cpp:
3759         (WTF::reverseBytes):
3760         (WTF::MD5::addBytes):
3761         (WTF::MD5::checksum):
3762         * wtf/StdLibExtras.h:
3763         * wtf/Vector.h:
3764         (WTF::VectorBuffer::inlineBuffer):
3765         * wtf/qt/StringQt.cpp:
3766         (WebCore::String::String):
3767
3768 2010-07-29  Michael Saboff  <msaboff@apple.com>
3769
3770         Reviewed by Gavin Barraclough.
3771
3772         Changed the handling for removing and adding elements at the front
3773         of an array.  The code now keeps a bias that indicates the amount of
3774         JSValue sized holes are prior to the ArrayStorage block.  This means
3775         that shift operations are now memmove's of the header part of
3776         the ArrayStorage and unshift operations are similar, but may require a
3777         realloc first to create the space.  Similar operations are performed
3778         for special cases of splice and slice.
3779         Also optimized the new Array(size) case so that we don't allocate and
3780         initialize array elements until the JS code starts using elements.
3781         The array growth code is slightly more aggressive for initial growth
3782         based on size growth of any previous array.
3783
3784         * Configurations/JavaScriptCore.xcconfig:
3785         * jit/JITPropertyAccess.cpp:
3786         (JSC::JIT::emit_op_get_by_val):
3787         (JSC::JIT::emit_op_put_by_val):
3788         (JSC::JIT::privateCompilePatchGetArrayLength):
3789         * jit/JITPropertyAccess32_64.cpp:
3790         (JSC::JIT::emit_op_get_by_val):
3791         (JSC::JIT::emit_op_put_by_val):
3792         (JSC::JIT::privateCompilePatchGetArrayLength):
3793         * runtime/ArrayPrototype.cpp:
3794         (JSC::arrayProtoFuncShift):
3795         (JSC::arrayProtoFuncSplice):
3796         (JSC::arrayProtoFuncUnShift):
3797         * runtime/JSArray.cpp:
3798         (JSC::JSArray::JSArray):
3799         (JSC::JSArray::~JSArray):
3800         (JSC::JSArray::getOwnPropertySlot):
3801         (JSC::JSArray::getOwnPropertyDescriptor):
3802         (JSC::JSArray::put):
3803         (JSC::JSArray::putSlowCase):
3804         (JSC::JSArray::deleteProperty):
3805         (JSC::JSArray::getOwnPropertyNames):
3806         (JSC::JSArray::getNewVectorLength):
3807         (JSC::JSArray::increaseVectorLength):
3808         (JSC::JSArray::increaseVectorPrefixLength):
3809         (JSC::JSArray::setLength):
3810         (JSC::JSArray::pop):
3811         (JSC::JSArray::push):
3812         (JSC::JSArray::shiftCount):
3813         (JSC::JSArray::unshiftCount):
3814         (JSC::JSArray::sortNumeric):
3815         (JSC::JSArray::sort):
3816         (JSC::JSArray::fillArgList):
3817         (JSC::JSArray::copyToRegisters):
3818         (JSC::JSArray::compactForSorting):
3819         (JSC::JSArray::subclassData):
3820         (JSC::JSArray::setSubclassData):
3821         (JSC::JSArray::checkConsistency):
3822         * runtime/JSArray.h:
3823         (JSC::JSArray::length):
3824         (JSC::JSArray::canGetIndex):
3825         (JSC::JSArray::getIndex):
3826         (JSC::JSArray::setIndex):
3827         (JSC::JSArray::uncheckedSetIndex):
3828         (JSC::JSArray::arrayStorage):
3829         (JSC::JSArray::setArrayStorage):
3830         (JSC::JSArray::markChildrenDirect):
3831
3832 2010-07-29  Michael Saboff  <msaboff@apple.com>
3833
3834         Reviewed by Darin Adler.
3835
3836         Changed MINIMUM_CELL_SIZE to be fixed at 64 bytes.
3837
3838         * runtime/Collector.h:
3839
3840 2010-07-28  Dumitru Daniliuc  <dumi@chromium.org>
3841
3842         Reviewed by David Levin.
3843
3844         Added a yield() function.
3845         https://bugs.webkit.org/show_bug.cgi?id=42843
3846
3847         * JavaScriptCore.exp:
3848         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3849         * wtf/Threading.h:
3850         * wtf/ThreadingPthreads.cpp:
3851         (WTF::yield):
3852         * wtf/ThreadingWin.cpp:
3853         (WTF::yield):
3854         * wtf/gtk/ThreadingGtk.cpp:
3855         (WTF::yield):
3856         * wtf/qt/ThreadingQt.cpp:
3857         (WTF::yield):
3858
3859 2010-07-29  Michael Saboff  <msaboff@apple.com>
3860
3861         Reviewed by Oliver Hunt.
3862
3863         Fixed issue where RegExp greedy jit code loops when no input is
3864         consumed.  Changed the code to only loop if some input was consumed,
3865         but fall through if we successfully match an alternative that 
3866         doesn't consume any input.
3867         https://bugs.webkit.org/show_bug.cgi?id=42664
3868
3869         * yarr/RegexJIT.cpp:
3870         (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
3871
3872 2010-07-29  Gabor Loki  <loki@webkit.org>
3873
3874         Reviewed by Gavin Barraclough.
3875
3876         Avoid increasing required alignment of target type warning on ARM
3877         https://bugs.webkit.org/show_bug.cgi?id=38045
3878
3879         The reinterpret_cast<Type1*>([pointer to Type2]) expressions - where
3880         sizeof(Type1) > sizeof(Type2) - cause the following warning on ARM:
3881         increases required alignment of target type warnings.
3882         Casting the type of [pointer to Type2] object to void* bypasses the
3883         warning.
3884
3885         * assembler/ARMAssembler.cpp:
3886         (JSC::ARMAssembler::executableCopy):
3887         * assembler/AssemblerBuffer.h:
3888         (JSC::AssemblerBuffer::putShortUnchecked):
3889         (JSC::AssemblerBuffer::putIntUnchecked):
3890         (JSC::AssemblerBuffer::putInt64Unchecked):
3891         * jit/JITStubs.cpp:
3892         * pcre/pcre_compile.cpp:
3893         (jsRegExpCompile):
3894         * wtf/FastMalloc.cpp:
3895         (WTF::PageHeapAllocator::New):
3896         (WTF::TCMalloc_Central_FreeList::Populate):
3897         * wtf/MD5.cpp:
3898         (WTF::reverseBytes):
3899         (WTF::MD5::addBytes):
3900         (WTF::MD5::checksum):
3901         * wtf/StdLibExtras.h:
3902         (reinterpret_cast_ptr):
3903         * wtf/Vector.h:
3904         (WTF::VectorBuffer::inlineBuffer):
3905         * wtf/qt/StringQt.cpp:
3906         (WebCore::String::String):
3907
3908 2010-07-29  Martin Robinson  <mrobinson@igalia.com>
3909
3910         Unreviewed build fix.
3911
3912         Include a missing header in the source list to fix 'make dist.'
3913
3914         * GNUmakefile.am: Include missing header.
3915
3916 2010-07-28  Gavin Barraclough  <barraclough@apple.com>
3917
3918         Reviewed by Darin Adler.
3919
3920         Bug 43162 - Add support for MADV_FREE to PageAllocation.
3921
3922         * wtf/PageAllocation.cpp:
3923         (WTF::PageAllocation::commit):
3924         (WTF::PageAllocation::decommit):
3925
3926 2010-07-27  Kinuko Yasuda  <kinuko@chromium.org>
3927
3928         Reviewed by Ojan Vafai.
3929
3930         Add FILE_SYSTEM build flag for FileSystem API
3931         https://bugs.webkit.org/show_bug.cgi?id=42915
3932
3933         * Configurations/FeatureDefines.xcconfig:
3934
3935 2010-07-27  Gavin Barraclough  <barraclough@apple.com>
3936
3937         Temporarily rolling out http://trac.webkit.org/changeset/64177,
3938         this seems to give QT ARM/Win a headache (specifically, looks
3939         like structure layour differs, objects get too large - 
3940         "..\..\..\JavaScriptCore\runtime\ArrayPrototype.cpp:41:"
3941         "error: size of array 'dummyclass_fits_in_cell' is negative").
3942
3943         * jit/JITPropertyAccess.cpp:
3944         (JSC::JIT::emit_op_get_by_val):
3945         (JSC::JIT::emit_op_put_by_val):
3946         (JSC::JIT::privateCompilePatchGetArrayLength):
3947         * jit/JITPropertyAccess32_64.cpp:
3948         (JSC::JIT::emit_op_get_by_val):
3949         (JSC::JIT::emit_op_put_by_val):
3950         (JSC::JIT::privateCompilePatchGetArrayLength):
3951         * runtime/ArrayPrototype.cpp:
3952         (JSC::arrayProtoFuncShift):
3953         (JSC::arrayProtoFuncSplice):
3954         (JSC::arrayProtoFuncUnShift):
3955         * runtime/JSArray.cpp:
3956         (JSC::increasedVectorLength):
3957         (JSC::JSArray::JSArray):
3958         (JSC::JSArray::~JSArray):
3959         (JSC::JSArray::getOwnPropertySlot):
3960         (JSC::JSArray::getOwnPropertyDescriptor):
3961         (JSC::JSArray::put):
3962         (JSC::JSArray::putSlowCase):
3963         (JSC::JSArray::deleteProperty):
3964         (JSC::JSArray::getOwnPropertyNames):
3965         (JSC::JSArray::increaseVectorLength):
3966         (JSC::JSArray::setLength):
3967         (JSC::JSArray::pop):
3968         (JSC::JSArray::push):
3969         (JSC::JSArray::sortNumeric):
3970         (JSC::JSArray::sort):
3971         (JSC::JSArray::fillArgList):
3972         (JSC::JSArray::copyToRegisters):
3973         (JSC::JSArray::compactForSorting):
3974         (JSC::JSArray::subclassData):
3975         (JSC::JSArray::setSubclassData):
3976         (JSC::JSArray::checkConsistency):
3977         * runtime/JSArray.h:
3978         (JSC::JSArray::length):
3979         (JSC::JSArray::canGetIndex):
3980         (JSC::JSArray::getIndex):
3981         (JSC::JSArray::setIndex):
3982         (JSC::JSArray::uncheckedSetIndex):
3983         (JSC::JSArray::markChildrenDirect):
3984
3985 2010-07-27  Gavin Barraclough  <barraclough@apple.com>
3986
3987         Speculative build fix for Chromium/Win
3988
3989         * wtf/Platform.h:
3990
3991 2010-07-27  Gavin Barraclough  <barraclough@apple.com>
3992
3993         Oh! that makes more sense!  Maybe C++-style comments are bringing teh bad mojo.
3994
3995         * wtf/Platform.h:
3996
3997 2010-07-27  Gavin Barraclough  <barraclough@apple.com>
3998
3999         Speculative build fix for GTK/64 ... seems to be barfing on a comment o_O
4000
4001         * wtf/Platform.h:
4002
4003 2010-07-27  Michael Saboff  <msaboff@apple.com>
4004
4005         Reviewed by Gavin Barraclough.
4006
4007         Changed the handling for removing and adding elements at the front
4008         of an array.  The code now keeps a bias that indicates the amount of
4009         JSValue sized holes are prior to the ArrayStorage block.  This means
4010         that shift operations are now memmove's of the header part of
4011         the ArrayStorage and unshift operations are similar, but may require a
4012         realloc first to create the space.  Similar operations are performed
4013         for special cases of splice and slice.
4014         Also optimized the new Array(size) case so that we don't allocate and
4015         initialize array elements until the JS code starts using elements.
4016         The array growth code is slightly more aggressive for initial growth
4017         based on size growth of any previous array.
4018
4019         * Configurations/JavaScriptCore.xcconfig:
4020         * jit/JITPropertyAccess.cpp:
4021         (JSC::JIT::emit_op_get_by_val):
4022         (JSC::JIT::emit_op_put_by_val):
4023         (JSC::JIT::privateCompilePatchGetArrayLength):
4024         * jit/JITPropertyAccess32_64.cpp:
4025         (JSC::JIT::emit_op_get_by_val):
4026         (JSC::JIT::emit_op_put_by_val):
4027         (JSC::JIT::privateCompilePatchGetArrayLength):
4028         * runtime/ArrayPrototype.cpp:
4029         (JSC::arrayProtoFuncShift):
4030         (JSC::arrayProtoFuncSplice):
4031         (JSC::arrayProtoFuncUnShift):
4032         * runtime/JSArray.cpp:
4033         (JSC::JSArray::JSArray):
4034         (JSC::JSArray::~JSArray):
4035         (JSC::JSArray::getOwnPropertySlot):
4036         (JSC::JSArray::getOwnPropertyDescriptor):
4037         (JSC::JSArray::put):
4038         (JSC::JSArray::putSlowCase):
4039         (JSC::JSArray::deleteProperty):
4040         (JSC::JSArray::getOwnPropertyNames):
4041         (JSC::JSArray::getNewVectorLength):
4042         (JSC::JSArray::increaseVectorLength):
4043         (JSC::JSArray::increaseVectorPrefixLength):
4044         (JSC::JSArray::setLength):
4045         (JSC::JSArray::pop):
4046         (JSC::JSArray::push):
4047         (JSC::JSArray::shiftCount):
4048         (JSC::JSArray::unshiftCount):
4049         (JSC::JSArray::sortNumeric):
4050         (JSC::JSArray::sort):
4051         (JSC::JSArray::fillArgList):
4052         (JSC::JSArray::copyToRegisters):
4053         (JSC::JSArray::compactForSorting):
4054         (JSC::JSArray::subclassData):
4055         (JSC::JSArray::setSubclassData):
4056         (JSC::JSArray::checkConsistency):
4057         * runtime/JSArray.h:
4058         (JSC::JSArray::length):
4059         (JSC::JSArray::canGetIndex):
4060         (JSC::JSArray::getIndex):
4061         (JSC::JSArray::setIndex):
4062         (JSC::JSArray::uncheckedSetIndex):
4063         (JSC::JSArray::arrayStorage):
4064         (JSC::JSArray::setArrayStorage):
4065         (JSC::JSArray::markChildrenDirect):
4066
4067 2010-07-27  Gavin Barraclough  <barraclough@apple.com>
4068
4069         Reviewed by Oliver Hunt.
4070
4071         Bug 43089 - Cleanup JIT related switched in Platform.h
4072
4073         The code the enable to JIT checks every permutation of platform & OS individually, but
4074         now the JIT is enabled on the majority much all x86/x86-64/ARM/MIPS systems.  It should
4075         be cleaner to just enable by default on these platforms, and explicitly disable on configs
4076         that don't aren't supported.
4077
4078         Also, rename ENABLE_JIT_OPTIMIZE_MOD to ENABLE_JIT_USE_SOFT_MODULO.  I always find this
4079         confusing since enabling this "optimization" would be possible, but would be a regression
4080         on x86/x86-64 systems!  I think it's clearer to reserve "JIT_OPTIMIZE" for compiler
4081         technologies applicable to all platforms, and make a more optional behaviour like this a
4082         "USE".
4083
4084         * jit/ExecutableAllocator.h:
4085         (JSC::ExecutableAllocator::cacheFlush):
4086         * jit/JIT.h:
4087         * jit/JITArithmetic.cpp:
4088         (JSC::JIT::emit_op_mod):
4089         (JSC::JIT::emitSlow_op_mod):
4090         * jit/JITArithmetic32_64.cpp:
4091         (JSC::JIT::emit_op_mod):
4092         (JSC::JIT::emitSlow_op_mod):
4093         * jit/JITOpcodes.cpp:
4094         (JSC::JIT::privateCompileCTIMachineTrampolines):
4095         * jit/JITOpcodes32_64.cpp:
4096         (JSC::JIT::privateCompileCTIMachineTrampolines):
4097         * wtf/Platform.h:
4098
4099 2010-07-27  James Robinson  <jamesr@chromium.org>
4100
4101         Reviewed by Darin Fisher.
4102
4103         [chromium] Make PLATFORM(CHROMIUM) and not OS(MAC) turn USE(GLES2_RENDERING) on
4104         https://bugs.webkit.org/show_bug.cgi?id=43084
4105
4106         This turns USE(GLES2_RENDERING) on for chromium on windows/linux.  This causes no
4107         change in behavior, that's all controlled by ENABLE() macros that are currently off.
4108
4109         * wtf/Platform.h:
4110
4111 2010-07-23  Helder Correia  <heldercorreia@codeaurora.org>
4112
4113         Reviewed by Darin Adler.
4114
4115         Canvas tests 2d.imageData.object.round and 2d.imageData.object.wrap are
4116         failing. For canvas image data manipulation, the values passed should
4117         be truncated and wrapped. Also fix the canvas-ImageData-behaviour test
4118         to expect wrapping rather than clamping, and add some new checkings.
4119         https://bugs.webkit.org/show_bug.cgi?id=40272
4120
4121         * runtime/JSByteArray.h:
4122         (JSC::JSByteArray::setIndex):
4123         (JSC::JSByteArray::JSByteArray):
4124
4125 2010-07-27  Gavin Barraclough  <barraclough@apple.com>
4126
4127         Reviewed by Oliver Hunt.
4128
4129         Bug 42621 - Add a bump allocator for the YARR interpreter
4130
4131         The regex engine requires lifo allocation, however currently uses the general purpose
4132         malloc/free memory allocation.  A simple bump pointer allocator should provide a lower
4133         overhead allocation solution.
4134
4135         When using YARR interpreter, 15% progression on v8-regex.
4136
4137         * JavaScriptCore.xcodeproj/project.pbxproj:
4138         * runtime/JSGlobalData.h:
4139         * runtime/RegExp.cpp:
4140         (JSC::RegExp::compile):
4141         * wtf/BumpPointerAllocator.h: Added.
4142         (WTF::BumpPointerPool::ensureCapacity):
4143         (WTF::BumpPointerPool::alloc):
4144         (WTF::BumpPointerPool::dealloc):
4145         (WTF::BumpPointerPool::operator new):
4146         (WTF::BumpPointerPool::BumpPointerPool):
4147         (WTF::BumpPointerPool::create):
4148         (WTF::BumpPointerPool::shrink):
4149         (WTF::BumpPointerPool::destroy):
4150         (WTF::BumpPointerPool::ensureCapacityCrossPool):
4151         (WTF::BumpPointerPool::deallocCrossPool):
4152         (WTF::BumpPointerAllocator::BumpPointerAllocator):
4153         (WTF::BumpPointerAllocator::~BumpPointerAllocator):
4154         (WTF::BumpPointerAllocator::startAllocator):
4155         (WTF::BumpPointerAllocator::stopAllocator):
4156         * yarr/RegexInterpreter.cpp:
4157         (JSC::Yarr::Interpreter::allocDisjunctionContext):
4158         (JSC::Yarr::Interpreter::freeDisjunctionContext):
4159         (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
4160         (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
4161         (JSC::Yarr::Interpreter::interpret):
4162         (JSC::Yarr::Interpreter::Interpreter):
4163         (JSC::Yarr::ByteCompiler::compile):
4164         (JSC::Yarr::byteCompileRegex):
4165         * yarr/RegexInterpreter.h:
4166         (JSC::Yarr::BytecodePattern::BytecodePattern):
4167
4168 2010-07-26  Gavin Barraclough  <barraclough@apple.com>
4169
4170         Windows build fix from Chromium/GTK build fix!
4171
4172         * wtf/PageAllocation.cpp:
4173
4174 2010-07-26  Gavin Barraclough  <barraclough@apple.com>
4175
4176         Chromium/GTK build fix
4177
4178         * wtf/PageAllocation.cpp:
4179
4180 2010-07-26  Gavin Barraclough  <barraclough@apple.com>
4181
4182         Build fix for !Mac platforms.
4183
4184         * Android.mk:
4185         * CMakeLists.txt:
4186         * GNUmakefile.am:
4187         * JavaScriptCore.gypi:
4188         * JavaScriptCore.pro:
4189         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
4190
4191 2010-07-26  Gavin Barraclough  <barraclough@apple.com>
4192
4193         Reviewed by Oliver Hunt.
4194
4195         Bug 43009 - Abstract out page allocation from executable allocators
4196
4197         It would be great to have a single platform abstraction for block allocation, rather than copy/paste code.
4198
4199         In this initial implementation I've made Symbian fall back to use malloc/free for non-executable memory.
4200         I think this will match current behaviour for the next client we will want to port across (RegisterFile &
4201         Collector).
4202
4203         * CMakeListsEfl.txt:
4204         * GNUmakefile.am:
4205         * JavaScriptCore.gypi:
4206         * JavaScriptCore.pro:
4207         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
4208         * JavaScriptCore.xcodeproj/project.pbxproj:
4209         * jit/ExecutableAllocator.cpp:
4210         (JSC::ExecutableAllocator::intializePageSize):
4211         (JSC::ExecutablePool::systemAlloc):
4212         (JSC::ExecutablePool::systemRelease):
4213         (JSC::ExecutableAllocator::isValid):
4214         * jit/ExecutableAllocator.h:
4215         (JSC::ExecutablePool::ExecutablePool):
4216         (JSC::ExecutablePool::poolAllocate):
4217         * jit/ExecutableAllocatorFixedVMPool.cpp:
4218         (JSC::FixedVM