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