2011-01-05 Abhishek Arya <inferno@chromium.org>
[WebKit-https.git] / Source / JavaScriptCore / ChangeLog
1 2011-01-05  Patrick Gansterer  <paroga@webkit.org>
2
3         Reviewed by Andreas Kling.
4
5         [CMake] Fix the usage of SOURCE_GROUP
6         https://bugs.webkit.org/show_bug.cgi?id=51739
7
8         * CMakeLists.txt:
9
10 2011-01-05  Andras Becsi  <abecsi@webkit.org>
11
12         Reviewed by Csaba Osztrogonác.
13
14         [Qt][V8] Fix the build after recent changes.
15
16         * pcre/pcre.pri: Correct the path after Source was introduced.
17
18 2011-01-04  Steve Falkenburg  <sfalken@apple.com>
19
20         Build fix. Update path to FindSafari after source code reorganization.
21
22         * JavaScriptCore.vcproj/JavaScriptCore.sln:
23
24 2011-01-04  Daniel Bates  <dbates@rim.com>
25
26         Fix the Android build after changeset 74975 <http://trac.webkit.org/changeset/74975>
27         (https://bugs.webkit.org/show_bug.cgi?id=51855).
28
29         * wtf/ThreadingPthreads.cpp: Add include of PassOwnPtr.h.
30         (WTF::runThreadWithRegistration): Use -> instead of . to dereference pointer.
31
32 2011-01-04  Martin Robinson  <mrobinson@igalia.com>
33
34         Try to fix the EFL build.
35
36         * wtf/CMakeLists.txt: Remove PlatformRefPtr from the CMake source list.
37
38 2011-01-04  James Robinson  <jamesr@chromium.org>
39
40         Reviewed by Darin Adler.
41
42         StackBounds initialization in WTFThreadData should be guarded by #if USE(JSC)
43         https://bugs.webkit.org/show_bug.cgi?id=51881
44
45         The StackBounds class is only used by JavaScriptCore.
46
47         * wtf/WTFThreadData.cpp:
48         (WTF::WTFThreadData::WTFThreadData):
49         * wtf/WTFThreadData.h:
50         (WTF::WTFThreadData::resetCurrentIdentifierTable):
51
52 2011-01-03  Martin Robinson  <mrobinson@igalia.com>
53
54         Reviewed by Darin Adler.
55
56         Remove the last non-GObject usage of PlatformRefPtr and move the code to GRefPtr
57         https://bugs.webkit.org/show_bug.cgi?id=51846
58
59         * GNUmakefile.am: Remove PlatformRefPtr.h from the sources list.
60         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
61         * jit/ExecutableAllocator.h: Change references to PlatformRefPtr to RefPtr.
62         (JSC::ExecutableAllocator::cacheFlush): Ditto.
63         * wtf/PlatformRefPtr.h: Removed.
64         * wtf/RandomNumber.cpp: Change references to PlatformRefPtr to RefPtr.
65         (WTF::randomNumber): Ditto.
66         * wtf/brew/RefPtrBrew.h: Ditto.
67         (WTF::refIfNotNull): Added.
68         (WTF::derefIfNotNull): Added.
69         * wtf/brew/ShellBrew.h: Change references to PlatformRefPtr to RefPtr.
70         (WTF::createRefPtrInstance): Modified to return a RefPtr.
71         * wtf/gobject/GRefPtr.cpp: 
72         (WTF::refGPtr): Moved from PlatformRefPtr here.
73         (WTF::derefGPtr): Ditto.
74         * wtf/gobject/GRefPtr.h: Ditto.
75         (WTF::GRefPtr::GRefPtr): Ditto.
76         (WTF::GRefPtr::~GRefPtr): Ditto.
77         (WTF::GRefPtr::clear): Ditto.
78         (WTF::GRefPtr::isHashTableDeletedValue): Ditto.
79         (WTF::GRefPtr::get): Ditto.
80         (WTF::GRefPtr::operator*): Ditto.
81         (WTF::GRefPtr::operator->): Ditto.
82         (WTF::GRefPtr::operator!): Ditto.
83         (WTF::GRefPtr::operator UnspecifiedBoolType): Ditto.
84         (WTF::GRefPtr::hashTableDeletedValue): Ditto.
85         (WTF::::operator): Ditto.
86         (WTF::::swap): Ditto.
87         (WTF::swap): Ditto.
88         (WTF::operator==): Ditto.
89         (WTF::operator!=): Ditto.
90         (WTF::static_pointer_cast): Ditto.
91         (WTF::const_pointer_cast): Ditto.
92         (WTF::getPtr): Ditto.
93         (WTF::adoptGRef): Ditto.
94         (WTF::refGPtr): Ditto.
95         (WTF::derefGPtr): Ditto.
96
97 2011-01-04  Daniel Bates  <dbates@rim.com>
98
99         Reviewed by Adam Roben.
100
101         LEAK: Deallocate instance of ThreadFunctionInvocation if thread creation fails
102         https://bugs.webkit.org/show_bug.cgi?id=51860
103
104         * wtf/ThreadingWin.cpp:
105         (WTF::createThreadInternal):
106
107 2011-01-04  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
108
109         Reviewed by Ariya Hidayat.
110
111         [Qt][Symbian] Make sure that WebKit headers are included before platform headers on Symbian
112         https://bugs.webkit.org/show_bug.cgi?id=31273
113
114         On Symbian PREPEND_INCLUDEPATH is the best way to make sure that WebKit headers
115         are included before platform headers. On all other platforms continue to use
116         INCLUDEPATH (as before). This is a continuation of r65877.
117
118         No new tests as there is no new functionality.
119
120         * JavaScriptCore.pri:
121
122 2011-01-04  Darin Adler  <darin@apple.com>
123
124         Try to fix Windows build.
125
126         * wtf/ThreadingWin.cpp: Added include of PassOwnPtr.h. Fixed paragraphing
127         of conditional includes.
128         (WTF::wtfThreadEntryPoint): Use -> instead of . to dereference pointer.
129         (WTF::createThreadInternal): Tweaked #if to not need separate macro.
130
131 2011-01-04  Daniel Bates  <dbates@rim.com>
132
133         Reviewed by Adam Roben.
134
135         Extract ThreadFunctionInvocation into separate file and share between Apple Windows and Android
136         https://bugs.webkit.org/show_bug.cgi?id=51855
137
138         Both the Apple Windows and Android ports implement a similar adapter structure,
139         called ThreadFunctionInvocation and ThreadData respectively, as part of
140         their thread creation process. Instead, we should share such an adapter
141         structure and remove duplicate code.
142
143         * JavaScriptCore.gypi: Added header wtf/ThreadFunctionInvocation.h.
144         * wtf/ThreadFunctionInvocation.h: Added.
145         (WTF::ThreadFunctionInvocation::ThreadFunctionInvocation):
146         * wtf/ThreadingPthreads.cpp: Removed Android-specific structure ThreadData; Instead, use ThreadFunctionInvocation.
147         (WTF::runThreadWithRegistration):
148         (WTF::createThreadInternal): 
149         * wtf/ThreadingWin.cpp: Moved structure ThreadFunctionInvocation to its own file so that
150         it can be shared with the Android implementation of createThreadInternal().
151         (WTF::wtfThreadEntryPoint): Use OwnPtr to hold passed instance of ThreadFunctionInvocation.
152
153 2011-01-04  Daniel Bates  <dbates@rim.com>
154
155         Reviewed by Darin Adler.
156
157         Use __builtin_expect when compiling using RVCT in GNU mode
158         https://bugs.webkit.org/show_bug.cgi?id=51866
159
160         Derived from a patch by Dave Tapuska.
161
162         * wtf/AlwaysInline.h:
163
164 2011-01-03  Darin Adler  <darin@apple.com>
165
166         Reviewed by Brady Eidson.
167
168         * wtf/Forward.h: Added Decoder and Encoder.
169
170 2011-01-03  Brady Eidson  <beidson@apple.com>
171
172         Reviewed by Darin Adler.
173
174         Add Encode/Decode machinery Darin and I plan to work with for back/forward stuff in WebKit2.
175
176         Starting out with a pure virtual interface to be implemented in WK2, but we might change that later.
177
178         * GNUmakefile.am:
179         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
180         * JavaScriptCore.xcodeproj/project.pbxproj:
181         * wtf/CMakeLists.txt:
182
183         * wtf/Decoder.h: Added.
184         * wtf/Encoder.h: Added.
185
186 2011-01-03  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
187
188         Unreviewed build fix.
189
190         [Qt] Add NullPtr.cpp introduced in r71155 to the Qt build system.
191
192         This fix is required for builds where HAVE(NULLPTR) is false
193         (e.g. some MSVC and Symbian builds).
194
195         * wtf/wtf.pri:
196
197 2011-01-02  Dan Bernstein  <mitz@apple.com>
198
199         Rubber-stamped by Simon Fraser.
200
201         <rdar://problem/8812159> Update copyright strings
202
203         * Info.plist:
204
205 2011-01-02  Csaba Osztrogonác  <ossy@webkit.org>
206
207         Fix GTK+ build after r74855.
208
209         Reviewed by Xan Lopez.
210
211         * GNUmakefile.am: Fix include pathes.
212
213 2011-01-02  Adam Barth  <abarth@webkit.org>
214
215         One more .. missing in the Qt build.
216
217         * jsc.pro:
218
219 2011-01-02  Xan Lopez  <xlopez@igalia.com>
220
221         Fix GTK+ build.
222
223         * GNUmakefile.am: add -I$(srcdir)/Source to the JSC cppflags so
224         that anyone can include its headers without adding the prefix
225         'Source/'.
226
227 2011-01-02  Carl Lobo  <carllobo@gmail.com>
228
229         Reviewed by Adam Barth.
230
231         Fix Windows Build for non-production where VSPropsRedirectionDir is not defined.
232         https://bugs.webkit.org/show_bug.cgi?id=51797
233
234         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
235         * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
236         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
237         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
238         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
239
240 2011-01-01  Adam Barth  <abarth@webkit.org>
241
242         Fix relative include paths in an attempt to fix the Qt build.
243
244         * JavaScriptCore.pri:
245         * JavaScriptCore.pro:
246
247 2011-01-01  Adam Barth  <abarth@webkit.org>
248
249         Another speculative build fix for GTK.
250
251         * GNUmakefile.am:
252
253 2011-01-01  Adam Barth  <abarth@webkit.org>
254
255         Speculative build fix for GTK.  Update the paths in GNUmakefile to
256         include "Source".
257
258         * GNUmakefile.am:
259
260 2011-01-01  Adam Barth  <abarth@webkit.org>
261
262         Update relative paths in JavaScriptCore.gyp to account for the extra
263         level of directories.
264
265         * JavaScriptCore.gyp/JavaScriptCore.gyp:
266
267 2010-12-31  Patrick Gansterer  <paroga@webkit.org>
268
269         Reviewed by Darin Adler.
270
271         Add a fast case for ASCII strings in HashAndUTF8CharactersTranslator::equal
272         https://bugs.webkit.org/show_bug.cgi?id=50517
273
274         This change shows about 2% performance win on the xml-parser benchmark.
275
276         * wtf/text/AtomicString.cpp:
277         (WTF::HashAndUTF8CharactersTranslator::equal):
278
279 2010-12-30  Patrick Gansterer  <paroga@webkit.org>
280
281         Reviewed by Ariya Hidayat.
282
283         [CMake] Add WTF_HEADERS
284         https://bugs.webkit.org/show_bug.cgi?id=51741
285
286         Add the WTF headers to show them in Visual Studio.
287
288         * wtf/CMakeLists.txt:
289         * wtf/CMakeListsWinCE.txt:
290
291 2010-12-30  Konstantin Tokarev  <annulen@yandex.ru>
292
293         Reviewed by David Kilzer.
294
295         [Qt] Don't build wtf/TCSystemAlloc.cpp if --system-malloc option is
296         used
297         https://bugs.webkit.org/show_bug.cgi?id=51672
298
299         * wtf/wtf.pri: Replaced USE_SYSTEM_MALLOC with USE_SYSTEM_MALLOC=1
300
301 2010-12-30  Patrick Gansterer  <paroga@webkit.org>
302
303         Reviewed by Darin Adler.
304
305         Use OS(WINDOWS) instead of COMPILER(MSVC) in FastMalloc.cpp
306         https://bugs.webkit.org/show_bug.cgi?id=51743
307
308         Most of the ifdefs belong to windows and not to the MSVC compiler.
309
310         * wtf/FastMalloc.cpp:
311
312 2010-12-29  Gavin Barraclough  <barraclough@apple.com>
313
314         Reviewed by Sam Weinig.
315
316         Bug 51724 - In strict mode string literals should allow \0, but disallow \8 and \9.
317
318         * parser/Lexer.cpp:
319         (JSC::Lexer::parseString):
320
321 2010-12-29  Helder Correia  <helder@sencha.com>
322
323         Reviewed by Eric Seidel.
324
325         <VT> and <FF> are not valid JSON whitespace characters
326         https://bugs.webkit.org/show_bug.cgi?id=51671
327
328         Vertical Tab and Form Feed are not allowed white spaces by the JSON
329         RFC 4627: http://www.ietf.org/rfc/rfc4627.txt (2. JSON Grammar).
330
331         Tests: ietestcenter/Javascript/15.12.1.1-0-2.html
332                ietestcenter/Javascript/15.12.1.1-0-3.html
333
334         * runtime/LiteralParser.cpp:
335         (JSC::isJSONWhiteSpace):
336         (JSC::LiteralParser::Lexer::lex):
337
338 2010-12-28  Helder Correia  <helder@sencha.com>
339
340         Reviewed by Eric Seidel.
341
342         JSON.stringify must exist as a function taking 3 parameters
343         https://bugs.webkit.org/show_bug.cgi?id=51667
344
345         The reported function length is 1 instead.
346
347         Test: ietestcenter/Javascript/15.12.3-0-2.html
348
349         * runtime/JSONObject.cpp:
350
351 2010-12-28  Helder Correia  <helder@sencha.com>
352
353         Reviewed by Sam Weinig.
354
355         JSON.parse must exist as a function taking 2 parameters
356         https://bugs.webkit.org/show_bug.cgi?id=51666
357
358         Support for revivers was introduced in bug 26591, but the function
359         length has since remained unchanged.
360
361         Test: ietestcenter/Javascript/15.12.2-0-2.html
362
363         * runtime/JSONObject.cpp:
364
365 2010-12-27  Jake Helfert  <jake@jakeonthenet.com>
366
367         Reviewed and reworked by Darin Adler.
368
369         Building WebKit with Visual Studio 2010 fails due
370         to ambiguous assignment operator errors.
371         https://bugs.webkit.org/show_bug.cgi?id=51116
372
373         * wtf/NullPtr.h: Added a HAVE(NULLPTR) definition for use with
374         Platform.h HAVE macro, and included the Visual Studio 2010 compiler
375         as one of the ones that has nullptr.
376         * wtf/NullPtr.cpp: Updated condition to match.
377         
378         * wtf/PassOwnArrayPtr.h: Don't include the operator=(nullptr_t)
379         overload if we are compiling in loose mode and the compiler has
380         nullptr, because assignment of 0 will otherwise encounter
381         ambiguitity with this overload and the overload for loose mode
382         that takes a raw pointer. The conditional can be removed when we
383         get rid of loose mode.
384         * wtf/PassOwnPtr.h: Ditto.
385
386         * wtf/PassRefPtr.h: Don't include the operator=(nullptr_t) overload
387         if the compiler has nullptr, because assignment of 0 would be
388         ambiguous with the overload that takes a raw pointer. The conditional
389         can be removed if we ever decide we no longer need to support
390         assigning 0, but might need a way to catch that usage on older compilers.
391         * wtf/RefPtr.h: Ditto.
392         * wtf/RetainPtr.h: Ditto
393
394         * JavaScriptCore.xcodeproj/project.pbxproj: Added NullPtr.cpp,
395         accidentally omitted when the file was first added.
396
397 2010-12-26  Xan Lopez  <xlopez@igalia.com>
398
399         Reviewed by Eric Seidel.
400
401         [GTK] Add standalone target for JSC
402         https://bugs.webkit.org/show_bug.cgi?id=51607
403
404         * GNUmakefile.am: add convenience target to only build jsc and its
405         dependencies.
406
407 2010-12-24  Patrick Gansterer  <paroga@webkit.org>
408
409         Reviewed by Eric Seidel.
410
411         [WINCE] Add CPU(MIPS) detection
412         https://bugs.webkit.org/show_bug.cgi?id=51342
413
414         WinCE usually defines MIPS and _MIPS_.
415
416         * wtf/Platform.h:
417
418 2010-12-23  Gavin Barraclough  <barraclough@apple.com>
419
420         Reviewed by Sam Weinig.
421
422         Rename RegexCompiler.cpp to RegexPattern.cpp.
423         Implicitly call compileRegex from RegexPattern's constructor.
424
425         * Android.mk:
426         * CMakeLists.txt:
427         * GNUmakefile.am:
428         * JavaScriptCore.gypi:
429         * JavaScriptCore.pro:
430         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
431         * JavaScriptCore.xcodeproj/project.pbxproj:
432         * runtime/RegExp.cpp:
433         (JSC::RegExp::compile):
434         * yarr/RegexCompiler.cpp: Removed.
435         * yarr/RegexCompiler.h: Removed.
436         * yarr/RegexInterpreter.cpp:
437         * yarr/RegexJIT.cpp:
438         * yarr/RegexPattern.cpp: Copied from JavaScriptCore/yarr/RegexCompiler.cpp.
439         (JSC::Yarr::compileRegex):
440         (JSC::Yarr::RegexPattern::RegexPattern):
441         * yarr/RegexPattern.h:
442
443 2010-12-23  Patrick Gansterer  <paroga@webkit.org>
444
445         Unreviewed build fix for WinCE after r74360.
446
447         Move the OS(WINDOWS) section after the OS(WINCE) section
448         and add missing argument to the getStackMax call.
449
450         * wtf/StackBounds.cpp:
451         (WTF::StackBounds::initialize):
452
453 2010-12-22  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
454
455         Unreviewed build fix.
456
457         [Symbian] Make sure OSAllocatorSymbian builds
458
459         This patch only addresses the build problem.
460
461         https://bugs.webkit.org/show_bug.cgi?id=51128 tracks the full
462         (re)implementation of the Symbian allocator.
463
464         * wtf/OSAllocatorSymbian.cpp:
465         (WTF::OSAllocator::reserveUncommitted):
466         (WTF::OSAllocator::reserveAndCommit):
467         (WTF::OSAllocator::commit):
468
469 2010-12-22  Dan Bernstein  <mitz@apple.com>
470
471         Changed WebKitTools to Tools.
472
473         * JavaScriptCore.vcproj/JavaScriptCore.sln:
474
475 2010-12-22  Dan Bernstein  <mitz@apple.com>
476
477         Rubber-stamped by Mark Rowe.
478
479         Changed WebKitTools to Tools in script build phases.
480
481         * JavaScriptCore.xcodeproj/project.pbxproj:
482
483 2010-12-22  Andrei Popescu  <andreip@google.com>
484
485         Unreviewed build fix.
486
487         Fix Chromium Linux shared library build.
488         [Chromium] r74431 broke the Chromium Linux shared library build
489         https://bugs.webkit.org/show_bug.cgi?id=51462
490
491         * JavaScriptCore.gyp/JavaScriptCore.gyp:
492         * JavaScriptCore.gypi:
493
494 2010-12-21  Sheriff Bot  <webkit.review.bot@gmail.com>
495
496         Unreviewed, rolling out r74462.
497         http://trac.webkit.org/changeset/74462
498         https://bugs.webkit.org/show_bug.cgi?id=51449
499
500         broke chromium win (Requested by tonyg-cr on #webkit).
501
502         * JavaScriptCore.gypi:
503
504 2010-12-21  Tony Gentilcore  <tonyg@chromium.org>
505
506         Unreviewed build fix.
507
508         [chromium] Build fix after r74431
509         https://bugs.webkit.org/show_bug.cgi?id=51447
510
511         * JavaScriptCore.gypi:
512
513 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
514
515         Windows build fix.
516
517         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
518
519 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
520
521         Windows build fix.
522
523         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
524
525 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
526
527         Speculative build fix.
528
529         * jit/ExecutableAllocator.cpp:
530         (JSC::ExecutableAllocator::underMemoryPressure):
531
532 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
533
534         Reviewed by Oliver Hunt.
535
536         Bug 26276 - Need a mechanism to determine stack extent
537
538         This patch adds accurate stack size calculation for:
539             DARWIN, QNX, UNIX
540         We still need to fix:
541             WINDOWS, SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE
542
543         * wtf/StackBounds.cpp:
544         (WTF::StackBounds::initialize):
545
546 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
547
548          Reviewed by Geoff Garen.
549  
550         <rdar://problem/8765333> CRASH running out of executable memory, loading io9.com
551         https://bugs.webkit.org/show_bug.cgi?id=51443
552
553         The problem here is that each page uses a reasonable amount of memory, (~4Mb),
554         and that when miultiple pages are open we keep all JIT code for all functions
555         in all pages alive.
556
557         Add a check to detect high memory pressure situations in the executable allocator
558         (>50% of available memory allocated), and upon a top level entry into JSC (no code
559         running on the stack) in this situation throw away all JIT code.
560
561         * JavaScriptCore.exp:
562         * debugger/Debugger.cpp:
563         (JSC::Debugger::recompileAllJSFunctions): stop passing exec to recompile.
564         * jit/ExecutableAllocator.h:
565         * jit/ExecutableAllocatorFixedVMPool.cpp:
566         (JSC::ExecutablePool::systemAlloc): Count allocations.
567         (JSC::ExecutablePool::systemRelease): Count deallocations.
568         (JSC::ExecutablePool::underMemoryPressure): Check memory pressure.
569         * jit/ExecutableAllocatorPosix.cpp:
570         (JSC::ExecutablePool::underMemoryPressure): Stub out; only meaningful with FixedVMPool.
571         * jit/ExecutableAllocatorWin.cpp:
572         (JSC::ExecutablePool::underMemoryPressure): Stub out; only meaningful with FixedVMPool.
573         * runtime/Executable.cpp:
574         (JSC::FunctionExecutable::recompile): Remove ExecState argument to recompile.
575         * runtime/Executable.h:
576         * runtime/JSGlobalData.cpp:
577         (JSC::JSGlobalData::recompileAllJSFunctions): throws away all JIT code.
578         * runtime/JSGlobalData.h:
579         * runtime/JSGlobalObject.h:
580         (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): add check / call to throw away.
581
582 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
583
584         Reviewed by Geoff Garen.
585
586         <rdar://problem/8241425> JIT executable memory excessive usage due to regex caching
587         https://bugs.webkit.org/show_bug.cgi?id=51434
588
589         Reduce the amount of memory the RegExpCache can hold on to on iOS.
590         Currently the RegExpCache can hold 256 RegExp objects. If each falls into a separate
591         ExecutablePool, with a common size of 16Kb, this means we end up holding onto 4Mb of
592         memory. Firstly, we can reduce this by simply reducing the size of the cache to 32
593         entries. Secondly, we can use a separate set of ExecutablePools for JIT code generated
594         from RegExp objects. This helps in two ways (1) it increases the probability that
595         RegExps in the cache share the same pool, and (2) it means that a RegExp can't end
596         up holding on to a large ExecutablePool containing a translation of JS code.
597         (A RegExp could end up keeping a larger RegExp alive that happened to be sharing the
598         same pool, but large RegExp patterns are less common).
599
600         * runtime/JSGlobalData.h:
601         * runtime/RegExpCache.h:
602         * yarr/RegexJIT.cpp:
603         (JSC::Yarr::RegexGenerator::compile):
604
605 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
606
607         Windows build fix.
608
609         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
610
611 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
612
613         Eeeep! build fix!
614
615         * wtf/OSAllocator.h:
616         (WTF::OSAllocator::decommitAndRelease):
617
618 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
619
620         Ooops, fixed typo in comment.
621
622         * wtf/OSAllocator.h:
623
624 2010-12-21  Geoffrey Garen  <ggaren@apple.com>
625
626         Reviewed by Gavin Barraclough & Oliver Hunt.
627
628         Added PageAllocationAligned, a cross-platform abstraction for memory allocations with arbitrary alignment requirements
629         https://bugs.webkit.org/show_bug.cgi?id=51359
630         
631         I think this patch fixes <rdar://problem/8107952> [5.0.1] WER crash in
632         Heap::allocateBlock (1902752929), and some other leaks and crashes as well.
633
634         * Android.mk:
635         * CMakeLists.txt:
636         * GNUmakefile.am:
637         * JavaScriptCore.gypi:
638         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
639         * JavaScriptCore.xcodeproj/project.pbxproj: Updated build files.
640
641         * runtime/AlignedMemoryAllocator.h: Removed. Supplanted by
642         PageAllocationAligned.
643
644         * runtime/Collector.cpp:
645         (JSC::Heap::destroy):
646         (JSC::Heap::allocateBlock):
647         (JSC::Heap::freeBlock):
648         (JSC::Heap::addWeakGCHandle):
649         * runtime/Collector.h: Switched from AlignedMemoryAllocator to
650         PageAllocationAligned.
651
652         * runtime/GCHandle.cpp:
653         * runtime/GCHandle.h: Ditto.
654
655         * wtf/PageAllocation.h:
656         (WTF::PageAllocation::PageAllocation): Removed aligned memory allocation
657         functions. Supplanted by PageAllocationAligned.
658
659         * wtf/PageAllocationAligned.cpp: Added.
660         (WTF::PageAllocationAligned::allocate):
661         (WTF::PageAllocationAligned::deallocate):
662         * wtf/PageAllocationAligned.h: Added.
663         (WTF::PageAllocationAligned::PageAllocationAligned): New cross-platform
664         class for doing aligned memory allocation. This class properly matches
665         allocation and deallocation library calls, fixing a long-standing bug
666         in PageAllocation.
667
668         * wtf/Platform.h: Removed some defunction VM platform defines.
669
670         * wtf/wtf.pri: Updated build files.
671
672 2010-12-21  Oliver Hunt  <oliver@apple.com>
673
674         Reviewed by Gavin Barraclough.
675
676         ASSERTION FAILED: base->index() == m_codeBlock->argumentsRegister() while loading taobao.com
677         https://bugs.webkit.org/show_bug.cgi?id=49006
678
679         This problem was caused by having a parameter named 'arguments'.
680         The fix is to treat parameters named 'arguments' as shadowing
681         the actual arguments property, and so logically turn the function
682         into one that doesn't "use" arguments.
683
684         This required a bit of fiddling in the parser to ensure we correctly
685         propagate the 'feature' of shadowing is set correctly.
686
687         * bytecompiler/BytecodeGenerator.cpp:
688         (JSC::BytecodeGenerator::createArgumentsIfNecessary):
689           Change assertion to an early return as we may now reference
690           a property named 'arguments' without being in a function that
691           has the ArgumentsFeature
692         * parser/JSParser.cpp:
693         (JSC::JSParser::Scope::Scope):
694         (JSC::JSParser::Scope::declareParameter):
695         (JSC::JSParser::Scope::shadowsArguments):
696         (JSC::JSParser::parseProgram):
697         (JSC::JSParser::parseFormalParameters):
698         (JSC::JSParser::parseFunctionInfo):
699         * parser/Nodes.h:
700         (JSC::ScopeNode::usesArguments):
701
702 2010-12-21  Daniel Bates  <dbates@rim.com>
703
704         Reviewed by Eric Seidel and Darin Adler.
705
706         Deallocate GregorianDateTime.timeZone (if allocated) when copying so that we don't leak memory.
707         https://bugs.webkit.org/show_bug.cgi?id=51367
708
709         Inspired by a patch by George Staikos.
710
711         * wtf/DateMath.cpp:
712         (JSC::msToGregorianDateTime): Modified to set timeZone to nullptr since timeZone is now
713         of type OwnPtrArray<char>.
714         * wtf/DateMath.h: Change timeZone to type OwnArrayPtr<char>; Removed destructor since it is no longer needed.
715         (JSC::GregorianDateTime::GregorianDateTime): Modified to use OwnPtrArray semantics for timeZone.
716         (JSC::GregorianDateTime::operator tm): Ditto.
717         (JSC::GregorianDateTime::copyFrom): Ditto.
718
719 2010-12-21  Sheriff Bot  <webkit.review.bot@gmail.com>
720
721         Unreviewed, rolling out r74402.
722         http://trac.webkit.org/changeset/74402
723         https://bugs.webkit.org/show_bug.cgi?id=51402
724
725         This patch broke the Windows 7 Release Layout Tests (Requested
726         by jessieberlin on #webkit).
727
728         * wtf/StackBounds.cpp:
729         (WTF::estimateStackBound):
730         (WTF::StackBounds::initialize):
731
732 2010-12-21  Peter Varga  <pvarga@inf.u-szeged.hu>
733
734         Reviewed by Csaba Osztrogonác.
735
736         Unify the name of parentheses in YARR: rename parenthesis to
737         parentheses.
738
739         * yarr/RegexCompiler.cpp:
740         (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd):
741
742 2010-12-21  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
743
744         Reviewed by Andreas Kling.
745
746         [Qt] Set BUILDING_QT__ consistently
747         https://bugs.webkit.org/show_bug.cgi?id=51341
748
749         * JavaScriptCore.pri: Remove the definition of BUILDING_QT__ as it
750         is already defined in WebKit.pri.
751
752 2010-12-20  Gavin Barraclough  <barraclough@apple.com>
753
754         Reviewed by Oliver Hunt.
755
756         Bug 26276 - Need a mechanism to determine stack extent
757
758         This patch adds accurate stack size calculation for:
759             DARWIN, WINDOWS, QNX, UNIX
760         We still need to fix:
761             SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE
762
763         * wtf/StackBounds.cpp:
764         (WTF::StackBounds::initialize):
765
766 2010-12-20  Gavin Barraclough  <barraclough@apple.com>
767
768         PPC build fix; stop using std::swap on PageAllocation/PageReservation,
769         this was failing on some compilers since the lack of default construction
770         for the m_executable/m_writable fields meant the value being swapped may
771         not have been fully initialized.
772
773         * wtf/PageAllocation.h:
774         (WTF::PageAllocation::deallocate):
775         * wtf/PageBlock.h:
776         * wtf/PageReservation.h:
777         (WTF::PageReservation::deallocate):
778
779 2010-12-20  Oliver Hunt  <oliver@apple.com>
780
781         Reviewed by Geoffrey Garen.
782
783         |delete name| in strict mode code should be an early error
784         https://bugs.webkit.org/show_bug.cgi?id=50431
785
786         Disallow the |delete IDENTIFIER| production in strict mode, and removed
787         a bunch of now unnecessary code.
788
789         * parser/JSParser.cpp:
790         (JSC::JSParser::Scope::collectFreeVariables):
791         (JSC::jsParse):
792         (JSC::JSParser::parseProgram):
793         (JSC::JSParser::parseUnaryExpression):
794         * parser/JSParser.h:
795         * parser/Parser.cpp:
796         (JSC::Parser::parse):
797         * parser/Parser.h:
798         (JSC::Parser::parse):
799
800 2010-12-20  Gavin Barraclough  <barraclough@apple.com>
801
802         Reviewed by Olver Hunt.
803
804         Bug 51358 - Should check stack depth rather than using recursion limits in byte compilation
805
806         The current implementation of recursion limit checking is not safe on smaller stacks.
807         Switch to using a common mechanism, shared with the parser, to check recursion limits.
808
809         Make bytecompiler use StackBounds. Empirical testing shows emitStrcat to have the largest
810         footprint on the stack, at just under 1k on x86-64.  Given this, the default recursion
811         check (requiring 4k of available space to recurse) seems reasonable.
812
813         * bytecompiler/BytecodeGenerator.cpp:
814         (JSC::BytecodeGenerator::BytecodeGenerator):
815         * bytecompiler/BytecodeGenerator.h:
816         (JSC::BytecodeGenerator::emitNode):
817         (JSC::BytecodeGenerator::emitNodeInConditionContext):
818         * bytecompiler/NodesCodegen.cpp:
819         (JSC::BinaryOpNode::emitStrcat):
820
821 2010-12-20  Tony Gentilcore  <tonyg@chromium.org>
822
823         Unreviewed build fix.
824
825         Include pthread to fix chromium mac build (broken by r74360)
826         https://bugs.webkit.org/show_bug.cgi?id=51356
827
828         * wtf/StackBounds.cpp:
829
830 2010-12-20  Xan Lopez  <xlopez@igalia.com>
831
832         Reviewed by Gustavo Noronha.
833
834         * GNUmakefile.am: add missing files.
835
836 2010-12-18  Gavin Barraclough  <barraclough@apple.com>
837
838         Reviewed by Oliver Hunt.
839
840         Bug 26276 - Need a mechanism to determine stack extent
841
842         This patch adds a class 'StackBounds', to hold information about the machine stack.
843         The implementation of this class broadly adheres to the current implmentation of
844         stack limit checking, and as such does not solve the problem of determining stack
845         extent, but gives us a common place to do so.
846
847         Currently two mechanism are provided to determine the stack origin (the point the
848         stack is growing away from). currentThreadStackBase() in Collector provides a
849         more accurate determination of the stack origin, so use this to calculate
850         StackBounds::m_origin; WTFThreadData::approximatedStackStart is less accurate, and
851         as such can be removed.  Cache the StackBounds on WTFThreadData such that they
852         need only be determined once per thread, and for non-API contexts cache this
853         information in JSGlobalData, to save a thread-specific access.
854
855         For the time being retain the estimate of stack size used by JSC's parser
856         (128 * sizeof(void*) * 1024), with a view to replacing this with something more
857         accurate in the near future.
858
859         * parser/JSParser.cpp:
860         (JSC::JSParser::canRecurse):
861         (JSC::JSParser::JSParser):
862             Change to use StackBounds.
863         * runtime/Collector.cpp:
864         (JSC::Heap::registerThread):
865         (JSC::Heap::markCurrentThreadConservativelyInternal):
866             Change to use StackBounds, cached on JSGlobalData.
867         * runtime/JSGlobalData.cpp:
868         (JSC::JSGlobalData::JSGlobalData):
869         * runtime/JSGlobalData.h:
870         (JSC::JSGlobalData::stack):
871             Add a cached copy of StackBounds.
872         * wtf/StackBounds.cpp: Copied from JavaScriptCore/runtime/Collector.cpp.
873         (WTF::estimateStackBound):
874         (WTF::StackBounds::initialize):
875         (WTF::getStackMax):
876             Copy code from Collector.cpp to determine stack origin.
877         * wtf/StackBounds.h: Added.
878         (WTF::StackBounds::StackBounds):
879             No argument constructor; returns a null StackBounds.
880         (WTF::StackBounds::currentThreadStackBounds):
881             Returns a StackBounds object representing the stack limits
882             of the current thread.
883         (WTF::StackBounds::origin):
884             Returns to stack origin (the point the stack is growing away
885             from; the highest extent of the stack on machines where the
886             stack grows downwards.
887         (WTF::StackBounds::recursionLimit):
888             Returns a limit value that is 'a comfortable distance from
889             the end of the stack'. Our concept of this is currently 1 page
890             away from the end, however the default value may be tuned in
891             the future, and clients may override passing a larger delta;
892             should only be called on StackBounds object representing the
893             stack of the thread this method is called on (checked by
894             checkConsistency).
895         (WTF::StackBounds::recursionCheck):
896             Checks whether we are currently 'a comfortable distance from
897             the end of the stack'. Our concept of this is currently 1 page
898             away from the end, however the default value may be tuned in
899             the future, and clients may override passing a larger delta
900             to apply when checking, if they wish to do so. This method
901             should only be called on StackBounds object representing the
902             stack of the thread this method is called on (checked by
903             checkConsistency).
904         (WTF::StackBounds::current):
905             Approximate current stack position. On machines where the stack
906             is growing downwards this is the lowest address that might need
907             conservative collection.
908         (WTF::StackBounds::isGrowingDownward):
909             True for all platforms other than WINCE, which has to check.
910         (WTF::StackBounds::checkConsistency):
911             This is called in methods that shoulds only be operating on a
912             valid set of bounds; as such we expect m_origin != m_bounds
913             (i.e. stack size != zero) - we're really testing that this
914             object is not null (the constructor initializes both fields
915             to zero).  Also checks that current() is within the stack's
916             bounds.
917         * wtf/WTFThreadData.cpp:
918         (WTF::WTFThreadData::WTFThreadData):
919         * wtf/WTFThreadData.h:
920         (WTF::WTFThreadData::stack):
921             Add the StackBounds member variable.
922
923 2010-12-17  Geoffrey Garen  <ggaren@apple.com>
924
925         Reviewed by Sam Weinig.
926
927         Factored common page set management into a new PageBlock base class
928         https://bugs.webkit.org/show_bug.cgi?id=51285
929
930         * Android.mk:
931         * CMakeLists.txt:
932         * GNUmakefile.am:
933         * JavaScriptCore.gypi:
934         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
935         * JavaScriptCore.xcodeproj/project.pbxproj:
936         * interpreter/RegisterFile.h:
937         (JSC::RegisterFile::RegisterFile):
938         * jit/ExecutableAllocator.cpp:
939         (JSC::ExecutableAllocator::intializePageSize):
940         * wtf/PageAllocation.cpp: Removed.
941         * wtf/PageAllocation.h:
942         (WTF::PageAllocation::deallocate):
943         (WTF::PageAllocation::PageAllocation):
944         * wtf/PageReservation.h:
945         (WTF::PageReservation::commit):
946         (WTF::PageReservation::decommit):
947         (WTF::PageReservation::deallocate):
948         (WTF::PageReservation::PageReservation):
949         * wtf/wtf.pri:
950
951 2010-12-17  Michael Saboff  <msaboff@apple.com>
952
953         Reviewed by Oliver Hunt.
954
955         RegExp Jit'ed expression crashes clicking link on yelp.com
956         https://bugs.webkit.org/show_bug.cgi?id=51284
957
958         When transitioning between an non-repeating beginning of line
959         anchored expression and the remaining refactored repeating 
960         expression, we should not clear any residual datalabel in 
961         state's m_backtrack.  It will be resolved and cleared in subsequent
962         code when linkAlternativeBacktracks() is called for the repeating
963         alternative(s).
964
965         * yarr/RegexJIT.cpp:
966         (JSC::Yarr::RegexGenerator::BacktrackDestination::clear):
967         (JSC::Yarr::RegexGenerator::TermGenerationState::clearBacktrack):
968
969 2010-12-17  Dan Bernstein  <mitz@apple.com>
970
971         Rubber-stamped by Mark Rowe.
972
973         Updated for the renaming of WebKitTools to Tools
974
975         * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
976
977 2010-12-17  Ariya Hidayat  <ariya@sencha.com>
978
979         Reviewed by Oliver Hunt.
980
981         [JSC] parseAssignmentExpression should use TreeBuilder::CreatesAST
982         https://bugs.webkit.org/show_bug.cgi?id=51268
983
984         * parser/JSParser.cpp:
985         (JSC::JSParser::parseAssignmentExpression):
986
987 2010-12-17  Geoffrey Garen  <ggaren@apple.com>
988
989         Reviewed by Oliver Hunt.
990
991         Removed RChunk from PageAllocation/PageReservation, since it's now unused.
992         https://bugs.webkit.org/show_bug.cgi?id=51276
993
994         * wtf/PageAllocation.h:
995         (WTF::PageAllocation::PageAllocation):
996         * wtf/PageReservation.h:
997         (WTF::PageReservation::PageReservation):
998
999 2010-12-17  Oliver Hunt  <oliver@apple.com>
1000
1001         Reviewed by Gavin Barraclough.
1002
1003         Incorrect encoding of some constants in ARMv7 JIT
1004         https://bugs.webkit.org/show_bug.cgi?id=51273
1005         <rdar://problem/8650210>
1006
1007         When using immediate encoding 3 we need to write the byte
1008         that holds a duplicated value.
1009
1010         * assembler/ARMv7Assembler.h:
1011         (JSC::ARMThumbImmediate::makeEncodedImm):
1012
1013 2010-12-16  Evan Martin  <evan@chromium.org>
1014
1015         Reviewed by Darin Fisher.
1016
1017         [chromium] useless warnings when building on Windows
1018         https://bugs.webkit.org/show_bug.cgi?id=50985
1019
1020         Disable some compiler warnings that aren't indicative of real problems.
1021
1022         * JavaScriptCore.gyp/JavaScriptCore.gyp:
1023
1024 2010-12-16  Pratik Solanki  <psolanki@apple.com>
1025
1026         Reviewed by Geoffrey Garen.
1027
1028         https://bugs.webkit.org/show_bug.cgi?id=51166
1029         ExecutableAllocator::cacheFlush should call sys_cache_control
1030
1031         * jit/ExecutableAllocator.h:
1032         (JSC::ExecutableAllocator::cacheFlush): Use the more correct and forward looking API -
1033         sys_cache_control(kCacheFunctionPrepareForExecution,...).
1034
1035 2010-12-16  Ariya Hidayat  <ariya@sencha.com>
1036
1037         Reviewed by Andreas Kling.
1038
1039         [JSC] Const correctness in ASTBuilder and SyntaxChecker
1040         https://bugs.webkit.org/show_bug.cgi?id=51141
1041
1042         * parser/ASTBuilder.h:
1043         (JSC::ASTBuilder::getName):
1044         (JSC::ASTBuilder::getType):
1045         (JSC::ASTBuilder::isResolve):
1046         * parser/SyntaxChecker.h:
1047         (JSC::SyntaxChecker::operatorStackPop):
1048
1049 2010-12-15  Kenneth Russell  <kbr@google.com>
1050
1051         Reviewed by James Robinson.
1052
1053         Web Audio API: port FFTFrame to MKL
1054         https://bugs.webkit.org/show_bug.cgi?id=50986
1055
1056         Fixed bug in log2 emulation function provided for Windows port of
1057         Web Audio API.
1058
1059         * wtf/MathExtras.h:
1060         (log2):
1061
1062 2010-12-14  Mark Rowe  <mrowe@apple.com>
1063
1064         Reviewed by Sam Weinig.
1065
1066         <http://webkit.org/b/51064> Reproducible crash inside WebCore::MediaPlayerPrivateQTKit::createQTMovie when loading <video>
1067
1068         * wtf/text/WTFString.h: Prevent String from being implicitly convertable to bool.
1069         It was previously implicitly convertible to bool on Mac via operator NSString*,
1070         but since that always has a non-zero return value it would give unexpected results.
1071
1072 2010-12-14  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1073
1074         Reviewed by Eric Seidel.
1075
1076         [Qt] [Symbian] Do not use pkg-config on Symbian as it is not supported
1077         https://bugs.webkit.org/show_bug.cgi?id=50231
1078
1079         Guard CONFIG+=link_pkgconfig with !symbian.
1080
1081         * jsc.pro:
1082
1083 2010-12-14  Cameron Zwarich  <zwarich@apple.com>
1084
1085         Not reviewed.
1086
1087         Revert accidental change disabling the JIT for most platforms.
1088
1089         * wtf/Platform.h:
1090
1091 2010-12-13  Cameron Zwarich  <zwarich@apple.com>
1092
1093         Reviewed by Eric Seidel.
1094
1095         Clang fails to build the JSC interpreter
1096         https://bugs.webkit.org/show_bug.cgi?id=51016
1097
1098         Clang does not allow indirect gotos out of scopes with cleanup. GCC 4.2 allows
1099         them, but it does not correctly generate the cleanup, causing a leak if the
1100         cleanup decrements a reference count.
1101
1102         * interpreter/Interpreter.cpp:
1103         (JSC::Interpreter::privateExecute): Put an Identifier into its own scope.
1104
1105 2010-12-14  Carlos Garcia Campos  <cgarcia@igalia.com>
1106
1107         Reviewed by Martin Robinson.
1108
1109         [GTK] Simplify context-menu handling code
1110         https://bugs.webkit.org/show_bug.cgi?id=49658
1111
1112         * wtf/PlatformRefPtr.h: Add leakRef()
1113
1114 2010-12-13  Cameron Zwarich  <zwarich@apple.com>
1115
1116         Reviewed by Gavin Barraclough.
1117
1118         JavaScriptCore should not use "asm volatile" outside of a function
1119         https://bugs.webkit.org/show_bug.cgi?id=50991
1120
1121         * jit/JITStubs.cpp: Remove the volatile keyword from asm statements.
1122
1123 2010-12-13  Steve Falkenburg  <sfalken@apple.com>
1124
1125         Windows production build fix.
1126         Try copying ICU 4.6 in addition to 4.4 and 4.2.
1127
1128         * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd:
1129
1130 2010-12-13  Michael Saboff  <msaboff@apple.com>
1131
1132         Reviewed by Oliver Hunt.
1133
1134         REGRESSION: mobileme mail viewing is broken
1135         https://bugs.webkit.org/show_bug.cgi?id=50884
1136
1137         Fixed problem where simple parenthesis (those without capture and
1138         with a fixed count) where not propagating backtrack to labels for 
1139         nested parentheses.  Also added the nesting level for the parentheses 
1140         state created in that case as well.
1141
1142         * yarr/RegexJIT.cpp:
1143         (JSC::Yarr::RegexGenerator::BacktrackDestination::copyBacktrackToLabel):
1144         (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
1145         (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
1146         (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
1147
1148 2010-12-13  Peter Varga  <pvarga@inf.u-szeged.hu>
1149
1150         Reviewed by Gavin Barraclough.
1151
1152         Reduce the size of the RegexStackSpaceForBackTrackInfoParentheses in YARR
1153         https://bugs.webkit.org/show_bug.cgi?id=49385
1154
1155         Remove the BackTrackInfoParentheses struct prevBegin and prevEnd members.
1156
1157         * yarr/RegexInterpreter.cpp:
1158         (JSC::Yarr::Interpreter::matchParentheses):
1159         (JSC::Yarr::Interpreter::backtrackParentheses):
1160         * yarr/RegexPattern.h:
1161
1162 2010-12-10  Michael Saboff  <msaboff@apple.com>
1163
1164         Reviewed by Gavin Barraclough.
1165
1166         REGRESSION Hang inside Yarr::RegexCodeBlock::execute when visiting
1167         bugs.webkit.org
1168         https://bugs.webkit.org/show_bug.cgi?id=50816
1169
1170         First nested parentheses of the second or greater alternative
1171         where backtracking to the prior parentheses.  Changed the default
1172         handling of initial parentheses for all alternatives to go back
1173         to the immediate outer paren.
1174
1175         * yarr/RegexJIT.cpp:
1176         (JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail):
1177         (JSC::Yarr::RegexGenerator::TermGenerationState::TermGenerationState):
1178         (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
1179         (JSC::Yarr::RegexGenerator::TermGenerationState::getTermIndex):
1180         (JSC::Yarr::RegexGenerator::TermGenerationState::setParenthesesTail):
1181         (JSC::Yarr::RegexGenerator::TermGenerationState::getParenthesesTail):
1182         (JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail):
1183         (JSC::Yarr::RegexGenerator::ParenthesesTail::processBacktracks):
1184         (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
1185         (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
1186
1187 2010-12-11  Patrick Gansterer  <paroga@webkit.org>
1188
1189         Reviewed by Darin Adler.
1190
1191         Add an overload to makeString for Vector<char>
1192         https://bugs.webkit.org/show_bug.cgi?id=50123
1193
1194         Also cleanup StringTypeAdapter.
1195
1196         * wtf/text/StringConcatenate.h:
1197
1198 2010-12-10  Siddharth Mathur  <siddharth.mathur@nokia.com>
1199
1200         Reviewed by Eric Seidel.
1201
1202         [Qt] Build fix for Symbian: don't compile POSIX memory management implementation 
1203         https://bugs.webkit.org/show_bug.cgi?id=50707
1204
1205         * wtf/wtf.pri:
1206
1207 2010-12-10  Steve Falkenburg  <sfalken@apple.com>
1208
1209         Windows production build fix.
1210         
1211         Don't stop if react-to-vsprops-changes.py exits with an error,
1212         since this will occur in production builds.
1213
1214         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
1215
1216 2010-12-10  Brian Weinstein  <bweinstein@apple.com>
1217
1218         Reviewed by Adam Roben.
1219
1220         Turn on USE(CROSS_PLATFORM_CONTEXT_MENUS) for Windows.
1221
1222         * wtf/Platform.h:
1223
1224 2010-12-10  Martin Robinson  <mrobinson@igalia.com>
1225
1226         Unreviewed, rolling out r73703.
1227         http://trac.webkit.org/changeset/73703
1228         https://bugs.webkit.org/show_bug.cgi?id=49658
1229
1230         This patch is causing crashes on the GTK+ bots.
1231
1232         * wtf/PlatformRefPtr.h:
1233
1234 2010-12-10  Patrick Gansterer  <paroga@webkit.org>
1235
1236         Reviewed by Eric Seidel.
1237
1238         Cleanup StringWx.cpp
1239         https://bugs.webkit.org/show_bug.cgi?id=50525
1240
1241         Use StringImpl::createUninitialized to avoid memcpy and fix style issues.
1242
1243         * wtf/wx/StringWx.cpp:
1244         (WTF::String::String):
1245
1246 2010-12-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1247
1248         Reviewed by Martin Robinson.
1249
1250         [GTK] Simplify context-menu handling code
1251         https://bugs.webkit.org/show_bug.cgi?id=49658
1252
1253         * wtf/PlatformRefPtr.h:
1254
1255 2010-12-09  Michael Saboff  <msaboff@apple.com>
1256
1257         Reviewed by Gavin Barraclough.
1258
1259         REGRESSION (r73065?): A regex no longer works 
1260         https://bugs.webkit.org/show_bug.cgi?id=50570
1261
1262         Changed the handling of adjacent parentheses backtracks in two ways.
1263         First, only outer most paren backtracks default to back tracking
1264         to the "next character" looping code.  Second, added a jump around 
1265         backtracks that fall through to the next backtrack where the
1266         second backtrack has some greedy processing before the backtracking
1267         from outside the parentheses code.
1268         Also cleaned up extraneous white spce, removing white space at the
1269         end of or that makes up a whole line.
1270
1271         * yarr/RegexJIT.cpp:
1272         (JSC::Yarr::RegexGenerator::GenerationState::GenerationState):
1273         (JSC::Yarr::RegexGenerator::GenerationState::incrementParenNestingLevel):
1274         (JSC::Yarr::RegexGenerator::GenerationState::decrementParenNestingLevel):
1275         (JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail):
1276         (JSC::Yarr::RegexGenerator::GenerationState::emitParenthesesTail):
1277         (JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail):
1278         (JSC::Yarr::RegexGenerator::ParenthesesTail::setNextIteration):
1279         (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
1280         (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
1281
1282 2010-12-09  Michael Saboff  <msaboff@apple.com>
1283
1284         Reviewed by Geoffrey Garen.
1285
1286         Addressed the "FIXME" issues in array sort for toString() methods that
1287         mutate the array in either size or contents.  The change is to mark
1288         the temporary array contents so that they are not garbage collected
1289         and to make sure the array is large enough to hold the contents
1290         of the sorted temporary vector.
1291         https://bugs.webkit.org/show_bug.cgi?id=50718
1292
1293         * runtime/Collector.cpp:
1294         (JSC::Heap::addTempSortVector):
1295         (JSC::Heap::removeTempSortVector):
1296         (JSC::Heap::markTempSortVectors):
1297         (JSC::Heap::markRoots):
1298         * runtime/Collector.h:
1299         * runtime/JSArray.cpp:
1300         (JSC::JSArray::sort):
1301         * runtime/JSValue.h:
1302
1303 2010-12-09  Michael Saboff  <msaboff@apple.com>
1304
1305         Reviewed by Darin Adler.
1306
1307         Changed setting of backtrack labels to not overwrite a prior
1308         label.  Where losing prior labe which then reverted back to 
1309         next character label.
1310         https://bugs.webkit.org/show_bug.cgi?id=50579
1311
1312         * yarr/RegexJIT.cpp:
1313         (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackToLabel):
1314
1315 2010-12-08  Gavin Barraclough  <barraclough@apple.com>
1316
1317         Reviewed by Sam Weinig.
1318
1319         Permit Character Class Escape in CharacterRange in Character Class.
1320         https://bugs.webkit.org/show_bug.cgi?id=50483
1321         https://bugs.webkit.org/show_bug.cgi?id=50538
1322         https://bugs.webkit.org/show_bug.cgi?id=50654
1323         https://bugs.webkit.org/show_bug.cgi?id=50646
1324
1325         We recently tightened up our spec conformance in generating syntax
1326         error in these cases, however testing in the wild has shown this
1327         to be problematic. This reverts the previous change in allowing
1328         class escapes (e.g. \d) in ranges in character classes ([]), but
1329         does retain some closer conformance to the spec in only allowing
1330         ranges that would be permitted per the grammar rules in the spec
1331         (e.g. in /[\d-a-z]/ "a-z" cannot be considered as a range).
1332
1333         * yarr/RegexParser.h:
1334         (JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacter):
1335         (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBuiltInCharacterClass):
1336         (JSC::Yarr::Parser::parse):
1337
1338 2010-12-08  Geoffrey Garen  <ggaren@apple.com>
1339
1340         Reviewed by Sam Weinig.
1341
1342         Try to fix crash-on-launch seen on Windows builder.
1343
1344         * wtf/OSAllocatorWin.cpp:
1345         (WTF::OSAllocator::release): Disabled an ASSERT, because it checks for
1346         a bug that hasn't been fixed yet.
1347
1348 2010-12-08  Geoffrey Garen  <ggaren@apple.com>
1349
1350         Try to fix Windows build.
1351
1352         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def file.
1353
1354 2010-12-08  Geoffrey Garen  <ggaren@apple.com>
1355
1356         Try to fix Windows build.
1357
1358         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def
1359         file to remove a symbol -- the next build failure will say which symbol
1360         to add back.
1361
1362 2010-12-08  Geoffrey Garen  <ggaren@apple.com>
1363
1364         Try to fix Windows build.
1365
1366         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def file.
1367
1368 2010-12-08  Geoffrey Garen  <ggaren@apple.com>
1369
1370         Try to fix GTK Linux build.
1371
1372         * jit/ExecutableAllocator.cpp:
1373         (JSC::ExecutablePool::systemAlloc):
1374         * runtime/AlignedMemoryAllocator.h:
1375         (JSC::::AlignedMemoryAllocator): Updated for Usage enum moving to OSAllocator.
1376
1377 2010-12-07  Geoffrey Garen  <ggaren@apple.com>
1378
1379         Reviewed by Sam Weinig.
1380
1381         Migrated OS-specific allocation code from PageReservation and PageAllocation to OSAllocator
1382         https://bugs.webkit.org/show_bug.cgi?id=50653
1383
1384         * JavaScriptCore.exp: Updated for new function signature.
1385
1386         * interpreter/RegisterFile.h:
1387         (JSC::RegisterFile::RegisterFile):
1388         (JSC::RegisterFile::grow):
1389         * jit/ExecutableAllocatorFixedVMPool.cpp:
1390         (JSC::FixedVMPoolAllocator::reuse):
1391         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): Removed checkAllocatedOkay.
1392         OSAllocator is now the central location for verifying that allocation succeeds.
1393         This allowed me to remove some complicating cross-platform cruft.
1394
1395         * runtime/AlignedMemoryAllocator.h:
1396         (JSC::::allocate): Updated for code motion.
1397
1398         * wtf/OSAllocator.h: Added Usage, writable, and executable parameters, to
1399         support VM features required by clients of PageAllocation and PageReservation.
1400
1401         * wtf/OSAllocatorPosix.cpp:
1402         (WTF::OSAllocator::reserve):
1403         (WTF::OSAllocator::reserveAndCommit):
1404         (WTF::OSAllocator::commit): Moved PageAllocation support for randomizing
1405         executable memory here.
1406
1407         * wtf/OSAllocatorSymbian.cpp:
1408         (WTF::OSAllocator::reserve):
1409         (WTF::OSAllocator::reserveAndCommit):
1410         (WTF::OSAllocator::commit): Updated for new function signatures.
1411
1412         * wtf/OSAllocatorWin.cpp:
1413         (WTF::protection):
1414         (WTF::OSAllocator::reserve):
1415         (WTF::OSAllocator::reserveAndCommit):
1416         (WTF::OSAllocator::commit):
1417         (WTF::OSAllocator::release): Updated for new function signatures. Moved
1418         some protection-related and WINCE-related code from PageAllocation here.
1419
1420         * wtf/PageAllocation.cpp: Nixed cross-platform lastError abstraction, since
1421         it was only used by checkAllocatedOkay, which is now gone.
1422
1423         * wtf/PageAllocation.h:
1424         (WTF::PageAllocation::allocate):
1425         (WTF::PageAllocation::allocateAligned):
1426         (WTF::PageAllocation::deallocate):
1427         (WTF::PageAllocation::isPowerOfTwo):
1428         (WTF::PageAllocation::systemAllocateAligned): Removed system* functions,
1429         and replaced calls to them with calls to OSAllocator.
1430
1431         * wtf/PageReservation.h:
1432         (WTF::PageReservation::commit):
1433         (WTF::PageReservation::decommit):
1434         (WTF::PageReservation::reserve):
1435         (WTF::PageReservation::deallocate):
1436         (WTF::PageReservation::PageReservation): Ditto. Added m_writable and
1437         m_executable because these flags are now required when committing memory.
1438
1439 2010-12-08  Chris Rogers  <crogers@google.com>
1440
1441         Reviewed by Kenneth Russell.
1442
1443         Add web audio files to mac port Xcode projects
1444         https://bugs.webkit.org/show_bug.cgi?id=50721
1445
1446         * JavaScriptCore.xcodeproj/project.pbxproj:
1447
1448 2010-12-08  Oliver Hunt  <oliver@apple.com>
1449
1450         Reviewed by Gavin Barraclough.
1451
1452         Marking the active global object re-enters through markConservatively
1453         https://bugs.webkit.org/show_bug.cgi?id=50711
1454
1455         draining of the MarkStack is not allowed to be re-entrant, we got away
1456         with this simply due to the logic in MarkStack::drain implicitly handling
1457         changes that could be triggered by the re-entry.
1458
1459         Just to be safe this patch removes the re-entry through markConservatively
1460         so we don't accidentally introduce such an issue in future.  I've also
1461         added an assertion to catch such errors.
1462
1463         * runtime/Collector.cpp:
1464         (JSC::Heap::markConservatively):
1465         (JSC::Heap::markCurrentThreadConservativelyInternal):
1466         (JSC::Heap::markOtherThreadConservatively):
1467         * runtime/JSArray.h:
1468         (JSC::MarkStack::drain):
1469         * runtime/MarkStack.h:
1470         (JSC::MarkStack::MarkStack):
1471
1472 2010-12-08  Chris Marrin  <cmarrin@apple.com>
1473
1474         Reviewed by Simon Fraser.
1475
1476         Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
1477         https://bugs.webkit.org/show_bug.cgi?id=49388
1478
1479         Added a WTF_PLATFORM_CA flag. Set when platform is MAC or IOS or (WINDOWS AND CG)
1480         which was decided was the best way to identify a build with CoreAnimation
1481
1482         * wtf/Platform.h:
1483
1484 2010-12-07  Anders Carlsson  <andersca@apple.com>
1485
1486         Build fix follow up build fix.
1487
1488         * pcre/pcre_ucp_searchfuncs.cpp:
1489         (jsc_pcre_ucp_othercase):
1490
1491 2010-12-07  Anders Carlsson  <andersca@apple.com>
1492
1493         Reviewed by Darin Adler.
1494
1495         Fix clang++ build
1496         https://bugs.webkit.org/show_bug.cgi?id=50645
1497
1498         Explicitly cast offset to int.
1499
1500         * pcre/pcre_ucp_searchfuncs.cpp:
1501         (jsc_pcre_ucp_othercase):
1502
1503 2010-12-07  Kenneth Russell  <kbr@google.com>
1504
1505         Reviewed by David Levin.
1506
1507         Fix compilation of core web audio files on Windows
1508         https://bugs.webkit.org/show_bug.cgi?id=50603
1509
1510         Added log2 definition to MathExtras.h on Windows platform.
1511
1512         * wtf/MathExtras.h:
1513         (log2):
1514
1515 2010-12-07  Antti Koivisto  <antti@apple.com>
1516
1517         Reviewed by Gavin Barraclough.
1518
1519         https://bugs.webkit.org/show_bug.cgi?id=50412
1520         http://www.wunderground.com/US/CA/Hayward.html causes big memory spike during page loading 
1521         
1522         Creating a substring caused the original string be flattened if it was in the rope form. This could use
1523         significant amount of memory by reducing buffer sharing between strings.
1524         
1525         Add a rope specific substring function that constructs the substring by reusing the rope fibers
1526         instead of flattening the rope.
1527         
1528         No change observed in SunSpider.
1529
1530         * runtime/JSString.cpp:
1531         (JSC::JSString::substringFromRope):
1532         * runtime/JSString.h:
1533         (JSC::jsSubstring):
1534         * runtime/StringPrototype.cpp:
1535         (JSC::stringProtoFuncSubstr):
1536         (JSC::stringProtoFuncSubstring):
1537
1538 2010-12-06  Geoffrey Garen  <ggaren@apple.com>
1539
1540         Reviewed by Gavin Barraclough.
1541
1542         Simplified some ASLR-related code in PageAllocation/Reservation
1543         https://bugs.webkit.org/show_bug.cgi?id=50599
1544         
1545         Removed reserveAt, allocateAt, and friends, since they all existed to
1546         serve one feature: ASLR for executable memory on x86_64 on Mac. Moved
1547         ASLR code down into systemAllocate -- now, any time you allocate
1548         executable memory on a supporting platform, the memory's location is
1549         randomized.
1550
1551         * jit/ExecutableAllocatorFixedVMPool.cpp:
1552         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): No need for the caller
1553         to randomize anything.
1554
1555         * wtf/PageAllocation.h:
1556         (WTF::PageAllocation::systemAllocate): Removed some *At() functions, and
1557         beefed up executable allocation with randomization.
1558
1559         * wtf/PageReservation.h:
1560         (WTF::PageReservation::systemReserve): Removed some *At() functions.
1561
1562 2010-12-06  Geoffrey Garen  <ggaren@apple.com>
1563
1564         Reviewed by Maciej Stachowiak.
1565
1566         reserveAndCommit doesn't commit on MADVISE_FREE_REUSE systems
1567         https://bugs.webkit.org/show_bug.cgi?id=50588
1568         
1569         * wtf/OSAllocatorPosix.cpp:
1570         (WTF::OSAllocator::reserve):
1571         (WTF::OSAllocator::reserveAndCommit):
1572         (WTF::OSAllocator::commit): Tightened up some comments. Changed
1573         reserveAndCommit to actually commit on MADVISE_FREE_REUSE systems.
1574
1575 2010-12-06  Patrick Gansterer  <paroga@webkit.org>
1576
1577         Reviewed by Andreas Kling.
1578
1579         [WINCE] Add build system
1580         https://bugs.webkit.org/show_bug.cgi?id=50522
1581
1582         * CMakeListsWinCE.txt: Added.
1583         * shell/CMakeListsWinCE.txt: Added.
1584         * wtf/CMakeListsWinCE.txt: Added.
1585
1586 2010-12-06  John Tantalo  <john.tantalo@gmail.com>
1587
1588         Reviewed by Geoffrey Garen.
1589
1590         jsc does not ignore shebang
1591         https://bugs.webkit.org/show_bug.cgi?id=49576
1592
1593         * jsc.cpp:
1594         (fillBufferWithContentsOfFile):
1595           - translate shebang into a valid JavaScript comment so the lexer ignores it
1596
1597 2010-12-05  Adam Roben  <aroben@apple.com>
1598
1599         Windows production build fix
1600
1601         Put spaces after trailing backslashes when setting
1602         %WebKitVSPropsRedirectionDir%. According to MSDN
1603         <http://msdn.microsoft.com/en-us/library/2kzfk8c7(v=VS.80).aspx>:
1604
1605            A backslash ( \ ) followed by a newline character is interpreted as
1606            a space in the command; use a backslash at the end of a line to
1607            continue a command onto the next line. NMAKE interprets the
1608            backslash literally if any other character, including a space or
1609            tab, follows the backslash.
1610
1611         * JavaScriptCore.vcproj/JavaScriptCore.make:
1612
1613 2010-12-04  Patrick Gansterer  <paroga@webkit.org>
1614
1615         Unreviewed, build fix after r69132.
1616
1617         * shell/CMakeLists.txt: Fix directory name (jsc -> shell).
1618
1619 2010-12-04  Xan Lopez  <xlopez@igalia.com>
1620
1621         Reviewed by Martin Robinson.
1622
1623         [GTK] Drop GdkDrawable usage, it's deprecated in GTK+3.x and we can use GdkWindow
1624         https://bugs.webkit.org/show_bug.cgi?id=50451
1625
1626         * wtf/gobject/GTypedefs.h: add GdkWindow defines.
1627
1628 2010-12-03  Gavin Barraclough  <barraclough@apple.com>
1629
1630         Rubber stamped by Oliver Hunt.
1631
1632         Bug 50509 - set* methods on MacroAssembler are awfully named.
1633
1634         Methods set32 and setTest32 compare 32-bit operands, and set a 32-bit results based on the comparison.
1635         set8 compares 32-bit operands, and sets an 8-bit result based on the comparison.
1636         setTest8 compares 8-bit operands, and sets a 32-bit result based on the comparison.
1637
1638         Rename to clarify.
1639
1640         set32 -> set32Compare32
1641         setTest32 -> set32Test32
1642         set8 -> set8Compare32
1643         setTest8 -> set32Test8
1644
1645         * assembler/MacroAssembler.h:
1646         (JSC::MacroAssembler::setPtr):
1647         * assembler/MacroAssemblerARM.h:
1648         (JSC::MacroAssemblerARM::set32Compare32):
1649         (JSC::MacroAssemblerARM::set8Compare32):
1650         (JSC::MacroAssemblerARM::set32Test32):
1651         (JSC::MacroAssemblerARM::set32Test8):
1652         * assembler/MacroAssemblerARMv7.h:
1653         (JSC::MacroAssemblerARMv7::set32Compare32):
1654         (JSC::MacroAssemblerARMv7::set8Compare32):
1655         (JSC::MacroAssemblerARMv7::set32Test32):
1656         (JSC::MacroAssemblerARMv7::set32Test8):
1657         * assembler/MacroAssemblerMIPS.h:
1658         (JSC::MacroAssemblerMIPS::set8Compare32):
1659         (JSC::MacroAssemblerMIPS::set32Compare32):
1660         (JSC::MacroAssemblerMIPS::set32Test8):
1661         (JSC::MacroAssemblerMIPS::set32Test32):
1662         * assembler/MacroAssemblerX86Common.h:
1663         (JSC::MacroAssemblerX86Common::set8Compare32):
1664         (JSC::MacroAssemblerX86Common::set32Compare32):
1665         (JSC::MacroAssemblerX86Common::set32Test8):
1666         (JSC::MacroAssemblerX86Common::set32Test32):
1667         * jit/JITOpcodes.cpp:
1668         (JSC::JIT::emit_op_eq):
1669         (JSC::JIT::emit_op_neq):
1670         (JSC::JIT::compileOpStrictEq):
1671         (JSC::JIT::emit_op_eq_null):
1672         (JSC::JIT::emit_op_neq_null):
1673         * jit/JITOpcodes32_64.cpp:
1674         (JSC::JIT::emit_op_eq):
1675         (JSC::JIT::emit_op_neq):
1676         (JSC::JIT::compileOpStrictEq):
1677         (JSC::JIT::emit_op_eq_null):
1678         (JSC::JIT::emit_op_neq_null):
1679
1680 2010-12-03  Oliver Hunt  <oliver@apple.com>
1681
1682         Reviewed by Geoff Garen.
1683
1684         Incorrect logic for returning memory at the end of linking.
1685         Reviewed by Geoff Garen.
1686
1687         At the end of linking we return any space at the end of the
1688         allocated executable region that was saved due to branch
1689         compaction.  This is currently by done by subtracting the
1690         different from the m_freePtr in the allocation pool.  This
1691         can be incorrect if your allocation was made from a new
1692         page that was not selected for subsequent allocations.
1693
1694         This patch corrects this behaviour by verifying that the
1695         memory being returned actually comes from the current
1696         allocation pool.
1697
1698         * assembler/LinkBuffer.h:
1699         (JSC::LinkBuffer::linkCode):
1700         * jit/ExecutableAllocator.h:
1701         (JSC::ExecutablePool::tryShrink):
1702
1703 2010-12-03  Michael Saboff  <msaboff@apple.com>
1704
1705         Reviewed by Gavin Barraclough
1706
1707         Changes to significantly reduce branches to branches in JIT'ed
1708         parentheses backtrack processing.  The changes include the following:
1709         - Taking the backtracking processing out of line and adding it as
1710           code at the end of the JIT'ed routine.
1711         - Allow backtracks to be direct via an indirect branch for an address
1712           pushed onto the stack.  If the use of an indirect branch is from a
1713           conditional jump, then we emit a trampoline at the end of the 
1714           routine.
1715         - Propogate backtracks instead of adding trampolines.  Backtracks are
1716           propogated to where they are used.  This change also eliminated 
1717           trampoline branch code that aren't used.
1718         - Added global expression state to keep track of parentheses tail
1719           code and indirect branches.
1720         Other changes made to support these changes.
1721         - Split invertOrCapture flag on Patterns to two separate flags.  Added
1722           getters for these flags.  Rippled these changes to both the JIT 
1723           and interpreter code.
1724         - Split BacktrackDestination out off TermGenerationState struct.
1725           This is done to hold references to a backtrack for later code
1726           generation.
1727         https://bugs.webkit.org/show_bug.cgi?id=50295
1728
1729         * assembler/ARMAssembler.h:
1730         (JSC::ARMAssembler::JmpDst::isSet):
1731         * assembler/ARMv7Assembler.h:
1732         (JSC::ARMv7Assembler::JmpDst::isSet):
1733         * assembler/AbstractMacroAssembler.h:
1734         (JSC::AbstractMacroAssembler::Label::isSet):
1735         (JSC::AbstractMacroAssembler::DataLabelPtr::isUsed):
1736         (JSC::AbstractMacroAssembler::DataLabelPtr::used):
1737         (JSC::AbstractMacroAssembler::JumpList::clear):
1738         * assembler/MIPSAssembler.h:
1739         (JSC::MIPSAssembler::JmpDst::isSet):
1740         * assembler/X86Assembler.h:
1741         (JSC::X86Assembler::JmpDst::isSet):
1742         * yarr/RegexCompiler.cpp:
1743         (JSC::Yarr::RegexPatternConstructor::atomParenthesesSubpatternBegin):
1744         (JSC::Yarr::RegexPatternConstructor::atomParentheticalAssertionBegin):
1745         (JSC::Yarr::RegexPatternConstructor::atomBackReference):
1746         (JSC::Yarr::RegexPatternConstructor::setupAlternativeBeginTerms):
1747         * yarr/RegexInterpreter.cpp:
1748         (JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin):
1749         (JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin):
1750         (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
1751         (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin):
1752         (JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
1753         (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
1754         (JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
1755         (JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
1756         (JSC::Yarr::ByteCompiler::emitDisjunction):
1757         * yarr/RegexInterpreter.h:
1758         (JSC::Yarr::ByteTerm::ByteTerm):
1759         (JSC::Yarr::ByteTerm::BackReference):
1760         (JSC::Yarr::ByteTerm::invert):
1761         (JSC::Yarr::ByteTerm::capture):
1762         * yarr/RegexJIT.cpp:
1763         (JSC::Yarr::RegexGenerator::IndirectJumpEntry::IndirectJumpEntry):
1764         (JSC::Yarr::RegexGenerator::IndirectJumpEntry::addJump):
1765         (JSC::Yarr::RegexGenerator::GenerationState::GenerationState):
1766         (JSC::Yarr::RegexGenerator::GenerationState::addIndirectJumpEntry):
1767         (JSC::Yarr::RegexGenerator::GenerationState::emitIndirectJumpTable):
1768         (JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail):
1769         (JSC::Yarr::RegexGenerator::GenerationState::emitParenthesesTail):
1770         (JSC::Yarr::RegexGenerator::GenerationState::addJumpToNextInteration):
1771         (JSC::Yarr::RegexGenerator::GenerationState::addJumpsToNextInteration):
1772         (JSC::Yarr::RegexGenerator::GenerationState::addDataLabelToNextIteration):
1773         (JSC::Yarr::RegexGenerator::GenerationState::linkToNextIteration):
1774         (JSC::Yarr::RegexGenerator::BacktrackDestination::BacktrackDestination):
1775         (JSC::Yarr::RegexGenerator::BacktrackDestination::clear):
1776         (JSC::Yarr::RegexGenerator::BacktrackDestination::clearDataLabel):
1777         (JSC::Yarr::RegexGenerator::BacktrackDestination::haveDestination):
1778         (JSC::Yarr::RegexGenerator::BacktrackDestination::isStackOffset):
1779         (JSC::Yarr::RegexGenerator::BacktrackDestination::isLabel):
1780         (JSC::Yarr::RegexGenerator::BacktrackDestination::isJumpList):
1781         (JSC::Yarr::RegexGenerator::BacktrackDestination::haveDataLabel):
1782         (JSC::Yarr::RegexGenerator::BacktrackDestination::copyTarget):
1783         (JSC::Yarr::RegexGenerator::BacktrackDestination::copyTo):
1784         (JSC::Yarr::RegexGenerator::BacktrackDestination::addBacktrackJump):
1785         (JSC::Yarr::RegexGenerator::BacktrackDestination::setStackOffset):
1786         (JSC::Yarr::RegexGenerator::BacktrackDestination::setLabel):
1787         (JSC::Yarr::RegexGenerator::BacktrackDestination::setNextBacktrackLabel):
1788         (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackToLabel):
1789         (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackJumpList):
1790         (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackSourceLabel):
1791         (JSC::Yarr::RegexGenerator::BacktrackDestination::setDataLabel):
1792         (JSC::Yarr::RegexGenerator::BacktrackDestination::setSubDataLabelPtr):
1793         (JSC::Yarr::RegexGenerator::BacktrackDestination::linkToNextBacktrack):
1794         (JSC::Yarr::RegexGenerator::BacktrackDestination::getStackOffset):
1795         (JSC::Yarr::RegexGenerator::BacktrackDestination::getLabel):
1796         (JSC::Yarr::RegexGenerator::BacktrackDestination::getBacktrackJumps):
1797         (JSC::Yarr::RegexGenerator::BacktrackDestination::getDataLabel):
1798         (JSC::Yarr::RegexGenerator::BacktrackDestination::jumpToBacktrack):
1799         (JSC::Yarr::RegexGenerator::BacktrackDestination::linkDataLabelToHereIfExists):
1800         (JSC::Yarr::RegexGenerator::BacktrackDestination::plantJumpToBacktrackIfExists):
1801         (JSC::Yarr::RegexGenerator::BacktrackDestination::linkAlternativeBacktracks):
1802         (JSC::Yarr::RegexGenerator::BacktrackDestination::linkAlternativeBacktracksTo):
1803         (JSC::Yarr::RegexGenerator::TermGenerationState::TermGenerationState):
1804         (JSC::Yarr::RegexGenerator::TermGenerationState::resetAlternative):
1805         (JSC::Yarr::RegexGenerator::TermGenerationState::isLastAlternative):
1806         (JSC::Yarr::RegexGenerator::TermGenerationState::clearBacktrack):
1807         (JSC::Yarr::RegexGenerator::TermGenerationState::jumpToBacktrack):
1808         (JSC::Yarr::RegexGenerator::TermGenerationState::plantJumpToBacktrackIfExists):
1809         (JSC::Yarr::RegexGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
1810         (JSC::Yarr::RegexGenerator::TermGenerationState::addBacktrackJump):
1811         (JSC::Yarr::RegexGenerator::TermGenerationState::setDataLabelPtr):
1812         (JSC::Yarr::RegexGenerator::TermGenerationState::setBackTrackStackOffset):
1813         (JSC::Yarr::RegexGenerator::TermGenerationState::setBacktrackLabel):
1814         (JSC::Yarr::RegexGenerator::TermGenerationState::linkAlternativeBacktracks):
1815         (JSC::Yarr::RegexGenerator::TermGenerationState::linkAlternativeBacktracksTo):
1816         (JSC::Yarr::RegexGenerator::TermGenerationState::setBacktrackLink):
1817         (JSC::Yarr::RegexGenerator::TermGenerationState::chainBacktracks):
1818         (JSC::Yarr::RegexGenerator::TermGenerationState::chainBacktrackJumps):
1819         (JSC::Yarr::RegexGenerator::TermGenerationState::getBacktrackDestination):
1820         (JSC::Yarr::RegexGenerator::TermGenerationState::propagateBacktrackingFrom):
1821         (JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail):
1822         (JSC::Yarr::RegexGenerator::ParenthesesTail::processBacktracks):
1823         (JSC::Yarr::RegexGenerator::ParenthesesTail::setNextIteration):
1824         (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
1825         (JSC::Yarr::RegexGenerator::generateAssertionBOL):
1826         (JSC::Yarr::RegexGenerator::generateAssertionEOL):
1827         (JSC::Yarr::RegexGenerator::generateAssertionWordBoundary):
1828         (JSC::Yarr::RegexGenerator::generatePatternCharacterSingle):
1829         (JSC::Yarr::RegexGenerator::generatePatternCharacterPair):
1830         (JSC::Yarr::RegexGenerator::generatePatternCharacterFixed):
1831         (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy):
1832         (JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy):
1833         (JSC::Yarr::RegexGenerator::generateCharacterClassSingle):
1834         (JSC::Yarr::RegexGenerator::generateCharacterClassFixed):
1835         (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):
1836         (JSC::Yarr::RegexGenerator::generateCharacterClassNonGreedy):
1837         (JSC::Yarr::RegexGenerator::generateParenthesesDisjunction):
1838         (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
1839         (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
1840         (JSC::Yarr::RegexGenerator::generateParentheticalAssertion):
1841         (JSC::Yarr::RegexGenerator::generateDisjunction):
1842         (JSC::Yarr::RegexGenerator::compile):
1843         * yarr/RegexPattern.h:
1844         (JSC::Yarr::PatternTerm::PatternTerm):
1845         (JSC::Yarr::PatternTerm::invert):
1846         (JSC::Yarr::PatternTerm::capture):
1847
1848 2010-12-03  Chris Rogers  <crogers@google.com>
1849
1850         Reviewed by Kenneth Russell.
1851
1852         First steps to adding web audio files to build systems
1853         https://bugs.webkit.org/show_bug.cgi?id=49952
1854
1855         * wtf/Complex.h:
1856
1857 2010-12-03  Patrick Gansterer  <paroga@webkit.org>
1858
1859         Reviewed by Andreas Kling.
1860
1861         Move StringWx.cpp into wtf directory
1862         https://bugs.webkit.org/show_bug.cgi?id=50060
1863
1864         * wtf/wx/StringWx.cpp: Renamed from WebCore/platform/text/wx/StringWx.cpp.
1865         (WTF::String::String):
1866
1867 2010-12-03  Patrick Gansterer  <paroga@webkit.org>
1868
1869         Reviewed by Andreas Kling.
1870
1871         Move StringBrew.cpp into wtf directory
1872         https://bugs.webkit.org/show_bug.cgi?id=50058
1873
1874         * wtf/brew/StringBrew.cpp: Renamed from WebCore/platform/text/brew/StringBrew.cpp.
1875         (WTF::String::String):
1876
1877 2010-12-03  Patrick Gansterer  <paroga@webkit.org>
1878
1879         Reviewed by Andreas Kling.
1880
1881         Move StringHaiku.cpp into wtf directory
1882         https://bugs.webkit.org/show_bug.cgi?id=50057
1883
1884         * wtf/haiku/StringHaiku.cpp: Renamed from WebCore/platform/text/haiku/StringHaiku.cpp.
1885         (WTF::String::String):
1886         (WTF::String::operator BString):
1887
1888 2010-12-02  Geoffrey Garen  <ggaren@apple.com>
1889
1890         Try to fix Windows build.
1891
1892         * runtime/GCActivityCallback.cpp:
1893         (JSC::DefaultGCActivityCallback::synchronize): Added a non-CF implementation.
1894
1895 2010-12-02  Geoffrey Garen  <ggaren@apple.com>
1896
1897         Reviewed by Gavin Barraclough.
1898
1899         Fixed <rdar://problem/8310571> CrashTracer: 60 crashes in Photo Booth at
1900         com.apple.JavaScriptCore: JSC::Heap::markRoots + 746
1901         
1902         * API/APIShims.h:
1903         (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): Call our new
1904         synchronize() function.
1905
1906         * runtime/Collector.cpp:
1907         (JSC::Heap::activityCallback):
1908         * runtime/Collector.h: Added an activityCallback() accessor, for the
1909         call above.
1910
1911         * runtime/GCActivityCallback.h:
1912         (JSC::GCActivityCallback::synchronize):
1913         * runtime/GCActivityCallbackCF.cpp:
1914         (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
1915         (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback):
1916         (JSC::DefaultGCActivityCallback::operator()):
1917         (JSC::DefaultGCActivityCallback::synchronize): Track the run loop we're
1918         scheduled in. If we begin/resume execution within a new run loop, reschedule
1919         on it. This prevents a crash when using a lockless context group on
1920         multiple threads -- the crash would happen if the GC timer scheduled on
1921         thread A, then you continued execution on thread B, then the thread A
1922         timer fired.
1923
1924 2010-12-02  Darin Adler  <darin@apple.com>
1925
1926         * wtf/ASCIICType.h: Fix wrong type from last check-in.
1927
1928 2010-12-02  Darin Adler  <darin@apple.com>
1929
1930         Try to fix certain builds (Qt Windows).
1931
1932         * wtf/ASCIICType.h: Added an overload for unsigned because in obsolete
1933         versions of ICU, UChar32 can be a typedef for unsigned. Adding this
1934         overload should make us compatible with these old ICUs.
1935
1936 2010-12-02  Patrick Gansterer  <paroga@webkit.org>
1937
1938         Reviewed by Darin Adler.
1939
1940         Add AtomicString::fromUTF8
1941         https://bugs.webkit.org/show_bug.cgi?id=45594
1942
1943         Unicode::calculateStringHashFromUTF8 creates a StringHash out of UTF8 input data and
1944         calculates the required length for the UTF16 conversation in one step.
1945         This is then used in a specialized translator for the string table of AtomicString.
1946
1947         * JavaScriptCore.exp:
1948         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1949         * wtf/text/AtomicString.cpp:
1950         (WTF::CStringTranslator::equal):
1951         (WTF::HashAndUTF8CharactersTranslator::hash):
1952         (WTF::HashAndUTF8CharactersTranslator::equal):
1953         (WTF::HashAndUTF8CharactersTranslator::translate):
1954         (WTF::AtomicString::add):
1955         (WTF::AtomicString::addSlowCase):
1956         (WTF::AtomicString::find):
1957         (WTF::AtomicString::fromUTF8):
1958         * wtf/text/AtomicString.h:
1959         * wtf/text/StringImpl.h:
1960         * wtf/text/WTFString.h:
1961         * wtf/unicode/UTF8.cpp:
1962         (WTF::Unicode::readUTF8Sequence):
1963         (WTF::Unicode::convertUTF8ToUTF16):
1964         (WTF::Unicode::calculateStringHashFromUTF8):
1965         (WTF::Unicode::equalUTF16WithUTF8):
1966         * wtf/unicode/UTF8.h:
1967
1968 2010-12-02  Geoffrey Garen  <ggaren@apple.com>
1969
1970         Reviewed by Sam Weinig.
1971
1972         Added a little hardening to OSAllocator.
1973
1974         * wtf/OSAllocatorPosix.cpp:
1975         (WTF::OSAllocator::release):
1976         * wtf/OSAllocatorWin.cpp:
1977         (WTF::OSAllocator::reserve):
1978         (WTF::OSAllocator::reserveAndCommit):
1979         (WTF::OSAllocator::commit):
1980         (WTF::OSAllocator::decommit):
1981         (WTF::OSAllocator::release): CRASH() if the OS's virtual memory system
1982         reports an error.
1983
1984 2010-12-02  Csaba Osztrogonác  <ossy@webkit.org>
1985
1986         Reviewed by Geoffrey Garen.
1987
1988         [Qt] Make platform managing of OSAllocator better than r73106
1989         https://bugs.webkit.org/show_bug.cgi?id=50385
1990
1991         * wtf/OSAllocatorPosix.cpp: Remove platform specific guard.
1992         * wtf/OSAllocatorSymbian.cpp: Remove platform specific guard.
1993         * wtf/OSAllocatorWin.cpp: Remove platform specific guard.
1994         * wtf/wtf.pri: Add the correct platform specific source file instead of all of them.
1995
1996 2010-12-02  Patrick Gansterer  <paroga@webkit.org>
1997
1998         Reviewed by Andreas Kling.
1999
2000         [WINCE] Use GetTickCount() for srand()
2001         https://bugs.webkit.org/show_bug.cgi?id=50338
2002
2003         time() is not a native function on WinCE, so use GetTickCount() instead.
2004
2005         * wtf/RandomNumberSeed.h:
2006         (WTF::initializeRandomNumberGenerator):
2007
2008 2010-12-02  Norbert Leser  <norbert.leser@nokia.com>
2009
2010         Reviewed by Laszlo Gombos.
2011
2012         [Qt] [Symbian] Reintroduce compiler optimizations for JSC
2013         https://bugs.webkit.org/show_bug.cgi?id=50270
2014
2015         Add compiler optimization (symbian ARM target) which was lost after split from WebCore.
2016         Tested via Sunspider and V8 - both of which show significant performance improvement.
2017
2018         * JavaScriptCore.pro:
2019
2020 2010-12-02  Peter Varga  <pvarga@inf.u-szeged.hu>
2021
2022         Reviewed by Gavin Barraclough.
2023
2024         Move regex parsing and fallback handling to runtime/RegExp.cpp
2025         https://bugs.webkit.org/show_bug.cgi?id=50015
2026
2027         * runtime/RegExp.cpp:
2028         (JSC::RegExp::RegExp):
2029         (JSC::RegExp::create):
2030         (JSC::RegExp::compile):
2031         (JSC::RegExp::match):
2032         (JSC::RegExp::printTraceData):
2033         * runtime/RegExp.h:
2034         (JSC::RegExp::pattern):
2035         * yarr/RegexInterpreter.cpp:
2036         * yarr/RegexInterpreter.h:
2037         * yarr/RegexJIT.cpp:
2038         (JSC::Yarr::RegexGenerator::compile):
2039         (JSC::Yarr::jitCompileRegex):
2040         * yarr/RegexJIT.h:
2041         (JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
2042         (JSC::Yarr::RegexCodeBlock::setFallBack):
2043         (JSC::Yarr::RegexCodeBlock::isFallBack):
2044         (JSC::Yarr::executeRegex):
2045
2046 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
2047
2048         Try to fix the GTK build.
2049
2050         * GNUmakefile.am: Use a full path to OSAllocator*.cpp.
2051
2052 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
2053
2054         Try to fix the EFL Linux build.
2055
2056         * CMakeListsEfl.txt: Added OSAllocator to the project.
2057
2058 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
2059
2060         Try to fix the Qt build: Include all OS files for Qt's sake, and then
2061         use #ifdefs in the files to exclude things based on OS.
2062         
2063         This is a pretty bad way to manage platforms -- hopefully we can
2064         fix the Qt build system and move away from this in the future.
2065
2066         * wtf/OSAllocatorPosix.cpp:
2067         * wtf/OSAllocatorSymbian.cpp:
2068         * wtf/OSAllocatorWin.cpp:
2069         * wtf/wtf.pri:
2070
2071 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
2072
2073         Try to fix the Chromium build.
2074         
2075         * JavaScriptCore.gypi: This is a Windows build file, so use OSAllocatorWin.cpp.
2076
2077 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
2078
2079         Try to fix the GTK build.
2080
2081         * GNUmakefile.am: Added OSAllocator to another project.
2082
2083 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
2084
2085         Try to fix the GTK Linux build.
2086
2087         * JavaScriptCore.gypi: Added OSAllocator to the project.
2088
2089 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
2090
2091         Try to fix the Qt Linux build.
2092
2093         * wtf/OSAllocatorPosix.cpp: Use the right errno.h.
2094
2095 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
2096
2097         Try to fix Windows build: export some more symbols.
2098
2099         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2100
2101 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
2102
2103         Try to fix the Qt Linux build.
2104
2105         * wtf/wtf.pri: Use the POSIX OSAllocator for Qt Linux.
2106
2107 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
2108
2109         Windows build fix: commit doesn't have a return value.
2110
2111         * wtf/OSAllocatorWin.cpp:
2112         (WTF::OSAllocator::commit):
2113
2114 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
2115
2116         Build fix: Export some symbols.
2117
2118         * JavaScriptCore.exp:
2119
2120 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
2121
2122         Build fix.
2123
2124         * JavaScriptCore.xcodeproj/project.pbxproj: Export OSAllocator.h as private
2125         so other projects can see it.
2126
2127         * wtf/OSAllocatorPosix.cpp: #include UnusedParam.h for UNUSED_PARAM.
2128
2129 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
2130
2131         Reviewed by Sam Weinig.
2132
2133         Baby step toward a cross-platform virtual memory abstraction: created
2134         an all-static OSAllocator class and changed MarkStack to use it.
2135
2136         * JavaScriptCore.exp: These functions are inlined now.
2137
2138         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added OSAllocatorWin.cpp.
2139
2140         * JavaScriptCore.xcodeproj/project.pbxproj: Added OSAllocatorPosix.cpp.
2141
2142         * runtime/MarkStack.h:
2143         (JSC::MarkStack::allocateStack):
2144         (JSC::MarkStack::releaseStack): Use OSAllocator instead of rolling our
2145         own platform-specific code.
2146
2147         * runtime/MarkStackNone.cpp: Removed. Nothing used this.
2148
2149         * runtime/MarkStackPosix.cpp: 
2150         * runtime/MarkStackSymbian.cpp:
2151         * runtime/MarkStackWin.cpp: Removed custom platform-specific code, since
2152         we use the OSAllocator abstraction now.
2153
2154         * wtf/OSAllocator.h: Added.
2155         * wtf/OSAllocatorPosix.cpp: Added.
2156         (WTF::OSAllocator::reserve):
2157         (WTF::OSAllocator::reserveAndCommit):
2158         (WTF::OSAllocator::commit):
2159         (WTF::OSAllocator::decommit):
2160         (WTF::OSAllocator::release):
2161         * wtf/OSAllocatorSymbian.cpp: Added.
2162         (WTF::OSAllocator::reserve):
2163         (WTF::OSAllocator::reserveAndCommit):
2164         (WTF::OSAllocator::commit):
2165         (WTF::OSAllocator::decommit):
2166         (WTF::OSAllocator::release):
2167         * wtf/OSAllocatorWin.cpp: Added.
2168         (WTF::OSAllocator::reserve):
2169         (WTF::OSAllocator::reserveAndCommit):
2170         (WTF::OSAllocator::commit):
2171         (WTF::OSAllocator::decommit):
2172         (WTF::OSAllocator::release): The new OSAllocator abstraction.
2173
2174         * wtf/wtf.pri: Added OSAllocatorSymbian.cpp.
2175
2176 2010-12-01  Steve Falkenburg  <sfalken@apple.com>
2177
2178         Reviewed by Adam Roben.
2179
2180         WinCairo build should not use link-time code generation (LTCG)
2181         https://bugs.webkit.org/show_bug.cgi?id=50353
2182
2183         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2184         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2185         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
2186         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
2187
2188 010-12-01  Steve Falkenburg  <sfalken@apple.com>
2189
2190         Reviewed by Adam Roben.
2191
2192         vcproj changes can't be applied cleanly by the Windows EWS bot
2193         https://bugs.webkit.org/show_bug.cgi?id=50328
2194
2195         * JavaScriptCore.vcproj/JavaScriptCore.sln: Modified property svn:eol-style.
2196         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Modified property svn:eol-style.
2197         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCF.vsprops: Added property svn:eol-style.
2198         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops: Added property svn:eol-style.
2199         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Added property svn:eol-style.
2200         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Modified property svn:eol-style.
2201         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: Added property svn:eol-style.
2202         * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Modified property svn:eol-style.
2203         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Modified property svn:eol-style.
2204         * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: Added property svn:eol-style.
2205         * JavaScriptCore.vcproj/jsc/jsc.vcproj: Modified property svn:eol-style.
2206         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Added property svn:eol-style.
2207         * JavaScriptCore.vcproj/testapi/testapi.vcproj: Modified property svn:eol-style.
2208         * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Added property svn:eol-style.
2209
2210 2010-12-01  Gavin Barraclough  <barraclough@apple.com>
2211
2212         Reviewed by Sam Weinig.
2213
2214         Bug 50298 - /()()()()()()()()()(?:(\10a|b)(X|Y))+/.exec("bXXaYYaY") ASSERTs
2215
2216         For unmatched subpattens we previously used to set the subpattern end to -1,
2217         but now we only set the start value. E.g. consider the following:
2218             /a(b)?c/.exec("ac");
2219         Previously we would generate an internal results array of:
2220             [ 0, 2, -1, -1 ]
2221         Since fairly recently we have generated results of:
2222             [ 0, 2, -1, ??? ]
2223         (With the end index of the subpattern uninitialized).
2224
2225         Update these ASSERTs to account for this.
2226
2227         Also, when stripping out self-referencing backreferences, (e.g. /(\1)/) we
2228         were checking the wrong property on the pattern term. We should have been
2229         looking at term.parentheses.subpatternId, but instead were checking
2230         term.subpatternId. The latter is actually only the subpatternId for
2231         back reference terms. Rename this to backReferenceSubpatternId.
2232
2233         * yarr/RegexInterpreter.cpp:
2234         (JSC::Yarr::Interpreter::matchBackReference):
2235         (JSC::Yarr::Interpreter::backtrackBackReference):
2236
2237 2010-11-30  Gavin Barraclough  <barraclough@apple.com>
2238
2239         Rubber stamped by Sam Weinig.
2240
2241         Bug 50297 - \s in YARR should match BOMs.
2242
2243         From section 15.10.2.12 CharacterClassEscape contains:
2244
2245         The production CharacterClassEscape :: s evaluates by returning the set of characters containing the
2246         characters that are on the right-hand side of the WhiteSpace (7.2) or LineTerminator (7.3) productions.
2247
2248         Table 2 in section 7.2 contains:
2249
2250         \uFEFF Byte Order Mark <BOM>
2251
2252         * create_regex_tables:
2253             Add BOM to spaces table.
2254
2255 2010-11-30  Gavin Barraclough  <barraclough@apple.com>
2256
2257         Reviewed by Darin Adler.
2258
2259         Fixed review comments following bug #48101.
2260         Mostly typos, plus gave quantifyInfinite a symbolic name.
2261
2262         * yarr/RegexCompiler.cpp:
2263         (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
2264         (JSC::Yarr::RegexPatternConstructor::checkForTerminalParentheses):
2265         * yarr/RegexInterpreter.cpp:
2266         (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
2267         (JSC::Yarr::Interpreter::matchParenthesesTerminalBegin):
2268         (JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin):
2269         (JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd):
2270         * yarr/RegexJIT.cpp:
2271         (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy):
2272         (JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy):
2273         (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):
2274         * yarr/RegexParser.h:
2275         (JSC::Yarr::Parser::parseTokens):
2276         (JSC::Yarr::parse):
2277
2278 2010-11-30  Steve Falkenburg  <sfalken@apple.com>
2279
2280         Reviewed by Darin Adler.
2281
2282         WTF project missing build-stopping code from its pre-build event
2283         https://bugs.webkit.org/show_bug.cgi?id=50281
2284
2285         * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd:
2286
2287 2010-11-30  Patrick Gansterer  <paroga@webkit.org>
2288
2289         Reviewed by Darin Adler.
2290
2291         Cleanup UTF8.cpp
2292         https://bugs.webkit.org/show_bug.cgi?id=49581
2293
2294         Use macros and functions instead of range values directly.
2295
2296         * wtf/unicode/UTF8.cpp:
2297         (WTF::Unicode::inlineUTF8SequenceLength):
2298         (WTF::Unicode::UTF8SequenceLength):
2299         (WTF::Unicode::convertUTF16ToUTF8):
2300         (WTF::Unicode::readUTF8Sequence):
2301         (WTF::Unicode::convertUTF8ToUTF16):
2302         * wtf/unicode/UnicodeMacrosFromICU.h: Added U_IS_SUPPLEMENTARY macro.
2303
2304 2010-11-30  Geoffrey Garen  <ggaren@apple.com>
2305
2306         Reviewed by Gavin Barraclough.
2307
2308         Fixed a crash seen when using a PageAllocation to store itself.
2309
2310         * wtf/PageAllocation.h:
2311         (WTF::PageAllocation::systemDeallocate): Zero out m_base before unmapping
2312         it, in case unmapping m_base unmaps the PageAllocation.
2313
2314         * wtf/BumpPointerAllocator.h:
2315         (WTF::BumpPointerPool::destroy): Now this work-around isn't needed!
2316
2317 2010-11-30  Xan Lopez  <xlopez@igalia.com>
2318
2319         Reviewed by Darin Adler.
2320
2321         m_hasNonEnumerableProperties is never initialized in Structure
2322         https://bugs.webkit.org/show_bug.cgi?id=50266
2323
2324         * runtime/Structure.cpp:
2325         (JSC::Structure::Structure): initialize member variable.
2326
2327 2010-11-29  Steve Falkenburg  <sfalken@apple.com>
2328
2329         Windows build fix (part 1). Use correct environment variable syntax in cmd files.
2330
2331         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd:
2332         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd:
2333         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd:
2334         * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd:
2335         * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd:
2336         * JavaScriptCore.vcproj/jsc/jscPreBuild.cmd:
2337         * JavaScriptCore.vcproj/jsc/jscPreLink.cmd:
2338         * JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd:
2339         * JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd:
2340         * JavaScriptCore.vcproj/testapi/testapiPreLink.cmd:
2341
2342 2010-11-29  Dan Bernstein  <mitz@apple.com>
2343
2344         Reviewed by Darin Adler.
2345
2346         WTF support for <rdar://problem/8650085> adding word-prefix search options to the text search API.
2347         https://bugs.webkit.org/show_bug.cgi?id=50038
2348
2349         * wtf/unicode/UnicodeMacrosFromICU.h: Copied additional macros from icu/unicode/utf16.h.
2350
2351 2010-11-29  Steve Falkenburg  <sfalken@apple.com>
2352
2353         Reviewed by Darin Adler.
2354
2355         JavaScriptCore projects on Windows should use cmd files for build events
2356         https://bugs.webkit.org/show_bug.cgi?id=50193
2357
2358         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
2359         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd: Added.
2360         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd: Added.
2361         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd: Added.
2362         * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd: Added property svn:eol-style.
2363         * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd: Added property svn:eol-style.
2364         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
2365         * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd: Added.
2366         * JavaScriptCore.vcproj/jsc/jscPreBuild.cmd: Added.
2367         * JavaScriptCore.vcproj/jsc/jscPreLink.cmd: Added.
2368         * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
2369         * JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd: Added.
2370         * JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd: Added.
2371         * JavaScriptCore.vcproj/testapi/testapiPreLink.cmd: Added.
2372
2373 2010-11-29  Dai Mikurube  <dmikurube@google.com>
2374
2375         Reviewed by Kent Tamura.
2376
2377         when empty, clicking "down" on outer-spin-button returns "max value"
2378         https://bugs.webkit.org/show_bug.cgi?id=45491
2379
2380         It is required to calculate UTC/DST offsets to retrieve the current local milliseconds for
2381         date/time type inputs. WTF::currentTimeMS() returns a UTC time, and WTF::getLocalTime()
2382         returns a struct tm, not milliseconds.
2383
2384         Calculating milliseconds from a struct tm is not simple since timegm() cannot be used in all
2385         environments. This calculation is already done in calculateUTCOffset(), and complicated.
2386         Duplicating this complicated calculation is unreasonable because of maintainability.
2387         To achieve this without duplication, we must call calculate{UTC|DST}Offset in some way.
2388
2389         * JavaScriptCore.exp:
2390         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2391         * wtf/DateMath.cpp: Changed calculateUTCOffset() and calculateDSTOffset() to external functions.
2392         (WTF::calculateUTCOffset):
2393         (WTF::calculateDSTOffset):
2394         * wtf/DateMath.h:
2395
2396 2010-11-29  Chris Rogers  <crogers@google.com>
2397
2398         Reviewed by Kenneth Russell.
2399
2400         Switch web audio code to use FloatPoint3D instead of Vector3
2401         https://bugs.webkit.org/show_bug.cgi?id=50186
2402
2403         * wtf/Vector3.h: Removed.
2404
2405 2010-11-29  Steve Falkenburg  <sfalken@apple.com>
2406
2407         Reviewed by Adam Roben.
2408
2409         Add a mechanism for Windows pre-build/pre-link/post-build events to be separated into individual cmd files
2410         https://bugs.webkit.org/show_bug.cgi?id=49858
2411
2412         We're migrating our prebuild/prelink/postbuild steps out of vcproj and vsprops files:
2413         - To simplify editing (editing vsprops build steps is confusing).
2414         - For more readable diffs.
2415
2416         * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
2417         * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd: Added.
2418         * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd: Added.
2419
2420 2010-11-29  Geoffrey Garen  <ggaren@apple.com>
2421
2422         Reviewed by Gavin Barraclough.
2423
2424         Improved accuracy of command-line SunSpider.
2425
2426         * jsc.cpp:
2427         (functionRun): Changed the "run" function to run a given test in
2428         its own global object. Previously, all tests ran in the same global
2429         object, which created name conflicts, and made globals from previous
2430         tests artificially survive into later tests.
2431         
2432         Also changed "run" to return the elapsed milliseconds when running a
2433         given test, for slightly more accurate numbers.
2434
2435         (functionCheckSyntax): Ditto on returning elapsed milliseconds.
2436
2437 2010-11-29  Darin Adler  <darin@apple.com>
2438
2439         Reviewed by Andreas Kling.
2440
2441         Remove a couple unneeded overflow checks
2442         https://bugs.webkit.org/show_bug.cgi?id=49816
2443
2444         * wtf/text/CString.cpp:
2445         (WTF::CString::init): Use an ASSERT instead of
2446         an overflow check with CRASH.
2447
2448 2010-11-29  Adam Roben  <aroben@apple.com>
2449
2450         Robustify react-to-vsprops-changes.py against changes to its location
2451         or the location of the .vsprops files
2452
2453         Suggested by John Sullivan.
2454
2455         * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
2456         Removed file_modification_times.
2457         (main): Use glob.glob to find the .vsprops files and assert that we found some.
2458
2459 2010-11-29  Adam Roben  <aroben@apple.com>
2460
2461         Touch wtf/Platform.h whenever any .vsprops file changes
2462
2463         This will cause all files to be recompiled, which will make changes to
2464         preprocessor macros (e.g., ENABLE_*) actually take effect.
2465
2466         Fixes <http://webkit.org/b/50167> Windows build fails when ENABLE_*
2467         macros are changed (because not enough files are rebuilt)
2468
2469         Reviewed by John Sullivan.
2470
2471         * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
2472         (main): Touch wtf/Platform.h if it's older than any .vsprops file. Also
2473         added some comments and logging to make it clearer what the script is
2474         doing and why.
2475
2476 2010-11-29  Adam Roben  <aroben@apple.com>
2477
2478         Update react-to-vsprops-changes.py after r72555
2479
2480         .vsprops files are no longer accessed relative to $WebKitLibrariesDir.
2481
2482         Fixes <http://webkit.org/b/50166> REGRESSION (r72555):
2483         react-to-vsprops-changes.py no longer works for people with a
2484         non-default $WebKitLibrariesDir
2485
2486         Reviewed by John Sullivan.
2487
2488         * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
2489         (main): Always look in WebKitLibraries/win for .vsprops files, not in
2490         $WebKitLibrariesDir.
2491
2492 2010-11-28  Gavin Barraclough  <barraclough@apple.com>
2493
2494         Reviewed by Sam Weinig.
2495
2496         Bug 48100 - YARR allows what seems like a bogus character-class range
2497
2498         Per ECMA-262 character classes containing character ranges containing
2499         character classes are invalid, eg:
2500             /[\d-x]/
2501             /[x-\d]/
2502             /[\d-\d]/
2503         These should throw a syntax error.
2504
2505         * yarr/RegexParser.h:
2506
2507 2010-11-27  Gavin Barraclough  <barraclough@apple.com>
2508
2509         Reviewed by Sam Weinig.
2510
2511         Bug 48101 - Yarr gives different results for /(?:a*?){2,}/
2512
2513         The test cases in the linked mozilla bug demonstrate a couple of
2514         problems in subpattern matching. These bugs lie in the optimized
2515         cases - for matching parentheses with a quantity count of 1, and
2516         for matching greedy quantified parentheses at the end of a regex
2517         (which do not backtrack).
2518
2519         In both of these cases we are failing to correctly handle empty
2520         matches. In the case of parentheses-single matches (quantity count
2521         one) we are failing to test for empty matches at all. In the case
2522         of terminal subpattern matches we do currently check, however there
2523         is a subtler bug here too. In the case of an empty match we will
2524         presently immediately fall through to the next alternative (or
2525         complete the regex match), whereas upon a failed match we should
2526         be backtracking into the failing alternative, to give it a chance
2527         to match further (e.g. consider /a??b?|a/.exec("ab") - upon first
2528         attempting to match the first alternative this will match the empty
2529         string - since a?? is non-greedy, however rather than moving on to
2530         the second alternative we should be re-matching the first one, at
2531         which point the non-greedy a?? will match, and as such the result
2532         should be "ab", not "a").
2533
2534         Terminal subpattern matching contains a second bug, too. The frame
2535         location values in the subpattern should be being allocated with
2536         the outer disjunction's frame (as we do for the parentheses-single
2537         optimization). Consider the following three regexes:
2538             /a*(?:b*)*c*/
2539             /a*(?:b*)c*/
2540             /a*(?:b*)*/
2541         Considering only the frame location required by the atoms a,b, and
2542         c, (ignoring space associated with the nested subpattern) the first
2543         regex (a normal subpattern match) requires a frame size of 2 for
2544         the outer disjunction, (to backtrack terms a & c), with each
2545         iteration of the subpattern requiring a frame of size 1 (in order
2546         to backtrack b). In the case of the second regex (where the
2547         parentheses-single optimization will kick in) the outer frame must
2548         be set up with a frame size of 3, since the outer frame will also
2549         be used when running the nested subpattern. We will currently only
2550         allocate a farme of size 1 for the outer disjuntion (to contain a),
2551         howver the frame size should be 2 (since the subpattern will be
2552         evaluated in the outer frame). In addition to failing to allocate
2553         frame space the frame offsets are also presently invalid - in the
2554         case of the last regex b's frame location will be set assuming it
2555         to be the first term in the frame, whereas in this case b lies
2556         after the term a, and should be taking a separate frame location.
2557
2558         In order to correctly allocate the frame for terminal subpattern
2559         matches we must move this optimization back up from the JIT into
2560         the compiler (and thus interpreter too), since this is where the
2561         frame allocation takes place.
2562
2563         * yarr/RegexCompiler.cpp:
2564         (JSC::Yarr::RegexPatternConstructor::setupAlternativeOffsets):
2565         (JSC::Yarr::RegexPatternConstructor::checkForTerminalParentheses):
2566         (JSC::Yarr::compileRegex):
2567         * yarr/RegexInterpreter.cpp:
2568         (JSC::Yarr::Interpreter::matchParenthesesOnceBegin):
2569         (JSC::Yarr::Interpreter::matchParenthesesOnceEnd):
2570         (JSC::Yarr::Interpreter::backtrackParenthesesOnceBegin):
2571         (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
2572         (JSC::Yarr::Interpreter::matchParenthesesTerminalBegin):
2573         (JSC::Yarr::Interpreter::matchParenthesesTerminalEnd):
2574         (JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin):
2575         (JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd):
2576         (JSC::Yarr::Interpreter::matchDisjunction):
2577         (JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin):
2578         (JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin):
2579         (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
2580         (JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
2581         (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
2582         (JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
2583         (JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
2584         (JSC::Yarr::ByteCompiler::emitDisjunction):
2585         * yarr/RegexInterpreter.h:
2586         * yarr/RegexJIT.cpp:
2587         (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
2588         (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
2589         (JSC::Yarr::RegexGenerator::generateTerm):
2590         * yarr/RegexPattern.h:
2591         (JSC::Yarr::PatternTerm::PatternTerm):
2592
2593 2010-11-24  Patrick Gansterer  <paroga@webkit.org>
2594
2595         Reviewed by Csaba Osztrogonác.
2596
2597         Remove Bakefile build system files
2598         https://bugs.webkit.org/show_bug.cgi?id=49983
2599
2600         r53757 only removed the content, but not the files.
2601         This patch removes that empty files.
2602
2603         * JavaScriptCoreSources.bkl: Removed.
2604         * jscore.bkl: Removed.
2605
2606 2010-11-24  Gabor Loki  <loki@webkit.org>
2607
2608         Reviewed by Csaba Osztrogonác.
2609
2610         Merge the usage of jumps and calls at ARM-JIT
2611         https://bugs.webkit.org/show_bug.cgi?id=50008
2612
2613         Those JmpSrc objects which represent jumps (not calls) should point to
2614         after the jump instruction.
2615
2616         * assembler/ARMAssembler.h:
2617         (JSC::ARMAssembler::blx):
2618         (JSC::ARMAssembler::loadBranchTarget):
2619         (JSC::ARMAssembler::getAbsoluteJumpAddress):
2620         (JSC::ARMAssembler::linkJump):
2621         (JSC::ARMAssembler::relinkJump):
2622         (JSC::ARMAssembler::linkCall):
2623         (JSC::ARMAssembler::relinkCall):
2624         (JSC::ARMAssembler::getRelocatedAddress):
2625         (JSC::ARMAssembler::getDifferenceBetweenLabels):
2626         (JSC::ARMAssembler::getCallReturnOffset):
2627         * assembler/MacroAssemblerARM.h:
2628         (JSC::MacroAssemblerARM::call):
2629
2630 2010-11-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2631
2632         Reviewed by Xan Lopez.
2633
2634         [GTK] Optimize foldCase, toLower and toUpper methods in glib unicode backend
2635         https://bugs.webkit.org/show_bug.cgi?id=48625
2636
2637         GLib methods use UTF-8 strings, so we have to convert from UTF-16 to
2638         UTF-8 to perform the case operations and then convert back the result to
2639         UTF-16. GLib conversion methods return a new allocated string, so we
2640         have to memcpy the result into the destination buffer too. Using our
2641         own methods to convert between UTF-8 and UTF-16 from wtf/unicode/UTF8.h
2642         we don't need such memcpy, since they take an already allocated buffer
2643         rather than returning a new one. There's another optimization for the
2644         case when the destination buffer is not large enough. In that case,
2645         methods should return the expected destination buffer size and are
2646         called again with a new buffer. We can avoid the conversion to UTF-16 by
2647         pre-calculating the required size for the destination buffer.
2648
2649         * wtf/unicode/glib/UnicodeGLib.cpp:
2650         (WTF::Unicode::getUTF16LengthFromUTF8):
2651         (WTF::Unicode::convertCase):
2652         (WTF::Unicode::foldCase):
2653         (WTF::Unicode::toLower):
2654         (WTF::Unicode::toUpper):
2655
2656 2010-11-23  Patrick Gansterer  <paroga@webkit.org>
2657
2658         Reviewed by Sam Weinig.
2659
2660         Use WTF::StringHasher directly in JavaScriptCore
2661         https://bugs.webkit.org/show_bug.cgi?id=49893
2662
2663         * profiler/CallIdentifier.h:
2664         (JSC::CallIdentifier::Hash::hash):
2665         * runtime/Identifier.cpp:
2666         (JSC::IdentifierCStringTranslator::hash):
2667         (JSC::IdentifierUCharBufferTranslator::hash):
2668
2669 2010-11-22  Patrick Gansterer  <paroga@webkit.org>
2670
2671         Reviewed by Sam Weinig.
2672
2673         Add WTF::FixedArray::size()
2674         https://bugs.webkit.org/show_bug.cgi?id=49891
2675
2676         Add a method to get the size of a FixedArray.
2677
2678         * wtf/FixedArray.h:
2679         (WTF::FixedArray::size):
2680
2681 2010-11-22  Patrick Gansterer  <paroga@webkit.org>
2682
2683         Reviewed by Adam Roben.
2684
2685         [WINCE] Set correct preprocessor definitions
2686         https://bugs.webkit.org/show_bug.cgi?id=49887
2687
2688         * wtf/Platform.h:
2689
2690 2010-11-22  Adam Roben  <aroben@apple.com>
2691
2692         Use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops files
2693
2694         Apple's Windows build allows placing header files and import libraries for WebKit's
2695         dependencies (CoreGraphics, CFNetwork, SQLite, etc.) outside the source tree via the
2696         $WebKitLibrariesDir environment variable. This is both required for production builds and
2697         convenient for Apple-internal developer builds. Apple's production builds also require that
2698         WebKit's shared .vsprops files be accessed relative to $WebKitLibrariesDir. In production
2699         builds, the files are copied into that directory tree by the
2700         WebKitLibraries/win/tools/WinTools.make file. In Apple-internal developer builds, the
2701         copying is done by
2702         JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make.
2703
2704         This .vsprops copying is problematic in one very important case: when a developer updates
2705         their source tree and then tries to build. Visual Studio only reads .vsprops files when a
2706         project is first loaded. So, when Visual Studio is first opened after the .vsprops files are
2707         updated, it reads in the old files that were already residing in $WebKitLibrariesDir. When a
2708         build is started, JavaScriptCoreGenerated.make copies the new .vsprops files into
2709         $WebKitLibrariesDir, but Visual Studio will not pick up the changes.  The rest of the build
2710         will proceed with out-of-date .vsprops files, which will likely result in a build failure.
2711
2712         To fix this, we now use normal relative paths to access the .vsprops files in the source
2713         tree rather than in $WebKitLibrariesDir, but prefix those paths with a new environment
2714         variable, $WebKitVSPropsRedirectionDir. In developer builds, this environment variable is
2715         unset, so the normal relative paths are used to read the .vsprops files out of the source
2716         tree directly. In production builds, this environment variable is set to a fake directory
2717         that will cause the .vsprops files in $WebKitLibrariesDir to be found when the relative path
2718         is resolved.
2719         
2720         For example, JavaScriptCore.vcproj uses this path for FeatureDefines.vsprops:
2721
2722         $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
2723
2724         In developer builds, where $WebKitVSPropsRedirectionDir is unset, this will point to the
2725         files in WebKitLibraries\win\tools\vsprops in the source tree. In production builds,
2726         JavaScriptCore.make sets $WebKitVSPropsRedirectionDir to
2727         "$(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\", so the full path for
2728         FeatureDefines.vsprops becomes:
2729
2730         $(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
2731
2732         which resolves to:
2733
2734         $(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
2735
2736         (We rely on the fact that Windows doesn't care whether the directories "1", "2", and "3"
2737         actually exist since they are matched by an equal number of ".." path components.)
2738
2739         Note that Visual Studio still won't pick up changes made to .vsprops files while Visual
2740         Studio is open, but that problem hasn't seemed to cause developers many headaches so far.
2741
2742         Fixes <http://webkit.org/b/49181> Windows build fails mysteriously when .vsprops files are
2743         updated
2744
2745         Reviewed by Dave Hyatt.
2746
2747         * JavaScriptCore.vcproj/JavaScriptCore.make: Set $WebKitVSPropsRedirectionDir so that
2748         production builds can find the .vsprops files.
2749
2750         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Stopy copying the
2751         .vsprops files. It isn't needed anymore.
2752
2753         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2754         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2755         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
2756         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
2757         Changed to use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops
2758         files.
2759
2760 2010-11-19  Peter Varga  <pvarga@inf.u-szeged.hu>
2761
2762         Reviewed by Gavin Barraclough.
2763
2764         YARR JIT should fallback to YARR Interpreter instead of PCRE.
2765         https://bugs.webkit.org/show_bug.cgi?id=46719
2766
2767         Remove the ENABLE_YARR macro and the option of matching regular
2768         expressions with PCRE from JavaScriptCore.
2769
2770         * runtime/JSGlobalData.h:
2771         * runtime/RegExp.cpp:
2772         (JSC::RegExp::compile):
2773         (JSC::RegExp::match):
2774         * tests/mozilla/expected.html:
2775         * wtf/Platform.h:
2776         * yarr/RegexCompiler.cpp:
2777         * yarr/RegexCompiler.h:
2778         * yarr/RegexInterpreter.cpp:
2779         (JSC::Yarr::byteCompileRegex):
2780         * yarr/RegexInterpreter.h:
2781         * yarr/RegexJIT.cpp:
2782         (JSC::Yarr::jitCompileRegex):
2783         * yarr/RegexJIT.h:
2784         (JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
2785         (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock):
2786         (JSC::Yarr::RegexCodeBlock::getFallback):
2787         (JSC::Yarr::RegexCodeBlock::isFallback):
2788         (JSC::Yarr::RegexCodeBlock::setFallback):
2789         (JSC::Yarr::executeRegex):
2790         * yarr/RegexParser.h:
2791         * yarr/RegexPattern.h:
2792
2793 2010-11-20  Kwang Yul Seo  <skyul@company100.net>
2794
2795         Reviewed by David Kilzer.
2796
2797         [BREWMP] Replace DBGPRINTF and DBGPRINTF_FATAL with dbg_Message
2798         https://bugs.webkit.org/show_bug.cgi?id=49520
2799
2800         DBGPRINTF and DBGPRINTF_FATAL macros are prohibited in Mod1. Use dbg_Message instead.
2801
2802         * wtf/Assertions.cpp:
2803         * wtf/Assertions.h:
2804
2805 2010-11-20  Gabor Loki  <loki@webkit.org>
2806
2807         Reviewed by Gavin Barraclough.
2808
2809         Support JIT_OPTIMIZE_MOD on Thumb-2
2810         https://bugs.webkit.org/show_bug.cgi?id=49432
2811
2812         Rewrite the soft modulo operation into macroassembler form, and move it
2813         to JSValue32_64 section.
2814         Add support for soft modulo on Thumb-2 JIT also.
2815
2816         * assembler/ARMv7Assembler.h:
2817         (JSC::ARMv7Assembler::clz):
2818         * assembler/MacroAssemblerARM.h:
2819         (JSC::MacroAssemblerARM::countLeadingZeros32):
2820         (JSC::MacroAssemblerARM::relativeTableJump):
2821         * assembler/MacroAssemblerARMv7.h:
2822         (JSC::MacroAssemblerARMv7::countLeadingZeros32):
2823         (JSC::MacroAssemblerARMv7::relativeTableJump):
2824         * jit/JITArithmetic.cpp:
2825         (JSC::JIT::emit_op_mod):
2826         * jit/JITOpcodes.cpp:
2827         (JSC::JIT::privateCompileCTIMachineTrampolines):
2828         * jit/JITOpcodes32_64.cpp:
2829         (JSC::JIT::softModulo):
2830         * jit/JITStubs.cpp:
2831         (JSC::JITThunks::JITThunks):
2832         * wtf/Platform.h:
2833
2834 2010-11-20  David Kilzer  <ddkilzer@apple.com>
2835
2836         <http://webkit.org/b/49848> Make it possible to display the last character of a secure text field unobscured
2837
2838         Reviewed by Darin Adler.
2839
2840         * JavaScriptCore.exp:
2841         * wtf/text/StringImpl.cpp:
2842         (WTF::StringImpl::secure): Added argument that controls whether
2843         the last character is obscured or not.  Implemented behavior.
2844         * wtf/text/StringImpl.h:
2845         (WTF::StringImpl::LastCharacterBehavior): Added enum.
2846         (WTF::StringImpl::secure): Updated method signature.
2847
2848 2010-11-19  William Chan  <willchan@chromium.org>
2849
2850         Reviewed by David Levin.
2851
2852         Add USE(CHROMIUM_NET)
2853
2854         Indicates the use of Chromium's network stack.  Chromium's network
2855         stack performs better when it has full view of all resource requests,
2856         so USE(CHROMIUM_NET) can be used to bypass throttles.
2857
2858         https://bugs.webkit.org/show_bug.cgi?id=49778
2859
2860         * wtf/Platform.h:
2861
2862 2010-11-19  Steve Falkenburg  <sfalken@apple.com>
2863
2864         Reviewed by Adam Roben.
2865
2866         Add Debug_Cairo_CFLite and Release_Cairo_CFLite configurations for all vcproj files
2867         https://bugs.webkit.org/show_bug.cgi?id=49819
2868
2869         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2870         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
2871         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2872         * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
2873         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
2874         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
2875
2876 2010-11-19  Oliver Hunt  <oliver@apple.com>
2877
2878         Reviewed by Geoffrey Garen.
2879
2880         Don't check for constant registers when we can guarantee that the register won't be in the constant pool
2881         https://bugs.webkit.org/show_bug.cgi?id=49814
2882
2883         Add uncheckedR(int) to CallFrame, and replace all the uses of r() with uncheckedR()
2884         when we can guarantee that the register is not referring to a constant.
2885         This makes the interpreter about 0.5% faster, and makes the CallFrame initialisation
2886         logic correct when we're using a faked callframe (as in the case of the globalExec).
2887
2888         * bytecode/CodeBlock.cpp:
2889         (JSC::CodeBlock::createActivation):
2890         * debugger/DebuggerCallFrame.cpp:
2891         (JSC::DebuggerCallFrame::thisObject):
2892         * interpreter/CallFrame.h:
2893         (JSC::ExecState::uncheckedR):
2894         * interpreter/Interpreter.cpp:
2895         (JSC::Interpreter::resolve):
2896         (JSC::Interpreter::resolveSkip):
2897         (JSC::Interpreter::resolveGlobal):
2898         (JSC::Interpreter::resolveGlobalDynamic):
2899         (JSC::Interpreter::resolveBase):
2900         (JSC::Interpreter::resolveBaseAndProperty):
2901         (JSC::Interpreter::callEval):
2902         (JSC::Interpreter::unwindCallFrame):
2903         (JSC::Interpreter::throwException):
2904         (JSC::Interpreter::execute):
2905         (JSC::Interpreter::executeCall):
2906         (JSC::Interpreter::executeConstruct):
2907         (JSC::Interpreter::prepareForRepeatCall):
2908         (JSC::Interpreter::createExceptionScope):
2909         (JSC::Interpreter::privateExecute):
2910         * jit/JITStubs.cpp:
2911         (JSC::DEFINE_STUB_FUNCTION):
2912         * runtime/JSActivation.cpp:
2913         (JSC::JSActivation::argumentsGetter):
2914
2915 2010-11-19  Steve Falkenburg  <sfalken@apple.com>
2916
2917         Reviewed by Darin Adler.
2918
2919         Normalize Cairo/CFLite project/solution configuration names
2920         https://bugs.webkit.org/show_bug.cgi?id=49818
2921
2922         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2923         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
2924         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
2925
2926 2010-11-18  Steve Falkenburg  <sfalken@apple.com>
2927
2928         Reviewed by Adam Roben.
2929
2930         Windows vcproj configuration names should be normalized across projects
2931         https://bugs.webkit.org/show_bug.cgi?id=49776
2932
2933         * JavaScriptCore.vcproj/JavaScriptCore.sln:
2934         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
2935         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: Added.
2936         * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln:
2937
2938 2010-11-19  Patrick Gansterer  <paroga@webkit.org>
2939
2940         Unreviewed, build fix after r72360.
2941
2942         * bytecode/CodeBlock.h:
2943         (JSC::CodeBlock::bytecodeOffset):
2944
2945 2010-11-18  Gavin Barraclough  <barraclough@apple.com>
2946
2947         Rubber stamped by Geoff Garen.
2948
2949         Bug 49577 - Function.prototype should be non-configurable
2950
2951         Ooops, Function.prototype should not be enumerable!
2952
2953         * runtime/JSFunction.cpp:
2954         (JSC::JSFunction::getOwnPropertySlot):
2955
2956 2010-11-18  Gavin Barraclough  <barraclough@apple.com>
2957
2958         Reviewed by Oliver Hunt.
2959
2960         Bug 49708 - Stop recompiling functions to regenerate exception info.
2961
2962         Instead only hold info as necessary – keep divot info is the inspector
2963         is enabled, line number info is debugging or profiling, and handler
2964         info for functions with try/catch.
2965
2966         * bytecode/CodeBlock.cpp:
2967         (JSC::CodeBlock::dumpStatistics):
2968         (JSC::CodeBlock::CodeBlock):
2969         (JSC::CodeBlock::lineNumberForBytecodeOffset):
2970         (JSC::CodeBlock::expressionRangeForBytecodeOffset):
2971         (JSC::CodeBlock::shrinkToFit):
2972         * bytecode/CodeBlock.h:
2973         (JSC::CodeBlock::bytecodeOffset):
2974         (JSC::CodeBlock::addExpressionInfo):
2975         (JSC::CodeBlock::addLineInfo):
2976         (JSC::CodeBlock::hasExpressionInfo):
2977         (JSC::CodeBlock::hasLineInfo):
2978         (JSC::CodeBlock::needsCallReturnIndices):
2979         (JSC::CodeBlock::callReturnIndexVector):
2980         * bytecode/SamplingTool.cpp:
2981         (JSC::SamplingTool::dump):
2982         * bytecompiler/BytecodeGenerator.cpp:
2983         (JSC::BytecodeGenerator::generate):
2984         (JSC::BytecodeGenerator::BytecodeGenerator):
2985         * bytecompiler/BytecodeGenerator.h:
2986         (JSC::BytecodeGenerator::emitNode):
2987         (JSC::BytecodeGenerator::emitNodeInConditionContext):
2988         (JSC::BytecodeGenerator::emitExpressionInfo):
2989         (JSC::BytecodeGenerator::addLineInfo):
2990         * interpreter/Interpreter.cpp:
2991         (JSC::Interpreter::unwindCallFrame):
2992         (JSC::appendSourceToError):
2993         (JSC::Interpreter::throwException):
2994         (JSC::Interpreter::privateExecute):
2995         (JSC::Interpreter::retrieveLastCaller):
2996         * interpreter/Interpreter.h:
2997         * jit/JIT.cpp:
2998         (JSC::JIT::privateCompile):
2999         * jit/JITStubs.cpp:
3000         (JSC::jitThrow):
3001         (JSC::DEFINE_STUB_FUNCTION):
3002         * runtime/Collector.cpp:
3003         (JSC::Heap::markRoots):
3004         * runtime/Executable.cpp:
3005         (JSC::EvalExecutable::compileInternal):
3006         (JSC::ProgramExecutable::compileInternal):
3007         (JSC::FunctionExecutable::compileForCallInternal):
3008         (JSC::FunctionExecutable::compileForConstructInternal):
3009         * runtime/Executable.h:
3010         * runtime/JSGlobalData.cpp:
3011         (JSC::JSGlobalData::JSGlobalData):
3012         * runtime/JSGlobalData.h:
3013         (JSC::JSGlobalData::usingAPI):
3014         * runtime/JSGlobalObject.h:
3015         (JSC::JSGlobalObject::supportsRichSourceInfo):
3016         (JSC::JSGlobalObject::globalData):
3017
3018 2010-11-18  Adam Roben  <aroben@apple.com>
3019
3020         Add a script to delete manifest-related files when they are older than
3021         any .vsprops file
3022
3023         Changes to .vsprops files can cause the manifest files to become
3024         invalid, and Visual Studio doesn't always figure out that it needs to
3025         rebuild them.
3026
3027         Reviewed by Sam Weinig.
3028
3029         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
3030         Call the new script.
3031
3032         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
3033         Added the new script.
3034
3035         * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py: Added.
3036         (file_modification_times): Generator to return the modification time of
3037         each file in a directory hierarchy.
3038         (main): Get the modification time of the newest vsprops file, then find
3039         all manifest-related files in the obj directory. Delete all
3040         manifest-related files that are older than the newest vsprops file.
3041
3042 2010-11-18  Mark Rowe  <mrowe@apple.com>
3043
3044         Rubber-stamped by Adam Roben.
3045
3046         <rdar://problem/8602509&8602717&8602724> Enable compaction support.
3047
3048         * Configurations/JavaScriptCore.xcconfig:
3049
3050 2010-11-18  Gavin Barraclough  <barraclough@apple.com>
3051
3052         Reviewed by Oliver Hunt.
3053
3054         Bug 49635 - Profiler implementation is fragile
3055
3056         The profile presently requires the exception handling mechanism to explicitly
3057         remove all stack frames that are exited during the exception unwind mechanism.
3058         This is fragile in a number of ways:
3059           * We have to change bytecode register allocation when compiling code to run
3060             when profiling, to preserve the callee function (this is also required to
3061             call did_call after the call has returned).
3062           * In the JIT we have to maintain additional data structures
3063             (CodeBlock::RareData::m_functionRegisterInfos) to map back to the register
3064             containing the callee.
3065           * In the interpreter we use 'magic values' to offset into the instruction
3066             stream to rediscover the register containing the function.
3067
3068         Instead, move profiling into the head and tail of functions.
3069           * This correctly accounts the cost of the call itself to the caller.
3070           * This allows us to access the callee function object from the callframe.
3071           * This means that at the point a call is made we can track the stack depth
3072             on the ProfileNode.
3073           * When unwinding we can simply report the depth at which the exception is
3074             being handled - all call frames above this level are freed.
3075
3076         * bytecode/CodeBlock.cpp:
3077         (JSC::CodeBlock::shrinkToFit):
3078         * bytecode/CodeBlock.h:
3079         (JSC::CodeBlock::bytecodeOffset):
3080         (JSC::CodeBlock::methodCallLinkInfo):
3081         * bytecompiler/BytecodeGenerator.cpp:
3082         (JSC::BytecodeGenerator::emitCall):
3083         (JSC::BytecodeGenerator::emitCallVarargs):
3084         * interpreter/Interpreter.cpp:
3085         (JSC::Interpreter::unwindCallFrame):
3086         (JSC::Interpreter::throwException):
3087         (JSC::Interpreter::execute):
3088         (JSC::Interpreter::executeCall):
3089         (JSC::Interpreter::executeConstruct):
3090         (JSC::Interpreter::privateExecute):
3091         * jit/JITStubs.cpp:
3092         (JSC::DEFINE_STUB_FUNCTION):
3093         * profiler/Profile.cpp:
3094         (JSC::Profile::Profile):
3095         * profiler/ProfileGenerator.cpp:
3096         (JSC::ProfileGenerator::addParentForConsoleStart):
3097         (JSC::ProfileGenerator::willExecute):
3098         (JSC::ProfileGenerator::didExecute):
3099         (JSC::ProfileGenerator::exceptionUnwind):
3100         (JSC::ProfileGenerator::stopProfiling):
3101         * profiler/ProfileGenerator.h:
3102         * profiler/ProfileNode.cpp:
3103         (JSC::ProfileNode::ProfileNode):
3104         (JSC::ProfileNode::willExecute):
3105         * profiler/ProfileNode.h:
3106         (JSC::ProfileNode::create):
3107         (JSC::ProfileNode::callerCallFrame):
3108         * profiler/Profiler.cpp:
3109         (JSC::dispatchFunctionToProfiles):
3110         (JSC::Profiler::_willExecute):
3111         (JSC::Profiler::_didExecute):
3112         (JSC::Profiler::exceptionUnwind):
3113         * profiler/Profiler.h:
3114
3115 2010-11-18  Steve Falkenburg  <sfalken@apple.com>
3116
3117         Reviewed by Adam Roben.
3118
3119         Remove leftover Windows Debug_Internal configurations
3120         https://bugs.webkit.org/show_bug.cgi?id=49758
3121
3122         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3123         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3124         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
3125         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
3126
3127 2010-11-18  Chao-ying Fu  <fu@mips.com>
3128
3129         Reviewed by Csaba Osztrogonác.
3130
3131         Avoid increasing required alignment of target type warning
3132         https://bugs.webkit.org/show_bug.cgi?id=43963
3133
3134         * runtime/UString.h:
3135         (JSC::UStringHash::equal):
3136         * wtf/StdLibExtras.h:
3137
3138 2010-11-17  Sam Weinig  <sam@webkit.org>
3139
3140         Reviewed by Anders Carlsson.
3141
3142         Add stubbed out ScrollAnimator for the Mac
3143         https://bugs.webkit.org/show_bug.cgi?id=49678
3144
3145         * wtf/Platform.h: Enable SMOOTH_SCROLLING on the Mac, this has no
3146         change in behavior at the moment.
3147
3148 2010-11-17  David Kilzer  <ddkilzer@apple.com>
3149
3150         <http://webkit.org/b/49634> Make overflow guards in WTF::String::utf8 explicit
3151
3152         Reviewed by Darin Adler.
3153
3154         Add an explicit overflow check prior to allocating our buffer,
3155         rather than implicitly relying on the guard in convertUTF16ToUTF8.
3156
3157         * wtf/text/WTFString.cpp:
3158         (WTF::String::utf8):
3159
3160 2010-11-17  Sheriff Bot  <webkit.review.bot@gmail.com>
3161
3162         Unreviewed, rolling out r72197.
3163         http://trac.webkit.org/changeset/72197
3164         https://bugs.webkit.org/show_bug.cgi?id=49661
3165
3166         broke fast/regex/test1.html (Requested by stampho on #webkit).
3167
3168         * runtime/JSGlobalData.h:
3169         * runtime/RegExp.cpp:
3170         (JSC::RegExpRepresentation::~RegExpRepresentation):
3171         (JSC::RegExp::compile):
3172         (JSC::RegExp::match):
3173         * tests/mozilla/expected.html:
3174         * wtf/Platform.h:
3175         * yarr/RegexCompiler.cpp:
3176         * yarr/RegexCompiler.h:
3177         * yarr/RegexInterpreter.cpp:
3178         * yarr/RegexInterpreter.h:
3179         * yarr/RegexJIT.cpp:
3180         (JSC::Yarr::jitCompileRegex):
3181         * yarr/RegexJIT.h:
3182         (JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
3183         (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock):
3184         (JSC::Yarr::RegexCodeBlock::getFallback):
3185         (JSC::Yarr::RegexCodeBlock::setFallback):
3186         (JSC::Yarr::executeRegex):
3187         * yarr/RegexParser.h:
3188         * yarr/RegexPattern.h:
3189
3190 2010-11-17  Peter Varga  <pvarga@inf.u-szeged.hu>
3191
3192         Reviewed by Gavin Barraclough.
3193
3194         YARR JIT should fallback to YARR Interpreter instead of PCRE.
3195         https://bugs.webkit.org/show_bug.cgi?id=46719
3196
3197         Remove the ENABLE_YARR macro and the option of matching regular
3198         expressions with PCRE from JavaScriptCore.
3199
3200         * runtime/JSGlobalData.h:
3201         * runtime/RegExp.cpp:
3202         (JSC::RegExp::compile):
3203         (JSC::RegExp::match):
3204         * tests/mozilla/expected.html:
3205         * wtf/Platform.h:
3206         * yarr/RegexCompiler.cpp:
3207         * yarr/RegexCompiler.h:
3208         * yarr/RegexInterpreter.cpp:
3209         (JSC::Yarr::byteCompileRegex):
3210         * yarr/RegexInterpreter.h:
3211         * yarr/RegexJIT.cpp:
3212         (JSC::Yarr::jitCompileRegex):
3213         * yarr/RegexJIT.h:
3214         (JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
3215         (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock):
3216         (JSC::Yarr::RegexCodeBlock::getFallback):
3217         (JSC::Yarr::RegexCodeBlock::isFallback):
3218         (JSC::Yarr::RegexCodeBlock::setFallback):
3219         (JSC::Yarr::executeRegex):
3220         * yarr/RegexParser.h:
3221         * yarr/RegexPattern.h:
3222
3223 2010-11-17  Peter Varga  <pvarga@inf.u-szeged.hu>
3224
3225         Reviewed by Gavin Barraclough.
3226
3227         Extend YARR Interpreter with beginning character look-up optimization
3228         https://bugs.webkit.org/show_bug.cgi?id=45751
3229
3230         Add beginning character look-up optimization which sets the start
3231         index to the first possible successful pattern match.
3232         Extend YARR Interpreter with lookupForBeginChars function which
3233         implements the beginning character look-up optimization.
3234
3235         * yarr/RegexInterpreter.cpp:
3236         (JSC::Yarr::Interpreter::InputStream::readPair):
3237         (JSC::Yarr::Interpreter::InputStream::isNotAvailableInput):
3238         (JSC::Yarr::Interpreter::lookupForBeginChars):
3239         (JSC::Yarr::Interpreter::matchDisjunction):
3240         (JSC::Yarr::Interpreter::interpret):
3241         * yarr/RegexInterpreter.h:
3242         (JSC::Yarr::BytecodePattern::BytecodePattern):
3243
3244 2010-11-17  Alexis Menard  <alexis.menard@nokia.com>, Simon Hausmann  <simon.hausmann@nokia.com>
3245
3246         Reviewed by Kenneth Christiansen, Tor Arne Vestbø.
3247
3248         [Qt] Add support for use GStreamer with the Qt build
3249
3250         Enable the build/inclusion of the wtf/QObject convenience classes.
3251
3252         * JavaScriptCore.pri:
3253         * wtf/wtf.pri:
3254
3255 2010-11-17  Peter Varga  <pvarga@inf.u-szeged.hu>
3256
3257         Reviewed by Gavin Barraclough.
3258
3259         Collect the beginning characters in a RegExp pattern for look-up
3260         optimization
3261         https://bugs.webkit.org/show_bug.cgi?id=45748
3262
3263         Extend the YARR's parser with an algorithm which collects the potential
3264         beginning characters from a RegExp pattern for later look-up optimization.
3265
3266         * yarr/RegexCompiler.cpp:
3267         (JSC::Yarr::BeginCharHelper::BeginCharHelper):
3268         (JSC::Yarr::BeginCharHelper::addBeginChar):
3269         (JSC::Yarr::BeginCharHelper::merge):
3270         (JSC::Yarr::BeginCharHelper::addCharacter):
3271         (JSC::Yarr::BeginCharHelper::linkHotTerms):
3272         (JSC::Yarr::RegexPatternConstructor::RegexPatternConstructor):
3273         (JSC::Yarr::RegexPatternConstructor::addBeginTerm):
3274         (JSC::Yarr::RegexPatternConstructor::setupDisjunctionBeginTerms):
3275         (JSC::Yarr::RegexPatternConstructor::setupAlternativeBeginTerms):
3276         (JSC::Yarr::RegexPatternConstructor::setupBeginChars):
3277         (JSC::Yarr::compileRegex):
3278         * yarr/RegexPattern.h:
3279         (JSC::Yarr::TermChain::TermChain):
3280         (JSC::Yarr::BeginChar::BeginChar):
3281         (JSC::Yarr::RegexPattern::RegexPattern):
3282         (JSC::Yarr::RegexPattern::reset):
3283
3284 2010-11-17  Sheriff Bot  <webkit.review.bot@gmail.com>
3285
3286         Unreviewed, rolling out r72160.
3287         http://trac.webkit.org/changeset/72160
3288         https://bugs.webkit.org/show_bug.cgi?id=49646
3289
3290         Broke lots of fast/profiler tests, among others (Requested by
3291         aroben on #webkit).
3292
3293         * bytecode/CodeBlock.cpp:
3294         (JSC::CodeBlock::dump):
3295         (JSC::CodeBlock::functionRegisterForBytecodeOffset):
3296         (JSC::CodeBlock::shrinkToFit):
3297         * bytecode/CodeBlock.h:
3298         (JSC::CodeBlock::addFunctionRegisterInfo):
3299         * bytecode/Opcode.h:
3300         * bytecompiler/BytecodeGenerator.cpp:
3301         (JSC::BytecodeGenerator::BytecodeGenerator):
3302         (JSC::BytecodeGenerator::emitCall):
3303         (JSC::BytecodeGenerator::emitCallVarargs):
3304         (JSC::BytecodeGenerator::emitReturn):
3305         (JSC::BytecodeGenerator::emitConstruct):
3306         * bytecompiler/BytecodeGenerator.h:
3307         (JSC::CallArguments::profileHookRegister):
3308         * bytecompiler/NodesCodegen.cpp:
3309         (JSC::CallArguments::CallArguments):
3310         * interpreter/Interpreter.cpp:
3311         (JSC::Interpreter::unwindCallFrame):
3312         (JSC::Interpreter::throwException):
3313         (JSC::Interpreter::execute):
3314         (JSC::Interpreter::executeCall):
3315         (JSC::Interpreter::executeConstruct):
3316         (JSC::Interpreter::privateExecute):
3317         * jit/JIT.cpp:
3318         (JSC::JIT::privateCompileMainPass):
3319         * jit/JIT.h:
3320         * jit/JITOpcodes.cpp:
3321         (JSC::JIT::emit_op_profile_will_call):
3322         (JSC::JIT::emit_op_profile_did_call):
3323         * jit/JITOpcodes32_64.cpp:
3324         (JSC::JIT::emit_op_profile_will_call):
3325         (JSC::JIT::emit_op_profile_did_call):
3326         * jit/JITStubs.cpp:
3327         (JSC::DEFINE_STUB_FUNCTION):
3328         * jit/JITStubs.h:
3329         * profiler/Profile.cpp:
3330         (JSC::Profile::Profile):
3331         * profiler/ProfileGenerator.cpp:
3332         (JSC::ProfileGenerator::addParentForConsoleStart):
3333         (JSC::ProfileGenerator::willExecute):
3334         (JSC::ProfileGenerator::didExecute):
3335         (JSC::ProfileGenerator::stopProfiling):
3336         * profiler/ProfileGenerator.h:
3337         * profiler/ProfileNode.cpp:
3338         (JSC::ProfileNode::ProfileNode):
3339         (JSC::ProfileNode::willExecute):
3340         * profiler/ProfileNode.h:
3341         (JSC::ProfileNode::create):
3342         (JSC::ProfileNode::operator==):
3343         * profiler/Profiler.cpp:
3344         (JSC::dispatchFunctionToProfiles):
3345         (JSC::Profiler::willExecute):
3346         (JSC::Profiler::didExecute):
3347         * profiler/Profiler.h:
3348
3349 2010-11-16  Gavin Barraclough  <barraclough@apple.com>
3350
3351         Reviewed by Sam Weinig.
3352
3353         Bug 49635 - Profiler implementation is fragile
3354
3355         The profile presently requires the exception handling mechanism to explicitly
3356         remove all stack frames that are exited during the exception unwind mechanism.
3357         This is fragile in a number of ways:
3358           * We have to change bytecode register allocation when compiling code to run
3359             when profiling, to preserve the callee function (this is also required to
3360             call did_call after the call has returned).
3361           * In the JIT we have to maintain additional data structures
3362             (CodeBlock::RareData::m_functionRegisterInfos) to map back to the register
3363             containing the callee.
3364           * In the interpreter we use 'magic values' to offset into the instruction
3365             stream to rediscover the register containing the function.
3366
3367         Instead, move profiling into the head and tail of functions.
3368           * This correctly accounts the cost of the call itself to the caller.
3369           * This allows us to access the callee function object from the callframe.
3370           * This means that at the point a call is made we can track the stack depth
3371             on the ProfileNode.
3372           * When unwinding we can simply report the depth at which the exception is
3373             being handled - all call frames above this level are freed.
3374
3375         * JavaScriptCore.xcodeproj/project.pbxproj:
3376         * bytecode/CodeBlock.cpp:
3377         (JSC::CodeBlock::dump):
3378         (JSC::CodeBlock::shrinkToFit):
3379         * bytecode/CodeBlock.h:
3380         (JSC::CodeBlock::bytecodeOffset):
3381         (JSC::CodeBlock::methodCallLinkInfo):
3382         * bytecode/Opcode.h:
3383         * bytecompiler/BytecodeGenerator.cpp:
3384         (JSC::BytecodeGenerator::BytecodeGenerator):
3385         (JSC::BytecodeGenerator::emitCall):
3386         (JSC::BytecodeGenerator::emitCallVarargs):
3387         (JSC::BytecodeGenerator::emitReturn):
3388         (JSC::BytecodeGenerator::emitConstruct):
3389         * bytecompiler/BytecodeGenerator.h:
3390         (JSC::CallArguments::count):
3391         * bytecompiler/NodesCodegen.cpp:
3392         (JSC::CallArguments::CallArguments):
3393         * interpreter/Interpreter.cpp:
3394         (JSC::ProfileHostCall::ProfileHostCall):
3395         (JSC::ProfileHostCall::~ProfileHostCall):
3396         (JSC::Interpreter::unwindCallFrame):
3397         (JSC::Interpreter::throwException):
3398         (JSC::Interpreter::execute):
3399         (JSC::Interpreter::executeCall):
3400         (JSC::Interpreter::executeConstruct):
3401         (JSC::Interpreter::privateExecute):
3402         * jit/JIT.cpp:
3403         (JSC::JIT::privateCompileMainPass):
3404         * jit/JIT.h:
3405         * jit/JITOpcodes.cpp:
3406         (JSC::JIT::emit_op_profile_has_called):
3407         (JSC::JIT::emit_op_profile_will_return):
3408         * jit/JITOpcodes32_64.cpp:
3409         (JSC::JIT::emit_op_profile_has_called):
3410         (JSC::JIT::emit_op_profile_will_return):
3411         * jit/JITStubs.cpp:
3412         (JSC::DEFINE_STUB_FUNCTION):
3413         * jit/JITStubs.h:
3414         * profiler/Profile.cpp:
3415         (JSC::Profile::Profile):
3416         * profiler/ProfileGenerator.cpp:
3417         (JSC::ProfileGenerator::addParentForConsoleStart):
3418         (JSC::ProfileGenerator::willExecute):
3419         (JSC::ProfileGenerator::didExecute):
3420         (JSC::ProfileGenerator::exceptionUnwind):
3421         (JSC::ProfileGenerator::stopProfiling):
3422         * profiler/ProfileGenerator.h:
3423         * profiler/ProfileNode.cpp:
3424         (JSC::ProfileNode::ProfileNode):
3425         (JSC::ProfileNode::willExecute):
3426         * profiler/ProfileNode.h:
3427         (JSC::ProfileNode::create):
3428         (JSC::ProfileNode::operator==):
3429         (JSC::ProfileNode::exec):
3430         * profiler/Profiler.cpp:
3431         (JSC::dispatchFunctionToProfiles):
3432         (JSC::Profiler::hasCalled):
3433         (JSC::Profiler::willEvaluate):
3434         (JSC::Profiler::willReturn):
3435         (JSC::Profiler::didEvaluate):
3436         (JSC::Profiler::exceptionUnwind):
3437         * profiler/Profiler.h:
3438
3439 2010-11-16  Brian Weinstein  <bweinstein@apple.com>
3440
3441         Reviewed by Adam Roben and Steve Falkenburg.
3442
3443         Touch Platform.h to force a rebuild for Windows.
3444
3445         * wtf/Platform.h:
3446
3447 2010-11-16  Steve Falkenburg  <sfalken@apple.com>
3448
3449         Reviewed by Adam Roben.
3450
3451         Disable LTCG for Windows Release builds. Add new Release_LTCG configuration.
3452         https://bugs.webkit.org/show_bug.cgi?id=49632
3453