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