Print locations of assertions and logs in a way that Visual Studio understands
[WebKit-https.git] / Source / JavaScriptCore / ChangeLog
1 2011-02-10  Adam Roben  <aroben@apple.com>
2
3         Print locations of assertions and logs in a way that Visual Studio understands
4
5         With this change, double-clicking one of these locations in Visual Studio's Output Window
6         will focus that line of code in the editor.
7
8         Fixes <http://webkit.org/b/54208> Double-clicking locations of assertions/logs in Visual
9         Studio's Output Window does nothing
10
11         Reviewed by Alexey Proskuryakov.
12
13         * wtf/Assertions.cpp:
14         (printCallSite): Use OS(WINDOWS) instead of the meaningless OS(WIN). When we aren't using
15         the debug CRT (and thus can't call _CrtDbgReport), print the file and line number using the
16         same format that cl.exe uses when it prints compiler errors.
17
18 2011-02-10  Dan Bernstein  <mitz@apple.com>
19
20         LLVM Compiler build fix.
21
22         * runtime/MarkedBlock.cpp:
23         (JSC::MarkedBlock::create):
24
25 2011-02-10  Peter Varga  <pvarga@webkit.org>
26
27         Reviewed by Csaba Osztrogonác.
28
29         Remove PCRE source from trunk
30         https://bugs.webkit.org/show_bug.cgi?id=54188
31
32         * Android.mk:
33         * Android.v8.wtf.mk:
34         * CMakeLists.txt:
35         * DerivedSources.make:
36         * DerivedSources.pro:
37         * GNUmakefile.am:
38         * JavaScriptCore.gypi:
39         * JavaScriptCore.order:
40         * JavaScriptCore.pri:
41         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
42         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
43         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
44         * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
45         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
46         * JavaScriptCore.xcodeproj/project.pbxproj:
47         * pcre/AUTHORS: Removed.
48         * pcre/COPYING: Removed.
49         * pcre/dftables: Removed.
50         * pcre/pcre.h: Removed.
51         * pcre/pcre.pri: Removed.
52         * pcre/pcre_compile.cpp: Removed.
53         * pcre/pcre_exec.cpp: Removed.
54         * pcre/pcre_internal.h: Removed.
55         * pcre/pcre_tables.cpp: Removed.
56         * pcre/pcre_ucp_searchfuncs.cpp: Removed.
57         * pcre/pcre_xclass.cpp: Removed.
58         * pcre/ucpinternal.h: Removed.
59         * pcre/ucptable.cpp: Removed.
60         * wscript:
61
62 2011-02-10  Patrick Gansterer  <paroga@webkit.org>
63
64         Reviewed by Adam Barth.
65
66         Add randomValuesFromOS for OS(WINDOWS)
67         https://bugs.webkit.org/show_bug.cgi?id=54155
68
69         Use CryptGenRandom for generating cryptographically secure random numbers.
70         This will work on WinCE and MinGW too.
71
72         * config.h:
73         * wtf/OSRandomSource.cpp:
74         (WTF::randomValuesFromOS):
75
76 2011-02-10  Jarred Nicholls  <jarred@sencha.com>
77
78         Reviewed by Adam Barth.
79
80         REGRESSION(r78149): Return value of read() shouldn't be ignored.
81         https://bugs.webkit.org/show_bug.cgi?id=54167
82         
83         stdio read should have its return value handled. Build error in gcc 4.4.5.
84
85         * wtf/OSRandomSource.cpp:
86         (WTF::randomValuesFromOS):
87
88 2011-02-10  Patrick Gansterer  <paroga@webkit.org>
89
90         Reviewed by Adam Barth.
91
92         Rename randomValuesFromOS to cryptographicallyRandomValuesFromOS
93         https://bugs.webkit.org/show_bug.cgi?id=54156
94
95         randomValuesFromOS generates random numbers of cryptographic quality.
96         Make this clear by adding "cryptographically" to the function name.
97
98         * wtf/CryptographicallyRandomNumber.cpp:
99         (WTF::ARC4Stream::ARC4RandomNumberGenerator::stir):
100         * wtf/OSRandomSource.cpp:
101         (WTF::cryptographicallyRandomValuesFromOS):
102         * wtf/OSRandomSource.h:
103
104 2011-02-09  Mark Rowe  <mrowe@apple.com>
105
106         Reviewed by Sam Weinig.
107
108         <rdar://problem/8805364> Malloc zone enumeration code should be safe in the face of errors from the memory reader.
109
110         * wtf/FastMalloc.cpp:
111         (WTF::PageHeapAllocator::recordAdministrativeRegions): Use the new helper function to walk the linked list safely.
112         (WTF::TCMalloc_ThreadCache_FreeList::enumerateFreeObjects): Ditto.
113         (WTF::TCMalloc_Central_FreeList::enumerateFreeObjects): Ditto.
114         (WTF::TCMallocStats::PageMapFreeObjectFinder::visit): Bail out if the span could not be read.
115         (WTF::TCMallocStats::PageMapMemoryUsageRecorder::visit): Ditto.
116         * wtf/MallocZoneSupport.h:
117         (WTF::RemoteMemoryReader::operator()): Remove an assert that is not valid.
118         (WTF::RemoteMemoryReader::nextEntryInLinkedList): Add a helper function for retrieving the next entry in
119         a linked list. It maps a failed read of the remote memory in to a null pointer, which all callers can
120         handle gracefully.
121
122 2011-02-09  Gavin Barraclough  <barraclough@apple.com>
123
124         Reviewed by Sam Weinig.
125
126         Bug 54164 - Optimize global_var accesses on JSVALUE64
127
128         Directly embed the pointer to d->registers, optimize out the load
129         from the variable object, as we do already in JSVALUE32_64.
130
131         This is a ~1.5% win on sunspidey.
132
133         * jit/JIT.cpp:
134         * jit/JIT.h:
135         * jit/JITOpcodes.cpp:
136         (JSC::JIT::emit_op_get_global_var):
137         (JSC::JIT::emit_op_put_global_var):
138         (JSC::JIT::emit_op_get_scoped_var):
139         (JSC::JIT::emit_op_put_scoped_var):
140
141 2011-02-09  Geoffrey Garen  <ggaren@apple.com>
142
143         Reviewed by Oliver Hunt.
144
145         A little more encapsulation for MarkedBlock: Made MarkedBlock responsible
146         for its own initialization and destruction
147         https://bugs.webkit.org/show_bug.cgi?id=54137
148
149         * runtime/CollectorHeapIterator.h: Removed ObjectIterator since it is
150         now unused.
151
152         * runtime/JSCell.h: Maded MarkedBlock a friend so it can construct and
153         destruct JSCells.
154
155         * runtime/MarkedBlock.cpp:
156         (JSC::MarkedBlock::create):
157         (JSC::MarkedBlock::destroy):
158         (JSC::MarkedBlock::MarkedBlock): Migrated initialization and destruction
159         code from MarkedSpace, updating it not to use ObjectIterator. We don't
160         want to use an abstract iterator since iteration will be unique to each
161         block in the future.
162
163         * runtime/MarkedBlock.h: Made the consructor private and moved it into
164         the .cpp file because it's big now.
165
166         * runtime/MarkedSpace.cpp:
167         (JSC::MarkedSpace::allocateBlock):
168         (JSC::MarkedSpace::freeBlock): Migrated code.
169
170         * runtime/MarkedSpace.h:
171         (JSC::CollectorHeap::collectorBlock): Keep a vector of MarkedBlock
172         pointers instead of aligned allocations -- how MarkedBlocks are allocated
173         is now an implementation detail of MarkedBlock.
174
175 2011-02-09  Adam Barth  <abarth@webkit.org>
176
177         Another attempt to fix the Qt Windows build.
178
179         * config.h:
180         * wtf/OSRandomSource.cpp:
181         (WTF::randomValuesFromOS):
182
183 2011-02-09  Adam Barth  <abarth@webkit.org>
184
185         Attempt to fix the Qt Windows build.
186
187         * wtf/OSRandomSource.cpp:
188         (WTF::randomValuesFromOS):
189
190 2011-02-09  Adam Barth  <abarth@webkit.org>
191
192         Reviewed by Eric Seidel.
193
194         Add WTF::cryptographicallyRandomNumber
195         https://bugs.webkit.org/show_bug.cgi?id=54083
196
197         Introduce a cryptographically strong random number generator to WTF.
198         The random number generator is based on arc4random as found in:
199
200         http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/crypt/arc4random.c?rev=1.22
201
202         I've changed to source to WebKit style and abstracted the operating
203         system interaction to OSRandomSource.  We'll use this functionality to
204         expose a cryptographically strong random number generator to
205         JavaScript.
206
207         * Android.mk:
208         * Android.v8.wtf.mk:
209         * GNUmakefile.am:
210         * JavaScriptCore.gypi:
211         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
212         * JavaScriptCore.xcodeproj/project.pbxproj:
213         * config.h:
214         * wtf/CMakeLists.txt:
215         * wtf/CryptographicallyRandomNumber.cpp: Added.
216         (WTF::initMutexIfNeeded):
217         (WTF::init):
218         (WTF::addRandomData):
219         (WTF::stir):
220         (WTF::stirIfNeeded):
221         (WTF::getByte):
222         (WTF::getWord):
223         (WTF::cryptographicallyRandomNumber):
224         (WTF::cryptographicallyRandomValues):
225         * wtf/CryptographicallyRandomNumber.h: Added.
226         * wtf/OSRandomSource.cpp: Added.
227         (WTF::randomValuesFromOS):
228         * wtf/OSRandomSource.h: Added.
229         * wtf/wtf.pri:
230
231 2011-02-09  Geoffrey Garen  <ggaren@apple.com>
232
233         Try to fix the build.
234
235         * wtf/Bitmap.h: Include string.h for memset. Not sure why this started
236         failing now.
237
238 2011-02-09  Geoffrey Garen  <ggaren@apple.com>
239
240         Reviewed by Sam Weinig.
241
242         A tiny bit of encapsulation for MarkedBlock: made its heap data member private
243         https://bugs.webkit.org/show_bug.cgi?id=54129
244
245         * runtime/MarkedBlock.h:
246         (JSC::MarkedBlock::isCellAligned):
247         (JSC::MarkedBlock::MarkedBlock):
248         (JSC::MarkedBlock::heap): Made the heap data member private, and provided
249         a constructor and an accessor.
250
251         * runtime/MarkedSpace.cpp:
252         (JSC::MarkedSpace::allocateBlock):
253         * runtime/MarkedSpace.h:
254         (JSC::MarkedSpace::heap): Use the constructor and accessor.
255
256 2011-02-09  Peter Varga  <pvarga@webkit.org>
257
258         Reviewed by Gavin Barraclough.
259
260         Replace PCRE with Yarr in WebCore
261         https://bugs.webkit.org/show_bug.cgi?id=53496
262
263         * JavaScriptCore.exp:
264         * JavaScriptCore.gyp/JavaScriptCore.gyp:
265         * JavaScriptCore.gypi:
266         * JavaScriptCore.pro:
267         * JavaScriptCore.xcodeproj/project.pbxproj:
268         * create_regex_tables:
269         * runtime/RegExp.cpp:
270         * wtf/Platform.h:
271         * yarr/Yarr.h:
272         * yarr/YarrJIT.cpp:
273         * yarr/YarrJIT.h:
274         * yarr/YarrParser.h:
275         * yarr/YarrPattern.h:
276         * yarr/YarrSyntaxChecker.h:
277         * yarr/yarr.pri: Added.
278
279 2011-02-08  Geoffrey Garen  <ggaren@apple.com>
280
281         Reviewed by Sam Weinig.
282
283         Removed some dead code from Heap
284         https://bugs.webkit.org/show_bug.cgi?id=54064
285
286         * runtime/MarkedSpace.cpp: Removed some now-unused constants and
287         declarations.
288
289         (JSC::MarkedSpace::allocate): Removed some ASSERTs that are also ASSERTed
290         by our caller. Removed redundant typedefs.
291
292 2011-02-08  Geoffrey Garen  <ggaren@apple.com>
293
294         Reviewed by Sam Weinig.
295
296         Use a vector to track blocks in the Heap, instead of hand-rolled vector-like code
297         https://bugs.webkit.org/show_bug.cgi?id=54062
298         
299         SunSpider reports no change.
300
301         * runtime/CollectorHeapIterator.h:
302         (JSC::CollectorHeapIterator::isValid):
303         (JSC::CollectorHeapIterator::isLive): Updated for new mark invariant: To
304         know if an object is live, you just need to test its mark bit.
305
306         * runtime/MarkedSpace.cpp:
307         (JSC::MarkedSpace::MarkedSpace): Moved waterMark and highWaterMark from
308         CollectorHeap into MarkedSpace, since they're global state. Removed call
309         to memset since CollectorHeap is a true class with its own constructor now.
310
311         (JSC::MarkedSpace::destroy): Change uses of m_heap.usedBlocks to
312         m_heap.blocks.size(), and m_heap.numBlocks to m_heap.blocks.capacity().
313
314         (JSC::MarkedSpace::allocateBlock):
315         (JSC::MarkedSpace::freeBlock): No need to manage our vector manually anymore.
316
317         (JSC::MarkedSpace::allocate):
318         (JSC::MarkedSpace::shrink):
319         (JSC::MarkedSpace::clearMarkBits):
320         (JSC::MarkedSpace::markedCells):
321         (JSC::MarkedSpace::sweep):
322         (JSC::MarkedSpace::objectCount):
323         (JSC::MarkedSpace::capacity):
324         (JSC::MarkedSpace::reset):
325         (JSC::MarkedSpace::primaryHeapEnd):
326         * runtime/MarkedSpace.h:
327         (JSC::CollectorHeap::CollectorHeap):
328         (JSC::MarkedSpace::highWaterMark):
329         (JSC::MarkedSpace::setHighWaterMark):
330         (JSC::MarkedSpace::contains): Same as above.
331
332 2011-02-08  Geoffrey Garen  <ggaren@apple.com>
333
334         Reviewed by Darin Adler.
335
336         Give each MarkedBlock enough mark bits to cover the whole block
337         https://bugs.webkit.org/show_bug.cgi?id=54029
338         
339         SunSpider reports no change.
340
341         This simplifies access to mark bits, since any cell-aligned pointer
342         into a block now has a valid mark bit to test.
343         
344         * runtime/MarkedBlock.h: Changed CELLS_PER_BLOCK to account for the extra
345         mark bits. This happens not to change its actual value.
346         (JSC::MarkedBlock::cellNumber):
347         (JSC::MarkedBlock::isMarked):
348         (JSC::MarkedBlock::testAndSetMarked):
349         (JSC::MarkedBlock::setMarked): Changed const JSCell* to const void* to
350         remove a cast from our caller, and to more accurately reflect the fact
351         that MarkedBlock is agnostic about the types pointed to by the pointers
352         you pass to it.
353
354         (JSC::MarkedBlock::isPossibleCell): Removed a null check. We now consider
355         the null pointer to be a possible cell with a 0 (impossible) block. This
356         removes a null check from marking.
357
358         * runtime/MarkedSpace.cpp:
359         * runtime/MarkedSpace.h:
360         (JSC::MarkedSpace::contains): Simplified the contains check, and inlined
361         the whole thing, now that it's so simple.
362
363 2011-02-08  Daniel Bates  <dbates@rim.com>
364
365         Rubber-stamped by Martin Robinson.
366
367         Rename enum ProtectionSeting [sic] to ProtectionSetting.
368
369         * jit/ExecutableAllocator.cpp:
370         (JSC::ExecutableAllocator::reprotectRegion):
371         * jit/ExecutableAllocator.h:
372
373 2011-02-08  Balazs Kelemen  <kbalazs@webkit.org>
374
375         Reviewed by Andreas Kling.
376
377         [Qt] Should not always define USE_SYSTEM_MALLOC
378         https://bugs.webkit.org/show_bug.cgi?id=54007
379
380         * wtf/Platform.h:
381
382 2011-02-08  Dan Bernstein  <mitz@apple.com>
383
384         Reviewed by Maciej Stachowiak.
385
386         LLVM Compiler build fix.
387
388         * runtime/WriteBarrier.h:
389         (JSC::WriteBarrier::WriteBarrier):
390
391 2011-02-07  Ryosuke Niwa  <rniwa@webkit.org>
392
393         Reviewed by Darin Adler.
394
395         JSVariableObject::setRegisters should take PassOwnArrayPtr for registersArray.
396         https://bugs.webkit.org/show_bug.cgi?id=53902
397
398         * runtime/Arguments.h:
399         (JSC::JSActivation::copyRegisters): Uses OwnArrayPtr<Register> instead of Register*.
400         * runtime/JSGlobalObject.cpp:
401         (JSC::JSGlobalObject::copyGlobalsFrom): Ditto.
402         * runtime/JSGlobalObject.h:
403         (JSC::JSGlobalObject::setRegisters): Takes PassOwnArrayPtr<Register> instead of Register*
404         for registerArray.
405         * runtime/JSVariableObject.h:
406         (JSC::JSVariableObject::copyRegisterArray): Returns PassOwnArrayPtr<Register> instead of Register*.
407         (JSC::JSVariableObject::setRegisters): Takes PassOwnArrayPtr<Register> instead of Register*
408         for registerArray.
409
410 2011-02-07  Geoffrey Garen  <ggaren@apple.com>
411
412         Reviewed by Sam Weinig.
413
414         Removed some dead code from Heap
415         https://bugs.webkit.org/show_bug.cgi?id=53969
416         
417         SunSpider reports no change.
418
419         * runtime/MarkedSpace.cpp:
420         (JSC::MarkedSpace::shrink):
421         (JSC::MarkedSpace::sweep):
422         * runtime/MarkedSpace.h: Removed resizeBlocks and growBlocks, and
423         renamed shrinkBlocks to shrink, making it unconditionally shrink as
424         much as possible.
425
426 2011-02-07  Geoffrey Garen  <ggaren@apple.com>
427
428         Reviewed by Oliver Hunt.
429
430         Simplified the marked space's mark invariant
431         https://bugs.webkit.org/show_bug.cgi?id=53968
432         
433         SunSpider reports no change.
434         
435         * runtime/MarkedSpace.cpp:
436         (JSC::MarkedSpace::allocate): Mark objects when allocating them. This
437         means that, at all times other than the mark phase, an object is live
438         if and only if it is marked.
439
440         (JSC::MarkedSpace::containsSlowCase): Use the new mark invariant to
441         simplify testing whether an object is live.
442
443 2011-02-07  Beth Dakin  <bdakin@apple.com>
444
445         Reviewed by Eric Seidel.
446
447         Fix for https://bugs.webkit.org/show_bug.cgi?id=53950
448         USE_WK_SCROLLBAR_PAINTER in ScrollbarThemeMac should be in
449         Platform.h instead
450
451         * wtf/Platform.h:
452
453 2011-02-07  Darin Adler  <darin@apple.com>
454
455         Reviewed by Antti Koivisto.
456
457         Add built-in decoder for UTF-8 for improved performance
458         https://bugs.webkit.org/show_bug.cgi?id=53898
459
460         * wtf/unicode/UnicodeMacrosFromICU.h: Added U8_MAX_LENGTH and
461         U8_APPEND_UNSAFE. Also fixed header.
462
463 2011-02-07  Adam Roben  <aroben@apple.com>
464
465         Delete precompiled headers whenever any .vsprops file changes
466
467         Precompiled headers need to be rebuilt if, e.g., an ENABLE_* macro is changed in one of our
468         .vsprops files. Unfortunately, Visual Studio isn't smart enough to figure this out, so we
469         give it some assistance by deleting the precompiled headers whenever any .vsprops file
470         changes.
471
472         I also made some drive-by fixes while I was in the area.
473
474         Fixes <http://webkit.org/b/53826> react-to-vsprops-changes.py doesn't force precompiled
475         headers to be rebuilt, but should
476
477         Reviewed by David Kilzer.
478
479         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Stop ignoring the
480         return code from react-to-vsprops-changes.py so we will notice when errors are introduced.
481         But skip the script entirely in production builds, where it is both unnecessary and can't
482         function correctly (due to not having the entire source tree available to it).
483
484         * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
485         (main): Removed an extra '*' in the glob for finding manifest files. The extra '*' was
486         leftover from before we rearranged WebKitBuild in r75138. Moved code to delete an old file
487         to the new delete_if_older_than function. Added code to delete any precompiled headers older
488         than the newest .vsprops file.
489         (delete_if_older_than): Added. Code came from main.
490
491 2011-02-07  Antti Koivisto  <antti@apple.com>
492
493         Not reviewed.
494         
495         ASSERTS_DISABLED -> ASSERT_DISABLED
496
497         * wtf/BloomFilter.h:
498
499 2011-02-06  Ryosuke Niwa  <rniwa@webkit.org>
500
501         Unreviewed; speculative Qt build fix.
502
503         * JavaScriptCore.pro:
504
505 2011-02-06  Ryosuke Niwa  <rniwa@webkit.org>
506
507         Reviewed by Darin Adler.
508
509         OwnArraryPtr.h uses deleteOwnedPtr but doesn’t include OwnPtrCommon.h
510         https://bugs.webkit.org/show_bug.cgi?id=52867
511
512         Removed LOOSE_OWN_ARRAY_PTR and OwnArrayPtr<T>::set. Replaced all calls to OwnArrayPtr::set
513         and loose instantiation of OwnArrayPtr by calls to operator= and adoptArrayPtr. Also removed
514         OwnArrayPtrCommon.h since PassOwnArrayPtr.h needs to include OwnArrayPtr.h and there is
515         no point in putting deleteOwnedArrayPtr into a separate header.
516         
517         Note: if this patch breaks build, the code is either instiantiating OwnArrayPtr
518         without calling adoptArrayPtr or calling set on ArrayOwnPtr instead of operator=.
519
520         No tests are added since this is a refactoring.
521
522         * API/JSStringRefCF.cpp:
523         (JSStringCreateWithCFString): Calls adoptArrayPtr.
524         * GNUmakefile.am: Removed OwnArrayPtrCommon.h
525         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
526         * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
527         * runtime/Arguments.cpp:
528         (JSC::Arguments::deleteProperty): Calls adoptArrayPtr.
529         * runtime/Arguments.h:
530         (JSC::Arguments::copyRegisters): Ditto.
531         * runtime/JSPropertyNameIterator.cpp:
532         (JSC::JSPropertyNameIterator::JSPropertyNameIterator): Ditto.
533         * runtime/JSVariableObject.h:
534         (JSC::JSVariableObject::setRegisters): Calls operator= instead of set.
535         * runtime/StructureChain.cpp:
536         (JSC::StructureChain::StructureChain): Ditto.
537         * wtf/CMakeLists.txt:
538         * wtf/DateMath.h:
539         (JSC::GregorianDateTime::GregorianDateTime): No longer instnatiates OwnArrayPtr
540         with a null pointer.
541         * wtf/OwnArrayPtr.h:
542         * wtf/OwnArrayPtrCommon.h: Removed.
543         * wtf/PassOwnArrayPtr.h: No longer includes OwnArrayCommon.h
544         (WTF::deleteOwnedArrayPtr): Moved from OwnArrayPtrCommon.h
545
546 2011-02-06  Antti Koivisto  <antti@apple.com>
547
548         Reviewed by Maciej Stachowiak.
549
550         Use bloom filter for descendant selector filtering
551         https://bugs.webkit.org/show_bug.cgi?id=53880
552         
553         Implement a bloom filter with k=2 and 8 bit counting.
554
555         * GNUmakefile.am:
556         * JavaScriptCore.gypi:
557         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
558         * JavaScriptCore.xcodeproj/project.pbxproj:
559         * wtf/BloomFilter.h: Added.
560         (WTF::BloomFilter::maximumCount):
561         (WTF::BloomFilter::BloomFilter):
562         (WTF::BloomFilter::mayContain):
563         (WTF::BloomFilter::add):
564         (WTF::BloomFilter::remove):
565         (WTF::BloomFilter::firstSlot):
566         (WTF::BloomFilter::secondSlot):
567         (WTF::::add):
568         (WTF::::remove):
569         (WTF::::clear):
570         (WTF::::likelyEmpty):
571         (WTF::::isClear):
572
573 2011-02-04  Geoffrey Garen  <ggaren@apple.com>
574
575         Reviewed by Oliver Hunt.
576
577         Rolled back in r77612 with ASSERT/crash fixed.
578         https://bugs.webkit.org/show_bug.cgi?id=53759
579         
580         Don't shrink the heap to 0 unconditionally. Instead, shrink to 1 if
581         necessary. For now, the heap assumes that it always has at least one
582         block live.
583
584         * runtime/Heap.cpp:
585         (JSC::Heap::Heap):
586         (JSC::Heap::reset):
587         * runtime/Heap.h:
588         * runtime/MarkedSpace.cpp:
589         (JSC::MarkedSpace::allocate):
590         (JSC::MarkedSpace::shrinkBlocks):
591         (JSC::MarkedSpace::sweep):
592         (JSC::MarkedSpace::reset):
593         * runtime/MarkedSpace.h:
594         (JSC::MarkedSpace::highWaterMark):
595         (JSC::MarkedSpace::setHighWaterMark):
596
597 2011-02-04  David Kilzer  <ddkilzer@apple.com>
598
599         BUILD FIX: REALLY remove the last vestiges of JSVALUE32!
600
601         <rdar://problem/8957409> Remove last vestiges of JSVALUE32
602         <http://webkit.org/b/53779>
603
604         * DerivedSources.make: Removed dependency on
605         JavaScriptCore.JSVALUE32.exp.
606
607 2011-02-04  David Kilzer  <ddkilzer@apple.com>
608
609         <rdar://problem/8957409> Remove last vestiges of JSVALUE32
610         <http://webkit.org/b/53779>
611
612         Reviewed by Darin Adler.
613
614         Support for JSVALUE32 was originaly removed in r70111.
615
616         * Configurations/JavaScriptCore.xcconfig: Changed armv6 to use
617         JavaScriptCore.JSVALUE32_64.exp and ppc64 to use
618         JavaScriptCore.JSVALUE64.exp to match Platform.h.
619         * DerivedSources.make: Removed rule for
620         JavaScriptCore.JSVALUE32.exp.
621         * JavaScriptCore.JSVALUE32only.exp: Removed.
622         * JavaScriptCore.xcodeproj/project.pbxproj: Removed references
623         to JavaScriptCore.JSVALUE32only.exp.
624
625 2011-02-04  David Kilzer  <ddkilzer@apple.com>
626
627         Use static_cast and other style cleanup in YarrInterpreter.cpp
628         <http://webkit.org/b/53772>
629
630         Reviewed by John Sullivan.
631
632         * yarr/YarrInterpreter.cpp:
633         (JSC::Yarr::Interpreter::InputStream::readChecked): Use
634         static_cast.
635         (JSC::Yarr::Interpreter::InputStream::checkInput): Remove
636         unnecessary else block.
637         (JSC::Yarr::Interpreter::matchAssertionEOL): Ditto.
638         (JSC::Yarr::Interpreter::backtrackBackReference): Ditto.
639         (JSC::Yarr::ByteCompiler::emitDisjunction): Use static_cast.
640
641 2011-02-04  Sheriff Bot  <webkit.review.bot@gmail.com>
642
643         Unreviewed, rolling out r77625 and r77626.
644         http://trac.webkit.org/changeset/77625
645         http://trac.webkit.org/changeset/77626
646         https://bugs.webkit.org/show_bug.cgi?id=53765
647
648         It broke Windows builds (Requested by Ossy_ on #webkit).
649
650         * JavaScriptCore.exp:
651         * JavaScriptCore.gyp/JavaScriptCore.gyp:
652         * JavaScriptCore.gypi:
653         * JavaScriptCore.pro:
654         * JavaScriptCore.xcodeproj/project.pbxproj:
655         * create_regex_tables:
656         * runtime/RegExp.cpp:
657         * wtf/Platform.h:
658         * yarr/Yarr.h:
659         * yarr/YarrJIT.cpp:
660         * yarr/YarrJIT.h:
661         * yarr/YarrParser.h:
662         * yarr/YarrPattern.h:
663         * yarr/YarrSyntaxChecker.h:
664         * yarr/yarr.pri: Removed.
665
666 2011-02-04  Jessie Berlin  <jberlin@apple.com>
667
668         Windows build fix. Unreviewed.
669
670         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
671
672 2011-02-04  Peter Varga  <pvarga@webkit.org>
673
674         Reviewed by Gavin Barraclough.
675
676         Replace PCRE with Yarr in WebCore
677         https://bugs.webkit.org/show_bug.cgi?id=53496
678
679         * JavaScriptCore.exp:
680         * JavaScriptCore.gyp/JavaScriptCore.gyp:
681         * JavaScriptCore.gypi:
682         * JavaScriptCore.pro:
683         * JavaScriptCore.xcodeproj/project.pbxproj:
684         * create_regex_tables:
685         * runtime/RegExp.cpp:
686         * wtf/Platform.h:
687         * yarr/Yarr.h:
688         * yarr/YarrJIT.cpp:
689         * yarr/YarrJIT.h:
690         * yarr/YarrParser.h:
691         * yarr/YarrPattern.h:
692         * yarr/YarrSyntaxChecker.h:
693         * yarr/yarr.pri: Added.
694
695 2011-02-04  Ilya Tikhonovsky  <loislo@chromium.org>
696
697         Unreviewed rollout two patches r77614 and r77612.
698
699         REGRESSION: Snow Leopard Intel Release anumber of failing tests.
700
701         * runtime/Heap.cpp:
702         (JSC::Heap::Heap):
703         (JSC::Heap::reset):
704         * runtime/Heap.h:
705         * runtime/MarkedSpace.cpp:
706         (JSC::MarkedSpace::allocate):
707         (JSC::MarkedSpace::sweep):
708         (JSC::MarkedSpace::reset):
709         * runtime/MarkedSpace.h:
710
711 2011-02-04  Geoffrey Garen  <ggaren@apple.com>
712
713         Try to fix 32bit build.
714
715         * runtime/Heap.cpp:
716         (JSC::Heap::reset): Use an explicit cast to avoid shortening warnings,
717         since 1.5 is double (64bit), and the result is size_t (32bit).
718
719 2011-02-03  Geoffrey Garen  <ggaren@apple.com>
720
721         Reviewed by Cameron Zwarich.
722
723         Changed MarkedSpace to delegate grow/shrink decisions to Heap
724         https://bugs.webkit.org/show_bug.cgi?id=53759
725         
726         SunSpider reports no change.
727         
728         * runtime/Heap.cpp:
729         (JSC::Heap::Heap):
730         (JSC::Heap::reset):
731         * runtime/Heap.h: Reorganized a few data members for better cache locality.
732         Added a grow policy.
733         
734         * runtime/MarkedSpace.cpp:
735         (JSC::MarkedSpace::allocate):
736         (JSC::MarkedSpace::sweep):
737         (JSC::MarkedSpace::reset): Don't shrink automatically. Instead, wait for
738         the heap to make an explicit sweep call.
739
740         * runtime/MarkedSpace.h:
741         (JSC::MarkedSpace::highWaterMark):
742         (JSC::MarkedSpace::setHighWaterMark): Use a watermark to determine how
743         many bytes to allocate before failing and giving the heap an opportunity
744         to collect garbage. This also means that we allocate blocks on demand,
745         instead of ahead of time.
746
747 2011-02-03  James Kozianski  <koz@chromium.org>
748
749         Reviewed by Dimitri Glazkov.
750
751         Add navigator.registerProtocolHandler behind a flag.
752         https://bugs.webkit.org/show_bug.cgi?id=52609
753
754         * Configurations/FeatureDefines.xcconfig:
755
756 2011-02-03  Geoffrey Garen  <ggaren@apple.com>
757
758         Reviewed by Oliver Hunt.
759
760         Not all blocks are freed when the heap is freed (counting is hard!)
761         https://bugs.webkit.org/show_bug.cgi?id=53732
762
763         * runtime/MarkedSpace.cpp:
764         (JSC::MarkedSpace::destroy): Freeing a block compacts the list, so just
765         keep freeing block 0 until there are no blocks left.
766
767 2011-02-03  Geoffrey Garen  <ggaren@apple.com>
768
769         Try to fix the Mac build.
770
771         * JavaScriptCore.xcodeproj/project.pbxproj: The new MarkedBlock.h header
772         needs to be private, not project, so other projects can include headers
773         that depend on it.
774
775 2011-02-03  Geoffrey Garen  <ggaren@apple.com>
776
777         Reviewed by Sam Weinig.
778
779         Start using MarkedBlock instead of CollectorBlock
780         https://bugs.webkit.org/show_bug.cgi?id=53693
781         
782         SunSpider reports no change.
783         
784         * runtime/MarkedBlock.h:
785         (JSC::MarkedBlock::blockFor):
786         (JSC::MarkedBlock::setMarked):
787         (JSC::MarkedBlock::isCellAligned):
788         (JSC::MarkedBlock::isPossibleCell): Updated for const-ness.
789
790         * runtime/MarkedSpace.cpp:
791         (JSC::MarkedSpace::allocateBlock):
792         (JSC::MarkedSpace::containsSlowCase):
793         (JSC::MarkedSpace::clearMarkBits): Updated for const-ness.
794
795         * runtime/MarkedSpace.h:
796         (JSC::CollectorHeap::collectorBlock):
797         (JSC::MarkedSpace::heap):
798         (JSC::MarkedSpace::isMarked):
799         (JSC::MarkedSpace::testAndSetMarked):
800         (JSC::MarkedSpace::setMarked):
801         (JSC::MarkedSpace::contains): Switched from CollectorBlock to MarkedBlock,
802         and deleted dead CollectorBlock-related code.
803
804 2011-02-03  Patrick Gansterer  <paroga@webkit.org>
805
806         Reviewed by Darin Adler.
807
808         Avoid strlen() in AtomicString::fromUTF8
809         https://bugs.webkit.org/show_bug.cgi?id=50516
810
811         Add an overload to calculateStringHashFromUTF8 to get
812         strlen() of the input data with only one call.
813
814         This change shows about 3% performance win on the xml-parser benchmark.
815
816         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
817         * wtf/text/AtomicString.cpp:
818         (WTF::AtomicString::fromUTF8):
819         * wtf/unicode/UTF8.cpp:
820         (WTF::Unicode::calculateStringHashAndLengthFromUTF8Internal):
821         (WTF::Unicode::calculateStringHashFromUTF8):
822         (WTF::Unicode::calculateStringHashAndLengthFromUTF8):
823         * wtf/unicode/UTF8.h:
824
825 2011-02-02  Gavin Barraclough  <barraclough@apple.com>
826
827         Windows build fix.
828
829         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
830
831 2011-02-02  Gavin Barraclough  <barraclough@apple.com>
832
833         oops, build fix!
834
835         * wtf/Assertions.cpp:
836
837 2011-02-02  Gavin Barraclough  <barraclough@apple.com>
838
839         Reviewed by Sam Weinig.
840
841         Bug 53650 - Add a BACKTRACE macro to Assertions.h
842
843         Add a BACKTRACE macro to Assertions.h, which will print a backtrace on
844         debug Mac builds, make CRASH (and thus ASSERT) automatically call this.
845
846         * JavaScriptCore.exp:
847         * wtf/Assertions.cpp:
848         * wtf/Assertions.h:
849
850 2011-02-02  Michael Saboff  <msaboff@apple.com>
851
852         Reviewed by Gavin Barraclough.
853
854         Improper backtrack of nested non-capturing greedy paren to prior paren
855         https://bugs.webkit.org/show_bug.cgi?id=53261
856
857         A paren that follows a non-capturing greedy paren nested within a 
858         non-capturing fixed paren was back tracking to the last paren 
859         processed instead of the immediately prior paren.
860         Refactored default backtracking of parens to prior paren to work for
861         both nested (within) and immediately prior (after) parens.
862
863         * yarr/YarrJIT.cpp:
864         (JSC::Yarr::YarrGenerator::GenerationState::addParenthesesTail):
865         (JSC::Yarr::YarrGenerator::TermGenerationState::TermGenerationState):
866         (JSC::Yarr::YarrGenerator::TermGenerationState::setJumpListToPriorParen):
867         (JSC::Yarr::YarrGenerator::TermGenerationState::getJumpListToPriorParen):
868         (JSC::Yarr::YarrGenerator::ParenthesesTail::ParenthesesTail):
869         (JSC::Yarr::YarrGenerator::ParenthesesTail::generateCode):
870         (JSC::Yarr::YarrGenerator::generateParenthesesDisjunction):
871         (JSC::Yarr::YarrGenerator::generateParenthesesSingle):
872         (JSC::Yarr::YarrGenerator::generateDisjunction):
873
874 2011-02-02  Jeff Miller  <jeffm@apple.com>
875
876         Reviewed by Darin Adler and Steve Falkenburg.
877
878         Add DerivedSources.make to some Visual Studio projects
879         https://bugs.webkit.org/show_bug.cgi?id=53607
880
881         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Add DerivedSources.make.
882
883 2011-02-02  Steve Lacey  <sjl@chromium.org>
884
885         Reviewed by Eric Carlson.
886
887         Implement basic media statistics on media elements.
888         https://bugs.webkit.org/show_bug.cgi?id=53322
889
890         * Configurations/FeatureDefines.xcconfig:
891
892 2011-02-02  Kevin Ollivier  <kevino@theolliviers.com>
893
894         [wx] Build fixes for wxWebKit.
895
896         * wtf/wx/StringWx.cpp:
897         (WTF::String::String):
898
899 2011-02-01  Geoffrey Garen  <ggaren@apple.com>
900
901         Reviewed by Sam Weinig.
902
903         A little more Heap refactoring
904         https://bugs.webkit.org/show_bug.cgi?id=53577
905         
906         SunSpider reports no change.
907         
908         Split out MarkedBlock into its own file / class.
909         
910         Did the following renames:
911             isCellMarked => isMarked
912             checkMarkCell => testAndSetMarked
913             markCell => setMarked
914             cellOffset => cellNumber
915             collectorBlock => blockFor
916
917         * Android.mk:
918         * CMakeLists.txt:
919         * GNUmakefile.am:
920         * JavaScriptCore.gypi:
921         * JavaScriptCore.pro:
922         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
923         * JavaScriptCore.xcodeproj/project.pbxproj:
924         * runtime/Heap.cpp:
925         (JSC::WeakGCHandlePool::update):
926         * runtime/Heap.h:
927         (JSC::Heap::isMarked):
928         (JSC::Heap::testAndSetMarked):
929         (JSC::Heap::setMarked):
930         * runtime/JSArray.h:
931         (JSC::MarkStack::markChildren):
932         (JSC::MarkStack::drain):
933         * runtime/JSCell.h:
934         (JSC::JSCell::MarkStack::internalAppend):
935         * runtime/MarkedBlock.cpp: Added.
936         * runtime/MarkedBlock.h: Added.
937         (JSC::MarkedBlock::blockFor):
938         (JSC::MarkedBlock::cellNumber):
939         (JSC::MarkedBlock::isMarked):
940         (JSC::MarkedBlock::testAndSetMarked):
941         (JSC::MarkedBlock::setMarked):
942         (JSC::MarkedBlock::isCellAligned):
943         (JSC::MarkedBlock::isPossibleCell):
944         * runtime/MarkedSpace.h:
945         (JSC::MarkedSpace::isMarked):
946         (JSC::MarkedSpace::testAndSetMarked):
947         (JSC::MarkedSpace::setMarked):
948         * runtime/SmallStrings.cpp:
949         (JSC::isMarked):
950         * runtime/WeakGCMap.h:
951         (JSC::WeakGCMap::isValid):
952         (JSC::::get):
953         (JSC::::take):
954         (JSC::::set):
955
956 2011-02-02  Sam Weinig  <sam@webkit.org>
957
958         Fix windows clean build.
959
960         * DerivedSources.make:
961
962 2011-02-02  Alejandro G. Castro  <alex@igalia.com>
963
964         Reviewed by Martin Robinson.
965
966         [GTK] Fix dist compilation
967         https://bugs.webkit.org/show_bug.cgi?id=53579
968
969         * GNUmakefile.am: Added WriteBarrier.h to the sources, it was
970         added in r77151
971
972 2011-02-01  Sheriff Bot  <webkit.review.bot@gmail.com>
973
974         Unreviewed, rolling out r77297.
975         http://trac.webkit.org/changeset/77297
976         https://bugs.webkit.org/show_bug.cgi?id=53538
977
978         caused leopard crashes (Requested by paroga on #webkit).
979
980         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
981         * wtf/text/AtomicString.cpp:
982         (WTF::AtomicString::fromUTF8):
983         * wtf/unicode/UTF8.cpp:
984         (WTF::Unicode::calculateStringHashFromUTF8):
985         * wtf/unicode/UTF8.h:
986
987 2011-02-01  Sam Weinig  <sam@webkit.org>
988
989         Fix Mac production builds.
990
991         * JavaScriptCore.xcodeproj/project.pbxproj:
992
993 2011-02-01  Sam Weinig  <sam@webkit.org>
994
995         Try to fix the windows build.
996
997         * DerivedSources.make:
998
999 2011-02-01  Patrick Gansterer  <paroga@webkit.org>
1000
1001         Reviewed by Darin Adler.
1002
1003         Avoid strlen() in AtomicString::fromUTF8
1004         https://bugs.webkit.org/show_bug.cgi?id=50516
1005
1006         Add an overload to calculateStringHashFromUTF8 to get
1007         strlen() of the input data with only one call.
1008
1009         This change shows about 3% performance win on the xml-parser benchmark.
1010
1011         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1012         * wtf/text/AtomicString.cpp:
1013         (WTF::AtomicString::fromUTF8):
1014         * wtf/unicode/UTF8.cpp:
1015         (WTF::Unicode::calculateStringHashAndLengthFromUTF8Internal):
1016         (WTF::Unicode::calculateStringHashFromUTF8):
1017         (WTF::Unicode::calculateStringHashAndLengthFromUTF8):
1018         * wtf/unicode/UTF8.h:
1019
1020 2011-02-01  Sam Weinig  <sam@webkit.org>
1021
1022         Reviewed by Beth Dakin.
1023
1024         Part 2 for <rdar://problem/8492788>
1025         Adopt WKScrollbarPainterController
1026
1027         Use header detection to define scrollbar painting controller #define.
1028
1029         * DerivedSources.make:
1030         * JavaScriptCore.xcodeproj/project.pbxproj:
1031
1032 2011-02-01  Geoffrey Garen  <ggaren@apple.com>
1033
1034         Reviewed by Oliver Hunt.
1035
1036         Refactor JSGlobalObject-related tear-down
1037         https://bugs.webkit.org/show_bug.cgi?id=53478
1038         
1039         While investigating crashes caused by r77082, I noticed some strange
1040         destructor-time behaviors. This patch makes them less strange.
1041
1042         * bytecode/CodeBlock.cpp:
1043         (JSC::CodeBlock::CodeBlock):
1044         (JSC::CodeBlock::markAggregate):
1045         * bytecode/CodeBlock.h:
1046         (JSC::CodeBlock::globalObject):
1047         (JSC::GlobalCodeBlock::GlobalCodeBlock):
1048         (JSC::GlobalCodeBlock::~GlobalCodeBlock): Store the set of global code
1049         blocks on the Heap, instead of on independent global objects. The heap
1050         is guaranteed to outlast any GC-owned data structure. The heap is also
1051         a natural place to store objects that needs out-of-band marking, since
1052         the heap is responsible for marking all roots.
1053
1054         * runtime/Heap.cpp:
1055         (JSC::Heap::markRoots):
1056         (JSC::Heap::globalObjectCount):
1057         (JSC::Heap::protectedGlobalObjectCount):
1058         * runtime/Heap.h:
1059         (JSC::Heap::codeBlocks):
1060         * runtime/JSGlobalData.cpp:
1061         (JSC::JSGlobalData::JSGlobalData):
1062         * runtime/JSGlobalData.h:
1063         * runtime/JSGlobalObject.cpp:
1064         (JSC::JSGlobalObject::~JSGlobalObject):
1065         (JSC::JSGlobalObject::init):
1066         (JSC::JSGlobalObject::markChildren):
1067         * runtime/JSGlobalObject.h:
1068         * runtime/MarkedSpace.cpp: Store the set of global objects in a weak map
1069         owned by JSGlobalData, instead of an instrusive circular linked list.
1070         This is simpler, and it avoids destructor-time access between garbage
1071         collected objects, which is hard to get right.
1072
1073         (JSC::MarkedSpace::destroy): Make sure to clear mark bits before tearing
1074         everything down. Otherwise, weak data structures will incorrectly report
1075         that objects pending destruction are still alive.
1076
1077 2011-02-01  Geoffrey Garen  <ggaren@apple.com>
1078
1079         Reviewed by Oliver Hunt.
1080
1081         REGRESSION(77082): GC-related crashes seen: on WebKit2 bot; on GTK 32bit
1082         bot; loading trac pages; typing in search field
1083         https://bugs.webkit.org/show_bug.cgi?id=53519
1084         
1085         The crashes were all caused by failure to run an object's destructor.
1086
1087         * runtime/CollectorHeapIterator.h:
1088         (JSC::ObjectIterator::ObjectIterator): Don't skip forward upon
1089         construction. The iterator class used to do that when it was designed
1090         for prior-to-beginning initialization. I forgot to remove this line
1091         of code when I changed the iterator to normal initialization.
1092         
1093         Skipping forward upon construction was causing the heap to skip running
1094         the destructor for the very first object in a block when destroying the
1095         block. This usually did not crash, since block destruction is rare and
1096         most objects have pretty trivial destructors. However, in the rare case
1097         when the heap would destroy a block whose first object was a global
1098         object or a DOM node, BOOM.
1099
1100 2011-01-31  Oliver Hunt  <oliver@apple.com>
1101
1102         Reviewed by Geoffrey Garen.
1103
1104         Update JSObject storage for new marking API
1105         https://bugs.webkit.org/show_bug.cgi?id=53467
1106
1107         JSObject no longer uses EncodedJSValue for its property storage.
1108         This produces a stream of mechanical changes to PropertySlot and
1109         anonymous storage APIs.
1110
1111         * JavaScriptCore.exp:
1112         * runtime/ArrayPrototype.cpp:
1113         (JSC::ArrayPrototype::ArrayPrototype):
1114         * runtime/BooleanConstructor.cpp:
1115         (JSC::constructBoolean):
1116         (JSC::constructBooleanFromImmediateBoolean):
1117         * runtime/BooleanObject.cpp:
1118         (JSC::BooleanObject::BooleanObject):
1119         * runtime/BooleanObject.h:
1120         * runtime/BooleanPrototype.cpp:
1121         (JSC::BooleanPrototype::BooleanPrototype):
1122         * runtime/DateInstance.cpp:
1123         (JSC::DateInstance::DateInstance):
1124         * runtime/DatePrototype.cpp:
1125         (JSC::DatePrototype::DatePrototype):
1126         * runtime/JSActivation.cpp:
1127         (JSC::JSActivation::getOwnPropertySlot):
1128         * runtime/JSArray.cpp:
1129         (JSC::JSArray::getOwnPropertySlot):
1130         * runtime/JSFunction.cpp:
1131         (JSC::JSFunction::getOwnPropertySlot):
1132         * runtime/JSGlobalObject.h:
1133         (JSC::JSGlobalObject::JSGlobalObject):
1134         * runtime/JSObject.cpp:
1135         (JSC::JSObject::fillGetterPropertySlot):
1136         * runtime/JSObject.h:
1137         (JSC::JSObject::getDirectLocation):
1138         (JSC::JSObject::offsetForLocation):
1139         (JSC::JSObject::putAnonymousValue):
1140         (JSC::JSObject::clearAnonymousValue):
1141         (JSC::JSObject::getAnonymousValue):
1142         (JSC::JSObject::putThisToAnonymousValue):
1143         (JSC::JSObject::locationForOffset):
1144         (JSC::JSObject::inlineGetOwnPropertySlot):
1145         * runtime/JSObjectWithGlobalObject.cpp:
1146         (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
1147         * runtime/JSWrapperObject.h:
1148         (JSC::JSWrapperObject::JSWrapperObject):
1149         (JSC::JSWrapperObject::setInternalValue):
1150         * runtime/Lookup.cpp:
1151         (JSC::setUpStaticFunctionSlot):
1152         * runtime/NumberConstructor.cpp:
1153         (JSC::constructWithNumberConstructor):
1154         * runtime/NumberObject.cpp:
1155         (JSC::NumberObject::NumberObject):
1156         (JSC::constructNumber):
1157         * runtime/NumberObject.h:
1158         * runtime/NumberPrototype.cpp:
1159         (JSC::NumberPrototype::NumberPrototype):
1160         * runtime/PropertySlot.h:
1161         (JSC::PropertySlot::getValue):
1162         (JSC::PropertySlot::setValue):
1163         (JSC::PropertySlot::setRegisterSlot):
1164         * runtime/StringObject.cpp:
1165         (JSC::StringObject::StringObject):
1166         * runtime/StringPrototype.cpp:
1167         (JSC::StringPrototype::StringPrototype):
1168         * runtime/WriteBarrier.h:
1169         (JSC::WriteBarrierBase::setWithoutWriteBarrier):
1170
1171 2011-02-01  Daniel Bates  <dbates@rim.com>
1172
1173         Reviewed by Antonio Gomes.
1174
1175         Modify RandomNumberSeed.h to use USE(MERSENNE_TWISTER_19937)
1176         https://bugs.webkit.org/show_bug.cgi?id=53506
1177
1178         Currently, use of the Mersenne Twister pseudorandom number generator
1179         is hardcoded to the Windows CE port. With the passing of bug #53253,
1180         we can generalize support for this PRNG to all ports that use srand(3)
1181         and rand(3), including Windows CE.
1182
1183         * wtf/RandomNumberSeed.h:
1184         (WTF::initializeRandomNumberGenerator):
1185
1186 2011-02-01  Dave Tapuska  <dtapuska@rim.com>
1187
1188         Reviewed by Gavin Barraclough.
1189
1190         MacroAssemblerARM would generate code that did 32bit loads
1191         on addresses that were not aligned. More specifically it would
1192         generate a ldr r8,[r1, #7] which isn't valid on ARMv5 and lower.
1193         The intended instruction really is ldrb r8,[r1, #7]; ensure we
1194         call load8 instead of load32.
1195
1196         https://bugs.webkit.org/show_bug.cgi?id=46095
1197
1198         * assembler/MacroAssemblerARM.h:
1199         (JSC::MacroAssemblerARM::set32Test32):
1200         (JSC::MacroAssemblerARM::set32Test8):
1201
1202 2011-02-01  Darin Fisher  <darin@chromium.org>
1203
1204         Reviewed by Eric Seidel.
1205
1206         Fix some Visual Studio compiler warnings.
1207         https://bugs.webkit.org/show_bug.cgi?id=53476
1208
1209         * wtf/MathExtras.h:
1210         (clampToInteger):
1211         (clampToPositiveInteger):
1212         * wtf/ThreadingWin.cpp:
1213         (WTF::absoluteTimeToWaitTimeoutInterval):
1214
1215 2011-01-31  Oliver Hunt  <oliver@apple.com>
1216
1217         Reviewed by Sam Weinig.
1218
1219         Bogus callframe during stack unwinding
1220         https://bugs.webkit.org/show_bug.cgi?id=53454
1221
1222         Trying to access a callframe's globalData after destroying its
1223         ScopeChain is not a good thing.  While we could access the
1224         globalData directly through the (known valid) scopechain we're
1225         holding on to, it feels fragile.  Instead we push the valid
1226         ScopeChain onto the callframe again to ensure that the callframe
1227         itself remains valid.
1228
1229         * interpreter/Interpreter.cpp:
1230         (JSC::Interpreter::unwindCallFrame):
1231
1232 2011-01-31  Michael Saboff  <msaboff@apple.com>
1233
1234         Reviewed by Geoffrey Garen.
1235
1236         Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
1237         https://bugs.webkit.org/show_bug.cgi?id=53271
1238
1239         Reapplying this change again.
1240         Changed isValid() to use .get() as a result of change r77151.
1241
1242         Added new isValid() methods to check if a contained object in
1243         a WeakGCMap is valid when using an unchecked iterator.
1244
1245         * runtime/WeakGCMap.h:
1246         (JSC::WeakGCMap::isValid):
1247
1248 2011-01-31  Oliver Hunt  <oliver@apple.com>
1249
1250         Convert markstack to a slot visitor API
1251         https://bugs.webkit.org/show_bug.cgi?id=53219
1252
1253         rolling r77098, r77099, r77100, r77109, and
1254         r77111 back in, along with a few more Qt fix attempts.
1255
1256         * API/JSCallbackObject.h:
1257         (JSC::JSCallbackObjectData::setPrivateProperty):
1258         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
1259         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
1260         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
1261         (JSC::JSCallbackObject::setPrivateProperty):
1262         * API/JSCallbackObjectFunctions.h:
1263         (JSC::::put):
1264         (JSC::::staticFunctionGetter):
1265         * API/JSObjectRef.cpp:
1266         (JSObjectMakeConstructor):
1267         (JSObjectSetPrivateProperty):
1268         * API/JSWeakObjectMapRefInternal.h:
1269         * JavaScriptCore.exp:
1270         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1271         * JavaScriptCore.xcodeproj/project.pbxproj:
1272         * bytecode/CodeBlock.cpp:
1273         (JSC::CodeBlock::markAggregate):
1274         * bytecode/CodeBlock.h:
1275         (JSC::CodeBlock::globalObject):
1276         * bytecompiler/BytecodeGenerator.cpp:
1277         (JSC::BytecodeGenerator::BytecodeGenerator):
1278         (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
1279         (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
1280         (JSC::BytecodeGenerator::findScopedProperty):
1281         * debugger/Debugger.cpp:
1282         (JSC::evaluateInGlobalCallFrame):
1283         * debugger/DebuggerActivation.cpp:
1284         (JSC::DebuggerActivation::DebuggerActivation):
1285         (JSC::DebuggerActivation::markChildren):
1286         * debugger/DebuggerActivation.h:
1287         * debugger/DebuggerCallFrame.cpp:
1288         (JSC::DebuggerCallFrame::evaluate):
1289         * interpreter/CallFrame.h:
1290         (JSC::ExecState::exception):
1291         * interpreter/Interpreter.cpp:
1292         (JSC::Interpreter::resolve):
1293         (JSC::Interpreter::resolveSkip):
1294         (JSC::Interpreter::resolveGlobal):
1295         (JSC::Interpreter::resolveGlobalDynamic):
1296         (JSC::Interpreter::resolveBaseAndProperty):
1297         (JSC::Interpreter::unwindCallFrame):
1298         (JSC::appendSourceToError):
1299         (JSC::Interpreter::execute):
1300         (JSC::Interpreter::tryCacheGetByID):
1301         (JSC::Interpreter::privateExecute):
1302         * jit/JITStubs.cpp:
1303         (JSC::JITThunks::tryCacheGetByID):
1304         (JSC::DEFINE_STUB_FUNCTION):
1305         * jsc.cpp:
1306         (GlobalObject::GlobalObject):
1307         * runtime/ArgList.cpp:
1308         (JSC::MarkedArgumentBuffer::markLists):
1309         * runtime/Arguments.cpp:
1310         (JSC::Arguments::markChildren):
1311         (JSC::Arguments::getOwnPropertySlot):
1312         (JSC::Arguments::getOwnPropertyDescriptor):
1313         (JSC::Arguments::put):
1314         * runtime/Arguments.h:
1315         (JSC::Arguments::setActivation):
1316         (JSC::Arguments::Arguments):
1317         * runtime/ArrayConstructor.cpp:
1318         (JSC::ArrayConstructor::ArrayConstructor):
1319         (JSC::constructArrayWithSizeQuirk):
1320         * runtime/ArrayPrototype.cpp:
1321         (JSC::arrayProtoFuncSplice):
1322         * runtime/BatchedTransitionOptimizer.h:
1323         (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
1324         (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
1325         * runtime/BooleanConstructor.cpp:
1326         (JSC::BooleanConstructor::BooleanConstructor):
1327         (JSC::constructBoolean):
1328         (JSC::constructBooleanFromImmediateBoolean):
1329         * runtime/BooleanPrototype.cpp:
1330         (JSC::BooleanPrototype::BooleanPrototype):
1331         * runtime/ConservativeSet.cpp:
1332         (JSC::ConservativeSet::grow):
1333         * runtime/ConservativeSet.h:
1334         (JSC::ConservativeSet::~ConservativeSet):
1335         (JSC::ConservativeSet::mark):
1336         * runtime/DateConstructor.cpp:
1337         (JSC::DateConstructor::DateConstructor):
1338         * runtime/DateInstance.cpp:
1339         (JSC::DateInstance::DateInstance):
1340         * runtime/DatePrototype.cpp:
1341         (JSC::dateProtoFuncSetTime):
1342         (JSC::setNewValueFromTimeArgs):
1343         (JSC::setNewValueFromDateArgs):
1344         (JSC::dateProtoFuncSetYear):
1345         * runtime/ErrorConstructor.cpp:
1346         (JSC::ErrorConstructor::ErrorConstructor):
1347         * runtime/ErrorInstance.cpp:
1348         (JSC::ErrorInstance::ErrorInstance):
1349         * runtime/ErrorPrototype.cpp:
1350         (JSC::ErrorPrototype::ErrorPrototype):
1351         * runtime/FunctionConstructor.cpp:
1352         (JSC::FunctionConstructor::FunctionConstructor):
1353         * runtime/FunctionPrototype.cpp:
1354         (JSC::FunctionPrototype::FunctionPrototype):
1355         * runtime/GetterSetter.cpp:
1356         (JSC::GetterSetter::markChildren):
1357         * runtime/GetterSetter.h:
1358         (JSC::GetterSetter::GetterSetter):
1359         (JSC::GetterSetter::getter):
1360         (JSC::GetterSetter::setGetter):
1361         (JSC::GetterSetter::setter):
1362         (JSC::GetterSetter::setSetter):
1363         * runtime/GlobalEvalFunction.cpp:
1364         (JSC::GlobalEvalFunction::GlobalEvalFunction):
1365         (JSC::GlobalEvalFunction::markChildren):
1366         * runtime/GlobalEvalFunction.h:
1367         (JSC::GlobalEvalFunction::cachedGlobalObject):
1368         * runtime/Heap.cpp:
1369         (JSC::Heap::markProtectedObjects):
1370         (JSC::Heap::markTempSortVectors):
1371         (JSC::Heap::markRoots):
1372         * runtime/InternalFunction.cpp:
1373         (JSC::InternalFunction::InternalFunction):
1374         * runtime/JSAPIValueWrapper.h:
1375         (JSC::JSAPIValueWrapper::value):
1376         (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
1377         * runtime/JSActivation.cpp:
1378         (JSC::JSActivation::markChildren):
1379         (JSC::JSActivation::put):
1380         * runtime/JSArray.cpp:
1381         (JSC::JSArray::JSArray):
1382         (JSC::JSArray::getOwnPropertySlot):
1383         (JSC::JSArray::getOwnPropertyDescriptor):
1384         (JSC::JSArray::put):
1385         (JSC::JSArray::putSlowCase):
1386         (JSC::JSArray::deleteProperty):
1387         (JSC::JSArray::increaseVectorLength):
1388         (JSC::JSArray::setLength):
1389         (JSC::JSArray::pop):
1390         (JSC::JSArray::push):
1391         (JSC::JSArray::unshiftCount):
1392         (JSC::JSArray::sort):
1393         (JSC::JSArray::fillArgList):
1394         (JSC::JSArray::copyToRegisters):
1395         (JSC::JSArray::compactForSorting):
1396         * runtime/JSArray.h:
1397         (JSC::JSArray::getIndex):
1398         (JSC::JSArray::setIndex):
1399         (JSC::JSArray::uncheckedSetIndex):
1400         (JSC::JSArray::markChildrenDirect):
1401         * runtime/JSByteArray.cpp:
1402         (JSC::JSByteArray::JSByteArray):
1403         * runtime/JSCell.h:
1404         (JSC::JSCell::MarkStack::append):
1405         (JSC::JSCell::MarkStack::internalAppend):
1406         (JSC::JSCell::MarkStack::deprecatedAppend):
1407         * runtime/JSFunction.cpp:
1408         (JSC::JSFunction::JSFunction):
1409         (JSC::JSFunction::getOwnPropertySlot):
1410         * runtime/JSGlobalData.h:
1411         * runtime/JSGlobalObject.cpp:
1412         (JSC::markIfNeeded):
1413         (JSC::JSGlobalObject::reset):
1414         (JSC::JSGlobalObject::resetPrototype):
1415         (JSC::JSGlobalObject::markChildren):
1416         * runtime/JSGlobalObject.h:
1417         (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
1418         (JSC::JSGlobalObject::regExpConstructor):
1419         (JSC::JSGlobalObject::errorConstructor):
1420         (JSC::JSGlobalObject::evalErrorConstructor):
1421         (JSC::JSGlobalObject::rangeErrorConstructor):
1422         (JSC::JSGlobalObject::referenceErrorConstructor):
1423         (JSC::JSGlobalObject::syntaxErrorConstructor):
1424         (JSC::JSGlobalObject::typeErrorConstructor):
1425         (JSC::JSGlobalObject::URIErrorConstructor):
1426         (JSC::JSGlobalObject::evalFunction):
1427         (JSC::JSGlobalObject::objectPrototype):
1428         (JSC::JSGlobalObject::functionPrototype):
1429         (JSC::JSGlobalObject::arrayPrototype):
1430         (JSC::JSGlobalObject::booleanPrototype):
1431         (JSC::JSGlobalObject::stringPrototype):
1432         (JSC::JSGlobalObject::numberPrototype):
1433         (JSC::JSGlobalObject::datePrototype):
1434         (JSC::JSGlobalObject::regExpPrototype):
1435         (JSC::JSGlobalObject::methodCallDummy):
1436         (JSC::Structure::prototypeForLookup):
1437         (JSC::constructArray):
1438         * runtime/JSONObject.cpp:
1439         (JSC::Stringifier::Holder::object):
1440         (JSC::Stringifier::Holder::objectSlot):
1441         (JSC::Stringifier::markAggregate):
1442         (JSC::Stringifier::stringify):
1443         (JSC::Stringifier::Holder::appendNextProperty):
1444         (JSC::Walker::callReviver):
1445         (JSC::Walker::walk):
1446         * runtime/JSObject.cpp:
1447         (JSC::JSObject::defineGetter):
1448         (JSC::JSObject::defineSetter):
1449         (JSC::JSObject::removeDirect):
1450         (JSC::JSObject::putDirectFunction):
1451         (JSC::JSObject::putDirectFunctionWithoutTransition):
1452         (JSC::putDescriptor):
1453         (JSC::JSObject::defineOwnProperty):
1454         * runtime/JSObject.h:
1455         (JSC::JSObject::getDirectOffset):
1456         (JSC::JSObject::putDirectOffset):
1457         (JSC::JSObject::putUndefinedAtDirectOffset):
1458         (JSC::JSObject::flattenDictionaryObject):
1459         (JSC::JSObject::putDirectInternal):
1460         (JSC::JSObject::putDirect):
1461         (JSC::JSObject::putDirectFunction):
1462         (JSC::JSObject::putDirectWithoutTransition):
1463         (JSC::JSObject::putDirectFunctionWithoutTransition):
1464         (JSC::JSValue::putDirect):
1465         (JSC::JSObject::allocatePropertyStorageInline):
1466         (JSC::JSObject::markChildrenDirect):
1467         * runtime/JSPropertyNameIterator.cpp:
1468         (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
1469         (JSC::JSPropertyNameIterator::get):
1470         * runtime/JSPropertyNameIterator.h:
1471         * runtime/JSStaticScopeObject.cpp:
1472         (JSC::JSStaticScopeObject::markChildren):
1473         * runtime/JSString.cpp:
1474         (JSC::StringObject::create):
1475         * runtime/JSValue.h:
1476         * runtime/JSWrapperObject.cpp:
1477         (JSC::JSWrapperObject::markChildren):
1478         * runtime/JSWrapperObject.h:
1479         (JSC::JSWrapperObject::internalValue):
1480         (JSC::JSWrapperObject::setInternalValue):
1481         * runtime/LiteralParser.cpp:
1482         (JSC::LiteralParser::parse):
1483         * runtime/Lookup.cpp:
1484         (JSC::setUpStaticFunctionSlot):
1485         * runtime/Lookup.h:
1486         (JSC::lookupPut):
1487         * runtime/MarkStack.h:
1488         (JSC::MarkStack::MarkStack):
1489         (JSC::MarkStack::deprecatedAppendValues):
1490         (JSC::MarkStack::appendValues):
1491         * runtime/MathObject.cpp:
1492         (JSC::MathObject::MathObject):
1493         * runtime/NativeErrorConstructor.cpp:
1494         (JSC::NativeErrorConstructor::NativeErrorConstructor):
1495         * runtime/NativeErrorPrototype.cpp:
1496         (JSC::NativeErrorPrototype::NativeErrorPrototype):
1497         * runtime/NumberConstructor.cpp:
1498         (JSC::NumberConstructor::NumberConstructor):
1499         (JSC::constructWithNumberConstructor):
1500         * runtime/NumberObject.cpp:
1501         (JSC::constructNumber):
1502         * runtime/NumberPrototype.cpp:
1503         (JSC::NumberPrototype::NumberPrototype):
1504         * runtime/ObjectConstructor.cpp:
1505         (JSC::ObjectConstructor::ObjectConstructor):
1506         (JSC::objectConstructorGetOwnPropertyDescriptor):
1507         * runtime/Operations.h:
1508         (JSC::normalizePrototypeChain):
1509         (JSC::resolveBase):
1510         * runtime/PrototypeFunction.cpp:
1511         (JSC::PrototypeFunction::PrototypeFunction):
1512         * runtime/PutPropertySlot.h:
1513         (JSC::PutPropertySlot::setExistingProperty):
1514         (JSC::PutPropertySlot::setNewProperty):
1515         (JSC::PutPropertySlot::base):
1516         * runtime/RegExpConstructor.cpp:
1517         (JSC::RegExpConstructor::RegExpConstructor):
1518         * runtime/ScopeChain.cpp:
1519         (JSC::ScopeChainNode::print):
1520         * runtime/ScopeChain.h:
1521         (JSC::ScopeChainNode::~ScopeChainNode):
1522         (JSC::ScopeChainIterator::operator*):
1523         (JSC::ScopeChainIterator::operator->):
1524         (JSC::ScopeChain::top):
1525         * runtime/ScopeChainMark.h:
1526         (JSC::ScopeChain::markAggregate):
1527         * runtime/SmallStrings.cpp:
1528         (JSC::isMarked):
1529         (JSC::SmallStrings::markChildren):
1530         * runtime/SmallStrings.h:
1531         (JSC::SmallStrings::emptyString):
1532         (JSC::SmallStrings::singleCharacterString):
1533         (JSC::SmallStrings::singleCharacterStrings):
1534         * runtime/StringConstructor.cpp:
1535         (JSC::StringConstructor::StringConstructor):
1536         * runtime/StringObject.cpp:
1537         (JSC::StringObject::StringObject):
1538         * runtime/StringObject.h:
1539         * runtime/StringPrototype.cpp:
1540         (JSC::StringPrototype::StringPrototype):
1541         * runtime/Structure.cpp:
1542         (JSC::Structure::Structure):
1543         (JSC::Structure::addPropertyTransition):
1544         (JSC::Structure::toDictionaryTransition):
1545         (JSC::Structure::flattenDictionaryStructure):
1546         * runtime/Structure.h:
1547         (JSC::Structure::storedPrototype):
1548         (JSC::Structure::storedPrototypeSlot):
1549         * runtime/WeakGCMap.h:
1550         (JSC::WeakGCMap::uncheckedGet):
1551         (JSC::WeakGCMap::uncheckedGetSlot):
1552         (JSC::::get):
1553         (JSC::::take):
1554         (JSC::::set):
1555         (JSC::::uncheckedRemove):
1556         * runtime/WriteBarrier.h: Added.
1557         (JSC::DeprecatedPtr::DeprecatedPtr):
1558         (JSC::DeprecatedPtr::get):
1559         (JSC::DeprecatedPtr::operator*):
1560         (JSC::DeprecatedPtr::operator->):
1561         (JSC::DeprecatedPtr::slot):
1562         (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
1563         (JSC::DeprecatedPtr::operator!):
1564         (JSC::WriteBarrierBase::set):
1565         (JSC::WriteBarrierBase::get):
1566         (JSC::WriteBarrierBase::operator*):
1567         (JSC::WriteBarrierBase::operator->):
1568         (JSC::WriteBarrierBase::clear):
1569         (JSC::WriteBarrierBase::slot):
1570         (JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
1571         (JSC::WriteBarrierBase::operator!):
1572         (JSC::WriteBarrier::WriteBarrier):
1573         (JSC::operator==):
1574
1575 2011-01-31  Dan Winship  <danw@gnome.org>
1576
1577         Reviewed by Gustavo Noronha Silva.
1578
1579         wss (websockets ssl) support for gtk via new gio TLS support
1580         https://bugs.webkit.org/show_bug.cgi?id=50344
1581
1582         Add a GPollableOutputStream typedef for TLS WebSockets support
1583
1584         * wtf/gobject/GTypedefs.h:
1585
1586 2011-01-31  Gavin Barraclough  <barraclough@apple.com>
1587
1588         Reviewed by Geoff Garen.
1589
1590         https://bugs.webkit.org/show_bug.cgi?id=53352
1591         Heavy external fragmentation in FixedVMPoolAllocator can lead to a CRASH().
1592
1593         The FixedVMPoolAllocator currently uses a best fix policy -
1594         switch to first fit, this is less prone to external fragmentation.
1595
1596         * jit/ExecutableAllocatorFixedVMPool.cpp:
1597         (JSC::AllocationTableSizeClass::AllocationTableSizeClass):
1598         (JSC::AllocationTableSizeClass::blockSize):
1599         (JSC::AllocationTableSizeClass::blockCount):
1600         (JSC::AllocationTableSizeClass::blockAlignment):
1601         (JSC::AllocationTableSizeClass::size):
1602         (JSC::AllocationTableLeaf::AllocationTableLeaf):
1603         (JSC::AllocationTableLeaf::~AllocationTableLeaf):
1604         (JSC::AllocationTableLeaf::allocate):
1605         (JSC::AllocationTableLeaf::free):
1606         (JSC::AllocationTableLeaf::isEmpty):
1607         (JSC::AllocationTableLeaf::isFull):
1608         (JSC::AllocationTableLeaf::size):
1609         (JSC::AllocationTableLeaf::classForSize):
1610         (JSC::AllocationTableLeaf::dump):
1611         (JSC::LazyAllocationTable::LazyAllocationTable):
1612         (JSC::LazyAllocationTable::~LazyAllocationTable):
1613         (JSC::LazyAllocationTable::allocate):
1614         (JSC::LazyAllocationTable::free):
1615         (JSC::LazyAllocationTable::isEmpty):
1616         (JSC::LazyAllocationTable::isFull):
1617         (JSC::LazyAllocationTable::size):
1618         (JSC::LazyAllocationTable::dump):
1619         (JSC::LazyAllocationTable::classForSize):
1620         (JSC::AllocationTableDirectory::AllocationTableDirectory):
1621         (JSC::AllocationTableDirectory::~AllocationTableDirectory):
1622         (JSC::AllocationTableDirectory::allocate):
1623         (JSC::AllocationTableDirectory::free):
1624         (JSC::AllocationTableDirectory::isEmpty):
1625         (JSC::AllocationTableDirectory::isFull):
1626         (JSC::AllocationTableDirectory::size):
1627         (JSC::AllocationTableDirectory::classForSize):
1628         (JSC::AllocationTableDirectory::dump):
1629         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
1630         (JSC::FixedVMPoolAllocator::alloc):
1631         (JSC::FixedVMPoolAllocator::free):
1632         (JSC::FixedVMPoolAllocator::allocated):
1633         (JSC::FixedVMPoolAllocator::isValid):
1634         (JSC::FixedVMPoolAllocator::classForSize):
1635         (JSC::FixedVMPoolAllocator::offsetToPointer):
1636         (JSC::FixedVMPoolAllocator::pointerToOffset):
1637         (JSC::ExecutableAllocator::committedByteCount):
1638         (JSC::ExecutableAllocator::isValid):
1639         (JSC::ExecutableAllocator::underMemoryPressure):
1640         (JSC::ExecutablePool::systemAlloc):
1641         (JSC::ExecutablePool::systemRelease):
1642         * wtf/PageReservation.h:
1643         (WTF::PageReservation::PageReservation):
1644         (WTF::PageReservation::commit):
1645         (WTF::PageReservation::decommit):
1646         (WTF::PageReservation::committed):
1647
1648 2011-01-31  Sheriff Bot  <webkit.review.bot@gmail.com>
1649
1650         Unreviewed, rolling out r76969.
1651         http://trac.webkit.org/changeset/76969
1652         https://bugs.webkit.org/show_bug.cgi?id=53418
1653
1654         "It is causing crashes in GTK+ and Leopard bots" (Requested by
1655         alexg__ on #webkit).
1656
1657         * runtime/WeakGCMap.h:
1658
1659 2011-01-30  Csaba Osztrogonác  <ossy@webkit.org>
1660
1661         Unreviewed, rolling out r77098, r77099, r77100, r77109, and
1662         r77111.
1663         http://trac.webkit.org/changeset/77098
1664         http://trac.webkit.org/changeset/77099
1665         http://trac.webkit.org/changeset/77100
1666         http://trac.webkit.org/changeset/77109
1667         http://trac.webkit.org/changeset/77111
1668         https://bugs.webkit.org/show_bug.cgi?id=53219
1669
1670         Qt build is broken
1671
1672         * API/JSCallbackObject.h:
1673         (JSC::JSCallbackObjectData::setPrivateProperty):
1674         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
1675         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
1676         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
1677         (JSC::JSCallbackObject::setPrivateProperty):
1678         * API/JSCallbackObjectFunctions.h:
1679         (JSC::::put):
1680         (JSC::::staticFunctionGetter):
1681         * API/JSObjectRef.cpp:
1682         (JSObjectMakeConstructor):
1683         (JSObjectSetPrivateProperty):
1684         * API/JSWeakObjectMapRefInternal.h:
1685         * JavaScriptCore.exp:
1686         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1687         * JavaScriptCore.xcodeproj/project.pbxproj:
1688         * bytecode/CodeBlock.cpp:
1689         (JSC::CodeBlock::markAggregate):
1690         * bytecode/CodeBlock.h:
1691         (JSC::CodeBlock::globalObject):
1692         * bytecompiler/BytecodeGenerator.cpp:
1693         (JSC::BytecodeGenerator::BytecodeGenerator):
1694         (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
1695         (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
1696         (JSC::BytecodeGenerator::findScopedProperty):
1697         * debugger/Debugger.cpp:
1698         (JSC::evaluateInGlobalCallFrame):
1699         * debugger/DebuggerActivation.cpp:
1700         (JSC::DebuggerActivation::DebuggerActivation):
1701         (JSC::DebuggerActivation::markChildren):
1702         * debugger/DebuggerActivation.h:
1703         * debugger/DebuggerCallFrame.cpp:
1704         (JSC::DebuggerCallFrame::evaluate):
1705         * interpreter/CallFrame.h:
1706         (JSC::ExecState::exception):
1707         * interpreter/Interpreter.cpp:
1708         (JSC::Interpreter::resolve):
1709         (JSC::Interpreter::resolveSkip):
1710         (JSC::Interpreter::resolveGlobal):
1711         (JSC::Interpreter::resolveGlobalDynamic):
1712         (JSC::Interpreter::resolveBaseAndProperty):
1713         (JSC::Interpreter::unwindCallFrame):
1714         (JSC::appendSourceToError):
1715         (JSC::Interpreter::execute):
1716         (JSC::Interpreter::tryCacheGetByID):
1717         (JSC::Interpreter::privateExecute):
1718         * jit/JITStubs.cpp:
1719         (JSC::JITThunks::tryCacheGetByID):
1720         (JSC::DEFINE_STUB_FUNCTION):
1721         * jsc.cpp:
1722         (GlobalObject::GlobalObject):
1723         * runtime/ArgList.cpp:
1724         (JSC::MarkedArgumentBuffer::markLists):
1725         * runtime/Arguments.cpp:
1726         (JSC::Arguments::markChildren):
1727         (JSC::Arguments::getOwnPropertySlot):
1728         (JSC::Arguments::getOwnPropertyDescriptor):
1729         (JSC::Arguments::put):
1730         * runtime/Arguments.h:
1731         (JSC::Arguments::setActivation):
1732         (JSC::Arguments::Arguments):
1733         * runtime/ArrayConstructor.cpp:
1734         (JSC::ArrayConstructor::ArrayConstructor):
1735         (JSC::constructArrayWithSizeQuirk):
1736         * runtime/ArrayPrototype.cpp:
1737         (JSC::arrayProtoFuncSplice):
1738         * runtime/BatchedTransitionOptimizer.h:
1739         (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
1740         (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
1741         * runtime/BooleanConstructor.cpp:
1742         (JSC::BooleanConstructor::BooleanConstructor):
1743         (JSC::constructBoolean):
1744         (JSC::constructBooleanFromImmediateBoolean):
1745         * runtime/BooleanPrototype.cpp:
1746         (JSC::BooleanPrototype::BooleanPrototype):
1747         * runtime/ConservativeSet.cpp:
1748         (JSC::ConservativeSet::grow):
1749         * runtime/ConservativeSet.h:
1750         (JSC::ConservativeSet::~ConservativeSet):
1751         (JSC::ConservativeSet::mark):
1752         * runtime/DateConstructor.cpp:
1753         (JSC::DateConstructor::DateConstructor):
1754         * runtime/DateInstance.cpp:
1755         (JSC::DateInstance::DateInstance):
1756         * runtime/DatePrototype.cpp:
1757         (JSC::dateProtoFuncSetTime):
1758         (JSC::setNewValueFromTimeArgs):
1759         (JSC::setNewValueFromDateArgs):
1760         (JSC::dateProtoFuncSetYear):
1761         * runtime/ErrorConstructor.cpp:
1762         (JSC::ErrorConstructor::ErrorConstructor):
1763         * runtime/ErrorInstance.cpp:
1764         (JSC::ErrorInstance::ErrorInstance):
1765         * runtime/ErrorPrototype.cpp:
1766         (JSC::ErrorPrototype::ErrorPrototype):
1767         * runtime/FunctionConstructor.cpp:
1768         (JSC::FunctionConstructor::FunctionConstructor):
1769         * runtime/FunctionPrototype.cpp:
1770         (JSC::FunctionPrototype::FunctionPrototype):
1771         * runtime/GetterSetter.cpp:
1772         (JSC::GetterSetter::markChildren):
1773         * runtime/GetterSetter.h:
1774         (JSC::GetterSetter::GetterSetter):
1775         (JSC::GetterSetter::getter):
1776         (JSC::GetterSetter::setGetter):
1777         (JSC::GetterSetter::setter):
1778         (JSC::GetterSetter::setSetter):
1779         * runtime/GlobalEvalFunction.cpp:
1780         (JSC::GlobalEvalFunction::GlobalEvalFunction):
1781         (JSC::GlobalEvalFunction::markChildren):
1782         * runtime/GlobalEvalFunction.h:
1783         (JSC::GlobalEvalFunction::cachedGlobalObject):
1784         * runtime/Heap.cpp:
1785         (JSC::Heap::markProtectedObjects):
1786         (JSC::Heap::markTempSortVectors):
1787         (JSC::Heap::markRoots):
1788         * runtime/InternalFunction.cpp:
1789         (JSC::InternalFunction::InternalFunction):
1790         * runtime/JSAPIValueWrapper.h:
1791         (JSC::JSAPIValueWrapper::value):
1792         (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
1793         * runtime/JSActivation.cpp:
1794         (JSC::JSActivation::markChildren):
1795         (JSC::JSActivation::put):
1796         * runtime/JSArray.cpp:
1797         (JSC::JSArray::JSArray):
1798         (JSC::JSArray::getOwnPropertySlot):
1799         (JSC::JSArray::getOwnPropertyDescriptor):
1800         (JSC::JSArray::put):
1801         (JSC::JSArray::putSlowCase):
1802         (JSC::JSArray::deleteProperty):
1803         (JSC::JSArray::increaseVectorLength):
1804         (JSC::JSArray::setLength):
1805         (JSC::JSArray::pop):
1806         (JSC::JSArray::push):
1807         (JSC::JSArray::unshiftCount):
1808         (JSC::JSArray::sort):
1809         (JSC::JSArray::fillArgList):
1810         (JSC::JSArray::copyToRegisters):
1811         (JSC::JSArray::compactForSorting):
1812         * runtime/JSArray.h:
1813         (JSC::JSArray::getIndex):
1814         (JSC::JSArray::setIndex):
1815         (JSC::JSArray::uncheckedSetIndex):
1816         (JSC::JSArray::markChildrenDirect):
1817         * runtime/JSByteArray.cpp:
1818         (JSC::JSByteArray::JSByteArray):
1819         * runtime/JSCell.h:
1820         (JSC::JSCell::JSValue::toThisObject):
1821         (JSC::JSCell::MarkStack::append):
1822         * runtime/JSFunction.cpp:
1823         (JSC::JSFunction::JSFunction):
1824         (JSC::JSFunction::getOwnPropertySlot):
1825         * runtime/JSGlobalData.h:
1826         * runtime/JSGlobalObject.cpp:
1827         (JSC::markIfNeeded):
1828         (JSC::JSGlobalObject::reset):
1829         (JSC::JSGlobalObject::resetPrototype):
1830         (JSC::JSGlobalObject::markChildren):
1831         * runtime/JSGlobalObject.h:
1832         (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
1833         (JSC::JSGlobalObject::regExpConstructor):
1834         (JSC::JSGlobalObject::errorConstructor):
1835         (JSC::JSGlobalObject::evalErrorConstructor):
1836         (JSC::JSGlobalObject::rangeErrorConstructor):
1837         (JSC::JSGlobalObject::referenceErrorConstructor):
1838         (JSC::JSGlobalObject::syntaxErrorConstructor):
1839         (JSC::JSGlobalObject::typeErrorConstructor):
1840         (JSC::JSGlobalObject::URIErrorConstructor):
1841         (JSC::JSGlobalObject::evalFunction):
1842         (JSC::JSGlobalObject::objectPrototype):
1843         (JSC::JSGlobalObject::functionPrototype):
1844         (JSC::JSGlobalObject::arrayPrototype):
1845         (JSC::JSGlobalObject::booleanPrototype):
1846         (JSC::JSGlobalObject::stringPrototype):
1847         (JSC::JSGlobalObject::numberPrototype):
1848         (JSC::JSGlobalObject::datePrototype):
1849         (JSC::JSGlobalObject::regExpPrototype):
1850         (JSC::JSGlobalObject::methodCallDummy):
1851         (JSC::Structure::prototypeForLookup):
1852         (JSC::constructArray):
1853         * runtime/JSONObject.cpp:
1854         (JSC::Stringifier::Holder::object):
1855         (JSC::Stringifier::markAggregate):
1856         (JSC::Stringifier::stringify):
1857         (JSC::Stringifier::Holder::appendNextProperty):
1858         (JSC::Walker::callReviver):
1859         (JSC::Walker::walk):
1860         * runtime/JSObject.cpp:
1861         (JSC::JSObject::defineGetter):
1862         (JSC::JSObject::defineSetter):
1863         (JSC::JSObject::removeDirect):
1864         (JSC::JSObject::putDirectFunction):
1865         (JSC::JSObject::putDirectFunctionWithoutTransition):
1866         (JSC::putDescriptor):
1867         (JSC::JSObject::defineOwnProperty):
1868         * runtime/JSObject.h:
1869         (JSC::JSObject::getDirectOffset):
1870         (JSC::JSObject::putDirectOffset):
1871         (JSC::JSObject::flattenDictionaryObject):
1872         (JSC::JSObject::putDirectInternal):
1873         (JSC::JSObject::putDirect):
1874         (JSC::JSObject::putDirectFunction):
1875         (JSC::JSObject::putDirectWithoutTransition):
1876         (JSC::JSObject::putDirectFunctionWithoutTransition):
1877         (JSC::JSValue::putDirect):
1878         (JSC::JSObject::allocatePropertyStorageInline):
1879         (JSC::JSObject::markChildrenDirect):
1880         * runtime/JSPropertyNameIterator.cpp:
1881         (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
1882         (JSC::JSPropertyNameIterator::get):
1883         * runtime/JSPropertyNameIterator.h:
1884         * runtime/JSStaticScopeObject.cpp:
1885         (JSC::JSStaticScopeObject::markChildren):
1886         * runtime/JSString.cpp:
1887         (JSC::StringObject::create):
1888         * runtime/JSValue.h:
1889         * runtime/JSWrapperObject.cpp:
1890         (JSC::JSWrapperObject::markChildren):
1891         * runtime/JSWrapperObject.h:
1892         (JSC::JSWrapperObject::internalValue):
1893         (JSC::JSWrapperObject::setInternalValue):
1894         * runtime/LiteralParser.cpp:
1895         (JSC::LiteralParser::parse):
1896         * runtime/Lookup.cpp:
1897         (JSC::setUpStaticFunctionSlot):
1898         * runtime/Lookup.h:
1899         (JSC::lookupPut):
1900         * runtime/MarkStack.h:
1901         (JSC::MarkStack::appendValues):
1902         * runtime/MathObject.cpp:
1903         (JSC::MathObject::MathObject):
1904         * runtime/NativeErrorConstructor.cpp:
1905         (JSC::NativeErrorConstructor::NativeErrorConstructor):
1906         * runtime/NativeErrorPrototype.cpp:
1907         (JSC::NativeErrorPrototype::NativeErrorPrototype):
1908         * runtime/NumberConstructor.cpp:
1909         (JSC::NumberConstructor::NumberConstructor):
1910         (JSC::constructWithNumberConstructor):
1911         * runtime/NumberObject.cpp:
1912         (JSC::constructNumber):
1913         * runtime/NumberPrototype.cpp:
1914         (JSC::NumberPrototype::NumberPrototype):
1915         * runtime/ObjectConstructor.cpp:
1916         (JSC::ObjectConstructor::ObjectConstructor):
1917         (JSC::objectConstructorGetOwnPropertyDescriptor):
1918         * runtime/Operations.h:
1919         (JSC::normalizePrototypeChain):
1920         (JSC::resolveBase):
1921         * runtime/PrototypeFunction.cpp:
1922         (JSC::PrototypeFunction::PrototypeFunction):
1923         * runtime/PutPropertySlot.h:
1924         (JSC::PutPropertySlot::setExistingProperty):
1925         (JSC::PutPropertySlot::setNewProperty):
1926         (JSC::PutPropertySlot::base):
1927         * runtime/RegExpConstructor.cpp:
1928         (JSC::RegExpConstructor::RegExpConstructor):
1929         * runtime/ScopeChain.cpp:
1930         (JSC::ScopeChainNode::print):
1931         * runtime/ScopeChain.h:
1932         (JSC::ScopeChainNode::~ScopeChainNode):
1933         (JSC::ScopeChainIterator::operator*):
1934         (JSC::ScopeChainIterator::operator->):
1935         (JSC::ScopeChain::top):
1936         * runtime/ScopeChainMark.h:
1937         (JSC::ScopeChain::markAggregate):
1938         * runtime/SmallStrings.cpp:
1939         (JSC::isMarked):
1940         (JSC::SmallStrings::markChildren):
1941         * runtime/SmallStrings.h:
1942         (JSC::SmallStrings::emptyString):
1943         (JSC::SmallStrings::singleCharacterString):
1944         (JSC::SmallStrings::singleCharacterStrings):
1945         * runtime/StringConstructor.cpp:
1946         (JSC::StringConstructor::StringConstructor):
1947         * runtime/StringObject.cpp:
1948         (JSC::StringObject::StringObject):
1949         * runtime/StringObject.h:
1950         * runtime/StringPrototype.cpp:
1951         (JSC::StringPrototype::StringPrototype):
1952         * runtime/Structure.cpp:
1953         (JSC::Structure::Structure):
1954         (JSC::Structure::addPropertyTransition):
1955         (JSC::Structure::toDictionaryTransition):
1956         (JSC::Structure::flattenDictionaryStructure):
1957         * runtime/Structure.h:
1958         (JSC::Structure::storedPrototype):
1959         * runtime/WeakGCMap.h:
1960         (JSC::WeakGCMap::uncheckedGet):
1961         (JSC::WeakGCMap::isValid):
1962         (JSC::::get):
1963         (JSC::::take):
1964         (JSC::::set):
1965         (JSC::::uncheckedRemove):
1966         * runtime/WriteBarrier.h: Removed.
1967
1968 2011-01-30  Simon Fraser  <simon.fraser@apple.com>
1969
1970         Build fix the build fix. I assume Oliver meant m_cell, not m_value.
1971
1972         * runtime/WriteBarrier.h:
1973         (JSC::WriteBarrierBase::clear):
1974
1975 2011-01-30  Oliver Hunt  <oliver@apple.com>
1976
1977         More Qt build fixes
1978
1979         * runtime/WriteBarrier.h:
1980         (JSC::WriteBarrierBase::clear):
1981
1982 2011-01-30  Oliver Hunt  <oliver@apple.com>
1983
1984         Convert markstack to a slot visitor API
1985         https://bugs.webkit.org/show_bug.cgi?id=53219
1986
1987         rolling r77006 and r77020 back in.
1988
1989         * API/JSCallbackObject.h:
1990         (JSC::JSCallbackObjectData::setPrivateProperty):
1991         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
1992         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
1993         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
1994         (JSC::JSCallbackObject::setPrivateProperty):
1995         * API/JSCallbackObjectFunctions.h:
1996         (JSC::::put):
1997         (JSC::::staticFunctionGetter):
1998         * API/JSObjectRef.cpp:
1999         (JSObjectMakeConstructor):
2000         (JSObjectSetPrivateProperty):
2001         * API/JSWeakObjectMapRefInternal.h:
2002         * JavaScriptCore.exp:
2003         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2004         * JavaScriptCore.xcodeproj/project.pbxproj:
2005         * bytecode/CodeBlock.cpp:
2006         (JSC::CodeBlock::markAggregate):
2007         * bytecode/CodeBlock.h:
2008         (JSC::CodeBlock::globalObject):
2009         * bytecompiler/BytecodeGenerator.cpp:
2010         (JSC::BytecodeGenerator::BytecodeGenerator):
2011         (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
2012         (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
2013         (JSC::BytecodeGenerator::findScopedProperty):
2014         * debugger/Debugger.cpp:
2015         (JSC::evaluateInGlobalCallFrame):
2016         * debugger/DebuggerActivation.cpp:
2017         (JSC::DebuggerActivation::DebuggerActivation):
2018         (JSC::DebuggerActivation::markChildren):
2019         * debugger/DebuggerActivation.h:
2020         * debugger/DebuggerCallFrame.cpp:
2021         (JSC::DebuggerCallFrame::evaluate):
2022         * interpreter/CallFrame.h:
2023         (JSC::ExecState::exception):
2024         * interpreter/Interpreter.cpp:
2025         (JSC::Interpreter::resolve):
2026         (JSC::Interpreter::resolveSkip):
2027         (JSC::Interpreter::resolveGlobal):
2028         (JSC::Interpreter::resolveGlobalDynamic):
2029         (JSC::Interpreter::resolveBaseAndProperty):
2030         (JSC::Interpreter::unwindCallFrame):
2031         (JSC::appendSourceToError):
2032         (JSC::Interpreter::execute):
2033         (JSC::Interpreter::tryCacheGetByID):
2034         (JSC::Interpreter::privateExecute):
2035         * jit/JITStubs.cpp:
2036         (JSC::JITThunks::tryCacheGetByID):
2037         (JSC::DEFINE_STUB_FUNCTION):
2038         * jsc.cpp:
2039         (GlobalObject::GlobalObject):
2040         * runtime/ArgList.cpp:
2041         (JSC::MarkedArgumentBuffer::markLists):
2042         * runtime/Arguments.cpp:
2043         (JSC::Arguments::markChildren):
2044         (JSC::Arguments::getOwnPropertySlot):
2045         (JSC::Arguments::getOwnPropertyDescriptor):
2046         (JSC::Arguments::put):
2047         * runtime/Arguments.h:
2048         (JSC::Arguments::setActivation):
2049         (JSC::Arguments::Arguments):
2050         * runtime/ArrayConstructor.cpp:
2051         (JSC::ArrayConstructor::ArrayConstructor):
2052         (JSC::constructArrayWithSizeQuirk):
2053         * runtime/ArrayPrototype.cpp:
2054         (JSC::arrayProtoFuncSplice):
2055         * runtime/BatchedTransitionOptimizer.h:
2056         (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
2057         (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
2058         * runtime/BooleanConstructor.cpp:
2059         (JSC::BooleanConstructor::BooleanConstructor):
2060         (JSC::constructBoolean):
2061         (JSC::constructBooleanFromImmediateBoolean):
2062         * runtime/BooleanPrototype.cpp:
2063         (JSC::BooleanPrototype::BooleanPrototype):
2064         * runtime/ConservativeSet.cpp:
2065         (JSC::ConservativeSet::grow):
2066         * runtime/ConservativeSet.h:
2067         (JSC::ConservativeSet::~ConservativeSet):
2068         (JSC::ConservativeSet::mark):
2069         * runtime/DateConstructor.cpp:
2070         (JSC::DateConstructor::DateConstructor):
2071         * runtime/DateInstance.cpp:
2072         (JSC::DateInstance::DateInstance):
2073         * runtime/DatePrototype.cpp:
2074         (JSC::dateProtoFuncSetTime):
2075         (JSC::setNewValueFromTimeArgs):
2076         (JSC::setNewValueFromDateArgs):
2077         (JSC::dateProtoFuncSetYear):
2078         * runtime/ErrorConstructor.cpp:
2079         (JSC::ErrorConstructor::ErrorConstructor):
2080         * runtime/ErrorInstance.cpp:
2081         (JSC::ErrorInstance::ErrorInstance):
2082         * runtime/ErrorPrototype.cpp:
2083         (JSC::ErrorPrototype::ErrorPrototype):
2084         * runtime/FunctionConstructor.cpp:
2085         (JSC::FunctionConstructor::FunctionConstructor):
2086         * runtime/FunctionPrototype.cpp:
2087         (JSC::FunctionPrototype::FunctionPrototype):
2088         * runtime/GetterSetter.cpp:
2089         (JSC::GetterSetter::markChildren):
2090         * runtime/GetterSetter.h:
2091         (JSC::GetterSetter::GetterSetter):
2092         (JSC::GetterSetter::getter):
2093         (JSC::GetterSetter::setGetter):
2094         (JSC::GetterSetter::setter):
2095         (JSC::GetterSetter::setSetter):
2096         * runtime/GlobalEvalFunction.cpp:
2097         (JSC::GlobalEvalFunction::GlobalEvalFunction):
2098         (JSC::GlobalEvalFunction::markChildren):
2099         * runtime/GlobalEvalFunction.h:
2100         (JSC::GlobalEvalFunction::cachedGlobalObject):
2101         * runtime/Heap.cpp:
2102         (JSC::Heap::markProtectedObjects):
2103         (JSC::Heap::markTempSortVectors):
2104         (JSC::Heap::markRoots):
2105         * runtime/InternalFunction.cpp:
2106         (JSC::InternalFunction::InternalFunction):
2107         * runtime/JSAPIValueWrapper.h:
2108         (JSC::JSAPIValueWrapper::value):
2109         (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
2110         * runtime/JSActivation.cpp:
2111         (JSC::JSActivation::markChildren):
2112         (JSC::JSActivation::put):
2113         * runtime/JSArray.cpp:
2114         (JSC::JSArray::JSArray):
2115         (JSC::JSArray::getOwnPropertySlot):
2116         (JSC::JSArray::getOwnPropertyDescriptor):
2117         (JSC::JSArray::put):
2118         (JSC::JSArray::putSlowCase):
2119         (JSC::JSArray::deleteProperty):
2120         (JSC::JSArray::increaseVectorLength):
2121         (JSC::JSArray::setLength):
2122         (JSC::JSArray::pop):
2123         (JSC::JSArray::push):
2124         (JSC::JSArray::unshiftCount):
2125         (JSC::JSArray::sort):
2126         (JSC::JSArray::fillArgList):
2127         (JSC::JSArray::copyToRegisters):
2128         (JSC::JSArray::compactForSorting):
2129         * runtime/JSArray.h:
2130         (JSC::JSArray::getIndex):
2131         (JSC::JSArray::setIndex):
2132         (JSC::JSArray::uncheckedSetIndex):
2133         (JSC::JSArray::markChildrenDirect):
2134         * runtime/JSByteArray.cpp:
2135         (JSC::JSByteArray::JSByteArray):
2136         * runtime/JSCell.h:
2137         (JSC::JSCell::MarkStack::append):
2138         (JSC::JSCell::MarkStack::internalAppend):
2139         (JSC::JSCell::MarkStack::deprecatedAppend):
2140         * runtime/JSFunction.cpp:
2141         (JSC::JSFunction::JSFunction):
2142         (JSC::JSFunction::getOwnPropertySlot):
2143         * runtime/JSGlobalData.h:
2144         * runtime/JSGlobalObject.cpp:
2145         (JSC::markIfNeeded):
2146         (JSC::JSGlobalObject::reset):
2147         (JSC::JSGlobalObject::resetPrototype):
2148         (JSC::JSGlobalObject::markChildren):
2149         * runtime/JSGlobalObject.h:
2150         (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
2151         (JSC::JSGlobalObject::regExpConstructor):
2152         (JSC::JSGlobalObject::errorConstructor):
2153         (JSC::JSGlobalObject::evalErrorConstructor):
2154         (JSC::JSGlobalObject::rangeErrorConstructor):
2155         (JSC::JSGlobalObject::referenceErrorConstructor):
2156         (JSC::JSGlobalObject::syntaxErrorConstructor):
2157         (JSC::JSGlobalObject::typeErrorConstructor):
2158         (JSC::JSGlobalObject::URIErrorConstructor):
2159         (JSC::JSGlobalObject::evalFunction):
2160         (JSC::JSGlobalObject::objectPrototype):
2161         (JSC::JSGlobalObject::functionPrototype):
2162         (JSC::JSGlobalObject::arrayPrototype):
2163         (JSC::JSGlobalObject::booleanPrototype):
2164         (JSC::JSGlobalObject::stringPrototype):
2165         (JSC::JSGlobalObject::numberPrototype):
2166         (JSC::JSGlobalObject::datePrototype):
2167         (JSC::JSGlobalObject::regExpPrototype):
2168         (JSC::JSGlobalObject::methodCallDummy):
2169         (JSC::Structure::prototypeForLookup):
2170         (JSC::constructArray):
2171         * runtime/JSONObject.cpp:
2172         (JSC::Stringifier::Holder::object):
2173         (JSC::Stringifier::Holder::objectSlot):
2174         (JSC::Stringifier::markAggregate):
2175         (JSC::Stringifier::stringify):
2176         (JSC::Stringifier::Holder::appendNextProperty):
2177         (JSC::Walker::callReviver):
2178         (JSC::Walker::walk):
2179         * runtime/JSObject.cpp:
2180         (JSC::JSObject::defineGetter):
2181         (JSC::JSObject::defineSetter):
2182         (JSC::JSObject::removeDirect):
2183         (JSC::JSObject::putDirectFunction):
2184         (JSC::JSObject::putDirectFunctionWithoutTransition):
2185         (JSC::putDescriptor):
2186         (JSC::JSObject::defineOwnProperty):
2187         * runtime/JSObject.h:
2188         (JSC::JSObject::getDirectOffset):
2189         (JSC::JSObject::putDirectOffset):
2190         (JSC::JSObject::putUndefinedAtDirectOffset):
2191         (JSC::JSObject::flattenDictionaryObject):
2192         (JSC::JSObject::putDirectInternal):
2193         (JSC::JSObject::putDirect):
2194         (JSC::JSObject::putDirectFunction):
2195         (JSC::JSObject::putDirectWithoutTransition):
2196         (JSC::JSObject::putDirectFunctionWithoutTransition):
2197         (JSC::JSValue::putDirect):
2198         (JSC::JSObject::allocatePropertyStorageInline):
2199         (JSC::JSObject::markChildrenDirect):
2200         * runtime/JSPropertyNameIterator.cpp:
2201         (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
2202         (JSC::JSPropertyNameIterator::get):
2203         * runtime/JSPropertyNameIterator.h:
2204         * runtime/JSStaticScopeObject.cpp:
2205         (JSC::JSStaticScopeObject::markChildren):
2206         * runtime/JSString.cpp:
2207         (JSC::StringObject::create):
2208         * runtime/JSValue.h:
2209         * runtime/JSWrapperObject.cpp:
2210         (JSC::JSWrapperObject::markChildren):
2211         * runtime/JSWrapperObject.h:
2212         (JSC::JSWrapperObject::internalValue):
2213         (JSC::JSWrapperObject::setInternalValue):
2214         * runtime/LiteralParser.cpp:
2215         (JSC::LiteralParser::parse):
2216         * runtime/Lookup.cpp:
2217         (JSC::setUpStaticFunctionSlot):
2218         * runtime/Lookup.h:
2219         (JSC::lookupPut):
2220         * runtime/MarkStack.h:
2221         (JSC::MarkStack::MarkStack):
2222         (JSC::MarkStack::deprecatedAppendValues):
2223         (JSC::MarkStack::appendValues):
2224         * runtime/MathObject.cpp:
2225         (JSC::MathObject::MathObject):
2226         * runtime/NativeErrorConstructor.cpp:
2227         (JSC::NativeErrorConstructor::NativeErrorConstructor):
2228         * runtime/NativeErrorPrototype.cpp:
2229         (JSC::NativeErrorPrototype::NativeErrorPrototype):
2230         * runtime/NumberConstructor.cpp:
2231         (JSC::NumberConstructor::NumberConstructor):
2232         (JSC::constructWithNumberConstructor):
2233         * runtime/NumberObject.cpp:
2234         (JSC::constructNumber):
2235         * runtime/NumberPrototype.cpp:
2236         (JSC::NumberPrototype::NumberPrototype):
2237         * runtime/ObjectConstructor.cpp:
2238         (JSC::ObjectConstructor::ObjectConstructor):
2239         (JSC::objectConstructorGetOwnPropertyDescriptor):
2240         * runtime/Operations.h:
2241         (JSC::normalizePrototypeChain):
2242         (JSC::resolveBase):
2243         * runtime/PrototypeFunction.cpp:
2244         (JSC::PrototypeFunction::PrototypeFunction):
2245         * runtime/PutPropertySlot.h:
2246         (JSC::PutPropertySlot::setExistingProperty):
2247         (JSC::PutPropertySlot::setNewProperty):
2248         (JSC::PutPropertySlot::base):
2249         * runtime/RegExpConstructor.cpp:
2250         (JSC::RegExpConstructor::RegExpConstructor):
2251         * runtime/ScopeChain.cpp:
2252         (JSC::ScopeChainNode::print):
2253         * runtime/ScopeChain.h:
2254         (JSC::ScopeChainNode::~ScopeChainNode):
2255         (JSC::ScopeChainIterator::operator*):
2256         (JSC::ScopeChainIterator::operator->):
2257         (JSC::ScopeChain::top):
2258         * runtime/ScopeChainMark.h:
2259         (JSC::ScopeChain::markAggregate):
2260         * runtime/SmallStrings.cpp:
2261         (JSC::isMarked):
2262         (JSC::SmallStrings::markChildren):
2263         * runtime/SmallStrings.h:
2264         (JSC::SmallStrings::emptyString):
2265         (JSC::SmallStrings::singleCharacterString):
2266         (JSC::SmallStrings::singleCharacterStrings):
2267         * runtime/StringConstructor.cpp:
2268         (JSC::StringConstructor::StringConstructor):
2269         * runtime/StringObject.cpp:
2270         (JSC::StringObject::StringObject):
2271         * runtime/StringObject.h:
2272         * runtime/StringPrototype.cpp:
2273         (JSC::StringPrototype::StringPrototype):
2274         * runtime/Structure.cpp:
2275         (JSC::Structure::Structure):
2276         (JSC::Structure::addPropertyTransition):
2277         (JSC::Structure::toDictionaryTransition):
2278         (JSC::Structure::flattenDictionaryStructure):
2279         * runtime/Structure.h:
2280         (JSC::Structure::storedPrototype):
2281         (JSC::Structure::storedPrototypeSlot):
2282         * runtime/WeakGCMap.h:
2283         (JSC::WeakGCMap::uncheckedGet):
2284         (JSC::WeakGCMap::uncheckedGetSlot):
2285         (JSC::WeakGCMap::isValid):
2286         (JSC::::get):
2287         (JSC::::take):
2288         (JSC::::set):
2289         (JSC::::uncheckedRemove):
2290         * runtime/WriteBarrier.h: Added.
2291         (JSC::DeprecatedPtr::DeprecatedPtr):
2292         (JSC::DeprecatedPtr::get):
2293         (JSC::DeprecatedPtr::operator*):
2294         (JSC::DeprecatedPtr::operator->):
2295         (JSC::DeprecatedPtr::slot):
2296         (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
2297         (JSC::DeprecatedPtr::operator!):
2298         (JSC::WriteBarrierBase::set):
2299         (JSC::WriteBarrierBase::get):
2300         (JSC::WriteBarrierBase::operator*):
2301         (JSC::WriteBarrierBase::operator->):
2302         (JSC::WriteBarrierBase::slot):
2303         (JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
2304         (JSC::WriteBarrierBase::operator!):
2305         (JSC::WriteBarrier::WriteBarrier):
2306         (JSC::operator==):
2307
2308 2011-01-30  Geoffrey Garen  <ggaren@apple.com>
2309
2310         Reviewed by Oliver Hunt.
2311
2312         Filter all Heap collection through a common reset function, in
2313         preparation for adding features triggered by collection.
2314         https://bugs.webkit.org/show_bug.cgi?id=53396
2315         
2316         SunSpider reports no change.
2317
2318         * runtime/Heap.cpp:
2319         (JSC::Heap::reportExtraMemoryCostSlowCase): When we're over the extraCost
2320         limit, just call collectAllGarbage() instead of rolling our own special
2321         way of resetting the heap. In theory, this may be slower in some cases,
2322         but it also fixes cases of pathological heap growth that we've seen,
2323         where the only objects being allocated are temporary and huge
2324         (<rdar://problem/8885843>).
2325
2326         (JSC::Heap::allocate):
2327         (JSC::Heap::collectAllGarbage): Use the shared reset function.
2328
2329         (JSC::Heap::reset):
2330         * runtime/Heap.h: Carved a new shared reset function out of the old
2331         collectAllGarbage.
2332
2333 2011-01-30  Sheriff Bot  <webkit.review.bot@gmail.com>
2334
2335         Unreviewed, rolling out r77025.
2336         http://trac.webkit.org/changeset/77025
2337         https://bugs.webkit.org/show_bug.cgi?id=53401
2338
2339         It made js1_5/Regress/regress-159334.js fail on 64 bit Linux
2340         (Requested by Ossy on #webkit).
2341
2342         * jit/ExecutableAllocatorFixedVMPool.cpp:
2343         (JSC::FreeListEntry::FreeListEntry):
2344         (JSC::AVLTreeAbstractorForFreeList::get_less):
2345         (JSC::AVLTreeAbstractorForFreeList::set_less):
2346         (JSC::AVLTreeAbstractorForFreeList::get_greater):
2347         (JSC::AVLTreeAbstractorForFreeList::set_greater):
2348         (JSC::AVLTreeAbstractorForFreeList::get_balance_factor):
2349         (JSC::AVLTreeAbstractorForFreeList::set_balance_factor):
2350         (JSC::AVLTreeAbstractorForFreeList::null):
2351         (JSC::AVLTreeAbstractorForFreeList::compare_key_key):
2352         (JSC::AVLTreeAbstractorForFreeList::compare_key_node):
2353         (JSC::AVLTreeAbstractorForFreeList::compare_node_node):
2354         (JSC::reverseSortFreeListEntriesByPointer):
2355         (JSC::reverseSortCommonSizedAllocations):
2356         (JSC::FixedVMPoolAllocator::release):
2357         (JSC::FixedVMPoolAllocator::reuse):
2358         (JSC::FixedVMPoolAllocator::addToFreeList):
2359         (JSC::FixedVMPoolAllocator::coalesceFreeSpace):
2360         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
2361         (JSC::FixedVMPoolAllocator::alloc):
2362         (JSC::FixedVMPoolAllocator::free):
2363         (JSC::FixedVMPoolAllocator::isValid):
2364         (JSC::FixedVMPoolAllocator::allocInternal):
2365         (JSC::FixedVMPoolAllocator::isWithinVMPool):
2366         (JSC::FixedVMPoolAllocator::addToCommittedByteCount):
2367         (JSC::ExecutableAllocator::committedByteCount):
2368         (JSC::maybeModifyVMPoolSize):
2369         (JSC::ExecutableAllocator::isValid):
2370         (JSC::ExecutableAllocator::underMemoryPressure):
2371         (JSC::ExecutablePool::systemAlloc):
2372         (JSC::ExecutablePool::systemRelease):
2373         * wtf/PageReservation.h:
2374         (WTF::PageReservation::PageReservation):
2375         (WTF::PageReservation::commit):
2376         (WTF::PageReservation::decommit):
2377
2378 2011-01-30  Leo Yang  <leo.yang@torchmobile.com.cn>
2379
2380         Reviewed by Daniel Bates.
2381
2382         Code style issue in JavaScriptCore/wtf/CurrentTime.h
2383         https://bugs.webkit.org/show_bug.cgi?id=53394
2384
2385         According to rule #3 at http://webkit.org/coding/coding-style.html,
2386         This patch fix style issue in CurrentTime.h.
2387
2388         No functionality change, no new tests.
2389
2390         * wtf/CurrentTime.h:
2391         (WTF::currentTimeMS):
2392         (WTF::getLocalTime):
2393
2394 2011-01-30  Benjamin Poulain  <ikipou@gmail.com>
2395
2396         Reviewed by Kenneth Rohde Christiansen.
2397
2398         [Qt] JavaScriptCore does not link on Mac if building WebKit 2
2399         https://bugs.webkit.org/show_bug.cgi?id=53377
2400
2401         The option "-whole-archive" is not availabe with the libtool of Mac OS X,
2402         instead, we can use "-all_load" on Mac.
2403
2404         * JavaScriptCore.pri:
2405
2406 2011-01-29  Geoffrey Garen  <ggaren@apple.com>
2407
2408         Sorry Leopard bot -- I committed a change by accident.
2409
2410         * JavaScriptCore.exp: You may have your symbols back now.
2411
2412 2011-01-29  Geoffrey Garen  <ggaren@apple.com>
2413
2414         Reviewed by Cameron Zwarich.
2415
2416         Simplified Heap iteration
2417         https://bugs.webkit.org/show_bug.cgi?id=53393
2418
2419         * runtime/CollectorHeapIterator.h:
2420         (JSC::CollectorHeapIterator::isValid):
2421         (JSC::CollectorHeapIterator::isLive):
2422         (JSC::CollectorHeapIterator::advance): Removed "max" argument to
2423         advance because it's a constant.
2424         (JSC::LiveObjectIterator::LiveObjectIterator):
2425         (JSC::LiveObjectIterator::operator++):
2426         (JSC::DeadObjectIterator::DeadObjectIterator):
2427         (JSC::DeadObjectIterator::operator++):
2428         (JSC::ObjectIterator::ObjectIterator):
2429         (JSC::ObjectIterator::operator++): Factored out common checks into
2430         two helper functions -- isValid() for "Am I past the end?" and isLive()
2431         for "Is the cell I'm pointing to live?".
2432
2433         * runtime/MarkedSpace.cpp:
2434         (JSC::MarkedSpace::freeBlock):
2435         (JSC::MarkedSpace::sweep): Always sweep from the beginning of the heap
2436         to the end, to avoid making sweep subtly reliant on internal Heap state.
2437         (JSC::MarkedSpace::primaryHeapBegin):
2438         (JSC::MarkedSpace::primaryHeapEnd): Always be explicit about where
2439         iteration begins.
2440
2441 2011-01-29  Geoffrey Garen  <ggaren@apple.com>
2442
2443         Reviewed by Cameron Zwarich.
2444
2445         Simplified heap destruction
2446         https://bugs.webkit.org/show_bug.cgi?id=53392
2447
2448         * JavaScriptCore.exp:
2449         * runtime/Heap.cpp:
2450         (JSC::Heap::destroy):
2451         * runtime/Heap.h:
2452         * runtime/MarkedSpace.cpp:
2453         (JSC::MarkedSpace::destroy):
2454         * runtime/MarkedSpace.h: Don't go out of our way to destroy GC-protected
2455         cells last -- the difficult contortions required to do so just don't seem
2456         justified. We make no guarantees about GC protection after the client
2457         throws away JSGlobalData, and it doesn't seem like any meaningful
2458         guarantee is even possible.
2459
2460 2011-01-29  Geoffrey Garen  <ggaren@apple.com>
2461
2462         Reviewed by Maciej Stachowiak.
2463
2464         Switched heap to use the Bitmap class and removed CollectorBitmap
2465         https://bugs.webkit.org/show_bug.cgi?id=53391
2466         
2467         SunSpider says 1.005x as fast. Seems like a fluke.
2468
2469         * runtime/MarkedSpace.cpp:
2470         (JSC::MarkedSpace::allocate): Updated for rename and returning a value
2471         rather than taking a value by reference.
2472
2473         * runtime/MarkedSpace.h: Code reuse is good.
2474
2475         * wtf/Bitmap.h:
2476         (WTF::::testAndSet): Added, since this is the one thing Bitmap was missing
2477         which CollectorBitmap had. (Renamed from the less conventional "getset".)
2478
2479         (WTF::::nextPossiblyUnset): Renamed and changed to return a value for
2480         clarity. It's all the same with inlining.
2481
2482 2011-01-28  Geoffrey Garen  <ggaren@apple.com>
2483
2484         Reviewed by Maciej Stachowiak.
2485
2486         Some more Heap cleanup.
2487         https://bugs.webkit.org/show_bug.cgi?id=53357
2488         
2489         * JavaScriptCore.exp:
2490         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated exported symbols.
2491
2492         * runtime/Heap.cpp:
2493         (JSC::Heap::reportExtraMemoryCostSlowCase): Renamed recordExtraCost to 
2494         reportExtraMemoryCostSlowCase to match our naming conventions.
2495
2496         (JSC::Heap::capacity): Renamed size to capacity because this function
2497         returns the capacity of the heap, including unused portions.
2498
2499         * runtime/Heap.h:
2500         (JSC::Heap::globalData):
2501         (JSC::Heap::markedSpace):
2502         (JSC::Heap::machineStackMarker):
2503         (JSC::Heap::reportExtraMemoryCost): Moved statics to the top of the file.
2504         Moved ctor and dtor to the beginning of the class definition. Grouped
2505         functions by purpose.
2506
2507         * runtime/MarkedSpace.cpp:
2508         (JSC::MarkedSpace::capacity): Renamed size to capacity because this
2509         function returns the capacity of the heap, including unused portions.
2510
2511         * runtime/MarkedSpace.h: Removed statistics and the Statistics class because
2512         the same information can be gotten just by calling size() and capacity().
2513
2514         * runtime/MemoryStatistics.cpp:
2515         * runtime/MemoryStatistics.h: Ditto.
2516
2517 2011-01-29  Daniel Bates  <dbates@rim.com>
2518
2519         Reviewed by Eric Seidel.
2520
2521         Move wince/mt19937ar.c to ThirdParty and make it a policy choice
2522         https://bugs.webkit.org/show_bug.cgi?id=53253
2523
2524         Make inclusion of MT19937 a policy decision.
2525
2526         Currently, we hardcoded to  use MT19937 when building for
2527         Windows CE. Instead, we should make this a policy decision
2528         with the Windows CE port using this by default.
2529
2530         * JavaScriptCore.pri: Append Source/ThirdParty to the end
2531         of the list include directories.
2532         * wtf/CMakeLists.txt: Ditto.
2533         * wtf/Platform.h: Defined WTF_USE_MERSENNE_TWISTER_19937 when
2534         building for Windows CE.
2535         * wtf/RandomNumber.cpp:
2536         (WTF::randomNumber): Substituted USE(MERSENNE_TWISTER_19937) for OS(WINCE).
2537
2538 2011-01-29  Cameron Zwarich  <zwarich@apple.com>
2539
2540         Reviewed by David Kilzer.
2541
2542         Bug 53374 - Remove uses of unsafe string functions in debugging code
2543         https://bugs.webkit.org/show_bug.cgi?id=53374
2544
2545         * runtime/RegExp.cpp:
2546         (JSC::RegExp::printTraceData):
2547
2548 2011-01-29  Cameron Zwarich  <zwarich@apple.com>
2549
2550         Reviewed by Oliver Hunt.
2551
2552         JavaScriptCoreUseJIT environment variable broken
2553         https://bugs.webkit.org/show_bug.cgi?id=53372
2554
2555         * runtime/JSGlobalData.cpp:
2556         (JSC::JSGlobalData::JSGlobalData): Check the actual value in the string returned
2557         by getenv() rather than just doing a NULL check on the return value.
2558
2559 2011-01-29  Patrick Gansterer  <paroga@webkit.org>
2560
2561         Reviewed by David Kilzer.
2562
2563         Move CharacterNames.h into WTF directory
2564         https://bugs.webkit.org/show_bug.cgi?id=49618
2565
2566         * GNUmakefile.am:
2567         * JavaScriptCore.gypi:
2568         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2569         * JavaScriptCore.xcodeproj/project.pbxproj:
2570         * wtf/CMakeLists.txt:
2571         * wtf/unicode/CharacterNames.h: Renamed from WebCore/platform/text/CharacterNames.h.
2572         * wtf/unicode/UTF8.cpp:
2573
2574 2011-01-28  Simon Fraser  <simon.fraser@apple.com>
2575
2576         Reviewed by Gavin Barraclough.
2577
2578         Add various clampToInt() methods to MathExtras.h
2579         https://bugs.webkit.org/show_bug.cgi?id=52910
2580         
2581         Add functions for clamping doubles and floats to valid int
2582         ranges, for signed and positive integers.
2583
2584         * wtf/MathExtras.h:
2585         (clampToInteger):
2586         (clampToPositiveInteger):
2587
2588 2011-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
2589
2590         Unreviewed, rolling out r77006 and r77020.
2591         http://trac.webkit.org/changeset/77006
2592         http://trac.webkit.org/changeset/77020
2593         https://bugs.webkit.org/show_bug.cgi?id=53360
2594
2595         "Broke Windows tests" (Requested by rniwa on #webkit).
2596
2597         * API/JSCallbackObject.h:
2598         (JSC::JSCallbackObjectData::setPrivateProperty):
2599         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
2600         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
2601         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
2602         (JSC::JSCallbackObject::setPrivateProperty):
2603         * API/JSCallbackObjectFunctions.h:
2604         (JSC::::put):
2605         (JSC::::staticFunctionGetter):
2606         * API/JSObjectRef.cpp:
2607         (JSObjectMakeConstructor):
2608         (JSObjectSetPrivateProperty):
2609         * API/JSWeakObjectMapRefInternal.h:
2610         * JavaScriptCore.exp:
2611         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2612         * JavaScriptCore.xcodeproj/project.pbxproj:
2613         * bytecode/CodeBlock.cpp:
2614         (JSC::CodeBlock::markAggregate):
2615         * bytecode/CodeBlock.h:
2616         (JSC::CodeBlock::globalObject):
2617         * bytecompiler/BytecodeGenerator.cpp:
2618         (JSC::BytecodeGenerator::BytecodeGenerator):
2619         (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
2620         (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
2621         (JSC::BytecodeGenerator::findScopedProperty):
2622         * debugger/Debugger.cpp:
2623         (JSC::evaluateInGlobalCallFrame):
2624         * debugger/DebuggerActivation.cpp:
2625         (JSC::DebuggerActivation::DebuggerActivation):
2626         (JSC::DebuggerActivation::markChildren):
2627         * debugger/DebuggerActivation.h:
2628         * debugger/DebuggerCallFrame.cpp:
2629         (JSC::DebuggerCallFrame::evaluate):
2630         * interpreter/CallFrame.h:
2631         (JSC::ExecState::exception):
2632         * interpreter/Interpreter.cpp:
2633         (JSC::Interpreter::resolve):
2634         (JSC::Interpreter::resolveSkip):
2635         (JSC::Interpreter::resolveGlobal):
2636         (JSC::Interpreter::resolveGlobalDynamic):
2637         (JSC::Interpreter::resolveBaseAndProperty):
2638         (JSC::Interpreter::unwindCallFrame):
2639         (JSC::appendSourceToError):
2640         (JSC::Interpreter::execute):
2641         (JSC::Interpreter::tryCacheGetByID):
2642         (JSC::Interpreter::privateExecute):
2643         * jit/JITStubs.cpp:
2644         (JSC::JITThunks::tryCacheGetByID):
2645         (JSC::DEFINE_STUB_FUNCTION):
2646         * jsc.cpp:
2647         (GlobalObject::GlobalObject):
2648         * runtime/ArgList.cpp:
2649         (JSC::MarkedArgumentBuffer::markLists):
2650         * runtime/Arguments.cpp:
2651         (JSC::Arguments::markChildren):
2652         (JSC::Arguments::getOwnPropertySlot):
2653         (JSC::Arguments::getOwnPropertyDescriptor):
2654         (JSC::Arguments::put):
2655         * runtime/Arguments.h:
2656         (JSC::Arguments::setActivation):
2657         (JSC::Arguments::Arguments):
2658         * runtime/ArrayConstructor.cpp:
2659         (JSC::ArrayConstructor::ArrayConstructor):
2660         (JSC::constructArrayWithSizeQuirk):
2661         * runtime/ArrayPrototype.cpp:
2662         (JSC::arrayProtoFuncSplice):
2663         * runtime/BatchedTransitionOptimizer.h:
2664         (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
2665         (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
2666         * runtime/BooleanConstructor.cpp:
2667         (JSC::BooleanConstructor::BooleanConstructor):
2668         (JSC::constructBoolean):
2669         (JSC::constructBooleanFromImmediateBoolean):
2670         * runtime/BooleanPrototype.cpp:
2671         (JSC::BooleanPrototype::BooleanPrototype):
2672         * runtime/ConservativeSet.cpp:
2673         (JSC::ConservativeSet::grow):
2674         * runtime/ConservativeSet.h:
2675         (JSC::ConservativeSet::~ConservativeSet):
2676         (JSC::ConservativeSet::mark):
2677         * runtime/DateConstructor.cpp:
2678         (JSC::DateConstructor::DateConstructor):
2679         * runtime/DateInstance.cpp:
2680         (JSC::DateInstance::DateInstance):
2681         * runtime/DatePrototype.cpp:
2682         (JSC::dateProtoFuncSetTime):
2683         (JSC::setNewValueFromTimeArgs):
2684         (JSC::setNewValueFromDateArgs):
2685         (JSC::dateProtoFuncSetYear):
2686         * runtime/ErrorConstructor.cpp:
2687         (JSC::ErrorConstructor::ErrorConstructor):
2688         * runtime/ErrorInstance.cpp:
2689         (JSC::ErrorInstance::ErrorInstance):
2690         * runtime/ErrorPrototype.cpp:
2691         (JSC::ErrorPrototype::ErrorPrototype):
2692         * runtime/FunctionConstructor.cpp:
2693         (JSC::FunctionConstructor::FunctionConstructor):
2694         * runtime/FunctionPrototype.cpp:
2695         (JSC::FunctionPrototype::FunctionPrototype):
2696         * runtime/GetterSetter.cpp:
2697         (JSC::GetterSetter::markChildren):
2698         * runtime/GetterSetter.h:
2699         (JSC::GetterSetter::GetterSetter):
2700         (JSC::GetterSetter::getter):
2701         (JSC::GetterSetter::setGetter):
2702         (JSC::GetterSetter::setter):
2703         (JSC::GetterSetter::setSetter):
2704         * runtime/GlobalEvalFunction.cpp:
2705         (JSC::GlobalEvalFunction::GlobalEvalFunction):
2706         (JSC::GlobalEvalFunction::markChildren):
2707         * runtime/GlobalEvalFunction.h:
2708         (JSC::GlobalEvalFunction::cachedGlobalObject):
2709         * runtime/Heap.cpp:
2710         (JSC::Heap::markProtectedObjects):
2711         (JSC::Heap::markTempSortVectors):
2712         (JSC::Heap::markRoots):
2713         * runtime/InternalFunction.cpp:
2714         (JSC::InternalFunction::InternalFunction):
2715         * runtime/JSAPIValueWrapper.h:
2716         (JSC::JSAPIValueWrapper::value):
2717         (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
2718         * runtime/JSActivation.cpp:
2719         (JSC::JSActivation::markChildren):
2720         (JSC::JSActivation::put):
2721         * runtime/JSArray.cpp:
2722         (JSC::JSArray::JSArray):
2723         (JSC::JSArray::getOwnPropertySlot):
2724         (JSC::JSArray::getOwnPropertyDescriptor):
2725         (JSC::JSArray::put):
2726         (JSC::JSArray::putSlowCase):
2727         (JSC::JSArray::deleteProperty):
2728         (JSC::JSArray::increaseVectorLength):
2729         (JSC::JSArray::setLength):
2730         (JSC::JSArray::pop):
2731         (JSC::JSArray::push):
2732         (JSC::JSArray::unshiftCount):
2733         (JSC::JSArray::sort):
2734         (JSC::JSArray::fillArgList):
2735         (JSC::JSArray::copyToRegisters):
2736         (JSC::JSArray::compactForSorting):
2737         * runtime/JSArray.h:
2738         (JSC::JSArray::getIndex):
2739         (JSC::JSArray::setIndex):
2740         (JSC::JSArray::uncheckedSetIndex):
2741         (JSC::JSArray::markChildrenDirect):
2742         * runtime/JSByteArray.cpp:
2743         (JSC::JSByteArray::JSByteArray):
2744         * runtime/JSCell.h:
2745         (JSC::JSCell::JSValue::toThisObject):
2746         (JSC::JSCell::MarkStack::append):
2747         * runtime/JSFunction.cpp:
2748         (JSC::JSFunction::JSFunction):
2749         (JSC::JSFunction::getOwnPropertySlot):
2750         * runtime/JSGlobalData.h:
2751         * runtime/JSGlobalObject.cpp:
2752         (JSC::markIfNeeded):
2753         (JSC::JSGlobalObject::reset):
2754         (JSC::JSGlobalObject::resetPrototype):
2755         (JSC::JSGlobalObject::markChildren):
2756         * runtime/JSGlobalObject.h:
2757         (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
2758         (JSC::JSGlobalObject::regExpConstructor):
2759         (JSC::JSGlobalObject::errorConstructor):
2760         (JSC::JSGlobalObject::evalErrorConstructor):
2761         (JSC::JSGlobalObject::rangeErrorConstructor):
2762         (JSC::JSGlobalObject::referenceErrorConstructor):
2763         (JSC::JSGlobalObject::syntaxErrorConstructor):
2764         (JSC::JSGlobalObject::typeErrorConstructor):
2765         (JSC::JSGlobalObject::URIErrorConstructor):
2766         (JSC::JSGlobalObject::evalFunction):
2767         (JSC::JSGlobalObject::objectPrototype):
2768         (JSC::JSGlobalObject::functionPrototype):
2769         (JSC::JSGlobalObject::arrayPrototype):
2770         (JSC::JSGlobalObject::booleanPrototype):
2771         (JSC::JSGlobalObject::stringPrototype):
2772         (JSC::JSGlobalObject::numberPrototype):
2773         (JSC::JSGlobalObject::datePrototype):
2774         (JSC::JSGlobalObject::regExpPrototype):
2775         (JSC::JSGlobalObject::methodCallDummy):
2776         (JSC::Structure::prototypeForLookup):
2777         (JSC::constructArray):
2778         * runtime/JSONObject.cpp:
2779         (JSC::Stringifier::Holder::object):
2780         (JSC::Stringifier::markAggregate):
2781         (JSC::Stringifier::stringify):
2782         (JSC::Stringifier::Holder::appendNextProperty):
2783         (JSC::Walker::callReviver):
2784         (JSC::Walker::walk):
2785         * runtime/JSObject.cpp:
2786         (JSC::JSObject::defineGetter):
2787         (JSC::JSObject::defineSetter):
2788         (JSC::JSObject::removeDirect):
2789         (JSC::JSObject::putDirectFunction):
2790         (JSC::JSObject::putDirectFunctionWithoutTransition):
2791         (JSC::putDescriptor):
2792         (JSC::JSObject::defineOwnProperty):
2793         * runtime/JSObject.h:
2794         (JSC::JSObject::getDirectOffset):
2795         (JSC::JSObject::putDirectOffset):
2796         (JSC::JSObject::flattenDictionaryObject):
2797         (JSC::JSObject::putDirectInternal):
2798         (JSC::JSObject::putDirect):
2799         (JSC::JSObject::putDirectFunction):
2800         (JSC::JSObject::putDirectWithoutTransition):
2801         (JSC::JSObject::putDirectFunctionWithoutTransition):
2802         (JSC::JSValue::putDirect):
2803         (JSC::JSObject::allocatePropertyStorageInline):
2804         (JSC::JSObject::markChildrenDirect):
2805         * runtime/JSPropertyNameIterator.cpp:
2806         (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
2807         (JSC::JSPropertyNameIterator::get):
2808         * runtime/JSPropertyNameIterator.h:
2809         * runtime/JSStaticScopeObject.cpp:
2810         (JSC::JSStaticScopeObject::markChildren):
2811         * runtime/JSString.cpp:
2812         (JSC::StringObject::create):
2813         * runtime/JSValue.h:
2814         * runtime/JSWrapperObject.cpp:
2815         (JSC::JSWrapperObject::markChildren):
2816         * runtime/JSWrapperObject.h:
2817         (JSC::JSWrapperObject::internalValue):
2818         (JSC::JSWrapperObject::setInternalValue):
2819         * runtime/LiteralParser.cpp:
2820         (JSC::LiteralParser::parse):
2821         * runtime/Lookup.cpp:
2822         (JSC::setUpStaticFunctionSlot):
2823         * runtime/Lookup.h:
2824         (JSC::lookupPut):
2825         * runtime/MarkStack.h:
2826         (JSC::MarkStack::appendValues):
2827         * runtime/MathObject.cpp:
2828         (JSC::MathObject::MathObject):
2829         * runtime/NativeErrorConstructor.cpp:
2830         (JSC::NativeErrorConstructor::NativeErrorConstructor):
2831         * runtime/NativeErrorPrototype.cpp:
2832         (JSC::NativeErrorPrototype::NativeErrorPrototype):
2833         * runtime/NumberConstructor.cpp:
2834         (JSC::NumberConstructor::NumberConstructor):
2835         (JSC::constructWithNumberConstructor):
2836         * runtime/NumberObject.cpp:
2837         (JSC::constructNumber):
2838         * runtime/NumberPrototype.cpp:
2839         (JSC::NumberPrototype::NumberPrototype):
2840         * runtime/ObjectConstructor.cpp:
2841         (JSC::ObjectConstructor::ObjectConstructor):
2842         (JSC::objectConstructorGetOwnPropertyDescriptor):
2843         * runtime/Operations.h:
2844         (JSC::normalizePrototypeChain):
2845         (JSC::resolveBase):
2846         * runtime/PrototypeFunction.cpp:
2847         (JSC::PrototypeFunction::PrototypeFunction):
2848         * runtime/PutPropertySlot.h:
2849         (JSC::PutPropertySlot::setExistingProperty):
2850         (JSC::PutPropertySlot::setNewProperty):
2851         (JSC::PutPropertySlot::base):
2852         * runtime/RegExpConstructor.cpp:
2853         (JSC::RegExpConstructor::RegExpConstructor):
2854         * runtime/ScopeChain.cpp:
2855         (JSC::ScopeChainNode::print):
2856         * runtime/ScopeChain.h:
2857         (JSC::ScopeChainNode::~ScopeChainNode):
2858         (JSC::ScopeChainIterator::operator*):
2859         (JSC::ScopeChainIterator::operator->):
2860         (JSC::ScopeChain::top):
2861         * runtime/ScopeChainMark.h:
2862         (JSC::ScopeChain::markAggregate):
2863         * runtime/SmallStrings.cpp:
2864         (JSC::isMarked):
2865         (JSC::SmallStrings::markChildren):
2866         * runtime/SmallStrings.h:
2867         (JSC::SmallStrings::emptyString):
2868         (JSC::SmallStrings::singleCharacterString):
2869         (JSC::SmallStrings::singleCharacterStrings):
2870         * runtime/StringConstructor.cpp:
2871         (JSC::StringConstructor::StringConstructor):
2872         * runtime/StringObject.cpp:
2873         (JSC::StringObject::StringObject):
2874         * runtime/StringObject.h:
2875         * runtime/StringPrototype.cpp:
2876         (JSC::StringPrototype::StringPrototype):
2877         * runtime/Structure.cpp:
2878         (JSC::Structure::Structure):
2879         (JSC::Structure::addPropertyTransition):
2880         (JSC::Structure::toDictionaryTransition):
2881         (JSC::Structure::flattenDictionaryStructure):
2882         * runtime/Structure.h:
2883         (JSC::Structure::storedPrototype):
2884         * runtime/WeakGCMap.h:
2885         (JSC::WeakGCMap::uncheckedGet):
2886         (JSC::WeakGCMap::isValid):
2887         (JSC::::get):
2888         (JSC::::take):
2889         (JSC::::set):
2890         (JSC::::uncheckedRemove):
2891         * runtime/WriteBarrier.h: Removed.
2892
2893 2011-01-28  Gavin Barraclough  <barraclough@apple.com>
2894
2895         Reviewed by Geoff Garen.
2896
2897         https://bugs.webkit.org/show_bug.cgi?id=53352
2898         Heavy external fragmentation in FixedVMPoolAllocator can lead to a CRASH().
2899
2900         The FixedVMPoolAllocator currently uses a best fix policy -
2901         switch to first fit, this is less prone to external fragmentation.
2902
2903         * jit/ExecutableAllocatorFixedVMPool.cpp:
2904         (JSC::AllocationTableSizeClass::AllocationTableSizeClass):
2905         (JSC::AllocationTableSizeClass::blockSize):
2906         (JSC::AllocationTableSizeClass::blockCount):
2907         (JSC::AllocationTableSizeClass::blockAlignment):
2908         (JSC::AllocationTableSizeClass::size):
2909         (JSC::AllocationTableLeaf::AllocationTableLeaf):
2910         (JSC::AllocationTableLeaf::~AllocationTableLeaf):
2911         (JSC::AllocationTableLeaf::allocate):
2912         (JSC::AllocationTableLeaf::free):
2913         (JSC::AllocationTableLeaf::isEmpty):
2914         (JSC::AllocationTableLeaf::isFull):
2915         (JSC::AllocationTableLeaf::size):
2916         (JSC::AllocationTableLeaf::classForSize):
2917         (JSC::AllocationTableLeaf::dump):
2918         (JSC::LazyAllocationTable::LazyAllocationTable):
2919         (JSC::LazyAllocationTable::~LazyAllocationTable):
2920         (JSC::LazyAllocationTable::allocate):
2921         (JSC::LazyAllocationTable::free):
2922         (JSC::LazyAllocationTable::isEmpty):
2923         (JSC::LazyAllocationTable::isFull):
2924         (JSC::LazyAllocationTable::size):
2925         (JSC::LazyAllocationTable::dump):
2926         (JSC::LazyAllocationTable::classForSize):
2927         (JSC::AllocationTableDirectory::AllocationTableDirectory):
2928         (JSC::AllocationTableDirectory::~AllocationTableDirectory):
2929         (JSC::AllocationTableDirectory::allocate):
2930         (JSC::AllocationTableDirectory::free):
2931         (JSC::AllocationTableDirectory::isEmpty):
2932         (JSC::AllocationTableDirectory::isFull):
2933         (JSC::AllocationTableDirectory::size):
2934         (JSC::AllocationTableDirectory::classForSize):
2935         (JSC::AllocationTableDirectory::dump):
2936         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
2937         (JSC::FixedVMPoolAllocator::alloc):
2938         (JSC::FixedVMPoolAllocator::free):
2939         (JSC::FixedVMPoolAllocator::allocated):
2940         (JSC::FixedVMPoolAllocator::isValid):
2941         (JSC::FixedVMPoolAllocator::classForSize):
2942         (JSC::FixedVMPoolAllocator::offsetToPointer):
2943         (JSC::FixedVMPoolAllocator::pointerToOffset):
2944         (JSC::ExecutableAllocator::committedByteCount):
2945         (JSC::ExecutableAllocator::isValid):
2946         (JSC::ExecutableAllocator::underMemoryPressure):
2947         (JSC::ExecutablePool::systemAlloc):
2948         (JSC::ExecutablePool::systemRelease):
2949         * wtf/PageReservation.h:
2950         (WTF::PageReservation::PageReservation):
2951         (WTF::PageReservation::commit):
2952         (WTF::PageReservation::decommit):
2953         (WTF::PageReservation::committed):
2954
2955 2011-01-27  Oliver Hunt  <oliver@apple.com>
2956
2957         Reviewed by Geoffrey Garen.
2958
2959         Convert markstack to a slot visitor API
2960         https://bugs.webkit.org/show_bug.cgi?id=53219
2961
2962         Move the MarkStack over to a slot based marking API.
2963
2964         In order to avoiding aliasing concerns there are two new types
2965         that need to be used when holding on to JSValues and JSCell that
2966         need to be marked: WriteBarrier and DeprecatedPtr.  WriteBarrier
2967         is expected to be used for any JSValue or Cell that's lifetime and
2968         marking is controlled by another GC object.  DeprecatedPtr is used
2969         for any value that we need to rework ownership for.
2970
2971         The change over to this model has produced a large amount of
2972         code changes, but they are mostly mechanical (forwarding JSGlobalData,
2973         etc).
2974
2975         * API/JSCallbackObject.h:
2976         (JSC::JSCallbackObjectData::setPrivateProperty):
2977         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
2978         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
2979         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
2980         (JSC::JSCallbackObject::setPrivateProperty):
2981         * API/JSCallbackObjectFunctions.h:
2982         (JSC::::put):
2983         (JSC::::staticFunctionGetter):
2984         * API/JSObjectRef.cpp:
2985         (JSObjectMakeConstructor):
2986         (JSObjectSetPrivateProperty):
2987         * API/JSWeakObjectMapRefInternal.h:
2988         * JavaScriptCore.exp:
2989         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2990         * JavaScriptCore.xcodeproj/project.pbxproj:
2991         * bytecode/CodeBlock.cpp:
2992         (JSC::CodeBlock::markAggregate):
2993         * bytecode/CodeBlock.h:
2994         (JSC::CodeBlock::globalObject):
2995         * bytecompiler/BytecodeGenerator.cpp:
2996         (JSC::BytecodeGenerator::BytecodeGenerator):
2997         (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
2998         (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
2999         (JSC::BytecodeGenerator::findScopedProperty):
3000         * debugger/DebuggerActivation.cpp:
3001         (JSC::DebuggerActivation::DebuggerActivation):
3002         (JSC::DebuggerActivation::markChildren):
3003         * debugger/DebuggerActivation.h:
3004         * interpreter/Interpreter.cpp:
3005         (JSC::Interpreter::resolve):
3006         (JSC::Interpreter::resolveSkip):
3007         (JSC::Interpreter::resolveGlobalDynamic):
3008         (JSC::Interpreter::resolveBaseAndProperty):
3009         (JSC::Interpreter::unwindCallFrame):
3010         (JSC::appendSourceToError):
3011         (JSC::Interpreter::execute):
3012         (JSC::Interpreter::privateExecute):
3013         * interpreter/Register.h:
3014         (JSC::Register::jsValueSlot):
3015         * jit/JITStubs.cpp:
3016         (JSC::JITThunks::tryCacheGetByID):
3017         (JSC::DEFINE_STUB_FUNCTION):
3018         * jsc.cpp:
3019         (GlobalObject::GlobalObject):
3020         * runtime/Arguments.cpp:
3021         (JSC::Arguments::markChildren):
3022         (JSC::Arguments::getOwnPropertySlot):
3023         (JSC::Arguments::getOwnPropertyDescriptor):
3024         (JSC::Arguments::put):
3025         * runtime/Arguments.h:
3026         (JSC::Arguments::setActivation):
3027         (JSC::Arguments::Arguments):
3028         * runtime/ArrayConstructor.cpp:
3029         (JSC::ArrayConstructor::ArrayConstructor):
3030         (JSC::constructArrayWithSizeQuirk):
3031         * runtime/ArrayPrototype.cpp:
3032         (JSC::arrayProtoFuncSplice):
3033         * runtime/BatchedTransitionOptimizer.h:
3034         (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
3035         (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
3036         * runtime/BooleanConstructor.cpp:
3037         (JSC::BooleanConstructor::BooleanConstructor):
3038         (JSC::constructBoolean):
3039         (JSC::constructBooleanFromImmediateBoolean):
3040         * runtime/BooleanPrototype.cpp:
3041         (JSC::BooleanPrototype::BooleanPrototype):
3042         * runtime/ConservativeSet.h:
3043         (JSC::ConservativeSet::mark):
3044         * runtime/DateConstructor.cpp:
3045         (JSC::DateConstructor::DateConstructor):
3046         * runtime/DateInstance.cpp:
3047         (JSC::DateInstance::DateInstance):
3048         * runtime/DatePrototype.cpp:
3049         (JSC::dateProtoFuncSetTime):
3050         (JSC::setNewValueFromTimeArgs):
3051         (JSC::setNewValueFromDateArgs):
3052         (JSC::dateProtoFuncSetYear):
3053         * runtime/ErrorConstructor.cpp:
3054         (JSC::ErrorConstructor::ErrorConstructor):
3055         * runtime/ErrorInstance.cpp:
3056         (JSC::ErrorInstance::ErrorInstance):
3057         * runtime/ErrorPrototype.cpp:
3058         (JSC::ErrorPrototype::ErrorPrototype):
3059         * runtime/FunctionConstructor.cpp:
3060         (JSC::FunctionConstructor::FunctionConstructor):
3061         * runtime/FunctionPrototype.cpp:
3062         (JSC::FunctionPrototype::FunctionPrototype):
3063         * runtime/GetterSetter.cpp:
3064         (JSC::GetterSetter::markChildren):
3065         * runtime/GetterSetter.h:
3066         (JSC::GetterSetter::GetterSetter):
3067         (JSC::GetterSetter::getter):
3068         (JSC::GetterSetter::setGetter):
3069         (JSC::GetterSetter::setter):
3070         (JSC::GetterSetter::setSetter):
3071         * runtime/GlobalEvalFunction.cpp:
3072         (JSC::GlobalEvalFunction::GlobalEvalFunction):
3073         (JSC::GlobalEvalFunction::markChildren):
3074         * runtime/GlobalEvalFunction.h:
3075         (JSC::GlobalEvalFunction::cachedGlobalObject):
3076         * runtime/Heap.cpp:
3077         (JSC::Heap::markProtectedObjects):
3078         (JSC::Heap::markTempSortVectors):
3079         (JSC::Heap::markRoots):
3080         * runtime/InternalFunction.cpp:
3081         (JSC::InternalFunction::InternalFunction):
3082         * runtime/JSAPIValueWrapper.h:
3083         (JSC::JSAPIValueWrapper::value):
3084         (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
3085         * runtime/JSActivation.cpp:
3086         (JSC::JSActivation::put):
3087         * runtime/JSArray.cpp:
3088         (JSC::JSArray::JSArray):
3089         (JSC::JSArray::getOwnPropertySlot):
3090         (JSC::JSArray::getOwnPropertyDescriptor):
3091         (JSC::JSArray::put):
3092         (JSC::JSArray::putSlowCase):
3093         (JSC::JSArray::deleteProperty):
3094         (JSC::JSArray::increaseVectorLength):
3095         (JSC::JSArray::setLength):
3096         (JSC::JSArray::pop):
3097         (JSC::JSArray::push):
3098         (JSC::JSArray::unshiftCount):
3099         (JSC::JSArray::sort):
3100         (JSC::JSArray::fillArgList):
3101         (JSC::JSArray::copyToRegisters):
3102         (JSC::JSArray::compactForSorting):
3103         * runtime/JSArray.h:
3104         (JSC::JSArray::getIndex):
3105         (JSC::JSArray::setIndex):
3106         (JSC::JSArray::uncheckedSetIndex):
3107         (JSC::JSArray::markChildrenDirect):
3108         * runtime/JSByteArray.cpp:
3109         (JSC::JSByteArray::JSByteArray):
3110         * runtime/JSCell.h:
3111         (JSC::JSCell::MarkStack::append):
3112         (JSC::JSCell::MarkStack::appendCell):
3113         * runtime/JSFunction.cpp:
3114         (JSC::JSFunction::JSFunction):
3115         (JSC::JSFunction::getOwnPropertySlot):
3116         * runtime/JSGlobalObject.cpp:
3117         (JSC::markIfNeeded):
3118         (JSC::JSGlobalObject::reset):
3119         (JSC::JSGlobalObject::resetPrototype):
3120         (JSC::JSGlobalObject::markChildren):
3121         * runtime/JSGlobalObject.h:
3122         (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
3123         (JSC::JSGlobalObject::regExpConstructor):
3124         (JSC::JSGlobalObject::errorConstructor):
3125         (JSC::JSGlobalObject::evalErrorConstructor):
3126         (JSC::JSGlobalObject::rangeErrorConstructor):
3127         (JSC::JSGlobalObject::referenceErrorConstructor):
3128         (JSC::JSGlobalObject::syntaxErrorConstructor):
3129         (JSC::JSGlobalObject::typeErrorConstructor):
3130         (JSC::JSGlobalObject::URIErrorConstructor):
3131         (JSC::JSGlobalObject::evalFunction):
3132         (JSC::JSGlobalObject::objectPrototype):
3133         (JSC::JSGlobalObject::functionPrototype):
3134         (JSC::JSGlobalObject::arrayPrototype):
3135         (JSC::JSGlobalObject::booleanPrototype):
3136         (JSC::JSGlobalObject::stringPrototype):
3137         (JSC::JSGlobalObject::numberPrototype):
3138         (JSC::JSGlobalObject::datePrototype):
3139         (JSC::JSGlobalObject::regExpPrototype):
3140         (JSC::JSGlobalObject::methodCallDummy):
3141         (JSC::constructArray):
3142         * runtime/JSONObject.cpp:
3143         (JSC::Stringifier::Holder::object):
3144         (JSC::Stringifier::Holder::objectSlot):
3145         (JSC::Stringifier::markAggregate):
3146         (JSC::Stringifier::stringify):
3147         (JSC::Stringifier::Holder::appendNextProperty):
3148         (JSC::Walker::callReviver):
3149         (JSC::Walker::walk):
3150         * runtime/JSObject.cpp:
3151         (JSC::JSObject::defineGetter):
3152         (JSC::JSObject::defineSetter):
3153         (JSC::JSObject::removeDirect):
3154         (JSC::JSObject::putDirectFunction):
3155         (JSC::JSObject::putDirectFunctionWithoutTransition):
3156         (JSC::putDescriptor):
3157         (JSC::JSObject::defineOwnProperty):
3158         * runtime/JSObject.h:
3159         (JSC::JSObject::putDirectOffset):
3160         (JSC::JSObject::putUndefinedAtDirectOffset):
3161         (JSC::JSObject::flattenDictionaryObject):
3162         (JSC::JSObject::putDirectInternal):
3163         (JSC::JSObject::putDirect):
3164         (JSC::JSObject::putDirectFunction):
3165         (JSC::JSObject::putDirectWithoutTransition):
3166         (JSC::JSObject::putDirectFunctionWithoutTransition):
3167         (JSC::JSValue::putDirect):
3168         (JSC::JSObject::allocatePropertyStorageInline):
3169         (JSC::JSObject::markChildrenDirect):
3170         * runtime/JSStaticScopeObject.cpp:
3171         (JSC::JSStaticScopeObject::markChildren):
3172         * runtime/JSString.cpp:
3173         (JSC::StringObject::create):
3174         * runtime/JSValue.h:
3175         * runtime/JSWrapperObject.cpp:
3176         (JSC::JSWrapperObject::markChildren):
3177         * runtime/JSWrapperObject.h:
3178         (JSC::JSWrapperObject::internalValue):
3179         (JSC::JSWrapperObject::setInternalValue):
3180         * runtime/LiteralParser.cpp:
3181         (JSC::LiteralParser::parse):
3182         * runtime/Lookup.cpp:
3183         (JSC::setUpStaticFunctionSlot):
3184         * runtime/Lookup.h:
3185         (JSC::lookupPut):
3186         * runtime/MarkStack.h:
3187         * runtime/MathObject.cpp:
3188         (JSC::MathObject::MathObject):
3189         * runtime/NativeErrorConstructor.cpp:
3190         (JSC::NativeErrorConstructor::NativeErrorConstructor):
3191         * runtime/NativeErrorPrototype.cpp:
3192         (JSC::NativeErrorPrototype::NativeErrorPrototype):
3193         * runtime/NumberConstructor.cpp:
3194         (JSC::NumberConstructor::NumberConstructor):
3195         (JSC::constructWithNumberConstructor):
3196         * runtime/NumberObject.cpp:
3197         (JSC::constructNumber):
3198         * runtime/NumberPrototype.cpp:
3199         (JSC::NumberPrototype::NumberPrototype):
3200         * runtime/ObjectConstructor.cpp:
3201         (JSC::ObjectConstructor::ObjectConstructor):
3202         (JSC::objectConstructorGetOwnPropertyDescriptor):
3203         * runtime/Operations.h:
3204         (JSC::normalizePrototypeChain):
3205         (JSC::resolveBase):
3206         * runtime/PrototypeFunction.cpp:
3207         (JSC::PrototypeFunction::PrototypeFunction):
3208         * runtime/PutPropertySlot.h:
3209         (JSC::PutPropertySlot::setExistingProperty):
3210         (JSC::PutPropertySlot::setNewProperty):
3211         (JSC::PutPropertySlot::base):
3212         * runtime/RegExpConstructor.cpp:
3213         (JSC::RegExpConstructor::RegExpConstructor):
3214         * runtime/ScopeChain.cpp:
3215         (JSC::ScopeChainNode::print):
3216         * runtime/ScopeChain.h:
3217         (JSC::ScopeChainNode::~ScopeChainNode):
3218         (JSC::ScopeChainIterator::operator*):
3219         (JSC::ScopeChainIterator::operator->):
3220         (JSC::ScopeChain::top):
3221         * runtime/ScopeChainMark.h:
3222         (JSC::ScopeChain::markAggregate):
3223         * runtime/SmallStrings.cpp:
3224         (JSC::isMarked):
3225         (JSC::SmallStrings::markChildren):
3226         * runtime/SmallStrings.h:
3227         (JSC::SmallStrings::emptyString):
3228         (JSC::SmallStrings::singleCharacterString):
3229         (JSC::SmallStrings::singleCharacterStrings):
3230         * runtime/StringConstructor.cpp:
3231         (JSC::StringConstructor::StringConstructor):
3232         * runtime/StringObject.cpp:
3233         (JSC::StringObject::StringObject):
3234         * runtime/StringObject.h:
3235         * runtime/StringPrototype.cpp:
3236         (JSC::StringPrototype::StringPrototype):
3237         * runtime/Structure.cpp:
3238         (JSC::Structure::flattenDictionaryStructure):
3239         * runtime/Structure.h:
3240         (JSC::Structure::storedPrototypeSlot):
3241         * runtime/WeakGCMap.h:
3242         (JSC::WeakGCMap::uncheckedGet):
3243         (JSC::WeakGCMap::uncheckedGetSlot):
3244         (JSC::::get):
3245         (JSC::::take):
3246         (JSC::::set):
3247         (JSC::::uncheckedRemove):
3248         * runtime/WriteBarrier.h: Added.
3249         (JSC::DeprecatedPtr::DeprecatedPtr):
3250         (JSC::DeprecatedPtr::get):
3251         (JSC::DeprecatedPtr::operator*):
3252         (JSC::DeprecatedPtr::operator->):
3253         (JSC::DeprecatedPtr::slot):
3254         (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
3255         (JSC::DeprecatedPtr::operator!):
3256         (JSC::WriteBarrierBase::set):
3257         (JSC::WriteBarrierBase::get):
3258         (JSC::WriteBarrierBase::operator*):
3259         (JSC::WriteBarrierBase::operator->):
3260         (JSC::WriteBarrierBase::slot):
3261         (JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
3262         (JSC::WriteBarrierBase::operator!):
3263         (JSC::WriteBarrier::WriteBarrier):
3264         (JSC::operator==):
3265
3266 2011-01-28  Adam Roben  <aroben@apple.com>
3267
3268         Chromium build fix after r76967
3269
3270         * wtf/ThreadingPrimitives.h: Use OS(WINDOWS) instead of PLATFORM(WIN), to match other
3271         similar macros in this file.
3272
3273 2011-01-28  Michael Saboff  <msaboff@apple.com>
3274
3275         Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
3276         https://bugs.webkit.org/show_bug.cgi?id=53271
3277
3278         Reapplying this this change.  No change from prior patch in
3279         JavaScriptCore.
3280
3281         Added new isValid() methods to check if a contained object in
3282         a WeakGCMap is valid when using an unchecked iterator.
3283
3284         * runtime/WeakGCMap.h:
3285         (JSC::WeakGCMap::isValid):
3286
3287 2011-01-27  Adam Roben  <aroben@apple.com>
3288
3289         Extract code to convert a WTF absolute time to a Win32 wait interval into a separate
3290         function
3291
3292         Fixes <http://webkit.org/b/53208> <rdar://problem/8922490> BinarySemaphore should wrap a
3293         Win32 event
3294
3295         Reviewed by Dave Hyatt.
3296
3297         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export the new function.
3298
3299         * wtf/ThreadingPrimitives.h: Declare the new function.
3300
3301         * wtf/ThreadingWin.cpp:
3302         (WTF::ThreadCondition::timedWait): Moved code to convert the absolute time to a wait
3303         interval from here...
3304         (WTF::absoluteTimeToWaitTimeoutInterval): ...to here.
3305
3306 2011-01-28  Sam Weinig  <sam@webkit.org>
3307
3308         Reviewed by Maciej Stachowiak.
3309
3310         Add basic rubber banding support
3311         <rdar://problem/8219429>
3312         https://bugs.webkit.org/show_bug.cgi?id=53277
3313
3314         * wtf/Platform.h: Add ENABLE for rubber banding.
3315
3316 2011-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
3317
3318         Unreviewed, rolling out r76893.
3319         http://trac.webkit.org/changeset/76893
3320         https://bugs.webkit.org/show_bug.cgi?id=53287
3321
3322         It made some tests crash on GTK and Qt debug bots (Requested
3323         by Ossy on #webkit).
3324
3325         * runtime/WeakGCMap.h:
3326
3327 2011-01-27  Adam Barth  <abarth@webkit.org>
3328
3329         Reviewed by Eric Seidel.
3330
3331         Add WTFString method to compare equality with Vector<UChar>
3332         https://bugs.webkit.org/show_bug.cgi?id=53266
3333
3334         I'm planning to use this method in the new XSS filter implementation,
3335         but it seems generally useful.
3336
3337         * wtf/text/StringImpl.h:
3338         (WTF::equalIgnoringNullity):
3339         * wtf/text/WTFString.h:
3340         (WTF::equalIgnoringNullity):
3341
3342 2011-01-27  Michael Saboff  <msaboff@apple.com>
3343
3344         Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
3345         https://bugs.webkit.org/show_bug.cgi?id=53271
3346
3347         Added new isValid() methods to check if a contained object in
3348         a WeakGCMap is valid when using an unchecked iterator.
3349
3350         * runtime/WeakGCMap.h:
3351         (JSC::WeakGCMap::isValid):
3352
3353 2011-01-26  Sam Weinig  <sam@webkit.org>
3354
3355         Reviewed by Maciej Stachowiak.
3356
3357         Add events to represent the start/end of a gesture scroll
3358         https://bugs.webkit.org/show_bug.cgi?id=53215
3359
3360         * wtf/Platform.h: Add ENABLE for gesture events. 
3361
3362 2011-01-26  Yael Aharon  <yael.aharon@nokia.com>
3363
3364         Reviewed by Laszlo Gombos.
3365
3366         [Qt][Symbian] Fix --minimal build
3367         https://bugs.webkit.org/show_bug.cgi?id=52839
3368
3369         Move definition of USE_SYSTEM_MALLOC out of pri file.
3370         Put it in platform.h instead.
3371
3372         * wtf/Platform.h:
3373         * wtf/TCSystemAlloc.cpp:
3374         * wtf/wtf.pri:
3375
3376 2011-01-26  Patrick Gansterer  <paroga@webkit.org>
3377
3378         Reviewed by Andreas Kling.
3379
3380         [WINCE] Add JIT support to build system
3381         https://bugs.webkit.org/show_bug.cgi?id=53079
3382
3383         * CMakeListsWinCE.txt:
3384
3385 2011-01-25  Adam Roben  <aroben@apple.com>
3386
3387         Windows Production build fix
3388
3389         Reviewed by Steve Falkenburg.
3390
3391         * JavaScriptCore.vcproj/JavaScriptCore.make: Set BUILDSTYLE to Release_PGO at the very start
3392         of the file so that ConfigurationBuildDir takes that into account. Also set it the right way
3393         (by redefining the macro) rather than the wrong way (by modifying the environment variable).
3394
3395 2011-01-25  Steve Falkenburg  <sfalken@apple.com>
3396
3397         Rubber-stamped by Adam Roben.
3398
3399         Windows production build fix.
3400         Use correct environment variable escaping
3401
3402         * JavaScriptCore.vcproj/JavaScriptCore.make:
3403         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
3404
3405 2011-01-25  Oliver Hunt  <oliver@apple.com>
3406
3407         Reviewed by Gavin Barraclough.
3408
3409         JSON.stringify processing time exponentially grows with size of object
3410         https://bugs.webkit.org/show_bug.cgi?id=51922
3411
3412         Remove last use of reserveCapacity from JSON stringification, as it results
3413         in appalling append behaviour when there are a large number of property names
3414         and nothing else.
3415
3416         * runtime/JSONObject.cpp:
3417         (JSC::Stringifier::appendQuotedString):
3418
3419 2011-01-25  Antti Koivisto  <antti@apple.com>
3420
3421         Not reviewed.
3422         
3423         Try to fix windows build.
3424
3425         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3426
3427 2011-01-25  Antti Koivisto  <antti@apple.com>
3428
3429         Reviewed by Oliver Hunt.
3430
3431         REGRESSION: Leak in JSParser::Scope::copyCapturedVariablesToVector()
3432         https://bugs.webkit.org/show_bug.cgi?id=53061
3433          
3434         Cache did not know about the subclass so failed to fully delete the items. 
3435         Got rid of the subclass and moved the classes to separate files.
3436
3437         * CMakeLists.txt:
3438         * GNUmakefile.am:
3439         * JavaScriptCore.exp:
3440         * JavaScriptCore.gypi:
3441         * JavaScriptCore.pro:
3442         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3443         * JavaScriptCore.xcodeproj/project.pbxproj:
3444         * parser/JSParser.cpp:
3445         (JSC::JSParser::Scope::saveFunctionInfo):
3446         (JSC::JSParser::Scope::restoreFunctionInfo):
3447         (JSC::JSParser::findCachedFunctionInfo):
3448         (JSC::JSParser::parseFunctionInfo):
3449         * parser/SourceProvider.h:
3450         * parser/SourceProviderCache.cpp: Added.
3451         (JSC::SourceProviderCache::~SourceProviderCache):
3452         (JSC::SourceProviderCache::byteSize):
3453         * parser/SourceProviderCache.h: Added.
3454         (JSC::SourceProviderCache::SourceProviderCache):
3455         (JSC::SourceProviderCache::add):
3456         (JSC::SourceProviderCache::get):
3457         * parser/SourceProviderCacheItem.h: Added.
3458         (JSC::SourceProviderCacheItem::SourceProviderCacheItem):
3459         (JSC::SourceProviderCacheItem::approximateByteSize):
3460         (JSC::SourceProviderCacheItem::closeBraceToken):
3461
3462 2011-01-25  Marcilio Mendonca  <mamendonca@rim.com>
3463
3464         Reviewed by Darin Adler.
3465
3466         Bug 53087: Refactoring: replaced a hanging "else" with a "return"
3467         statement
3468         https://bugs.webkit.org/show_bug.cgi?id=53087.
3469
3470         Refactoring work: Replaced a hanging "else" within an #if PLATFORM(M
3471         with a "return" so that the code is more readable and less error pro
3472         (e.g., "else" doesn't use braces so adding extra lines to the else
3473         block won't have any effect; even worse, code still compiles
3474         successfully.
3475
3476         * wtf/Assertions.cpp:
3477
3478 2011-01-24  Chris Marrin  <cmarrin@apple.com>
3479
3480         Reviewed by Eric Seidel.
3481
3482         Change ENABLE_3D_CANVAS to ENABLE_WEBGL
3483         https://bugs.webkit.org/show_bug.cgi?id=53041
3484
3485         * Configurations/FeatureDefines.xcconfig:
3486
3487 2011-01-25  Adam Roben  <aroben@apple.com>
3488
3489         Windows Production build fix
3490
3491         * JavaScriptCore.vcproj/JavaScriptCore.make: Added a missing "set".
3492
3493 2011-01-25  Patrick Gansterer  <paroga@webkit.org>
3494
3495         Reviewed by Eric Seidel.
3496
3497         Add missing defines for COMPILER(RVCT) && CPU(ARM_THUMB2)
3498         https://bugs.webkit.org/show_bug.cgi?id=52949
3499
3500         * jit/JITStubs.cpp:
3501
3502 2011-01-24  Adam Roben  <aroben@apple.com>
3503
3504         Windows Production build fix
3505
3506         * JavaScriptCore.vcproj/JavaScriptCore.make: Update for move of JavaScriptCore into Source.
3507
3508 2011-01-24  Peter Varga  <pvarga@webkit.org>
3509
3510         Reviewed by Oliver Hunt.
3511
3512         Optimize regex patterns which contain empty alternatives
3513         https://bugs.webkit.org/show_bug.cgi?id=51395
3514
3515         Eliminate the empty alternatives from the regex pattern and convert it to do
3516         the matching in an easier way.
3517
3518         * yarr/YarrPattern.cpp:
3519         (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
3520
3521 2011-01-24  Andras Becsi  <abecsi@webkit.org>
3522
3523         Reviewed by Csaba Osztrogonác.
3524
3525         [Qt] Move project files into Source
3526         https://bugs.webkit.org/show_bug.cgi?id=52891
3527
3528         * JavaScriptCore.pri:
3529         * JavaScriptCore.pro:
3530         * jsc.pro:
3531
3532 2011-01-23  Mark Rowe  <mrowe@apple.com>
3533
3534         Follow-up to r76477.
3535
3536         Fix the scripts that detect problematic code such as static initializers
3537         and destructors, weak vtables, inappropriate files in the framework wrappers,
3538         and public headers including private headers. These had all been broken
3539         since the projects were moved in to the Source directory as the paths to the
3540         scripts were not updated at that time.
3541
3542         * JavaScriptCore.xcodeproj/project.pbxproj:
3543
3544 2011-01-23  Patrick Gansterer  <paroga@webkit.org>
3545
3546         Reviewed by Darin Adler.
3547
3548         Use WTF::StringHasher in WebCore
3549         https://bugs.webkit.org/show_bug.cgi?id=52934
3550
3551         Add an additional function to calculate the hash
3552         of data with a runtimedependent size.
3553
3554         * wtf/StringHasher.h:
3555         (WTF::StringHasher::createBlobHash):
3556
3557 2011-01-23  Patrick Gansterer  <paroga@webkit.org>
3558
3559         Reviewed by David Kilzer.
3560
3561         Fix comment in String::ascii()
3562         https://bugs.webkit.org/show_bug.cgi?id=52980
3563
3564         * wtf/text/WTFString.cpp:
3565         (WTF::String::ascii):
3566
3567 2011-01-23  Patrick Gansterer  <paroga@webkit.org>
3568
3569         Reviewed by David Kilzer.
3570
3571         Add String::containsOnlyLatin1()
3572         https://bugs.webkit.org/show_bug.cgi?id=52979
3573
3574         * wtf/text/WTFString.h:
3575         (WTF::String::containsOnlyLatin1):
3576         (WTF::charactersAreAllLatin1):
3577
3578 2011-01-23  Patrick Gansterer  <paroga@webkit.org>
3579
3580         Reviewed by Oliver Hunt.
3581
3582         Remove obsolete JSVALUE32 code
3583         https://bugs.webkit.org/show_bug.cgi?id=52948
3584
3585         r70111 removed support for JSVALUE32.
3586         ARM, MIPS and X86 support JSVALUE32_64 only.
3587
3588         * jit/JITStubs.cpp:
3589
3590 2011-01-22  Geoffrey Garen  <ggaren@apple.com>
3591
3592         Reviewed by Dan Bernstein.
3593
3594         ASSERT running run-webkit-tests --threaded.
3595         https://bugs.webkit.org/show_bug.cgi?id=52971
3596         
3597         SunSpider and v8 report no change.
3598
3599         * runtime/ConservativeSet.cpp:
3600         (JSC::ConservativeSet::grow):
3601         (JSC::ConservativeSet::add):
3602         * runtime/ConservativeSet.h: Tweaked the inline capacity to 128, and
3603         the growth policy to 2X, to make SunSpider and v8 happy.
3604         (JSC::ConservativeSet::ConservativeSet):
3605         (JSC::ConservativeSet::~ConservativeSet):
3606         (JSC::ConservativeSet::mark): Use OSAllocator directly, instead of malloc.
3607         Malloc is forbidden during a multi-threaded mark phase because it can
3608         cause deadlock.
3609
3610 2011-01-22  Geoffrey Garen  <ggaren@apple.com>
3611
3612         Reviewed by Geoffrey Garen.
3613
3614         Rubber-stamped by Maciej Stachowiak.
3615
3616         A few of Maciej's review suggestions for my last patch.
3617         https://bugs.webkit.org/show_bug.cgi?id=52946        
3618
3619         SunSpider reports no change.
3620
3621         * Android.mk:
3622         * CMakeLists.txt:
3623         * GNUmakefile.am:
3624         * JavaScriptCore.gypi:
3625         * JavaScriptCore.pro:
3626         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3627         * JavaScriptCore.xcodeproj/project.pbxproj: Updated build systems.
3628
3629         * runtime/ConservativeSet.cpp: Added.
3630         (JSC::isPointerAligned):
3631         (JSC::ConservativeSet::add):
3632         * runtime/ConservativeSet.h: Added.
3633         (JSC::ConservativeSet::ConservativeSet):
3634         (JSC::ConservativeSet::mark): Split ConservativeSet out into its own
3635         file, and moved the conservative check into ConservativeSet::add, making
3636         ConservativeSet's responsibility clearer.
3637
3638         * runtime/Heap.cpp:
3639         (JSC::Heap::markRoots):
3640         * runtime/MachineStackMarker.cpp:
3641         (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
3642         (JSC::MachineStackMarker::markOtherThreadConservatively):
3643         * runtime/MachineStackMarker.h:
3644         * runtime/MarkStack.h: Updated for changes above.
3645
3646 2011-01-22  Patrick Gansterer  <paroga@webkit.org>
3647
3648         Unreviewed WinCE build fix for r76430.
3649
3650         * runtime/MachineStackMarker.cpp:
3651         (JSC::swapIfBackwards):
3652
3653 2011-01-21  Geoffrey Garen  <ggaren@apple.com>
3654
3655         Reviewed by Beth Dakin.
3656
3657         Reorganized MarkedSpace, making many of its functions private.
3658
3659         * runtime/JSCell.h:
3660         (JSC::JSCell::Heap::heap):
3661         * runtime/MarkedSpace.h:
3662         (JSC::MarkedSpace::globalData):
3663         (JSC::MarkedSpace::heap):
3664
3665 2011-01-21  Geoffrey Garen  <ggaren@apple.com>
3666
3667         Try to fix build: moved helper function out of #ifdef.
3668
3669         * runtime/MachineStackMarker.cpp:
3670         (JSC::swapIfBackwards):
3671
3672 2011-01-21  Geoffrey Garen  <ggaren@apple.com>
3673
3674         Rubber-stamped by Maciej Stachowiak.
3675
3676         A few of Maciej's review suggestions for my last patch.
3677         https://bugs.webkit.org/show_bug.cgi?id=52946        
3678
3679         SunSpider reports no change.
3680
3681         * runtime/MachineStackMarker.cpp:
3682         (JSC::swapIfBackwards): Added a helper function for handling platforms
3683         where the stack can grow in any direction.
3684
3685         (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
3686         (JSC::MachineStackMarker::markOtherThreadConservatively): Use the helper
3687         function.
3688
3689         (JSC::isPointerAligned): Use "!" instead of "==0" because a robot told me to.
3690
3691         (JSC::MachineStackMarker::markConservatively): Changed to use a more
3692         standard looping idiom, and to use the helper function above.
3693
3694         * runtime/MarkedSpace.h:
3695         (JSC::MarkedSpace::isCellAligned): Use "!" instead of "==0" because a robot told me to.
3696
3697 2011-01-21  Geoffrey Garen  <ggaren@apple.com>
3698
3699         Reviewed by Maciej Stachowiak.
3700
3701         Cleaned up some conservative marking code.
3702         https://bugs.webkit.org/show_bug.cgi?id=52946
3703         
3704         SunSpider reports no change.
3705
3706         * interpreter/RegisterFile.h: No need for a special marking function,
3707         since we already expose a start() and end().
3708
3709         * runtime/Heap.cpp:
3710         (JSC::Heap::registerFile):
3711         (JSC::Heap::markRoots):
3712         * runtime/Heap.h:
3713         (JSC::Heap::contains): Migrated markConservatively() to the machine stack
3714         marker class. Now, Heap just provides a contains() function, which the
3715         machine stack marker uses for checking whether a pointer points into the heap.
3716
3717         * runtime/MachineStackMarker.cpp:
3718         (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
3719         (JSC::MachineStackMarker::markOtherThreadConservatively):
3720         (JSC::isPointerAligned):
3721         (JSC::MachineStackMarker::markConservatively):
3722         * runtime/MachineStackMarker.h: Move the conservative marking code here.
3723
3724         * runtime/MarkStack.h:
3725         (JSC::ConservativeSet::add):
3726         (JSC::ConservativeSet::mark): Changed to using a vector instead of hash
3727         set. Vector seems to be a bit faster, and it generates smaller code.
3728
3729         * runtime/MarkedSpace.cpp:
3730         (JSC::MarkedSpace::containsSlowCase):
3731         * runtime/MarkedSpace.h:
3732         (JSC::MarkedSpace::isCellAligned):
3733         (JSC::MarkedSpace::isPossibleCell):
3734         (JSC::MarkedSpace::contains): Kept the code for determining whether a
3735         pointer pointed into marked space, and moved the code for marking
3736         a set of conservative pointers into the machine stack marker.
3737
3738         * wtf/HashSet.h:
3739         (WTF::::add): Added two missing inlines that I noticed while testing
3740         vector vs hash set.
3741
3742 2011-01-21  Mark Rowe  <mrowe@apple.com>
3743
3744         Reviewed by Sam Weinig.
3745
3746         Work around a Clang bug <rdar://problem/8876150> that leads to it incorrectly emitting an access
3747         control warning when a client tries to use operator bool exposed above via "using PageBlock::operator bool".
3748
3749         * wtf/PageAllocation.h:
3750         (WTF::PageAllocation::operator bool):
3751         * wtf/PageReservation.h:
3752         (WTF::PageReservation::operator bool):
3753
3754 2011-01-21  Michael Saboff  <msaboff@apple.com>
3755
3756         Reviewed by Oliver Hunt.
3757
3758         [RegexFuzz] Hang with forward assertion
3759         https://bugs.webkit.org/show_bug.cgi?id=52825
3760         <rdar://problem/8894332>
3761
3762         The backtrackTo label from the first term in a list of terms is
3763         being overwritten by processing of subsequent terms.  Changed
3764         copyBacktrackToLabel() to check for an existing bcaktrackTo label
3765         before copying and renamed it to propagateBacktrackToLabel() since
3766         it no longer copies.
3767
3768         * yarr/YarrJIT.cpp:
3769         (JSC::Yarr::YarrGenerator::BacktrackDestination::propagateBacktrackToLabel):
3770         (JSC::Yarr::YarrGenerator::generateParenthesesSingle):
3771
3772 2011-01-21  Geoffrey Garen  <ggaren@apple.com>
3773
3774         Reviewed by Sam Weinig.
3775
3776         Moved the mark stack from global data to the heap, since it pertains
3777         to the heap, and not the virtual machine as a whole.
3778         https://bugs.webkit.org/show_bug.cgi?id=52930
3779         
3780         SunSpider reports no change.
3781
3782         * runtime/Heap.cpp:
3783         (JSC::Heap::Heap):
3784         (JSC::Heap::markRoots):
3785         * runtime/Heap.h:
3786         * runtime/JSGlobalData.cpp:
3787         (JSC::JSGlobalData::JSGlobalData):
3788         * runtime/JSGlobalData.h:
3789
3790 2011-01-21  Peter Gal  <galpeter@inf.u-szeged.hu>
3791
3792         Reviewed by Darin Adler.
3793
3794         REGRESSION(r76177): All JavaScriptCore tests fail on ARM
3795         https://bugs.webkit.org/show_bug.cgi?id=52814
3796
3797         Get the approximateByteSize value before releasing the OwnPtr.
3798
3799         * parser/JSParser.cpp:
3800         (JSC::JSParser::parseFunctionInfo):
3801
3802 2011-01-21  Xan Lopez  <xlopez@igalia.com>
3803
3804         Reviewed by Martin Robinson.
3805
3806         Remove unnecessary <stdio.h> include
3807         https://bugs.webkit.org/show_bug.cgi?id=52884
3808
3809         * jit/JIT.cpp: remove unnecessary include.
3810
3811 2011-01-20  Ryosuke Niwa  <rniwa@webkit.org>
3812
3813         Reviewed by Maciej Stachowiak.
3814
3815         Added OwnPtrCommon.h because OwnArrayPtr::set calls deleteOwnedPtr.
3816
3817         * wtf/OwnArrayPtr.h:
3818
3819 2011-01-20  Patrick Gansterer  <paroga@webkit.org>
3820
3821         Reviewed by Oliver Hunt.
3822
3823         [WINCE] Remove obsolete JSVALUE32 code
3824         https://bugs.webkit.org/show_bug.cgi?id=52450
3825
3826         Remove the "offset hack" in create_jit_stubs, since we
3827         only support JSVALUE32_64 in the meantime.
3828
3829         * create_jit_stubs: Removed offset argument
3830         * jit/JITStubs.cpp:
3831
3832 2011-01-20  Geoffrey Garen  <ggaren@apple.com>
3833
3834         Reviewed by Oliver Hunt.
3835
3836         When marking conservatively, guard against reviving dead objects.
3837         https://bugs.webkit.org/show_bug.cgi?id=52840
3838         
3839         SunSpider and v8 say no change.
3840
3841         * interpreter/RegisterFile.h:
3842         (JSC::RegisterFile::markCallFrames): Updated to use the ConservativeSet API.
3843
3844         * runtime/Heap.cpp:
3845         (JSC::Heap::recordExtraCost): No need to guard against conservative
3846         marking reviving dead objects anymore, since the conservative marking
3847         mechanism guards against this now.
3848
3849         (JSC::Heap::markConservatively):
3850         (JSC::Heap::markProtectedObjects):
3851         (JSC::Heap::markTempSortVectors): Don't drain the mark stack inside a
3852         marking function. We want to establish a separation of concerns between
3853         visiting roots and draining the mark stack.
3854
3855         (JSC::Heap::markRoots): Gather the set of conservative references before
3856         clearning mark bits, because conservative marking now uses the mark bits
3857         to determine if a reference is valid, and avoid reviving dead objects.
3858
3859         (JSC::Heap::collectAllGarbage): No need to guard against conservative
3860         marking reviving dead objects anymore, since the conservative marking
3861         mechanism guards against this now.
3862
3863         * runtime/Heap.h: Updated to use the ConservativeSet API.
3864
3865         * runtime/MachineStackMarker.cpp:
3866         (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
3867         (JSC::MachineStackMarker::markCurrentThreadConservatively):
3868         (JSC::MachineStackMarker::markOtherThreadConservatively):
3869         (JSC::MachineStackMarker::markMachineStackConservatively):
3870         * runtime/MachineStackMarker.h: Ditto.
3871
3872         * runtime/MarkStack.h:
3873         (JSC::ConservativeSet::add):
3874         (JSC::ConservativeSet::mark): Added ConservativeSet, for gathering the
3875         set of conservative references. This is different from MarkStack, since
3876         we don't mark the set until it is completely gathered.
3877
3878         * runtime/MarkedSpace.cpp:
3879         (JSC::MarkedSpace::freeBlock):
3880         (JSC::MarkedSpace::resizeBlocks):
3881         (JSC::MarkedSpace::markConservatively):
3882         * runtime/MarkedSpace.h: When marking conservatively, guard against
3883         reviving dead objects.
3884
3885 2011-01-20  Siddharth Mathur  <siddharth.mathur@nokia.com>
3886
3887         Reviewed by Geoffrey Garen.
3888
3889         [Symbian] Fix StackBounds::initialize()
3890         https://bugs.webkit.org/show_bug.cgi?id=52842
3891
3892         * wtf/StackBounds.cpp:
3893         (WTF::StackBounds::initialize): Use TThreadStackInfo.iLimit for stack limit
3894
3895 2011-01-20  Michael Saboff  <msaboff@apple.com>
3896
3897         Reviewed by Oliver Hunt.
3898
3899         <rdar://problem/8890203> [RegexFuzz] Crash in generated code (52773)
3900         https://bugs.webkit.org/show_bug.cgi?id=52773
3901
3902         Fixed case where an existing DataLabelPtr is overwritten.  The
3903         replacing DataLabelPtr is now resolved immediately in
3904         linkDataLabelToBacktrackIfExists().  Cleanup - eliminated bool
3905         return value for the routine as it was never used.
3906
3907         * yarr/YarrJIT.cpp:
3908         (JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
3909
3910 2011-01-20  Andras Becsi  <abecsi@webkit.org>
3911
3912         Reviewed by Csaba Osztrogonác.
3913
3914         [Qt][WK2] WebKit2 enabled build fails to link
3915
3916         Work around undefined reference linking issues until the buildsystem gets redesigned.
3917         These issues first occured in minimal builds (see BUG 50519).
3918
3919         * JavaScriptCore.pri: link as whole-archive for WebKit2 builds
3920
3921 2011-01-20  Zoltan Horvath  <zoltan@webkit.org>
3922
3923         Reviewed by Csaba Osztrogonác.
3924
3925         Refactoring of the custom allocation framework
3926         https://bugs.webkit.org/show_bug.cgi?id=49897
3927
3928         Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
3929         The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
3930         equivalent macro implementation at the necessary places.
3931
3932         * wtf/FastAllocBase.h: Turn FastAllocBase's implementation into a macro.
3933
3934 2011-01-20  Mark Rowe  <mrowe@apple.com>
3935
3936         Reviewed by Maciej Stachowiak.
3937
3938         Follow-up to r75766 / <rdar://problem/5469576>.
3939
3940         We were failing to initialize the key, causing all sorts of unexpected behavior.
3941
3942         * wtf/FastMalloc.cpp:
3943         (WTF::setThreadHeap):
3944         (WTF::TCMalloc_ThreadCache::GetThreadHeap):
3945         (WTF::TCMalloc_ThreadCache::InitTSD): Ensure that the key is initialized.
3946
3947 2011-01-18  Geoffrey Garen  <ggaren@apple.com>
3948
3949         Reviewed by Darin Adler.
3950
3951         Rolled back in r76078, with crash fixed.
3952         https://bugs.webkit.org/show_bug.cgi?id=52668
3953         
3954         * runtime/JSGlobalObject.cpp:
3955         (JSC::JSGlobalObject::markChildren): Account for the fact that the global
3956         object moves its variables into and out of the register file. While out
3957         of the register file, the symbol table's size is not an accurate count
3958         for the size of the register array, since the BytecodeGenerator might
3959         be compiling, adding items to the symbol table.
3960         
3961 2011-01-18  Darin Adler  <darin@apple.com>
3962
3963         Reviewed by Geoffrey Garen.
3964
3965         Stack overflow when converting an Error object to string
3966         https://bugs.webkit.org/show_bug.cgi?id=46410
3967
3968         * Android.mk: Added StringRecursionChecker.cpp and
3969         StringRecursionChecker.h.
3970         * CMakeLists.txt: Ditto.
3971         * GNUmakefile.am: Ditto.
3972         * JavaScriptCore.gypi: Ditto.
3973         * JavaScriptCore.pro: Ditto.
3974         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
3975         * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
3976
3977         * runtime/ArrayPrototype.cpp:
3978         (JSC::arrayProtoFuncToString): Use StringRecursionChecker instead
3979         of the older hand-written code to do the same thing.
3980         (JSC::arrayProtoFuncToLocaleString): Ditto.
3981         (JSC::arrayProtoFuncJoin): Ditto.
3982
3983         * runtime/ErrorPrototype.cpp:
3984         (JSC::errorProtoFuncToString): Use StringRecursionChecker.
3985
3986         * runtime/JSGlobalData.h: Renamed arrayVisitedElements to
3987         stringRecursionCheckVisitedObjects.
3988
3989         * runtime/RegExpPrototype.cpp:
3990         (JSC::regExpProtoFuncToString): Use StringRecursionChecker.
3991
3992         * runtime/StringRecursionChecker.cpp: Added.
3993         * runtime/StringRecursionChecker.h: Added.
3994
3995 2011-01-19  Oliver Hunt  <oliver@apple.com>
3996
3997         Reviewed by Gavin Barraclough.
3998
3999         Remove non-spec support for callable RegExp
4000         https://bugs.webkit.org/show_bug.cgi?id=28285
4001
4002         Remove support for callable regexps.  If it breaks sites we can
4003         just roll this out.
4004
4005         * runtime/RegExpObject.cpp:
4006         * runtime/RegExpObject.h:
4007         * tests/mozilla/expected.html: update results.
4008
4009 2011-01-19  Antti Koivisto  <antti@apple.com>
4010
4011         Reviewed by Oliver Hunt.
4012
4013         Cache function offsets to speed up javascript parsing
4014         https://bugs.webkit.org/show_bug.cgi?id=52622
4015         
4016         Use cache to save function offsets and some other info.
4017         This avoids quite a bit of work when reparsing the source.
4018
4019         * parser/ASTBuilder.h:
4020         * parser/JSParser.cpp:
4021         (JSC::JSParser::CachedFunctionInfo::CachedFunctionInfo):
4022         (JSC::JSParser::CachedFunctionInfo::approximateByteSize):
4023         (JSC::JSParser::CachedFunctionInfo::closeBraceToken):
4024         (JSC::JSParser::Scope::copyCapturedVariablesToVector):
4025         (JSC::JSParser::Scope::saveFunctionInfo):
4026         (JSC::JSParser::Scope::restoreFunctionInfo):
4027         (JSC::JSParser::findCachedFunctionInfo):
4028         (JSC::JSParser::JSParser):
4029         (JSC::JSParser::parseProgram):
4030         (JSC::JSParser::parseFunctionInfo):
4031         * parser/Lexer.h:
4032         (JSC::Lexer::setOffset):
4033         (JSC::Lexer::setLineNumber):
4034         (JSC::Lexer::sourceProvider):
4035         * parser/SourceProvider.h:
4036         (JSC::SourceProviderCache::SourceProviderCache):
4037         (JSC::SourceProviderCache::~SourceProviderCache):
4038         (JSC::SourceProviderCache::byteSize):
4039         (JSC::SourceProviderCache::add):
4040         (JSC::SourceProviderCache::get):
4041         (JSC::SourceProvider::SourceProvider):
4042         (JSC::SourceProvider::~SourceProvider):
4043         (JSC::SourceProvider::cache):
4044         (JSC::SourceProvider::notifyCacheSizeChanged):
4045         (JSC::SourceProvider::cacheSizeChanged):
4046         * parser/SyntaxChecker.h: