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