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