2011-03-22 Eric Seidel <eric@webkit.org>
[WebKit-https.git] / Source / JavaScriptCore / ChangeLog
1 2011-03-22  Eric Seidel  <eric@webkit.org>
2
3         Reviewed by Adam Barth.
4
5         Make it possible to build JavaScriptCore and WebCore gyp builds outside of Source
6         https://bugs.webkit.org/show_bug.cgi?id=56867
7
8         This should make it possible to build the gyp-generated JavaScriptCore.xcodeproj
9         from a JavaScriptCore directory outside of Source.
10
11         * gyp/JavaScriptCore.gyp:
12         * gyp/run-if-exists.sh: Added.
13         * gyp/update-info-plist.sh: Added.
14
15 2011-03-22  Eric Seidel  <eric@webkit.org>
16
17         Reviewed by Adam Barth.
18
19         Add Profiling Configuration to JavaScriptCore gyp build
20         https://bugs.webkit.org/show_bug.cgi?id=56862
21
22         It appears this is identical to Release, but I suspect
23         there is someone/thing who uses the Profiling target
24         so we're adding it for completeness.
25
26         * gyp/JavaScriptCore.gyp:
27
28 2011-03-22  Adam Barth  <abarth@webkit.org>
29
30         Reviewed by Eric Seidel.
31
32         Remove os_win32_files variable from the GYP build
33         https://bugs.webkit.org/show_bug.cgi?id=56804
34
35         Now that our understanding of GYP is sufficiently advanced, we don't
36         need os_win32_files any more.  (Turns out Eric was right, as he always
37         is.)
38
39         * JavaScriptCore.gypi:
40
41 2011-03-22  Adam Barth  <abarth@webkit.org>
42
43         Reviewed by Eric Seidel.
44
45         GYP build of JavaScriptCore should be able to link from an empty WebKitBuild directory
46         https://bugs.webkit.org/show_bug.cgi?id=56803
47
48         Previously, we thought we should generate the derived source files in
49         the shared intermediate build products directory, but there are
50         assumptions built into other parts of the Mac build system that the
51         derived source files will be generated in a particular subdirectory of
52         the build products directory.
53
54         This patch is a partial revert of the change that moved the derived
55         source files to the shared intermediate directory.  After this patch,
56         the GYP build can build JavaScriptCore without help from the main
57         normal build system.
58
59         * JavaScriptCore.gypi:
60         * gyp/JavaScriptCore.gyp:
61         * gyp/generate-derived-sources.sh:
62         * gyp/generate-dtrace-header.sh:
63
64 2011-03-22  Jay Civelli  <jcivelli@chromium.org>
65
66         Reviewed by David Levin.
67
68         Adding a contains method to Vector.
69         https://bugs.webkit.org/show_bug.cgi?id=55859
70
71         * wtf/Vector.h:
72         (WTF::Vector::contains):
73
74 2011-03-22  Gabor Loki  <loki@webkit.org>
75
76         Reviewed by Alexey Proskuryakov.
77
78         Fix a bunch of typos in DFG.
79         https://bugs.webkit.org/show_bug.cgi?id=56813
80
81         * dfg/DFGByteCodeParser.cpp:
82         (JSC::DFG::parse):
83         * dfg/DFGGenerationInfo.h:
84         (JSC::DFG::GenerationInfo::setSpilled):
85         * dfg/DFGGraph.cpp:
86         (JSC::DFG::Graph::dump):
87         * dfg/DFGGraph.h:
88         * dfg/DFGJITCodeGenerator.h:
89         (JSC::DFG::JITCodeGenerator::setupStubArguments):
90         * dfg/DFGJITCompiler.cpp:
91         (JSC::DFG::JITCompiler::compileFunction):
92         * dfg/DFGJITCompiler.h:
93         * dfg/DFGNode.h:
94         * dfg/DFGNonSpeculativeJIT.h:
95         * dfg/DFGOperations.h:
96         * dfg/DFGRegisterBank.h:
97         (JSC::DFG::RegisterBank::allocate):
98         * dfg/DFGScoreBoard.h:
99         (JSC::DFG::ScoreBoard::~ScoreBoard):
100         (JSC::DFG::ScoreBoard::allocate):
101         * dfg/DFGSpeculativeJIT.cpp:
102         (JSC::DFG::SpeculativeJIT::compile):
103         * dfg/DFGSpeculativeJIT.h:
104
105 2011-03-22  Adam Barth  <abarth@webkit.org>
106
107         Reviewed by Eric Seidel.
108
109         Production configuration in GYP isn&apos;t set up correctly
110         https://bugs.webkit.org/show_bug.cgi?id=56786
111
112         Update JavaScriptCore.gyp with information mined from
113         JavaScriptCore.xcodeproj.
114
115         * JavaScriptCore.gypi:
116         * gyp/JavaScriptCore.gyp:
117
118 2011-03-22  Kent Tamura  <tkent@chromium.org>
119
120         Reviewed by Eric Seidel.
121
122         REGRESSION(r80096): Number type input unexpectedly rounds fractional values
123         https://bugs.webkit.org/show_bug.cgi?id=56367
124
125         Introduce clampToInteger(unsigned).
126         
127         * wtf/MathExtras.h:
128         (clampToInteger): Added.
129
130 2011-03-21  Adam Barth  <abarth@webkit.org>
131
132         Reviewed by Eric Seidel.
133
134         GYP build should not have include paths that point within the source tree
135         https://bugs.webkit.org/show_bug.cgi?id=56788
136
137         Turns out we don't need these include paths anymore now that we have
138         header maps working properly.
139
140         * gyp/JavaScriptCore.gyp:
141             - Also, remove jsc.cpp from the excluded list because it's not part
142               of the jsc_files variable instead of the javascriptcore_files
143               variable.
144
145 2011-03-21  Adam Barth  <abarth@webkit.org>
146
147         Reviewed by Eric Seidel.
148
149         Solve the Assertions.cpp / -Wno-missing-format-attribute mystery
150         https://bugs.webkit.org/show_bug.cgi?id=56780
151
152         The reason we couldn't resolve this warning in the GYP build was that
153         the normal build disables this warning specifically for this file.
154         This patch takes the same approach as the previous patch to
155         WebCoreObjCExtras.mm in that it uses a pragma to suppress the warning
156         (rather than a build system configuration).
157
158         * JavaScriptCore.xcodeproj/project.pbxproj:
159             - Remove the special-case for this file.
160         * gyp/JavaScriptCore.gyp:
161             - Remove the work-around for this issue.
162         * wtf/Assertions.cpp:
163             - Add a pragma disabling this warning for this file.
164
165 2011-03-21  Adam Barth  <abarth@webkit.org>
166
167         Reviewed by Dimitri Glazkov.
168
169         WebCore GYP build shouldn't crash on startup
170         https://bugs.webkit.org/show_bug.cgi?id=56776
171
172         Debug builds shouldn't define NDEBUG.  This same logic exists in the
173         project.pbxproj file.
174
175         * gyp/JavaScriptCore.gyp:
176
177 2011-03-21  Robert Kroeger  <rjkroege@chromium.org>
178
179         Reviewed by Antonio Gomes.
180
181         Flag to enable/disable a GestureReocognizer framework
182
183         https://bugs.webkit.org/show_bug.cgi?id=49345
184
185         * wtf/Platform.h:
186
187 2011-03-21  Adam Barth  <abarth@webkit.org>
188
189         Reviewed by Dimitri Glazkov.
190
191         Add new files to JavaScriptCore.gypi
192         https://bugs.webkit.org/show_bug.cgi?id=56766
193
194         * JavaScriptCore.gypi:
195
196 2011-03-21  Sheriff Bot  <webkit.review.bot@gmail.com>
197
198         Unreviewed, rolling out r81377.
199         http://trac.webkit.org/changeset/81377
200         https://bugs.webkit.org/show_bug.cgi?id=56765
201
202         WebPageSerializerTest.MultipleFrames is broken (Requested by
203         simonjam on #webkit).
204
205         * wtf/Vector.h:
206
207 2011-03-21  Gabor Loki  <loki@webkit.org>
208
209         Reviewed by Csaba Osztrogonác.
210
211         Extend constant pool to be able to store 16 bit instructions with a constant
212         https://bugs.webkit.org/show_bug.cgi?id=46796
213
214         The putShortWithConstantInt function inserts a 16 bit instruction which
215         refers a 32 bits constant or literal. This is a vital function for those
216         target which loads a PC relative value with a 16 bit instruction (like
217         Thumb-2 instruction set and SH4 architecture).
218
219         * assembler/AssemblerBuffer.h:
220         (JSC::AssemblerBuffer::putIntegral):
221         (JSC::AssemblerBuffer::putIntegralUnchecked):
222         * assembler/AssemblerBufferWithConstantPool.h:
223
224 2011-03-21  Philippe Normand  <pnormand@igalia.com>
225
226         Unreviewed, GTK distcheck build fix.
227
228         * GNUmakefile.am:
229
230 2011-03-20  Bill Budge  <bbudge@chromium.org>
231
232         Reviewed by Adam Barth.
233
234         Rename ThreadSafeShared to ThreadSafeRefCounted
235         https://bugs.webkit.org/show_bug.cgi?id=56714
236
237         No new tests. Exposes no new functionality.
238
239         * API/JSClassRef.h:
240         * API/OpaqueJSString.h:
241         * GNUmakefile.am:
242         * JavaScriptCore.gypi:
243         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
244         * JavaScriptCore.xcodeproj/project.pbxproj:
245         * wtf/Atomics.h:
246         * wtf/CMakeLists.txt:
247         * wtf/CrossThreadRefCounted.h:
248         (WTF::CrossThreadRefCounted::CrossThreadRefCounted):
249         (WTF::::crossThreadCopy):
250         * wtf/ThreadSafeRefCounted.h: Copied from wtf/ThreadSafeShared.h.
251         (WTF::ThreadSafeRefCountedBase::ThreadSafeRefCountedBase):
252         (WTF::ThreadSafeRefCountedBase::ref):
253         (WTF::ThreadSafeRefCountedBase::refCount):
254         (WTF::ThreadSafeRefCountedBase::derefBase):
255         (WTF::ThreadSafeRefCounted::ThreadSafeRefCounted):
256         * wtf/ThreadSafeShared.h: Removed.
257         * wtf/Threading.h:
258
259 2011-03-19  Patrick Gansterer  <paroga@webkit.org>
260
261         Reviewed by Darin Adler.
262
263         Remove StringImpl::computeHash()
264         https://bugs.webkit.org/show_bug.cgi?id=49894
265
266         Replace remainig StringImpl::computeHash with StringImpl::computeHashStringHasher.
267
268         * wtf/text/AtomicString.cpp:
269         (WTF::CStringTranslator::hash):
270         (WTF::UCharBufferTranslator::hash):
271         (WTF::HashAndCharactersTranslator::hash):
272         * wtf/text/StringImpl.h:
273         (WTF::StringImpl::setHash):
274         (WTF::StringImpl::hash):
275
276 2011-03-19  Patrick Gansterer  <paroga@webkit.org>
277
278         Reviewed by Darin Adler.
279
280         Rename WTF::StringHasher methods
281         https://bugs.webkit.org/show_bug.cgi?id=53532
282
283         Rename createHash to computeHash and createBlobHash to hashMemory.
284         Also add a using WTF::StringHasher in the header file.
285
286         * profiler/CallIdentifier.h:
287         (JSC::CallIdentifier::Hash::hash):
288         * runtime/Identifier.cpp:
289         (JSC::IdentifierCStringTranslator::hash):
290         (JSC::IdentifierUCharBufferTranslator::hash):
291         * wtf/StringHasher.h:
292         (WTF::StringHasher::computeHash):
293         (WTF::StringHasher::hashMemory):
294         * wtf/text/StringHash.h:
295         (WTF::CaseFoldingHash::hash):
296         * wtf/text/StringImpl.h:
297         (WTF::StringImpl::computeHash):
298         * wtf/unicode/UTF8.cpp:
299         (WTF::Unicode::calculateStringHashAndLengthFromUTF8Internal):
300
301 2011-03-18  Geoffrey Garen  <ggaren@apple.com>
302
303         Reviewed by Oliver Hunt.
304
305         [GTK] JSC crashes in 32bit Release bots after r80743
306         https://bugs.webkit.org/show_bug.cgi?id=56180
307         
308         The crash was caused by referencing GC memory from a GC destructor. This
309         is not safe because destruction time / order is not guaranteed.
310
311         * profiler/ProfileGenerator.cpp:
312         (JSC::ProfileGenerator::create):
313         (JSC::ProfileGenerator::ProfileGenerator):
314         (JSC::ProfileGenerator::willExecute):
315         (JSC::ProfileGenerator::didExecute):
316         * profiler/ProfileGenerator.h:
317         (JSC::ProfileGenerator::origin): Made ExecState* the first argument,
318         to match the rest of this class and JSC.
319         
320         Use a JSGlobalObject* instead of an ExecState* with an indirect reference
321         to a JSGlobalObject* to track our origin. This is simpler and more
322         efficient, and it removes the destruction order dependency that was causing
323         our crash.
324
325         * profiler/Profiler.cpp:
326         (JSC::Profiler::startProfiling): Updated for change to JSGlobalObject*.
327         (JSC::Profiler::stopProfiling): New function for stopping all profiles
328         for a given global object. This is more straight-forward than multiplexing
329         through the old function.
330
331         (JSC::dispatchFunctionToProfiles): Updated for change to JSGlobalObject*.
332         * profiler/Profiler.h: Ditto.
333
334         * runtime/JSGlobalObject.cpp:
335         (JSC::JSGlobalObject::~JSGlobalObject): Ditto.
336
337 2011-03-17  Geoffrey Garen  <ggaren@apple.com>
338
339         Reviewed by Oliver Hunt.
340
341         1 Structure leaked beneath JSGlobalData::storeVPtrs()
342         https://bugs.webkit.org/show_bug.cgi?id=56595
343
344         * runtime/Executable.cpp:
345         (JSC::EvalExecutable::EvalExecutable):
346         (JSC::ProgramExecutable::ProgramExecutable):
347         (JSC::FunctionExecutable::FunctionExecutable):
348         * runtime/Executable.h:
349         (JSC::ExecutableBase::ExecutableBase):
350         (JSC::NativeExecutable::NativeExecutable):
351         (JSC::VPtrHackExecutable::VPtrHackExecutable):
352         (JSC::ScriptExecutable::ScriptExecutable): Use a raw pointer instead of
353         PassRefPtr, like JSString does, since JSGlobalData owns the singleton
354         exectuable structure.
355
356 2011-03-17  Geoffrey Garen  <ggaren@apple.com>
357
358         Reviewed by Mark Rowe.
359
360         Fixed some string leaks seen on the buildbot
361         https://bugs.webkit.org/show_bug.cgi?id=56619
362
363         * runtime/PropertyMapHashTable.h:
364         (JSC::PropertyTable::~PropertyTable): DEref!
365
366 2011-03-17  Oliver Hunt  <oliver@apple.com>
367
368         Reviewed by Geoffrey Garen.
369
370         Crash in  JSC::MarkStack::drain Under Stress
371         https://bugs.webkit.org/show_bug.cgi?id=56470
372
373         We perform a number of gc allocations while when
374         we are setting up new globals in a piece of global
375         code.  We do this by adding new properties to the
376         symbol table, and then expanding the storage to fit
377         at the end.
378
379         If a GC happens during this time we will report an
380         incorrect size for the global object's symbol table
381         storage.
382
383         This patch corrects this by growing the storage size
384         before we starting adding entries to the symbol table.
385
386         * bytecompiler/BytecodeGenerator.cpp:
387         (JSC::BytecodeGenerator::BytecodeGenerator):
388         * runtime/JSGlobalObject.cpp:
389         (JSC::JSGlobalObject::resizeRegisters):
390
391 2011-03-17  Geoffrey Garen  <ggaren@apple.com>
392
393         Reviewed by Oliver Hunt.
394
395         1 Structure leaked beneath JSGlobalData::storeVPtrs()
396         https://bugs.webkit.org/show_bug.cgi?id=56595
397
398         * runtime/JSGlobalData.cpp:
399         (JSC::JSGlobalData::storeVPtrs): Take local ownership of the Structure
400         we're using, since the Executable is not designed to own the Structure.
401
402 2011-03-17  Gavin Barraclough  <barraclough@apple.com>
403
404         Rubber Stamped by Sam Weinig.
405
406         Add missing register-register branchTest8 to MacroAssemblerX86Common/X86Assembler.
407
408         * assembler/MacroAssemblerX86Common.h:
409         (JSC::MacroAssemblerX86Common::branchTest8):
410         * assembler/X86Assembler.h:
411         (JSC::X86Assembler::testb_rr):
412
413 2011-03-17  Gavin Barraclough  <barraclough@apple.com>
414
415         Reviewed by Sam Weinig.
416
417         Bug 56603 - DFG JIT related cleanup
418         Move node generation out to separate function, move binarySearch algorithm out
419         to StdLibExtras, fix Graph::dump() to print comma between non-node children,
420         even if there are no node children.
421
422         * bytecode/CodeBlock.h:
423         (JSC::getCallReturnOffset):
424         (JSC::CodeBlock::getStubInfo):
425         (JSC::CodeBlock::getCallLinkInfo):
426         (JSC::CodeBlock::getMethodCallLinkInfo):
427         (JSC::CodeBlock::bytecodeOffset):
428             - Move binaryChop to binarySearch in StdLibExtras
429         * dfg/DFGByteCodeParser.cpp:
430         (JSC::DFG::ByteCodeParser::ByteCodeParser):
431         (JSC::DFG::ByteCodeParser::parse):
432         (JSC::DFG::parse):
433             - Make m_noArithmetic a member, initialize m_currentIndex in the constructor.
434         * dfg/DFGByteCodeParser.h:
435             - Change parse() to not take a start index (always 0).
436         * dfg/DFGGraph.cpp:
437         (JSC::DFG::Graph::dump):
438             - Fix Graph::dump() to print comma between non-node children, even if there are no node children.
439         * dfg/DFGJITCodeGenerator.h:
440         (JSC::DFG::JITCodeGenerator::JITCodeGenerator):
441             - Initialize m_compileIndex in constructor.
442         * dfg/DFGNonSpeculativeJIT.cpp:
443         (JSC::DFG::NonSpeculativeJIT::compile):
444         * dfg/DFGNonSpeculativeJIT.h:
445             - Spilt out compilation of individual node.
446         * dfg/DFGOperations.cpp:
447         (JSC::DFG::operationConvertThis):
448         * dfg/DFGOperations.h:
449             - Cleanup parameter name.
450         * dfg/DFGSpeculativeJIT.cpp:
451         (JSC::DFG::SpeculativeJIT::compile):
452         * dfg/DFGSpeculativeJIT.h:
453             - Spilt out compilation of individual node.
454         * runtime/Executable.cpp:
455         (JSC::tryDFGCompile):
456             - Change parse() to not take a start index (always 0).
457         * wtf/StdLibExtras.h:
458         (WTF::binarySearch):
459             - Move binaryChop to binarySearch in StdLibExtras
460
461 2011-03-17  Anders Carlsson  <andersca@apple.com>
462
463         Reviewed by Geoffrey Garen.
464
465         Fix clang build.
466
467         * runtime/JSGlobalData.cpp:
468         (JSC::JSGlobalData::storeVPtrs):
469
470 2011-03-17  Geoffrey Garen  <ggaren@apple.com>
471
472         Reviewed by Darin Adler.
473
474         1 Structure leaked beneath JSGlobalData::storeVPtrs()
475         https://bugs.webkit.org/show_bug.cgi?id=56595
476
477         * JavaScriptCore.xcodeproj/project.pbxproj:
478         * runtime/JSGlobalData.cpp:
479         (JSC::JSGlobalData::storeVPtrs): Now that we have an executable, we need
480         to explicitly run its destructor.
481
482 2011-03-17  Jeff Miller  <jeffm@apple.com>
483
484         Use a consistent set of file patterns in the svn:ignore property for all .xcodeproj directories, specifically:
485         
486         *.mode*
487         *.pbxuser
488         *.perspective*
489         project.xcworkspace
490         xcuserdata
491
492         * JavaScriptCore.xcodeproj: Modified property svn:ignore.
493
494 2011-03-17  Gavin Barraclough  <barraclough@apple.com>
495
496         Reverting r81197, breaks JIT + INTERPRETER build.
497
498         * bytecode/CodeBlock.cpp:
499         (JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset):
500         (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset):
501         * bytecode/CodeBlock.h:
502         (JSC::CodeBlock::addPropertyAccessInstruction):
503         (JSC::CodeBlock::addGlobalResolveInstruction):
504         (JSC::CodeBlock::addStructureStubInfo):
505         * bytecode/Opcode.h:
506         * bytecode/StructureStubInfo.h:
507         * bytecompiler/BytecodeGenerator.cpp:
508         (JSC::BytecodeGenerator::emitResolve):
509         (JSC::BytecodeGenerator::emitResolveWithBase):
510         (JSC::BytecodeGenerator::emitGetById):
511         (JSC::BytecodeGenerator::emitPutById):
512         (JSC::BytecodeGenerator::emitDirectPutById):
513         (JSC::BytecodeGenerator::emitCall):
514         (JSC::BytecodeGenerator::emitConstruct):
515         (JSC::BytecodeGenerator::emitCatch):
516
517 2011-03-17  Ben Taylor  <bentaylor.solx86@gmail.com>
518
519         Reviewed by Alexey Proskuryakov.
520
521         Add a COMPILER(SUNCC) define for Sun Studio 12. 
522         https://bugs.webkit.org/show_bug.cgi?56444
523         derived from patch 1 of 16 originally from https://bugs.webkit.org/show_bug.cgi?id=24932
524
525         * wtf/Platform.h:
526
527 2011-03-17  Jay Civelli  <jcivelli@chromium.org>
528
529         Reviewed by David Levin.
530
531         Adding a contains method to Vector.
532         https://bugs.webkit.org/show_bug.cgi?id=55859
533
534         * wtf/Vector.h:
535         (WTF::::operator):
536         (WTF::::contains):
537
538 2011-03-17  Patrick Gansterer  <paroga@webkit.org>
539
540         Fix the interpreter build.
541
542         * interpreter/Interpreter.cpp:
543         (JSC::Interpreter::privateExecute): Added globalData to inheritorID().
544
545 2011-03-16  Sam Weinig  <sam@webkit.org>
546
547         Fix the interpreter build.
548
549         * interpreter/Interpreter.cpp:
550         (JSC::Interpreter::resolve):
551         (JSC::Interpreter::resolveSkip):
552         (JSC::Interpreter::resolveGlobal):
553         (JSC::Interpreter::resolveGlobalDynamic):
554         (JSC::Interpreter::resolveBaseAndProperty):
555         (JSC::Interpreter::privateExecute):
556         Remove .get()s.
557
558 2011-03-16  Adam Barth  <abarth@webkit.org>
559
560         Reviewed by James Robinson.
561
562         Remove USE(BUILTIN_UTF8_CODEC)
563         https://bugs.webkit.org/show_bug.cgi?id=56508
564
565         We added this recently when we were unsure about the stability of the
566         built-in UTF-8 codec.  However, the codec seems to be stable, so we
567         don't need the macro.
568
569         * wtf/Platform.h:
570
571 2011-03-16  Daniel Bates  <dbates@rim.com>
572
573         Reviewed by Darin Adler.
574
575         Make JIT build for ARM Thumb-2 with RVCT
576         https://bugs.webkit.org/show_bug.cgi?id=56440
577
578         Derived from a patch by Dave Tapuska.
579
580         Also, modify the RVCT stub template to indicate that it preserves 8 byte stack alignment.
581
582         * jit/JITStubs.cpp:
583
584 2011-03-16  Chao-ying Fu  <fu@mips.com>
585
586         Reviewed by Darin Adler.
587
588         Fix MIPS build with const *void
589         https://bugs.webkit.org/show_bug.cgi?id=56513
590
591         * assembler/MacroAssemblerMIPS.h:
592         (JSC::MacroAssemblerMIPS::load32):
593         (JSC::MacroAssemblerMIPS::store32):
594
595 2011-03-16  Oliver Hunt  <oliver@apple.com>
596
597         Reviewed by Darin Adler.
598
599         Remove unnecessary caller tracking shenanigans from CodeBlock
600         https://bugs.webkit.org/show_bug.cgi?id=56483
601
602         This removes some leftover cruft from when we made CodeBlock
603         mark its callees.  Removing it gives us a 0.7% progression,
604         reducing the overall regression to ~1.3%.
605
606         * bytecode/CodeBlock.cpp:
607         (JSC::CodeBlock::shrinkToFit):
608         * bytecode/CodeBlock.h:
609         (JSC::CallLinkInfo::CallLinkInfo):
610         * jit/JIT.cpp:
611         (JSC::JIT::linkCall):
612         (JSC::JIT::linkConstruct):
613
614 2011-03-15  Oliver Hunt  <oliver@apple.com>
615
616         Reviewed by Geoffrey Garen.
617
618         Make Structure creation require a JSGlobalData
619         https://bugs.webkit.org/show_bug.cgi?id=56438
620
621         Mechanical change to make Structure::create require JSGlobalData&, and
622         require all users to provide the globalData.
623
624         * API/JSCallbackConstructor.h:
625         (JSC::JSCallbackConstructor::createStructure):
626         * API/JSCallbackFunction.h:
627         (JSC::JSCallbackFunction::createStructure):
628         * API/JSCallbackObject.h:
629         (JSC::JSCallbackObject::createStructure):
630         * API/JSContextRef.cpp:
631         * JavaScriptCore.exp:
632         * debugger/DebuggerActivation.cpp:
633         (JSC::DebuggerActivation::DebuggerActivation):
634         * debugger/DebuggerActivation.h:
635         (JSC::DebuggerActivation::createStructure):
636         * jit/JITStubs.cpp:
637         (JSC::DEFINE_STUB_FUNCTION):
638         * jsc.cpp:
639         (GlobalObject::GlobalObject):
640         (functionRun):
641         (jscmain):
642         * runtime/Arguments.h:
643         (JSC::Arguments::createStructure):
644         * runtime/ArrayPrototype.h:
645         (JSC::ArrayPrototype::createStructure):
646         * runtime/BooleanObject.h:
647         (JSC::BooleanObject::createStructure):
648         * runtime/DateInstance.h:
649         (JSC::DateInstance::createStructure):
650         * runtime/DatePrototype.h:
651         (JSC::DatePrototype::createStructure):
652         * runtime/ErrorInstance.h:
653         (JSC::ErrorInstance::createStructure):
654         * runtime/Executable.h:
655         (JSC::ExecutableBase::createStructure):
656         (JSC::EvalExecutable::createStructure):
657         (JSC::ProgramExecutable::createStructure):
658         (JSC::FunctionExecutable::createStructure):
659         * runtime/FunctionPrototype.h:
660         (JSC::FunctionPrototype::createStructure):
661         * runtime/GetterSetter.h:
662         (JSC::GetterSetter::createStructure):
663         * runtime/InternalFunction.h:
664         (JSC::InternalFunction::createStructure):
665         * runtime/JSAPIValueWrapper.h:
666         (JSC::JSAPIValueWrapper::createStructure):
667         * runtime/JSActivation.h:
668         (JSC::JSActivation::createStructure):
669         * runtime/JSArray.cpp:
670         (JSC::JSArray::JSArray):
671         * runtime/JSArray.h:
672         (JSC::JSArray::createStructure):
673         * runtime/JSByteArray.cpp:
674         (JSC::JSByteArray::createStructure):
675         * runtime/JSByteArray.h:
676         (JSC::JSByteArray::JSByteArray):
677         * runtime/JSCell.h:
678         (JSC::JSCell::JSCell::createDummyStructure):
679         * runtime/JSFunction.h:
680         (JSC::JSFunction::createStructure):
681         * runtime/JSGlobalData.cpp:
682         (JSC::JSGlobalData::storeVPtrs):
683         (JSC::JSGlobalData::JSGlobalData):
684         * runtime/JSGlobalObject.cpp:
685         (JSC::JSGlobalObject::reset):
686         * runtime/JSGlobalObject.h:
687         (JSC::JSGlobalObject::JSGlobalObject):
688         (JSC::JSGlobalObject::createStructure):
689         * runtime/JSNotAnObject.h:
690         (JSC::JSNotAnObject::createStructure):
691         * runtime/JSONObject.h:
692         (JSC::JSONObject::createStructure):
693         * runtime/JSObject.cpp:
694         (JSC::JSObject::createInheritorID):
695         * runtime/JSObject.h:
696         (JSC::JSObject::createStructure):
697         (JSC::JSNonFinalObject::createStructure):
698         (JSC::JSFinalObject::createStructure):
699         (JSC::createEmptyObjectStructure):
700         (JSC::JSObject::inheritorID):
701         * runtime/JSObjectWithGlobalObject.h:
702         (JSC::JSObjectWithGlobalObject::createStructure):
703         * runtime/JSPropertyNameIterator.h:
704         (JSC::JSPropertyNameIterator::createStructure):
705         * runtime/JSStaticScopeObject.h:
706         (JSC::JSStaticScopeObject::createStructure):
707         * runtime/JSString.h:
708         (JSC::RopeBuilder::createStructure):
709         * runtime/JSVariableObject.h:
710         (JSC::JSVariableObject::createStructure):
711         * runtime/JSWrapperObject.h:
712         (JSC::JSWrapperObject::createStructure):
713         * runtime/JSZombie.h:
714         (JSC::JSZombie::createStructure):
715         * runtime/MathObject.h:
716         (JSC::MathObject::createStructure):
717         * runtime/NativeErrorConstructor.cpp:
718         (JSC::NativeErrorConstructor::NativeErrorConstructor):
719         * runtime/NativeErrorConstructor.h:
720         (JSC::NativeErrorConstructor::createStructure):
721         * runtime/NumberConstructor.h:
722         (JSC::NumberConstructor::createStructure):
723         * runtime/NumberObject.h:
724         (JSC::NumberObject::createStructure):
725         * runtime/ObjectConstructor.h:
726         (JSC::ObjectConstructor::createStructure):
727         * runtime/RegExpConstructor.h:
728         (JSC::RegExpConstructor::createStructure):
729         * runtime/RegExpObject.h:
730         (JSC::RegExpObject::createStructure):
731         * runtime/ScopeChain.h:
732         (JSC::ScopeChainNode::createStructure):
733         * runtime/StringObject.h:
734         (JSC::StringObject::createStructure):
735         * runtime/StringObjectThatMasqueradesAsUndefined.h:
736         (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
737         * runtime/StringPrototype.h:
738         (JSC::StringPrototype::createStructure):
739         * runtime/Structure.h:
740         (JSC::Structure::create):
741
742 2011-03-16  Geoffrey Garen  <ggaren@apple.com>
743
744         Reviewed by Oliver Hunt.
745
746         Some conservative root gathering cleanup
747         https://bugs.webkit.org/show_bug.cgi?id=56447
748         
749         SunSpider says 0.5% - 1.8% faster.
750
751         * interpreter/RegisterFile.cpp:
752         (JSC::RegisterFile::gatherConservativeRoots):
753         * interpreter/RegisterFile.h: New helper function for doing the
754         conservative gathering of the register file. It's still conservative,
755         since the register file may contain uninitialized values, but it's
756         moving-safe, because it only visits values tagged as pointers, so there's
757         no risk of mistaking an integer for a pointer and accidentally changing it.
758
759         * runtime/ConservativeSet.cpp:
760         (JSC::ConservativeRoots::add):
761         * runtime/ConservativeSet.h: Added a single-value add function, used above.
762
763         * runtime/Heap.cpp:
764         (JSC::Heap::markRoots): Separated machine stack conservative roots from
765         register file conservative roots because machine stack roots must be
766         pinned, but register file roots need not be pinned.
767         
768         Adopted new interface for passing the current stack extent to the machine
769         stack root gathering routine. This allows us to exclude marking-related
770         data structures on the stack, and thus avoid double-marking the set of
771         machine roots.
772
773         * runtime/MachineStackMarker.cpp:
774         (JSC::MachineThreads::gatherFromCurrentThread):
775         (JSC::MachineThreads::gatherConservativeRoots):
776         * runtime/MachineStackMarker.h: Added new interface, described above.
777
778         * runtime/MarkedBlock.h:
779         (JSC::MarkedBlock::firstAtom):
780         * wtf/StdLibExtras.h:
781         (WTF::roundUpToMultipleOf): Moved roundUpToMultipleOf so it could be used
782         by MachineStacks.
783
784 2011-03-16  Geoffrey Garen  <ggaren@apple.com>
785
786         Reviewed by Oliver Hunt.
787
788         A little bit of MarkStack cleanup
789         https://bugs.webkit.org/show_bug.cgi?id=56443
790         
791         Moved MarkStack functions into MarkStack.h/.cpp.
792         
793         SunSpider reports no change.
794
795         * runtime/JSArray.h:
796         * runtime/JSCell.h: Moved from here...
797         * runtime/MarkStack.cpp:
798         (JSC::MarkStack::markChildren):
799         (JSC::MarkStack::drain): ...to here. Also, no need to inline drain. It's
800         a huge function, and not called many times.
801
802         * runtime/MarkStack.h:
803         (JSC::MarkStack::~MarkStack): Moved near constructor, per style guide.
804         (JSC::MarkStack::append):
805         (JSC::MarkStack::deprecatedAppend):
806         (JSC::MarkStack::internalAppend): Moved to here.
807
808 2011-03-15  Geoffrey Garen  <ggaren@apple.com>
809
810         Reviewed by Oliver Hunt.
811
812         Removed another deprecatedAppend
813         https://bugs.webkit.org/show_bug.cgi?id=56429
814
815         * collector/handles/HandleHeap.cpp:
816         (JSC::HandleHeap::markStrongHandles):
817         * collector/handles/HandleHeap.h: Use HeapRootMarker, since handles are
818         marked directly by the Heap.
819
820         * runtime/Heap.cpp:
821         (JSC::Heap::markRoots): Ditto.
822
823 2011-03-15  Geoffrey Garen  <ggaren@apple.com>
824
825         Reviewed by Oliver Hunt.
826
827         Removed some more deprecated / unsafe append
828         https://bugs.webkit.org/show_bug.cgi?id=56428
829
830         * collector/handles/HandleStack.cpp:
831         (JSC::HandleStack::mark):
832         * collector/handles/HandleStack.h: Mark the handle stack using a HeapRoot
833         marker, since it's a heap root.
834         
835         * runtime/ArgList.cpp:
836         (JSC::MarkedArgumentBuffer::markLists):
837         (JSC::MarkedArgumentBuffer::slowAppend):
838         * runtime/ArgList.h: Ditto.
839
840         * runtime/Heap.cpp:
841         (JSC::Heap::markRoots): Added a mark call for marking the handle stack.
842         It seems like Oliver forgot this in his last patch. (!)
843
844         * runtime/MarkStack.h: Removed appendSlots, since it would allow an
845         object to embed JSValues directly instead of using WriteBarrier.
846
847         (JSC::MarkStack::append): Added a private append for a list of values.
848
849         (JSC::HeapRootMarker::mark): Access to the above.
850
851 2011-03-15  Geoffrey Garen  <ggaren@apple.com>
852
853         Reviewed by Oliver Hunt.
854
855         Removed a few more deprecatedAppends, and removed HeapRoot<T>
856         https://bugs.webkit.org/show_bug.cgi?id=56422
857         
858         Added HeapRootMarker, a privileged class for marking direct heap roots
859         that are iterated during each garbage collection. This is easier to use
860         and more reliable than HeapRoot<T>, so I've removed HeapRoot<T>.
861
862         * debugger/Debugger.cpp:
863         (JSC::evaluateInGlobalCallFrame):
864         * debugger/DebuggerCallFrame.cpp:
865         (JSC::DebuggerCallFrame::evaluate):
866         * interpreter/CallFrame.h:
867         (JSC::ExecState::exception):
868         * jit/JITStubs.cpp:
869         (JSC::DEFINE_STUB_FUNCTION):
870         * runtime/Completion.cpp:
871         (JSC::evaluate): exception is no longer a HeapRoot<T>, so no need to
872         call .get() on it.
873
874         * runtime/Heap.cpp:
875         (JSC::Heap::markProtectedObjects):
876         (JSC::Heap::markTempSortVectors):
877         (JSC::Heap::markRoots):
878         * runtime/Heap.h: Updated to use HeapRootMarker.
879
880         * runtime/JSCell.h:
881         (JSC::JSCell::MarkStack::append): Added private functions for
882         HeapRootMarker to use.
883
884         * runtime/JSGlobalData.h: exception is no longer a HeapRoot<T>.
885
886         * runtime/MarkStack.h:
887         (JSC::HeapRootMarker::HeapRootMarker):
888         (JSC::HeapRootMarker::mark): Added private functions for
889         HeapRootMarker to use.
890
891         * runtime/SmallStrings.cpp:
892         (JSC::SmallStrings::markChildren): Updated to use HeapRootMarker.
893
894         * runtime/SmallStrings.h:
895         (JSC::SmallStrings::emptyString):
896         (JSC::SmallStrings::singleCharacterString):
897         (JSC::SmallStrings::singleCharacterStrings): Updated to use HeapRootMarker.
898
899         * runtime/WriteBarrier.h: Removed HeapRoot<T>.
900
901 2011-03-14  Geoffrey Garen  <ggaren@apple.com>
902
903         Reviewed by Oliver Hunt.
904
905         Made the global object moving-GC-safe
906         https://bugs.webkit.org/show_bug.cgi?id=56348
907         
908         SunSpider reports no change.
909
910         * runtime/JSGlobalObject.cpp:
911         (JSC::JSGlobalObject::markChildren): Removed a dubious comment that
912         suggested we do not need to visit all our references during GC, since
913         that is not true in a moving GC.
914
915         Re-sorted data members by type, removed one duplicate, and added back
916         the one missing mark I found.
917
918         * runtime/JSGlobalObject.h: Re-sorted data members by type.
919
920 2011-03-15  Oliver Hunt  <oliver@apple.com>
921
922         Reviewed by Geoffrey Garen.
923
924         Introduce Local<T> to allow us to start moving to precise marking of locals
925         https://bugs.webkit.org/show_bug.cgi?id=56394
926
927         Introduce a new handle type, Local<T> and a scoping mechanism
928         LocalScope to allow us to start moving towards precise marking
929         of temporaries and local variables.
930
931         We also start to use the new Local<> type in the JSON stringifier
932         so that we can have some coverage of their behaviour in the initial
933         checkin.
934
935         * GNUmakefile.am:
936         * JavaScriptCore.gypi:
937         * JavaScriptCore.pro:
938         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
939         * JavaScriptCore.xcodeproj/project.pbxproj:
940         * collector/handles/Handle.h:
941         (JSC::::asObject):
942         * collector/handles/HandleStack.cpp: Added.
943         (JSC::HandleStack::HandleStack):
944         (JSC::HandleStack::mark):
945         (JSC::HandleStack::grow):
946         * collector/handles/HandleStack.h: Added.
947         (JSC::HandleStack::enterScope):
948         (JSC::HandleStack::zapTo):
949         (JSC::HandleStack::leaveScope):
950         (JSC::HandleStack::push):
951         * collector/handles/Local.h: Added.
952         (JSC::Local::internalSet):
953         (JSC::::Local):
954         (JSC::::operator):
955         (JSC::LocalStack::LocalStack):
956         (JSC::LocalStack::peek):
957         (JSC::LocalStack::pop):
958         (JSC::LocalStack::push):
959         (JSC::LocalStack::isEmpty):
960         (JSC::LocalStack::size):
961         * collector/handles/LocalScope.h: Added.
962         (JSC::LocalScope::LocalScope):
963         (JSC::LocalScope::~LocalScope):
964         (JSC::LocalScope::release):
965         * runtime/Heap.cpp:
966         (JSC::Heap::markRoots):
967         * runtime/Heap.h:
968         (JSC::Heap::allocateLocalHandle):
969         (JSC::Heap::handleStack):
970         * runtime/JSCell.h:
971         (JSC::JSCell::::getString):
972         * runtime/JSGlobalData.cpp:
973         (JSC::JSGlobalData::JSGlobalData):
974         * runtime/JSGlobalData.h:
975         (JSC::JSGlobalData::allocateLocalHandle):
976         * runtime/JSONObject.cpp:
977         (JSC::Stringifier::Stringifier):
978         (JSC::Stringifier::stringify):
979         (JSC::Stringifier::appendStringifiedValue):
980         (JSC::Stringifier::Holder::Holder):
981         (JSC::Walker::Walker):
982         (JSC::Walker::walk):
983         (JSC::JSONProtoFuncParse):
984         (JSC::JSONProtoFuncStringify):
985         (JSC::JSONStringify):
986         * runtime/JSONObject.h:
987         * runtime/MarkStack.h:
988         (JSC::MarkStack::appendValues):
989         (JSC::MarkStack::appendSlots):
990
991 2011-03-15  Gavin Barraclough  <barraclough@apple.com>
992
993         Rubber Stamped by Sam Weinig.
994
995         Bug 56420 - Remove ENABLE(JIT) code from ByteCompiler
996         Some methods have unnecessary differences in name/arguments for interpreter/JIT.
997
998         * bytecode/CodeBlock.cpp:
999         * bytecode/CodeBlock.h:
1000         (JSC::HandlerInfo::HandlerInfo):
1001         (JSC::CodeBlock::addPropertyAccessInfo):
1002         (JSC::CodeBlock::addGlobalResolveInfo):
1003         (JSC::CodeBlock::addCallLinkInfo):
1004         (JSC::CodeBlock::globalResolveInfo):
1005         * bytecode/Opcode.h:
1006         * bytecode/StructureStubInfo.h:
1007         * bytecompiler/BytecodeGenerator.cpp:
1008         (JSC::BytecodeGenerator::emitResolve):
1009         (JSC::BytecodeGenerator::emitResolveWithBase):
1010         (JSC::BytecodeGenerator::emitGetById):
1011         (JSC::BytecodeGenerator::emitPutById):
1012         (JSC::BytecodeGenerator::emitDirectPutById):
1013         (JSC::BytecodeGenerator::emitCall):
1014         (JSC::BytecodeGenerator::emitConstruct):
1015         (JSC::BytecodeGenerator::emitCatch):
1016
1017 2011-03-15  Gavin Barraclough  <barraclough@apple.com>
1018
1019         Reviewed by Sam Weinig.
1020
1021         Fix broken assert in new code.
1022
1023         * dfg/DFGAliasTracker.h:
1024         (JSC::DFG::AliasTracker::recordPutByVal):
1025             - recordPutByVal is called for both PutByVal & PutByValAlias.
1026
1027 2011-03-15  Gavin Barraclough  <barraclough@apple.com>
1028
1029         Rubber stamped by Sam Weinig.
1030
1031         Removed redundant code from BytecodeGenerator.
1032
1033         * bytecompiler/BytecodeGenerator.cpp:
1034         * bytecompiler/BytecodeGenerator.h:
1035             - delete uncalled code missed when reparsing was removed.
1036
1037 2011-03-15  Kevin Ollivier  <kevino@theolliviers.com>
1038
1039         Reviewed by Darin Adler.
1040
1041         Introduce WTF_USE_EXPORT_MACROS, which will allow us to put shared library import/export
1042         info into the headers rather than in export symbol definition files, but disable it on 
1043         all platforms initially so we can deal with port build issues one port at a time.
1044         
1045         https://bugs.webkit.org/show_bug.cgi?id=27551
1046
1047         * API/JSBase.h:
1048         * config.h:
1049         * wtf/Assertions.h:
1050         * wtf/ExportMacros.h: Added.
1051         * wtf/Platform.h:
1052
1053 2011-03-14  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1054
1055         Unreviewed build fix.
1056
1057         Buildfix when JIT is not enabled after r81079
1058         https://bugs.webkit.org/show_bug.cgi?id=56361
1059
1060         * runtime/Executable.cpp:
1061
1062 2011-03-14  Geoffrey Garen  <ggaren@apple.com>
1063
1064         Reviewed by Oliver Hunt.
1065
1066         Made the global object moving-GC-safe
1067         https://bugs.webkit.org/show_bug.cgi?id=56348
1068         
1069         SunSpider reports no change.
1070
1071         * runtime/JSGlobalObject.cpp:
1072         (JSC::JSGlobalObject::markChildren): Removed a dubious comment that
1073         suggested we do not need to visit all our references during GC, since
1074         that is not true in a moving GC.
1075
1076         Re-sorted data members by type, removed one duplicate, and added back
1077         the one missing mark I found.
1078
1079         * runtime/JSGlobalObject.h: Re-sorted data members by type.
1080
1081 2011-03-14  Geoffrey Garen  <ggaren@apple.com>
1082
1083         Reviewed by Oliver Hunt.
1084
1085         Made JSWrapperObject and subclasses moving-GC-safe
1086         https://bugs.webkit.org/show_bug.cgi?id=56346
1087         
1088         SunSpider reports no change.
1089
1090         * runtime/BooleanObject.cpp:
1091         (JSC::BooleanObject::BooleanObject):
1092         * runtime/DateInstance.cpp:
1093         (JSC::DateInstance::DateInstance): No more need for JSGlobalData, since
1094         we don't initialize the wrapped value in our constructor.
1095
1096         * runtime/DateInstance.h: Don't set the OverridesMarkChildren flag because
1097         we do not in fact override markChildren.
1098
1099         * runtime/DatePrototype.h: Declare an anonymous slot, since wrapper object
1100         no longer does so for us. Also added an ASSERT to catch a latent bug,
1101         where DatePrototype stomped on its base class's anonymous slot. Hard-coded
1102         anonymous slots are a plague on our code. This doesn't cause any problems
1103         in our existing code since the base class never reads the anonymous slot
1104         it declares, but it caused crashes when I tried to start using the slot
1105         in an initial version of this patch.
1106
1107         * runtime/JSWrapperObject.h:
1108         (JSC::JSWrapperObject::JSWrapperObject):
1109         (JSC::JSWrapperObject::internalValue):
1110         (JSC::JSWrapperObject::setInternalValue): Resolved a problem where
1111         our internal value was stored in two places: an anonymous slot, and a
1112         data member which was not always visited during GC. Now, we only use the
1113         data member, and we always visit it. (Instead of relying on certain
1114         subclasses to set the OverridesMarkChildren bit, we set it ourselves.)
1115
1116         * runtime/NumberObject.cpp:
1117         (JSC::NumberObject::NumberObject): No more need for JSGlobalData, since
1118         we don't initialize the wrapped value in our constructor.
1119
1120         * runtime/NumberObject.h: Removed meaningless declaration.
1121
1122         * runtime/StringObject.cpp:
1123         (JSC::StringObject::StringObject): No more need for JSGlobalData, since
1124         we don't initialize the wrapped value in our constructor.
1125
1126         * runtime/StringObject.h: Don't set the OverridesMarkChildren flag because
1127         we do not in fact override markChildren.
1128
1129         * runtime/StringPrototype.h: Declare an anonymous slot, since wrapper object
1130         no longer does so for us. Also added an ASSERT to catch a latent bug,
1131         where DatePrototype stomped on its base class's anonymous slot. Hard-coded
1132         anonymous slots are a plague on our code.
1133
1134 2011-03-14  Michael Saboff  <msaboff@apple.com>
1135
1136         Reviewed by Gavin Barraclough.
1137
1138         Look-ahead assertions with back references don’t work as expected
1139         https://bugs.webkit.org/show_bug.cgi?id=56082
1140
1141         Changed parentheses assertion processing to temporarily back out the 
1142         number of known characters after the assertion while processing the 
1143         assertion.  This was done so that assertions don't fail due to 
1144         checking the number of required characters as additional to the 
1145         rest of the express since assertions don't "consume" input.
1146         Added a byte code to uncheck characters to support the change.
1147
1148         * yarr/YarrInterpreter.cpp:
1149         (JSC::Yarr::Interpreter::matchDisjunction):
1150         (JSC::Yarr::ByteCompiler::uncheckInput):
1151         (JSC::Yarr::ByteCompiler::emitDisjunction):
1152         * yarr/YarrInterpreter.h:
1153         (JSC::Yarr::ByteTerm::UncheckInput):
1154
1155 2011-03-14  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
1156
1157         Reviewed by Laszlo Gombos.
1158
1159         [Qt] Warning that round/roundf functions are already defined when compiled with RVCT 4 on symbian.
1160         https://bugs.webkit.org/show_bug.cgi?id=56133
1161
1162         Add condition to not compile webkit internal math round functions on RVCT compiler versions 
1163         from 3.0.0 because they are already defined in compiler math library.
1164
1165         * wtf/MathExtras.h:
1166
1167 2011-03-14  Gavin Barraclough  <barraclough@apple.com>
1168
1169         Reviewed by Geoffrey Garen & Oliver Hunt.
1170
1171         Bug 56284 - Add a dataflow intermediate representation for use in JIT generation.
1172
1173         The JSC JIT presently generates code directly from the bytecode used by the interpreter.
1174         This is not an optimal intermediate representation for JIT code generation, since it does
1175         not capture liveness information of values, and provides little opportunity to perform
1176         any static analysis for even primitive types. The JIT currently generates two code paths,
1177         a fast path handling common cases, and a slower path handling less common operand types.
1178         However the slow path jumps back into the fast path, meaning that information arising
1179         from the earlier type checks cannot be propagated to later operations.
1180
1181         This patch adds:
1182             * a dataflow intermediate representation capable of describing a single basic block
1183               of operations,
1184             * a mechanism to convert a simple, single-block bytecode functions to the new IR,
1185             * and a JIT code generator capable of generating code from this representation.
1186
1187         The JIT generates two code paths, with the slower path not reentering the fast path
1188         mid-block, allowing speculative optimizations to be made on the hot path, with type
1189         information arising from these speculative decisions able to be propagated through the
1190         dataflow. Code generation of both speculative and non-speculative paths exploits the type
1191         and liveness information represented in the dataflow graph to attempt to avoid redundant
1192         boxing and type-checking of values, and to remove unnecessary spills of temporary values
1193         to the RegisterFile.
1194
1195         The dataflow JIT currently can only support a subset of bytecode operations, limited to
1196         arithmetic, bit-ops, and basic property access. Functions that cannot be compiled by the
1197         dataflow JIT will be run using the existing JIT. The coverage of the dataflow JIT will be
1198         expanded to include, control-flow, function calls, and then the long-tail of remaining
1199         bytecode instructions. The JIT presently only support JSVALUE64, and as a consequence of
1200         this only supports x86-64.
1201
1202         The status of the dataflow JIT is currently work-in-progress. Limitations of the present
1203         JIT code generation may cause performance regressions, particularly:
1204             * the policy to only generate arithmetic code on the speculative path using integer
1205               instructions, never using floating point.
1206             * the policy to only generate arithmetic code on the non-speculative path using
1207               floating point instructions, never using integer.
1208             * always generating JSValue adds on the non-speculative path as a call out to a
1209               C-function, never handling this in JIT code.
1210             * always assuming by-Value property accesses on the speculative path to be array
1211               accesses.
1212             * generating all by-Value property accesses from the non-speculative path as a call
1213               out to a C-function.
1214             * generating all by-Indentifer property accesses as a call out to a C-function.
1215         Due to these regressions, the code is landed in a state where it is disabled in most
1216         cases by the ENABLE_DFG_JIT_RESTRICTIONS guard in Platform.h. As these regressions are
1217         addressed, the JIT will be allowed to trigger in more cases.
1218
1219         * JavaScriptCore.xcodeproj/project.pbxproj:
1220             - Added new files to Xcode project.
1221         * dfg: Added.
1222             - Added directory for new code.
1223         * dfg/DFGByteCodeParser.cpp: Added.
1224         * dfg/DFGByteCodeParser.h: Added.
1225             - Contruct a DFG::Graph representation from a bytecode CodeBlock.
1226         * dfg/DFGGenerationInfo.h: Added.
1227             - Track type & register information for VirtualRegisters during JIT code generation.
1228         * dfg/DFGGraph.cpp: Added.
1229         * dfg/DFGGraph.h: Added.
1230             - Dataflow graph intermediate representation for code generation.
1231         * dfg/DFGJITCodeGenerator.cpp: Added.
1232         * dfg/DFGJITCodeGenerator.h: Added.
1233             - Base class for SpeculativeJIT & NonSpeculativeJIT to share common functionality.
1234         * dfg/DFGJITCompiler.cpp: Added.
1235         * dfg/DFGJITCompiler.h: Added.
1236             - Class responsible for driving code generation of speculativeJIT & non-speculative
1237               code paths from the dataflow graph.
1238         * dfg/DFGNonSpeculativeJIT.cpp: Added.
1239         * dfg/DFGNonSpeculativeJIT.h: Added.
1240             - Used to generate the non-speculative code path, this make no assumptions
1241               about operand types.
1242         * dfg/DFGOperations.cpp: Added.
1243         * dfg/DFGOperations.h: Added.
1244             - Helper functions called from the JIT generated code.
1245         * dfg/DFGRegisterBank.h: Added.
1246             - Used to track contents of physical registers during JIT code generation.
1247         * dfg/DFGSpeculativeJIT.cpp: Added.
1248         * dfg/DFGSpeculativeJIT.h: Added.
1249             - Used to generate the speculative code path, this make assumptions about
1250               operand types to enable optimization.
1251         * runtime/Executable.cpp:
1252             - Add code to attempt to use the DFG JIT to compile a function, with fallback
1253               to the existing JIT.
1254         * wtf/Platform.h:
1255             - Added compile guards to enable the DFG JIT.
1256
1257 2011-03-14  Geoffrey Garen  <ggaren@apple.com>
1258
1259         Reviewed by Oliver Hunt.
1260
1261         Removed more cases of DeprecatedPtr (exception, SmallStrings)
1262         https://bugs.webkit.org/show_bug.cgi?id=56332
1263
1264         * runtime/Identifier.cpp:
1265         (JSC::Identifier::add):
1266         (JSC::Identifier::addSlowCase): Use a variable instead of a hard-coded
1267         constant, to make this code less brittle.
1268
1269         * runtime/JSGlobalData.h: Use HeapRoot instead of DeprecatedPtr because
1270         this reference is owned and managed directly by the heap.
1271
1272         * runtime/JSString.cpp:
1273         (JSC::JSString::substringFromRope):
1274         * runtime/JSString.h:
1275         (JSC::jsSingleCharacterString):
1276         (JSC::jsSingleCharacterSubstring):
1277         (JSC::jsString):
1278         (JSC::jsStringWithFinalizer):
1279         (JSC::jsSubstring):
1280         (JSC::jsOwnedString): Use a variable instead of a hard-coded
1281         constant, to make this code less brittle.
1282
1283         * runtime/SmallStrings.cpp:
1284         (JSC::SmallStringsStorage::rep):
1285         (JSC::SmallStringsStorage::SmallStringsStorage):
1286         (JSC::SmallStrings::SmallStrings):
1287         (JSC::SmallStrings::markChildren):
1288         (JSC::SmallStrings::clear):
1289         (JSC::SmallStrings::count): Use a variable instead of a hard-coded
1290         constant, to make this code less brittle.
1291
1292         * runtime/SmallStrings.h:
1293         (JSC::SmallStrings::singleCharacterString): Use HeapRoot instead of
1294         DeprecatedPtr because these references are owned and managed directly by
1295         the heap.
1296         
1297         Stop using FixedArray because we only want a very limited set
1298         of classes to be able to use HeapRoot. (Replaced with manual ASSERTs.)
1299
1300         * runtime/WriteBarrier.h:
1301         (JSC::operator==):
1302         (JSC::WriteBarrier::WriteBarrier):
1303         (JSC::HeapRoot::HeapRoot):
1304         (JSC::HeapRoot::operator=): Added HeapRoot, which is allowed to set
1305         without write barrier because we assume all HeapRoots are scanned during
1306         all GC passes.
1307
1308 2011-03-14  Brian Weinstein  <bweinstein@apple.com>
1309
1310         Reviewed by Adam Roben and Gavin Barraclough.
1311
1312         FileSystemWin.cpp needs listDirectory() implementation
1313         https://bugs.webkit.org/show_bug.cgi?id=56331
1314         <rdar://problem/9126635>
1315         
1316         Give StringConcatenate the ability to deal with const UChar*'s as a String type to append.
1317
1318         * wtf/text/StringConcatenate.h:
1319
1320 2011-03-14  Mark Rowe  <mrowe@apple.com>
1321
1322         Reviewed by Oliver Hunt.
1323
1324         <http://webkit.org/b/56304> REGRESSION(r80892): 100,000+ leaks seen on the build bot
1325
1326         * API/JSClassRef.cpp:
1327         (OpaqueJSClass::OpaqueJSClass): Don't leak any existing entry for the given name if
1328         the class definition contains duplicates. This also removes what look to be leaks
1329         of the StringImpl instances that are used as keys: the HashMap key type is a RefPtr
1330         which retains / releases the instances at the appropriate time, so explicitly calling
1331         ref is not necessary.
1332
1333 2011-03-14  Oliver Hunt  <oliver@apple.com>
1334
1335         Fix windows build
1336
1337         * jit/JSInterfaceJIT.h:
1338         (JSC::JSInterfaceJIT::emitLoadInt32):
1339         (JSC::JSInterfaceJIT::tagFor):
1340         (JSC::JSInterfaceJIT::payloadFor):
1341         (JSC::JSInterfaceJIT::intPayloadFor):
1342         (JSC::JSInterfaceJIT::intTagFor):
1343         (JSC::JSInterfaceJIT::addressFor):
1344
1345 2011-03-11  Oliver Hunt  <oliver@apple.com>
1346
1347         Reviewed by Gavin Barraclough.
1348
1349         Ensure all values are correctly tagged in the registerfile
1350         https://bugs.webkit.org/show_bug.cgi?id=56214
1351
1352         This patch makes sure that all JSCell pointers written to
1353         the registerfile are correctly tagged as JSCells, and replaces
1354         raw int usage with the immediate representation.
1355
1356         For performance, register pressure, and general saneness reasons
1357         I've added abstractions for reading and writing the tag
1358         and payload of integer registers directly for the JSVALUE64
1359         encoding.
1360
1361         * interpreter/Register.h:
1362         (JSC::Register::withInt):
1363         (JSC::Register::withCallee):
1364         (JSC::Register::operator=):
1365         (JSC::Register::i):
1366         (JSC::Register::activation):
1367         (JSC::Register::function):
1368         (JSC::Register::propertyNameIterator):
1369         (JSC::Register::scopeChain):
1370         * jit/JIT.h:
1371         * jit/JITCall.cpp:
1372         (JSC::JIT::compileOpCallInitializeCallFrame):
1373         (JSC::JIT::compileOpCallVarargs):
1374         (JSC::JIT::compileOpCall):
1375         * jit/JITCall32_64.cpp:
1376         (JSC::JIT::compileOpCallInitializeCallFrame):
1377         (JSC::JIT::compileOpCallVarargs):
1378         (JSC::JIT::compileOpCall):
1379         (JSC::JIT::compileOpCallSlowCase):
1380         * jit/JITInlineMethods.h:
1381         (JSC::JIT::emitPutToCallFrameHeader):
1382         (JSC::JIT::emitPutCellToCallFrameHeader):
1383         (JSC::JIT::emitPutIntToCallFrameHeader):
1384         * jit/JITOpcodes.cpp:
1385         (JSC::JIT::privateCompileCTINativeCall):
1386         (JSC::JIT::emit_op_get_pnames):
1387         (JSC::JIT::emit_op_next_pname):
1388         (JSC::JIT::emit_op_load_varargs):
1389         (JSC::JIT::emitSlow_op_load_varargs):
1390         * jit/JITOpcodes32_64.cpp:
1391         (JSC::JIT::privateCompileCTINativeCall):
1392         (JSC::JIT::emit_op_get_pnames):
1393         (JSC::JIT::emit_op_next_pname):
1394         * jit/JSInterfaceJIT.h:
1395         (JSC::JSInterfaceJIT::intPayloadFor):
1396         (JSC::JSInterfaceJIT::intTagFor):
1397         * jit/SpecializedThunkJIT.h:
1398         (JSC::SpecializedThunkJIT::returnJSValue):
1399         (JSC::SpecializedThunkJIT::returnDouble):
1400         (JSC::SpecializedThunkJIT::returnInt32):
1401         (JSC::SpecializedThunkJIT::returnJSCell):
1402
1403 2011-03-13  Geoffrey Garen  <ggaren@apple.com>
1404
1405         Reviewed by Sam Weinig.
1406
1407         A few Heap-related renames (sans file moves, which should come next)
1408         https://bugs.webkit.org/show_bug.cgi?id=56283
1409         
1410         ConservativeSet => ConservativeRoots. "Set" was misleading, since items
1411         are not uniqued. Also, "Roots" is more specific about what's in the set.
1412         
1413         MachineStackMarker => MachineThreads. "Threads" is more descriptive of
1414         the fact that this class maintains a set of all threads using JSC.
1415         "Stack" was misleading, since this class traverses stacks and registers.
1416         "Mark" was misleading, since this class doesn't mark anything anymore.
1417         
1418         registerThread => addCurrentThread. "Current" is more specific.
1419         unregisterThread => removeCurrentThread. "Current" is more specific.
1420         
1421         "currentThreadRegistrar" => threadSpecific. The only point of this data
1422         structure is to register a thread-specific destructor with a pointer to
1423         this.
1424         
1425         "mark...Conservatively" => "gather". "Mark" is not true, since these
1426         functions don't mark anything. "Conservatively" is redundant, since they
1427         take "ConservativeRoots" as an argument.
1428
1429         * API/APIShims.h:
1430         (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
1431         * JavaScriptCore.exp:
1432         * runtime/ConservativeSet.cpp:
1433         (JSC::ConservativeRoots::grow):
1434         (JSC::ConservativeRoots::add):
1435         * runtime/ConservativeSet.h:
1436         (JSC::ConservativeRoots::ConservativeRoots):
1437         (JSC::ConservativeRoots::~ConservativeRoots):
1438         (JSC::ConservativeRoots::size):
1439         (JSC::ConservativeRoots::roots):
1440         * runtime/Heap.cpp:
1441         (JSC::Heap::Heap):
1442         (JSC::Heap::markRoots):
1443         * runtime/Heap.h:
1444         (JSC::Heap::machineThreads):
1445         * runtime/JSGlobalData.h:
1446         (JSC::JSGlobalData::makeUsableFromMultipleThreads):
1447         * runtime/MachineStackMarker.cpp:
1448         (JSC::MachineThreads::MachineThreads):
1449         (JSC::MachineThreads::~MachineThreads):
1450         (JSC::MachineThreads::makeUsableFromMultipleThreads):
1451         (JSC::MachineThreads::addCurrentThread):
1452         (JSC::MachineThreads::removeThread):
1453         (JSC::MachineThreads::removeCurrentThread):
1454         (JSC::MachineThreads::gatherFromCurrentThreadInternal):
1455         (JSC::MachineThreads::gatherFromCurrentThread):
1456         (JSC::MachineThreads::gatherFromOtherThread):
1457         (JSC::MachineThreads::gatherConservativeRoots):
1458         * runtime/MachineStackMarker.h:
1459         * runtime/MarkStack.h:
1460         (JSC::MarkStack::append):
1461
1462 2011-03-13  David Kilzer  <ddkilzer@apple.com>
1463
1464         BUILD FIX for armv7 after r80969
1465
1466         Bug 56270 - The JIT 'friend's many classes in JSC; start unwinding this.
1467         <https://bugs.webkit.org/show_bug.cgi?id=56270>
1468
1469         * assembler/MacroAssemblerARMv7.h:
1470         (JSC::MacroAssemblerARMv7::load32): Made void* address argument
1471         const.
1472         (JSC::MacroAssemblerARMv7::store32): Ditto.
1473
1474 2011-03-13  Geoffrey Garen  <ggaren@apple.com>
1475
1476         Not reviewed.
1477
1478         Try to fix the Mac build.
1479
1480         * JavaScriptCore.xcodeproj/project.pbxproj: Make sure to forward
1481         ConervativeSet.h, since it's now visible when compiling other projects.
1482
1483 2011-03-13  Geoffrey Garen  <ggaren@apple.com>
1484
1485         Reviewed by Oliver Hunt.
1486
1487         Removed another case of DeprecatedPtr (ConservativeSet)
1488         https://bugs.webkit.org/show_bug.cgi?id=56281
1489         
1490         The ConservativeSet is an internal data structure used during marking,
1491         so direct pointers are fine.
1492
1493         * runtime/ConservativeSet.cpp:
1494         (JSC::ConservativeSet::grow):
1495         * runtime/ConservativeSet.h: Added some accessors, for use by MarkStack::append.
1496         (JSC::ConservativeSet::~ConservativeSet): Fixed a typo where we calculated
1497         the size of the set based on sizeof(DeprecatedPtr<T>*) instead of
1498         sizeof(DeprecatedPtr<T>). I'm not sure if this had real-world implications or not.
1499         (JSC::ConservativeSet::size):
1500         (JSC::ConservativeSet::set): Use direct pointers, as stated above. 
1501
1502         * runtime/Heap.cpp:
1503         (JSC::Heap::markRoots):
1504         * runtime/MarkStack.h:
1505         (JSC::MarkStack::append): Created a special case of append for
1506         ConservativeSet. I didn't want to add back a generic "append JSCell*"
1507         function, since other class might start using that wrong. (In the end,
1508         this function might go away, since the Heap will want to do something
1509         slightly more interesting with the conservative set, but this is OK for
1510         now.)
1511
1512 2011-03-13  Geoffrey Garen  <ggaren@apple.com>
1513
1514         Reviewed by Oliver Hunt.
1515
1516         Removed another case of DeprecatedPtr (PutPropertySlot)
1517         https://bugs.webkit.org/show_bug.cgi?id=56278
1518
1519         * runtime/PutPropertySlot.h:
1520         (JSC::PutPropertySlot::setExistingProperty):
1521         (JSC::PutPropertySlot::setNewProperty):
1522         (JSC::PutPropertySlot::base): Direct pointer is fine for PutPropertySlot,
1523         since it's a stack-allocated temporary.
1524
1525 2011-03-13  Geoffrey Garen  <ggaren@apple.com>
1526
1527         Reviewed by Oliver Hunt.
1528
1529         Removed one case of DeprecatedPtr (ScopeChainIterator)
1530         https://bugs.webkit.org/show_bug.cgi?id=56277
1531
1532         * runtime/ScopeChain.h: Direct pointer is fine for ScopeChainIterator,
1533         since it's a stack-allocated temporary.
1534
1535 2011-03-13  Gavin Barraclough  <barraclough@apple.com>
1536
1537         Reviewed by Sam Weinig.
1538
1539         Bug 56273 - Add three operand forms to MacroAssember operations.
1540
1541         Adding for X86(_64) for now, should be rolled out to other backends as necessary.
1542         These may allow more efficient code generation in some cases, avoiding the need
1543         for unnecessary register-register move instructions.
1544
1545         * assembler/AbstractMacroAssembler.h:
1546         (JSC::AbstractMacroAssembler::Jump::link):
1547         (JSC::AbstractMacroAssembler::Jump::linkTo):
1548             - marked these methods const.
1549         (JSC::AbstractMacroAssembler::Jump::isSet):
1550             - add a method to check whether a Jump object has been set to
1551               reference an instruction, or is in a null, unset state. 
1552         * assembler/MacroAssemblerCodeRef.h:
1553         (JSC::FunctionPtr::FunctionPtr):
1554             - add non-explicit constructor, for FunctionPtr's to C/C++ functions.
1555         * assembler/MacroAssemblerX86Common.h:
1556         (JSC::MacroAssemblerX86Common::and32):
1557         (JSC::MacroAssemblerX86Common::lshift32):
1558         (JSC::MacroAssemblerX86Common::or32):
1559         (JSC::MacroAssemblerX86Common::rshift32):
1560         (JSC::MacroAssemblerX86Common::urshift32):
1561         (JSC::MacroAssemblerX86Common::xor32):
1562         (JSC::MacroAssemblerX86Common::moveDouble):
1563         (JSC::MacroAssemblerX86Common::addDouble):
1564         (JSC::MacroAssemblerX86Common::divDouble):
1565         (JSC::MacroAssemblerX86Common::subDouble):
1566         (JSC::MacroAssemblerX86Common::mulDouble):
1567         (JSC::MacroAssemblerX86Common::branchTruncateDoubleToInt32):
1568         (JSC::MacroAssemblerX86Common::branchTest32):
1569         (JSC::MacroAssemblerX86Common::branchTest8):
1570         (JSC::MacroAssemblerX86Common::branchAdd32):
1571         (JSC::MacroAssemblerX86Common::branchMul32):
1572         (JSC::MacroAssemblerX86Common::branchSub32):
1573             - add three operand forms of these instructions.
1574         * assembler/MacroAssemblerX86_64.h:
1575         (JSC::MacroAssemblerX86_64::addDouble):
1576         (JSC::MacroAssemblerX86_64::convertInt32ToDouble):
1577         (JSC::MacroAssemblerX86_64::loadPtr):
1578         (JSC::MacroAssemblerX86_64::branchTestPtr):
1579         * assembler/X86Assembler.h:
1580         (JSC::X86Assembler::JmpSrc::isSet):
1581             - add a method to check whether a JmpSrc object has been set to
1582               reference an instruction, or is in a null, unset state. 
1583         (JSC::X86Assembler::movsd_rr):
1584             - added FP register-register move.
1585         (JSC::X86Assembler::linkJump):
1586             - Add an assert to check jumps aren't linked more than once.
1587         * jit/JITInlineMethods.h:
1588         (JSC::JIT::emitLoadInt32ToDouble):
1589             - load integers to the FPU via regsiters on x86-64.
1590
1591 2011-03-13  Gavin Barraclough  <barraclough@apple.com>
1592
1593         ARM build fix.
1594
1595         * assembler/MacroAssemblerARM.h:
1596         (JSC::MacroAssemblerARM::load32):
1597
1598 2011-03-13  Gavin Barraclough  <barraclough@apple.com>
1599
1600         Reviewed by Sam Weinig.
1601
1602         Bug 56270 - The JIT 'friend's many classes in JSC; start unwinding this.
1603
1604         The JIT need to 'friend' other classes in order to be able to calculate offsets
1605         of various properties, or the absolute addresses of members within specific objects,
1606         in order to JIT generate code that will access members within the class when run.
1607
1608         Instead of using friends in these cases, switch to providing specific accessor
1609         methods to provide this information.  In the case of offsets, these can be static
1610         functions, and in the case of pointers to members within a specific object these can
1611         be const methods returning pointers to const values, to prevent clients from
1612         modifying values otherwise encapsulated within classes.
1613
1614         * bytecode/SamplingTool.h:
1615         * interpreter/Register.h:
1616         * interpreter/RegisterFile.h:
1617         * runtime/JSArray.h:
1618         * runtime/JSCell.h:
1619         * runtime/JSTypeInfo.h:
1620         * runtime/JSVariableObject.h:
1621         * runtime/Structure.h:
1622         * wtf/RefCounted.h:
1623             - Change these classes to no longer friend the JIT, add accessors for member offsets.
1624         * jit/JIT.cpp:
1625         * jit/JITCall32_64.cpp:
1626         * jit/JITInlineMethods.h:
1627         * jit/JITOpcodes.cpp:
1628         * jit/JITOpcodes32_64.cpp:
1629         * jit/JITPropertyAccess.cpp:
1630         * jit/JITPropertyAccess32_64.cpp:
1631             - Change the JIT to use class accessors, rather than taking object ofsets directly.
1632         * assembler/AbstractMacroAssembler.h:
1633         * assembler/MacroAssemblerX86_64.h:
1634         * assembler/X86Assembler.h:
1635             - Since the accessors for objects members return const pointers to retain encapsulation,
1636               methods generating code with absolute addresses must be able to handle const pointers
1637               (the JIT doesn't write to these values, do dies treat the pointer to value as const
1638               from within the C++ code of the JIT, if not at runtime!).
1639
1640 2011-03-12  Sheriff Bot  <webkit.review.bot@gmail.com>
1641
1642         Unreviewed, rolling out r80919.
1643         http://trac.webkit.org/changeset/80919
1644         https://bugs.webkit.org/show_bug.cgi?id=56251
1645
1646         all windows bots failed to compile this change (Requested by
1647         loislo on #webkit).
1648
1649         * JavaScriptCore.xcodeproj/project.pbxproj:
1650         * bytecode/StructureStubInfo.cpp:
1651         * interpreter/Register.h:
1652         (JSC::Register::withInt):
1653         (JSC::Register::withCallee):
1654         (JSC::Register::operator=):
1655         (JSC::Register::i):
1656         (JSC::Register::activation):
1657         (JSC::Register::function):
1658         (JSC::Register::propertyNameIterator):
1659         (JSC::Register::scopeChain):
1660         * jit/JIT.h:
1661         * jit/JITCall.cpp:
1662         (JSC::JIT::compileOpCallInitializeCallFrame):
1663         (JSC::JIT::compileOpCallVarargs):
1664         (JSC::JIT::compileOpCall):
1665         * jit/JITCall32_64.cpp:
1666         (JSC::JIT::compileOpCallInitializeCallFrame):
1667         (JSC::JIT::compileOpCallVarargs):
1668         (JSC::JIT::compileOpCall):
1669         (JSC::JIT::compileOpCallSlowCase):
1670         * jit/JITInlineMethods.h:
1671         (JSC::JIT::emitPutToCallFrameHeader):
1672         * jit/JITOpcodes.cpp:
1673         (JSC::JIT::privateCompileCTINativeCall):
1674         (JSC::JIT::emit_op_get_pnames):
1675         (JSC::JIT::emit_op_next_pname):
1676         (JSC::JIT::emit_op_load_varargs):
1677         (JSC::JIT::emitSlow_op_load_varargs):
1678         * jit/JITOpcodes32_64.cpp:
1679         (JSC::JIT::privateCompileCTINativeCall):
1680         (JSC::JIT::emit_op_get_pnames):
1681         (JSC::JIT::emit_op_next_pname):
1682         * jit/JSInterfaceJIT.h:
1683         (JSC::JSInterfaceJIT::payloadFor):
1684         * jit/SpecializedThunkJIT.h:
1685         (JSC::SpecializedThunkJIT::returnJSValue):
1686         (JSC::SpecializedThunkJIT::returnDouble):
1687         (JSC::SpecializedThunkJIT::returnInt32):
1688         (JSC::SpecializedThunkJIT::returnJSCell):
1689         * runtime/ArgList.cpp:
1690         * runtime/DateConversion.cpp:
1691         * runtime/GCActivityCallbackCF.cpp:
1692         * runtime/Identifier.cpp:
1693         * runtime/JSActivation.h:
1694         (JSC::asActivation):
1695         * runtime/JSLock.cpp:
1696         * runtime/JSNumberCell.cpp:
1697         * runtime/JSObject.h:
1698         * runtime/JSPropertyNameIterator.h:
1699         * runtime/JSValue.h:
1700         * runtime/JSZombie.cpp:
1701         * runtime/MarkedBlock.cpp:
1702         * runtime/MarkedSpace.cpp:
1703         * runtime/PropertyNameArray.cpp:
1704         * runtime/ScopeChain.h:
1705         (JSC::ExecState::globalThisValue):
1706         * wtf/DateMath.cpp:
1707
1708 2011-03-11  Oliver Hunt  <oliver@apple.com>
1709
1710         Reviewed by Gavin Barraclough.
1711
1712         Ensure all values are correctly tagged in the registerfile
1713         https://bugs.webkit.org/show_bug.cgi?id=56214
1714
1715         This patch makes sure that all JSCell pointers written to
1716         the registerfile are correctly tagged as JSCells, and replaces
1717         raw int usage with the immediate representation.
1718
1719         For performance, register pressure, and general saneness reasons
1720         I've added abstractions for reading and writing the tag
1721         and payload of integer registers directly for the JSVALUE64
1722         encoding.
1723
1724         * interpreter/Register.h:
1725         (JSC::Register::withInt):
1726         (JSC::Register::withCallee):
1727         (JSC::Register::operator=):
1728         (JSC::Register::i):
1729         (JSC::Register::activation):
1730         (JSC::Register::function):
1731         (JSC::Register::propertyNameIterator):
1732         (JSC::Register::scopeChain):
1733         * jit/JIT.h:
1734         * jit/JITCall.cpp:
1735         (JSC::JIT::compileOpCallInitializeCallFrame):
1736         (JSC::JIT::compileOpCallVarargs):
1737         (JSC::JIT::compileOpCall):
1738         * jit/JITCall32_64.cpp:
1739         (JSC::JIT::compileOpCallInitializeCallFrame):
1740         (JSC::JIT::compileOpCallVarargs):
1741         (JSC::JIT::compileOpCall):
1742         (JSC::JIT::compileOpCallSlowCase):
1743         * jit/JITInlineMethods.h:
1744         (JSC::JIT::emitPutToCallFrameHeader):
1745         (JSC::JIT::emitPutCellToCallFrameHeader):
1746         (JSC::JIT::emitPutIntToCallFrameHeader):
1747         * jit/JITOpcodes.cpp:
1748         (JSC::JIT::privateCompileCTINativeCall):
1749         (JSC::JIT::emit_op_get_pnames):
1750         (JSC::JIT::emit_op_next_pname):
1751         (JSC::JIT::emit_op_load_varargs):
1752         (JSC::JIT::emitSlow_op_load_varargs):
1753         * jit/JITOpcodes32_64.cpp:
1754         (JSC::JIT::privateCompileCTINativeCall):
1755         (JSC::JIT::emit_op_get_pnames):
1756         (JSC::JIT::emit_op_next_pname):
1757         * jit/JSInterfaceJIT.h:
1758         (JSC::JSInterfaceJIT::intPayloadFor):
1759         (JSC::JSInterfaceJIT::intTagFor):
1760         * jit/SpecializedThunkJIT.h:
1761         (JSC::SpecializedThunkJIT::returnJSValue):
1762         (JSC::SpecializedThunkJIT::returnDouble):
1763         (JSC::SpecializedThunkJIT::returnInt32):
1764         (JSC::SpecializedThunkJIT::returnJSCell):
1765
1766 2011-03-11  Dimitri Glazkov  <dglazkov@chromium.org>
1767
1768         Reviewed by Eric Seidel.
1769
1770         Introduce project_dir variable and make paths a whole lot saner. Ok, a little bit saner.
1771         https://bugs.webkit.org/show_bug.cgi?id=56231
1772
1773         * JavaScriptCore.gypi: Added project_dir variable.
1774         * gyp/JavaScriptCore.gyp: Changed to use project_dir, rather than DEPTH/JavaScriptCore.
1775         * gyp/generate-dtrace-header.sh: Changed to use project_dir.
1776
1777 2011-03-11  Dimitri Glazkov  <dglazkov@chromium.org>
1778
1779         Reviewed by Adam Barth.
1780
1781         Start using derived sources correctly and link minidom with JavaScriptCore gyp project.
1782         https://bugs.webkit.org/show_bug.cgi?id=56217
1783
1784         * gyp/JavaScriptCore.gyp: Added derived source files and passing of shared directory
1785             to the scripts.
1786         * gyp/generate-derived-sources.sh: Changed to use passed directory.
1787         * gyp/generate-dtrace-header.sh: Ditto.
1788
1789 2011-03-11  Eric Carlson  <eric.carlson@apple.com>
1790
1791         Reviewed by Sam Weinig.
1792
1793         <rdar://problem/8955589> Adopt AVFoundation media back end on Lion.
1794
1795         No new tests, existing media tests cover this.
1796
1797         * JavaScriptCore.exp: Export cancelCallOnMainThread
1798         * wtf/Platform.h: Define WTF_USE_AVFOUNDATION.
1799
1800 2011-03-11  Dimitri Glazkov  <dglazkov@chromium.org>
1801
1802         Reviewed by Adam Barth.
1803
1804         Tweak dylib paths and add dtrace header generation action to JavaScriptCore gyp project.
1805         https://bugs.webkit.org/show_bug.cgi?id=56207
1806
1807         * JavaScriptCore.gypi: Added Tracing.d to the sources.
1808         * gyp/generate-dtrace-header.sh: Added.
1809         * gyp/JavaScriptCore.gyp: Updated dylib paths (now the project can see them),
1810             and added DTrace header generating step.
1811
1812 2011-03-10  Oliver Hunt  <oliver@apple.com>
1813
1814         Reviewed by Gavin Barraclough.
1815
1816         Fix allocation of native function with a cached thunk
1817         https://bugs.webkit.org/show_bug.cgi?id=56127
1818
1819         Fix this race condition found while fixing zombies.
1820
1821         * collector/handles/HandleHeap.cpp:
1822         (JSC::HandleHeap::clearWeakPointers):
1823         * runtime/Heap.cpp:
1824         (JSC::Heap::reset):
1825         * runtime/JSFunction.cpp:
1826         (JSC::JSFunction::JSFunction):
1827         (JSC::JSFunction::markChildren):
1828         * runtime/JSValue.h:
1829         (JSC::JSValue::decode):
1830         * runtime/JSZombie.cpp:
1831         (JSC::JSZombie::leakedZombieStructure):
1832         * runtime/JSZombie.h:
1833         (JSC::JSZombie::createStructure):
1834         * runtime/MarkedBlock.cpp:
1835
1836 2011-03-10  Luiz Agostini  <luiz.agostini@openbossa.org>
1837
1838         Reviewed by Andreas Kling.
1839
1840         [Qt] fast/workers/stress-js-execution.html is crashing on Qt bot (intermittently)
1841         https://bugs.webkit.org/show_bug.cgi?id=33008
1842
1843         Defining WTF_USE_PTHREAD_BASED_QT=1 for platforms where QThread uses pthread internally.
1844         Symbian is excluded because pthread_kill does not work on it. Mac is excluded because
1845         it has its own ways to do JSC threading.
1846
1847         Defining WTF_USE_PTHREADS inside MachineStackMarker.cpp if USE(PTHREAD_BASED_QT) is true.
1848
1849         * runtime/MachineStackMarker.cpp:
1850         * wtf/Platform.h:
1851
1852 2011-03-10  Gavin Barraclough  <barraclough@apple.com>
1853
1854         Reviewed by Oliver Hunt.
1855
1856         Bug 56077 - ES5 conformance issues with RegExp.prototype
1857
1858         There are three issues causing test failures in sputnik.
1859
1860         (1) lastIndex should be converted at the point it is used, not the point it is set (this is visible if valueOf is overridden).
1861         (2) The 'length' property of the test/exec functions should be 1.
1862         (3) If no input is specified, the input to test()/exec() is "undefined" (i.e. ToString(undefined)) - not RegExp.input.
1863
1864         * runtime/RegExpObject.cpp:
1865         (JSC::RegExpObject::markChildren):
1866             - Added to mark lastIndex
1867         (JSC::regExpObjectLastIndex):
1868         (JSC::setRegExpObjectLastIndex):
1869             - lastIndex is now stored as a JSValue.
1870         (JSC::RegExpObject::match):
1871             - Use accessor methods to get/set lastIndex, add fast case for isUInt32 (don't convert to double).
1872         * runtime/RegExpObject.h:
1873         (JSC::RegExpObject::setLastIndex):
1874         (JSC::RegExpObject::setLastIndex):
1875             - Set lastIndex, either from a size_t or a JSValue.
1876         (JSC::RegExpObject::getLastIndex):
1877             - Get lastIndex.
1878         (JSC::RegExpObject::RegExpObjectData::RegExpObjectData):
1879             - Initialize as a JSValue.
1880         * runtime/RegExpPrototype.cpp:
1881         (JSC::RegExpPrototype::RegExpPrototype):
1882             - Add test/exec properties with length 1.
1883         * runtime/StringPrototype.cpp:
1884         (JSC::stringProtoFuncMatch):
1885         (JSC::stringProtoFuncSearch):
1886             - Do not read RegExp.input if none is provided.
1887         * tests/mozilla/js1_2/regexp/RegExp_input.js:
1888         * tests/mozilla/js1_2/regexp/RegExp_input_as_array.js:
1889             - Update these tests (they relied on non-ES5 behaviour).
1890
1891 2011-03-10  Geoffrey Garen  <ggaren@apple.com>
1892
1893         Reviewed by Oliver Hunt.
1894
1895         Rolled back in 80277 and 80280 with event handler layout test failures fixed.
1896         https://bugs.webkit.org/show_bug.cgi?id=55653        
1897
1898         The failures were caused by a last minute typo: assigning to currentEvent
1899         instead of m_currentEvent.
1900
1901         * JavaScriptCore.exp:
1902         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1903         * JavaScriptCore.xcodeproj/project.pbxproj:
1904         * bytecompiler/BytecodeGenerator.cpp:
1905         * jit/JITOpcodes.cpp:
1906         * jit/JITOpcodes32_64.cpp:
1907         * runtime/Arguments.h:
1908         * runtime/JSActivation.cpp:
1909         * runtime/JSActivation.h:
1910         * runtime/JSCell.h:
1911         * runtime/JSGlobalObject.cpp:
1912         * runtime/JSGlobalObject.h:
1913         * runtime/JSObject.cpp:
1914         * runtime/JSStaticScopeObject.cpp:
1915         * runtime/JSStaticScopeObject.h:
1916         * runtime/JSVariableObject.h:
1917         * runtime/MarkedSpace.cpp:
1918         * runtime/MarkedSpace.h:
1919
1920 2011-03-09  Oliver Hunt  <oliver@apple.com>
1921
1922         Reviewed by Gavin Barraclough.
1923
1924         jquery/manipulation.html fails after r80598
1925         https://bugs.webkit.org/show_bug.cgi?id=56019
1926
1927         When linking a call, codeblock now takes ownership of the linked function
1928         This removes the need for unlinking, and thus the incorrectness that was
1929         showing up in these tests.
1930
1931         * bytecode/CodeBlock.cpp:
1932         (JSC::CodeBlock::~CodeBlock):
1933         (JSC::CodeBlock::markAggregate):
1934         * bytecode/CodeBlock.h:
1935         (JSC::CallLinkInfo::CallLinkInfo):
1936         (JSC::CallLinkInfo::setUnlinked):
1937         (JSC::CodeBlock::addCaller):
1938         * jit/JIT.cpp:
1939         (JSC::JIT::privateCompile):
1940         (JSC::JIT::linkCall):
1941         (JSC::JIT::linkConstruct):
1942         * jit/JIT.h:
1943         * runtime/Executable.cpp:
1944         * runtime/Executable.h:
1945
1946 2011-03-09  Daniel Bates  <dbates@rim.com>
1947
1948         Attempt to fix the WinCE build after changeset 80684 <http://trac.webkit.org/changeset/80684>
1949         (Bug #56041<https://bugs.webkit.org/show_bug.cgi?id=56041>).
1950
1951         * interpreter/Interpreter.cpp:
1952         (JSC::Interpreter::privateExecute): Substitute variable callFrame for exec in call to createSyntaxError().
1953
1954 2011-03-09  Gavin Barraclough  <barraclough@apple.com>
1955
1956         Reviewed by Sam Weinig.
1957
1958         Bug 56041 - RexExp constructor should only accept flags "gim"
1959         Fix for issues introduced in r80667.
1960
1961         Invalid flags to a RegExp literal are a late syntax error!
1962
1963         * bytecode/CodeBlock.h:
1964         (JSC::CodeBlock::addRegExp):
1965             - Pass a PassRefPtr<RegExp>
1966         * bytecompiler/BytecodeGenerator.cpp:
1967         (JSC::BytecodeGenerator::addRegExp):
1968         (JSC::BytecodeGenerator::emitNewRegExp):
1969         * bytecompiler/BytecodeGenerator.h:
1970             - Pass a PassRefPtr<RegExp>
1971         * bytecompiler/NodesCodegen.cpp:
1972         (JSC::RegExpNode::emitBytecode):
1973             - Should not be ASSERTing that the flags are valid - this is a late(er) error.
1974         * interpreter/Interpreter.cpp:
1975         (JSC::Interpreter::privateExecute):
1976             - Need to check for error from RegExp constructor.
1977         * jit/JITStubs.cpp:
1978         (JSC::DEFINE_STUB_FUNCTION):
1979             - Need to check for error from RegExp constructor.
1980         * runtime/RegExp.h:
1981         (JSC::RegExp::isValid):
1982             - Make isValid check that the regexp was created with valid flags.
1983         * runtime/RegExpKey.h:
1984             - Since we'll not create RegExp objects with invalid flags, separate out the deleted value.
1985
1986 2011-03-09  Gavin Barraclough  <barraclough@apple.com>
1987
1988         Windows build fix part 2.
1989
1990         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1991
1992 2011-03-09  Gavin Barraclough  <barraclough@apple.com>
1993
1994         Windows build fix part 1.
1995
1996         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1997
1998 2011-03-09  Gavin Barraclough  <barraclough@apple.com>
1999
2000         Reviewed by Darin Adler.
2001
2002         Bug 56041 - RexExp constructor should only accept flags "gim"
2003         We also should be passing the flags around as a bitfield rather than a string,
2004         and should not have redundant, incompatible code for converting the string to a bitfield!
2005
2006         * JavaScriptCore.exp:
2007         * bytecompiler/NodesCodegen.cpp:
2008         (JSC::RegExpNode::emitBytecode):
2009             - Need to parse flags string to enum.
2010         * runtime/RegExp.cpp:
2011         (JSC::regExpFlags):
2012         (JSC::RegExp::RegExp):
2013         (JSC::RegExp::create):
2014             - Add method to parse flags string to enum, change constructor/create args to take enum.
2015         * runtime/RegExp.h:
2016         (JSC::RegExp::global):
2017         (JSC::RegExp::ignoreCase):
2018         (JSC::RegExp::multiline):
2019             - Change to use new enum values.
2020         * runtime/RegExpCache.cpp:
2021         (JSC::RegExpCache::lookupOrCreate):
2022         (JSC::RegExpCache::create):
2023         * runtime/RegExpCache.h:
2024             - Changed to use regExpFlags enum instead of int/const UString&.
2025         * runtime/RegExpConstructor.cpp:
2026         (JSC::constructRegExp):
2027             - Add use new enum parsing, check for error.
2028         * runtime/RegExpKey.h:
2029         (JSC::RegExpKey::RegExpKey):
2030         * runtime/RegExpPrototype.cpp:
2031         (JSC::RegExpPrototype::RegExpPrototype):
2032             - Pass NoFlags value instead of empty string.
2033         (JSC::regExpProtoFuncCompile):
2034             - Add use new enum parsing, check for error.
2035         * runtime/StringPrototype.cpp:
2036         (JSC::stringProtoFuncMatch):
2037         (JSC::stringProtoFuncSearch):
2038             - Pass NoFlags value instead of empty string.
2039
2040 2011-03-08  Gavin Barraclough  <barraclough@apple.com>
2041
2042         Reviewed by Sam Weinig
2043
2044         Bug 55994 - Functions on Array.prototype should check length first.
2045         These methods are designed to work on generic objects too, and if 'length'
2046         is a getter that throws an exception, ensure this is correctly thrown
2047         (even if other exceptions would be thrown, too).
2048
2049         Make the length check the first thing we do.
2050         This change shows a progression on SunSpider on my machine, but this is likely bogus.
2051
2052         * runtime/ArrayPrototype.cpp:
2053         (JSC::arrayProtoFuncToString):
2054         (JSC::arrayProtoFuncToLocaleString):
2055         (JSC::arrayProtoFuncJoin):
2056         (JSC::arrayProtoFuncPop):
2057         (JSC::arrayProtoFuncPush):
2058         (JSC::arrayProtoFuncReverse):
2059         (JSC::arrayProtoFuncShift):
2060         (JSC::arrayProtoFuncSlice):
2061         (JSC::arrayProtoFuncSort):
2062         (JSC::arrayProtoFuncSplice):
2063         (JSC::arrayProtoFuncUnShift):
2064         (JSC::arrayProtoFuncFilter):
2065         (JSC::arrayProtoFuncMap):
2066         (JSC::arrayProtoFuncEvery):
2067         (JSC::arrayProtoFuncForEach):
2068         (JSC::arrayProtoFuncSome):
2069         (JSC::arrayProtoFuncReduce):
2070         (JSC::arrayProtoFuncReduceRight):
2071         (JSC::arrayProtoFuncIndexOf):
2072         (JSC::arrayProtoFuncLastIndexOf):
2073
2074 2011-03-07  Oliver Hunt  <oliver@apple.com>
2075
2076         Reviewed by Gavin Barraclough.
2077
2078         Make CodeBlock GC write barrier safe
2079         https://bugs.webkit.org/show_bug.cgi?id=55910
2080
2081         In order to make CodeBlock WriteBarrier safe it was necessary
2082         to make it have a single GC owner, and for that reason I have
2083         made ExecutableBase a GC allocated object.  This required
2084         updating their creation routines as well as all sites that hold
2085         a reference to them.  GC objects that held Executable's have been
2086         converted to WriteBarriers, and all other sites now use Global<>.
2087
2088         As an added benefit this gets rid of JSGlobalData's list of
2089         GlobalCodeBlocks.
2090
2091         Perf testing shows a 0.5% progression on v8, vs. a 0.3% regression
2092         on SunSpider.  Given none of the tests that show regressions
2093         demonstrate a regression on their own, and sampling shows up nothing.
2094         I suspect we're just getting one or two additional gc passes at
2095         the end of the run.
2096
2097         * bytecode/CodeBlock.cpp:
2098         (JSC::CodeBlock::dump):
2099         (JSC::CodeBlock::CodeBlock):
2100         (JSC::EvalCodeCache::markAggregate):
2101         (JSC::CodeBlock::markAggregate):
2102         * bytecode/CodeBlock.h:
2103         (JSC::CodeBlock::ownerExecutable):
2104         (JSC::CodeBlock::addConstant):
2105         (JSC::CodeBlock::constantRegister):
2106         (JSC::CodeBlock::getConstant):
2107         (JSC::CodeBlock::addFunctionDecl):
2108         (JSC::CodeBlock::addFunctionExpr):
2109         (JSC::GlobalCodeBlock::GlobalCodeBlock):
2110         (JSC::ExecState::r):
2111         * bytecode/EvalCodeCache.h:
2112         (JSC::EvalCodeCache::get):
2113         * bytecode/SamplingTool.h:
2114         (JSC::ScriptSampleRecord::ScriptSampleRecord):
2115         * bytecompiler/BytecodeGenerator.cpp:
2116         (JSC::BytecodeGenerator::addConstantValue):
2117         (JSC::BytecodeGenerator::emitEqualityOp):
2118         * bytecompiler/BytecodeGenerator.h:
2119         (JSC::BytecodeGenerator::makeFunction):
2120         * debugger/Debugger.cpp:
2121         (JSC::evaluateInGlobalCallFrame):
2122         * debugger/DebuggerCallFrame.cpp:
2123         (JSC::DebuggerCallFrame::evaluate):
2124         * interpreter/Interpreter.cpp:
2125         (JSC::Interpreter::callEval):
2126         * jit/JITInlineMethods.h:
2127         (JSC::JIT::emitLoadDouble):
2128         (JSC::JIT::emitLoadInt32ToDouble):
2129         * jit/JITStubs.cpp:
2130         (JSC::JITThunks::JITThunks):
2131         (JSC::JITThunks::hostFunctionStub):
2132         (JSC::JITThunks::clearHostFunctionStubs):
2133         * jit/JITStubs.h:
2134         * runtime/Completion.cpp:
2135         (JSC::checkSyntax):
2136         (JSC::evaluate):
2137         * runtime/Executable.cpp:
2138         (JSC::EvalExecutable::EvalExecutable):
2139         (JSC::ProgramExecutable::ProgramExecutable):
2140         (JSC::FunctionExecutable::FunctionExecutable):
2141         (JSC::FunctionExecutable::~FunctionExecutable):
2142         (JSC::EvalExecutable::markChildren):
2143         (JSC::ProgramExecutable::markChildren):
2144         (JSC::FunctionExecutable::markChildren):
2145         (JSC::FunctionExecutable::fromGlobalCode):
2146         * runtime/Executable.h:
2147         (JSC::ExecutableBase::ExecutableBase):
2148         (JSC::ExecutableBase::createStructure):
2149         (JSC::NativeExecutable::create):
2150         (JSC::NativeExecutable::NativeExecutable):
2151         (JSC::VPtrHackExecutable::VPtrHackExecutable):
2152         (JSC::ScriptExecutable::ScriptExecutable):
2153         (JSC::EvalExecutable::create):
2154         (JSC::EvalExecutable::createStructure):
2155         (JSC::ProgramExecutable::create):
2156         (JSC::ProgramExecutable::createStructure):
2157         (JSC::FunctionExecutable::create):
2158         (JSC::FunctionExecutable::createStructure):
2159         * runtime/FunctionConstructor.cpp:
2160         (JSC::constructFunction):
2161         * runtime/Heap.cpp:
2162         (JSC::Heap::destroy):
2163         (JSC::Heap::markRoots):
2164         * runtime/Heap.h:
2165         * runtime/JSActivation.cpp:
2166         (JSC::JSActivation::JSActivation):
2167         (JSC::JSActivation::markChildren):
2168         * runtime/JSActivation.h:
2169         (JSC::JSActivation::JSActivationData::JSActivationData):
2170         * runtime/JSCell.h:
2171         * runtime/JSFunction.cpp:
2172         (JSC::JSFunction::JSFunction):
2173         (JSC::JSFunction::~JSFunction):
2174         (JSC::JSFunction::markChildren):
2175         * runtime/JSFunction.h:
2176         * runtime/JSGlobalData.cpp:
2177         (JSC::JSGlobalData::storeVPtrs):
2178         (JSC::JSGlobalData::JSGlobalData):
2179         (JSC::JSGlobalData::getHostFunction):
2180         * runtime/JSGlobalData.h:
2181         * runtime/JSGlobalObjectFunctions.cpp:
2182         (JSC::globalFuncEval):
2183         * runtime/JSObject.cpp:
2184         * runtime/JSStaticScopeObject.cpp:
2185         (JSC::JSStaticScopeObject::markChildren):
2186         * runtime/JSStaticScopeObject.h:
2187         (JSC::JSStaticScopeObject::JSStaticScopeObjectData::JSStaticScopeObjectData):
2188         (JSC::JSStaticScopeObject::JSStaticScopeObject):
2189         * runtime/JSZombie.cpp:
2190         (JSC::JSZombie::leakedZombieStructure):
2191         * runtime/JSZombie.h:
2192         (JSC::JSZombie::createStructure):
2193         * runtime/MarkedSpace.h:
2194
2195 2011-03-07  Andy Estes  <aestes@apple.com>
2196
2197         Reviewed by Dan Bernstein.
2198
2199         REGRESSION (r79060): Timestamp is missing from tweets in twitter.
2200         https://bugs.webkit.org/show_bug.cgi?id=55228
2201
2202         A change to the date parser to handle the case where the year is
2203         specified before the time zone inadvertently started accepting strings
2204         such as '+0000' as valid years. Those strings actually represent time
2205         zones in an offset of hours and minutes from UTC, not years.
2206
2207         * wtf/DateMath.cpp:
2208         (WTF::parseDateFromNullTerminatedCharacters): If the current character
2209         in dateString is '+' or '-', do not try to parse the next token as a
2210         year.
2211
2212 2011-03-06  Yuta Kitamura  <yutak@chromium.org>
2213
2214         Reviewed by Kent Tamura.
2215
2216         Add SHA-1 for new WebSocket protocol
2217         https://bugs.webkit.org/show_bug.cgi?id=55039
2218
2219         The code is based on Chromium's portable SHA-1 implementation
2220         (src/base/sha1_portable.cc). Modifications were made in order
2221         to make the code comply with WebKit coding style.
2222
2223         * GNUmakefile.am:
2224         * JavaScriptCore.exp:
2225         * JavaScriptCore.gypi:
2226         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2227         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2228         * JavaScriptCore.xcodeproj/project.pbxproj:
2229         * wtf/CMakeLists.txt:
2230         * wtf/MD5.cpp:
2231         (WTF::MD5::MD5):
2232         * wtf/SHA1.cpp: Added.
2233         (WTF::testSHA1): This function will be run the first time SHA1
2234         constructor is called. This function computes a few hash values
2235         and checks the results in debug builds. However, constructor is
2236         probably not a good place to run these tests, so we need to find
2237         a good place for it (bug 55853).
2238         (WTF::expectSHA1):
2239         (WTF::f):
2240         (WTF::k):
2241         (WTF::rotateLeft):
2242         (WTF::SHA1::SHA1):
2243         (WTF::SHA1::addBytes):
2244         (WTF::SHA1::computeHash):
2245         (WTF::SHA1::finalize):
2246         (WTF::SHA1::processBlock):
2247         (WTF::SHA1::reset):
2248         * wtf/SHA1.h: Added.
2249         (WTF::SHA1::addBytes):
2250         * wtf/wtf.pri:
2251
2252 2011-03-05  Adam Barth  <abarth@webkit.org>
2253
2254         Reviewed by Dimitri Glazkov.
2255
2256         Add Derived Sources to WebCore GYP build
2257         https://bugs.webkit.org/show_bug.cgi?id=55813
2258
2259         Rename the action to be friendlier.
2260
2261         * gyp/JavaScriptCore.gyp:
2262
2263 2011-03-04  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
2264
2265         Reviewed by Laszlo Gombos.
2266
2267         [Qt] Need symbian version of cryptographicallyRandomValuesFromOS
2268         https://bugs.webkit.org/show_bug.cgi?id=55782
2269
2270         Implement Symbian version of cryptographicallyRandomValuesFromOS
2271
2272         * wtf/OSRandomSource.cpp:
2273         (WTF::cryptographicallyRandomValuesFromOS):
2274
2275 2011-03-04  Gavin Barraclough  <barraclough@apple.com>
2276
2277         Reviewed by Cameron Zwarich.
2278
2279         Bug 55815 - Should throw an exception from JSObject::defineOwnProperty if !isExtensible().
2280
2281         * runtime/JSObject.cpp:
2282         (JSC::JSObject::defineOwnProperty):
2283             Add missing check.
2284
2285 2011-03-04  Gavin Barraclough  <barraclough@apple.com>
2286
2287         Rubber stamped by olliej.
2288
2289         Bug 54945 - The web page hangs towards the end of page load in Interpreter enabled javascript code in the latest webkit trunk.
2290
2291         * interpreter/Interpreter.cpp:
2292         (JSC::Interpreter::privateExecute):
2293             (1) don't infinite loop.
2294             (2) goto 1.
2295
2296 2011-03-04  Gavin Barraclough  <barraclough@apple.com>
2297
2298         cmake build fix.
2299
2300         * CMakeLists.txt:
2301
2302 2011-03-04  Adam Barth  <abarth@webkit.org>
2303
2304         Reviewed by Dimitri Glazkov.
2305
2306         Add Copy Files step to JavaScriptCore GYP build for apitest and minidom
2307         https://bugs.webkit.org/show_bug.cgi?id=55798
2308
2309         * JavaScriptCore.gypi:
2310         * gyp/JavaScriptCore.gyp:
2311
2312 2011-03-04  Adam Barth  <abarth@webkit.org>
2313
2314         Reviewed by Dimitri Glazkov.
2315
2316         Remove unneeded round-trips through ../Source in the Chromium GYP build
2317         https://bugs.webkit.org/show_bug.cgi?id=55795
2318
2319         * JavaScriptCore.gyp/JavaScriptCore.gyp:
2320
2321 2011-03-04  Adam Barth  <abarth@webkit.org>
2322
2323         Reviewed by Dimitri Glazkov.
2324
2325         Use target_defaults to reduce boilerplate in GYP build system
2326         https://bugs.webkit.org/show_bug.cgi?id=55790
2327
2328         Instead of setting up the configuration in each target, just defer to
2329         target_defaults.  Also, removed a define that was redundant with the
2330         xcconfig.
2331
2332         * gyp/JavaScriptCore.gyp:
2333
2334 2011-03-03  Gavin Barraclough  <barraclough@apple.com>
2335
2336         Reviewed by Sam Weinig.
2337
2338         Bug 55736 - Implement seal/freeze/preventExtensions for normal object types.
2339         Provide basic functionallity from section 15.2.4 of ECMA-262.
2340         This support will need expanding to cover arrays, too.
2341
2342         Shows a 0.5% progression on SunSpidey, this seems to be due to changing
2343         ObjectConstructor to use a static table.
2344
2345         * DerivedSources.make:
2346         * JavaScriptCore.exp:
2347         * interpreter/CallFrame.h:
2348         (JSC::ExecState::objectConstructorTable):
2349             Add a static table for ObjectConstructor.
2350         * runtime/CommonIdentifiers.h:
2351         * runtime/JSGlobalData.cpp:
2352         (JSC::JSGlobalData::JSGlobalData):
2353         (JSC::JSGlobalData::~JSGlobalData):
2354             Add a static table for ObjectConstructor.
2355         * runtime/JSGlobalData.h:
2356         * runtime/JSGlobalObject.cpp:
2357         (JSC::JSGlobalObject::reset):
2358             Add a static table for ObjectConstructor.
2359         * runtime/JSObject.cpp:
2360         (JSC::JSObject::seal):
2361         (JSC::JSObject::freeze):
2362         (JSC::JSObject::preventExtensions):
2363             Transition the object's structure.
2364         (JSC::JSObject::defineOwnProperty):
2365             Check isExtensible.
2366         * runtime/JSObject.h:
2367         (JSC::JSObject::isSealed):
2368         (JSC::JSObject::isFrozen):
2369         (JSC::JSObject::isExtensible):
2370             These wrap method on structure.
2371         (JSC::JSObject::putDirectInternal):
2372             Check isExtensible.
2373         * runtime/ObjectConstructor.cpp:
2374         (JSC::ObjectConstructor::ObjectConstructor):
2375         (JSC::ObjectConstructor::getOwnPropertySlot):
2376         (JSC::ObjectConstructor::getOwnPropertyDescriptor):
2377             Change ObjectConstructor to use a static table.
2378         (JSC::objectConstructorSeal):
2379         (JSC::objectConstructorFreeze):
2380         (JSC::objectConstructorPreventExtensions):
2381         (JSC::objectConstructorIsSealed):
2382         (JSC::objectConstructorIsFrozen):
2383         (JSC::objectConstructorIsExtensible):
2384             Add new methods on Object.
2385         * runtime/ObjectConstructor.h:
2386         (JSC::ObjectConstructor::createStructure):
2387         * runtime/Structure.cpp:
2388         (JSC::Structure::Structure):
2389             init/propagate  m_preventExtensions
2390         (JSC::Structure::sealTransition):
2391         (JSC::Structure::freezeTransition):
2392         (JSC::Structure::preventExtensionsTransition):
2393             transition the structure, materializing the property map, setting m_preventExtensions & changing attributes.
2394         (JSC::Structure::isSealed):
2395         (JSC::Structure::isFrozen):
2396             check attributes to detect if object is sealed/frozen.
2397         * runtime/Structure.h:
2398         (JSC::Structure::isExtensible):
2399             checks the m_preventExtensions flag.
2400
2401 2011-03-04  Steve Falkenburg  <sfalken@apple.com>
2402
2403         Reviewed by Jon Honeycutt.
2404
2405         Adopt VersionStamper tool for Windows WebKit DLLs
2406         https://bugs.webkit.org/show_bug.cgi?id=55784
2407         <rdar://problem/9021273>
2408         
2409         We now use a tool to stamp the version number onto the Apple WebKit DLLs
2410         during the post-build step.
2411
2412         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: Removed.
2413         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2414         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd:
2415         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd:
2416
2417 2011-03-04  Adam Barth  <abarth@webkit.org>
2418
2419         Reviewed by Dimitri Glazkov.
2420
2421         JavaScriptCore GYP build should use a header map
2422         https://bugs.webkit.org/show_bug.cgi?id=55712
2423
2424         This patch moves the os-win32 files into their own variable so that we
2425         can use a header map in the Apple Mac Xcode build.  The problem is that
2426         the header map searches the whole project rather than just the files
2427         included in a given target.  Another solution to this problem is to
2428         make GYP smarter about filtering out what files are added to the
2429         project file.
2430
2431         * JavaScriptCore.gypi:
2432         * gyp/JavaScriptCore.gyp:
2433
2434 2011-03-03  Ryosuke Niwa  <rniwa@webkit.org>
2435
2436         Reviewed by Darin Adler.
2437
2438         Remove LOOSE_PASS_OWN_ARRAY_PTR from PassOwnArrayPtr.h
2439         https://bugs.webkit.org/show_bug.cgi?id=55554
2440
2441         * runtime/JSGlobalObject.cpp:
2442         (JSC::JSGlobalObject::copyGlobalsTo): Pass nullptr instead of 0.
2443         (JSC::JSGlobalObject::resizeRegisters): Ditto; also use OwnArrayPtr instead of a raw pointer.
2444         * runtime/JSGlobalObject.h:
2445         (JSC::JSGlobalObject::addStaticGlobals): Ditto.
2446         * wtf/PassOwnArrayPtr.h: Removed #define LOOSE_PASS_OWN_ARRAY_PTR
2447         (WTF::PassOwnArrayPtr::PassOwnArrayPtr): Added a constructor that takes nullptr_t.
2448
2449 2011-03-03  Adam Barth  <abarth@webkit.org>
2450
2451         Reviewed by Dimitri Glazkov.
2452
2453         Add jsc to JavaScriptCore GYP build
2454         https://bugs.webkit.org/show_bug.cgi?id=55711
2455
2456         * JavaScriptCore.gypi:
2457             - Move jsc.cpp into jsc_files because it's really part of the jsc
2458               target.
2459         * JavaScriptCore.xcodeproj/project.pbxproj:
2460             - Remove extraneous files from the normal jsc build.  I probably
2461               added these by mistake at some point.
2462         * gyp/JavaScriptCore.gyp:
2463             - Add the jsc target to the GYP file.
2464
2465 2011-03-03  Adam Barth  <abarth@webkit.org>
2466
2467         Reviewed by Dimitri Glazkov.
2468
2469         Add testapi to JavaScriptCore GYP build
2470         https://bugs.webkit.org/show_bug.cgi?id=55707
2471
2472         The new testapi target is slightly incomplete.  There's a resource
2473         copying step that we don't quite have yet.
2474
2475         This patch also cleans up some of the configuration issues in
2476         JavaScriptCore.xcodeproj.  It seems kind of wordy to repeat these for
2477         each target.  I suspect there's a more compact way of defining the
2478         configurations, but this removes the "Default" configuration, which is
2479         progress.
2480
2481         * JavaScriptCore.gypi:
2482         * gyp/JavaScriptCore.gyp:
2483
2484 2011-03-03  Adam Barth  <abarth@webkit.org>
2485
2486         Reviewed by Eric Seidel.
2487
2488         Teach JavaScriptCore GYP build about private headers
2489         https://bugs.webkit.org/show_bug.cgi?id=55532
2490
2491         This patch distinguishes between public and private framework headers
2492         so that public headers are copied into the Headers directory and
2493         private headers are copied into the PrivateHeaders directory.
2494
2495         * gyp/JavaScriptCore.gyp:
2496
2497 2011-03-03  Geoffrey Garen  <ggaren@apple.com>
2498
2499         Rolled out 80277 and 80280 because they caused event handler layout test
2500         failures.
2501
2502         * JavaScriptCore.exp:
2503         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2504         * JavaScriptCore.xcodeproj/project.pbxproj:
2505         * bytecompiler/BytecodeGenerator.cpp:
2506         * jit/JITOpcodes.cpp:
2507         * jit/JITOpcodes32_64.cpp:
2508         * runtime/Arguments.h:
2509         * runtime/JSActivation.cpp:
2510         * runtime/JSActivation.h:
2511         * runtime/JSCell.h:
2512         * runtime/JSGlobalObject.cpp:
2513         * runtime/JSGlobalObject.h:
2514         * runtime/JSObject.cpp:
2515         * runtime/JSStaticScopeObject.cpp:
2516         * runtime/JSStaticScopeObject.h:
2517         * runtime/JSVariableObject.h:
2518         * runtime/MarkedSpace.cpp:
2519         * runtime/MarkedSpace.h:
2520
2521 2011-03-03  Kevin Ollivier  <kevino@theolliviers.com>
2522
2523         [wx] Build fix. Alter order of headers included to make sure windows.h
2524         is configured by wx, and skip Posix implementation file we don't use on Win.
2525
2526         * wscript:
2527         * wtf/wx/StringWx.cpp:
2528
2529 2011-03-03  Oliver Hunt  <oliver@apple.com>
2530
2531         Reviewed by Geoffrey Garen.
2532
2533         JSVariableObject needs to use WriteBarrier for symboltable property storage
2534         https://bugs.webkit.org/show_bug.cgi?id=55698
2535
2536         Replace the direct usage of Register in JSVariableObject (and descendents)
2537         with WriteBarrier.  This requires updating the Arguments object to use
2538         WriteBarrier as well.
2539
2540         * interpreter/Interpreter.cpp:
2541         (JSC::Interpreter::unwindCallFrame):
2542         (JSC::Interpreter::privateExecute):
2543         (JSC::Interpreter::retrieveArguments):
2544         * jit/JITStubs.cpp:
2545         (JSC::DEFINE_STUB_FUNCTION):
2546         * runtime/ArgList.h:
2547         (JSC::MarkedArgumentBuffer::initialize):
2548         * runtime/Arguments.cpp:
2549         (JSC::Arguments::markChildren):
2550         (JSC::Arguments::copyToRegisters):
2551         (JSC::Arguments::fillArgList):
2552         (JSC::Arguments::getOwnPropertySlot):
2553         (JSC::Arguments::getOwnPropertyDescriptor):
2554         (JSC::Arguments::put):
2555         * runtime/Arguments.h:
2556         (JSC::Arguments::setActivation):
2557         (JSC::Arguments::Arguments):
2558         (JSC::Arguments::copyRegisters):
2559         (JSC::JSActivation::copyRegisters):
2560         * runtime/JSActivation.cpp:
2561         (JSC::JSActivation::markChildren):
2562         (JSC::JSActivation::symbolTableGet):
2563         (JSC::JSActivation::symbolTablePut):
2564         (JSC::JSActivation::symbolTablePutWithAttributes):
2565         (JSC::JSActivation::put):
2566         (JSC::JSActivation::putWithAttributes):
2567         (JSC::JSActivation::argumentsGetter):
2568         * runtime/JSActivation.h:
2569         * runtime/JSGlobalObject.cpp:
2570         (JSC::JSGlobalObject::put):
2571         (JSC::JSGlobalObject::putWithAttributes):
2572         (JSC::JSGlobalObject::markChildren):
2573         (JSC::JSGlobalObject::copyGlobalsFrom):
2574         (JSC::JSGlobalObject::copyGlobalsTo):
2575         (JSC::JSGlobalObject::resizeRegisters):
2576         * runtime/JSGlobalObject.h:
2577         (JSC::JSGlobalObject::setRegisters):
2578         (JSC::JSGlobalObject::addStaticGlobals):
2579         * runtime/JSStaticScopeObject.cpp:
2580         (JSC::JSStaticScopeObject::put):
2581         (JSC::JSStaticScopeObject::putWithAttributes):
2582         * runtime/JSVariableObject.cpp:
2583         (JSC::JSVariableObject::symbolTableGet):
2584         * runtime/JSVariableObject.h:
2585         (JSC::JSVariableObject::registerAt):
2586         (JSC::JSVariableObject::JSVariableObjectData::JSVariableObjectData):
2587         (JSC::JSVariableObject::symbolTableGet):
2588         (JSC::JSVariableObject::symbolTablePut):
2589         (JSC::JSVariableObject::symbolTablePutWithAttributes):
2590         (JSC::JSVariableObject::copyRegisterArray):
2591         (JSC::JSVariableObject::setRegisters):
2592
2593 2011-03-03  Geoffrey Garen  <ggaren@apple.com>
2594
2595         Try to fix Windows build.
2596
2597         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Removed obsolete symbol.
2598
2599         * runtime/JSStaticScopeObject.cpp:
2600         (JSC::JSStaticScopeObject::getOwnPropertySlot): Don't mark this function
2601         inline -- it's virtual.
2602
2603 2011-03-02  Geoffrey Garen  <ggaren@apple.com>
2604
2605         Reviewed by Darin Adler.
2606
2607         Moved all variable object storage inline -- upping the object size limit to 1K
2608         https://bugs.webkit.org/show_bug.cgi?id=55653
2609
2610         * JavaScriptCore.exp:
2611         * bytecompiler/BytecodeGenerator.cpp:
2612         * jit/JITOpcodes.cpp:
2613         * runtime/Arguments.h:
2614         * runtime/JSActivation.h: Removed out-of-line storage. Changed d-> to m_.
2615
2616         * runtime/JSCell.h:
2617         (JSC::JSCell::MarkedSpace::sizeClassFor): Added an imprecise size class
2618         to accomodate objects up to 1K.
2619
2620         * runtime/JSGlobalObject.cpp:
2621         * runtime/JSGlobalObject.h: Removed out-of-line storage. Changed d-> to m_.
2622
2623         * runtime/JSObject.cpp: Don't ASSERT that JSFinalObject fills the maximum
2624         object size, since it doesn't anymore.
2625
2626         * runtime/JSStaticScopeObject.cpp:
2627         * runtime/JSStaticScopeObject.h:
2628         * runtime/JSVariableObject.h: Removed out-of-line storage. Changed d-> to m_.
2629
2630         * runtime/MarkedSpace.cpp:
2631         (JSC::MarkedSpace::MarkedSpace):
2632         (JSC::MarkedSpace::reset):
2633         * runtime/MarkedSpace.h: Added an imprecise size class to accomodate objects up to 1K.
2634
2635 2011-03-03  Timothy Hatcher  <timothy@apple.com>
2636
2637         Make APIShims usable from WebCore.
2638
2639         Reviewed by Oliver Hunt.
2640
2641         * ForwardingHeaders/JavaScriptCore/APIShims.h: Added.
2642         * GNUmakefile.am:
2643         * JavaScriptCore.exp:
2644         * JavaScriptCore.gypi:
2645         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2646         * JavaScriptCore.xcodeproj/project.pbxproj:
2647
2648 2011-03-03  Peter Varga  <pvarga@webkit.org>
2649
2650         Reviewed by Oliver Hunt.
2651
2652         Begin Characters Optimization Causes YARR Interpreter Errors
2653         https://bugs.webkit.org/show_bug.cgi?id=55479
2654
2655         The addBeginTerm function is removed because it doesn't correctly handle those
2656         cases when an "invalid" term has been
2657         collected (e.g. CharacterClass). Move the removed function to the
2658         setupAlternativeBeginTerms method's switch-case
2659         where the non-allowed cases are correctly handled.
2660
2661         Reenable the Beginning Character Optimization in the YARR Interpreter again.
2662
2663         * yarr/YarrPattern.cpp:
2664         (JSC::Yarr::YarrPatternConstructor::setupAlternativeBeginTerms):
2665         (JSC::Yarr::YarrPattern::compile):
2666
2667 2011-03-02  Jessie Berlin  <jberlin@apple.com>
2668
2669         Reviewed by Adam Roben.
2670
2671         WebKit2: Use CFNetwork Sessions API.
2672         https://bugs.webkit.org/show_bug.cgi?id=55435
2673
2674         Add the ability to create a Private Browsing storage session.
2675
2676         * wtf/Platform.h:
2677         Add a new #define for using CF Storage Sessions.
2678
2679 2011-03-02  Oliver Hunt  <oliver@apple.com>
2680
2681         Reviewed by Gavin Barraclough.
2682
2683         Remove "register slot" concept from PropertySlot
2684         https://bugs.webkit.org/show_bug.cgi?id=55621
2685
2686         PropertySlot had already stopped storing Register "slots"
2687         so this patch is simply removing that api entirely.
2688         This exposed a problem in the ProgramNode constructor for
2689         BytecodeGenerator where it reads from the registerfile
2690         before it has initialised it.
2691
2692         This bug wasn't a problem before as we were merely testing
2693         for property existence rather than the actual value, and
2694         used to work because setRegisterSlot didn't check that the
2695         provided slot contained an initialised value.
2696
2697         To get around this issue we now use symbolTableHasProperty
2698         to do the symbol table check without trying to read the
2699         RegisterFile.
2700
2701         * JavaScriptCore.xcodeproj/project.pbxproj:
2702         * bytecompiler/BytecodeGenerator.cpp:
2703         (JSC::BytecodeGenerator::BytecodeGenerator):
2704         * runtime/Arguments.cpp:
2705         (JSC::Arguments::getOwnPropertySlot):
2706         * runtime/JSActivation.cpp:
2707         (JSC::JSActivation::symbolTableGet):
2708         * runtime/JSGlobalObject.h:
2709         (JSC::JSGlobalObject::symbolTableHasProperty):
2710         * runtime/JSVariableObject.h:
2711         (JSC::JSVariableObject::symbolTableGet):
2712         * runtime/PropertySlot.h:
2713
2714 2011-03-02  Daniel Cheng  <dcheng@chromium.org>
2715
2716         Reviewed by David Levin.
2717
2718         Add feature define for data transfer items
2719         https://bugs.webkit.org/show_bug.cgi?id=55510
2720
2721         * Configurations/FeatureDefines.xcconfig:
2722         * wtf/Platform.h:
2723
2724 2011-03-02  Adam Roben  <aroben@apple.com>
2725
2726         Delete old .res files whenever any .vsprops file changes
2727
2728         Prospective fix for <http://webkit.org/b/55599> r80079 caused incremental Windows builds to
2729         fail
2730
2731         Reviewed by Tony Chang.
2732
2733         * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
2734         (main): Restructured code to loop over a set of file extensions, deleting any old files that
2735         have that extension. Now deletes .res files, too. (We previously deleted any file matching
2736         *.manifest*, but that turned out to just be the union of *.manifest and *.res.)
2737
2738 2011-03-02  Adam Barth  <abarth@webkit.org>
2739
2740         Reviewed by Dimitri Glazkov.
2741
2742         Teach JavaScriptCore GYP build how to build minidom
2743         https://bugs.webkit.org/show_bug.cgi?id=55536
2744
2745         * JavaScriptCore.gypi:
2746         * gyp/JavaScriptCore.gyp:
2747
2748 2011-03-01  Adam Barth  <abarth@webkit.org>
2749
2750         Reviewed by Eric Seidel.
2751
2752         JavaScriptCore GYP build should copy some headers into the target framework
2753         https://bugs.webkit.org/show_bug.cgi?id=55524
2754
2755         After this patch, all the framework headers are exported as public
2756         headers.  We need to teach GYP how to handle private headers.
2757
2758         I struggled to determine how to store the information about whether a
2759         header was public, private, or project (i.e., not exported).
2760         Generally, the GYPI should just list the files, but it seemed siliy to
2761         have an almost duplicated list of files in the GYP file itself.  If
2762         this design doesn't scale, we might have to revisit it in the future.
2763
2764         * JavaScriptCore.gyp/JavaScriptCore.gyp:
2765         * JavaScriptCore.gypi:
2766         * gyp/JavaScriptCore.gyp:
2767
2768 2011-03-01  Sheriff Bot  <webkit.review.bot@gmail.com>
2769
2770         Unreviewed, rolling out r80079.
2771         http://trac.webkit.org/changeset/80079
2772         https://bugs.webkit.org/show_bug.cgi?id=55547
2773
2774         "Broke the Win debug build?" (Requested by dcheng on #webkit).
2775
2776         * wtf/Platform.h:
2777
2778 2011-03-01  Daniel Cheng  <dcheng@chromium.org>
2779
2780         Reviewed by David Levin.
2781
2782         Add feature define for data transfer items
2783         https://bugs.webkit.org/show_bug.cgi?id=55510
2784
2785         * wtf/Platform.h:
2786
2787 2011-03-01  Oliver Hunt  <oliver@apple.com>
2788
2789         Reviewed by Joseph Pecoraro.
2790
2791         Misaligned memory access in CloneDeserializer on all ARM arch.
2792         https://bugs.webkit.org/show_bug.cgi?id=48742
2793
2794         Add a CPU class for architectures that need aligned addresses
2795         for memory access.
2796
2797         * wtf/Platform.h:
2798
2799 2011-03-01  Adam Barth  <abarth@webkit.org>
2800
2801         Reviewed by Dimitri Glazkov.
2802
2803         Add pre- and post-build actions for JavaScriptCore GYP build
2804         https://bugs.webkit.org/show_bug.cgi?id=55507
2805
2806         After this patch, we have all the steps for building the main
2807         JavaScriptCore framework except the "copy headers" step, which I'll do
2808         next.
2809
2810         * gyp/JavaScriptCore.gyp:
2811
2812 2011-03-01  Geoffrey Garen  <ggaren@apple.com>
2813
2814         Reviewed by Sam Weinig.
2815
2816         Rolled back in r79627 now that the underlying cause for it crashing is fixed.
2817         https://bugs.webkit.org/show_bug.cgi?id=55159
2818
2819         * JavaScriptCore.exp:
2820         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2821         * JavaScriptCore.xcodeproj/project.pbxproj:
2822         * runtime/Heap.cpp:
2823         (JSC::Heap::allocateSlowCase):
2824         * runtime/Heap.h:
2825         * runtime/JSCell.h:
2826         (JSC::JSCell::MarkedSpace::sizeClassFor):
2827         (JSC::JSCell::Heap::allocate):
2828         (JSC::JSCell::JSCell::operator new):
2829         * runtime/MarkedBlock.h:
2830         * runtime/MarkedSpace.cpp:
2831         (JSC::MarkedSpace::MarkedSpace):
2832         (JSC::MarkedSpace::allocateBlock):
2833         (JSC::MarkedSpace::reset):
2834         * runtime/MarkedSpace.h:
2835         (JSC::MarkedSpace::SizeClass::SizeClass):
2836
2837 2011-03-01  Mark Rowe  <mrowe@apple.com>
2838
2839         Reviewed by Sam Weinig.
2840
2841         Replace two script phases that do nothing but copy files with copy files build phases.
2842
2843         This speeds up the build by a few seconds on high-end Mac Pros.
2844
2845         * JavaScriptCore.xcodeproj/project.pbxproj:
2846
2847 2011-03-01  David Kilzer  <ddkilzer@apple.com>
2848
2849         Spring cleaning!
2850
2851         Rubber-stamped by Mark Rowe.
2852
2853         * JavaScriptCore.xcodeproj/project.pbxproj:
2854         (Copy Into Framework): Remove "set -x" and its comment.
2855
2856 2011-03-01  Michael Saboff  <msaboff@apple.com>
2857
2858         Reviewed by Darin Adler.
2859
2860         TinyMCE not working in nightlies
2861         https://bugs.webkit.org/show_bug.cgi?id=54978
2862
2863         Disabling setupBeginChars() to temporarily work arround the test 
2864         failure.  Filed https://bugs.webkit.org/show_bug.cgi?id=55479
2865         to track fixing the issue.
2866
2867         * yarr/YarrPattern.cpp:
2868         (JSC::Yarr::YarrPattern::compile):
2869
2870 2011-02-23  Joseph Pecoraro  <joepeck@webkit.org>
2871
2872         Reviewed by Kenneth Rohde Christiansen.
2873
2874         Viewport parsing no longer accepts "1.0;" value as valid.
2875         https://bugs.webkit.org/show_bug.cgi?id=53705
2876
2877         Include a didReadNumber parameter to String -> float / double
2878         conversion functions. This way, if the "ok" boolean out
2879         parameter is false, you can check to see if there in fact
2880         was a valid number parsed with garbage at the end. Examples
2881         of that would be parsing "123x456" would have ok = false,
2882         but didReadNumber = true.
2883
2884         * JavaScriptCore.exp:
2885         * wtf/text/StringImpl.cpp:
2886         (WTF::StringImpl::toDouble):
2887         (WTF::StringImpl::toFloat):
2888         * wtf/text/StringImpl.h:
2889         * wtf/text/WTFString.cpp:
2890         (WTF::String::toDouble):
2891         (WTF::String::toFloat):
2892         (WTF::charactersToDouble):
2893         (WTF::charactersToFloat):
2894         * wtf/text/WTFString.h:
2895
2896 2011-02-28  Geoffrey Garen  <ggaren@apple.com>
2897
2898         Reviewed by Gavin Barraclough.
2899
2900         Past-the-end writes in VM exceptions (caused crashes in r79627)
2901         https://bugs.webkit.org/show_bug.cgi?id=55448
2902         
2903         Some exceptions had the wrong structures, so they misoverestimated their
2904         inline storage sizes.
2905
2906         * runtime/JSGlobalData.cpp:
2907         (JSC::JSGlobalData::JSGlobalData): Use the right structure.
2908
2909         * runtime/JSObject.h:
2910         (JSC::JSNonFinalObject::JSNonFinalObject):
2911         (JSC::JSFinalObject::JSFinalObject): ASSERT that our structure capacity
2912         is correct to verify this doesn't happen again.
2913
2914 2011-03-01  Andras Becsi  <abecsi@webkit.org>
2915
2916         Reviewed by Csaba Osztrogonác.
2917
2918         [Qt] Clean up the project files and move common options to WebKit.pri.
2919
2920         * JavaScriptCore.pri: Move options also needed in WebCore into WebKit.pri.
2921         * JavaScriptCore.pro: Deduplicate options.
2922         * jsc.pro: Ditto.
2923
2924 2011-03-01  Adam Barth  <abarth@webkit.org>
2925
2926         Reviewed by Eric Seidel.
2927
2928         Teach JavaScriptCore GYP build about DEPTH
2929         https://bugs.webkit.org/show_bug.cgi?id=55425
2930
2931         In addition to teaching the JavaScriptCore GYP build about DEPTH, this
2932         change overrides the GCC warning configuration to disable a warning
2933         that's causing probems in Assertions.cpp.  With that warning disabled,
2934         JavaScriptCore builds again.
2935
2936         * gyp/JavaScriptCore.gyp:
2937
2938 2011-02-28  Gavin Barraclough  <barraclough@apple.com>
2939
2940         Windows build fix.
2941
2942         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2943
2944 2011-02-28  Sheriff Bot  <webkit.review.bot@gmail.com>
2945
2946         Unreviewed, rolling out r79948.
2947         http://trac.webkit.org/changeset/79948
2948         https://bugs.webkit.org/show_bug.cgi?id=55439
2949
2950         "caused crashes on the SL release bot" (Requested by ggaren on
2951         #webkit).
2952
2953         * runtime/JSGlobalData.h:
2954         * runtime/WriteBarrier.h:
2955
2956 2011-02-28  Gavin Barraclough  <barraclough@apple.com>
2957
2958         Windows build fix.
2959
2960         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2961
2962 2011-02-28  Gavin Barraclough  <barraclough@apple.com>
2963
2964         Reviewed by Sam Weinig & Darin Adler.
2965
2966         Bug 55423 - Clean up property tables in Structure
2967
2968         Encapsulate, reduce duplication of table search code,
2969         and reduce the size of the tables (remove the index,
2970         just maintain the tables in the correct order).
2971
2972         Shows a 0.5% - 1% progression on sunspider.
2973
2974         * JavaScriptCore.exp:
2975         * runtime/PropertyMapHashTable.h:
2976         (JSC::isPowerOf2):
2977         (JSC::nextPowerOf2):
2978             bit ops used to calculate table size.
2979         (JSC::PropertyMapEntry::PropertyMapEntry):
2980         (JSC::PropertyTable::ordered_iterator::operator++):
2981         (JSC::PropertyTable::ordered_iterator::operator==):
2982         (JSC::PropertyTable::ordered_iterator::operator!=):
2983         (JSC::PropertyTable::ordered_iterator::operator*):
2984         (JSC::PropertyTable::ordered_iterator::operator->):
2985         (JSC::PropertyTable::ordered_iterator::ordered_iterator):
2986             implementation of the iterator types
2987         (JSC::PropertyTable::PropertyTable):
2988         (JSC::PropertyTable::~PropertyTable):
2989             constructors take an initial capacity for the table,
2990             a table to copy, or both.
2991         (JSC::PropertyTable::begin):
2992         (JSC::PropertyTable::end):
2993             create in-order iterators.
2994         (JSC::PropertyTable::find):
2995             search the hash table
2996         (JSC::PropertyTable::add):
2997             add a value to the hash table
2998         (JSC::PropertyTable::remove):
2999             remove a value from the hash table
3000         (JSC::PropertyTable::size):
3001         (JSC::PropertyTable::isEmpty):
3002             accessors.
3003         (JSC::PropertyTable::propertyStorageSize):
3004         (JSC::PropertyTable::clearDeletedOffsets):
3005         (JSC::PropertyTable::hasDeletedOffset):
3006         (JSC::PropertyTable::getDeletedOffset):
3007         (JSC::PropertyTable::addDeletedOffset):
3008             cache deleted (available) offsets in the property storage array.
3009         (JSC::PropertyTable::copy):
3010             take a copy of the PropertyTable, potentially expanding the capacity.
3011         (JSC::PropertyTable::sizeInMemory):
3012             used for DEBUG build statistics
3013         (JSC::PropertyTable::reinsert):
3014         (JSC::PropertyTable::rehash):
3015         (JSC::PropertyTable::tableCapacity):
3016         (JSC::PropertyTable::deletedEntryIndex):
3017         (JSC::PropertyTable::skipDeletedEntries):
3018         (JSC::PropertyTable::table):
3019         (JSC::PropertyTable::usedCount):
3020         (JSC::PropertyTable::dataSize):
3021         (JSC::PropertyTable::sizeForCapacity):
3022         (JSC::PropertyTable::canInsert):
3023             these methods provide internal implementation.
3024         * runtime/Structure.cpp:
3025         (JSC::Structure::dumpStatistics):
3026         (JSC::Structure::~Structure):
3027         (JSC::Structure::materializePropertyMap):
3028         (JSC::Structure::despecifyDictionaryFunction):
3029         (JSC::Structure::addPropertyTransition):
3030         (JSC::Structure::flattenDictionaryStructure):
3031         (JSC::Structure::copyPropertyTable):
3032         (JSC::Structure::get):
3033         (JSC::Structure::despecifyFunction):
3034         (JSC::Structure::despecifyAllFunctions):
3035         (JSC::Structure::put):
3036         (JSC::Structure::remove):
3037         (JSC::Structure::createPropertyMap):
3038         (JSC::Structure::getPropertyNames):
3039         (JSC::PropertyTable::checkConsistency):
3040         (JSC::Structure::checkConsistency):
3041             factored out code to PropertyMapHashTable.h
3042         * runtime/Structure.h:
3043         (JSC::Structure::propertyStorageSize):
3044         (JSC::Structure::isEmpty):
3045         (JSC::Structure::get):
3046             factored out code to PropertyMapHashTable.h
3047
3048 2011-02-28  Xan Lopez  <xlopez@igalia.com>
3049
3050         Another fix build :(
3051
3052         Fix typo.
3053
3054         * runtime/MachineStackMarker.cpp:
3055         (JSC::freePlatformThreadRegisters):
3056
3057 2011-02-28  Xan Lopez  <xlopez@igalia.com>
3058
3059         Unreviewed build fix for Snow Leopard.
3060
3061         * runtime/MachineStackMarker.cpp:
3062         (JSC::freePlatformThreadRegisters):
3063
3064 2011-02-28  Alejandro G. Castro  <alex@igalia.com>
3065
3066         Unreviewed, fix SnowLeopard compilation after r79952.
3067
3068         * runtime/MachineStackMarker.cpp:
3069         (JSC::freePlatformThreadRegisters):
3070
3071 2011-02-28  Mark Rowe  <mrowe@apple.com>
3072
3073         Reviewed by Darin Adler.
3074
3075         <http://webkit.org/b/55430> OwnArrayPtr.h's LOOSE_OWN_ARRAY_PTR results in link errors.
3076
3077         * wtf/OwnArrayPtr.h:
3078         (WTF::::set): Implement OwnArrayPtr::set.
3079
3080 2011-02-28  Martin Zoubek  <martin.zoubek@acision.com> and Alejandro G. Castro  <alex@igalia.com>
3081
3082         Reviewed by Martin Robinson.
3083
3084         Multithread support for JSC on UNIX
3085         https://bugs.webkit.org/show_bug.cgi?id=26838
3086
3087         Implement suspendThread() and resumeThread() for systems with
3088         pthread.h using thread signal handler.
3089
3090         * runtime/MachineStackMarker.cpp:
3091         (JSC::pthreadSignalHandlerSuspendResume):
3092         (JSC::MachineStackMarker::Thread::Thread):
3093         (JSC::getCurrentPlatformThread):
3094         (JSC::suspendThread):
3095         (JSC::resumeThread):
3096         (JSC::getPlatformThreadRegisters):
3097         (JSC::otherThreadStackPointer):
3098         (JSC::freePlatformThreadRegisters):
3099         (JSC::MachineStackMarker::markOtherThreadConservatively):
3100         * wtf/Platform.h: Added Gtk port to use
3101         ENABLE_JSC_MULTIPLE_THREADS.
3102
3103 2011-02-28  Oliver Hunt  <oliver@apple.com>
3104
3105         Reviewed by Darin Adler.
3106
3107         Stop using DeprecatedPtr for the global exception slot
3108         https://bugs.webkit.org/show_bug.cgi?id=55424
3109
3110         Create GCRootPtr to signify that the exception slot is
3111         a gcroot, and so is exempt from the usual writebarrier
3112         restrictions.
3113
3114         * runtime/JSGlobalData.h:
3115         * runtime/WriteBarrier.h:
3116         (JSC::GCRootPtr::GCRootPtr):
3117         (JSC::GCRootPtr::operator=):
3118
3119 2011-02-28  Adam Barth  <abarth@webkit.org>
3120
3121         Reviewed by Dimitri Glazkov.
3122
3123         Use more xcconfig files in JavaScriptCore gyp build
3124         https://bugs.webkit.org/show_bug.cgi?id=55391
3125
3126         The GYP experts tell me that we have have a total of two xcconfig
3127         files: one for the xcodeproj as a whole and one for each target.  This
3128         patch uses that technique to re-use the existing xcconfig files and
3129         eliminate the duplication.
3130
3131         Technically, this patch introduces some build errors because the
3132         xcconfig files assume that the xcodeproj file is one level higher in
3133         the directory hierarchy.  Specifically, the xcodeproj file can no
3134         longer find the Info.plist or the prefix header.  I plan to fix that in
3135         a subsequent patch.
3136
3137         Also, this patch introduces the Release and Production configurations,
3138         which should work correctly now.
3139
3140         * gyp/JavaScriptCore.gyp:
3141
3142 2011-02-28  Jon Honeycutt  <jhoneycutt@apple.com>
3143
3144         Windows build fix.
3145
3146         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3147         Add symbol to export.
3148
3149 2011-02-28  Oliver Hunt  <oliver@apple.com>
3150
3151         Reviewed by Gavin Barraclough.
3152
3153         Make ScopeChainNode GC allocated
3154         https://bugs.webkit.org/show_bug.cgi?id=55283
3155
3156         Simplify lifetime and other issues with the scopechain
3157         by making it gc allocated.  This allows us to simplify
3158         function exit and unwinding, as well as making the
3159         current iterative refcounting go away.
3160
3161         * JavaScriptCore.exp:
3162         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3163         * bytecode/CodeBlock.cpp:
3164         (JSC::CodeBlock::createActivation):
3165         * bytecode/StructureStubInfo.cpp:
3166         * bytecompiler/BytecodeGenerator.cpp:
3167         (JSC::BytecodeGenerator::generate):
3168         (JSC::BytecodeGenerator::BytecodeGenerator):
3169         (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
3170         (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
3171         * bytecompiler/BytecodeGenerator.h:
3172         * debugger/Debugger.cpp:
3173         (JSC::Recompiler::operator()):
3174         * debugger/DebuggerCallFrame.h:
3175         (JSC::DebuggerCallFrame::scopeChain):
3176         * interpreter/CachedCall.h:
3177         (JSC::CachedCall::CachedCall):
3178         * interpreter/CallFrame.h:
3179         * interpreter/Interpreter.cpp:
3180         (JSC::depth):
3181         (JSC::Interpreter::unwindCallFrame):
3182         (JSC::Interpreter::throwException):
3183         (JSC::Interpreter::execute):
3184         (JSC::Interpreter::executeCall):
3185         (JSC::Interpreter::executeConstruct):
3186         (JSC::Interpreter::privateExecute):
3187         * jit/JITCall.cpp:
3188         (JSC::JIT::compileOpCallInitializeCallFrame):
3189         (JSC::JIT::compileOpCall):
3190         * jit/JITCall32_64.cpp:
3191         (JSC::JIT::compileOpCallInitializeCallFrame):
3192         (JSC::JIT::emit_op_ret):
3193         (JSC::JIT::emit_op_ret_object_or_this):
3194         (JSC::JIT::compileOpCall):
3195         * jit/JITOpcodes.cpp:
3196         (JSC::JIT::emit_op_end):
3197         (JSC::JIT::emit_op_ret):
3198         (JSC::JIT::emit_op_ret_object_or_this):
3199         * jit/JITOpcodes32_64.cpp:
3200         (JSC::JIT::emit_op_end):
3201         * jit/JITStubs.cpp:
3202         (JSC::DEFINE_STUB_FUNCTION):
3203         * jit/JITStubs.h:
3204         * runtime/ArgList.cpp:
3205         * runtime/Completion.cpp:
3206         (JSC::evaluate):
3207         * runtime/Completion.h:
3208         * runtime/DateConversion.cpp:
3209         * runtime/Executable.cpp:
3210         (JSC::EvalExecutable::compileInternal):
3211         (JSC::ProgramExecutable::compileInternal):
3212         (JSC::FunctionExecutable::compileForCallInternal):
3213         (JSC::FunctionExecutable::compileForConstructInternal):
3214         * runtime/FunctionConstructor.cpp:
3215         (JSC::constructFunction):
3216         * runtime/GCActivityCallbackCF.cpp:
3217         * runtime/Identifier.cpp:
3218         * runtime/JSCell.h:
3219         * runtime/JSChunk.cpp: Added.
3220         * runtime/JSChunk.h: Added.
3221         * runtime/JSFunction.cpp:
3222         (JSC::JSFunction::JSFunction):
3223         (JSC::JSFunction::markChildren):
3224         (JSC::JSFunction::getCallData):
3225         (JSC::JSFunction::getOwnPropertySlot):
3226         (JSC::JSFunction::getConstructData):
3227         * runtime/JSFunction.h:
3228         (JSC::JSFunction::scope):
3229         (JSC::JSFunction::setScope):
3230         * runtime/JSGlobalData.cpp:
3231         (JSC::JSGlobalData::JSGlobalData):
3232         * runtime/JSGlobalData.h:
3233         * runtime/JSGlobalObject.cpp:
3234         (JSC::JSGlobalObject::init):
3235         (JSC::JSGlobalObject::markChildren):
3236         * runtime/JSGlobalObject.h:
3237         (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
3238         (JSC::JSGlobalObject::globalScopeChain):
3239         * runtime/JSGlobalObjectFunctions.cpp:
3240         (JSC::globalFuncEval):
3241         * runtime/JSLock.cpp:
3242         * runtime/JSNumberCell.cpp:
3243         * runtime/JSZombie.cpp:
3244         * runtime/MarkedBlock.cpp:
3245         * runtime/MarkedSpace.cpp:
3246         * runtime/PropertyNameArray.cpp:
3247         * runtime/ScopeChain.cpp:
3248         (JSC::ScopeChainNode::print):
3249         (JSC::ScopeChainNode::localDepth):
3250         (JSC::ScopeChainNode::markChildren):
3251         * runtime/ScopeChain.h:
3252         (JSC::ScopeChainNode::ScopeChainNode):
3253         (JSC::ScopeChainNode::createStructure):
3254         (JSC::ScopeChainNode::push):
3255         (JSC::ScopeChainNode::pop):
3256         (JSC::ScopeChainIterator::ScopeChainIterator):
3257         (JSC::ScopeChainIterator::operator*):
3258         (JSC::ScopeChainIterator::operator->):
3259         (JSC::ScopeChainIterator::operator++):
3260         (JSC::ScopeChainNode::begin):
3261         (JSC::ScopeChainNode::end):
3262         (JSC::ExecState::globalData):
3263         (JSC::ExecState::lexicalGlobalObject):
3264         (JSC::ExecState::globalThisValue):
3265         * runtime/ScopeChainMark.h:
3266         * wtf/DateMath.cpp:
3267
3268 2011-02-27  Adam Barth  <abarth@webkit.org>
3269
3270         Reviewed by Eric Seidel.
3271
3272         Implement WTF::randomNumber in terms of WTF::cryptographicallyRandomNumber when possible
3273         https://bugs.webkit.org/show_bug.cgi?id=55326
3274
3275         Currently, randomNumber does a bunch of platform-specific work that to
3276         get a cryptographic randomness when available.  Instead, we should use
3277         cryptographicallyRandomNumber, which abstracts this work.
3278         Unfortunately, we can't remove all of the WTF::randomNumber
3279         implementation because not every port has access to cryptographically
3280         random numbers.
3281
3282         * wtf/RandomNumber.cpp:
3283         (WTF::randomNumber):
3284
3285 2011-02-27  Benjamin Poulain  <ikipou@gmail.com>
3286
3287         Reviewed by Darin Adler.
3288
3289         Eliminate DeprecatedPtrList from RenderBlock
3290         https://bugs.webkit.org/show_bug.cgi?id=54972
3291
3292         Add methods find() and contains() using an adaptor to ListHashSet.
3293         Those method are like the one of HashSet, they allow to find objects
3294         based on a different key than the one used to define the set.
3295
3296         Add convenience methods for direct access to the head and tail of the list.
3297         Those methods are providing similar API/behavior as Vector.
3298
3299         * wtf/ListHashSet.h:
3300         (WTF::::first):
3301         (WTF::::last):
3302         (WTF::::removeLast):
3303         (WTF::ListHashSetTranslatorAdapter::hash):
3304         (WTF::ListHashSetTranslatorAdapter::equal):
3305         (WTF::::find):
3306         (WTF::::contains):
3307
3308 2011-02-26  Patrick Gansterer  <paroga@webkit.org>
3309
3310         Reviewed by Andreas Kling.
3311
3312         Add support for DragonFly BSD
3313         https://bugs.webkit.org/show_bug.cgi?id=54407
3314
3315         DragonFly BSD is based on FreeBSD, so handle it like FreeBSD.
3316
3317         * wtf/Platform.h:
3318
3319 2011-02-26  Adam Barth  <abarth@webkit.org>
3320
3321         Reviewed by Dimitri Glazkov.
3322
3323         JavaScriptCore should use the xcconfig file instead of importing that information into GYP
3324         https://bugs.webkit.org/show_bug.cgi?id=55282
3325
3326         Technically, this breaks the build because I had removed one of the
3327         warnings in this config file, but this change seems like an
3328         improvement.
3329
3330         * gyp/JavaScriptCore.gyp:
3331
3332 2011-02-26  Thouraya ANDOLSI  <thouraya.andolsi@st.com>
3333
3334         Reviewed by Nikolas Zimmermann.
3335
3336         SH4 JIT SUPPORT
3337         https://bugs.webkit.org/show_bug.cgi?id=44329
3338
3339         Provide an ExecutableAllocater::cacheFlush() implementation for
3340         Linux/SH4.
3341
3342         * jit/ExecutableAllocator.h:
3343         (JSC::ExecutableAllocator::cacheFlush):
3344
3345 2011-02-25  Sheriff Bot  <webkit.review.bot@gmail.com>
3346
3347         Unreviewed, rolling out r79627.
3348         http://trac.webkit.org/changeset/79627
3349         https://bugs.webkit.org/show_bug.cgi?id=55274
3350
3351         broke worker tests (Requested by olliej on #webkit).
3352
3353         * JavaScriptCore.exp:
3354         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3355         * runtime/Heap.cpp:
3356         (JSC::Heap::allocate):
3357         * runtime/Heap.h:
3358         * runtime/JSCell.h:
3359         (JSC::JSCell::JSCell::operator new):
3360         (JSC::JSCell::MarkedSpace::sizeClassFor):
3361         (JSC::JSCell::MarkedSpace::allocate):
3362         * runtime/MarkedBlock.h:
3363         * runtime/MarkedSpace.cpp:
3364         (JSC::MarkedSpace::MarkedSpace):
3365         (JSC::MarkedSpace::allocateBlock):
3366         (JSC::MarkedSpace::reset):
3367         * runtime/MarkedSpace.h:
3368         (JSC::MarkedSpace::SizeClass::SizeClass):
3369
3370 2011-02-25  Michael Saboff  <msaboff@apple.com>
3371
3372         Reviewed by Darin Adler.
3373
3374         Leak in JSParser::Scope of ScopeLabelInfo Vector
3375         https://bugs.webkit.org/show_bug.cgi?id=55249
3376
3377         Changed m_labels to be an OwnPtr<>.  Added VectorTraits
3378         and Scope copy constructor to support this change.
3379
3380         * parser/JSParser.cpp:
3381         (JSC::JSParser::Scope::~Scope):
3382
3383 2011-02-25  Fumitoshi Ukai  <ukai@chromium.org>
3384
3385         Reviewed by Adam Barth.
3386
3387         WebSocket uses insecure random numbers
3388         https://bugs.webkit.org/show_bug.cgi?id=54714
3389
3390         * JavaScriptCore.exp: Export WTF::cryptographicallyRandomNumber()
3391
3392 2011-02-25  Patrick Gansterer  <paroga@webkit.org>
3393
3394         Reviewed by Adam Roben.
3395
3396         Move timeBeginPeriod into OS(WINDOWS) section
3397         https://bugs.webkit.org/show_bug.cgi?id=55247
3398
3399         * jsc.cpp:
3400         (main): timeBeginPeriod is available on all Windows versions and not compiler specific.
3401
3402 2011-02-25  Patrick Gansterer  <paroga@webkit.org>
3403
3404         Unreviewed WinCE build fix for r79695.
3405
3406         * jsc.cpp:
3407         (main): SetErrorMode isn't available on WinCE.
3408
3409 2011-02-25  Adam Roben  <aroben@apple.com>
3410
3411         Work around Cygwin's crash-suppression behavior
3412
3413         Cygwin calls ::SetErrorMode(SEM_FAILCRITICALERRORS), which any processes it launches will
3414         inherit. This is bad for testing/debugging, as it causes the post-mortem debugger not to be
3415         invoked. (Cygwin does this because it makes crashes more UNIX-y.) We reset the error mode
3416         when our test apps launch to work around Cygwin's behavior.
3417
3418         Fixes <http://webkit.org/b/55222> Test apps crash silently (without invoking post-mortem
3419         debugger) when launched from Cygwin 1.7
3420
3421         Reviewed by Darin Adler.
3422
3423         * API/tests/testapi.c: Added a now-needed #include.
3424         (main):
3425         * jsc.cpp:
3426         (main):
3427         Call ::SetErrorMode(0) to undo Cygwin's folly.
3428
3429         * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Define NOMINMAX like many of our
3430         other projects do so that windows.h won't define min/max macros that interfere with
3431         std::numeric_limits<T>::min/max.
3432
3433 2011-02-24  Adam Barth  <abarth@webkit.org>
3434
3435         Reviewed by Eric Seidel.
3436
3437         Add GYP project for JavaScriptCore
3438         https://bugs.webkit.org/show_bug.cgi?id=55027
3439
3440         Again, this GYP files is very rough, but it succeeds in building
3441         JavaScriptCore.  There's a lot more work to do here, especially in the
3442         area of sharing with JavaScriptGlue.gyp.  This patch is more of a
3443         checkpoint so that other folks can help out if they wish.
3444
3445  &nbs