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