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