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