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