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