521f1ff87fbb2b506a40d57f84db85a9e0eb0be3
[WebKit-https.git] / Source / JavaScriptCore / ChangeLog
1 2011-06-10  Tony Chang  <tony@chromium.org>
2
3         Reviewed by Ojan Vafai.
4
5         add a compile guard ENABLE(FLEXBOX)
6         https://bugs.webkit.org/show_bug.cgi?id=62049
7
8         * Configurations/FeatureDefines.xcconfig:
9
10 2011-06-10  Gavin Barraclough  <barraclough@apple.com>
11
12         Reviewed by Sam Weinig.
13
14         https://bugs.webkit.org/show_bug.cgi?id=55347
15         "name" and "message" enumerable on *Error.prototype
16
17         This arises from chapter 15 of the spec:
18             "Every other property described in this clause has the attributes
19             { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
20             unless otherwise specified."
21         Standardized properties are not enumerable.
22
23         * runtime/ErrorInstance.cpp:
24         (JSC::ErrorInstance::ErrorInstance):
25         * runtime/NativeErrorPrototype.cpp:
26         (JSC::NativeErrorPrototype::NativeErrorPrototype):
27
28 2011-06-09  Geoffrey Garen  <ggaren@apple.com>
29
30         Build fix: Corrected header spelling.
31
32         * heap/OldSpace.h:
33
34 2011-06-09  Geoffrey Garen  <ggaren@apple.com>
35
36         Reviewed by Oliver Hunt.
37
38         Added OldSpace to the project
39         https://bugs.webkit.org/show_bug.cgi?id=62417
40         
41         Currently unused.
42         
43         Added OldSpace, the ability to iterate NewSpace vs OldSpace, and a
44         per-block flag for testing whether you're in NewSpace vs OldSpace.
45
46         * CMakeLists.txt:
47         * GNUmakefile.list.am:
48         * JavaScriptCore.gypi:
49         * JavaScriptCore.pro:
50         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
51         * JavaScriptCore.xcodeproj/project.pbxproj: Build!
52
53         * heap/MarkedBlock.cpp:
54         (JSC::MarkedBlock::MarkedBlock):
55         * heap/MarkedBlock.h:
56         (JSC::MarkedBlock::inNewSpace):
57         (JSC::MarkedBlock::setInNewSpace): Added inNewSpace flag, for use in
58         write barrier.
59
60         * heap/NewSpace.cpp:
61         (JSC::NewSpace::addBlock):
62         (JSC::NewSpace::removeBlock):
63         * heap/NewSpace.h:
64         (JSC::NewSpace::forEachBlock): Added forEachBlock, to use for
65         NewSpace-specific operations.
66
67         * heap/OldSpace.cpp: Added.
68         (JSC::OldSpace::OldSpace):
69         (JSC::OldSpace::addBlock):
70         (JSC::OldSpace::removeBlock):
71         * heap/OldSpace.h: Added.
72         (JSC::OldSpace::forEachBlock): New class for holding promoted blocks.
73         Not in use yet.
74
75 2011-06-09  Hyowon Kim  <hw1008.kim@samsung.com>
76
77         Reviewed by Antonio Gomes.
78
79         [EFL] Make accelerated compositing build in Webkit-EFL
80         https://bugs.webkit.org/show_bug.cgi?id=62361
81
82         Add PLATFORM(EFL) to enable ACCELERATED_COMPOSITING on EFL port.
83
84         * wtf/Platform.h:
85
86 2011-06-09  Gavin Barraclough  <barraclough@apple.com>
87
88         Reviewed by Geoff Garen.
89
90         Bug 62405 - Fix integer overflow in Array.prototype.push
91
92         Fix geoff's review comments re static_cast.
93
94         * runtime/ArrayPrototype.cpp:
95         (JSC::arrayProtoFuncPush):
96
97 2011-06-09  Geoffrey Garen  <ggaren@apple.com>
98
99         Reviewed by Oliver Hunt.
100
101         Factored MarkedBlock set management into a helper class with a fast case Bloom filter
102         https://bugs.webkit.org/show_bug.cgi?id=62413
103         
104         SunSpider reports a small speedup.
105         
106         This is in preparation for having ConservativeSet operate on arbitrary
107         sets of MarkedBlocks, and in preparation for conservative scanning
108         becoming proportionally more important than other GC activities.
109
110         * GNUmakefile.list.am:
111         * JavaScriptCore.gypi:
112         * JavaScriptCore.xcodeproj/project.pbxproj: Build-o.
113
114         * heap/ConservativeRoots.cpp:
115         (JSC::ConservativeRoots::add):
116         * heap/ConservativeRoots.h:
117         (JSC::ConservativeRoots::ConservativeRoots): Operate on a MarkedBlockSet
118         directly, instead of a Heap, so we can operate on subsets of the Heap
119         instead.
120         
121         Use a TinyBloomFilter for single-cycle exclusion of most pointers. This
122         is particularly important since we expect not to find our subject pointer
123         in the MarkedBlock hash, and hash misses are more expensive than typical
124         hash lookups because they have high collision rates.
125         
126         No need for single-pointer add() to be public anymore, since nobody uses it.
127
128         * heap/Heap.cpp:
129         (JSC::Heap::markRoots):
130         * heap/Heap.h:
131         (JSC::Heap::forEachCell):
132         (JSC::Heap::forEachBlock): Use MarkedBlockSet since that's what
133         ConservativeRoots relies on.
134         
135         Nixed contains(), since nobody uses it anymore.
136
137         * heap/MarkedBlock.h:
138         (WTF::MarkedBlockHash::hash): Added a faster hash taking advantage of
139         the VM layout properties of MarkedBlocks.
140
141         * heap/MarkedBlockSet.h: Added.
142         (JSC::MarkedBlockSet::add):
143         (JSC::MarkedBlockSet::remove):
144         (JSC::MarkedBlockSet::recomputeFilter):
145         (JSC::MarkedBlockSet::filter):
146         (JSC::MarkedBlockSet::set):
147         * heap/TinyBloomFilter.h: Added.
148         (JSC::TinyBloomFilter::TinyBloomFilter):
149         (JSC::TinyBloomFilter::add):
150         (JSC::TinyBloomFilter::ruleOut): New helper class, used above.
151
152         * interpreter/RegisterFile.cpp:
153         (JSC::RegisterFile::gatherConservativeRoots): No need to specifically
154         exclude values by tag -- the tiny bloom filter is already a register-register
155         compare, so adding another "rule out" factor just slows things down.
156
157 2011-06-09  Gavin Barraclough  <barraclough@apple.com>
158
159         Reviewed by Oliver Hunt.
160
161         Bug 62405 - Fix integer overflow in Array.prototype.push
162
163         There are three integer overflows here, leading to safe (not a security risk)
164         but incorrect (non-spec-compliant) behaviour.
165
166         Two overflows occur when calculating the new length after pushing (one in the
167         fast version of push in JSArray, one in the generic version in ArrayPrototype).
168         The other occurs calculating indices to write to when multiple items are pushed.
169
170         These errors result in three test-262 failures.
171
172         * runtime/ArrayPrototype.cpp:
173         (JSC::arrayProtoFuncPush):
174         * runtime/JSArray.cpp:
175         (JSC::JSArray::put):
176         (JSC::JSArray::push):
177
178 2011-06-09  Dan Bernstein  <mitz@apple.com>
179
180         Reviewed by Anders Carlsson.
181
182         Add Vector::reverse()
183         https://bugs.webkit.org/show_bug.cgi?id=62393
184
185         * wtf/Vector.h:
186         (WTF::Vector::reverse): Added
187
188 2011-06-08  Geoffrey Garen  <ggaren@apple.com>
189
190         Reviewed by Oliver Hunt.
191
192         Factored a bunch of Heap functionality into stand-alone functors
193         https://bugs.webkit.org/show_bug.cgi?id=62337
194         
195         This is in preparation for making these functors operate on arbitrary
196         sets of MarkedBlocks.
197
198         * JavaScriptCore.exp: This file is a small tragedy.
199
200         * debugger/Debugger.cpp:
201         (JSC::Debugger::recompileAllJSFunctions): Updated for type change and rename.
202
203         * heap/HandleHeap.h:
204         (JSC::HandleHeap::forEachStrongHandle): New function for iterating all
205         strong handles, so we can play along in the functor game.
206
207         * heap/Heap.cpp:
208         (JSC::CountFunctor::CountFunctor::CountFunctor):
209         (JSC::CountFunctor::CountFunctor::count):
210         (JSC::CountFunctor::CountFunctor::returnValue):
211         (JSC::CountFunctor::ClearMarks::operator()):
212         (JSC::CountFunctor::ResetAllocator::operator()):
213         (JSC::CountFunctor::Sweep::operator()):
214         (JSC::CountFunctor::MarkCount::operator()):
215         (JSC::CountFunctor::Size::operator()):
216         (JSC::CountFunctor::Capacity::operator()):
217         (JSC::CountFunctor::Count::operator()):
218         (JSC::CountFunctor::CountIfGlobalObject::operator()):
219         (JSC::CountFunctor::TakeIfEmpty::TakeIfEmpty):
220         (JSC::CountFunctor::TakeIfEmpty::operator()):
221         (JSC::CountFunctor::TakeIfEmpty::returnValue):
222         (JSC::CountFunctor::RecordType::RecordType):
223         (JSC::CountFunctor::RecordType::typeName):
224         (JSC::CountFunctor::RecordType::operator()):
225         (JSC::CountFunctor::RecordType::returnValue): These functors factor out
226         behavior that used to be in the functions below.
227
228         (JSC::Heap::clearMarks):
229         (JSC::Heap::sweep):
230         (JSC::Heap::objectCount):
231         (JSC::Heap::size):
232         (JSC::Heap::capacity):
233         (JSC::Heap::protectedGlobalObjectCount):
234         (JSC::Heap::protectedObjectCount):
235         (JSC::Heap::protectedObjectTypeCounts):
236         (JSC::Heap::objectTypeCounts):
237         (JSC::Heap::resetAllocator):
238         (JSC::Heap::freeBlocks):
239         (JSC::Heap::shrink): Factored out behavior into the functors above.
240
241         * heap/Heap.h:
242         (JSC::Heap::forEachProtectedCell):
243         (JSC::Heap::forEachCell):
244         (JSC::Heap::forEachBlock): Added forEach* iteration templates. I chose
245         functor-based templates instead of plain iterators because they're simpler
246         to implement in this case and they require a lot less code at the call site.
247
248         * heap/MarkedBlock.h:
249         (JSC::MarkedBlock::VoidFunctor::returnValue): Default parent class for
250         trivial functors.
251
252         (JSC::MarkedBlock::forEachCell): Renamed forEach to forEachCell because
253         we have a few different kind of "for each" now.
254
255         * runtime/JSGlobalData.cpp:
256         (WTF::Recompile::operator()):
257         (JSC::JSGlobalData::JSGlobalData):
258         (JSC::JSGlobalData::recompileAllJSFunctions): Updated for type change and rename.
259
260         * runtime/JSGlobalData.h: Removed globalObjectCount because it was unused.
261
262 2011-06-08  Mikołaj Małecki  <m.malecki@samsung.com>
263
264         Reviewed by Pavel Feldman.
265
266         Web Inspector: Crash by buffer overrun crash when serializing inspector object tree.
267         https://bugs.webkit.org/show_bug.cgi?id=52791
268
269         No new tests. The problem can be reproduced by trying to create InspectorValue
270         from 1.0e-100 and call ->toJSONString() on this.
271
272         * JavaScriptCore.exp:
273         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
274         export 2 functions DecimalNumber::bufferLengthForStringExponential and
275         DecimalNumber::toStringExponential.
276
277 2011-06-08  Sheriff Bot  <webkit.review.bot@gmail.com>
278
279         Unreviewed, rolling out r88404.
280         http://trac.webkit.org/changeset/88404
281         https://bugs.webkit.org/show_bug.cgi?id=62342
282
283         broke win and mac build (Requested by tony^work on #webkit).
284
285         * JavaScriptCore.gyp/JavaScriptCore.gyp:
286
287 2011-06-08  Evan Martin  <evan@chromium.org>
288
289         Reviewed by Adam Barth.
290
291         [chromium] use gyp 'settings' type for settings target
292         https://bugs.webkit.org/show_bug.cgi?id=62323
293
294         The 'settings' gyp target type is for targets that exist solely
295         for their settings (no build rules).  The comment above this target
296         says it's for this, but it incorrectly uses 'none'.
297
298         * JavaScriptCore.gyp/JavaScriptCore.gyp:
299
300 2011-06-08  Sailesh Agrawal  <sail@chromium.org>
301
302         Reviewed by Mihai Parparita.
303
304         Chromium Mac: Enable overlay scrollbars
305         https://bugs.webkit.org/show_bug.cgi?id=59756
306
307         Enable WTF_USE_WK_SCROLLBAR_PAINTER for Chromium Mac. This allows us to use overlay scrollbars on future versions of Mac OS X.
308
309         * wtf/Platform.h:
310
311 2011-06-08  Oliver Hunt  <oliver@apple.com>
312
313         Reviewed by Geoffrey Garen.
314
315         Add faster lookup cache for multi character identifiers
316         https://bugs.webkit.org/show_bug.cgi?id=62327
317
318         Add a non-hash lookup for mutiple character identifiers.  This saves us from
319         adding repeated identifiers to the ParserArena's identifier list as people
320         tend to not start all their variables and properties with the same character
321         and happily identifier locality works in our favour.
322
323         * parser/ParserArena.h:
324         (JSC::IdentifierArena::isEmpty):
325         (JSC::IdentifierArena::clear):
326         (JSC::IdentifierArena::makeIdentifier):
327
328 2011-06-08  Geoffrey Garen  <ggaren@apple.com>
329
330         Reviewed by Oliver Hunt.
331
332         Took some responsibilities away from NewSpace
333         https://bugs.webkit.org/show_bug.cgi?id=62325
334         
335         NewSpace is basically just an allocator now.
336         
337         Heap acts as a controller, responsible for managing the set of all
338         MarkedBlocks.
339         
340         This is in preparation for moving parts of the controller logic into
341         separate helper classes that can act on arbitrary sets of MarkedBlocks
342         that may or may not be in NewSpace.
343
344         * heap/Heap.cpp:
345         (JSC::Heap::Heap):
346         (JSC::Heap::destroy):
347         (JSC::Heap::allocate):
348         (JSC::Heap::markRoots):
349         (JSC::Heap::clearMarks):
350         (JSC::Heap::sweep):
351         (JSC::Heap::objectCount):
352         (JSC::Heap::size):
353         (JSC::Heap::capacity):
354         (JSC::Heap::collect):
355         (JSC::Heap::resetAllocator):
356         (JSC::Heap::allocateBlock):
357         (JSC::Heap::freeBlocks):
358         (JSC::Heap::shrink): Moved the set of MarkedBlocks from NewSpace to Heap,
359         along with all functions that operate on the set of MarkedBlocks. Also
360         moved responsibility for deciding whether to allocate a new MarkedBlock,
361         and for allocating it.
362
363         * heap/Heap.h:
364         (JSC::Heap::contains):
365         (JSC::Heap::forEach): Ditto.
366
367         * heap/NewSpace.cpp:
368         (JSC::NewSpace::addBlock):
369         (JSC::NewSpace::removeBlock):
370         (JSC::NewSpace::resetAllocator):
371         * heap/NewSpace.h:
372         (JSC::NewSpace::waterMark):
373         (JSC::NewSpace::allocate): Ditto.
374
375 2011-06-08  Geoffrey Garen  <ggaren@apple.com>
376
377         Reviewed by Oliver Hunt.
378
379         Some more MarkedSpace => NewSpace renaming
380         https://bugs.webkit.org/show_bug.cgi?id=62305
381
382         * JavaScriptCore.exp:
383         * JavaScriptCore.order:
384         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
385         * heap/Heap.cpp:
386         (JSC::Heap::Heap):
387         (JSC::Heap::destroy):
388         (JSC::Heap::reportExtraMemoryCostSlowCase):
389         (JSC::Heap::allocate):
390         (JSC::Heap::markRoots):
391         (JSC::Heap::objectCount):
392         (JSC::Heap::size):
393         (JSC::Heap::capacity):
394         (JSC::Heap::collect):
395         (JSC::Heap::isValidAllocation):
396         * heap/Heap.h:
397         (JSC::Heap::markedSpace):
398         (JSC::Heap::contains):
399         (JSC::Heap::forEach):
400         (JSC::Heap::allocate):
401         * runtime/JSCell.h:
402
403 2011-06-08  Kevin Ollivier  <kevino@theolliviers.com>
404
405         Reviewed by Eric Seidel.
406
407         Add export macros to profiler headers.
408         https://bugs.webkit.org/show_bug.cgi?id=27551
409
410         * profiler/Profiler.h:
411
412 2011-06-08  Kevin Ollivier  <kevino@theolliviers.com>
413
414         Reviewed by Eric Seidel.
415
416         Add export symbols to parser headers.
417         https://bugs.webkit.org/show_bug.cgi?id=27551
418
419         * parser/SourceProviderCache.h:
420
421 2011-06-08  Kevin Ollivier  <kevino@theolliviers.com>
422
423         Reviewed by Eric Seidel.
424
425         Add export symbols to interpreter headers.
426         https://bugs.webkit.org/show_bug.cgi?id=27551
427
428         * interpreter/Interpreter.h:
429
430 2011-06-08  Kevin Ollivier  <kevino@theolliviers.com>
431
432         Reviewed by Eric Seidel.
433
434         Add export symbols to debugger headers.
435         https://bugs.webkit.org/show_bug.cgi?id=27551
436
437         * debugger/Debugger.h:
438         * debugger/DebuggerCallFrame.h:
439
440 2011-06-08  Geoffrey Garen  <ggaren@apple.com>
441
442         Reviewed by Darin Adler.
443
444         Moved MarkedSpace.* to NewSpace.* in preparation for more renaming
445         https://bugs.webkit.org/show_bug.cgi?id=62268
446
447         * CMakeLists.txt:
448         * GNUmakefile.list.am:
449         * JavaScriptCore.gypi:
450         * JavaScriptCore.pro:
451         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
452         * JavaScriptCore.xcodeproj/project.pbxproj:
453         * heap/Heap.h:
454         * heap/MarkedBlock.h:
455         * heap/MarkedSpace.cpp: Removed.
456         * heap/MarkedSpace.h: Removed.
457         * heap/NewSpace.cpp: Copied from Source/JavaScriptCore/heap/MarkedSpace.cpp.
458         * heap/NewSpace.h: Copied from Source/JavaScriptCore/heap/MarkedSpace.h.
459
460 2011-06-08  Sheriff Bot  <webkit.review.bot@gmail.com>
461
462         Unreviewed, rolling out r88365.
463         http://trac.webkit.org/changeset/88365
464         https://bugs.webkit.org/show_bug.cgi?id=62301
465
466         windows bots broken (Requested by loislo_ on #webkit).
467
468         * JavaScriptCore.exp:
469
470 2011-06-08  Ryan Sleevi  <rsleevi@chromium.org>
471
472         Reviewed by Tony Chang.
473
474         Suppress C++0x compat warnings when compiling Chromium port with GCC 4.6
475
476         Compiling Chromium port under GCC 4.6 produces warnings about nullptr
477         https://bugs.webkit.org/show_bug.cgi?id=62242
478
479         * JavaScriptCore.gyp/JavaScriptCore.gyp:
480
481 2011-06-08  Ademar de Souza Reis Jr.  <ademar.reis@openbossa.org>
482
483         Reviewed by Andreas Kling.
484
485         Webkit on SPARC Solaris has wrong endian
486         https://bugs.webkit.org/show_bug.cgi?id=29407
487
488         Bug 57256 fixed one crash on misaligned reads on sparc/solaris, but
489         there are more ocurrences of the same code pattern in webkit.
490
491         This patch includes the check on these other parts of the code.
492
493         This is a speculative fix, I don't have a sparc machine to test and
494         don't know which kind of test would trigger a crash (but it's quite
495         obvious that it's the same code duplicated in different files).
496
497         * runtime/UString.h:
498         (JSC::UStringHash::equal):
499         * wtf/text/StringHash.h:
500         (WTF::StringHash::equal):
501
502 2011-06-08  Yael Aharon  <yael.aharon@nokia.com>
503
504         Reviewed by Andreas Kling.
505
506         [Qt] Build fix for building QtWebKit inside of Qt.
507         https://bugs.webkit.org/show_bug.cgi?id=62280
508
509         Remove CONFIG=staticlib, because it causes the configure script to add -ljavascriptcore
510         into QtWebKit.prl.
511
512         No new tests, as this is just a build fix.
513
514         * JavaScriptCore.pri:
515
516 2011-06-07  Geoffrey Garen  <ggaren@apple.com>
517
518         Reviewed by Oliver Hunt.
519
520         Split 'reset' into 'collect' and 'resetAllocator'
521         https://bugs.webkit.org/show_bug.cgi?id=62267
522
523         * heap/Heap.cpp:
524         (JSC::Heap::allocate):
525         (JSC::Heap::collectAllGarbage):
526         (JSC::Heap::collect):
527         * heap/Heap.h:
528         * heap/MarkedBlock.h:
529         (JSC::MarkedBlock::resetAllocator):
530         * heap/MarkedSpace.cpp:
531         (JSC::MarkedSpace::resetAllocator):
532         * heap/MarkedSpace.h:
533         (JSC::MarkedSpace::SizeClass::resetAllocator):
534
535 2011-06-07  Geoffrey Garen  <ggaren@apple.com>
536
537         Reviewed by Sam Weinig.
538
539         Renamed some more marks to visits
540         https://bugs.webkit.org/show_bug.cgi?id=62254
541
542         * heap/HandleHeap.cpp:
543         (JSC::HandleHeap::visitStrongHandles):
544         (JSC::HandleHeap::visitWeakHandles):
545         * heap/HandleHeap.h:
546         * heap/HandleStack.cpp:
547         (JSC::HandleStack::visit):
548         * heap/HandleStack.h:
549         * heap/Heap.cpp:
550         (JSC::Heap::markProtectedObjects):
551         (JSC::Heap::markTempSortVectors):
552         (JSC::Heap::markRoots):
553         * heap/HeapRootVisitor.h:
554         (JSC::HeapRootVisitor::visit):
555         * runtime/ArgList.cpp:
556         (JSC::MarkedArgumentBuffer::markLists):
557
558 2011-06-07  Gavin Barraclough  <barraclough@apple.com>
559
560         Reviewed by Sam Weinig
561
562         https://bugs.webkit.org/show_bug.cgi?id=55537
563         Functions claim to have 'callee' which they actually don't (and shouldn't)
564
565         * JavaScriptCore.xcodeproj/project.pbxproj:
566         * runtime/JSFunction.cpp:
567         (JSC::JSFunction::getOwnPropertyNames):
568
569 2011-06-07  Juan C. Montemayor  <jmont@apple.com>
570
571         Reviewed by Darin Adler.
572
573         Make JSStaticFunction and JSStaticValue less "const"
574         https://bugs.webkit.org/show_bug.cgi?id=62222
575
576         * API/JSObjectRef.h:
577         * API/tests/testapi.c:
578         (checkConstnessInJSObjectNames):
579         (main):
580         * JavaScriptCore.xcodeproj/project.pbxproj:
581
582 2011-06-07  Gavin Barraclough  <barraclough@apple.com>
583
584         Reviewed by Sam Weinig.
585
586         https://bugs.webkit.org/show_bug.cgi?id=62240
587         DFG JIT - add support for for-loop array initialization.
588
589         Support put by val beyond vector length.
590         Add a operationPutByValBeyondArrayBounds operation, make
591         PutValVal call this if the vector length check fails.
592
593         * dfg/DFGJITCodeGenerator.h:
594         (JSC::DFG::JITCodeGenerator::silentSpillGPR):
595         (JSC::DFG::JITCodeGenerator::silentFillGPR):
596         (JSC::DFG::JITCodeGenerator::silentSpillAllRegisters):
597         (JSC::DFG::JITCodeGenerator::isDoubleConstantWithInt32Value):
598         (JSC::DFG::JITCodeGenerator::isJSConstantWithInt32Value):
599         (JSC::DFG::JITCodeGenerator::isIntegerConstant):
600         (JSC::DFG::JITCodeGenerator::valueOfIntegerConstant):
601         * dfg/DFGOperations.cpp:
602         (JSC::DFG::operationPutByValInternal):
603         * dfg/DFGOperations.h:
604         * dfg/DFGSpeculativeJIT.cpp:
605         (JSC::DFG::SpeculativeJIT::compile):
606         * dfg/DFGSpeculativeJIT.h:
607
608 2011-06-06  James Simonsen  <simonjam@chromium.org>
609
610         Reviewed by James Robinson.
611
612         Add monotonicallyIncreasingTime() to get monotonically increasing time
613         https://bugs.webkit.org/show_bug.cgi?id=37743
614
615         * wtf/CurrentTime.cpp: Add monotonicallyIncreasingTime() for mac and a fallback implementation that just wraps currentTime().
616         (WTF::monotonicallyIncreasingTime):
617         * wtf/CurrentTime.h: Add monotonicallyIncreasingTime().
618
619 2011-06-06  Alexandru Chiculita  <achicu@adobe.com>
620
621         Reviewed by Kent Tamura.
622
623         Add ENABLE_CSS_EXCLUSIONS support for build-webkit script
624         https://bugs.webkit.org/show_bug.cgi?id=61628
625
626         * Configurations/FeatureDefines.xcconfig:
627
628 2011-06-06  Mihnea Ovidenie  <mihnea@adobe.com>
629
630         Reviewed by Kent Tamura.
631
632         Add ENABLE(CSS_REGIONS) guard for CSS Regions support
633         https://bugs.webkit.org/show_bug.cgi?id=61631
634
635         * Configurations/FeatureDefines.xcconfig:
636
637 2011-06-06  Carlos Garcia Campos  <cgarcia@igalia.com>
638
639         Unreviewed. Fix the GTK+ build.
640
641         * GNUmakefile.am: Add javascriptcore_cflags variable.
642
643 2011-06-04  Kevin Ollivier  <kevino@theolliviers.com>
644
645         [wx] Unreviewed build fix. Restore the PPC build and allow users to specify architectures
646         to build on Mac.
647
648         * wtf/Platform.h:
649
650 2011-06-04  Gustavo Noronha Silva  <gns@gnome.org>
651
652         Unreviewed, MIPS build fix.
653
654         WebKitGTK+ tarball fails to build on MIPS.
655         https://buildd.debian.org/status/fetch.php?pkg=webkitgtk%2B&arch=mips&ver=1.4.0-1&stamp=1304786691
656
657         * GNUmakefile.list.am: Add missing MIPS-related file to the list
658         of files that are added to the tarball on make dist, and fix
659         sorting.
660
661 2011-06-04  Sam Weinig  <sam@webkit.org>
662
663         Reviewed by Darin Adler.
664
665         Fix formatting of the output generated by KeywordLookupGenerator.py
666         https://bugs.webkit.org/show_bug.cgi?id=62083
667
668         - Uses correct year for copyright.
669         - Puts ending brace on same line as "else if"
670         - Puts starting brace of function on its own line.
671         - Adds some tasteful whitespace.
672         - Adds comments to make clear that scopes are ending
673         - Make macros actually split on two lines.
674
675         * KeywordLookupGenerator.py:
676
677 2011-06-04  Adam Barth  <abarth@webkit.org>
678
679         Reviewed by Eric Seidel.
680
681         KeywordLookupGenerator.py spams stdout in Chromium Linux build
682         https://bugs.webkit.org/show_bug.cgi?id=62087
683
684         This action does not appear to be needed.
685
686         * JavaScriptCore.gyp/JavaScriptCore.gyp:
687
688 2011-06-03  Oliver Hunt  <oliver@apple.com>
689
690         Reviewed by Maciej Stachowiak.
691
692         Lexer needs to provide Identifier for reserved words
693         https://bugs.webkit.org/show_bug.cgi?id=62086
694
695         Alas it is necessary to provide an Identifier reference for keywords
696         so that we can do the right thing when they're used in object literals.
697         We now keep Identifiers for all reserved words in the CommonIdentifiers
698         structure so that we can access them without a hash lookup.
699
700         * KeywordLookupGenerator.py:
701         * parser/Lexer.cpp:
702         (JSC::Lexer::parseIdentifier):
703         * parser/Lexer.h:
704         * runtime/CommonIdentifiers.cpp:
705         (JSC::CommonIdentifiers::CommonIdentifiers):
706         * runtime/CommonIdentifiers.h:
707
708 2011-06-03  Gavin Barraclough  <barraclough@apple.com>
709
710         Reviewed by Sam Weinig.
711
712         Add debug code to break on speculation failures.
713
714         * dfg/DFGJITCompiler.cpp:
715         (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
716         (JSC::DFG::JITCompiler::compileFunction):
717         * dfg/DFGNode.h:
718
719 2011-06-03  Gavin Barraclough  <barraclough@apple.com>
720
721         Reviewed by Sam Weinig.
722
723         https://bugs.webkit.org/show_bug.cgi?id=62082
724         DFG JIT - bug passing arguments that need swap
725
726         This is really just a typo.
727         When setting up the arguments for a call out to a C operation, we'll
728         fail to swap arguments where this is necessary. For example, in the
729         case of 2 arg calls, where the first argument is in %rdx & the second
730         is in %rsi we should swap (exec will be passed in %rdi), but we don't.
731
732         This can also affect function calls passing three arguments.
733
734         * dfg/DFGJITCodeGenerator.h:
735         (JSC::DFG::JITCodeGenerator::setupTwoStubArgs):
736             - Call swap with the correct arguments.
737
738 2011-06-03  Oliver Hunt  <oliver@apple.com>
739
740         Reviewed by Gavin Barraclough.
741
742         Force inlining of some hot lexer functions
743         https://bugs.webkit.org/show_bug.cgi?id=62079
744
745         Fix more GCC stupidity
746
747         * parser/Lexer.h:
748         (JSC::Lexer::isWhiteSpace):
749         (JSC::Lexer::isLineTerminator):
750
751 2011-06-03  Oliver Hunt  <oliver@apple.com>
752
753         Reviewed by Gavin Barraclough.
754
755         GCC not inlining some functions that it really should be
756         https://bugs.webkit.org/show_bug.cgi?id=62075
757
758         Add ALWAYS_INLINE to a number of parsing and lexing functions
759         that should always be inlined.  This gets us ~1.4% on my ad hoc
760         parser test.
761
762         * KeywordLookupGenerator.py:
763         * parser/JSParser.cpp:
764         (JSC::JSParser::next):
765         (JSC::JSParser::nextTokenIsColon):
766         (JSC::JSParser::consume):
767         (JSC::JSParser::match):
768         (JSC::JSParser::tokenStart):
769         (JSC::JSParser::tokenLine):
770         (JSC::JSParser::tokenEnd):
771         * parser/Lexer.cpp:
772         (JSC::isIdentPart):
773
774 2011-06-03  Oliver Hunt  <oliver@apple.com>
775
776         Whoops, fix last minute bug.
777
778         * parser/Lexer.cpp:
779         (JSC::Lexer::parseIdentifier):
780
781 2011-06-03  Martin Robinson  <mrobinson@igalia.com>
782
783         Try to fix the GTK+ build.
784
785         * GNUmakefile.am: Clean up some spaces that should be tabs.
786         * GNUmakefile.list.am: Add KeywordLookup.h to the source list
787         and clean up some spaces that should be tabs.
788
789 2011-06-03  Oliver Hunt  <oliver@apple.com>
790
791         Reviewed by Geoffrey Garen.
792
793         Improve keyword lookup
794         https://bugs.webkit.org/show_bug.cgi?id=61913
795
796         Rather than doing multiple hash lookups as we currently
797         do when trying to identify keywords we now use an 
798         automatically generated decision tree (essentially it's
799         a hard coded patricia trie).  We still use the regular
800         lookup table for the last few characters of an input as
801         this allows us to completely skip all bounds checks.
802
803         * CMakeLists.txt:
804         * DerivedSources.make:
805         * DerivedSources.pro:
806         * GNUmakefile.am:
807         * JavaScriptCore.gyp/JavaScriptCore.gyp:
808         * JavaScriptCore.xcodeproj/project.pbxproj:
809         * KeywordLookupGenerator.py: Added.
810         * make-generated-sources.sh:
811         * parser/Lexer.cpp:
812         (JSC::Lexer::internalShift):
813         (JSC::Lexer::shift):
814         (JSC::Lexer::parseIdentifier):
815         * parser/Lexer.h:
816
817 2011-06-03  Siddharth Mathur  <siddharth.mathur@nokia.com>
818
819         Reviewed by Benjamin Poulain.
820
821         [Qt] Build flag for experimental ICU library support
822         https://bugs.webkit.org/show_bug.cgi?id=60786
823
824         Adds a build-time flag (CONFIG+=use_system_icu) that enables experimental 
825         ICU powered Unicode support. 
826
827         * JavaScriptCore.pri: Support for use_system_icu CONFIG flag.
828         * wtf/unicode/qt4/UnicodeQt4.h: Guard an include file with USE(ICU_UNICODE). 
829
830 2011-06-03  Alexis Menard  <alexis.menard@openbossa.org>
831
832         Reviewed by Benjamin Poulain.
833
834         [Qt] Build fix of QtWebKit 2.2 when inside Qt tree with GCC 4.6.
835         https://bugs.webkit.org/show_bug.cgi?id=61957
836
837         When building inside the Qt source tree, qmake always append the mkspecs
838         defines after ours. We have to workaround and make sure that we append 
839         our flags after the qmake variable used inside Qt. This workaround was provided 
840         by our qmake folks. We need to append in both case because qmake behave differently
841         when called with -spec or via SUBDIR+=. This patch unbreak r87950 on Mac for Qt port.
842
843         * JavaScriptCore.pro:
844
845 2011-06-02  Jay Civelli  <jcivelli@chromium.org>
846
847         Reviewed by Adam Barth.
848
849         Added a method to generate RFC 2822 compliant date strings.
850         https://bugs.webkit.org/show_bug.cgi?id=7169
851
852         * wtf/DateMath.cpp:
853         (WTF::twoDigitStringFromNumber):
854         (WTF::makeRFC2822DateString):
855         * wtf/DateMath.h:
856
857 2011-06-02  Alexis Menard  <alexis.menard@openbossa.org>
858
859         Reviewed by Andreas Kling.
860
861         [Qt] Build fix of QtWebKit 2.2 when inside Qt tree with GCC 4.6.
862         https://bugs.webkit.org/show_bug.cgi?id=61957
863
864         When building inside the Qt source tree, qmake always append the mkspecs
865         defines after ours. We have to workaround and make sure that we append  
866         our flags after the qmake variable used inside Qt. This workaround was provided
867         by our qmake folks.
868
869         * JavaScriptCore.pro:
870
871 2011-06-01  Oliver Hunt  <oliver@apple.com>
872
873         Reviewed by Geoffrey Garen.
874
875         Add single character lookup cache to IdentifierArena
876         https://bugs.webkit.org/show_bug.cgi?id=61879
877
878         Add a simple lookup cache for single ascii character
879         identifiers.  Produces around a 2% improvement in parse
880         time for my adhoc parser test.
881
882         * parser/ParserArena.h:
883         (JSC::IdentifierArena::IdentifierArena):
884         (JSC::IdentifierArena::clear):
885         (JSC::IdentifierArena::makeIdentifier):
886
887 2011-05-31  Oliver Hunt  <oliver@apple.com>
888
889         Reviewed by Geoffrey Garen.
890
891         Freezing a function and its prototype causes browser to crash.
892         https://bugs.webkit.org/show_bug.cgi?id=61758
893
894         Make JSObject::preventExtensions virtual so that we can override it
895         and instantiate all lazy
896
897         * JavaScriptCore.exp:
898         * runtime/JSFunction.cpp:
899         (JSC::createPrototypeProperty):
900         (JSC::JSFunction::preventExtensions):
901         (JSC::JSFunction::getOwnPropertySlot):
902         * runtime/JSFunction.h:
903         * runtime/JSObject.h:
904         * runtime/JSObject.cpp:
905         (JSC::JSObject::seal):
906         (JSC::JSObject::seal):
907
908 2011-06-01  Sheriff Bot  <webkit.review.bot@gmail.com>
909
910         Unreviewed, rolling out r87788.
911         http://trac.webkit.org/changeset/87788
912         https://bugs.webkit.org/show_bug.cgi?id=61856
913
914         breaks windows chromium canary (Requested by jknotten on
915         #webkit).
916
917         * wtf/DateMath.cpp:
918         (WTF::timeClip):
919         * wtf/DateMath.h:
920
921 2011-06-01  Jay Civelli  <jcivelli@chromium.org>
922
923         Reviewed by Adam Barth.
924
925         Added a method to generate RFC 2822 compliant date strings.
926         https://bugs.webkit.org/show_bug.cgi?id=7169
927
928         * wtf/DateMath.cpp:
929         (WTF::twoDigitStringFromNumber):
930         (WTF::makeRFC2822DateString):
931         * wtf/DateMath.h:
932
933 2011-05-31  Yong Li  <yoli@rim.com>
934
935         Reviewed by Eric Seidel.
936
937         https://bugs.webkit.org/show_bug.cgi?id=54807
938         We have been assuming plain bitfields (like "int a : 31") are always signed integers.
939         However some compilers can treat them as unsigned. For example, RVCT 4.0 states plain
940         bitfields (declared without either signed or unsigned qualifiers) are treats as unsigned.
941         http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0348c/Babjddhe.html
942         Although we can use "--signed-bitfields" flag to make RVCT 4.0 behave as most other compilers,
943         always using "signed"/"unsigned" qualifier to declare integral type bitfields is still a good
944         rule we should have in order to make our code independent from compilers and compiler flags.
945
946         No new test added because this change is not known to fix any issue.
947
948         * bytecode/StructureStubInfo.h:
949
950 2011-05-30  Hojong Han  <hojong.han@samsung.com>
951
952         Reviewed by Geoffrey Garen.
953
954         [JSC] malfunction during arithmetic condition check with negative number (-2147483648)
955         https://bugs.webkit.org/show_bug.cgi?id=61416
956
957         * assembler/MacroAssemblerARM.h:
958         (JSC::MacroAssemblerARM::branch32):
959         * tests/mozilla/ecma/Expressions/11.12-1.js:
960         (getTestCases):
961
962 2011-05-29  Geoffrey Garen  <ggaren@apple.com>
963
964         Reviewed by Sam Weinig.
965
966         Some heap refactoring
967         https://bugs.webkit.org/show_bug.cgi?id=61704
968         
969         SunSpider says no change.
970
971         * JavaScriptCore.exp: Export!
972
973         * heap/Heap.cpp: COLLECT_ON_EVERY_ALLOCATION can actually do so now.
974
975         (JSC::Heap::Heap): Changed Heap sub-objects to point to the heap.
976
977         (JSC::Heap::allocate): Changed inline allocation code to only select the
978         size class, since this can be optimized out at compile time -- everything
979         else is now inlined into this out-of-line function.
980         
981         No need to duplicate ASSERTs made in our caller.
982
983         * heap/Heap.h:
984         (JSC::Heap::heap):
985         (JSC::Heap::isMarked):
986         (JSC::Heap::testAndSetMarked):
987         (JSC::Heap::testAndClearMarked):
988         (JSC::Heap::setMarked): Call directly into MarkedBlock instead of adding
989         a layer of indirection through MarkedSpace.
990
991         (JSC::Heap::allocate): See above.
992
993         * heap/MarkedBlock.cpp:
994         (JSC::MarkedBlock::create):
995         (JSC::MarkedBlock::MarkedBlock):
996         * heap/MarkedBlock.h: Changed Heap sub-objects to point to the heap.
997
998         * heap/MarkedSpace.cpp:
999         (JSC::MarkedSpace::MarkedSpace):
1000         (JSC::MarkedSpace::allocateBlock):
1001         * heap/MarkedSpace.h:
1002         (JSC::MarkedSpace::allocate): Updated to match changes above.
1003
1004 2011-05-28  David Kilzer  <ddkilzer@apple.com>
1005
1006         BUILD FIX when building only the interpreter
1007
1008         Fixes the following compiler warning:
1009
1010             JavaScriptCore/runtime/JSGlobalData.cpp:462:6: error: no previous prototype for function 'releaseExecutableMemory' [-Werror,-Wmissing-prototypes,3]
1011              void releaseExecutableMemory(JSGlobalData& globalData)
1012                   ^
1013
1014         * jit/ExecutableAllocator.h: Moved declaration of
1015         JSC::releaseExecutableMemory().
1016
1017 2011-05-28  David Kilzer  <ddkilzer@apple.com>
1018
1019         BUILD FIX after r87527 with ENABLE(BRANCH_COMPACTION)
1020
1021         * assembler/LinkBuffer.h:
1022         (JSC::LinkBuffer::linkCode): Added missing argument.
1023
1024 2011-05-27  Geoffrey Garen  <ggaren@apple.com>
1025
1026         Reviewed by Oliver Hunt.
1027
1028         JS API is too aggressive about throwing exceptions for NULL get or set operations
1029         https://bugs.webkit.org/show_bug.cgi?id=61678
1030
1031         * API/JSCallbackObject.h: Changed our staticValueGetter to a regular
1032         function that returns a JSValue, so it can fail and still forward to
1033         normal property lookup.
1034
1035         * API/JSCallbackObjectFunctions.h:
1036         (JSC::::getOwnPropertySlot): Don't throw an exception when failing to
1037         access a static property -- just forward the access. This allows objects
1038         to observe get/set operations but still let the JS object manage lifetime.
1039
1040         (JSC::::put): Ditto.
1041
1042         (JSC::::getStaticValue): Same as JSCallbackObject.h.
1043
1044         * API/tests/testapi.c:
1045         (MyObject_set_nullGetForwardSet):
1046         * API/tests/testapi.js: Updated tests to reflect slightly less strict
1047         behavior, which matches headerdoc claims.
1048
1049 2011-05-27  Geoffrey Garen  <ggaren@apple.com>
1050
1051         Reviewed by Oliver Hunt.
1052
1053         Property caching is too aggressive for API objects
1054         https://bugs.webkit.org/show_bug.cgi?id=61677
1055
1056         * API/JSCallbackObject.h: Opt in to ProhibitsPropertyCaching, since our
1057         callback APIs allow the client to change its mind about our propertis at
1058         any time.
1059
1060         * API/tests/testapi.c:
1061         (PropertyCatchalls_getProperty):
1062         (PropertyCatchalls_setProperty):
1063         (PropertyCatchalls_getPropertyNames):
1064         (PropertyCatchalls_class):
1065         (main):
1066         * API/tests/testapi.js: Some tests for dynamic API objects.
1067
1068         * interpreter/Interpreter.cpp:
1069         (JSC::Interpreter::tryCachePutByID):
1070         (JSC::Interpreter::tryCacheGetByID):
1071         * jit/JITStubs.cpp:
1072         (JSC::JITThunks::tryCachePutByID):
1073         (JSC::JITThunks::tryCacheGetByID):
1074         (JSC::DEFINE_STUB_FUNCTION): Opt out of property caching if the client
1075         requires it.
1076
1077         * runtime/JSTypeInfo.h:
1078         (JSC::TypeInfo::TypeInfo):
1079         (JSC::TypeInfo::isFinal):
1080         (JSC::TypeInfo::prohibitsPropertyCaching):
1081         (JSC::TypeInfo::flags): Added a flag to track opting out of property
1082         caching. Fixed an "&&" vs "&" typo that was previously harmless, but
1083         is now harmful since m_flags2 can have more than one bit set.
1084
1085 2011-05-27  Stephanie Lewis  <slewis@apple.com>
1086
1087         Unreviewed.
1088
1089         Fix a typo in the order_file flag.
1090
1091         * Configurations/Base.xcconfig:
1092
1093 2011-05-27  Patrick Gansterer  <paroga@webkit.org>
1094
1095         Unreviewed. Build fix for !ENABLE(ASSEMBLER) after r87527.
1096
1097         * runtime/JSGlobalData.cpp:
1098         (JSGlobalData::JSGlobalData):
1099
1100 2011-05-27  Oliver Hunt  <oliver@apple.com>
1101
1102         Reviewed by Geoffrey Garen.
1103
1104         Add a few validity assertions to JSCallbackObject
1105         https://bugs.webkit.org/show_bug.cgi?id=61659
1106
1107         * API/JSCallbackObject.h:
1108         (JSC::JSCallbackObject::visitChildren):
1109
1110 2011-05-27  Oliver Hunt  <oliver@apple.com>
1111
1112         Build fix
1113
1114         * runtime/RegExpCache.cpp:
1115         (JSC::RegExpCache::invalidateCode):
1116
1117 2011-05-27  Oliver Hunt  <oliver@apple.com>
1118
1119         Reviewed by Geoffrey Garen.
1120
1121         Try to release unused executable memory when the FixedVMPool allocator is under pressure
1122         https://bugs.webkit.org/show_bug.cgi?id=61651
1123
1124         Rather than crashing when full the FixedVMPool allocator now returns a null
1125         allocation.  We replace the code that used to CRASH() on null allocations
1126         with logic that asks the provided globalData to release any executable memory
1127         that it can.  Currently this just means throwing away all regexp code, but
1128         in future we'll try to be more aggressive.
1129
1130         * assembler/ARMAssembler.cpp:
1131         (JSC::ARMAssembler::executableCopy):
1132         * assembler/ARMAssembler.h:
1133         * assembler/AssemblerBuffer.h:
1134         (JSC::AssemblerBuffer::executableCopy):
1135         * assembler/AssemblerBufferWithConstantPool.h:
1136         * assembler/LinkBuffer.h:
1137         (JSC::LinkBuffer::LinkBuffer):
1138         (JSC::LinkBuffer::linkCode):
1139         * assembler/MIPSAssembler.h:
1140         (JSC::MIPSAssembler::executableCopy):
1141         * assembler/SH4Assembler.h:
1142         (JSC::SH4Assembler::executableCopy):
1143         * assembler/X86Assembler.h:
1144         (JSC::X86Assembler::executableCopy):
1145         (JSC::X86Assembler::X86InstructionFormatter::executableCopy):
1146         * dfg/DFGJITCompiler.cpp:
1147         (JSC::DFG::JITCompiler::compileFunction):
1148         * jit/ExecutableAllocator.h:
1149         (JSC::ExecutablePool::create):
1150         (JSC::ExecutablePool::alloc):
1151         (JSC::ExecutableAllocator::ExecutableAllocator):
1152         (JSC::ExecutableAllocator::poolForSize):
1153         (JSC::ExecutablePool::ExecutablePool):
1154         (JSC::ExecutablePool::poolAllocate):
1155         * jit/ExecutableAllocatorFixedVMPool.cpp:
1156         (JSC::FixedVMPoolAllocator::alloc):
1157         * jit/JIT.cpp:
1158         (JSC::JIT::privateCompile):
1159         * jit/JITOpcodes.cpp:
1160         (JSC::JIT::privateCompileCTIMachineTrampolines):
1161         * jit/JITOpcodes32_64.cpp:
1162         (JSC::JIT::privateCompileCTIMachineTrampolines):
1163         (JSC::JIT::privateCompileCTINativeCall):
1164         * jit/JITPropertyAccess.cpp:
1165         (JSC::JIT::stringGetByValStubGenerator):
1166         (JSC::JIT::privateCompilePutByIdTransition):
1167         (JSC::JIT::privateCompilePatchGetArrayLength):
1168         (JSC::JIT::privateCompileGetByIdProto):
1169         (JSC::JIT::privateCompileGetByIdSelfList):
1170         (JSC::JIT::privateCompileGetByIdProtoList):
1171         (JSC::JIT::privateCompileGetByIdChainList):
1172         (JSC::JIT::privateCompileGetByIdChain):
1173         * jit/JITPropertyAccess32_64.cpp:
1174         (JSC::JIT::stringGetByValStubGenerator):
1175         (JSC::JIT::privateCompilePutByIdTransition):
1176         (JSC::JIT::privateCompilePatchGetArrayLength):
1177         (JSC::JIT::privateCompileGetByIdProto):
1178         (JSC::JIT::privateCompileGetByIdSelfList):
1179         (JSC::JIT::privateCompileGetByIdProtoList):
1180         (JSC::JIT::privateCompileGetByIdChainList):
1181         (JSC::JIT::privateCompileGetByIdChain):
1182         * jit/SpecializedThunkJIT.h:
1183         (JSC::SpecializedThunkJIT::finalize):
1184         * jit/ThunkGenerators.cpp:
1185         (JSC::charCodeAtThunkGenerator):
1186         (JSC::charAtThunkGenerator):
1187         (JSC::fromCharCodeThunkGenerator):
1188         (JSC::sqrtThunkGenerator):
1189         (JSC::powThunkGenerator):
1190         * runtime/JSGlobalData.cpp:
1191         (JSC::JSGlobalData::JSGlobalData):
1192         (JSC::JSGlobalData::releaseExecutableMemory):
1193         (JSC::releaseExecutableMemory):
1194         * runtime/JSGlobalData.h:
1195         * runtime/RegExpCache.cpp:
1196         (JSC::RegExpCache::invalidateCode):
1197         * runtime/RegExpCache.h:
1198         * yarr/YarrJIT.cpp:
1199         (JSC::Yarr::YarrGenerator::compile):
1200
1201 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
1202
1203         Reviewed by Oliver Hunt.
1204
1205         Optimized ConservativeSet to avoid double-visiting objects
1206         https://bugs.webkit.org/show_bug.cgi?id=61592
1207         
1208         SunSpider thinks this might be a 1% speedup
1209
1210         * heap/ConservativeRoots.h:
1211         (JSC::ConservativeRoots::add): Use testAndClearMarked to avoid double-visiting
1212         an object.
1213
1214         * heap/Heap.h:
1215         (JSC::Heap::isMarked):
1216         (JSC::Heap::testAndSetMarked):
1217         (JSC::Heap::testAndClearMarked):
1218         (JSC::Heap::setMarked): Added testAndClearMarked. Changed argument type
1219         to void*, since clients want to ask questions about arbitrary pointers
1220         into the heap, even when they aren't known to be JSCells.
1221
1222         * heap/MarkedBlock.h:
1223         (JSC::MarkedBlock::testAndClearMarked):
1224         * heap/MarkedSpace.h:
1225         (JSC::MarkedSpace::isMarked):
1226         (JSC::MarkedSpace::testAndSetMarked):
1227         (JSC::MarkedSpace::testAndClearMarked):
1228         (JSC::MarkedSpace::setMarked):
1229         (JSC::MarkedSpace::contains): Ditto.
1230
1231         * wtf/Bitmap.h:
1232         (WTF::::testAndClear): New function for ConservativeRoots's inverted
1233         marking pass.
1234
1235 2011-05-27  Stephanie Lewis  <slewis@apple.com>
1236
1237         Rubber Stamped by Adam Roben.
1238
1239         Update Order Files.  Use -order_file flag since it can order more of the binary.
1240
1241         * Configurations/Base.xcconfig:
1242         * JavaScriptCore.order:
1243
1244 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
1245
1246         Reviewed by Oliver Hunt.
1247
1248         Renamed heapRootMarker to heapRootVisitor to match its class name
1249         https://bugs.webkit.org/show_bug.cgi?id=61584
1250
1251         * heap/Heap.cpp:
1252         (JSC::Heap::markProtectedObjects):
1253         (JSC::Heap::markTempSortVectors):
1254         (JSC::Heap::markRoots):
1255
1256 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
1257
1258         Reviewed by Oliver Hunt.
1259
1260         Removed some interdependency between Heap and SmallStrings by simplifying
1261         the SmallStrings lifetime model
1262         https://bugs.webkit.org/show_bug.cgi?id=61579
1263         
1264         SunSpider reports no change.
1265         
1266         Using Weak<T> could accomplish this too, but we're not sure it will give
1267         us the performance we need. This is a first step, and it accomplishes
1268         most of the value of using Weak<T>.
1269
1270         * heap/Heap.cpp:
1271         (JSC::Heap::destroy):
1272         (JSC::Heap::markRoots):
1273         (JSC::Heap::reset): Finalize small strings just like other weak handles.
1274
1275         * runtime/SmallStrings.cpp:
1276         (JSC::finalize):
1277         (JSC::SmallStrings::finalizeSmallStrings):
1278         * runtime/SmallStrings.h: Make all small strings trivially weak, instead
1279         of having an "all for one, one for all" memory model.
1280
1281 2011-05-26  Oliver Hunt  <oliver@apple.com>
1282
1283         Reviewed by Geoffrey Garen.
1284
1285         Make RegExpCache a weak map
1286         https://bugs.webkit.org/show_bug.cgi?id=61554
1287
1288         Switch to a weak map for the regexp cache, and hide that
1289         behaviour behind RegExp::create.
1290
1291         When a RegExp is compiled it attempts to add itself to
1292         the "strong" cache.  This cache is a simple round-robin
1293         buffer as was the old strong cache.  Happily this can
1294         be smaller than the old strong cache as RegExps are only
1295         added when they're compiled so it is under less pressure
1296         to evict.
1297
1298         * bytecompiler/NodesCodegen.cpp:
1299         (JSC::RegExpNode::emitBytecode):
1300         * runtime/RegExp.cpp:
1301         (JSC::RegExp::RegExp):
1302         (JSC::RegExp::create):
1303         (JSC::RegExp::match):
1304         * runtime/RegExp.h:
1305         (JSC::RegExp::gcShouldInvalidateCode):
1306         (JSC::RegExp::hasCode):
1307         (JSC::RegExp::key):
1308         * runtime/RegExpCache.cpp:
1309         (JSC::RegExpCache::lookupOrCreate):
1310         (JSC::RegExpCache::RegExpCache):
1311         (JSC::RegExpCache::isReachableFromOpaqueRoots):
1312         (JSC::RegExpCache::finalize):
1313         * runtime/RegExpCache.h:
1314         * runtime/RegExpConstructor.cpp:
1315         (JSC::constructRegExp):
1316         * runtime/RegExpPrototype.cpp:
1317         (JSC::regExpProtoFuncCompile):
1318         * runtime/StringPrototype.cpp:
1319         (JSC::stringProtoFuncMatch):
1320         (JSC::stringProtoFuncSearch):
1321
1322 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
1323
1324         Reviewed by Oliver Hunt.
1325
1326         Moved Heap-related functions out of JSCell.h and into respective header files
1327         https://bugs.webkit.org/show_bug.cgi?id=61567
1328
1329         * heap/Heap.h:
1330         (JSC::Heap::allocate):
1331         (JSC::Heap::heap):
1332         * heap/MarkedBlock.h:
1333         (JSC::MarkedBlock::allocate):
1334         * heap/MarkedSpace.h:
1335         (JSC::MarkedSpace::sizeClassFor):
1336         (JSC::MarkedSpace::allocate):
1337         * runtime/JSCell.h:
1338         (JSC::JSCell::destructor):
1339
1340 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
1341
1342         Try to fix Windows build.
1343
1344         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1345
1346 2011-05-26  Ryosuke Niwa  <rniwa@webkit.org>
1347
1348         Reviewed by Eric Seidel.
1349
1350         [debug feature] WTFString should have show() method
1351         https://bugs.webkit.org/show_bug.cgi?id=61149
1352
1353         Added String::show and AtomicString::show in NDEBUG.
1354
1355         * wtf/text/AtomicString.cpp:
1356         (WTF::AtomicString::show):
1357         * wtf/text/AtomicString.h:
1358         * wtf/text/WTFString.cpp:
1359         (String::show):
1360         * wtf/text/WTFString.h:
1361
1362 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
1363
1364         Reviewed by Geoffrey Garen.
1365
1366         Factored out some Heap ASSERTs
1367         https://bugs.webkit.org/show_bug.cgi?id=61565
1368
1369         * JavaScriptCore.exp:
1370         * heap/Heap.cpp:
1371         (JSC::isValidSharedInstanceThreadState):
1372         (JSC::isValidThreadState):
1373         (JSC::Heap::markRoots):
1374         (JSC::Heap::isValidAllocation):
1375         * heap/Heap.h:
1376         * runtime/JSCell.h:
1377         (JSC::JSCell::Heap::allocate):
1378
1379 2011-05-26  Gavin Barraclough  <barraclough@apple.com>
1380
1381         Reviewed by Geoff Garen.
1382
1383         https://bugs.webkit.org/show_bug.cgi?id=61508
1384         DFG JIT - Add support for get by id self caching.
1385
1386         Change the call out to be an unexpected call (using silent spill/fill functions),
1387         add a structure check & compact load to the JIT code, and add repatching mechanisms.
1388         Since DFGOperations may want to be be implemented in asm, make these symbols be extern
1389         "C". Add an asm wrapper to pass the return address to the optimizing get-by-id operation,
1390         so that it can look up its StructureStubInfo.
1391
1392         * JavaScriptCore.xcodeproj/project.pbxproj:
1393             - Added new files.
1394         * bytecode/StructureStubInfo.h:
1395             - Added 'unset' entries to union.
1396         * dfg/DFGJITCodeGenerator.h:
1397         (JSC::DFG::JITCodeGenerator::appendCallWithExceptionCheck):
1398             - Return the call, we need this to populate the StructureStubInfo.
1399         * dfg/DFGJITCompiler.cpp:
1400         (JSC::DFG::JITCompiler::compileFunction):
1401             - Populate the CodebBlock's StructureStubInfo Vector.
1402         * dfg/DFGJITCompiler.h:
1403         (JSC::DFG::JITCompiler::appendCallWithExceptionCheck):
1404             - Return the call, we need this to populate the StructureStubInfo.
1405         (JSC::DFG::JITCompiler::addPropertyAccess):
1406         (JSC::DFG::JITCompiler::PropertyAccessRecord::PropertyAccessRecord):
1407             - Add structures to record property access info during compilation.
1408         * dfg/DFGOperations.cpp:
1409             - Made all external methods extern "C".
1410         (JSC::DFG::operationPutByValInternal):
1411             - Moved outside of the extern "C" block.
1412         * dfg/DFGOperations.h:
1413             - Made all external methods extern "C".
1414         * dfg/DFGRepatch.cpp: Added.
1415         (JSC::DFG::dfgRepatchCall):
1416             - repatch a call to link to a new callee function.
1417         (JSC::DFG::dfgRepatchGetByIdSelf):
1418             - Modify the JIT code to optimize self accesses.
1419         (JSC::DFG::tryCacheGetByID):
1420             - Internal implementation of dfgRepatchGetByID (factor out failing cases).
1421         (JSC::DFG::dfgRepatchGetByID):
1422             - Used to optimize 'operationGetByIdOptimize' - repatches to 'operationGetById', and tries to optimize self accesses!
1423         * dfg/DFGRepatch.h: Added.
1424             - Expose dfgRepatchGetByID.
1425         * dfg/DFGSpeculativeJIT.cpp:
1426         (JSC::DFG::SpeculativeJIT::compile):
1427             - Changed implementation of GetById ops.
1428
1429 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
1430
1431         Rolled back in http://trac.webkit.org/changeset/87408 with Windows build fixed.
1432
1433         * heap/MarkedBlock.cpp:
1434         (JSC::MarkedBlock::MarkedBlock):
1435         * heap/MarkedBlock.h:
1436         * wtf/DoublyLinkedList.h:
1437         (WTF::::DoublyLinkedListNode):
1438         (WTF::::setPrev):
1439         (WTF::::setNext):
1440         (WTF::::prev):
1441         (WTF::::next):
1442         (WTF::::DoublyLinkedList):
1443         (WTF::::isEmpty):
1444         (WTF::::size):
1445         (WTF::::clear):
1446         (WTF::::head):
1447         (WTF::::append):
1448         (WTF::::remove):
1449         (WTF::::removeHead):
1450
1451 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
1452
1453         Rolled out http://trac.webkit.org/changeset/87408 because it broke the
1454         Windows build.
1455
1456         * heap/MarkedBlock.cpp:
1457         (JSC::MarkedBlock::MarkedBlock):
1458         * heap/MarkedBlock.h:
1459         (JSC::MarkedBlock::setPrev):
1460         (JSC::MarkedBlock::setNext):
1461         (JSC::MarkedBlock::prev):
1462         (JSC::MarkedBlock::next):
1463         * wtf/DoublyLinkedList.h:
1464         (WTF::::DoublyLinkedList):
1465         (WTF::::isEmpty):
1466         (WTF::::head):
1467         (WTF::::append):
1468         (WTF::::remove):
1469
1470 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
1471
1472         Reviewed by Oliver Hunt.
1473
1474         Provide a real owner when copying a property table, for the sake of
1475         write barriers.
1476         https://bugs.webkit.org/show_bug.cgi?id=61547
1477         
1478         No test because we can't enable the writeBarrier() ASSERT just yet.
1479
1480         * runtime/Structure.cpp:
1481         (JSC::Structure::addPropertyTransition):
1482
1483 2011-05-26  Adam Roben  <aroben@apple.com>
1484
1485         Windows build fix after r87346
1486
1487         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Fixed up exports to match
1488         reality.
1489
1490 2011-05-26  Patrick Gansterer  <paroga@webkit.org>
1491
1492         Reviewed by Adam Barth.
1493
1494         ASSERT(isMainThread()) when using single threaded jsc executable
1495         https://bugs.webkit.org/show_bug.cgi?id=60846
1496
1497         Remove the ASSERT since we do not have the concept of MainThread in JSC.
1498
1499         * wtf/CryptographicallyRandomNumber.cpp:
1500         (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomNumber):
1501         (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomValues):
1502
1503 2011-05-25  Gavin Barraclough  <barraclough@apple.com>
1504
1505         Reviewed by Sam Weinig.
1506
1507         https://bugs.webkit.org/show_bug.cgi?id=61506
1508
1509         Move the silent spill/fill methods in the DFG JIT to the JITCodeGenerator
1510         so that they are available to the SpeculativeJIT.
1511
1512         * dfg/DFGJITCodeGenerator.h:
1513         (JSC::DFG::JITCodeGenerator::silentSpillGPR):
1514         (JSC::DFG::JITCodeGenerator::silentSpillFPR):
1515         (JSC::DFG::JITCodeGenerator::silentFillGPR):
1516         (JSC::DFG::JITCodeGenerator::silentFillFPR):
1517         (JSC::DFG::JITCodeGenerator::silentSpillAllRegisters):
1518         (JSC::DFG::JITCodeGenerator::silentFillAllRegisters):
1519         * dfg/DFGNonSpeculativeJIT.h:
1520
1521 2011-05-25  Ryosuke Niwa  <rniwa@webkit.org>
1522
1523         An attempt to revive Windows bots.
1524
1525         * runtime/RegExp.cpp:
1526         * runtime/RegExp.h:
1527
1528 2011-05-25  Gavin Barraclough  <barraclough@apple.com>
1529
1530         Reviewed by Sam Weinig.
1531
1532         Bug 61503 - Move population of CodeBlock::m_structureStubInfos into JIT
1533
1534         This data structure, used at runtime by the JIT, is currently unnecessarily populated
1535         with default entries during byte compilation.
1536
1537         Aside from meaning that there is JIT specific code in the bytecompiler, this also ties
1538         us to one entry per corresponding bytecode op, which may be undesirable. Instead,
1539         populate this array from the JIT.
1540
1541         The type StructureStubInfo has two unused states, one for gets & one for puts. Unify
1542         these, so that the class can have a default constructor (and to simply switch statements
1543         in code walking over the table).
1544
1545         This change has ramification for the DFG JIT, in that the DFG JIT used this datastructure
1546         to check for functions containing property access. Instead do so in the DFGByteCodeParser.
1547
1548         * bytecode/CodeBlock.cpp:
1549         (JSC::printStructureStubInfo):
1550         * bytecode/CodeBlock.h:
1551         (JSC::CodeBlock::setNumberOfStructureStubInfos):
1552         (JSC::CodeBlock::numberOfStructureStubInfos):
1553         * bytecode/StructureStubInfo.cpp:
1554         (JSC::StructureStubInfo::deref):
1555         (JSC::StructureStubInfo::visitAggregate):
1556         * bytecode/StructureStubInfo.h:
1557         (JSC::StructureStubInfo::StructureStubInfo):
1558         * bytecompiler/BytecodeGenerator.cpp:
1559         (JSC::BytecodeGenerator::emitGetById):
1560         (JSC::BytecodeGenerator::emitPutById):
1561         (JSC::BytecodeGenerator::emitDirectPutById):
1562         * dfg/DFGByteCodeParser.cpp:
1563         (JSC::DFG::ByteCodeParser::parseBlock):
1564         * jit/JIT.cpp:
1565         (JSC::JIT::JIT):
1566         (JSC::JIT::privateCompileMainPass):
1567         (JSC::JIT::privateCompileSlowCases):
1568         (JSC::JIT::privateCompile):
1569         * jit/JIT.h:
1570         * jit/JITPropertyAccess.cpp:
1571         (JSC::JIT::emit_op_get_by_id):
1572         (JSC::JIT::emit_op_put_by_id):
1573         (JSC::JIT::emit_op_method_check):
1574         (JSC::JIT::compileGetByIdHotPath):
1575         (JSC::JIT::compileGetByIdSlowCase):
1576         (JSC::JIT::emitSlow_op_put_by_id):
1577         * jit/JITPropertyAccess32_64.cpp:
1578         (JSC::JIT::emit_op_get_by_id):
1579         (JSC::JIT::emitSlow_op_get_by_id):
1580         (JSC::JIT::emit_op_put_by_id):
1581         (JSC::JIT::emitSlow_op_put_by_id):
1582         (JSC::JIT::emit_op_method_check):
1583         (JSC::JIT::compileGetByIdHotPath):
1584         (JSC::JIT::compileGetByIdSlowCase):
1585         * runtime/Executable.cpp:
1586         (JSC::tryDFGCompile):
1587
1588 2011-05-25  Gavin Barraclough  <barraclough@apple.com>
1589
1590         Reviewed by Sam Weinig.
1591
1592         Bug 61501 - Unify AbstractMacroAssembler::differenceBetween methods.
1593
1594         * assembler/AbstractMacroAssembler.h:
1595         (JSC::AbstractMacroAssembler::Call::Call):
1596         (JSC::AbstractMacroAssembler::Call::fromTailJump):
1597         (JSC::AbstractMacroAssembler::Jump::Jump):
1598         (JSC::AbstractMacroAssembler::Jump::link):
1599         (JSC::AbstractMacroAssembler::Jump::linkTo):
1600         (JSC::AbstractMacroAssembler::Jump::isSet):
1601         (JSC::AbstractMacroAssembler::differenceBetween):
1602         (JSC::AbstractMacroAssembler::linkJump):
1603         (JSC::AbstractMacroAssembler::getLinkerCallReturnOffset):
1604         * assembler/LinkBuffer.h:
1605         (JSC::LinkBuffer::link):
1606         (JSC::LinkBuffer::locationOf):
1607         (JSC::LinkBuffer::locationOfNearCall):
1608         (JSC::LinkBuffer::returnAddressOffset):
1609         * assembler/MacroAssemblerARM.h:
1610         (JSC::MacroAssemblerARM::linkCall):
1611         * assembler/MacroAssemblerARMv7.h:
1612         (JSC::MacroAssemblerARMv7::linkCall):
1613         * assembler/MacroAssemblerMIPS.h:
1614         (JSC::MacroAssemblerMIPS::linkCall):
1615         * assembler/MacroAssemblerSH4.cpp:
1616         (JSC::MacroAssemblerSH4::linkCall):
1617         * assembler/MacroAssemblerX86.h:
1618         (JSC::MacroAssemblerX86::linkCall):
1619         * assembler/MacroAssemblerX86_64.h:
1620         (JSC::MacroAssemblerX86_64::linkCall):
1621
1622 2011-05-25  Gavin Barraclough  <barraclough@apple.com>
1623
1624         Reviewed by Sam Weinig.
1625
1626         https://bugs.webkit.org/show_bug.cgi?id=61500
1627         Add JSObject::offsetOfPropertyStorage
1628
1629         * jit/JITPropertyAccess.cpp:
1630         (JSC::JIT::compileGetDirectOffset):
1631         (JSC::JIT::compileGetByIdHotPath):
1632         (JSC::JIT::emit_op_put_by_id):
1633         (JSC::JIT::compilePutDirectOffset):
1634         * jit/JITPropertyAccess32_64.cpp:
1635         (JSC::JIT::compileGetByIdHotPath):
1636         (JSC::JIT::emit_op_put_by_id):
1637         (JSC::JIT::compilePutDirectOffset):
1638         (JSC::JIT::compileGetDirectOffset):
1639         * runtime/JSObject.h:
1640         (JSC::JSObject::offsetOfPropertyStorage):
1641
1642 2011-05-25  Oliver Hunt  <oliver@apple.com>
1643
1644         Reviewed by Geoffrey Garen.
1645
1646         Make RegExp GC allocated
1647         https://bugs.webkit.org/show_bug.cgi?id=61490
1648
1649         Make RegExp GC allocated.  Basically mechanical change to replace
1650         most use of [Pass]RefPtr<RegExp> with RegExp* or WriteBarrier<RegExp>
1651         where actual ownership happens.
1652
1653         Made the RegExpCache use Strong<> references currently to avoid any
1654         changes in behaviour.
1655
1656         * JavaScriptCore.exp:
1657         * bytecode/CodeBlock.cpp:
1658         (JSC::CodeBlock::visitAggregate):
1659         * bytecode/CodeBlock.h:
1660         (JSC::CodeBlock::addRegExp):
1661         * bytecompiler/BytecodeGenerator.cpp:
1662         (JSC::BytecodeGenerator::addRegExp):
1663         (JSC::BytecodeGenerator::emitNewRegExp):
1664         * bytecompiler/BytecodeGenerator.h:
1665         * runtime/JSCell.h:
1666         * runtime/JSGlobalData.cpp:
1667         (JSC::JSGlobalData::JSGlobalData):
1668         (JSC::JSGlobalData::clearBuiltinStructures):
1669         (JSC::JSGlobalData::addRegExpToTrace):
1670         * runtime/JSGlobalData.h:
1671         * runtime/JSGlobalObject.cpp:
1672         (JSC::JSGlobalObject::reset):
1673         * runtime/RegExp.cpp:
1674         (JSC::RegExp::RegExp):
1675         (JSC::RegExp::create):
1676         (JSC::RegExp::invalidateCode):
1677         * runtime/RegExp.h:
1678         (JSC::RegExp::createStructure):
1679         * runtime/RegExpCache.cpp:
1680         (JSC::RegExpCache::lookupOrCreate):
1681         (JSC::RegExpCache::create):
1682         * runtime/RegExpCache.h:
1683         * runtime/RegExpConstructor.cpp:
1684         (JSC::constructRegExp):
1685         * runtime/RegExpObject.cpp:
1686         (JSC::RegExpObject::RegExpObject):
1687         (JSC::RegExpObject::visitChildren):
1688         * runtime/RegExpObject.h:
1689         (JSC::RegExpObject::setRegExp):
1690         (JSC::RegExpObject::RegExpObjectData::RegExpObjectData):
1691         * runtime/RegExpPrototype.cpp:
1692         (JSC::RegExpPrototype::RegExpPrototype):
1693         (JSC::regExpProtoFuncCompile):
1694         * runtime/RegExpPrototype.h:
1695         * runtime/StringPrototype.cpp:
1696         (JSC::stringProtoFuncMatch):
1697         (JSC::stringProtoFuncSearch):
1698
1699 2011-05-25  Oliver Hunt  <oliver@apple.com>
1700
1701         Reviewed by Geoffrey Garen.
1702
1703         Generate regexp code lazily
1704         https://bugs.webkit.org/show_bug.cgi?id=61476
1705
1706         RegExp construction now simply validates the RegExp, it does
1707         not perform actual codegen.
1708
1709         * runtime/RegExp.cpp:
1710         (JSC::RegExp::RegExp):
1711         (JSC::RegExp::recompile):
1712         (JSC::RegExp::compile):
1713         (JSC::RegExp::match):
1714         * runtime/RegExp.h:
1715         (JSC::RegExp::recompileIfNecessary):
1716         * runtime/RegExpConstructor.h:
1717         (JSC::RegExpConstructor::performMatch):
1718         * runtime/RegExpObject.cpp:
1719         (JSC::RegExpObject::match):
1720         * runtime/StringPrototype.cpp:
1721         (JSC::stringProtoFuncReplace):
1722         (JSC::stringProtoFuncMatch):
1723         (JSC::stringProtoFuncSearch):
1724         (JSC::stringProtoFuncSplit):
1725
1726 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
1727
1728         Reviewed by Geoffrey Garen.
1729
1730         Removed MarkSetProperties because it was unused
1731         https://bugs.webkit.org/show_bug.cgi?id=61418
1732
1733         * heap/MarkStack.h:
1734         (JSC::MarkSet::MarkSet):
1735         (JSC::MarkStack::append):
1736         * runtime/JSActivation.cpp:
1737         (JSC::JSActivation::visitChildren):
1738         * runtime/JSArray.h:
1739         (JSC::JSArray::visitChildrenDirect):
1740         * runtime/JSPropertyNameIterator.cpp:
1741         (JSC::JSPropertyNameIterator::visitChildren):
1742         * runtime/WriteBarrier.h:
1743         (JSC::MarkStack::appendValues):
1744
1745 2011-05-25  Oliver Hunt  <oliver@apple.com>
1746
1747         Reviewed by Geoffrey Garen.
1748
1749         Make allocations with guard pages ensure that the allocation succeeded
1750         https://bugs.webkit.org/show_bug.cgi?id=61453
1751
1752         Add null checks, and make PageBlock's operator bool() use
1753         the realbase, rather than the start of usable memory.
1754
1755         * wtf/OSAllocatorPosix.cpp:
1756         (WTF::OSAllocator::reserveAndCommit):
1757         * wtf/PageBlock.h:
1758         (WTF::PageBlock::operator bool):
1759         (WTF::PageBlock::PageBlock):
1760
1761 2011-04-10  Kevin Ollivier  <kevino@theolliviers.com>
1762
1763         Reviewed by Eric Seidel.
1764
1765         Add JS_EXPORT_PRIVATE macro for exported methods in bytecompiler headers.
1766         
1767         https://bugs.webkit.org/show_bug.cgi?id=27551
1768
1769         * bytecompiler/BytecodeGenerator.h:
1770
1771 2011-05-24  Keishi Hattori  <keishi@webkit.org>
1772
1773         Reviewed by Kent Tamura.
1774
1775         Disable textfield implementation of <input type=color>. Add INPUT_COLOR feature flag. Add input color sanitizer.
1776         https://bugs.webkit.org/show_bug.cgi?id=61273
1777
1778         * Configurations/FeatureDefines.xcconfig: Added COLOR_INPUT feature flag.
1779
1780 2011-05-24  Kevin Ollivier  <kevino@theolliviers.com>
1781
1782         Reviewed by Eric Seidel.
1783
1784         Add export macros to WTFString.h.
1785         
1786         https://bugs.webkit.org/show_bug.cgi?id=27551
1787
1788         * wtf/text/WTFString.h:
1789         (WTF::String::String):
1790         (WTF::String::findIgnoringCase):
1791         (WTF::String::isHashTableDeletedValue):
1792
1793 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
1794
1795         Maybe fix the Mac build now?
1796
1797         * JavaScriptCore.xcodeproj/project.pbxproj:
1798
1799 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
1800
1801         Maybe fix the Mac build?
1802         
1803         * JavaScriptCore.xcodeproj/project.pbxproj:
1804
1805 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
1806
1807         Reviewed by Oliver Hunt.
1808
1809         Split HeapRootVisitor into its own class
1810         https://bugs.webkit.org/show_bug.cgi?id=61399
1811
1812         * GNUmakefile.list.am:
1813         * JavaScriptCore.gypi:
1814         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1815         * JavaScriptCore.xcodeproj/project.pbxproj:
1816         * heap/HandleHeap.cpp:
1817         * heap/HandleStack.cpp:
1818         * heap/Heap.cpp:
1819         * heap/HeapRootVisitor.h: Copied from Source/JavaScriptCore/heap/MarkStack.h.
1820         * heap/MarkStack.h:
1821         * runtime/ArgList.cpp:
1822         * runtime/SmallStrings.cpp:
1823
1824 2011-05-24  Jay Civelli  <jcivelli@chromium.org>
1825
1826         Rubberstamped by David Kilzer.
1827
1828         Updated some files that I forgot in my previous MHTML CL.
1829
1830         * Configurations/FeatureDefines.xcconfig:
1831
1832 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
1833
1834         Fix the Mac build: Yes, please do remove these files, svn.
1835
1836         * JavaScriptCore.xcodeproj/project.pbxproj:
1837
1838 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
1839
1840         Reviewed by Oliver Hunt.
1841
1842         Let's just have one way to get the system page size, bokay?
1843         https://bugs.webkit.org/show_bug.cgi?id=61384
1844
1845         * CMakeListsEfl.txt:
1846         * CMakeListsWinCE.txt:
1847         * GNUmakefile.list.am:
1848         * JavaScriptCore.exp:
1849         * JavaScriptCore.gypi:
1850         * JavaScriptCore.pro:
1851         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: MarkStack[Platform].cpp
1852         is gone completely now, since it only existed to provide a duplicate way
1853         to access the system page size.
1854
1855         * heap/MarkStack.cpp:
1856         (JSC::MarkStack::reset):
1857         * heap/MarkStack.h:
1858         (JSC::::MarkStackArray):
1859         (JSC::::shrinkAllocation): Use WTF::pageSize.
1860
1861         * heap/MarkStackPosix.cpp:
1862         * heap/MarkStackSymbian.cpp:
1863         * heap/MarkStackWin.cpp: Removed now-empty files.
1864
1865         * jit/ExecutableAllocator.cpp:
1866         (JSC::ExecutableAllocator::reprotectRegion):
1867         * jit/ExecutableAllocator.h:
1868         (JSC::ExecutableAllocator::ExecutableAllocator):
1869         (JSC::ExecutablePool::ExecutablePool):
1870         (JSC::ExecutablePool::poolAllocate):
1871         * jit/ExecutableAllocatorFixedVMPool.cpp: Use WTF::pageSize.
1872
1873         * wscript: Removed now-empty files.
1874
1875         * wtf/PageBlock.cpp:
1876         (WTF::systemPageSize): Integrated questionable Symbian page size rule
1877         from ExecutableAllocator, because that seems like what the original
1878         author should have done.
1879
1880 2011-05-24  Oliver Hunt  <oliver@apple.com>
1881
1882         Reviewed by Gavin Barraclough.
1883
1884         Interpreter crashes with gc validation enabled due to failure to mark initial cache structure
1885         https://bugs.webkit.org/show_bug.cgi?id=61385
1886
1887         The interpreter uses the structure slot of get_by_id and put_by_id to hold
1888         the initial structure it encountered so that it can identify whether a
1889         given access is stable.
1890
1891         When marking though we only visit the slot when we've decided to cache, and
1892         so this value could die.  This was "safe" as the value was only used for a
1893         pointer compare, but it was incorrect.  We now just mark the slot like we
1894         should have been doing already.
1895
1896         * bytecode/CodeBlock.cpp:
1897         (JSC::CodeBlock::visitStructures):
1898
1899 2011-05-24  Adam Roben  <aroben@apple.com>
1900
1901         Windows build fix
1902
1903         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Removed now-inline functions.
1904
1905 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
1906
1907         Windows build fix: update the #if OS(WINDOWS) section to match my last patch.
1908
1909         * heap/MarkStack.h:
1910         (JSC::::shrinkAllocation):
1911
1912 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
1913
1914         Rubber-stamped by Oliver Hunt.
1915
1916         Split out function definitions and class definitions from class
1917         declarations in MarkStack.h, for readability.
1918
1919         * heap/MarkStack.h:
1920         (JSC::MarkStack::MarkStack):
1921         (JSC::MarkStack::~MarkStack):
1922         (JSC::MarkStack::addOpaqueRoot):
1923         (JSC::MarkStack::containsOpaqueRoot):
1924         (JSC::MarkStack::opaqueRootCount):
1925         (JSC::MarkSet::MarkSet):
1926         (JSC::MarkStack::allocateStack):
1927         (JSC::MarkStack::releaseStack):
1928         (JSC::MarkStack::pageSize):
1929         (JSC::::MarkStackArray):
1930         (JSC::::~MarkStackArray):
1931         (JSC::::expand):
1932         (JSC::::append):
1933         (JSC::::removeLast):
1934         (JSC::::last):
1935         (JSC::::isEmpty):
1936         (JSC::::size):
1937         (JSC::::shrinkAllocation):
1938
1939 2011-05-24  Oliver Hunt  <oliver@apple.com>
1940
1941         Reviewed by Geoffrey Garen.
1942
1943         Avoid creating unnecessary identifiers and strings in the syntax checker
1944         https://bugs.webkit.org/show_bug.cgi?id=61378
1945
1946         Selectively tell the lexer that there are some places it does not need to
1947         do the real work of creating Identifiers for IDENT and STRING tokens.
1948
1949         Make parseString and parseIdentifier templatized on whether they should
1950         do real work, or merely validate the tokens.
1951
1952         SunSpider --parse-only reports ~5-8% win depending on hardware.
1953
1954         * parser/ASTBuilder.h:
1955         (JSC::ASTBuilder::createDotAccess):
1956         * parser/JSParser.cpp:
1957         (JSC::JSParser::next):
1958         (JSC::JSParser::consume):
1959         (JSC::JSParser::parseVarDeclarationList):
1960         (JSC::JSParser::parseConstDeclarationList):
1961         (JSC::JSParser::parseExpression):
1962         (JSC::JSParser::parseAssignmentExpression):
1963         (JSC::JSParser::parseConditionalExpression):
1964         (JSC::JSParser::parseBinaryExpression):
1965         (JSC::JSParser::parseProperty):
1966         (JSC::JSParser::parseObjectLiteral):
1967         (JSC::JSParser::parseArrayLiteral):
1968         (JSC::JSParser::parseArguments):
1969         (JSC::JSParser::parseMemberExpression):
1970         * parser/Lexer.cpp:
1971         (JSC::Lexer::parseIdentifier):
1972         (JSC::Lexer::parseString):
1973         (JSC::Lexer::lex):
1974         * parser/Lexer.h:
1975         * parser/SyntaxChecker.h:
1976         (JSC::SyntaxChecker::createDotAccess):
1977         (JSC::SyntaxChecker::createProperty):
1978
1979 2011-05-23  Michael Saboff  <msaboff@apple.com>
1980
1981         Reviewed by Mark Rowe.
1982
1983         Safari often freezes when clicking "Return free memory" in Caches dialog
1984         https://bugs.webkit.org/show_bug.cgi?id=61325
1985
1986         There are two fixes and improvement in instrumentation code used to find 
1987         one of the problems.
1988         Changed ReleaseFreeList() to set the "decommitted" bit when releasing
1989         pages to the system and moving Spans from the normal list to the returned 
1990         list.
1991         Added a "not making forward progress" check to TCMalloc_PageHeap::scavenge
1992         to eliminate an infinite loop if we can't meet the pagesToRelease target.
1993         Added a check for the decommitted bit being set properly in 
1994         TCMalloc_PageHeap::CheckList.
1995
1996         * wtf/FastMalloc.cpp:
1997         (WTF::TCMalloc_PageHeap::scavenge):
1998         (WTF::TCMalloc_PageHeap::Check):
1999         (WTF::TCMalloc_PageHeap::CheckList):
2000         (WTF::ReleaseFreeList):
2001
2002 2011-05-23  Gavin Barraclough  <barraclough@apple.com>
2003
2004         Reviewed by Geoff Garen.
2005
2006         https://bugs.webkit.org/show_bug.cgi?id=61306
2007
2008         The begin characters optimization currently has issues (#61129),
2009         and does not appear to still be a performance win. The prudent
2010         next step seems to be to disable while we ascertain whether this
2011         is still a useful performance optimization.
2012
2013         * yarr/YarrInterpreter.cpp:
2014         (JSC::Yarr::Interpreter::matchDisjunction):
2015         (JSC::Yarr::Interpreter::interpret):
2016         * yarr/YarrInterpreter.h:
2017         (JSC::Yarr::BytecodePattern::BytecodePattern):
2018         * yarr/YarrPattern.cpp:
2019         (JSC::Yarr::YarrPatternConstructor::YarrPatternConstructor):
2020         (JSC::Yarr::YarrPattern::compile):
2021         (JSC::Yarr::YarrPattern::YarrPattern):
2022         * yarr/YarrPattern.h:
2023         (JSC::Yarr::YarrPattern::reset):
2024
2025 2011-05-23  Matthew Delaney  <mdelaney@apple.com>
2026
2027         Reviewed by Simon Fraser.
2028
2029         Remove safeFloatToInt() in FloatRect.cpp and replace with working version of clampToInteger()
2030         https://bugs.webkit.org/show_bug.cgi?id=58216
2031
2032         * wtf/MathExtras.h:
2033         (clampToInteger):
2034         (clampToPositiveInteger):
2035
2036 2011-05-23  Ruben  <chromium@hybridsource.org>
2037
2038         Reviewed by Tony Chang.
2039
2040         Chromium gyp patch to use new POSIX defines toolkit_uses_gtk and os_posix
2041         https://bugs.webkit.org/show_bug.cgi?id=61219
2042
2043         * JavaScriptCore.gyp/JavaScriptCore.gyp:
2044
2045 2011-05-23  Thouraya ANDOLSI  <thouraya.andolsi@st.com>
2046
2047         Reviewed by Gavin Barraclough.
2048
2049         [SH4] AssemblerLabel does not name a type
2050         https://bugs.webkit.org/show_bug.cgi?id=59927
2051
2052         SH4Assembler.h file shoold be included before AbstractMacroAssembler.h.
2053
2054         * assembler/MacroAssemblerSH4.h:
2055
2056 2011-05-23  Ryuan Choi  <ryuan.choi@samsung.com>
2057
2058         Rubber stamped by Eric Seidel.
2059
2060         [CMAKE] Refactoring wtf related code.
2061         https://bugs.webkit.org/show_bug.cgi?id=60146
2062
2063         Move wtf-files to Source/JavaScriptCore/wtf/CMakeLists.txt.
2064
2065         * CMakeLists.txt:
2066         * CMakeListsEfl.txt:
2067         * wtf/CMakeLists.txt:
2068         * wtf/CMakeListsEfl.txt:
2069
2070 2011-05-22  Adam Barth  <abarth@webkit.org>
2071
2072         Enable strict PassOwnPtr for everyone.  I expect this patch will need
2073         some followups to make the GTK and EFL bots green again.
2074
2075         * wtf/PassOwnPtr.h:
2076
2077 2011-05-20  Oliver Hunt  <oliver@apple.com>
2078
2079         Reviewed by Gavin Barraclough.
2080
2081         Reduce size of inline cache path of get_by_id on ARMv7
2082         https://bugs.webkit.org/show_bug.cgi?id=61221
2083
2084         This reduces the code size of get_by_id by 20 bytes
2085
2086         * assembler/ARMv7Assembler.h:
2087         (JSC::ARMv7Assembler::ldrCompact):
2088         (JSC::ARMv7Assembler::repatchCompact):
2089         (JSC::ARMv7Assembler::setUInt7ForLoad):
2090         * assembler/MacroAssemblerARMv7.h:
2091         (JSC::MacroAssemblerARMv7::load32WithCompactAddressOffsetPatch):
2092         * jit/JIT.h:
2093
2094 2011-05-20  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
2095
2096         Reviewed by Oliver Hunt.
2097
2098         Zombies should "live" forever
2099         https://bugs.webkit.org/show_bug.cgi?id=61170
2100
2101         Reusing zombie cells could still hide garbage
2102         collected cell related bugs.
2103
2104         * JavaScriptCore.pro:
2105         * heap/MarkedBlock.cpp:
2106         (JSC::MarkedBlock::clearMarks):
2107         * heap/MarkedBlock.h:
2108         * heap/MarkedSpace.cpp:
2109         (JSC::MarkedSpace::destroy):
2110         * runtime/JSCell.h:
2111         (JSC::JSCell::JSValue::isZombie):
2112         * runtime/JSZombie.h:
2113         (JSC::JSZombie::~JSZombie):
2114         * runtime/WriteBarrier.h:
2115         (JSC::WriteBarrierBase::setWithoutWriteBarrier):
2116
2117 2011-05-20  Brady Eidson  <beidson@apple.com>
2118
2119         Reviewed by Sam Weinig.
2120
2121         <rdar://problem/9472883> and https://bugs.webkit.org/show_bug.cgi?id=61203
2122         Horrendous bug in callOnMainThreadAndWait
2123
2124         * wtf/MainThread.cpp:
2125         (WTF::dispatchFunctionsFromMainThread): Before signaling the background thread with the
2126           syncFlag condition, reacquire the mutex first.
2127
2128 2011-05-20  Oliver Hunt  <oliver@apple.com>
2129
2130         Reviewed by Sam Weinig.
2131
2132         Remove unnecessary double->int conversion at the end of op_div
2133         https://bugs.webkit.org/show_bug.cgi?id=61198
2134
2135         We don't attempt this conversion on 64bit, removing it actually speeds
2136         up sunspider and v8 slightly, and it reduces code size.
2137
2138         * jit/JITArithmetic32_64.cpp:
2139         (JSC::JIT::emit_op_div):
2140
2141 2011-05-19  Evan Martin  <evan@chromium.org>
2142
2143         Reviewed by Tony Chang.
2144
2145         [chromium] remove <(library) variable
2146         https://bugs.webkit.org/show_bug.cgi?id=61158
2147
2148         This was for a build experiment; we can just use the correct value now.
2149
2150         * JavaScriptCore.gyp/JavaScriptCore.gyp:
2151
2152 2011-05-20  Oliver Hunt  <oliver@apple.com>
2153
2154         Reviewed by Sam Weinig.
2155
2156         Interpreter uses wrong bytecode offset for determining exception handler
2157         https://bugs.webkit.org/show_bug.cgi?id=61191
2158
2159         The bytecode offset given for the returnPC from the JIT is
2160         actually the offset for the start of the instruction triggering
2161         the call, whereas in the interpreter it is the actual return
2162         VPC.  This means if the next instruction following a call was
2163         in an exception region we would incorrectly redirect to its
2164         handler.  Long term we want to completely redo how exceptions
2165         are handled anyway so the simplest and lowest risk fix here is
2166         to simply subtract one from the return vPC so that we have an
2167         offset in the triggering instruction.
2168
2169         It turns out this is caught by a couple of tests already.
2170
2171         * interpreter/Interpreter.cpp:
2172         (JSC::Interpreter::unwindCallFrame):
2173
2174 2011-05-20  Xan Lopez  <xlopez@igalia.com>
2175
2176         Reviewed by Oliver Hunt.
2177
2178         JIT requires VM overcommit (particularly on x86-64), Linux does not by default support this without swap?
2179         https://bugs.webkit.org/show_bug.cgi?id=42756
2180
2181         Use the MAP_NORESERVE flag for mmap on Linux to skip the kernel
2182         check of the available memory. This should give us an
2183         overcommit-like behavior in most systems, which is what we want.
2184
2185         * wtf/OSAllocatorPosix.cpp:
2186         (WTF::OSAllocator::reserveAndCommit): pass MAP_NORSERVE to mmap.
2187
2188 2011-05-19  Gabor Loki  <loki@webkit.org>
2189
2190         Fix ARM build after r86919
2191
2192         * assembler/ARMAssembler.h:
2193         (JSC::ARMAssembler::nop):
2194
2195 2011-05-19  Oliver Hunt  <oliver@apple.com>
2196
2197         Reviewed by Gavin Barraclough.
2198
2199         Randomise code starting location a little
2200         https://bugs.webkit.org/show_bug.cgi?id=61161
2201
2202         Add a nop() function to the Assemblers so that we
2203         can randomise code offsets slightly at no real cost.
2204
2205         * assembler/ARMAssembler.h:
2206         (JSC::ARMAssembler::nop):
2207         * assembler/ARMv7Assembler.h:
2208         (JSC::ARMv7Assembler::nop):
2209         * assembler/MacroAssemblerARM.h:
2210         (JSC::MacroAssemblerARM::nop):
2211         * assembler/MacroAssemblerARMv7.h:
2212         (JSC::MacroAssemblerARMv7::nop):
2213         * assembler/MacroAssemblerMIPS.h:
2214         (JSC::MacroAssemblerMIPS::nop):
2215         * assembler/MacroAssemblerSH4.h:
2216         (JSC::MacroAssemblerSH4::nop):
2217         * assembler/MacroAssemblerX86Common.h:
2218         (JSC::MacroAssemblerX86Common::nop):
2219         * assembler/X86Assembler.h:
2220         (JSC::X86Assembler::nop):
2221         * jit/JIT.cpp:
2222         (JSC::JIT::JIT):
2223         (JSC::JIT::privateCompile):
2224         * jit/JIT.h:
2225         * runtime/WeakRandom.h:
2226         (JSC::WeakRandom::getUint32):
2227
2228 2011-05-19  Oliver Hunt  <oliver@apple.com>
2229
2230         Fix windows build.
2231
2232         * wtf/OSAllocatorWin.cpp:
2233         (WTF::OSAllocator::reserveUncommitted):
2234         (WTF::OSAllocator::reserveAndCommit):
2235
2236 2011-05-19  Oliver Hunt  <oliver@apple.com>
2237
2238         Reviewed by Gavin Barraclough.
2239
2240         Add guard pages to each end of the memory region used by the fixedvm allocator
2241         https://bugs.webkit.org/show_bug.cgi?id=61150
2242
2243         Add mechanism to notify the OSAllocator that pages at either end of an
2244         allocation should be considered guard pages.  Update PageReservation,
2245         PageAllocation, etc to handle this.
2246
2247         * JavaScriptCore.exp:
2248         * jit/ExecutableAllocatorFixedVMPool.cpp:
2249         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
2250         * wtf/OSAllocator.h:
2251         * wtf/OSAllocatorPosix.cpp:
2252         (WTF::OSAllocator::reserveUncommitted):
2253         (WTF::OSAllocator::reserveAndCommit):
2254         * wtf/PageAllocation.h:
2255         (WTF::PageAllocation::PageAllocation):
2256         * wtf/PageAllocationAligned.h:
2257         (WTF::PageAllocationAligned::PageAllocationAligned):
2258         * wtf/PageBlock.h:
2259         (WTF::PageBlock::PageBlock):
2260         * wtf/PageReservation.h:
2261         (WTF::PageReservation::reserve):
2262         (WTF::PageReservation::reserveWithGuardPages):
2263             Add a new function to make a reservation that will add guard
2264             pages to the ends of an allocation.
2265         (WTF::PageReservation::PageReservation):
2266
2267 2011-05-19  Oliver Hunt  <oliver@apple.com>
2268
2269         Reviewed by Geoffrey Garen.
2270
2271         Make Executables release their JIT code as soon as they become dead
2272         https://bugs.webkit.org/show_bug.cgi?id=61134
2273
2274         Add an ability to clear an Executable's jit code without requiring
2275         it to be destroyed, and then call that from a finalizer.
2276
2277         * heap/Weak.h:
2278         (JSC::Weak::Weak):
2279         (JSC::Weak::leak):
2280         * jit/JITCode.h:
2281         (JSC::JITCode::clear):
2282         * runtime/Executable.cpp:
2283         (JSC::ExecutableFinalizer::finalize):
2284         (JSC::ExecutableBase::executableFinalizer):
2285         * runtime/Executable.h:
2286         (JSC::ExecutableBase::ExecutableBase):
2287         (JSC::ExecutableBase::clearExecutableCode):
2288
2289 2011-05-19  Adam Roben  <aroben@apple.com>
2290
2291         Remove a redundant and broken data export
2292
2293         Data can't be exported from JavaScriptCore.dll by listing it in the .def file. The
2294         JS_EXPORTDATA macro must be used instead. (In this case it was already being used, leading
2295         to a linker warning about multiple definitions.)
2296
2297         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Removed JSGlobalData::s_info.
2298
2299 2011-05-18  Oliver Hunt  <oliver@apple.com>
2300
2301         Reviewed by Gavin Barraclough.
2302
2303         Some tests crashing in JSC::MarkStack::validateValue beneath ScriptController::clearWindowShell on SnowLeopard Intel Release (WebKit2 Tests)
2304         https://bugs.webkit.org/show_bug.cgi?id=61064
2305
2306         Switch NonFinalObject to using WriteBarrier<> rather than WriteBarrierBase<>
2307         for its inline storage.  This resolves the problem of GC occurring before
2308         a subclass has initialised its anonymous storage.
2309
2310         * runtime/JSObject.h:
2311
2312 2011-05-18  Adam Barth  <abarth@webkit.org>
2313
2314         Reviewed by Sam Weinig.
2315
2316         Delete WTFURL
2317         https://bugs.webkit.org/show_bug.cgi?id=61084
2318
2319         It's been a year and we've failed to complete this project.  It's time
2320         to throw in the towel.
2321
2322         * JavaScriptCore.xcodeproj/project.pbxproj:
2323         * wtf/url: Removed.
2324         * wtf/url/api: Removed.
2325         * wtf/url/api/ParsedURL.cpp: Removed.
2326         * wtf/url/api/ParsedURL.h: Removed.
2327         * wtf/url/api/URLString.h: Removed.
2328         * wtf/url/src: Removed.
2329         * wtf/url/src/RawURLBuffer.h: Removed.
2330         * wtf/url/src/URLBuffer.h: Removed.
2331         * wtf/url/src/URLCharacterTypes.cpp: Removed.
2332         * wtf/url/src/URLCharacterTypes.h: Removed.
2333         * wtf/url/src/URLComponent.h: Removed.
2334         * wtf/url/src/URLEscape.cpp: Removed.
2335         * wtf/url/src/URLEscape.h: Removed.
2336         * wtf/url/src/URLParser.h: Removed.
2337         * wtf/url/src/URLQueryCanonicalizer.h: Removed.
2338         * wtf/url/src/URLSegments.cpp: Removed.
2339         * wtf/url/src/URLSegments.h: Removed.
2340         * wtf/url/wtfurl.gyp: Removed.
2341
2342 2011-05-18  Oliver Hunt  <oliver@apple.com>
2343
2344         Reviewed by Sam Weinig.
2345
2346         JSGlobalObject and some others do GC allocation during initialization, which can cause heap corruption
2347         https://bugs.webkit.org/show_bug.cgi?id=61090
2348
2349         Remove the Structure-free JSGlobalObject constructor and instead always
2350         pass the structure into the JSGlobalObject constructor.
2351         Stop DebuggerActivation creating a new structure every time, and simply
2352         use a single shared structure held by the GlobalData.
2353
2354         * API/JSContextRef.cpp:
2355         * debugger/DebuggerActivation.cpp:
2356         (JSC::DebuggerActivation::DebuggerActivation):
2357         * jsc.cpp:
2358         (GlobalObject::GlobalObject):
2359         (functionRun):
2360         (jscmain):
2361         * runtime/JSGlobalData.cpp:
2362         (JSC::JSGlobalData::JSGlobalData):
2363         (JSC::JSGlobalData::clearBuiltinStructures):
2364         * runtime/JSGlobalData.h:
2365         * runtime/JSGlobalObject.h:
2366
2367 2011-05-18  Oliver Hunt  <oliver@apple.com>
2368
2369         Reviewed by Adam Roben.
2370
2371         Disable gc validation in release builds
2372         https://bugs.webkit.org/show_bug.cgi?id=60680
2373
2374         Add back the NDEBUG check
2375
2376         * wtf/Platform.h:
2377
2378 2011-05-17  Geoffrey Garen  <ggaren@apple.com>
2379
2380         Rolled out attempts to fix EFL build because they're not enough -- the
2381         build script needs to be fixed.
2382
2383         * runtime/BooleanPrototype.cpp:
2384         * runtime/DateConstructor.cpp:
2385         * runtime/ErrorPrototype.cpp:
2386
2387 2011-05-17  Geoffrey Garen  <ggaren@apple.com>
2388
2389         More attempts to work around the EFL build system being borken.
2390
2391         * runtime/DateConstructor.cpp:
2392         * runtime/ErrorPrototype.cpp:
2393
2394 2011-05-17  Geoffrey Garen  <ggaren@apple.com>
2395
2396         Try to fix the EFL build.
2397
2398         * runtime/BooleanPrototype.cpp:
2399
2400 2011-05-16  Geoffrey Garen  <ggaren@apple.com>
2401
2402         Rolling back in r86653 with build fixed.
2403
2404         Reviewed by Gavin Barraclough and Oliver Hunt.
2405
2406         Global object initialization is expensive
2407         https://bugs.webkit.org/show_bug.cgi?id=60933
2408         
2409         Changed a bunch of globals to allocate their properties lazily, and changed
2410         the global object to allocate a bunch of its globals lazily.
2411         
2412         This reduces the footprint of a global object from 287 objects with 58
2413         functions for 24K to 173 objects with 20 functions for 15K.
2414
2415         Large patch, but it's all mechanical.
2416
2417         * DerivedSources.make:
2418         * JavaScriptCore.exp: Build!
2419
2420         * create_hash_table: Added a special case for fromCharCode, since it uses
2421         a custom "thunk generator".
2422
2423         * heap/Heap.cpp:
2424         (JSC::TypeCounter::operator()): Fixed a bug where the type counter would
2425         overcount objects that were owned through more than one mechanism because
2426         it was getting in the way of counting the results for this patch.
2427
2428         * interpreter/CallFrame.h:
2429         (JSC::ExecState::arrayConstructorTable):
2430         (JSC::ExecState::arrayPrototypeTable):
2431         (JSC::ExecState::booleanPrototypeTable):
2432         (JSC::ExecState::dateConstructorTable):
2433         (JSC::ExecState::errorPrototypeTable):
2434         (JSC::ExecState::globalObjectTable):
2435         (JSC::ExecState::numberConstructorTable):
2436         (JSC::ExecState::numberPrototypeTable):
2437         (JSC::ExecState::objectPrototypeTable):
2438         (JSC::ExecState::regExpPrototypeTable):
2439         (JSC::ExecState::stringConstructorTable): Added new tables.
2440
2441         * runtime/ArrayConstructor.cpp:
2442         (JSC::ArrayConstructor::ArrayConstructor):
2443         (JSC::ArrayConstructor::getOwnPropertySlot):
2444         (JSC::ArrayConstructor::getOwnPropertyDescriptor):
2445         * runtime/ArrayConstructor.h:
2446         (JSC::ArrayConstructor::createStructure):
2447         * runtime/ArrayPrototype.cpp:
2448         (JSC::ArrayPrototype::getOwnPropertySlot):
2449         (JSC::ArrayPrototype::getOwnPropertyDescriptor):
2450         * runtime/ArrayPrototype.h:
2451         * runtime/BooleanPrototype.cpp:
2452         (JSC::BooleanPrototype::BooleanPrototype):
2453         (JSC::BooleanPrototype::getOwnPropertySlot):
2454         (JSC::BooleanPrototype::getOwnPropertyDescriptor):
2455         * runtime/BooleanPrototype.h:
2456         (JSC::BooleanPrototype::createStructure):
2457         * runtime/DateConstructor.cpp:
2458         (JSC::DateConstructor::DateConstructor):
2459         (JSC::DateConstructor::getOwnPropertySlot):
2460         (JSC::DateConstructor::getOwnPropertyDescriptor):
2461         * runtime/DateConstructor.h:
2462         (JSC::DateConstructor::createStructure):
2463         * runtime/ErrorPrototype.cpp:
2464         (JSC::ErrorPrototype::ErrorPrototype):
2465         (JSC::ErrorPrototype::getOwnPropertySlot):
2466         (JSC::ErrorPrototype::getOwnPropertyDescriptor):
2467         * runtime/ErrorPrototype.h:
2468         (JSC::ErrorPrototype::createStructure): Standardized these objects
2469         to use static tables for function properties.
2470
2471         * runtime/JSGlobalData.cpp:
2472         (JSC::JSGlobalData::JSGlobalData):
2473         (JSC::JSGlobalData::~JSGlobalData):
2474         * runtime/JSGlobalData.h: Added new tables.
2475
2476         * runtime/JSGlobalObject.cpp:
2477         (JSC::JSGlobalObject::reset):
2478         (JSC::JSGlobalObject::addStaticGlobals):
2479         (JSC::JSGlobalObject::getOwnPropertySlot):
2480         (JSC::JSGlobalObject::getOwnPropertyDescriptor):
2481         * runtime/JSGlobalObject.h:
2482         * runtime/JSGlobalObjectFunctions.cpp:
2483         * runtime/JSGlobalObjectFunctions.h: Changed JSGlobalObject to use a
2484         static table for its global functions. This required uninlining some
2485         things to avoid a circular header dependency. However, those things
2486         probably shouldn't have been inlined in the first place.
2487         
2488         Even more global object properties can be made lazy, but that requires
2489         more in-depth changes.
2490
2491         * runtime/MathObject.cpp:
2492         * runtime/NumberConstructor.cpp:
2493         (JSC::NumberConstructor::getOwnPropertySlot):
2494         (JSC::NumberConstructor::getOwnPropertyDescriptor):
2495         * runtime/NumberPrototype.cpp:
2496         (JSC::NumberPrototype::NumberPrototype):
2497         (JSC::NumberPrototype::getOwnPropertySlot):
2498         (JSC::NumberPrototype::getOwnPropertyDescriptor):
2499         * runtime/NumberPrototype.h:
2500         (JSC::NumberPrototype::createStructure):
2501         * runtime/ObjectPrototype.cpp:
2502         (JSC::ObjectPrototype::ObjectPrototype):
2503         (JSC::ObjectPrototype::put):
2504         (JSC::ObjectPrototype::getOwnPropertySlot):
2505         (JSC::ObjectPrototype::getOwnPropertyDescriptor):
2506         * runtime/ObjectPrototype.h:
2507         (JSC::ObjectPrototype::createStructure):
2508         * runtime/RegExpPrototype.cpp:
2509         (JSC::RegExpPrototype::RegExpPrototype):
2510         (JSC::RegExpPrototype::getOwnPropertySlot):
2511         (JSC::RegExpPrototype::getOwnPropertyDescriptor):
2512         * runtime/RegExpPrototype.h:
2513         (JSC::RegExpPrototype::createStructure):
2514         * runtime/StringConstructor.cpp:
2515         (JSC::StringConstructor::StringConstructor):
2516         (JSC::StringConstructor::getOwnPropertySlot):
2517         (JSC::StringConstructor::getOwnPropertyDescriptor):
2518         * runtime/StringConstructor.h:
2519         (JSC::StringConstructor::createStructure): Standardized these objects
2520         to use static tables for function properties.
2521
2522 2011-05-17  Sam Weinig  <sam@webkit.org>
2523
2524         Reviewed by Oliver Hunt.
2525
2526         JSGlobalContextRelease should not trigger a synchronous garbage collection
2527         https://bugs.webkit.org/show_bug.cgi?id=60990
2528
2529         * API/JSContextRef.cpp:
2530         Change synchronous call to collectAllGarbage to a call to trigger the
2531         activityCallback.
2532
2533 2011-05-16  Oliver Hunt  <oliver@apple.com>
2534
2535         Reviewed by Gavin Barraclough.
2536
2537         Reduce code size for inline cache
2538         https://bugs.webkit.org/show_bug.cgi?id=60942
2539
2540         This patch introduces the concept of a "compact" address that
2541         allows individual architectures to control the maximum offset
2542         used for the inline path of get_by_id.  This reduces the code
2543         size of get_by_id by 3 bytes on x86 and x86_64 and slightly
2544         improves performance on v8 tests.
2545
2546         * assembler/ARMAssembler.h:
2547         (JSC::ARMAssembler::repatchCompact):
2548         * assembler/ARMv7Assembler.h:
2549         (JSC::ARMv7Assembler::repatchCompact):
2550         * assembler/AbstractMacroAssembler.h:
2551         (JSC::AbstractMacroAssembler::DataLabelCompact::DataLabelCompact):
2552         (JSC::AbstractMacroAssembler::differenceBetween):
2553         (JSC::AbstractMacroAssembler::repatchCompact):
2554         * assembler/CodeLocation.h:
2555         (JSC::CodeLocationDataLabelCompact::CodeLocationDataLabelCompact):
2556         (JSC::CodeLocationCommon::dataLabelCompactAtOffset):
2557         * assembler/LinkBuffer.h:
2558         (JSC::LinkBuffer::locationOf):
2559         * assembler/MIPSAssembler.h:
2560         (JSC::MIPSAssembler::repatchCompact):
2561         * assembler/MacroAssembler.h:
2562         (JSC::MacroAssembler::loadPtrWithCompactAddressOffsetPatch):
2563         * assembler/MacroAssemblerARM.h:
2564         (JSC::MacroAssemblerARM::load32WithCompactAddressOffsetPatch):
2565         * assembler/MacroAssemblerARMv7.h:
2566         (JSC::MacroAssemblerARMv7::load32WithCompactAddressOffsetPatch):
2567         * assembler/MacroAssemblerMIPS.h:
2568         (JSC::MacroAssemblerMIPS::load32WithCompactAddressOffsetPatch):
2569         * assembler/MacroAssemblerSH4.h:
2570         (JSC::MacroAssemblerSH4::load32WithAddressOffsetPatch):
2571         * assembler/MacroAssemblerX86.h:
2572         (JSC::MacroAssemblerX86::repatchCompact):
2573         * assembler/MacroAssemblerX86Common.h:
2574         (JSC::MacroAssemblerX86Common::loadCompactWithAddressOffsetPatch):
2575         * assembler/MacroAssemblerX86_64.h:
2576         (JSC::MacroAssemblerX86_64::loadPtrWithCompactAddressOffsetPatch):
2577         * assembler/RepatchBuffer.h:
2578         (JSC::RepatchBuffer::repatch):
2579         * assembler/SH4Assembler.h:
2580         (JSC::SH4Assembler::repatchCompact):
2581         * assembler/X86Assembler.h:
2582         (JSC::X86Assembler::movl_mr_disp8):
2583         (JSC::X86Assembler::movq_mr_disp8):
2584         (JSC::X86Assembler::repatchCompact):
2585         (JSC::X86Assembler::setInt8):
2586         (JSC::X86Assembler::X86InstructionFormatter::oneByteOp_disp8):
2587         (JSC::X86Assembler::X86InstructionFormatter::oneByteOp64_disp8):
2588         (JSC::X86Assembler::X86InstructionFormatter::memoryModRM):
2589         * jit/JIT.h:
2590         * jit/JITPropertyAccess.cpp:
2591         (JSC::JIT::compileGetByIdHotPath):
2592         (JSC::JIT::emit_op_put_by_id):
2593         (JSC::JIT::patchGetByIdSelf):
2594         * jit/JITPropertyAccess32_64.cpp:
2595         (JSC::JIT::compileGetByIdHotPath):
2596         (JSC::JIT::emit_op_put_by_id):
2597         (JSC::JIT::patchGetByIdSelf):
2598         * jit/JITStubs.cpp:
2599         (JSC::JITThunks::tryCacheGetByID):
2600
2601 2011-05-16  Sheriff Bot  <webkit.review.bot@gmail.com>
2602
2603         Unreviewed, rolling out r86653.
2604         http://trac.webkit.org/changeset/86653
2605         https://bugs.webkit.org/show_bug.cgi?id=60944
2606
2607         "Caused regressions on Windows, OSX and EFL" (Requested by
2608         yutak on #webkit).
2609
2610         * DerivedSources.make:
2611         * DerivedSources.pro:
2612         * GNUmakefile.am:
2613         * GNUmakefile.list.am:
2614         * JavaScriptCore.exp:
2615         * JavaScriptCore.gypi:
2616         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2617         * create_hash_table:
2618         * heap/Heap.cpp:
2619         (JSC::TypeCounter::operator()):
2620         * interpreter/CallFrame.h:
2621         (JSC::ExecState::arrayTable):
2622         (JSC::ExecState::numberTable):
2623         * runtime/ArrayConstructor.cpp:
2624         (JSC::ArrayConstructor::ArrayConstructor):
2625         * runtime/ArrayConstructor.h:
2626         * runtime/ArrayPrototype.cpp:
2627         (JSC::ArrayPrototype::getOwnPropertySlot):
2628         (JSC::ArrayPrototype::getOwnPropertyDescriptor):
2629         * runtime/ArrayPrototype.h:
2630         * runtime/BooleanPrototype.cpp:
2631         (JSC::BooleanPrototype::BooleanPrototype):
2632         * runtime/BooleanPrototype.h:
2633         * runtime/DateConstructor.cpp:
2634         (JSC::DateConstructor::DateConstructor):
2635         * runtime/DateConstructor.h:
2636         * runtime/ErrorPrototype.cpp:
2637         (JSC::ErrorPrototype::ErrorPrototype):
2638         * runtime/ErrorPrototype.h:
2639         * runtime/JSGlobalData.cpp:
2640         (JSC::JSGlobalData::JSGlobalData):
2641         (JSC::JSGlobalData::~JSGlobalData):
2642         * runtime/JSGlobalData.h:
2643         * runtime/JSGlobalObject.cpp:
2644         (JSC::JSGlobalObject::reset):
2645         * runtime/JSGlobalObject.h:
2646         (JSC::JSGlobalObject::addStaticGlobals):
2647         (JSC::JSGlobalObject::getOwnPropertySlot):
2648         (JSC::JSGlobalObject::getOwnPropertyDescriptor):
2649         * runtime/JSGlobalObjectFunctions.cpp:
2650         (JSC::globalFuncJSCPrint):
2651         * runtime/JSGlobalObjectFunctions.h:
2652         * runtime/MathObject.cpp:
2653         * runtime/NumberConstructor.cpp:
2654         (JSC::NumberConstructor::getOwnPropertySlot):
2655         (JSC::NumberConstructor::getOwnPropertyDescriptor):
2656         * runtime/NumberPrototype.cpp:
2657         (JSC::NumberPrototype::NumberPrototype):
2658         * runtime/NumberPrototype.h:
2659         * runtime/ObjectPrototype.cpp:
2660         (JSC::ObjectPrototype::ObjectPrototype):
2661         (JSC::ObjectPrototype::put):
2662         (JSC::ObjectPrototype::getOwnPropertySlot):
2663         * runtime/ObjectPrototype.h:
2664         * runtime/RegExpPrototype.cpp:
2665         (JSC::RegExpPrototype::RegExpPrototype):
2666         * runtime/RegExpPrototype.h:
2667         * runtime/StringConstructor.cpp:
2668         (JSC::StringConstructor::StringConstructor):
2669         * runtime/StringConstructor.h:
2670
2671 2011-05-16  Geoffrey Garen  <ggaren@apple.com>
2672
2673         Reviewed by Geoffrey Garen.
2674
2675         Global object initialization is expensive
2676         https://bugs.webkit.org/show_bug.cgi?id=60933
2677         
2678         Changed a bunch of globals to allocate their properties lazily, and changed
2679         the global object to allocate a bunch of its globals lazily.
2680         
2681         This reduces the footprint of a global object from 287 objects with 58
2682         functions for 24K to 173 objects with 20 functions for 15K.
2683
2684         Large patch, but it's all mechanical.
2685
2686         * DerivedSources.make:
2687         * JavaScriptCore.exp: Build!
2688
2689         * create_hash_table: Added a special case for fromCharCode, since it uses
2690         a custom "thunk generator".
2691
2692         * heap/Heap.cpp:
2693         (JSC::TypeCounter::operator()): Fixed a bug where the type counter would
2694         overcount objects that were owned through more than one mechanism because
2695         it was getting in the way of counting the results for this patch.
2696
2697         * interpreter/CallFrame.h:
2698         (JSC::ExecState::arrayConstructorTable):
2699         (JSC::ExecState::arrayPrototypeTable):
2700         (JSC::ExecState::booleanPrototypeTable):
2701         (JSC::ExecState::dateConstructorTable):
2702         (JSC::ExecState::errorPrototypeTable):
2703         (JSC::ExecState::globalObjectTable):
2704         (JSC::ExecState::numberConstructorTable):
2705         (JSC::ExecState::numberPrototypeTable):
2706         (JSC::ExecState::objectPrototypeTable):
2707         (JSC::ExecState::regExpPrototypeTable):
2708         (JSC::ExecState::stringConstructorTable): Added new tables.
2709
2710         * runtime/ArrayConstructor.cpp:
2711         (JSC::ArrayConstructor::ArrayConstructor):
2712         (JSC::ArrayConstructor::getOwnPropertySlot):
2713         (JSC::ArrayConstructor::getOwnPropertyDescriptor):
2714         * runtime/ArrayConstructor.h:
2715         (JSC::ArrayConstructor::createStructure):
2716         * runtime/ArrayPrototype.cpp:
2717         (JSC::ArrayPrototype::getOwnPropertySlot):
2718         (JSC::ArrayPrototype::getOwnPropertyDescriptor):
2719         * runtime/ArrayPrototype.h:
2720         * runtime/BooleanPrototype.cpp:
2721         (JSC::BooleanPrototype::BooleanPrototype):
2722         (JSC::BooleanPrototype::getOwnPropertySlot):
2723         (JSC::BooleanPrototype::getOwnPropertyDescriptor):
2724         * runtime/BooleanPrototype.h:
2725         (JSC::BooleanPrototype::createStructure):
2726         * runtime/DateConstructor.cpp:
2727         (JSC::DateConstructor::DateConstructor):
2728         (JSC::DateConstructor::getOwnPropertySlot):
2729         (JSC::DateConstructor::getOwnPropertyDescriptor):
2730         * runtime/DateConstructor.h:
2731         (JSC::DateConstructor::createStructure):
2732         * runtime/ErrorPrototype.cpp:
2733         (JSC::ErrorPrototype::ErrorPrototype):
2734         (JSC::ErrorPrototype::getOwnPropertySlot):
2735         (JSC::ErrorPrototype::getOwnPropertyDescriptor):
2736         * runtime/ErrorPrototype.h:
2737         (JSC::ErrorPrototype::createStructure): Standardized these objects
2738         to use static tables for function properties.
2739
2740         * runtime/JSGlobalData.cpp:
2741         (JSC::JSGlobalData::JSGlobalData):
2742         (JSC::JSGlobalData::~JSGlobalData):
2743         * runtime/JSGlobalData.h: Added new tables.
2744
2745         * runtime/JSGlobalObject.cpp:
2746         (JSC::JSGlobalObject::reset):
2747         (JSC::JSGlobalObject::addStaticGlobals):
2748         (JSC::JSGlobalObject::getOwnPropertySlot):
2749         (JSC::JSGlobalObject::getOwnPropertyDescriptor):
2750         * runtime/JSGlobalObject.h:
2751         * runtime/JSGlobalObjectFunctions.cpp:
2752         * runtime/JSGlobalObjectFunctions.h: Changed JSGlobalObject to use a
2753         static table for its global functions. This required uninlining some
2754         things to avoid a circular header dependency. However, those things
2755         probably shouldn't have been inlined in the first place.
2756         
2757         Even more global object properties can be made lazy, but that requires
2758         more in-depth changes.
2759
2760         * runtime/MathObject.cpp:
2761         * runtime/NumberConstructor.cpp:
2762         (JSC::NumberConstructor::getOwnPropertySlot):
2763         (JSC::NumberConstructor::getOwnPropertyDescriptor):
2764         * runtime/NumberPrototype.cpp:
2765         (JSC::NumberPrototype::NumberPrototype):
2766         (JSC::NumberPrototype::getOwnPropertySlot):
2767         (JSC::NumberPrototype::getOwnPropertyDescriptor):
2768         * runtime/NumberPrototype.h:
2769         (JSC::NumberPrototype::createStructure):
2770         * runtime/ObjectPrototype.cpp:
2771         (JSC::ObjectPrototype::ObjectPrototype):
2772         (JSC::ObjectPrototype::put):
2773         (JSC::ObjectPrototype::getOwnPropertySlot):
2774         (JSC::ObjectPrototype::getOwnPropertyDescriptor):
2775         * runtime/ObjectPrototype.h:
2776         (JSC::ObjectPrototype::createStructure):
2777         * runtime/RegExpPrototype.cpp:
2778         (JSC::RegExpPrototype::RegExpPrototype):
2779         (JSC::RegExpPrototype::getOwnPropertySlot):
2780         (JSC::RegExpPrototype::getOwnPropertyDescriptor):
2781         * runtime/RegExpPrototype.h:
2782         (JSC::RegExpPrototype::createStructure):
2783         * runtime/StringConstructor.cpp:
2784         (JSC::StringConstructor::StringConstructor):
2785         (JSC::StringConstructor::getOwnPropertySlot):
2786         (JSC::StringConstructor::getOwnPropertyDescriptor):
2787         * runtime/StringConstructor.h:
2788         (JSC::StringConstructor::createStructure): Standardized these objects
2789         to use static tables for function properties.
2790
2791 2011-05-16  David Kilzer  <ddkilzer@apple.com>
2792
2793         <http://webkit.org/b/60913> C++ exceptions should not be enabled when building with llvm-gcc-4.2
2794         <rdar://problem/9446430>
2795
2796         Reviewed by Mark Rowe.
2797
2798         * Configurations/Base.xcconfig: Fixed typo.
2799
2800 2011-05-16  Oliver Hunt  <oliver@apple.com>
2801
2802         Reviewed by Geoffrey Garen.
2803
2804         JSWeakObjectMap finalisation may occur while gc is in inconsistent state
2805         https://bugs.webkit.org/show_bug.cgi?id=60908
2806         <rdar://problem/9409491>
2807
2808         We need to ensure that we have called all the weak map finalizers while
2809         the global object (and hence global context) is still in a consistent
2810         state.  The best way to achieve this is to simply use a weak handle and
2811         finalizer on the global object.
2812
2813         * JavaScriptCore.exp:
2814         * runtime/JSGlobalObject.cpp:
2815         (JSC::JSGlobalObject::WeakMapFinalizer::finalize):
2816         * runtime/JSGlobalObject.h:
2817         (JSC::JSGlobalObject::registerWeakMap):
2818
2819 2011-05-16  Siddharth Mathur  <siddharth.mathur@nokia.com>
2820
2821         Reviewed by Laszlo Gombos.
2822
2823         [Qt][WK2][Symbian] Shared memory implementation for Symbian
2824         https://bugs.webkit.org/show_bug.cgi?id=55875
2825
2826         * wtf/Platform.h: Exclude Symbian OS from USE(UNIX_DOMAIN_SOCKETS) users
2827
2828 2011-05-16  Gavin Barraclough  <barraclough@apple.com>
2829
2830         Rubber stamped by Geoff Garen.
2831
2832         https://bugs.webkit.org/show_bug.cgi?id=60866
2833         Evaluation order broken for empty alternatives in subpatterns
2834
2835         Reverting https://bugs.webkit.org/show_bug.cgi?id=51395
2836
2837         * yarr/YarrPattern.cpp:
2838         (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
2839
2840 2011-05-15  Gavin Barraclough  <barraclough@apple.com>
2841
2842         Reviewed by Geoff Garen & Michael Saboff.
2843
2844         https://bugs.webkit.org/show_bug.cgi?id=60860
2845         Simplify backtracking in YARR JIT
2846
2847         YARR JIT currently performs a single pass of code generation over the pattern,
2848         with special handling to allow the code generation for some backtracking code
2849         out of line. We can simplify things by moving to a common mechanism whereby all
2850         forwards matching code is generated in one pass, and all backtracking code is
2851         generated in another. Backtracking code can be generated in reverse order, to
2852         optimized the common fall-through case.
2853
2854         To make it easier to walk over the pattern, we can first convert to a more
2855         byte-code like format before JIT generating. In time we should unify this with
2856         the YARR interpreter to more closely unify the two.
2857
2858         * yarr/YarrJIT.cpp:
2859         (JSC::Yarr::YarrGenerator::jumpIfNoAvailableInput):
2860         (JSC::Yarr::YarrGenerator::YarrOp::YarrOp):
2861         (JSC::Yarr::YarrGenerator::BacktrackingState::BacktrackingState):
2862         (JSC::Yarr::YarrGenerator::BacktrackingState::append):
2863         (JSC::Yarr::YarrGenerator::BacktrackingState::fallthrough):
2864         (JSC::Yarr::YarrGenerator::BacktrackingState::link):
2865         (JSC::Yarr::YarrGenerator::BacktrackingState::linkTo):
2866         (JSC::Yarr::YarrGenerator::BacktrackingState::takeBacktracksToJumpList):
2867         (JSC::Yarr::YarrGenerator::BacktrackingState::isEmpty):
2868         (JSC::Yarr::YarrGenerator::BacktrackingState::linkDataLabels):
2869         (JSC::Yarr::YarrGenerator::BacktrackingState::ReturnAddressRecord::ReturnAddressRecord):
2870         (JSC::Yarr::YarrGenerator::generateAssertionBOL):
2871         (JSC::Yarr::YarrGenerator::backtrackAssertionBOL):
2872         (JSC::Yarr::YarrGenerator::generateAssertionEOL):
2873         (JSC::Yarr::YarrGenerator::backtrackAssertionEOL):
2874         (JSC::Yarr::YarrGenerator::matchAssertionWordchar):
2875         (JSC::Yarr::YarrGenerator::generateAssertionWordBoundary):
2876         (JSC::Yarr::YarrGenerator::backtrackAssertionWordBoundary):
2877         (JSC::Yarr::YarrGenerator::generatePatternCharacterOnce):
2878         (JSC::Yarr::YarrGenerator::backtrackPatternCharacterOnce):
2879         (JSC::Yarr::YarrGenerator::generatePatternCharacterFixed):
2880         (JSC::Yarr::YarrGenerator::backtrackPatternCharacterFixed):
2881         (JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy):
2882         (JSC::Yarr::YarrGenerator::backtrackPatternCharacterGreedy):
2883         (JSC::Yarr::YarrGenerator::generatePatternCharacterNonGreedy):
2884         (JSC::Yarr::YarrGenerator::backtrackPatternCharacterNonGreedy):
2885         (JSC::Yarr::YarrGenerator::generateCharacterClassOnce):
2886         (JSC::Yarr::YarrGenerator::backtrackCharacterClassOnce):
2887         (JSC::Yarr::YarrGenerator::generateCharacterClassFixed):
2888         (JSC::Yarr::YarrGenerator::backtrackCharacterClassFixed):
2889         (JSC::Yarr::YarrGenerator::generateCharacterClassGreedy):
2890         (JSC::Yarr::YarrGenerator::backtrackCharacterClassGreedy):
2891         (JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy):
2892         (JSC::Yarr::YarrGenerator::backtrackCharacterClassNonGreedy):
2893         (JSC::Yarr::YarrGenerator::generateTerm):
2894         (JSC::Yarr::YarrGenerator::backtrackTerm):
2895         (JSC::Yarr::YarrGenerator::generate):
2896         (JSC::Yarr::YarrGenerator::backtrack):
2897         (JSC::Yarr::YarrGenerator::opCompileParenthesesSubpattern):
2898         (JSC::Yarr::YarrGenerator::opCompileParentheticalAssertion):
2899         (JSC::Yarr::YarrGenerator::opCompileAlternative):
2900         (JSC::Yarr::YarrGenerator::opCompileBody):
2901         (JSC::Yarr::YarrGenerator::YarrGenerator):
2902         (JSC::Yarr::YarrGenerator::compile):
2903
2904 2011-05-15  Adam Barth  <abarth@webkit.org>
2905
2906         Enable strict PassOwnPtr on Qt.  (Build fixes to follow.)
2907
2908         * wtf/PassOwnPtr.h:
2909
2910 2011-05-15  Geoffrey Garen  <ggaren@apple.com>
2911
2912         Reviewed by Maciej Stachowiak.
2913
2914         Partial fix for <rdar://problem/9417875> REGRESSION: SunSpider ~17% slower
2915         in browser than on command line
2916         
2917         This patch fixes a few issues in generated code that could unreasonably
2918         prolong object lifetimes.
2919
2920         * heap/Heap.cpp:
2921         (JSC::Heap::collectAllGarbage): Throw away all function code before doing
2922         a major collection. We want to clear polymorphic caches, since they can
2923         keep alive large object graphs that have gone "stale". For the same reason,
2924         but to a lesser extent, we also want to clear linked functions and other
2925         one-off caches.
2926
2927         This has the side-benefit of reducing memory footprint from run-once
2928         functions, and of allowing predictions and caches that have failed to
2929         re-specialize.
2930
2931         Eventually, if compilation costs rise far enough, we may want a more
2932         limited strategy for de-specializing code without throwing it away
2933         completely, but this works for now, and it's the simplest solution.
2934
2935         * jit/JITStubs.cpp:
2936         (JSC::JITThunks::hostFunctionStub):
2937         * jit/JITStubs.h:
2938         * runtime/JSFunction.cpp: Made the host function stub cache weak --
2939         otherwise it's effectively a memory leak that can seriously fragment the
2940         GC and JIT heaps.
2941
2942         (JSC::JSFunction::JSFunction):
2943         (JSC::JSFunction::visitChildren): Cleared up some comments that confused
2944         me when working with this code.
2945
2946 2011-05-13  Oliver Hunt  <oliver@apple.com>
2947
2948         Reviewed by Geoffrey Garen.
2949
2950         Make GC validation more aggressive
2951         https://bugs.webkit.org/show_bug.cgi?id=60802
2952
2953         This patch makes the checks performed under GC_VALIDATION
2954         much more aggressive, and adds the checks to more places
2955         in order to allow us to catch GC bugs much closer to the
2956         point of failure.
2957
2958         * JavaScriptCore.exp:
2959         * JavaScriptCore.xcodeproj/project.pbxproj:
2960         * debugger/DebuggerActivation.cpp:
2961         (JSC::DebuggerActivation::visitChildren):
2962         * heap/MarkedBlock.cpp:
2963         (JSC::MarkedBlock::MarkedBlock):
2964         * heap/MarkedSpace.cpp:
2965         * runtime/Arguments.cpp:
2966         (JSC::Arguments::visitChildren):
2967         * runtime/Executable.cpp:
2968         (JSC::EvalExecutable::visitChildren):
2969         (JSC::ProgramExecutable::visitChildren):
2970         (JSC::FunctionExecutable::visitChildren):
2971         * runtime/Executable.h:
2972         * runtime/GetterSetter.cpp:
2973         (JSC::GetterSetter::visitChildren):
2974         * runtime/GetterSetter.h:
2975         * runtime/JSAPIValueWrapper.h:
2976         (JSC::JSAPIValueWrapper::createStructure):
2977         (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
2978         * runtime/JSActivation.cpp:
2979         (JSC::JSActivation::visitChildren):
2980         * runtime/JSArray.cpp:
2981         (JSC::JSArray::visitChildren):
2982         * runtime/JSCell.cpp:
2983         (JSC::slowValidateCell):
2984         * runtime/JSCell.h:
2985         (JSC::JSCell::JSCell::unvalidatedStructure):
2986         (JSC::JSCell::JSCell::JSCell):
2987         * runtime/JSFunction.cpp:
2988         (JSC::JSFunction::visitChildren):
2989         * runtime/JSGlobalObject.cpp:
2990         (JSC::JSGlobalObject::visitChildren):
2991         (JSC::slowValidateCell):
2992         * runtime/JSONObject.h:
2993         * runtime/JSObject.cpp:
2994         (JSC::JSObject::visitChildren):
2995         * runtime/JSPropertyNameIterator.cpp:
2996         (JSC::JSPropertyNameIterator::visitChildren):
2997         * runtime/JSPropertyNameIterator.h:
2998         * runtime/JSStaticScopeObject.cpp:
2999         (JSC::JSStaticScopeObject::visitChildren):
3000         * runtime/JSString.h:
3001         (JSC::RopeBuilder::JSString):
3002         * runtime/JSWrapperObject.cpp:
3003         (JSC::JSWrapperObject::visitChildren):
3004         * runtime/NativeErrorConstructor.cpp:
3005         (JSC::NativeErrorConstructor::visitChildren):
3006         * runtime/PropertyMapHashTable.h:
3007         (JSC::PropertyMapEntry::PropertyMapEntry):
3008         * runtime/RegExpObject.cpp:
3009         (JSC::RegExpObject::visitChildren):
3010         * runtime/ScopeChain.cpp:
3011         (JSC::ScopeChainNode::visitChildren):
3012         * runtime/ScopeChain.h:
3013         (JSC::ScopeChainNode::ScopeChainNode):
3014         * runtime/Structure.cpp:
3015         (JSC::Structure::Structure):
3016         (JSC::Structure::addPropertyTransition):
3017         (JSC::Structure::visitChildren):
3018         * runtime/Structure.h:
3019         (JSC::JSCell::classInfo):
3020         * runtime/StructureChain.cpp:
3021         (JSC::StructureChain::visitChildren):
3022         * runtime/StructureChain.h:
3023         * runtime/WriteBarrier.h:
3024         (JSC::validateCell):
3025         (JSC::JSCell):
3026         (JSC::JSGlobalObject):
3027         (JSC::WriteBarrierBase::set):
3028         (JSC::WriteBarrierBase::setMayBeNull):
3029         (JSC::WriteBarrierBase::setEarlyValue):
3030         (JSC::WriteBarrierBase::get):
3031         (JSC::WriteBarrierBase::operator*):
3032         (JSC::WriteBarrierBase::operator->):
3033         (JSC::WriteBarrierBase::unvalidatedGet):
3034         (JSC::WriteBarrier::WriteBarrier):
3035         * wtf/Assertions.h:
3036
3037 2011-05-13  Oliver Hunt  <oliver@apple.com>
3038
3039         Reviewed by Geoffrey Garen.
3040
3041         Make GC validation more aggressive
3042         https://bugs.webkit.org/show_bug.cgi?id=60802
3043
3044         This patch makes the checks performed under GC_VALIDATION
3045         much more aggressive, and adds the checks to more places
3046         in order to allow us to catch GC bugs much closer to the
3047         point of failure.
3048
3049         * JavaScriptCore.exp:
3050         * JavaScriptCore.xcodeproj/project.pbxproj:
3051         * debugger/DebuggerActivation.cpp:
3052         (JSC::DebuggerActivation::visitChildren):
3053         * heap/MarkedBlock.cpp:
3054         (JSC::MarkedBlock::MarkedBlock):
3055         * heap/MarkedSpace.cpp:
3056         * runtime/Arguments.cpp:
3057         (JSC::Arguments::visitChildren):
3058         * runtime/Executable.cpp:
3059         (JSC::EvalExecutable::visitChildren):
3060         (JSC::ProgramExecutable::visitChildren):
3061         (JSC::FunctionExecutable::visitChildren):
3062         * runtime/Executable.h:
3063         * runtime/GetterSetter.cpp:
3064         (JSC::GetterSetter::visitChildren):
3065         * runtime/GetterSetter.h:
3066         * runtime/JSAPIValueWrapper.h:
3067         (JSC::JSAPIValueWrapper::createStructure):
3068         (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
3069         * runtime/JSActivation.cpp:
3070         (JSC::JSActivation::visitChildren):
3071         * runtime/JSArray.cpp:
3072         (JSC::JSArray::visitChildren):
3073         * runtime/JSCell.cpp:
3074         (JSC::slowValidateCell):
3075         * runtime/JSCell.h:
3076         (JSC::JSCell::JSCell::unvalidatedStructure):
3077         (JSC::JSCell::JSCell::JSCell):
3078         * runtime/JSFunction.cpp:
3079         (JSC::JSFunction::visitChildren):
3080         * runtime/JSGlobalObject.cpp:
3081         (JSC::JSGlobalObject::visitChildren):
3082         (JSC::slowValidateCell):
3083         * runtime/JSONObject.h:
3084         * runtime/JSObject.cpp:
3085         (JSC::JSObject::visitChildren):
3086         * runtime/JSPropertyNameIterator.cpp:
3087         (JSC::JSPropertyNameIterator::visitChildren):
3088         * runtime/JSPropertyNameIterator.h:
3089         * runtime/JSStaticScopeObject.cpp:
3090         (JSC::JSStaticScopeObject::visitChildren):
3091         * runtime/JSString.h:
3092         (JSC::RopeBuilder::JSString):
3093         * runtime/JSWrapperObject.cpp:
3094         (JSC::JSWrapperObject::visitChildren):
3095         * runtime/NativeErrorConstructor.cpp:
3096         (JSC::NativeErrorConstructor::visitChildren):
3097         * runtime/PropertyMapHashTable.h:
3098         (JSC::PropertyMapEntry::PropertyMapEntry):
3099         * runtime/RegExpObject.cpp:
3100         (JSC::RegExpObject::visitChildren):
3101         * runtime/ScopeChain.cpp:
3102         (JSC::ScopeChainNode::visitChildren):
3103         * runtime/ScopeChain.h:
3104         (JSC::ScopeChainNode::ScopeChainNode):
3105         * runtime/Structure.cpp:
3106         (JSC::Structure::Structure):
3107         (JSC::Structure::addPropertyTransition):
3108         (JSC::Structure::visitChildren):
3109         * runtime/Structure.h:
3110         (JSC::JSCell::classInfo):
3111         * runtime/StructureChain.cpp:
3112         (JSC::StructureChain::visitChildren):
3113         * runtime/StructureChain.h:
3114         * runtime/WriteBarrier.h:
3115         (JSC::validateCell):
3116         (JSC::JSCell):
3117         (JSC::JSGlobalObject):
3118         (JSC::WriteBarrierBase::set):
3119         (JSC::WriteBarrierBase::setMayBeNull):
3120         (JSC::WriteBarrierBase::setEarlyValue):
3121         (JSC::WriteBarrierBase::get):
3122         (JSC::WriteBarrierBase::operator*):
3123         (JSC::WriteBarrierBase::operator->):
3124         (JSC::WriteBarrierBase::unvalidatedGet):
3125         (JSC::WriteBarrier::WriteBarrier):
3126         * wtf/Assertions.h:
3127
3128 2011-05-14  Csaba Osztrogonác  <ossy@webkit.org>
3129
3130         Unreviewed, rolling out r86469 and r86471, because they made hundreds tests crash on Qt.
3131
3132         Make GC validation more aggressive
3133         https://bugs.webkit.org/show_bug.cgi?id=60802
3134
3135         * JavaScriptCore.exp:
3136         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3137         * JavaScriptCore.xcodeproj/project.pbxproj:
3138         * debugger/DebuggerActivation.cpp:
3139         (JSC::DebuggerActivation::visitChildren):
3140         * heap/MarkedBlock.cpp:
3141         (JSC::MarkedBlock::MarkedBlock):
3142         * heap/MarkedSpace.cpp:
3143         * runtime/Arguments.cpp:
3144         (JSC::Arguments::visitChildren):
3145         * runtime/Executable.cpp:
3146         (JSC::EvalExecutable::visitChildren):
3147         (JSC::ProgramExecutable::visitChildren):
3148         (JSC::FunctionExecutable::visitChildren):
3149         * runtime/Executable.h:
3150         (JSC::ProgramExecutable::createStructure):
3151         (JSC::FunctionExecutable::createStructure):
3152         * runtime/GetterSetter.cpp:
3153         (JSC::GetterSetter::visitChildren):
3154         * runtime/GetterSetter.h:
3155         (JSC::GetterSetter::createStructure):
3156         * runtime/JSAPIValueWrapper.h:
3157         (JSC::JSAPIValueWrapper::createStructure):
3158         * runtime/JSActivation.cpp:
3159         (JSC::JSActivation::visitChildren):
3160         * runtime/JSArray.cpp:
3161         (JSC::JSArray::visitChildren):
3162         * runtime/JSCell.cpp:
3163         * runtime/JSCell.h:
3164         (JSC::JSCell::JSCell::JSCell):
3165         * runtime/JSFunction.cpp:
3166         (JSC::JSFunction::visitChildren):
3167         * runtime/JSGlobalObject.cpp:
3168         (JSC::JSGlobalObject::visitChildren):
3169         * runtime/JSONObject.h:
3170         (JSC::JSONObject::createStructure):
3171         * runtime/JSObject.cpp:
3172         (JSC::JSObject::visitChildren):
3173         * runtime/JSPropertyNameIterator.cpp:
3174         (JSC::JSPropertyNameIterator::visitChildren):
3175         * runtime/JSPropertyNameIterator.h:
3176         * runtime/JSStaticScopeObject.cpp:
3177         (JSC::JSStaticScopeObject::visitChildren):
3178         * runtime/JSString.h:
3179         (JSC::RopeBuilder::createStructure):
3180         * runtime/JSWrapperObject.cpp:
3181         (JSC::JSWrapperObject::visitChildren):
3182         * runtime/NativeErrorConstructor.cpp:
3183         (JSC::NativeErrorConstructor::visitChildren):
3184         * runtime/PropertyMapHashTable.h:
3185         (JSC::PropertyMapEntry::PropertyMapEntry):
3186         * runtime/RegExpObject.cpp:
3187         (JSC::RegExpObject::visitChildren):
3188         * runtime/ScopeChain.cpp:
3189         (JSC::ScopeChainNode::visitChildren):
3190         * runtime/ScopeChain.h:
3191         (JSC::ScopeChainNode::ScopeChainNode):
3192         * runtime/Structure.cpp:
3193         (JSC::Structure::Structure):
3194         (JSC::Structure::addPropertyTransition):
3195         (JSC::Structure::visitChildren):
3196         * runtime/Structure.h:
3197         (JSC::Structure::createStructure):
3198         (JSC::JSCell::classInfo):
3199         * runtime/StructureChain.cpp:
3200         (JSC::StructureChain::visitChildren):
3201         * runtime/StructureChain.h:
3202         * runtime/WriteBarrier.h:
3203         (JSC::WriteBarrierBase::set):
3204         (JSC::WriteBarrierBase::get):
3205         (JSC::WriteBarrierBase::operator*):
3206         (JSC::WriteBarrierBase::operator->):
3207         (JSC::WriteBarrier::WriteBarrier):
3208         * wtf/Assertions.h:
3209
3210 2011-05-13  Oliver Hunt  <oliver@apple.com>
3211
3212         Reviewed by Geoffrey Garen.
3213
3214         Make GC validation more aggressive
3215         https://bugs.webkit.org/show_bug.cgi?id=60802
3216
3217         This patch makes the checks performed under GC_VALIDATION
3218         much more aggressive, and adds the checks to more places
3219         in order to allow us to catch GC bugs much closer to the
3220         point of failure.
3221
3222         * JavaScriptCore.exp:
3223         * JavaScriptCore.xcodeproj/project.pbxproj:
3224         * debugger/DebuggerActivation.cpp:
3225         (JSC::DebuggerActivation::visitChildren):
3226         * heap/MarkedBlock.cpp:
3227         (JSC::MarkedBlock::MarkedBlock):
3228         * heap/MarkedSpace.cpp:
3229         * runtime/Arguments.cpp:
3230         (JSC::Arguments::visitChildren):
3231         * runtime/Executable.cpp:
3232         (JSC::EvalExecutable::visitChildren):
3233         (JSC::ProgramExecutable::visitChildren):
3234         (JSC::FunctionExecutable::visitChildren):
3235         * runtime/Executable.h:
3236         * runtime/GetterSetter.cpp:
3237         (JSC::GetterSetter::visitChildren):
3238         * runtime/GetterSetter.h:
3239         * runtime/JSAPIValueWrapper.h:
3240         (JSC::JSAPIValueWrapper::createStructure):
3241         (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
3242         * runtime/JSActivation.cpp:
3243         (JSC::JSActivation::visitChildren):
3244         * runtime/JSArray.cpp:
3245         (JSC::JSArray::visitChildren):
3246         * runtime/JSCell.cpp:
3247         (JSC::slowValidateCell):
3248         * runtime/JSCell.h:
3249         (JSC::JSCell::JSCell::unvalidatedStructure):
3250         (JSC::JSCell::JSCell::JSCell):
3251         * runtime/JSFunction.cpp:
3252         (JSC::JSFunction::visitChildren):
3253         * runtime/JSGlobalObject.cpp:
3254         (JSC::JSGlobalObject::visitChildren):
3255         (JSC::slowValidateCell):
3256         * runtime/JSONObject.h:
3257         * runtime/JSObject.cpp:
3258         (JSC::JSObject::visitChildren):
3259         * runtime/JSPropertyNameIterator.cpp:
3260         (JSC::JSPropertyNameIterator::visitChildren):
3261         * runtime/JSPropertyNameIterator.h:
3262         * runtime/JSStaticScopeObject.cpp:
3263         (JSC::JSStaticScopeObject::visitChildren):
3264         * runtime/JSString.h:
3265         (JSC::RopeBuilder::JSString):
3266         * runtime/JSWrapperObject.cpp:
3267         (JSC::JSWrapperObject::visitChildren):
3268         * runtime/NativeErrorConstructor.cpp:
3269         (JSC::NativeErrorConstructor::visitChildren):
3270         * runtime/PropertyMapHashTable.h:
3271         (JSC::PropertyMapEntry::PropertyMapEntry):
3272         * runtime/RegExpObject.cpp:
3273         (JSC::RegExpObject::visitChildren):
3274         * runtime/ScopeChain.cpp:
3275         (JSC::ScopeChainNode::visitChildren):
3276         * runtime/ScopeChain.h:
3277         (JSC::ScopeChainNode::ScopeChainNode):
3278         * runtime/Structure.cpp:
3279         (JSC::Structure::Structure):
3280         (JSC::Structure::addPropertyTransition):
3281         (JSC::Structure::visitChildren):
3282         * runtime/Structure.h:
3283         (JSC::JSCell::classInfo):
3284         * runtime/StructureChain.cpp:
3285         (JSC::StructureChain::visitChildren):
3286         * runtime/StructureChain.h:
3287         * runtime/WriteBarrier.h:
3288         (JSC::validateCell):
3289         (JSC::JSCell):
3290         (JSC::JSGlobalObject):
3291         (JSC::WriteBarrierBase::set):
3292         (JSC::WriteBarrierBase::setMayBeNull):
3293         (JSC::WriteBarrierBase::setEarlyValue):
3294         (JSC::WriteBarrierBase::get):
3295         (JSC::WriteBarrierBase::operator*):
3296         (JSC::WriteBarrierBase::operator->):
3297         (JSC::WriteBarrierBase::unvalidatedGet):
3298         (JSC::WriteBarrier::WriteBarrier):
3299         * wtf/Assertions.h:
3300
3301 2011-05-01  Holger Hans Peter Freyther  <holger@moiji-mobile.com>
3302
3303         Reviewed by Steve Block.
3304
3305         [android] OS(ANDROID) does not imply PLATFORM(ANDROID)
3306         https://bugs.webkit.org/show_bug.cgi?id=59888
3307
3308         It is possible to build QtWebKit and others for OS(ANDROID). Let
3309         the buildsystem decide which platform is to be build.
3310
3311         * wtf/Platform.h:
3312
3313 2011-05-12  Maciej Stachowiak  <mjs@apple.com>
3314
3315         Reviewed by Darin Adler.
3316
3317         XMLDocumentParserLibxml2 should play nice with strict OwnPtrs
3318         https://bugs.webkit.org/show_bug.cgi?id=59394
3319
3320         This portion of the change introduces a PassTraits template, which
3321         is used to enable takeFirst() to work for a Deque holding OwnPtrs,
3322         and optimize it for a Deque holding RefPtrs. In the future it can
3323         be deployed elsewhere to make our data structures work better with
3324         our smart pointers.
3325
3326         * GNUmakefile.list.am:
3327         * JavaScriptCore.gypi:
3328         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3329         * JavaScriptCore.xcodeproj/project.pbxproj:
3330         * wtf/CMakeLists.txt:
3331         * wtf/Deque.h:
3332         (WTF::::takeFirst):
3333         * wtf/PassTraits.h: Added.
3334         (WTF::PassTraits::transfer):
3335
3336 2011-05-12  Nikolas Zimmermann  <nzimmermann@rim.com>
3337
3338         Not reviewed.
3339
3340         Revert r86334, it broke the win build. WinCE build is fixed even without this patch. WinCairo remains broken atm, everything else works.
3341
3342         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3343
3344 2011-05-12  Nikolas Zimmermann  <nzimmermann@rim.com>
3345
3346         Not reviewed.
3347
3348         String operator+ reallocates unnecessarily when concatting > 2 strings
3349         https://bugs.webkit.org/show_bug.cgi?id=58420
3350
3351         Try to fix WinCE/WinCairo linking by exporting three symbols, not sure whether it's correct though. Win worked just fine before.
3352
3353         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3354
3355 2011-05-12  Nikolas Zimmermann  <nzimmermann@rim.com>
3356
3357         Reviewed by Darin Adler.
3358
3359         String operator+ reallocates unnecessarily when concatting > 2 strings
3360         https://bugs.webkit.org/show_bug.cgi?id=58420
3361
3362         Provide a faster String append operator.
3363         Up until now, "String operator+(const String& a, const String& b)" copied String a into a temporary
3364         object, and used a.append(b), which reallocates a new buffer of aLength+bLength. When concatting
3365         N strings using operator+, this leads to N-1 reallocations.
3366
3367         Replace this with a flexible operator+ implementation, that avoids these reallocations.
3368         When concatting a 'String' with any string type (char*, UChar, Vector<char>, String, AtomicString, etc..)
3369         a StringAppend<String, T> object is created, which holds the intermediate string objects, and delays
3370         creation of the final string, until operator String() is invoked.
3371
3372         template<typename T>
3373         StringAppend<String, T> operator+(const String& string1, T string2)
3374         {
3375             return StringAppend<String, T>(string1, string2);
3376         }
3377
3378         template<typename U, typename V, typename W>
3379         StringAppend<U, StringAppend<V, W> > operator+(U string1, const StringAppend<V, W>& string2)
3380         {
3381             return StringAppend<U, StringAppend<V, W> >(string1, string2);
3382         }
3383
3384         When concatting three strings - "String a, b, c; String result = a + b + c;" following happens:
3385         first a StringAppend<String, String> object is created by operator+(const String& string1, String string2).
3386         Then operator+(String string1, const StringAppend<String, String>& string2) is invoked, which returns
3387         a StringAppend<String, StringAppend<String, String> > object.
3388         Then operator String() is invoked, which allocates a StringImpl object, once, large enough to hold the
3389         final string - it uses tryMakeString provided by StringConcatenate.h under the hoods, which guards us
3390         against too big string allocations, etc.
3391
3392         Note that the second template, defines a recursive way to concat an arbitary number of strings
3393         into a single String with just one allocation.
3394
3395         * GNUmakefile.list.am: Add StringOperators.h to build.
3396         * JavaScriptCore.exp: Export WTF::emptyString(). Remove no longer needed symbols.
3397         * JavaScriptCore.gypi: Add StringOperators.h to build.
3398         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
3399         * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
3400         * wtf/text/AtomicString.h: Pull in StringConcatenate.h at the end of the file.
3401         * wtf/text/StringConcatenate.h: Conditionally include AtomicString.h to avoid a cyclic dependency. Pull in StringOperators.h at the end of the file.
3402         * wtf/text/StringOperators.h: Added. This is never meant to be included directly, including either WTFString.h or AtomicString.h automatically pulls in this file.
3403         (WTF::StringAppend::StringAppend):
3404         (WTF::StringAppend::operator String):
3405         (WTF::StringAppend::operator AtomicString):
3406         (WTF::StringAppend::writeTo):
3407         (WTF::StringAppend::length):
3408         (WTF::operator+):
3409         * wtf/text/WTFString.cpp: Remove operator+ implementations that use String::append(). 
3410         (WTF::emptyString): Add new shared empty string free function.
3411         * wtf/text/WTFString.h: Replace operator+ implementations by StringAppend template solution. Pull in AtomicString.h at the end of the file.
3412
3413 2011-05-12  Philippe Normand  <pnormand@igalia.com>
3414
3415         Unreviewed, GTK build fix.
3416
3417         * wtf/Platform.h:
3418
3419 2011-05-12  Keith Kyzivat  <keith.kyzivat@nokia.com>
3420
3421         Reviewed by Csaba Osztrogonác.
3422
3423         [Qt] Arm debug build failing on ARMAssembler::debugOffset()
3424         https://bugs.webkit.org/show_bug.cgi?id=60688
3425
3426         Related to svn rev 85523
3427
3428         * assembler/ARMAssembler.h:
3429         (JSC::ARMAssembler::debugOffset):
3430
3431 2011-05-11  Igor Oliveira  <igor.oliveira@openbossa.org>
3432
3433         Reviewed by Eric Seidel.
3434
3435         WebKit does not build with GCCE
3436         https://bugs.webkit.org/show_bug.cgi?id=60667
3437
3438         Allow compile WebKit with GCCE
3439
3440         * wtf/Alignment.h:
3441         * wtf/Platform.h:
3442
3443 2011-05-11  Adam Barth  <abarth@webkit.org>
3444
3445         Reviewed by Eric Seidel.
3446
3447         Enable strict PassOwnPtr on Mac
3448         https://bugs.webkit.org/show_bug.cgi?id=60684
3449
3450         This should build cleanly now.
3451
3452         * wtf/PassOwnPtr.h:
3453
3454 2011-05-11  Oliver Hunt  <oliver@apple.com>
3455
3456         Reviewed by Darin Adler.
3457
3458         Protect JSC from WebCore executing JS during JS wrapper finalization
3459         https://bugs.webkit.org/show_bug.cgi?id=60672
3460         <rdar://problem/9350997>
3461
3462         Detect when we're trying to execute JS during GC and prevent the
3463         execution from happening.  We also assert that this isn't happening
3464         as it implies incorrect behaviour of an object's destructor.
3465
3466         * JavaScriptCore.exp:
3467         * heap/Heap.cpp:
3468         * heap/Heap.h:
3469         (JSC::Heap::isBusy):
3470         * interpreter/Interpreter.cpp:
3471         (JSC::Interpreter::execute):
3472         (JSC::Interpreter::executeCall):
3473         (JSC::Interpreter::executeConstruct):
3474         * runtime/JSGlobalData.h:
3475         (JSC::JSGlobalData::isCollectorBusy):
3476
3477 2011-05-11  Oliver Hunt  <oliver@apple.com>
3478
3479         Reviewed by Gavin Barraclough.
3480
3481         Enable gc mark validation in temporarily in release builds
3482         https://bugs.webkit.org/show_bug.cgi?id=60678
3483
3484         Make it easier to turn the gc mark validation on and off, and
3485         temporarily turn it on for all builds.
3486
3487         * heap/MarkStack.cpp:
3488         * heap/MarkStack.h:
3489         (JSC::MarkStack::append):
3490         (JSC::MarkStack::internalAppend):
3491         * runtime/WriteBarrier.h:
3492         (JSC::MarkStack::appendValues):
3493         * wtf/Platform.h:
3494
3495 2011-05-11  Geoffrey Garen  <ggaren@apple.com>
3496
3497         Reviewed by Oliver Hunt.
3498
3499         <rdar://problem/9331651> REGRESSION: RPRVT grows by 1MB / sec @ dvd2blu.com
3500         
3501         SunSpider reports no change.
3502
3503         This bug was caused by changing Structure and Executable to being GC
3504         objects, and by a long-standing bug that would thrash the global object
3505         between dictionary and non-dictionary states.
3506
3507         * runtime/BatchedTransitionOptimizer.h:
3508         (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer): Don't
3509         eagerly transition to dictionary -- this can cause pathological dictionary
3510         churn, and it's not necessary, since objects know how to automatically
3511         transition to dictionary when necessary.
3512
3513         * runtime/Executable.cpp:
3514         (JSC::EvalExecutable::compileInternal):
3515         (JSC::ProgramExecutable::compileInternal):
3516         (JSC::FunctionExecutable::compileForCallInternal):
3517         (JSC::FunctionExecutable::compileForConstructInternal): Be sure to report
3518         extra cost from compilation, because it can be quite high. This is especially
3519         important for program code, since DOM timers can repeatedly allocate
3520         program code without allocating any other objects.
3521
3522         * runtime/JSObject.cpp:
3523         (JSC::JSObject::removeDirect): Don't transition to the uncacheable state
3524         if the thing we're trying to remove doesn't exist. This can happen during
3525         compilation, since the compiler needs to ensure that no pre-existing
3526         conflicting definitions exist for certain declarations.
3527
3528 2011-05-11  Oliver Hunt  <oliver@apple.com>
3529
3530         Reviewed by Gavin Barraclough.
3531
3532         Make mark stack validation functions do something useful in a release build
3533         https://bugs.webkit.org/show_bug.cgi?id=60645
3534
3535         Turn ASSERTs into actual if(...) CRASH(); statements.
3536
3537         * heap/MarkStack.cpp:
3538         (JSC::MarkStack::validateValue):
3539
3540 2011-05-11  Xan Lopez  <xlopez@igalia.com>
3541
3542         Reviewed by Martin Robinson.
3543
3544         Fix copy&paste error in comment.
3545
3546         * jit/JITPropertyAccess.cpp:
3547         (JSC::JIT::stringGetByValStubGenerator): the value is stored in
3548         regT2, not regT1.
3549
3550 2011-05-11  Adam Roben  <aroben@apple.com>
3551
3552         WinCE build fixes for strict PassOwnPtr
3553
3554         * wtf/unicode/CollatorDefault.cpp:
3555         (WTF::Collator::userDefault): Use adoptPtr.
3556
3557 2011-05-11  Holger Hans Peter Freyther  <holger@moiji-mobile.com>
3558
3559         Unreviewed build fix.
3560
3561         [MIPS] Fix compilation of the MIPS JIT
3562
3563         Include the MIPSAssembler.h first to indirectly include
3564         AssemblerBuffer.h before the AbstractMacroAssembler.h. This
3565         order is used for the ARM and X86 MacroAssembler*.h
3566
3567         * assembler/MacroAssemblerMIPS.h:
3568
3569 2011-05-11  Adam Roben  <aroben@apple.com>
3570
3571         Turn on strict PassOwnPtr on Windows
3572
3573         Fixes <http://webkit.org/b/60632> Windows should build with strict PassOwnPtr enabled
3574
3575         Reviewed by Adam Barth.
3576
3577         * wtf/PassOwnPtr.h:
3578
3579 2011-05-10  Stephanie Lewis  <slewis@apple.com>
3580
3581         Unreviewed.
3582
3583         Revert accidental JavaScriptCore change in http://trac.webkit.org/changeset/86130
3584
3585         * Configurations/JavaScriptCore.xcconfig:
3586
3587 2011-05-10  Adam Barth  <abarth@webkit.org>
3588
3589         Reviewed by David Levin.
3590
3591         Enable strict PassOwnPtr on Chromium
3592         https://bugs.webkit.org/show_bug.cgi?id=60502
3593
3594         Other platforms to follow.
3595
3596         * wtf/PassOwnPtr.h:
3597
3598 2011-05-10  Geoffrey Garen  <ggaren@apple.com>
3599
3600         Reviewed by Darin Adler.
3601
3602         Fixed up some #include dependencies so the WriteBarrier class can actually call Heap::writeBarrier
3603         https://bugs.webkit.org/show_bug.cgi?id=60532
3604
3605         * GNUmakefile.list.am:
3606         * JavaScriptCore.gypi:
3607         * JavaScriptCore.xcodeproj/project.pbxproj: Build!
3608
3609         * heap/Handle.h: Moved HandleTypes to its own header because that's the
3610         WebKit style, and it was necessary to resolve a circular dependency
3611         between Handle.h and WriteBarrier.h.
3612
3613         * heap/Heap.h:
3614         (JSC::Heap::writeBarrier): Added an inline no-op writeBarrier(), to
3615         verify that all the code is in the right place.
3616
3617         * heap/MarkStack.h: Moved WriteBarrier operations to WriteBarrier.h to
3618         resolve a circular dependency.
3619
3620         * runtime/ArgList.h:
3621         * runtime/JSCell.h: #include WriteBarrier.h since we don't get it for
3622         free anymore.
3623
3624         * runtime/PropertyMapHashTable.h:
3625         (JSC::PropertyTable::PropertyTable): Call the real writeBarrier()
3626         function, now that it exists.
3627
3628         * runtime/SmallStrings.h: Removed a stray #include to resolve a circular
3629         dependency.
3630
3631         * runtime/WriteBarrier.h:
3632         (JSC::WriteBarrierBase::set):
3633         (JSC::MarkStack::append):
3634         (JSC::MarkStack::appendValues): Updated to match the changes above.
3635
3636 2011-05-10  Oliver Hunt  <oliver@apple.com>
3637
3638         Build fix.
3639
3640         * heap/MarkStack.cpp:
3641         (JSC::MarkStack::validateValue):
3642
3643 2011-05-10  Oliver Hunt  <oliver@apple.com>
3644
3645         Reviewed by Gavin Barraclough.
3646
3647         Add some aggressive GC validation to debug builds.
3648         https://bugs.webkit.org/show_bug.cgi?id=60601
3649
3650         When assertions are enabled we now do some validity checking
3651         of objects being added to the mark stack.
3652
3653         * bytecode/Instruction.h:
3654         (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::PolymorphicStubInfo):
3655         (JSC::PolymorphicAccessStructureList::visitAggregate):
3656         * heap/MarkStack.cpp:
3657         (JSC::MarkStack::validateSet):
3658         (JSC::MarkStack::validateValue):
3659         * heap/MarkStack.h:
3660         (JSC::MarkStack::appendValues):
3661         (JSC::MarkStack::append):
3662         (JSC::MarkStack::internalAppend):
3663
3664 2011-05-09  Darin Adler  <darin@apple.com>
3665
3666         Reviewed by Oliver Hunt.
3667
3668         http://bugs.webkit.org/show_bug.cgi?id=60509
3669         Wrong type used for return value from strlen
3670
3671         * wtf/FastMalloc.cpp:
3672         (WTF::fastStrDup): Use size_t. Also don't bother checking for failure since
3673         fastMalloc won't return if it fails.
3674
3675 2011-05-09  Adam Barth  <abarth@webkit.org>
3676
3677         Reviewed by Eric Seidel.
3678
3679         CSP should block Function constructor
3680         https://bugs.webkit.org/show_bug.cgi?id=60240
3681
3682         When eval is disabled, we need to block the use of the function
3683         constructor.  However, the WebCore JSC bindings call the function
3684         constructor directly to create inline event listeners.  To support that
3685         use, this patch adds an entrypoint that bypasses the check for whether
3686         eval is enabled.
3687
3688         * JavaScriptCore.exp:
3689         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3690         * runtime/FunctionConstructor.cpp:
3691         (JSC::constructFunction):
3692         (JSC::constructFunctionSkippingEvalEnabledCheck):
3693         * runtime/FunctionConstructor.h:
3694
3695 2011-05-09  Adam Roben  <aroben@apple.com>
3696
3697         Automatically touch WebKit.idl whenever any other WebKit1 IDL file changes
3698
3699         Fixes <http://webkit.org/b/60468> WebKit.idl needs to be manually touched whenever any other
3700         WebKit1 IDL file changes to avoid build errors
3701
3702         Reviewed by Tim Hatcher.
3703
3704         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
3705         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
3706         Updated for script rename.
3707
3708         * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py: Removed.
3709         * JavaScriptCore.vcproj/JavaScriptCore/work-around-vs-dependency-tracking-bugs.py: Renamed
3710         from react-to-vsprops-changes.py.
3711         (top level): Moved a constant here from main.
3712         (main): Moved most code from here to react_to_vsprops_changes. Added a call to the new
3713         react_to_webkit1_interface_changes function.
3714         (react_to_vsprops_changes): Moved code here from main. Updated to use the
3715         TOP_LEVEL_DIRECTORY global. Moved some code from here to mtime_of_newest_file_matching_globa
3716         and touch_if_older_than.
3717         (react_to_webkit1_interface_changes): Added. Touches WebKit.idl if any other WebKit1 IDL
3718         file has changed.
3719         (mtime_of_newest_file_matching_glob): Added. Code came from main.
3720         (touch_if_older_than): Added. Code came from main.
3721
3722 2011-05-08  Jessie Berlin  <jberlin@apple.com>
3723
3724         Reviewed by Dan Bernstein.
3725
3726         Make JSRetainPtr work with JSGlobalContextRefs.
3727         https://bugs.webkit.org/show_bug.cgi?id=60452
3728
3729         Add specialized functions for JSRetain and JSRelease when dealing with JSGlobalContextRefs.
3730
3731         * API/JSRetainPtr.h:
3732         (JSRetain):
3733         (JSRelease):
3734
3735 2011-05-07  Dawit Alemayehu  <adawit@kde.org>
3736
3737         Reviewed by Daniel Bates.
3738
3739         Fix compile with GCC 4.6.0
3740         https://bugs.webkit.org/show_bug.cgi?id=60380
3741
3742         Remove unused local variable from code.
3743
3744         * runtime/StringPrototype.cpp:
3745         (JSC::stringProtoFuncMatch):
3746
3747 2011-05-06  Alexis Menard  <alexis.menard@openbossa.org>
3748
3749         Unreviewed build fix with gcc 4.6.0 on linux and c++0x support.
3750
3751         std::tr1::has_trivial_constructor is in <tr1/memory>.
3752
3753         * wtf/TypeTraits.h:
3754
3755 2011-05-05  Jay Civelli  <jcivelli@chromium.org>
3756
3757         Reviewed by Adam Barth.
3758
3759         Added convenience methods to convert from a byte to hex ASCII digit
3760         characters and vice-versa.
3761         https://bugs.webkit.org/show_bug.cgi?id=59834
3762
3763         * wtf/ASCIICType.h:
3764         (WTF::toASCIIHexValue):
3765         (WTF::lowerNibbleToASCIIHexDigit):
3766         (WTF::upperNibbleToASCIIHexDigit):
3767
3768 2011-05-05  Alexis Menard  <alexis.menard@openbossa.org>
3769
3770         Reviewed by Benjamin Poulain.
3771
3772         [Qt] Make QtWebKit build when using gcc 4.6.0
3773         https://bugs.webkit.org/show_bug.cgi?id=60265
3774
3775         If QtWebKit is compiled with gcc 4.6.0 or later we don't want to deactivate
3776         the c++0x support because it works.
3777
3778         * JavaScriptCore.pro:
3779
3780 2011-05-04  Fridrich Strba  <fridrich.strba@bluewin.ch>
3781
3782         Reviewed by Geoffrey Garen.
3783
3784         Port MachineStackMarker.cpp to Windows x64
3785         https://bugs.webkit.org/show_bug.cgi?id=60216
3786
3787         * heap/MachineStackMarker.cpp:
3788         (JSC::getPlatformThreadRegisters): the CONTEXT struct is usable also
3789         on 64-bit Windows.
3790         (JSC::otherThreadStackPointer): return the Rsp register on Windows x64.
3791
3792 2011-05-04  Fridrich Strba  <fridrich.strba@bluewin.ch>
3793
3794         Reviewed by Martin Robinson.
3795
3796         Link libjavascriptcoregtk on Windows with winmm.dll
3797         https://bugs.webkit.org/show_bug.cgi?id=60215
3798
3799         * GNUmakefile.am:
3800
3801 2011-05-04  Tao Bai  <michaelbai@chromium.org>
3802
3803         Reviewed by David Kilzer.
3804
3805         Populate touch-icon url to FrameLoaderClient
3806         https://bugs.webkit.org/show_bug.cgi?id=59143
3807
3808         * Configurations/FeatureDefines.xcconfig:
3809
3810 2011-05-03  Geoffrey Garen  <ggaren@apple.com>
3811
3812         Reviewed by Darin Adler.
3813
3814         <rdar://problem/9366557> Various crashes due to bad DFG codegen at canalplus.fr
3815
3816         * dfg/DFGSpeculativeJIT.cpp:
3817         (JSC::DFG::SpeculativeJIT::checkArgumentTypes): Removed a stray line of
3818         code that accidentally survived the conversion to a switch statement,
3819         causing a lot of important code not to run most of the time.
3820
3821         Since this is not a trivial finger-picking mistake, I will not call it a
3822         typo.
3823
3824 2011-05-04  Adam Roben  <aroben@apple.com>
3825
3826         Another attempted build fix
3827
3828         * wtf/OwnPtr.h:
3829         (WTF::OwnPtr::operator==):
3830         (WTF::OwnPtr::operator!=):
3831         * wtf/PassOwnPtr.h:
3832         (WTF::PassOwnPtr::operator==):
3833         (WTF::PassOwnPtr::operator!=):
3834         Added a return statement. And made a tweak based on a suggestion from Anders Carlsson.
3835
3836 2011-05-04  Adam Roben  <aroben@apple.com>
3837
3838         Try to fix Leopard, Qt, and probably others
3839
3840         * wtf/OwnPtr.h:
3841         (WTF::OwnPtr::operator==):
3842         (WTF::OwnPtr::operator!=):
3843         * wtf/PassOwnPtr.h:
3844         (WTF::PassOwnPtr::operator==):
3845         (WTF::PassOwnPtr::operator!=):
3846         Try to get the compiler not to instantiate these function templates unnecessarily.
3847
3848 2011-05-03  Adam Roben  <aroben@apple.com>
3849
3850         Disallow equality comparisons between [Pass]OwnPtrs
3851
3852         If you have two OwnPtrs that are equal, you've already lost. (Unless you're doing something
3853         really sneaky, in which case you should stop!)
3854
3855         Fixes <http://webkit.org/b/60053> Testing OwnPtrs for equality should cause a compiler error
3856
3857         Reviewed by Anders Carlsson and Antti Koivisto.
3858
3859         * wtf/OwnPtr.h:
3860         (WTF::OwnPtr::operator==):
3861         (WTF::OwnPtr::operator!=):
3862         * wtf/PassOwnPtr.h:
3863         (WTF::PassOwnPtr::operator==):
3864         (WTF::PassOwnPtr::operator!=):
3865         Added private equality operators that fail to compile when used. (When not used, the
3866         compiler will skip over them because they are function templates.)
3867
3868 2011-05-04  Alexis Menard  <alexis.menard@openbossa.org>
3869
3870         Reviewed by Gavin Barraclough.
3871
3872         JITArithmetic.cpp produces a warning on a unused variable.
3873         https://bugs.webkit.org/show_bug.cgi?id=60060
3874
3875         Just properly use what we already have converted.
3876
3877         * jit/JITArithmetic.cpp:
3878         (JSC::JIT::emitSlow_op_add):
3879         (JSC::JIT::emitSlow_op_mul):
3880
3881 2011-05-04  Alexis Menard  <alexis.menard@openbossa.org>
3882
3883         Reviewed by Geoffrey Garen.
3884
3885         JITPropertyAccess produces a unused but set variable warning in gcc 4.6.0.
3886         https://bugs.webkit.org/show_bug.cgi?id=60050
3887
3888         This patch fix a compilation warning. The new warning scenario -Wunused-but-set-variable
3889         in gcc 4.6.0 is included in -Wall and therefore stops the compilation when warnings are treated
3890         as errors. The patch introduces a new macro ASSERT_JIT_OFFSET_UNUSED and ASSERT_WITH_MESSAGE_UNUSED
3891         which copy the idea of ASSERT_UNUSED.
3892
3893         * jit/JIT.h:
3894         * jit/JITPropertyAccess.cpp:
3895         (JSC::JIT::emit_op_method_check):
3896         (JSC::JIT::compileGetByIdHotPath):
3897         (JSC::JIT::emit_op_put_by_id):
3898         * wtf/Assertions.h:
3899         (assertWithMessageUnused):
3900
3901 2011-04-29  Jer Noble  <jer.noble@apple.com>
3902
3903         Reviewed by Eric Seidel.
3904
3905         Implement FULLSCREEN_API on Windows, Part 4: Enable it
3906         https://bugs.webkit.org/show_bug.cgi?id=59798
3907
3908         * wtf/Platform.h: Set ENABLE_FULLSCREEN_API on win.
3909
3910 2011-05-03  Alexis Menard  <alexis.menard@openbossa.org>
3911
3912         Reviewed by Eric Seidel.
3913
3914         Unused but set variable warning in MacroAssemberX86_64
3915         https://bugs.webkit.org/show_bug.cgi?id=59482
3916
3917         * assembler/MacroAssemblerX86_64.h:
3918         (JSC::MacroAssemblerX86_64::call):
3919         (JSC::MacroAssemblerX86_64::tailRecursiveCall):
3920         (JSC::MacroAssemblerX86_64::makeTailRecursiveCall):
3921
3922 2011-05-03  Oliver Hunt  <oliver@apple.com>
3923
3924         Reviewed by Geoffrey Garen.
3925
3926         Make malloc validation useful
3927         https://bugs.webkit.org/show_bug.cgi?id=57502
3928
3929         Reland this patch (rolled out in 82905) without
3930         turning it on by default.
3931
3932         * JavaScriptCore.exp:
3933         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3934         * wtf/FastMalloc.cpp:
3935         (WTF::tryFastMalloc):
3936         (WTF::fastMalloc):
3937         (WTF::tryFastCalloc):
3938         (WTF::fastCalloc):
3939         (WTF::fastFree):
3940         (WTF::tryFastRealloc):
3941         (WTF::fastRealloc):
3942         (WTF::fastMallocSize):
3943         (WTF::TCMalloc_PageHeap::isScavengerSuspended):
3944         (WTF::TCMalloc_PageHeap::scheduleScavenger):
3945         (WTF::TCMalloc_PageHeap::suspendScavenger):
3946         (WTF::TCMalloc_PageHeap::signalScavenger):
3947         (WTF::TCMallocStats::malloc):
3948         (WTF::TCMallocStats::free):
3949         (WTF::TCMallocStats::fastCalloc):
3950         (WTF::TCMallocStats::tryFastCalloc):
3951         (WTF::TCMallocStats::calloc):
3952         (WTF::TCMallocStats::fastRealloc):
3953         (WTF::TCMallocStats::tryFastRealloc):
3954         (WTF::TCMallocStats::realloc):
3955         (WTF::TCMallocStats::fastMallocSize):
3956         * wtf/FastMalloc.h:
3957         (WTF::Internal::fastMallocValidationHeader):
3958         (WTF::Internal::fastMallocValidationSuffix):
3959         (WTF::Internal::fastMallocMatchValidationType):
3960         (WTF::Internal::setFastMallocMatchValidationType):
3961         (WTF::fastMallocMatchValidateFree):
3962         (WTF::fastMallocValidate):
3963
3964 2011-05-03  Xan Lopez  <xlopez@igalia.com>
3965
3966         Reviewed by Anders Carlsson.
3967
3968         Compile error with GCC 4.6.0, tries to assign unsigned& to bitfield
3969         https://bugs.webkit.org/show_bug.cgi?id=59261
3970
3971         Use unary '+' to force proper type detection in template arguments
3972         with GCC 4.6.0. See bug report for more details.
3973
3974         * runtime/Structure.cpp:
3975         (JSC::StructureTransitionTable::remove): Use '+' to force precise type detection.
3976         (JSC::StructureTransitionTable::add): ditto.
3977         * runtime/Structure.h:
3978         (JSC::StructureTransitionTable::keyForWeakGCMapFinalizer): ditto.
3979
3980 2011-05-03  Jessie Berlin  <jberlin@apple.com>
3981
3982         Rubber-stamped by Adam Roben.
3983
3984         Revert r85550 and r85575.
3985
3986         Variables cannot be exported via the .def file. Instead, they should be annotated with
3987         JS_EXPORTDATA.
3988
3989         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3990         * runtime/Structure.cpp:
3991         (JSC::Structure::materializePropertyMap):
3992         * runtime/Structure.h:
3993         (JSC::Structure::typeInfo):
3994         (JSC::Structure::previousID):
3995         (JSC::Structure::propertyStorageCapacity):
3996         (JSC::Structure::propertyStorageSize):
3997         (JSC::Structure::get):
3998         (JSC::Structure::materializePropertyMapIfNecessary):
3999
4000 2011-05-02  Adam Roben  <aroben@apple.com>
4001
4002         Allow implicit conversion from nullptr_t to PassOwnPtr
4003
4004         This makes it a lot easier to write code that just wants a null PassOwnPtr, especially in
4005         strict PassOwnPtr mode.
4006
4007         Fixes <http://webkit.org/b/59964> Implicit conversion from std::nullptr_t to PassOwnPtr
4008         doesn't work, but should
4009
4010         Reviewed by Adam Barth.
4011
4012         * wtf/PassOwnPtr.h:
4013         (WTF::PassOwnPtr::PassOwnPtr): Added a non-explicit constructor that takes a nullptr_t.
4014
4015         * wtf/MessageQueue.h:
4016         (WTF::::waitForMessageFilteredWithTimeout):
4017         (WTF::::tryGetMessage):
4018         Use the new implicit conversion.
4019
4020 2011-05-02  Jessie Berlin  <jberlin@apple.com>
4021
4022         Rubber-stamped by Oliver Hunt.
4023
4024         Remove an assertion that Windows was hitting on launch.
4025
4026         * runtime/Structure.cpp:
4027         (JSC::Structure::materializePropertyMap):
4028         * runtime/Structure.h:
4029         (JSC::Structure::typeInfo):
4030         (JSC::Structure::previousID):
4031         (JSC::Structure::propertyStorageCapacity):
4032         (JSC::Structure::propertyStorageSize):
4033         (JSC::Structure::get):
4034         (JSC::Structure::materializePropertyMapIfNecessary):
4035
4036 2011-05-02  Mark Rowe  <mrowe@apple.com>
4037
4038         Reviewed by Geoff Garen.
4039
4040         <rdar://problem/9371948> JavaScriptCore should build with GCC 4.2
4041
4042         * Configurations/CompilerVersion.xcconfig:
4043
4044 2011-05-02  Gavin Barraclough  <barraclough@apple.com>
4045
4046         ARMv7 build fix.
4047
4048         * assembler/AbstractMacroAssembler.h:
4049         (JSC::AbstractMacroAssembler::Jump::link):
4050         (JSC::AbstractMacroAssembler::Jump::linkTo):
4051
4052 2011-05-02  Oliver Hunt  <oliver@apple.com>
4053
4054         Windows build fix.
4055
4056         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4057
4058 2011-05-02  Michael Saboff  <msaboff@apple.com>
4059
4060         Reviewed by Geoffrey Garen.
4061
4062         crash in JSC::RegExp::match
4063         https://bugs.webkit.org/show_bug.cgi?id=58922
4064
4065         Cleared chained backtrack data label when linking label even if that 
4066         label doesn't chain itself.  This is needed so that subsequent 
4067         backtrack data labels point to the next outer paren and not within 
4068         the current paren.
4069
4070         * yarr/YarrJIT.cpp:
4071         (JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
4072
4073 2011-05-02  Geoffrey Garen  <ggaren@apple.com>
4074
4075         Reviewed by Oliver Hunt.
4076
4077         Tiny bit of heap cleanup.
4078
4079         * heap/MarkedBlock.h:
4080         (JSC::MarkedBlock::contains): Tightened up an assertion and a comment.
4081
4082         * heap/MarkedSpace.h:
4083         (JSC::MarkedSpace::globalData):
4084         (JSC::MarkedSpace::highWaterMark):
4085         (JSC::MarkedSpace::setHighWaterMark): Moved inlines out of the class
4086         definition, for better clarity.
4087
4088 2011-05-02  Oliver Hunt  <oliver@apple.com>
4089
4090         Reviewed by Gavin Barraclough.
4091
4092         Correct marking of interpreter data in mixed mode builds
4093         https://bugs.webkit.org/show_bug.cgi?id=59962
4094
4095         We had a few places in mixed mode builds where we would not
4096         track data used by the interpreter for marking.  This patch
4097         corrects the problem and adds a number of assertions to catch