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