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