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