2011-03-02 Daniel Cheng <dcheng@chromium.org>
[WebKit-https.git] / Source / JavaScriptCore / ChangeLog
1 2011-03-02  Daniel Cheng  <dcheng@chromium.org>
2
3         Reviewed by David Levin.
4
5         Add feature define for data transfer items
6         https://bugs.webkit.org/show_bug.cgi?id=55510
7
8         * Configurations/FeatureDefines.xcconfig:
9         * wtf/Platform.h:
10
11 2011-03-02  Adam Roben  <aroben@apple.com>
12
13         Delete old .res files whenever any .vsprops file changes
14
15         Prospective fix for <http://webkit.org/b/55599> r80079 caused incremental Windows builds to
16         fail
17
18         Reviewed by Tony Chang.
19
20         * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
21         (main): Restructured code to loop over a set of file extensions, deleting any old files that
22         have that extension. Now deletes .res files, too. (We previously deleted any file matching
23         *.manifest*, but that turned out to just be the union of *.manifest and *.res.)
24
25 2011-03-02  Adam Barth  <abarth@webkit.org>
26
27         Reviewed by Dimitri Glazkov.
28
29         Teach JavaScriptCore GYP build how to build minidom
30         https://bugs.webkit.org/show_bug.cgi?id=55536
31
32         * JavaScriptCore.gypi:
33         * gyp/JavaScriptCore.gyp:
34
35 2011-03-01  Adam Barth  <abarth@webkit.org>
36
37         Reviewed by Eric Seidel.
38
39         JavaScriptCore GYP build should copy some headers into the target framework
40         https://bugs.webkit.org/show_bug.cgi?id=55524
41
42         After this patch, all the framework headers are exported as public
43         headers.  We need to teach GYP how to handle private headers.
44
45         I struggled to determine how to store the information about whether a
46         header was public, private, or project (i.e., not exported).
47         Generally, the GYPI should just list the files, but it seemed siliy to
48         have an almost duplicated list of files in the GYP file itself.  If
49         this design doesn't scale, we might have to revisit it in the future.
50
51         * JavaScriptCore.gyp/JavaScriptCore.gyp:
52         * JavaScriptCore.gypi:
53         * gyp/JavaScriptCore.gyp:
54
55 2011-03-01  Sheriff Bot  <webkit.review.bot@gmail.com>
56
57         Unreviewed, rolling out r80079.
58         http://trac.webkit.org/changeset/80079
59         https://bugs.webkit.org/show_bug.cgi?id=55547
60
61         "Broke the Win debug build?" (Requested by dcheng on #webkit).
62
63         * wtf/Platform.h:
64
65 2011-03-01  Daniel Cheng  <dcheng@chromium.org>
66
67         Reviewed by David Levin.
68
69         Add feature define for data transfer items
70         https://bugs.webkit.org/show_bug.cgi?id=55510
71
72         * wtf/Platform.h:
73
74 2011-03-01  Oliver Hunt  <oliver@apple.com>
75
76         Reviewed by Joseph Pecoraro.
77
78         Misaligned memory access in CloneDeserializer on all ARM arch.
79         https://bugs.webkit.org/show_bug.cgi?id=48742
80
81         Add a CPU class for architectures that need aligned addresses
82         for memory access.
83
84         * wtf/Platform.h:
85
86 2011-03-01  Adam Barth  <abarth@webkit.org>
87
88         Reviewed by Dimitri Glazkov.
89
90         Add pre- and post-build actions for JavaScriptCore GYP build
91         https://bugs.webkit.org/show_bug.cgi?id=55507
92
93         After this patch, we have all the steps for building the main
94         JavaScriptCore framework except the "copy headers" step, which I'll do
95         next.
96
97         * gyp/JavaScriptCore.gyp:
98
99 2011-03-01  Geoffrey Garen  <ggaren@apple.com>
100
101         Reviewed by Sam Weinig.
102
103         Rolled back in r79627 now that the underlying cause for it crashing is fixed.
104         https://bugs.webkit.org/show_bug.cgi?id=55159
105
106         * JavaScriptCore.exp:
107         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
108         * JavaScriptCore.xcodeproj/project.pbxproj:
109         * runtime/Heap.cpp:
110         (JSC::Heap::allocateSlowCase):
111         * runtime/Heap.h:
112         * runtime/JSCell.h:
113         (JSC::JSCell::MarkedSpace::sizeClassFor):
114         (JSC::JSCell::Heap::allocate):
115         (JSC::JSCell::JSCell::operator new):
116         * runtime/MarkedBlock.h:
117         * runtime/MarkedSpace.cpp:
118         (JSC::MarkedSpace::MarkedSpace):
119         (JSC::MarkedSpace::allocateBlock):
120         (JSC::MarkedSpace::reset):
121         * runtime/MarkedSpace.h:
122         (JSC::MarkedSpace::SizeClass::SizeClass):
123
124 2011-03-01  Mark Rowe  <mrowe@apple.com>
125
126         Reviewed by Sam Weinig.
127
128         Replace two script phases that do nothing but copy files with copy files build phases.
129
130         This speeds up the build by a few seconds on high-end Mac Pros.
131
132         * JavaScriptCore.xcodeproj/project.pbxproj:
133
134 2011-03-01  David Kilzer  <ddkilzer@apple.com>
135
136         Spring cleaning!
137
138         Rubber-stamped by Mark Rowe.
139
140         * JavaScriptCore.xcodeproj/project.pbxproj:
141         (Copy Into Framework): Remove "set -x" and its comment.
142
143 2011-03-01  Michael Saboff  <msaboff@apple.com>
144
145         Reviewed by Darin Adler.
146
147         TinyMCE not working in nightlies
148         https://bugs.webkit.org/show_bug.cgi?id=54978
149
150         Disabling setupBeginChars() to temporarily work arround the test 
151         failure.  Filed https://bugs.webkit.org/show_bug.cgi?id=55479
152         to track fixing the issue.
153
154         * yarr/YarrPattern.cpp:
155         (JSC::Yarr::YarrPattern::compile):
156
157 2011-02-23  Joseph Pecoraro  <joepeck@webkit.org>
158
159         Reviewed by Kenneth Rohde Christiansen.
160
161         Viewport parsing no longer accepts "1.0;" value as valid.
162         https://bugs.webkit.org/show_bug.cgi?id=53705
163
164         Include a didReadNumber parameter to String -> float / double
165         conversion functions. This way, if the "ok" boolean out
166         parameter is false, you can check to see if there in fact
167         was a valid number parsed with garbage at the end. Examples
168         of that would be parsing "123x456" would have ok = false,
169         but didReadNumber = true.
170
171         * JavaScriptCore.exp:
172         * wtf/text/StringImpl.cpp:
173         (WTF::StringImpl::toDouble):
174         (WTF::StringImpl::toFloat):
175         * wtf/text/StringImpl.h:
176         * wtf/text/WTFString.cpp:
177         (WTF::String::toDouble):
178         (WTF::String::toFloat):
179         (WTF::charactersToDouble):
180         (WTF::charactersToFloat):
181         * wtf/text/WTFString.h:
182
183 2011-02-28  Geoffrey Garen  <ggaren@apple.com>
184
185         Reviewed by Gavin Barraclough.
186
187         Past-the-end writes in VM exceptions (caused crashes in r79627)
188         https://bugs.webkit.org/show_bug.cgi?id=55448
189         
190         Some exceptions had the wrong structures, so they misoverestimated their
191         inline storage sizes.
192
193         * runtime/JSGlobalData.cpp:
194         (JSC::JSGlobalData::JSGlobalData): Use the right structure.
195
196         * runtime/JSObject.h:
197         (JSC::JSNonFinalObject::JSNonFinalObject):
198         (JSC::JSFinalObject::JSFinalObject): ASSERT that our structure capacity
199         is correct to verify this doesn't happen again.
200
201 2011-03-01  Andras Becsi  <abecsi@webkit.org>
202
203         Reviewed by Csaba Osztrogon√°c.
204
205         [Qt] Clean up the project files and move common options to WebKit.pri.
206
207         * JavaScriptCore.pri: Move options also needed in WebCore into WebKit.pri.
208         * JavaScriptCore.pro: Deduplicate options.
209         * jsc.pro: Ditto.
210
211 2011-03-01  Adam Barth  <abarth@webkit.org>
212
213         Reviewed by Eric Seidel.
214
215         Teach JavaScriptCore GYP build about DEPTH
216         https://bugs.webkit.org/show_bug.cgi?id=55425
217
218         In addition to teaching the JavaScriptCore GYP build about DEPTH, this
219         change overrides the GCC warning configuration to disable a warning
220         that's causing probems in Assertions.cpp.  With that warning disabled,
221         JavaScriptCore builds again.
222
223         * gyp/JavaScriptCore.gyp:
224
225 2011-02-28  Gavin Barraclough  <barraclough@apple.com>
226
227         Windows build fix.
228
229         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
230
231 2011-02-28  Sheriff Bot  <webkit.review.bot@gmail.com>
232
233         Unreviewed, rolling out r79948.
234         http://trac.webkit.org/changeset/79948
235         https://bugs.webkit.org/show_bug.cgi?id=55439
236
237         "caused crashes on the SL release bot" (Requested by ggaren on
238         #webkit).
239
240         * runtime/JSGlobalData.h:
241         * runtime/WriteBarrier.h:
242
243 2011-02-28  Gavin Barraclough  <barraclough@apple.com>
244
245         Windows build fix.
246
247         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
248
249 2011-02-28  Gavin Barraclough  <barraclough@apple.com>
250
251         Reviewed by Sam Weinig & Darin Adler.
252
253         Bug 55423 - Clean up property tables in Structure
254
255         Encapsulate, reduce duplication of table search code,
256         and reduce the size of the tables (remove the index,
257         just maintain the tables in the correct order).
258
259         Shows a 0.5% - 1% progression on sunspider.
260
261         * JavaScriptCore.exp:
262         * runtime/PropertyMapHashTable.h:
263         (JSC::isPowerOf2):
264         (JSC::nextPowerOf2):
265             bit ops used to calculate table size.
266         (JSC::PropertyMapEntry::PropertyMapEntry):
267         (JSC::PropertyTable::ordered_iterator::operator++):
268         (JSC::PropertyTable::ordered_iterator::operator==):
269         (JSC::PropertyTable::ordered_iterator::operator!=):
270         (JSC::PropertyTable::ordered_iterator::operator*):
271         (JSC::PropertyTable::ordered_iterator::operator->):
272         (JSC::PropertyTable::ordered_iterator::ordered_iterator):
273             implementation of the iterator types
274         (JSC::PropertyTable::PropertyTable):
275         (JSC::PropertyTable::~PropertyTable):
276             constructors take an initial capacity for the table,
277             a table to copy, or both.
278         (JSC::PropertyTable::begin):
279         (JSC::PropertyTable::end):
280             create in-order iterators.
281         (JSC::PropertyTable::find):
282             search the hash table
283         (JSC::PropertyTable::add):
284             add a value to the hash table
285         (JSC::PropertyTable::remove):
286             remove a value from the hash table
287         (JSC::PropertyTable::size):
288         (JSC::PropertyTable::isEmpty):
289             accessors.
290         (JSC::PropertyTable::propertyStorageSize):
291         (JSC::PropertyTable::clearDeletedOffsets):
292         (JSC::PropertyTable::hasDeletedOffset):
293         (JSC::PropertyTable::getDeletedOffset):
294         (JSC::PropertyTable::addDeletedOffset):
295             cache deleted (available) offsets in the property storage array.
296         (JSC::PropertyTable::copy):
297             take a copy of the PropertyTable, potentially expanding the capacity.
298         (JSC::PropertyTable::sizeInMemory):
299             used for DEBUG build statistics
300         (JSC::PropertyTable::reinsert):
301         (JSC::PropertyTable::rehash):
302         (JSC::PropertyTable::tableCapacity):
303         (JSC::PropertyTable::deletedEntryIndex):
304         (JSC::PropertyTable::skipDeletedEntries):
305         (JSC::PropertyTable::table):
306         (JSC::PropertyTable::usedCount):
307         (JSC::PropertyTable::dataSize):
308         (JSC::PropertyTable::sizeForCapacity):
309         (JSC::PropertyTable::canInsert):
310             these methods provide internal implementation.
311         * runtime/Structure.cpp:
312         (JSC::Structure::dumpStatistics):
313         (JSC::Structure::~Structure):
314         (JSC::Structure::materializePropertyMap):
315         (JSC::Structure::despecifyDictionaryFunction):
316         (JSC::Structure::addPropertyTransition):
317         (JSC::Structure::flattenDictionaryStructure):
318         (JSC::Structure::copyPropertyTable):
319         (JSC::Structure::get):
320         (JSC::Structure::despecifyFunction):
321         (JSC::Structure::despecifyAllFunctions):
322         (JSC::Structure::put):
323         (JSC::Structure::remove):
324         (JSC::Structure::createPropertyMap):
325         (JSC::Structure::getPropertyNames):
326         (JSC::PropertyTable::checkConsistency):
327         (JSC::Structure::checkConsistency):
328             factored out code to PropertyMapHashTable.h
329         * runtime/Structure.h:
330         (JSC::Structure::propertyStorageSize):
331         (JSC::Structure::isEmpty):
332         (JSC::Structure::get):
333             factored out code to PropertyMapHashTable.h
334
335 2011-02-28  Xan Lopez  <xlopez@igalia.com>
336
337         Another fix build :(
338
339         Fix typo.
340
341         * runtime/MachineStackMarker.cpp:
342         (JSC::freePlatformThreadRegisters):
343
344 2011-02-28  Xan Lopez  <xlopez@igalia.com>
345
346         Unreviewed build fix for Snow Leopard.
347
348         * runtime/MachineStackMarker.cpp:
349         (JSC::freePlatformThreadRegisters):
350
351 2011-02-28  Alejandro G. Castro  <alex@igalia.com>
352
353         Unreviewed, fix SnowLeopard compilation after r79952.
354
355         * runtime/MachineStackMarker.cpp:
356         (JSC::freePlatformThreadRegisters):
357
358 2011-02-28  Mark Rowe  <mrowe@apple.com>
359
360         Reviewed by Darin Adler.
361
362         <http://webkit.org/b/55430> OwnArrayPtr.h's LOOSE_OWN_ARRAY_PTR results in link errors.
363
364         * wtf/OwnArrayPtr.h:
365         (WTF::::set): Implement OwnArrayPtr::set.
366
367 2011-02-28  Martin Zoubek  <martin.zoubek@acision.com> and Alejandro G. Castro  <alex@igalia.com>
368
369         Reviewed by Martin Robinson.
370
371         Multithread support for JSC on UNIX
372         https://bugs.webkit.org/show_bug.cgi?id=26838
373
374         Implement suspendThread() and resumeThread() for systems with
375         pthread.h using thread signal handler.
376
377         * runtime/MachineStackMarker.cpp:
378         (JSC::pthreadSignalHandlerSuspendResume):
379         (JSC::MachineStackMarker::Thread::Thread):
380         (JSC::getCurrentPlatformThread):
381         (JSC::suspendThread):
382         (JSC::resumeThread):
383         (JSC::getPlatformThreadRegisters):
384         (JSC::otherThreadStackPointer):
385         (JSC::freePlatformThreadRegisters):
386         (JSC::MachineStackMarker::markOtherThreadConservatively):
387         * wtf/Platform.h: Added Gtk port to use
388         ENABLE_JSC_MULTIPLE_THREADS.
389
390 2011-02-28  Oliver Hunt  <oliver@apple.com>
391
392         Reviewed by Darin Adler.
393
394         Stop using DeprecatedPtr for the global exception slot
395         https://bugs.webkit.org/show_bug.cgi?id=55424
396
397         Create GCRootPtr to signify that the exception slot is
398         a gcroot, and so is exempt from the usual writebarrier
399         restrictions.
400
401         * runtime/JSGlobalData.h:
402         * runtime/WriteBarrier.h:
403         (JSC::GCRootPtr::GCRootPtr):
404         (JSC::GCRootPtr::operator=):
405
406 2011-02-28  Adam Barth  <abarth@webkit.org>
407
408         Reviewed by Dimitri Glazkov.
409
410         Use more xcconfig files in JavaScriptCore gyp build
411         https://bugs.webkit.org/show_bug.cgi?id=55391
412
413         The GYP experts tell me that we have have a total of two xcconfig
414         files: one for the xcodeproj as a whole and one for each target.  This
415         patch uses that technique to re-use the existing xcconfig files and
416         eliminate the duplication.
417
418         Technically, this patch introduces some build errors because the
419         xcconfig files assume that the xcodeproj file is one level higher in
420         the directory hierarchy.  Specifically, the xcodeproj file can no
421         longer find the Info.plist or the prefix header.  I plan to fix that in
422         a subsequent patch.
423
424         Also, this patch introduces the Release and Production configurations,
425         which should work correctly now.
426
427         * gyp/JavaScriptCore.gyp:
428
429 2011-02-28  Jon Honeycutt  <jhoneycutt@apple.com>
430
431         Windows build fix.
432
433         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
434         Add symbol to export.
435
436 2011-02-28  Oliver Hunt  <oliver@apple.com>
437
438         Reviewed by Gavin Barraclough.
439
440         Make ScopeChainNode GC allocated
441         https://bugs.webkit.org/show_bug.cgi?id=55283
442
443         Simplify lifetime and other issues with the scopechain
444         by making it gc allocated.  This allows us to simplify
445         function exit and unwinding, as well as making the
446         current iterative refcounting go away.
447
448         * JavaScriptCore.exp:
449         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
450         * bytecode/CodeBlock.cpp:
451         (JSC::CodeBlock::createActivation):
452         * bytecode/StructureStubInfo.cpp:
453         * bytecompiler/BytecodeGenerator.cpp:
454         (JSC::BytecodeGenerator::generate):
455         (JSC::BytecodeGenerator::BytecodeGenerator):
456         (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
457         (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
458         * bytecompiler/BytecodeGenerator.h:
459         * debugger/Debugger.cpp:
460         (JSC::Recompiler::operator()):
461         * debugger/DebuggerCallFrame.h:
462         (JSC::DebuggerCallFrame::scopeChain):
463         * interpreter/CachedCall.h:
464         (JSC::CachedCall::CachedCall):
465         * interpreter/CallFrame.h:
466         * interpreter/Interpreter.cpp:
467         (JSC::depth):
468         (JSC::Interpreter::unwindCallFrame):
469         (JSC::Interpreter::throwException):
470         (JSC::Interpreter::execute):
471         (JSC::Interpreter::executeCall):
472         (JSC::Interpreter::executeConstruct):
473         (JSC::Interpreter::privateExecute):
474         * jit/JITCall.cpp:
475         (JSC::JIT::compileOpCallInitializeCallFrame):
476         (JSC::JIT::compileOpCall):
477         * jit/JITCall32_64.cpp:
478         (JSC::JIT::compileOpCallInitializeCallFrame):
479         (JSC::JIT::emit_op_ret):
480         (JSC::JIT::emit_op_ret_object_or_this):
481         (JSC::JIT::compileOpCall):
482         * jit/JITOpcodes.cpp:
483         (JSC::JIT::emit_op_end):
484         (JSC::JIT::emit_op_ret):
485         (JSC::JIT::emit_op_ret_object_or_this):
486         * jit/JITOpcodes32_64.cpp:
487         (JSC::JIT::emit_op_end):
488         * jit/JITStubs.cpp:
489         (JSC::DEFINE_STUB_FUNCTION):
490         * jit/JITStubs.h:
491         * runtime/ArgList.cpp:
492         * runtime/Completion.cpp:
493         (JSC::evaluate):
494         * runtime/Completion.h:
495         * runtime/DateConversion.cpp:
496         * runtime/Executable.cpp:
497         (JSC::EvalExecutable::compileInternal):
498         (JSC::ProgramExecutable::compileInternal):
499         (JSC::FunctionExecutable::compileForCallInternal):
500         (JSC::FunctionExecutable::compileForConstructInternal):
501         * runtime/FunctionConstructor.cpp:
502         (JSC::constructFunction):
503         * runtime/GCActivityCallbackCF.cpp:
504         * runtime/Identifier.cpp:
505         * runtime/JSCell.h:
506         * runtime/JSChunk.cpp: Added.
507         * runtime/JSChunk.h: Added.
508         * runtime/JSFunction.cpp:
509         (JSC::JSFunction::JSFunction):
510         (JSC::JSFunction::markChildren):
511         (JSC::JSFunction::getCallData):
512         (JSC::JSFunction::getOwnPropertySlot):
513         (JSC::JSFunction::getConstructData):
514         * runtime/JSFunction.h:
515         (JSC::JSFunction::scope):
516         (JSC::JSFunction::setScope):
517         * runtime/JSGlobalData.cpp:
518         (JSC::JSGlobalData::JSGlobalData):
519         * runtime/JSGlobalData.h:
520         * runtime/JSGlobalObject.cpp:
521         (JSC::JSGlobalObject::init):
522         (JSC::JSGlobalObject::markChildren):
523         * runtime/JSGlobalObject.h:
524         (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
525         (JSC::JSGlobalObject::globalScopeChain):
526         * runtime/JSGlobalObjectFunctions.cpp:
527         (JSC::globalFuncEval):
528         * runtime/JSLock.cpp:
529         * runtime/JSNumberCell.cpp:
530         * runtime/JSZombie.cpp:
531         * runtime/MarkedBlock.cpp:
532         * runtime/MarkedSpace.cpp:
533         * runtime/PropertyNameArray.cpp:
534         * runtime/ScopeChain.cpp:
535         (JSC::ScopeChainNode::print):
536         (JSC::ScopeChainNode::localDepth):
537         (JSC::ScopeChainNode::markChildren):
538         * runtime/ScopeChain.h:
539         (JSC::ScopeChainNode::ScopeChainNode):
540         (JSC::ScopeChainNode::createStructure):
541         (JSC::ScopeChainNode::push):
542         (JSC::ScopeChainNode::pop):
543         (JSC::ScopeChainIterator::ScopeChainIterator):
544         (JSC::ScopeChainIterator::operator*):
545         (JSC::ScopeChainIterator::operator->):
546         (JSC::ScopeChainIterator::operator++):
547         (JSC::ScopeChainNode::begin):
548         (JSC::ScopeChainNode::end):
549         (JSC::ExecState::globalData):
550         (JSC::ExecState::lexicalGlobalObject):
551         (JSC::ExecState::globalThisValue):
552         * runtime/ScopeChainMark.h:
553         * wtf/DateMath.cpp:
554
555 2011-02-27  Adam Barth  <abarth@webkit.org>
556
557         Reviewed by Eric Seidel.
558
559         Implement WTF::randomNumber in terms of WTF::cryptographicallyRandomNumber when possible
560         https://bugs.webkit.org/show_bug.cgi?id=55326
561
562         Currently, randomNumber does a bunch of platform-specific work that to
563         get a cryptographic randomness when available.  Instead, we should use
564         cryptographicallyRandomNumber, which abstracts this work.
565         Unfortunately, we can't remove all of the WTF::randomNumber
566         implementation because not every port has access to cryptographically
567         random numbers.
568
569         * wtf/RandomNumber.cpp:
570         (WTF::randomNumber):
571
572 2011-02-27  Benjamin Poulain  <ikipou@gmail.com>
573
574         Reviewed by Darin Adler.
575
576         Eliminate DeprecatedPtrList from RenderBlock
577         https://bugs.webkit.org/show_bug.cgi?id=54972
578
579         Add methods find() and contains() using an adaptor to ListHashSet.
580         Those method are like the one of HashSet, they allow to find objects
581         based on a different key than the one used to define the set.
582
583         Add convenience methods for direct access to the head and tail of the list.
584         Those methods are providing similar API/behavior as Vector.
585
586         * wtf/ListHashSet.h:
587         (WTF::::first):
588         (WTF::::last):
589         (WTF::::removeLast):
590         (WTF::ListHashSetTranslatorAdapter::hash):
591         (WTF::ListHashSetTranslatorAdapter::equal):
592         (WTF::::find):
593         (WTF::::contains):
594
595 2011-02-26  Patrick Gansterer  <paroga@webkit.org>
596
597         Reviewed by Andreas Kling.
598
599         Add support for DragonFly BSD
600         https://bugs.webkit.org/show_bug.cgi?id=54407
601
602         DragonFly BSD is based on FreeBSD, so handle it like FreeBSD.
603
604         * wtf/Platform.h:
605
606 2011-02-26  Adam Barth  <abarth@webkit.org>
607
608         Reviewed by Dimitri Glazkov.
609
610         JavaScriptCore should use the xcconfig file instead of importing that information into GYP
611         https://bugs.webkit.org/show_bug.cgi?id=55282
612
613         Technically, this breaks the build because I had removed one of the
614         warnings in this config file, but this change seems like an
615         improvement.
616
617         * gyp/JavaScriptCore.gyp:
618
619 2011-02-26  Thouraya ANDOLSI  <thouraya.andolsi@st.com>
620
621         Reviewed by Nikolas Zimmermann.
622
623         SH4 JIT SUPPORT
624         https://bugs.webkit.org/show_bug.cgi?id=44329
625
626         Provide an ExecutableAllocater::cacheFlush() implementation for
627         Linux/SH4.
628
629         * jit/ExecutableAllocator.h:
630         (JSC::ExecutableAllocator::cacheFlush):
631
632 2011-02-25  Sheriff Bot  <webkit.review.bot@gmail.com>
633
634         Unreviewed, rolling out r79627.
635         http://trac.webkit.org/changeset/79627
636         https://bugs.webkit.org/show_bug.cgi?id=55274
637
638         broke worker tests (Requested by olliej on #webkit).
639
640         * JavaScriptCore.exp:
641         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
642         * runtime/Heap.cpp:
643         (JSC::Heap::allocate):
644         * runtime/Heap.h:
645         * runtime/JSCell.h:
646         (JSC::JSCell::JSCell::operator new):
647         (JSC::JSCell::MarkedSpace::sizeClassFor):
648         (JSC::JSCell::MarkedSpace::allocate):
649         * runtime/MarkedBlock.h:
650         * runtime/MarkedSpace.cpp:
651         (JSC::MarkedSpace::MarkedSpace):
652         (JSC::MarkedSpace::allocateBlock):
653         (JSC::MarkedSpace::reset):
654         * runtime/MarkedSpace.h:
655         (JSC::MarkedSpace::SizeClass::SizeClass):
656
657 2011-02-25  Michael Saboff  <msaboff@apple.com>
658
659         Reviewed by Darin Adler.
660
661         Leak in JSParser::Scope of ScopeLabelInfo Vector
662         https://bugs.webkit.org/show_bug.cgi?id=55249
663
664         Changed m_labels to be an OwnPtr<>.  Added VectorTraits
665         and Scope copy constructor to support this change.
666
667         * parser/JSParser.cpp:
668         (JSC::JSParser::Scope::~Scope):
669
670 2011-02-25  Fumitoshi Ukai  <ukai@chromium.org>
671
672         Reviewed by Adam Barth.
673
674         WebSocket uses insecure random numbers
675         https://bugs.webkit.org/show_bug.cgi?id=54714
676
677         * JavaScriptCore.exp: Export WTF::cryptographicallyRandomNumber()
678
679 2011-02-25  Patrick Gansterer  <paroga@webkit.org>
680
681         Reviewed by Adam Roben.
682
683         Move timeBeginPeriod into OS(WINDOWS) section
684         https://bugs.webkit.org/show_bug.cgi?id=55247
685
686         * jsc.cpp:
687         (main): timeBeginPeriod is available on all Windows versions and not compiler specific.
688
689 2011-02-25  Patrick Gansterer  <paroga@webkit.org>
690
691         Unreviewed WinCE build fix for r79695.
692
693         * jsc.cpp:
694         (main): SetErrorMode isn't available on WinCE.
695
696 2011-02-25  Adam Roben  <aroben@apple.com>
697
698         Work around Cygwin's crash-suppression behavior
699
700         Cygwin calls ::SetErrorMode(SEM_FAILCRITICALERRORS), which any processes it launches will
701         inherit. This is bad for testing/debugging, as it causes the post-mortem debugger not to be
702         invoked. (Cygwin does this because it makes crashes more UNIX-y.) We reset the error mode
703         when our test apps launch to work around Cygwin's behavior.
704
705         Fixes <http://webkit.org/b/55222> Test apps crash silently (without invoking post-mortem
706         debugger) when launched from Cygwin 1.7
707
708         Reviewed by Darin Adler.
709
710         * API/tests/testapi.c: Added a now-needed #include.
711         (main):
712         * jsc.cpp:
713         (main):
714         Call ::SetErrorMode(0) to undo Cygwin's folly.
715
716         * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Define NOMINMAX like many of our
717         other projects do so that windows.h won't define min/max macros that interfere with
718         std::numeric_limits<T>::min/max.
719
720 2011-02-24  Adam Barth  <abarth@webkit.org>
721
722         Reviewed by Eric Seidel.
723
724         Add GYP project for JavaScriptCore
725         https://bugs.webkit.org/show_bug.cgi?id=55027
726
727         Again, this GYP files is very rough, but it succeeds in building
728         JavaScriptCore.  There's a lot more work to do here, especially in the
729         area of sharing with JavaScriptGlue.gyp.  This patch is more of a
730         checkpoint so that other folks can help out if they wish.
731
732         * gyp: Added.
733         * gyp/JavaScriptCore.gyp: Added.
734         * gyp/generate-derived-sources.sh: Added.
735
736 2011-02-24  Adam Barth  <abarth@webkit.org>
737
738         Reviewed by Eric Seidel.
739
740         Add missing files to JavaScriptCore.gypi
741         https://bugs.webkit.org/show_bug.cgi?id=55193
742
743         I forgot to add mm files in my previous patch.
744
745         * JavaScriptCore.gyp/JavaScriptCore.gyp:
746         * JavaScriptCore.gypi:
747
748 2011-02-24  Adam Barth  <abarth@webkit.org>
749
750         Reviewed by Eric Seidel.
751
752         Remove unused parameter name in GCActivityCallback.cpp
753         https://bugs.webkit.org/show_bug.cgi?id=55194
754
755         This change is not strictly required for the GYP-based build system,
756         but I noticed this error when working on the new build system.
757
758         * runtime/GCActivityCallback.cpp:
759         (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
760
761 2011-02-24  James Robinson  <jamesr@chromium.org>
762
763         Reviewed by Darin Fisher.
764
765         Add a USE() macro to control use of the built-in UTF8 codec
766         https://bugs.webkit.org/show_bug.cgi?id=55189
767
768         Defaults USE(BUILTIN_UTF8_CODEC) to true for all platforms except chromium, which controls the flag via features.gypi.
769
770         * wtf/Platform.h:
771
772 2011-02-24  Geoffrey Garen  <ggaren@apple.com>
773
774         Reviewed by Darin Adler.
775
776         Variable-sized allocation (but still capped at 64 bytes)
777         https://bugs.webkit.org/show_bug.cgi?id=55159
778         
779         SunSpider reports no change.
780
781         * JavaScriptCore.exp: Some day, I hope not to have to edit this file.
782
783         * runtime/Heap.cpp:
784         (JSC::Heap::allocateSlowCase): Split allocation into a fast and slow
785         case, so the fast case can inline size class selection and turn it into
786         a compile-time constant.
787         
788         Changed the collect-on-every allocation debugging switch to collect only
789         on every slow allocation, so you can still flip the switch without
790         recompiling the world. This may also be preferable for debugging purposes,
791         since collecting after every single allocation can be unusably slow,
792         and can mask problems by running destructors early.
793
794         * runtime/Heap.h: Ditto.
795
796         * runtime/JSCell.h:
797         (JSC::JSCell::MarkedSpace::sizeClassFor):
798         (JSC::JSCell::Heap::allocate):
799         (JSC::JSCell::JSCell::operator new): The inlining mentioned above.
800
801         * runtime/MarkedBlock.h: Dropped the block size from 256KB to 16KB. With
802         multiple size classes, allocating a full 256KB for the first allocation
803         in a given class can be pathologically wasteful. (8KB, or 4KB Mac and
804         8KB Windows, would be even better, but that seems to be a peformance
805         regression for now.)
806         
807         * runtime/MarkedSpace.cpp:
808         (JSC::MarkedSpace::MarkedSpace):
809         (JSC::MarkedSpace::allocateBlock):
810         (JSC::MarkedSpace::reset): There's more than one size class now, and its
811         cell size is not constant.
812
813         * runtime/MarkedSpace.h:
814         (JSC::MarkedSpace::SizeClass::SizeClass): Ditto.
815
816 2011-02-23  Oliver Hunt  <oliver@apple.com>
817
818         Reviewed by Geoffrey Garen.
819
820         Make WeakGCMap use new handle infrastructure
821         https://bugs.webkit.org/show_bug.cgi?id=55100
822
823         Remove old WeakGCMap implementation and move over to new handle
824         based logic.
825
826         This has a number of benefits, most notably it makes a WeakGCMap
827         always reflect the true state of the world by as all entries are
828         removed at the first gc cycle that makes them dead.  This allows
829         us to get rid of code in a wide variety of objects where the only
830         purpose was to remove themselves from maps.
831
832         It also means that we no longer need to have special "unchecked"
833         versions of any functions on WeakGCMap.  Alas in order to maintain
834         compatibility with the JSWeakObjectMapClear API it is still
835         necessary to have an api that resembles uncheckedRemove, this is
836         now deprecatedRemove and will be dealt with in a later patch.
837
838         In order to get correct semantics in WeakGCMap we need more
839         contextual information in the finalizer, so we've added an
840         abstract class based finaliser and a context parameter to the
841         calls.
842
843         The new an improved WeakGCMap also results in sigificantly more
844         churn in the weak handle lists so exposed some potential problems
845         during the post mark phase which have been rectified as well.
846
847         * API/JSWeakObjectMapRefPrivate.cpp:
848         * API/JSWeakObjectMapRefPrivate.h:
849         * runtime/Heap.cpp:
850         (JSC::Heap::globalObjectCount):
851         (JSC::Heap::protectedGlobalObjectCount):
852         * runtime/JSGlobalData.cpp:
853         (JSC::JSGlobalData::JSGlobalData):
854         * runtime/JSGlobalData.h:
855         * runtime/JSGlobalObject.cpp:
856         (JSC::JSGlobalObject::~JSGlobalObject):
857         (JSC::JSGlobalObject::init):
858         * runtime/WeakGCMap.h:
859         (JSC::WeakGCMap::iterator::iterator):
860         (JSC::WeakGCMap::iterator::get):
861         (JSC::WeakGCMap::iterator::getSlot):
862         (JSC::WeakGCMap::iterator::operator++):
863         (JSC::WeakGCMap::iterator::operator==):
864         (JSC::WeakGCMap::iterator::operator!=):
865         (JSC::WeakGCMap::WeakGCMap):
866         (JSC::WeakGCMap::isEmpty):
867         (JSC::WeakGCMap::clear):
868         (JSC::WeakGCMap::get):
869         (JSC::WeakGCMap::getSlot):
870         (JSC::WeakGCMap::set):
871         (JSC::WeakGCMap::take):
872         (JSC::WeakGCMap::size):
873         (JSC::WeakGCMap::deprecatedRemove):
874         (JSC::WeakGCMap::begin):
875         (JSC::WeakGCMap::end):
876         (JSC::WeakGCMap::~WeakGCMap):
877         (JSC::WeakGCMap::finalize):
878         * runtime/WeakGCPtr.h:
879         (JSC::WeakGCPtr::WeakGCPtr):
880         (JSC::WeakGCPtr::set):
881
882 2011-02-24  Oliver Hunt  <oliver@apple.com>
883
884         Reviewed by Gavin Barraclough.
885
886         Make weaklist processing deal with weak handles being removed during the iteration
887         https://bugs.webkit.org/show_bug.cgi?id=55105
888
889         It is possible for the handle heap to end up in a broken state if
890         a handle's finalizer removes either the current or next handle
891         to be visited during the post-gc cleanup.  This patch removes that
892         problem by allowing the deallocate(Node*) routine to update the
893         iterator if it is called during finalization.
894
895         * collector/handles/HandleHeap.cpp:
896         (JSC::HandleHeap::HandleHeap):
897         (JSC::HandleHeap::updateAfterMark):
898         (JSC::HandleHeap::clearWeakPointers):
899         (JSC::HandleHeap::writeBarrier):
900         (JSC::HandleHeap::protectedGlobalObjectCount):
901         * collector/handles/HandleHeap.h:
902         (JSC::Finalizer::~Finalizer):
903         (JSC::HandleHeap::getFinalizer):
904         (JSC::HandleHeap::deallocate):
905         (JSC::HandleHeap::makeWeak):
906         (JSC::HandleHeap::makeSelfDestroying):
907         (JSC::HandleHeap::Node::Node):
908         (JSC::HandleHeap::Node::setFinalizer):
909         (JSC::HandleHeap::Node::finalizer):
910         (JSC::HandleHeap::Node::finalizerContext):
911         * interpreter/RegisterFile.cpp:
912         (JSC::RegisterFile::setGlobalObject):
913         (JSC::GlobalObjectNotifier::finalize):
914         (JSC::RegisterFile::globalObjectCollectedNotifier):
915         * interpreter/RegisterFile.h:
916         (JSC::RegisterFile::RegisterFile):
917         * runtime/Heap.cpp:
918         (JSC::Heap::destroy):
919         * runtime/WeakGCPtr.h:
920         (JSC::WeakGCPtr::WeakGCPtr):
921         (JSC::WeakGCPtr::set):
922
923 2011-02-24  Michael Saboff  <msaboff@apple.com>
924
925         Reviewed by Oliver Hunt.
926
927         PatternAlternative leaked in YarrPatternConstructor::atomParenthesesEnd()
928         https://bugs.webkit.org/show_bug.cgi?id=55156
929
930         Added code to delete unneeded PatternAlternative after it is removed
931         from m_alternatives Vector.
932
933         * yarr/YarrPattern.cpp:
934         (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
935
936 2011-02-24  Eric Seidel  <eric@webkit.org>
937
938         Reviewed by Anders Carlsson.
939
940         VectorBuffer should not call malloc(0)
941         https://bugs.webkit.org/show_bug.cgi?id=55091
942
943         Turns out the malloc() call which was so hot in:
944         https://bugs.webkit.org/show_bug.cgi?id=55005
945         was actually just malloc(0).
946
947         We shouldn't be calling malloc(0) anyway, since there is no need to
948         and it might actually do work on some systems.
949         I believe on Mac it ends up taking the standard spinlocks (expensive)
950         and the code on Brew actually does a malloc(1) instead.  Neither is desirable.
951
952         * wtf/Vector.h:
953         (WTF::VectorBufferBase::allocateBuffer):
954         (WTF::VectorBufferBase::tryAllocateBuffer):
955
956 2011-02-24  Patrick Gansterer  <paroga@webkit.org>
957
958         Reviewed by Darin Adler.
959
960         Remove obsolete PLATFORM(CI)
961         https://bugs.webkit.org/show_bug.cgi?id=55082
962
963         * wtf/Platform.h:
964
965 2011-02-24  Martin Robinson  <mrobinson@igalia.com>
966
967         Reviewed by Xan Lopez.
968
969         [GTK] Remove the GFile GOwnPtr specialization
970         https://bugs.webkit.org/show_bug.cgi?id=55154
971
972         Remove the GFile specialization of GOwnPtr. It's sufficient to use GRefPtr
973         to track GFiles since they are just regular reference-counted GObjects.
974
975         * wtf/gobject/GOwnPtr.cpp: Remove GFile specialization.
976         * wtf/gobject/GOwnPtr.h: Ditto.
977
978 2011-02-24  Patrick Gansterer  <paroga@webkit.org>
979
980         Reviewed by Eric Seidel.
981
982         Rename PLATFORM(SKIA) to USE(SKIA)
983         https://bugs.webkit.org/show_bug.cgi?id=55090
984
985         * wtf/Platform.h:
986
987 2011-02-24  Patrick Gansterer  <paroga@webkit.org>
988
989         Reviewed by Alexey Proskuryakov.
990
991         Remove pthreads dependecy for JSLock
992         https://bugs.webkit.org/show_bug.cgi?id=54832
993
994         JSLock is only needed to support an obsolete execution model where JavaScriptCore
995         automatically protected against concurrent access from multiple threads.
996         So it's safe to disable it on non-mac platforms where we don't have native pthreads.
997
998         * runtime/JSLock.cpp:
999
1000 2011-02-24  Chao-ying Fu  <fu@mips.com>
1001
1002         Reviewed by Eric Seidel.
1003
1004         Fix MIPS build with new patchOffsetPut/GetByIdPropertyMapOffset1/2 values
1005         https://bugs.webkit.org/show_bug.cgi?id=54997
1006
1007         * jit/JIT.h:
1008         * jit/JITStubs.cpp:
1009         (JSC::JITThunks::JITThunks):
1010
1011 2011-02-24  Andras Becsi  <abecsi@webkit.org>
1012
1013         Reviewed by Laszlo Gombos.
1014
1015         [Qt] MinGW build fails to link
1016         https://bugs.webkit.org/show_bug.cgi?id=55050
1017
1018         Prepend the libraries of subcomponents instead of appending them
1019         to fix the library order according to the dependency of the libraries
1020
1021         * JavaScriptCore.pri: rename addJavaScriptCore to prependJavaScriptCore
1022         * jsc.pro: ditto
1023
1024 2011-02-24  Eric Seidel  <eric@webkit.org>
1025
1026         Reviewed by Adam Barth.
1027
1028         Deque<T> should support inline capacity
1029         https://bugs.webkit.org/show_bug.cgi?id=55032
1030
1031         The title says it all.  There are currently no places
1032         which use this code yet, however it's been tested in conjunction
1033         with code for bug 55005.
1034
1035         This also adds an ASSERT that capacity is never 1.  If you were able
1036         to set the capacity equal to 1, the Deque would just get confused
1037         and happily append your item but still think it had size 0.
1038
1039         * wtf/Deque.h:
1040         (WTF::DequeIterator::DequeIterator):
1041         (WTF::DequeConstIterator::DequeConstIterator):
1042         (WTF::DequeReverseIterator::DequeReverseIterator):
1043         (WTF::DequeConstReverseIterator::DequeConstReverseIterator):
1044         (WTF::::checkValidity):
1045         (WTF::::checkIndexValidity):
1046         (WTF::::invalidateIterators):
1047         (WTF::::Deque):
1048         (WTF::deleteAllValues):
1049         (WTF::::operator):
1050         (WTF::::destroyAll):
1051         (WTF::::~Deque):
1052         (WTF::::swap):
1053         (WTF::::clear):
1054         (WTF::::findIf):
1055         (WTF::::expandCapacityIfNeeded):
1056         (WTF::::expandCapacity):
1057         (WTF::::takeFirst):
1058         (WTF::::append):
1059         (WTF::::prepend):
1060         (WTF::::removeFirst):
1061         (WTF::::remove):
1062         (WTF::::addToIteratorsList):
1063         (WTF::::removeFromIteratorsList):
1064         (WTF::::DequeIteratorBase):
1065         (WTF::::~DequeIteratorBase):
1066         (WTF::::isEqual):
1067         (WTF::::increment):
1068         (WTF::::decrement):
1069         (WTF::::after):
1070         (WTF::::before):
1071         * wtf/Vector.h:
1072
1073 2011-02-22  Adam Barth  <abarth@webkit.org>
1074
1075         Reviewed by Ojan Vafai. 
1076
1077         Add missing files to JavaScriptCore.gypi 
1078         https://bugs.webkit.org/show_bug.cgi?id=55020 
1079
1080         gypi files are supposed to list every file under the sun.  This patch 
1081         adds some missing files and sorts the rest. 
1082
1083         * JavaScriptCore.gypi: 
1084
1085 2011-02-23  Geoffrey Garen  <ggaren@apple.com>
1086
1087         Reviewed by Darin Adler.
1088
1089         Refactored MarkedSpace to operate in terms of size classes
1090         https://bugs.webkit.org/show_bug.cgi?id=55106
1091         
1092         SunSpider reports no change.
1093
1094         * runtime/JSCell.h:
1095         (JSC::JSCell::MarkedSpace::sizeClassFor):
1096         (JSC::JSCell::MarkedSpace::allocate): Delegate allocation based on size
1097         class. Since these functions are inline, the compiler can constant fold
1098         them.
1099
1100         * runtime/MarkedBlock.h:
1101         (JSC::MarkedBlock::cellSize):
1102         (JSC::MarkedBlock::size): Factored out a cellSize() helper.
1103
1104         * runtime/MarkedSpace.cpp:
1105         (JSC::MarkedSpace::allocateBlock):
1106         (JSC::MarkedSpace::allocateFromSizeClass):
1107         (JSC::MarkedSpace::shrink):
1108         (JSC::MarkedSpace::reset):
1109         * runtime/MarkedSpace.h:
1110         (JSC::MarkedSpace::SizeClass::SizeClass):
1111         (JSC::MarkedSpace::SizeClass::reset): Changed to operate in terms of
1112         abstract SizeClass objects, which are independent linked lists of blocks
1113         of a certain size class, instead of a single m_heap object.
1114
1115 2011-02-23  Adam Barth  <abarth@webkit.org>
1116
1117         Reviewed by James Robinson.
1118
1119         [Chromium] Use WebKitClient for OSRandomSource instead of trying to talk to the file system in the sandbox
1120         https://bugs.webkit.org/show_bug.cgi?id=55093
1121
1122         Exclude OSRandomSource.cpp from the Chromium build.  This function is
1123         implemented in WebKit/chromium/src instead.
1124
1125         * JavaScriptCore.gyp/JavaScriptCore.gyp:
1126
1127 2011-02-23  Oliver Hunt  <oliver@apple.com>
1128
1129         Roll out r64156 as it introduces incorrect behaviour.
1130
1131         * runtime/JSByteArray.h:
1132         (JSC::JSByteArray::setIndex):
1133
1134 2011-02-23  Geoffrey Garen  <ggaren@apple.com>
1135
1136         Reviewed by Oliver Hunt.
1137
1138         Moved the "nextAtom" allocation pointer into MarkedBlock for better encapsulation
1139         https://bugs.webkit.org/show_bug.cgi?id=55079
1140         
1141         SunSpider reports no change.
1142
1143         * runtime/Heap.cpp:
1144         (JSC::Heap::reset): Moved Zombie sweeping here, up from MarkedSpace,
1145         since we want Heap to logically control MarkedSpace. MarkedSpace should
1146         never choose to sweep itself.
1147
1148         * runtime/JSCell.h:
1149         (JSC::JSCell::MarkedBlock::allocate): Updated for nextAtom becoming a
1150         member of MarkedBlock. No need to reset nextAtom to firstAtom() when
1151         we reach the end of a block, since there's now an explicit reset pass
1152         during GC.
1153
1154         * runtime/MarkedBlock.cpp:
1155         (JSC::MarkedBlock::MarkedBlock):
1156         * runtime/MarkedBlock.h:
1157         (JSC::MarkedBlock::reset): Added the nextAtom data member, and reordered
1158         some data members to improve cache locality.
1159
1160         * runtime/MarkedSpace.cpp:
1161         (JSC::MarkedSpace::MarkedSpace):
1162         (JSC::MarkedSpace::allocate):
1163         (JSC::MarkedSpace::reset):
1164         * runtime/MarkedSpace.h:
1165         (JSC::CollectorHeap::CollectorHeap): Removed nextAtom, and added an
1166         explicit reset pass.
1167
1168 2011-02-23  James Robinson  <jamesr@chromium.org>
1169
1170         Unreviewed, rolling out r79428.
1171         http://trac.webkit.org/changeset/79428
1172         https://bugs.webkit.org/show_bug.cgi?id=54714
1173
1174         Does not work in the Chromium sandbox
1175
1176         * JavaScriptCore.exp:
1177
1178 2011-02-23  Adam Roben  <aroben@apple.com>
1179
1180         Fix an off-by-one error in JSC::appendSourceToError
1181
1182         Looks like this bug has been around since the code was first added in r35245.
1183
1184         Fixes <http://webkit.org/b/55052> <rdar://problem/9043512> Crash in JSC::appendSourceToError
1185         when running fast/dom/objc-big-method-name.html on Windows with full page heap enabled
1186
1187         Reviewed by Darin Adler.
1188
1189         * interpreter/Interpreter.cpp:
1190         (JSC::appendSourceToError): When trimming whitespace off the end of the string, examine the
1191         character at stop-1 rather than at stop. At this point in the code, stop represents the
1192         index just past the end of the characters we care about, and can even be just past the end
1193         of the entire data buffer.
1194
1195 2011-02-23  Geoffrey Garen  <ggaren@apple.com>
1196
1197         Reviewed by Darin Adler.
1198         
1199         Rolled back in r79367 with SnowLeopard Release bot crash fixed.
1200         https://bugs.webkit.org/show_bug.cgi?id=54999
1201         
1202         The crash was caused by failure to update the "nextBlock" pointer when
1203         removing a block from the list while shrinking. The fix is to update the
1204         "nextBlock" pointer.
1205         
1206         This crash was very rare because it only happened in cases where the very
1207         first block in the heap contained no marked cells.
1208
1209 2011-02-23  Dan Bernstein  <mitz@apple.com>
1210
1211         Reviewed by Gavin Barraclough.
1212
1213         Include frame numbers in backtraces.
1214         https://bugs.webkit.org/show_bug.cgi?id=55060
1215
1216         * wtf/Assertions.cpp:
1217
1218 2011-02-23  Xan Lopez  <xlopez@igalia.com>
1219
1220         Reviewed by Gavin Barraclough.
1221
1222         latest jsc for armv7 crashes in sunspider tests
1223         https://bugs.webkit.org/show_bug.cgi?id=54667
1224
1225         Update JIT offset values in ARMv7 after r78732. Fixes crashes in
1226         SunSpider and JavaScript tests.
1227
1228         * jit/JIT.h: update values.
1229
1230 2011-02-23  Sheriff Bot  <webkit.review.bot@gmail.com>
1231
1232         Unreviewed, rolling out r79418.
1233         http://trac.webkit.org/changeset/79418
1234         https://bugs.webkit.org/show_bug.cgi?id=55043
1235
1236         "breaks shlib linux build" (Requested by morrita on #webkit).
1237
1238         * JavaScriptCore.gyp/JavaScriptCore.gyp:
1239         * JavaScriptCore.gypi:
1240
1241 2011-02-23  Patrick Gansterer  <paroga@webkit.org>
1242
1243         Reviewed by Alexey Proskuryakov.
1244
1245         Use DEFINE_STATIC_LOCAL for ignoreSetMutex in Structure.cpp
1246         https://bugs.webkit.org/show_bug.cgi?id=54831
1247
1248         * runtime/InitializeThreading.cpp:
1249         (JSC::initializeThreadingOnce):
1250         * runtime/Structure.cpp:
1251         (JSC::ignoreSetMutex):
1252         (JSC::Structure::Structure):
1253         (JSC::Structure::~Structure):
1254         (JSC::Structure::initializeThreading):
1255         * runtime/Structure.h:
1256
1257 2011-02-23  Patrick Gansterer  <paroga@webkit.org>
1258
1259         Reviewed by Darin Adler.
1260
1261         Rename PLATFORM(CF) to USE(CF)
1262         https://bugs.webkit.org/show_bug.cgi?id=53540
1263
1264         * runtime/DatePrototype.cpp:
1265         * runtime/GCActivityCallbackCF.cpp:
1266         * runtime/JSGlobalData.cpp:
1267         (JSC::JSGlobalData::JSGlobalData):
1268         * wtf/CurrentTime.cpp:
1269         * wtf/Platform.h:
1270         * wtf/text/AtomicString.h:
1271         * wtf/text/StringImpl.h:
1272         (WTF::StringImpl::computeHash):
1273         * wtf/text/WTFString.h:
1274         * wtf/unicode/icu/CollatorICU.cpp:
1275         (WTF::Collator::userDefault):
1276
1277 2011-02-23  Fumitoshi Ukai  <ukai@chromium.org>
1278
1279         Unreviewed build fix for Windows.
1280
1281         WebSocket uses insecure random numbers
1282         https://bugs.webkit.org/show_bug.cgi?id=54714
1283
1284         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export WTF::cryptographicallyRandomNumber()
1285
1286 2011-02-23  Fumitoshi Ukai  <ukai@chromium.org>
1287
1288         Reviewed by Adam Barth.
1289
1290         WebSocket uses insecure random numbers
1291         https://bugs.webkit.org/show_bug.cgi?id=54714
1292
1293         * JavaScriptCore.exp: Export WTF::cryptographicallyRandomNumber()
1294
1295 2011-02-22  Adam Barth  <abarth@webkit.org>
1296
1297         Reviewed by Ojan Vafai.
1298
1299         Add missing files to JavaScriptCore.gypi
1300         https://bugs.webkit.org/show_bug.cgi?id=55020
1301
1302         gypi files are supposed to list every file under the sun.  This patch
1303         adds some missing files and sorts the rest.
1304
1305         * JavaScriptCore.gypi:
1306
1307 2011-02-22  Sheriff Bot  <webkit.review.bot@gmail.com>
1308
1309         Unreviewed, rolling out r79367.
1310         http://trac.webkit.org/changeset/79367
1311         https://bugs.webkit.org/show_bug.cgi?id=55012
1312
1313         all layout tests are crashing on Snow Leopard (Requested by
1314         rniwa on #webkit).
1315
1316         * GNUmakefile.am:
1317         * JavaScriptCore.gypi:
1318         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1319         * JavaScriptCore.xcodeproj/project.pbxproj:
1320         * runtime/MarkedBlock.cpp:
1321         (JSC::MarkedBlock::MarkedBlock):
1322         * runtime/MarkedBlock.h:
1323         * runtime/MarkedSpace.cpp:
1324         (JSC::MarkedSpace::destroy):
1325         (JSC::MarkedSpace::allocateBlock):
1326         (JSC::MarkedSpace::freeBlock):
1327         (JSC::MarkedSpace::allocate):
1328         (JSC::MarkedSpace::shrink):
1329         (JSC::MarkedSpace::reset):
1330         * runtime/MarkedSpace.h:
1331         (JSC::CollectorHeap::collectorBlock):
1332         * wtf/CMakeLists.txt:
1333         * wtf/DoublyLinkedList.h: Removed.
1334
1335 2011-02-22  Geoffrey Garen  <ggaren@apple.com>
1336
1337         Reviewed by Oliver Hunt.
1338
1339         Manage MarkedBlocks in a linked list instead of a vector, so arbitrary removal is O(1)
1340         https://bugs.webkit.org/show_bug.cgi?id=54999
1341         
1342         SunSpider reports no change.
1343
1344         * GNUmakefile.am:
1345         * JavaScriptCore.gypi:
1346         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1347         * JavaScriptCore.xcodeproj/project.pbxproj: So many build systems, so little time.
1348         * wtf/CMakeLists.txt:
1349
1350         * runtime/MarkedBlock.cpp:
1351         (JSC::MarkedBlock::MarkedBlock):
1352         * runtime/MarkedBlock.h:
1353         (JSC::MarkedBlock::setPrev):
1354         (JSC::MarkedBlock::setNext):
1355         (JSC::MarkedBlock::prev):
1356         (JSC::MarkedBlock::next): Added linked list data members and accessors.
1357
1358         * runtime/MarkedSpace.cpp:
1359         (JSC::MarkedSpace::destroy):
1360         (JSC::MarkedSpace::allocateBlock): Stop using vector, since it doesn't exist anymore.
1361
1362         (JSC::MarkedSpace::freeBlocks): New helper function for updating relevant
1363         data structures when freeing blocks.
1364
1365         (JSC::MarkedSpace::allocate): Updated for nextBlock being a pointer and
1366         not a vector index.
1367
1368         (JSC::MarkedSpace::shrink): Construct a temporary list of empties and
1369         then free them, to avoid modifying our hash table while iterating it.
1370         This wasn't a concern before because we were using indirect array
1371         indexing, not direct pointer indexing.
1372
1373         (JSC::MarkedSpace::reset): Updated for nextBlock being a pointer and
1374         not a vector index.
1375
1376         * runtime/MarkedSpace.h:
1377         (JSC::CollectorHeap::CollectorHeap): Changed data type from vector to linked list.
1378
1379         * wtf/DoublyLinkedList.h: Added. New linked list class.
1380         (WTF::::DoublyLinkedList):
1381         (WTF::::isEmpty):
1382         (WTF::::head):
1383         (WTF::::append):
1384         (WTF::::remove):
1385
1386 2011-02-22  Gavin Barraclough  <barraclough@apple.com>
1387
1388         Windows build fix.
1389
1390         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1391
1392 2011-02-22  Gavin Barraclough  <barraclough@apple.com>
1393
1394         Reviewed by Sam Weinig.
1395
1396         Bug 54988 - Re-create StructureTransitionTable class, encapsulate transition table
1397
1398         The Structure class keeps a table of transitions to derived Structure types. Since
1399         this table commonly contains a single entry we employ an optimization where instead
1400         of holding a map, we may hold a pointer directly to a single instance of the mapped
1401         type. We use an additional bit of data to flag whether the pointer is currently
1402         pointing to a table of transitions, or a singleton transition. Previously we had
1403         commonly used a pattern of storing data in the low bits of pointers, but had moved
1404         away from this since it causes false leaks to be reported by the leaks tool. However
1405         in this case, the entries in the map are weak links - this pointer will never be
1406         responsible for keeping an object alive.  As such we can use this approach provided
1407         that the bit is set when a table is not in use (otherwise the table would appear to
1408         be leaked).
1409
1410         Additionally, the transition table currently allows two entries to exist for a given
1411         key - one specialized to a particular value, and one not specialized. This is
1412         unnecessary, wasteful, and a little inconsistent. (If you create an entry for a
1413         specialized value, then a non-specialized entry, both will exist.  If you create an
1414         entry for a non-specialized value, then try to create a specialized entry, only a
1415         non-specialized form will be allowed.)
1416
1417         This shows a small progression on v8.
1418
1419         * JavaScriptCore.exp:
1420         * runtime/JSObject.h:
1421         (JSC::JSObject::putDirectInternal):
1422         * runtime/Structure.cpp:
1423         (JSC::StructureTransitionTable::contains):
1424         (JSC::StructureTransitionTable::get):
1425         (JSC::StructureTransitionTable::remove):
1426         (JSC::StructureTransitionTable::add):
1427         (JSC::Structure::dumpStatistics):
1428         (JSC::Structure::Structure):
1429         (JSC::Structure::~Structure):
1430         (JSC::Structure::addPropertyTransitionToExistingStructure):
1431         (JSC::Structure::addPropertyTransition):
1432         * runtime/Structure.h:
1433         (JSC::Structure::get):
1434         * runtime/StructureTransitionTable.h:
1435         (JSC::StructureTransitionTable::Hash::hash):
1436         (JSC::StructureTransitionTable::Hash::equal):
1437         (JSC::StructureTransitionTable::HashTraits::emptyValue):
1438         (JSC::StructureTransitionTable::HashTraits::constructDeletedValue):
1439         (JSC::StructureTransitionTable::HashTraits::isDeletedValue):
1440         (JSC::StructureTransitionTable::StructureTransitionTable):
1441         (JSC::StructureTransitionTable::~StructureTransitionTable):
1442         (JSC::StructureTransitionTable::isUsingSingleSlot):
1443         (JSC::StructureTransitionTable::map):
1444         (JSC::StructureTransitionTable::setMap):
1445         (JSC::StructureTransitionTable::singleTransition):
1446         (JSC::StructureTransitionTable::setSingleTransition):
1447
1448 2011-02-22  Andras Becsi  <abecsi@webkit.org>
1449
1450         Reviewed by Laszlo Gombos.
1451
1452         [Qt] Redesign the build system
1453         https://bugs.webkit.org/show_bug.cgi?id=51339
1454
1455         Part 2.
1456
1457         Build WebCore as a static library, compile the WebKit API and WebKit2 API
1458         in a final step and link to WebKit2, WebCore and JSC libraries to fix
1459         linking issues resulting from stripped away symbols.
1460
1461         * JavaScriptCore.pri: Remove the workaround.
1462
1463 2011-02-21  Adam Roben  <aroben@apple.com>
1464
1465         Fix linker warning on Windows
1466
1467         r79135 tried to export JSObject::s_info by adding it to JavaScriptCore.def. This is the
1468         obvious way (since it's how we export functions), but unfortunately it doesn't work correct.
1469         r79222 made us export it the right way (using the JS_EXPORTDATA macro), but forgot to remove
1470         it from JavaScriptCore.def. This caused us to get linker warnings about exporting the symbol
1471         multiple times.
1472
1473         Rubber-stamped by Anders Carlsson.
1474
1475         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Removed JSObject::s_info.
1476
1477 2011-02-21  Brian Weinstein  <bweinstein@apple.com>
1478
1479         Reviewed by Adam Roben.
1480
1481         WebResourceCacheManager should be responsible for managing the CFURLCache as well
1482         as the WebCore memory cache.
1483         https://bugs.webkit.org/show_bug.cgi?id=54886
1484         Part of <rdar://problem/8971738>
1485
1486         Add a new use flag for using the CFURLCache.
1487
1488         * wtf/Platform.h:
1489
1490 2011-02-21  Xan Lopez  <xlopez@igalia.com>
1491
1492         Reviewed by Gavin Barraclough.
1493
1494         Use ASSERT_JIT_OFFSET in JITPropertyAccess32_64.cpp
1495         https://bugs.webkit.org/show_bug.cgi?id=54901
1496
1497         * jit/JIT.h: swap actual and expected values in message, they were
1498         reversed.
1499         * jit/JITCall32_64.cpp:
1500         (JSC::JIT::compileOpCall): use ASSERT_JIT_OFFSET instead of
1501         a simple ASSERT.
1502         * jit/JITPropertyAccess32_64.cpp:
1503         (JSC::JIT::emit_op_method_check): ditto.
1504         (JSC::JIT::compileGetByIdHotPath): ditto.
1505         (JSC::JIT::compileGetByIdSlowCase): ditto.
1506         (JSC::JIT::emit_op_put_by_id): ditto.
1507
1508 2011-02-21  Gavin Barraclough  <barraclough@apple.com>
1509
1510         Ruber stamped by Sam Weinig
1511
1512         Bug 54899 - Math.LOG10E should be 0.4342944819032518
1513         This value is quoted in section 15.8.1.5 of the spec.
1514
1515         * runtime/MathObject.cpp:
1516         (JSC::MathObject::MathObject):
1517
1518 2011-02-21  Gavin Barraclough  <barraclough@apple.com>
1519
1520         Reviewed by Sam Weinig.
1521
1522         Bug 54894 - Make inheritance structure described by ClassInfo match C++ class hierarchy.
1523
1524         The ClassInfo objects describe an inheritance hierarchy, with each ClassInfo instance
1525         containing a pointer to its parent class. These links should reflect the inheritance
1526         hierarchy of C++ classes below JSObject. For the large part it does, but in some cases
1527         entries in the C++ hierarchy are skipped over. This presently likely doesn't matter,
1528         since intervening C++ classes may not have ClassInfo - but would be a potential bug
1529         were ClassInfo were to be added.
1530
1531         * API/JSCallbackConstructor.cpp:
1532         * API/JSCallbackFunction.cpp:
1533         * API/JSCallbackObjectFunctions.h:
1534         * runtime/Arguments.h:
1535         * runtime/ArrayPrototype.cpp:
1536         * runtime/BooleanObject.cpp:
1537         * runtime/DateInstance.cpp:
1538         * runtime/DatePrototype.cpp:
1539         * runtime/ErrorInstance.cpp:
1540         * runtime/InternalFunction.cpp:
1541         * runtime/JSActivation.cpp:
1542         * runtime/JSArray.cpp:
1543         * runtime/JSFunction.cpp:
1544         * runtime/JSONObject.cpp:
1545         * runtime/JSObject.h:
1546         * runtime/JSZombie.h:
1547         * runtime/MathObject.cpp:
1548         * runtime/NativeErrorConstructor.cpp:
1549         * runtime/NumberConstructor.cpp:
1550         * runtime/NumberObject.cpp:
1551         * runtime/RegExpConstructor.cpp:
1552         * runtime/RegExpObject.cpp:
1553         * runtime/StringObject.cpp:
1554         * runtime/StringPrototype.cpp:
1555
1556 2011-02-21  Adam Roben  <aroben@apple.com>
1557
1558         Export JSObject::s_info from JavaScriptCore.dll
1559
1560         This matches what we do for all other ClassInfo objects that WebCore needs access to.
1561
1562         Fixes <http://webkit.org/b/54881> REGRESSION (r79132): Lots of tests crashing in
1563         JSCell::inherits on Windows
1564
1565         Reviewed by Sam Weinig.
1566
1567         * runtime/JSObject.h: Added JS_EXPORTDATA to s_info.
1568
1569 2011-02-21  Kristian Amlie  <kristian.amlie@nokia.com>
1570
1571         Reviewed by Andreas Kling.
1572
1573         Switched to compiler based detection, where the error actually is.
1574
1575         It is not the platform that needs the workaround, it is the compiler.
1576
1577         QtWebKit fails to compile on Windows XP with msvc-2008
1578         https://bugs.webkit.org/show_bug.cgi?id=54746
1579
1580         * bytecode/CodeBlock.h:
1581         * runtime/RegExpObject.h:
1582
1583 2011-02-20  Gavin Barraclough  <barraclough@apple.com>
1584
1585         Reviewed by Oliver Hunt.
1586
1587         https://bugs.webkit.org/show_bug.cgi?id=54839
1588         Remove PrototypeFunction, NativeFunctionWrapper, and GlobalEvalFunction.
1589
1590         Historically, Native functions used to be represented by PrototypeFunctions, however
1591         since introducing call optimizations to the JIT this has used JSFunctions for host
1592         calls too. At the point this change was made, the interpreter continued to use
1593         PrototypeFunctions, however since fallback from the JIT to interpreter was introduced
1594         the interpreter has had to be able to run using host functions represented using
1595         JSFunctions - leading to an unnecessary and redundant divergence in behaviour between 
1596         interpreter only builds, and situations where the JIT has fallen back to interpreting.
1597
1598         NativeFunctionWrapper only existed to select between PrototypeFunction and JSFunction
1599         for wrappers for host functions, and as such can also be removed.
1600
1601         GlobalEvalFunction is a redundant wrapper that happens to be derived from
1602         PrototypeFunction. It existed to hold a reference to the global object - but since all
1603         functions how derive from JSObjectWithGlobalObject, this no longer requires an
1604         additional class to provide this functionality.
1605
1606         * JavaScriptCore.JSVALUE32_64only.exp:
1607         * JavaScriptCore.JSVALUE64only.exp:
1608         * JavaScriptCore.xcodeproj/project.pbxproj:
1609             Removed symbols / references to files.
1610
1611         * runtime/GlobalEvalFunction.cpp: Removed.
1612         * runtime/GlobalEvalFunction.h: Removed.
1613         * runtime/NativeFunctionWrapper.h: Removed.
1614         * runtime/PrototypeFunction.cpp: Removed.
1615         * runtime/PrototypeFunction.h: Removed.
1616             Removed.
1617
1618         * runtime/Executable.cpp:
1619         (JSC::NativeExecutable::~NativeExecutable):
1620         * runtime/Executable.h:
1621         (JSC::NativeExecutable::create):
1622         (JSC::NativeExecutable::NativeExecutable):
1623         (JSC::JSFunction::nativeFunction):
1624         * runtime/JSFunction.cpp:
1625         (JSC::callHostFunctionAsConstructor):
1626         (JSC::JSFunction::JSFunction):
1627         (JSC::JSFunction::getCallData):
1628         * runtime/JSFunction.h:
1629         * runtime/JSGlobalData.cpp:
1630         (JSC::JSGlobalData::getHostFunction):
1631         * runtime/JSGlobalData.h:
1632         (JSC::JSGlobalData::getCTIStub):
1633             Added interpreter-friendly constructors for NativeExecutables.
1634
1635         * bytecompiler/BytecodeGenerator.cpp:
1636         * interpreter/Interpreter.cpp:
1637         * jit/JITStubs.cpp:
1638         * jsc.cpp:
1639         * runtime/ArrayConstructor.cpp:
1640         * runtime/BooleanPrototype.cpp:
1641         * runtime/BooleanPrototype.h:
1642         * runtime/CallData.h:
1643         * runtime/DateConstructor.cpp:
1644         * runtime/DateConstructor.h:
1645         * runtime/ErrorPrototype.cpp:
1646         * runtime/ErrorPrototype.h:
1647         * runtime/FunctionPrototype.cpp:
1648         * runtime/FunctionPrototype.h:
1649         * runtime/JSGlobalObject.cpp:
1650         * runtime/JSGlobalObject.h:
1651         * runtime/JSGlobalObjectFunctions.cpp:
1652         * runtime/Lookup.cpp:
1653         * runtime/NumberPrototype.cpp:
1654         * runtime/NumberPrototype.h:
1655         * runtime/ObjectConstructor.cpp:
1656         * runtime/ObjectConstructor.h:
1657         * runtime/ObjectPrototype.cpp:
1658         * runtime/ObjectPrototype.h:
1659         * runtime/RegExpPrototype.cpp:
1660         * runtime/RegExpPrototype.h:
1661         * runtime/SmallStrings.h:
1662         * runtime/StringConstructor.cpp:
1663         * runtime/StringConstructor.h:
1664             Removed use of redundant classes.
1665
1666 2011-02-19  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1667
1668         Unreviewed build fix for Symbian.
1669
1670         [Symbian] Revert the removal of linking 
1671         against hal after r79126.
1672
1673         Dependency on the hal library can not be removed 
1674         as it is still used (e.g. in MarkStackSymbian.cpp).
1675
1676         * JavaScriptCore.pri:
1677
1678 2011-02-19  Gavin Barraclough  <barraclough@apple.com>
1679
1680         Interpreter build fix.
1681
1682         * runtime/ArrayConstructor.cpp:
1683         * runtime/BooleanPrototype.cpp:
1684         * runtime/DateConstructor.cpp:
1685         * runtime/ErrorPrototype.cpp:
1686         * runtime/FunctionPrototype.cpp:
1687         * runtime/Lookup.cpp:
1688         * runtime/NumberPrototype.cpp:
1689         * runtime/ObjectConstructor.cpp:
1690         * runtime/ObjectPrototype.cpp:
1691         * runtime/RegExpPrototype.cpp:
1692         * runtime/StringConstructor.cpp:
1693
1694 2011-02-19  Gavin Barraclough  <barraclough@apple.com>
1695
1696         Build fix!!
1697
1698         * JavaScriptCore.exp:
1699
1700 2011-02-19  Gavin Barraclough  <barraclough@apple.com>
1701
1702         Windows build fix!!
1703
1704         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1705
1706 2011-02-19  Gavin Barraclough  <barraclough@apple.com>
1707
1708         Windows build fix!
1709
1710         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1711
1712 2011-02-19  Gavin Barraclough  <barraclough@apple.com>
1713
1714         Build fix!
1715
1716         * JavaScriptCore.exp:
1717
1718 2011-02-18  Gavin Barraclough  <barraclough@apple.com>
1719
1720         Reviewed by Sam Weinig.
1721
1722         Bug 54786 - Devirtualize JSCell::classInfo()
1723
1724         Instead of making a virtual function call, add a pointer to the ClassInfo
1725         onto Structure.
1726
1727         This removes a virtual function call, and paves the way towards removing all
1728         the createStructure methods, and StructureFlags/AnonymousSlotCount properties
1729         (these should be able to move onto ClassInfo).
1730
1731         Calls to Structure::create must now pass a pointer to the ClassInfo for the
1732         structure. All objects now have a ClassInfo pointer, non-object cell types
1733         still do not.
1734
1735         Changes are most mechanical, involving three steps:
1736             * Remove virtual classInfo() methods.
1737             * Add &s_info parameter to calls to Structure::create.
1738             * Rename ClassInfo static members on classes from 'info' to 's_info',
1739               for consistency.
1740
1741         * API/JSCallbackConstructor.cpp:
1742         * API/JSCallbackConstructor.h:
1743         * API/JSCallbackFunction.cpp:
1744         * API/JSCallbackFunction.h:
1745         * API/JSCallbackObject.cpp:
1746         * API/JSCallbackObject.h:
1747         * API/JSCallbackObjectFunctions.h:
1748         * API/JSObjectRef.cpp:
1749         * API/JSValueRef.cpp:
1750         * API/JSWeakObjectMapRefPrivate.cpp:
1751         * JavaScriptCore.exp:
1752         * debugger/Debugger.cpp:
1753         * debugger/DebuggerActivation.h:
1754         * debugger/DebuggerCallFrame.cpp:
1755         * interpreter/Interpreter.cpp:
1756         * jit/JITCall32_64.cpp:
1757         * jit/JITOpcodes.cpp:
1758         * jit/JITStubs.cpp:
1759         * profiler/Profiler.cpp:
1760         * runtime/Arguments.cpp:
1761         * runtime/Arguments.h:
1762         * runtime/ArrayConstructor.cpp:
1763         * runtime/ArrayPrototype.cpp:
1764         * runtime/ArrayPrototype.h:
1765         * runtime/BooleanObject.cpp:
1766         * runtime/BooleanObject.h:
1767         * runtime/BooleanPrototype.cpp:
1768         * runtime/DateConstructor.cpp:
1769         * runtime/DateInstance.cpp:
1770         * runtime/DateInstance.h:
1771         * runtime/DatePrototype.cpp:
1772         * runtime/DatePrototype.h:
1773         * runtime/ErrorInstance.cpp:
1774         * runtime/ErrorInstance.h:
1775         * runtime/ErrorPrototype.cpp:
1776         * runtime/FunctionPrototype.cpp:
1777         * runtime/FunctionPrototype.h:
1778         * runtime/GetterSetter.h:
1779         * runtime/GlobalEvalFunction.h:
1780         * runtime/InternalFunction.cpp:
1781         * runtime/InternalFunction.h:
1782         * runtime/JSAPIValueWrapper.h:
1783         * runtime/JSActivation.cpp:
1784         * runtime/JSActivation.h:
1785         * runtime/JSArray.cpp:
1786         * runtime/JSArray.h:
1787         * runtime/JSByteArray.cpp:
1788         * runtime/JSByteArray.h:
1789         * runtime/JSCell.cpp:
1790         * runtime/JSCell.h:
1791         * runtime/JSFunction.cpp:
1792         * runtime/JSFunction.h:
1793         * runtime/JSGlobalData.cpp:
1794         * runtime/JSGlobalObject.cpp:
1795         * runtime/JSGlobalObject.h:
1796         * runtime/JSNotAnObject.h:
1797         * runtime/JSONObject.cpp:
1798         * runtime/JSONObject.h:
1799         * runtime/JSObject.cpp:
1800         * runtime/JSObject.h:
1801         * runtime/JSObjectWithGlobalObject.h:
1802         * runtime/JSPropertyNameIterator.h:
1803         * runtime/JSStaticScopeObject.h:
1804         * runtime/JSString.h:
1805         * runtime/JSVariableObject.h:
1806         * runtime/JSWrapperObject.h:
1807         * runtime/JSZombie.cpp:
1808         * runtime/JSZombie.h:
1809         * runtime/Lookup.cpp:
1810         * runtime/MathObject.cpp:
1811         * runtime/MathObject.h:
1812         * runtime/NativeErrorConstructor.cpp:
1813         * runtime/NativeErrorConstructor.h:
1814         * runtime/NumberConstructor.cpp:
1815         * runtime/NumberConstructor.h:
1816         * runtime/NumberObject.cpp:
1817         * runtime/NumberObject.h:
1818         * runtime/NumberPrototype.cpp:
1819         * runtime/ObjectConstructor.cpp:
1820         * runtime/ObjectPrototype.cpp:
1821         * runtime/RegExpConstructor.cpp:
1822         * runtime/RegExpConstructor.h:
1823         * runtime/RegExpObject.cpp:
1824         * runtime/RegExpObject.h:
1825         * runtime/RegExpPrototype.cpp:
1826         * runtime/ScopeChain.cpp:
1827         * runtime/StringConstructor.cpp:
1828         * runtime/StringObject.cpp:
1829         * runtime/StringObject.h:
1830         * runtime/StringObjectThatMasqueradesAsUndefined.h:
1831         * runtime/StringPrototype.cpp:
1832         * runtime/StringPrototype.h:
1833         * runtime/Structure.cpp:
1834         * runtime/Structure.h:
1835
1836 2011-02-19  David Kilzer  <ddkilzer@apple.com>
1837
1838         <http://webkit.org/b/54808> Change jsc target to build directly into JavaScriptCore.framework/Resources/jsc
1839
1840         Reviewed by Dan Bernstein.
1841
1842         * Configurations/Base.xcconfig: Added
1843         JAVASCRIPTCORE_FRAMEWORKS_DIR variable.
1844         * Configurations/JavaScriptCore.xcconfig: Used
1845         JAVASCRIPTCORE_FRAMEWORKS_DIR to define INSTALL_PATH.
1846         * JavaScriptCore.xcodeproj/project.pbxproj: Set the INSTALL_PATH
1847         for Production configuration of jsc target.
1848         (Copy Into Framework): Removed old build phase.
1849         (Fix Framework Reference): Renamed build phase to "Copy Into
1850         Framework".  Added "set -x" call to make the script print the
1851         commands it is running.  Added code to exit early for Production
1852         builds since this was never intended for them.  Added code to
1853         copy jsc into the JavaScriptCore.framework/Resources directory.
1854
1855 2011-02-19  Siddharth Mathur  <siddharth.mathur@nokia.com>
1856
1857         Reviewed by Laszlo Gombos.
1858
1859         [Symbian] OSAllocator implementation for Symbian OS. 
1860         Manages both data and code region requests. V8 and Sunspider tested
1861         OK with interpreter. Not tested with JSC JIT yet as it has unrelated
1862         failures. Also no thread safety yet.
1863         https://bugs.webkit.org/show_bug.cgi?id=51128
1864
1865         * JavaScriptCore.pri: removed HAL linkage
1866         * wtf/Bitmap.h:
1867         (WTF::::findRunOfZeros): find run of zeros in a bitmap. quick n dirty
1868         * wtf/OSAllocator.h:
1869         (WTF::OSAllocator::decommitAndRelease): decommit explicitly 
1870         * wtf/OSAllocatorSymbian.cpp: Impl. of OSAllocator interface 
1871         (WTF::allocateCodeChunk): utility for code chunks
1872         (WTF::deallocateCodeChunk): utility for code chunks
1873         (WTF::dataAllocatorInstance): getter for data allocator instance
1874         (WTF::OSAllocator::reserveUncommitted):
1875         (WTF::OSAllocator::releaseDecommitted):
1876         (WTF::OSAllocator::commit):
1877         (WTF::OSAllocator::decommit):
1878         (WTF::OSAllocator::reserveAndCommit):
1879         (WTF::PageAllocatorSymbian::PageAllocatorSymbian): maps requests 
1880         to one underlying Symbian chunk
1881         (WTF::PageAllocatorSymbian::~PageAllocatorSymbian):
1882         (WTF::PageAllocatorSymbian::reserve):
1883         (WTF::PageAllocatorSymbian::release):
1884         (WTF::PageAllocatorSymbian::commit):
1885         (WTF::PageAllocatorSymbian::decommit):
1886         (WTF::PageAllocatorSymbian::contains):
1887         * wtf/PageAllocatorSymbian.h: Added.
1888         (WTF::SymbianChunk::SymbianChunk): wrapper around RChunk  
1889         (WTF::SymbianChunk::~SymbianChunk):
1890         (WTF::SymbianChunk::contains):
1891         
1892 2011-02-19  Yong Li  <yoli@rim.com>
1893
1894         Reviewed by Eric Seidel.
1895
1896         https://bugs.webkit.org/show_bug.cgi?id=54687
1897         When being built with armcc, "int" bit fields are treated as
1898         unsigned integers, which will fail the comparisons like "m_offset == -1".
1899         Using "signed" fixes the problem.
1900
1901         * assembler/ARMAssembler.h:
1902         * assembler/ARMv7Assembler.h:
1903
1904 2011-02-18  Geoffrey Garen  <ggaren@apple.com>
1905
1906         Reviewed by Sam Weinig.
1907
1908         Made MarkedSpace block iteration size-class agnostic
1909         https://bugs.webkit.org/show_bug.cgi?id=54792
1910         
1911         SunSpider reports no change.
1912
1913         * runtime/MarkedSpace.cpp:
1914         (JSC::MarkedSpace::clearMarks):
1915         (JSC::MarkedSpace::sweep):
1916         (JSC::MarkedSpace::objectCount):
1917         (JSC::MarkedSpace::size):
1918         (JSC::MarkedSpace::capacity):
1919         * runtime/MarkedSpace.h:
1920         (JSC::MarkedSpace::forEach): Iterate blocks in hashing order instead of
1921         size class list order. This is a much simpler convention in a world
1922         of many different size classes.
1923
1924 2011-02-18  Kristian Amlie  <kristian.amlie@nokia.com>
1925
1926         Reviewed by Andreas Kling.
1927
1928         Added friend exception to Qt platform, which also compiles Windows.
1929
1930         QtWebKit fails to compile on Windows XP with msvc-2008
1931         https://bugs.webkit.org/show_bug.cgi?id=54746
1932
1933         * bytecode/CodeBlock.h:
1934         * runtime/RegExpObject.h:
1935
1936 2011-02-18  Geoffrey Garen  <ggaren@apple.com>
1937
1938         (Rolled back in r79022 with crash fixed.)
1939
1940         Reviewed by Sam Weinig.
1941
1942         Use hashing instead of linear search in the conservative pointer test
1943         https://bugs.webkit.org/show_bug.cgi?id=54767
1944         
1945         SunSpider reports no change.
1946
1947         * runtime/MarkedSpace.cpp:
1948         (JSC::MarkedSpace::destroy): No need to explicitly clear the blocks array,
1949         since freeBlock removes items for us.
1950
1951         (JSC::MarkedSpace::freeBlock): Fixed a typo that always removed the last
1952         block from the block set instead of the block being freed. Changed to
1953         remove a block from our data structures before deallocating it, since
1954         this is slightly cleaner.
1955
1956         * runtime/MarkedSpace.h:
1957         (JSC::MarkedSpace::contains): Variable-sized objects will use more,
1958         smaller blocks, so it's important for the contains check not to be O(n)
1959         in the number of blocks.
1960
1961 2011-02-18  chris reiss  <christopher.reiss@nokia.com>
1962
1963         Reviewed by Andreas Kling.
1964
1965         REGRESSION: Date.parse("Tue Nov 23 20:40:05 2010 GMT") returns NaN
1966         https://bugs.webkit.org/show_bug.cgi?id=49989
1967
1968         updated test fast/js/script-tests/date-parse-test.js
1969
1970         * wtf/DateMath.cpp:
1971         (WTF::parseDateFromNullTerminatedCharacters):
1972
1973 2011-02-18  Sheriff Bot  <webkit.review.bot@gmail.com>
1974
1975         Unreviewed, rolling out r79022.
1976         http://trac.webkit.org/changeset/79022
1977         https://bugs.webkit.org/show_bug.cgi?id=54775
1978
1979         It broke the whole world (Requested by Ossy on #webkit).
1980
1981         * runtime/MarkedSpace.h:
1982         (JSC::MarkedSpace::contains):
1983
1984 2011-02-18  Yael Aharon  <yael.aharon@nokia.com>
1985
1986         Reviewed by Dave Hyatt.
1987
1988         Add support for dir=auto
1989         https://bugs.webkit.org/show_bug.cgi?id=50916
1990
1991         Change defaultWritingDirection() to return if the writing direction
1992         was determined from a letter with strong directionality or not.
1993
1994         * JavaScriptCore.exp:
1995         * JavaScriptCore.order:
1996         * wtf/text/StringImpl.cpp:
1997         (WTF::StringImpl::defaultWritingDirection):
1998         * wtf/text/StringImpl.h:
1999         * wtf/text/WTFString.h:
2000         (WTF::String::defaultWritingDirection):
2001
2002 2011-02-18  Geoffrey Garen  <ggaren@apple.com>
2003
2004         Reviewed by Sam Weinig.
2005
2006         Use hashing instead of linear search in the conservative pointer test
2007         https://bugs.webkit.org/show_bug.cgi?id=54767
2008         
2009         SunSpider reports no change.
2010
2011         * runtime/MarkedSpace.h:
2012         (JSC::MarkedSpace::contains): Variable-sized objects will use more,
2013         smaller blocks, so it's important for the contains check not to be O(n)
2014         in the number of blocks.
2015
2016 2011-02-18  Geoffrey Garen  <ggaren@apple.com>
2017
2018         Reviewed by Sam Weinig.
2019
2020         Tightened some usage accounting code in MarkedSpace
2021         https://bugs.webkit.org/show_bug.cgi?id=54761
2022         
2023         SunSpider reports no change.
2024
2025         * runtime/Heap.cpp:
2026         (JSC::Heap::Heap): Initialize the marked space high water mark on
2027         construction, instead of relying on some implicit subtleties to make
2028         not initializing it work out OK.
2029
2030         * runtime/Heap.h: Fixed up includes.
2031
2032         * runtime/MarkedBlock.h: Made firstAtom() static so clients can call it
2033         even without having allocated a block.
2034
2035         * runtime/MarkedSpace.cpp:
2036         (JSC::MarkedSpace::MarkedSpace): Don't pre-allocate a block, since this
2037         would be prohibitively expensive with multiple size classes.
2038
2039         (JSC::MarkedSpace::allocateBlock):
2040         (JSC::MarkedSpace::freeBlock): Track allocated blocks in a hash set,
2041         since linear search in the contains check will be prohibitively
2042         expensive once we're using lots of smaller blocks.
2043
2044         (JSC::MarkedSpace::allocate): Don't assume that we always have a block
2045         allocated, since we don't anymore. (See above.)
2046
2047         (JSC::MarkedSpace::reset):
2048         * runtime/MarkedSpace.h: Updated for changes mentioned above.
2049
2050 2011-02-17  Geoffrey Garen  <ggaren@apple.com>
2051
2052         Reviewed by Sam Weinig.
2053
2054         Made object allocation secretly variable-sized (Shhhh!)
2055         https://bugs.webkit.org/show_bug.cgi?id=54721
2056         
2057         SunSpider reports no change.
2058         
2059         Internally, MarkedBlock now makes variable-sized allocations, even
2060         though MarkedSpace doesn't take advantage of this yet.
2061
2062         * runtime/MarkedBlock.cpp:
2063         (JSC::MarkedBlock::MarkedBlock): No need to ASSERT that allocations are
2064         fixed-sized.
2065
2066         * runtime/MarkedBlock.h: Shrunk the atom size so we can allocate things
2067         that are not multiples of 64 bytes.
2068
2069 2011-02-17  Geoffrey Garen  <ggaren@apple.com>
2070
2071         Reviewed by Sam Weinig.
2072
2073         Fixed some math errors when when using variable-sized cells
2074         https://bugs.webkit.org/show_bug.cgi?id=54717
2075         
2076         SunSpider reports no change.
2077         
2078         Computer Science Barbie says, "Math is not so hard afterall!"
2079
2080         * runtime/JSCell.h:
2081         (JSC::JSCell::MarkedBlock::allocate): Round up when calculating the
2082         minimum number of atoms required for a cell, since rounding down
2083         will get you splinched.
2084
2085         * runtime/MarkedBlock.cpp:
2086         (JSC::MarkedBlock::MarkedBlock):
2087         (JSC::MarkedBlock::sweep):
2088         * runtime/MarkedBlock.h:
2089         (JSC::MarkedBlock::forEach): Changed a bunch of != tests to < tests
2090         because m_endAtom is actually a fuzzy end -- iterating from firstAtom()
2091         may not hit m_endAtom exactly.
2092
2093 2011-02-17  Geoffrey Garen  <ggaren@apple.com>
2094
2095         Reviewed by Sam Weinig.
2096
2097         A little more abstraction for MarkedSpace::contains
2098         https://bugs.webkit.org/show_bug.cgi?id=54715
2099
2100         * runtime/MarkedBlock.h:
2101         (JSC::MarkedBlock::contains): Added a contains function, so MarkedSpace
2102         doesn't have to know how MarkedBlock tracks containment internally.
2103
2104         * runtime/MarkedSpace.h:
2105         (JSC::MarkedSpace::contains): Call through to MarkedBlock to figure out
2106         if a cell that seems to be in a block is valid.
2107
2108 2011-02-17  Geoffrey Garen  <ggaren@apple.com>
2109
2110         Reviewed by Sam Weinig.
2111
2112         Removed the invariant that the last cell in a block is always marked
2113         https://bugs.webkit.org/show_bug.cgi?id=54713
2114         
2115         SunSpider reports no change.
2116         
2117         This adds one branch to allocation, but simplifies the mark invariant,
2118         especially in a world of variable-sized cells. Now, it really is true
2119         that any cell whose mark bit is set is a valid, live cell whose
2120         constructor has run and whose destructor has not run.
2121
2122         * runtime/JSCell.h: 
2123         (JSC::JSCell::MarkedBlock::allocate): Changed this do-while into a while
2124         since we can no longer rely on a set mark bit to break out of this loop
2125         before it reaches the end of the block.
2126
2127         * runtime/MarkedBlock.cpp:
2128         (JSC::MarkedBlock::MarkedBlock):
2129         (JSC::MarkedBlock::sweep): 
2130         * runtime/MarkedBlock.h:
2131         (JSC::MarkedBlock::isEmpty):
2132         (JSC::MarkedBlock::clearMarks):
2133         (JSC::MarkedBlock::markCount):
2134         (JSC::MarkedBlock::forEach): No need to set a special last mark bit.
2135
2136 2011-02-17  Sheriff Bot  <webkit.review.bot@gmail.com>
2137
2138         Unreviewed, rolling out r78856 and r78907.
2139         http://trac.webkit.org/changeset/78856
2140         http://trac.webkit.org/changeset/78907
2141         https://bugs.webkit.org/show_bug.cgi?id=54705
2142
2143         These seem to break tests on 32-bit builds. (Requested by
2144         aroben on #webkit).
2145
2146         * JavaScriptCore.xcodeproj/project.pbxproj:
2147         * collector/handles/Global.h:
2148         (JSC::Global::internalSet):
2149         * collector/handles/Handle.h:
2150         (JSC::HandleTypes::getFromSlot):
2151         (JSC::HandleTypes::toJSValue):
2152         (JSC::HandleTypes::validateUpcast):
2153         (JSC::HandleConverter::operator->):
2154         (JSC::HandleConverter::operator*):
2155         (JSC::Handle::Handle):
2156         (JSC::Handle::get):
2157         * runtime/JSArray.cpp:
2158         (JSC::JSArray::sortNumeric):
2159         * runtime/JSObject.h:
2160         (JSC::JSObject::inlineGetOwnPropertySlot):
2161         * runtime/SlotAccessor.h: Removed.
2162         * runtime/WeakGCPtr.h:
2163         (JSC::WeakGCPtr::get):
2164         (JSC::WeakGCPtr::internalSet):
2165         * runtime/WriteBarrier.h:
2166         (JSC::DeprecatedPtr::DeprecatedPtr):
2167         (JSC::DeprecatedPtr::get):
2168         (JSC::DeprecatedPtr::operator*):
2169         (JSC::DeprecatedPtr::operator->):
2170         (JSC::DeprecatedPtr::slot):
2171         (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
2172         (JSC::DeprecatedPtr::operator!):
2173         (JSC::WriteBarrierBase::set):
2174         (JSC::WriteBarrierBase::get):
2175         (JSC::WriteBarrierBase::operator*):
2176         (JSC::WriteBarrierBase::operator->):
2177         (JSC::WriteBarrierBase::clear):
2178         (JSC::WriteBarrierBase::slot):
2179         (JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
2180         (JSC::WriteBarrierBase::operator!):
2181         (JSC::WriteBarrierBase::setWithoutWriteBarrier):
2182         (JSC::WriteBarrier::WriteBarrier):
2183
2184 2011-02-17  Csaba Osztrogon√°c  <ossy@webkit.org>
2185
2186         Unreviewed.
2187
2188         [Qt] Buildfix.
2189
2190         * wtf/RetainPtr.h: Add missing PLATFORM(CF) guard.
2191
2192 2011-02-17  Geoffrey Garen  <ggaren@apple.com>
2193
2194         Reviewed by Oliver Hunt.
2195
2196         Made MarkedBlock variable-sized
2197         https://bugs.webkit.org/show_bug.cgi?id=54692
2198         
2199         SunSpider reports no change.
2200         
2201         Each MarkedBlock is now composed of a set of fixed-sized atoms, with one
2202         mark bit per atom. A given cell may be composed of one or more atoms.
2203         
2204         * runtime/Heap.cpp:
2205         (JSC::Heap::allocate): Made fixed-sizedness a property of MarkedSpace,
2206         bubbling it up from MarkedBlock, since MarkedBlock now supports variable-
2207         sizedness.
2208
2209         * runtime/JSCell.h:
2210         (JSC::JSCell::MarkedBlock::allocate): Removed use of CELLS_PER_BLOCK and
2211         (implicit) one constants -- these quantities are not constant anymore.
2212         Updated for switch from cell to atom.
2213
2214         * runtime/MarkedBlock.cpp:
2215         (JSC::MarkedBlock::create):
2216         (JSC::MarkedBlock::destroy):
2217         (JSC::MarkedBlock::MarkedBlock):
2218         (JSC::MarkedBlock::sweep):
2219         * runtime/MarkedBlock.h:
2220         (JSC::MarkedBlock::firstAtom):
2221         (JSC::MarkedBlock::atoms):
2222         (JSC::MarkedBlock::isAtomAligned):
2223         (JSC::MarkedBlock::blockFor):
2224         (JSC::MarkedBlock::isEmpty):
2225         (JSC::MarkedBlock::clearMarks):
2226         (JSC::MarkedBlock::size):
2227         (JSC::MarkedBlock::capacity):
2228         (JSC::MarkedBlock::atomNumber):
2229         (JSC::MarkedBlock::isMarked):
2230         (JSC::MarkedBlock::testAndSetMarked):
2231         (JSC::MarkedBlock::setMarked):
2232         (JSC::MarkedBlock::forEach): Same as above. Also removed use of CELL_SIZE
2233         and BLOCK_SIZE, and switched away from calling arbitrary pointers cells.
2234
2235         * runtime/MarkedSpace.cpp:
2236         (JSC::MarkedSpace::MarkedSpace):
2237         (JSC::MarkedSpace::allocateBlock):
2238         (JSC::MarkedSpace::allocate):
2239         (JSC::MarkedSpace::reset):
2240         * runtime/MarkedSpace.h:
2241         (JSC::CollectorHeap::CollectorHeap):
2242         (JSC::MarkedSpace::contains): Updated for renames. Made fixed-sizedness
2243         a property of MarkedSpace.
2244
2245 2011-02-17  Oliver Hunt  <oliver@apple.com>
2246
2247         Attempt to fix windows build
2248
2249         * runtime/WriteBarrier.h:
2250
2251 2011-02-17  Oliver Hunt  <oliver@apple.com>
2252
2253         Reviewed by Geoffrey Garen.
2254
2255         Refactor WriteBarrier and DeprecatedPtr to have less code duplication.
2256         https://bugs.webkit.org/show_bug.cgi?id=54608
2257
2258         Make use of the tricks used for Handle, et al to avoid duplicating all
2259         of the logic for DeprecatedPtr and WriteBarrier simply to support known
2260         vs. unknown types.
2261
2262         * JavaScriptCore.xcodeproj/project.pbxproj:
2263         * collector/handles/Global.h:
2264         (JSC::Global::internalSet):
2265         * collector/handles/Handle.h:
2266         (JSC::Handle::Handle):
2267         (JSC::Handle::get):
2268         * runtime/JSArray.cpp:
2269         (JSC::JSArray::sortNumeric):
2270         * runtime/JSObject.h:
2271         (JSC::JSObject::inlineGetOwnPropertySlot):
2272         * runtime/SlotAccessor.h: Added.
2273         (JSC::SlotTypes::getFromBaseType):
2274         (JSC::SlotTypes::convertToBaseType):
2275         (JSC::SlotTypes::getFromSlot):
2276         (JSC::SlotTypes::toJSValue):
2277         (JSC::SlotTypes::validateUpcast):
2278         (JSC::SlotAccessor::operator->):
2279         (JSC::SlotAccessor::operator*):
2280         * runtime/WeakGCPtr.h:
2281         (JSC::WeakGCPtr::get):
2282         (JSC::WeakGCPtr::internalSet):
2283         * runtime/WriteBarrier.h:
2284         (JSC::DeprecatedPtr::DeprecatedPtr):
2285         (JSC::DeprecatedPtr::get):
2286         (JSC::DeprecatedPtr::slot):
2287         (JSC::DeprecatedPtr::operator=):
2288         (JSC::WriteBarrierTranslator::convertToStorage):
2289         (JSC::WriteBarrierTranslator::convertFromStorage):
2290         (JSC::WriteBarrierBase::set):
2291         (JSC::WriteBarrierBase::get):
2292         (JSC::WriteBarrierBase::clear):
2293         (JSC::WriteBarrierBase::slot):
2294         (JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
2295         (JSC::WriteBarrierBase::operator!):
2296         (JSC::WriteBarrierBase::setWithoutWriteBarrier):
2297         (JSC::WriteBarrier::WriteBarrier):
2298
2299 2011-02-17  Kevin Ollivier  <kevino@theolliviers.com>
2300
2301         [wx] Revert incorrect blind fix and restore previous working code.
2302
2303         * wtf/wx/StringWx.cpp:
2304         (WTF::String::String):
2305
2306 2011-02-16  Geoffrey Garen  <ggaren@apple.com>
2307
2308         Reviewed by Maciej Stachowiak.
2309
2310         Intermittent crashes beneath MarkStack::drain
2311         https://bugs.webkit.org/show_bug.cgi?id=54614
2312         <rdar://problem/8971070>
2313         
2314         The crashes were caused by a GC happening after the global object's
2315         property table had grown (due to compilation), but before the properties
2316         had been fully initialized by program execution.
2317
2318         * bytecompiler/BytecodeGenerator.cpp:
2319         (JSC::BytecodeGenerator::BytecodeGenerator): Explicitly resize the global
2320         object's register storage immediately, without waiting for program
2321         execution to do it for us. This ensures that the global object's count
2322         of global variables is consistent with the size of its global variable
2323         storage at all times, and it ensures that all global variables are
2324         properly initialized from the get-go.
2325
2326         * runtime/JSGlobalObject.cpp:
2327         (JSC::JSGlobalObject::resizeRegisters):
2328         * runtime/JSGlobalObject.h: Added a helper function for growing the
2329         global object's register storage, and initializing new registers.
2330
2331 == Rolled over to ChangeLog-2011-02-16 ==