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