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