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