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