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