6cdc8e23f98b68b196647fd29ab346c885d0c796
[WebKit-https.git] / Source / JavaScriptCore / ChangeLog
1 2011-11-21  Filip Pizlo  <fpizlo@apple.com>
2         
3         Another attempt at a build fix.
4
5         * dfg/DFGRepatch.h:
6         (JSC::DFG::dfgResetGetByID):
7         (JSC::DFG::dfgResetPutByID):
8
9 2011-11-20  Filip Pizlo  <fpizlo@apple.com>
10
11         Unreviewed interpreter build fix.
12
13         * bytecode/CodeBlock.cpp:
14         (JSC::CodeBlock::finalizeUnconditionally):
15         * dfg/DFGRepatch.h:
16
17 2011-11-20  Yuqiang Xian  <yuqiang.xian@intel.com>
18
19         Improve modulo operation on 32bit platforms
20         https://bugs.webkit.org/show_bug.cgi?id=72501
21
22         Reviewed by Filip Pizlo.
23
24         Extend softModulo to support X86 and MIPS in baseline JIT.
25         Apply the same optimization to 32bit DFG JIT.
26         1% gain on Kraken, tested on Linux Core i7 Nehalem 32bit.
27
28         * dfg/DFGSpeculativeJIT.h:
29         * dfg/DFGSpeculativeJIT32_64.cpp:
30         (JSC::DFG::SpeculativeJIT::compileSoftModulo):
31         (JSC::DFG::SpeculativeJIT::compile):
32         * jit/JITArithmetic32_64.cpp:
33         (JSC::JIT::emit_op_mod):
34         (JSC::JIT::emitSlow_op_mod):
35         * jit/JITOpcodes32_64.cpp:
36         (JSC::JIT::softModulo):
37         * wtf/Platform.h:
38
39 2011-11-18  Filip Pizlo  <fpizlo@apple.com>
40
41         Inline caches that refer to otherwise dead objects should be cleared
42         https://bugs.webkit.org/show_bug.cgi?id=72311
43
44         Reviewed by Geoff Garen.
45
46         DFG code blocks now participate in the weak reference harvester fixpoint
47         so that they only consider themselves to be live if either they are
48         currently executing, or their owner is live and all of their weak references
49         are live. If not, the relevant code blocks are jettisoned.
50
51         Inline caches in both the old JIT and the DFG are now cleared if any of
52         their references are not marked at the end of a GC.
53
54         This is performance-neutral on SunSpider, V8, and Kraken. With the clear-
55         all-code-on-GC policy that we currently have, it shows a slight reduction
56         in memory usage. If we turn that policy off, it's pretty easy to come up
57         with an example program that will cause ToT to experience linear heap
58         growth, while with this patch, the heap stays small and remains at a
59         constant size.
60
61         * assembler/ARMv7Assembler.h:
62         (JSC::ARMv7Assembler::readCallTarget):
63         * assembler/MacroAssemblerARMv7.h:
64         (JSC::MacroAssemblerARMv7::readCallTarget):
65         * assembler/MacroAssemblerX86.h:
66         (JSC::MacroAssemblerX86::readCallTarget):
67         * assembler/MacroAssemblerX86_64.h:
68         (JSC::MacroAssemblerX86_64::readCallTarget):
69         * bytecode/CodeBlock.cpp:
70         (JSC::CodeBlock::visitAggregate):
71         (JSC::CodeBlock::performTracingFixpointIteration):
72         (JSC::CodeBlock::visitWeakReferences):
73         (JSC::CodeBlock::finalizeUnconditionally):
74         (JSC::CodeBlock::stronglyVisitStrongReferences):
75         (JSC::MethodCallLinkInfo::reset):
76         (JSC::ProgramCodeBlock::jettison):
77         (JSC::EvalCodeBlock::jettison):
78         (JSC::FunctionCodeBlock::jettison):
79         * bytecode/CodeBlock.h:
80         (JSC::CodeBlock::reoptimize):
81         (JSC::CodeBlock::shouldImmediatelyAssumeLivenessDuringScan):
82         * bytecode/Instruction.h:
83         (JSC::PolymorphicAccessStructureList::visitWeak):
84         * bytecode/StructureStubInfo.cpp:
85         (JSC::StructureStubInfo::visitWeakReferences):
86         * bytecode/StructureStubInfo.h:
87         (JSC::isGetByIdAccess):
88         (JSC::isPutByIdAccess):
89         (JSC::StructureStubInfo::reset):
90         * dfg/DFGJITCompiler.cpp:
91         (JSC::DFG::JITCompiler::link):
92         * dfg/DFGOperations.cpp:
93         * dfg/DFGRepatch.cpp:
94         (JSC::DFG::dfgRepatchByIdSelfAccess):
95         (JSC::DFG::dfgResetGetByID):
96         (JSC::DFG::dfgResetPutByID):
97         * dfg/DFGRepatch.h:
98         (JSC::DFG::dfgResetGetByID):
99         (JSC::DFG::dfgResetPutByID):
100         * jit/JIT.h:
101         * jit/JITPropertyAccess.cpp:
102         (JSC::JIT::resetPatchGetById):
103         (JSC::JIT::resetPatchPutById):
104         * jit/JITPropertyAccess32_64.cpp:
105         (JSC::JIT::resetPatchGetById):
106         (JSC::JIT::resetPatchPutById):
107         * jit/JITStubs.cpp:
108         (JSC::DEFINE_STUB_FUNCTION):
109         * jit/JITWriteBarrier.h:
110         (JSC::JITWriteBarrierBase::clearToMaxUnsigned):
111
112 2011-11-20  Filip Pizlo  <fpizlo@apple.com>
113
114         Showing the data overlay in OpenStreetMap doesn't work, zooming partially broken
115         https://bugs.webkit.org/show_bug.cgi?id=71505
116
117         Reviewed by Oliver Hunt.
118         
119         The bytecode generator was assuming that call_varargs never reuses the base register
120         (i.e. the function being called) for the result. This is no longer true.
121
122         * bytecompiler/BytecodeGenerator.cpp:
123         (JSC::BytecodeGenerator::emitCallVarargs):
124         * bytecompiler/BytecodeGenerator.h:
125         * bytecompiler/NodesCodegen.cpp:
126         (JSC::ApplyFunctionCallDotNode::emitBytecode):
127
128 2011-11-20  Filip Pizlo  <fpizlo@apple.com>
129
130         DFG 32_64 should directly store double virtual registers on SetLocal
131         https://bugs.webkit.org/show_bug.cgi?id=72845
132
133         Reviewed by Oliver Hunt.
134         
135         2% win on Kraken.
136
137         * dfg/DFGSpeculativeJIT32_64.cpp:
138         (JSC::DFG::SpeculativeJIT::compile):
139
140 2011-11-20  Noel Gordon  <noel.gordon@gmail.com>
141
142         [chromium] Remove DFG::JITCodeGenerator from the gyp projects
143         https://bugs.webkit.org/show_bug.cgi?id=72842
144
145         Reviewed by Filip Pizlo.
146
147         dfg/DFGJITCodeGenerator.{h,cpp} were removed in r100244
148
149         * JavaScriptCore.gypi: remove dfg/DFGJITCodeGenerator.{h,cpp}
150
151 2011-11-18  Daniel Bates  <dbates@rim.com>
152
153         Add CMake build infrastructure for the BlackBerry port
154         https://bugs.webkit.org/show_bug.cgi?id=72768
155
156         Reviewed by Antonio Gomes.
157
158         * PlatformBlackBerry.cmake: Added.
159         * shell/PlatformBlackBerry.cmake: Added.
160         * wtf/PlatformBlackBerry.cmake: Added.
161
162 2011-11-18  Filip Pizlo  <fpizlo@apple.com>
163
164         DFG JIT fails speculation on InstanceOf if the base is not an object
165         https://bugs.webkit.org/show_bug.cgi?id=72709
166
167         Reviewed by Geoff Garen.
168         
169         InstanceOf already leverages the fact that we only allow the default
170         hasInstance implementation. So, if the base is predicted to possibly
171         be not an object and the CFA has not yet proven otherwise, InstanceOf
172         will abstain from speculating cell and instead return false if the
173         base is not a cell.
174         
175         This appears to be a 1% speed-up on V8 on the V8 harness. 3-4% or so
176         speed-up in earley-boyer. Neutral according to bencher on SunSpider,
177         V8, and Kraken. In 32-bit, it's a 0.5% win on SunSpider and a 1.9%
178         win on V8 even on my harness, due to a 12.5% win on earley-boyer.
179         
180         I also took this opportunity to make the code for InstanceOf common
181         between the two JITs. This was partially successful, in that the
182         "common code" has a bunch of #if's, but overall it seems like a code
183         size reduction.
184
185         * dfg/DFGAbstractState.cpp:
186         (JSC::DFG::AbstractState::execute):
187         * dfg/DFGSpeculativeJIT.cpp:
188         (JSC::DFG::SpeculativeJIT::compileInstanceOfForObject):
189         (JSC::DFG::SpeculativeJIT::compileInstanceOf):
190         * dfg/DFGSpeculativeJIT.h:
191         * dfg/DFGSpeculativeJIT32_64.cpp:
192         (JSC::DFG::SpeculativeJIT::compile):
193         * dfg/DFGSpeculativeJIT64.cpp:
194         (JSC::DFG::SpeculativeJIT::compile):
195
196 2011-11-18  Mark Hahnenberg  <mhahnenberg@apple.com>
197
198         Forgot to completely de-virtualize isDynamicScope
199         https://bugs.webkit.org/show_bug.cgi?id=72763
200
201         Reviewed by Darin Adler.
202
203         * runtime/JSActivation.h: Removed virtual keyword.
204
205 2011-11-18  Filip Pizlo  <fpizlo@apple.com>
206
207         Crash in JSC::DFG::OSRExitCompiler::compileExit(JSC::DFG::OSRExit const&, JSC::DFG::SpeculationRecovery*)
208         https://bugs.webkit.org/show_bug.cgi?id=72292
209
210         Reviewed by Darin Adler.
211         
212         Fix this for 32_64.
213
214         * dfg/DFGOSRExitCompiler32_64.cpp:
215         (JSC::DFG::OSRExitCompiler::compileExit):
216
217 2011-11-18  Mark Hahnenberg  <mhahnenberg@apple.com>
218
219         De-virtualize ExecutableBase::intrinsic
220         https://bugs.webkit.org/show_bug.cgi?id=72548
221
222         Reviewed by Oliver Hunt.
223
224         * runtime/Executable.cpp:
225         (JSC::ExecutableBase::intrinsic): Dynamic cast to NativeExecutable. If successful, call intrinsic, otherwise return default value. 
226         * runtime/Executable.h:
227         * runtime/JSCell.h:
228         (JSC::jsDynamicCast): Add jsDynamicCast that duplicates the functionality of dynamic_cast in C++ but uses ClassInfo
229         rather than requiring C++ RTTI.
230
231 2011-11-18  Patrick Gansterer  <paroga@webkit.org>
232
233         [CMake] Remove duplicate dtoa files from CMakeLists.txt
234         https://bugs.webkit.org/show_bug.cgi?id=72711
235
236         Reviewed by Brent Fulgham.
237
238         * wtf/CMakeLists.txt:
239
240 2011-11-17  Michael Saboff  <msaboff@apple.com>
241
242         [Qt] REGRESSION(r100510): Enable 8 Bit Strings in JavaScriptCore
243         https://bugs.webkit.org/show_bug.cgi?id=72602
244
245         Fixed StringImpl::foldCase by adding return in the case we need to handle
246         folding of 8 bit strings with Latin-1 characters.
247
248         Fixed case where StringImpl::replace was using a char temp instead of an
249         LChar temp.
250
251         Because of the second change, I changed other uses of char or
252         unsigned char to LChar.
253
254         Reviewed by Zoltan Herczeg.
255
256         * wtf/text/StringImpl.cpp:
257         (WTF::StringImpl::upper):
258         (WTF::StringImpl::foldCase):
259         (WTF::equal):
260         (WTF::equalIgnoringCase):
261         (WTF::StringImpl::replace):
262
263 2011-11-17  Patrick Gansterer  <paroga@webkit.org>
264
265         [CMake] Move FAST_MALLOC specific lines from Platform*.cmake to CMakeLists.txt
266         https://bugs.webkit.org/show_bug.cgi?id=72644
267
268         Reviewed by Brent Fulgham.
269
270         All ports need to do the same determination about fast malloc. Move the CMake code from
271         platform specific files into the generic one, so that additional ports can reuse it.
272
273         * wtf/CMakeLists.txt:
274         * wtf/PlatformEfl.cmake:
275         * wtf/PlatformWinCE.cmake:
276
277 2011-11-17  Mark Hahnenberg  <mhahnenberg@apple.com>
278
279         Add finalizer to JSActivation
280         https://bugs.webkit.org/show_bug.cgi?id=72575
281
282         Reviewed by Geoffrey Garen.
283
284         * runtime/JSActivation.cpp:
285         (JSC::JSActivation::finishCreation): Attach finalize function to objects during creation.
286         (JSC::JSActivation::finalize):
287         * runtime/JSActivation.h: Replaced virtual destructor with static finalize function.
288
289 2011-11-15  Filip Pizlo  <fpizlo@apple.com>
290
291         Code block jettisoning should be part of the GC's transitive closure
292         https://bugs.webkit.org/show_bug.cgi?id=72467
293
294         Reviewed by Geoff Garen.
295         
296         Replaced JettisonedCodeBlocks with DFGCodeBlocks. The latter knows about all
297         DFG code blocks (i.e. those that may be jettisoned, and may have inlined weak
298         references) and helps track what state each of those code blocks is in during
299         GC. The state consists of two flags; mayBeExecuting, which tells if the code block
300         is live from call frames; and isJettisoned, which tells if the code block is
301         not owned by any executable and thus should be deleted as soon as it is not
302         mayBeExecuting.
303         
304         - Not executing, Not jettisoned: The code block may or may not be reachable from
305           any executables, but it is owned by an executable, and hence should be
306           kept alive if its executable is live and if all of its weak references are
307           live. Otherwise it should be deleted during the current GC cycle, and its
308           outgoing references should not be scanned.
309           
310         - Not executing but jettisoned: The code block should be deleted as soon as
311           possible and none of its outgoing references should be scanned.
312           
313         - Executing but not jettisoned: The code block should be kept alive during this
314           GC cycle, and all of its outgoing references (including the weak ones)
315           should be scanned and marked strongly. The mayBeExecuting bit will be cleared at
316           the end of the GC cycle.
317           
318         - Executing and jettisoned: The code block should be kept alive during this
319           GC cycle, and all of its outgoing references (including the weak ones)
320           should be scanned and marked strongly. However, on the next GC cycle, it
321           will have its mayBeExecuting bit cleared and hence it will become a candidate
322           for immediate deletion provided it is not executing again.
323
324         This is performance-neutral.
325
326         * CMakeLists.txt:
327         * GNUmakefile.list.am:
328         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
329         * JavaScriptCore.xcodeproj/project.pbxproj:
330         * Target.pri:
331         * bytecode/CodeBlock.cpp:
332         (JSC::CodeBlock::~CodeBlock):
333         * bytecode/CodeBlock.h:
334         (JSC::CodeBlock::setJITCode):
335         (JSC::CodeBlock::DFGData::DFGData):
336         (JSC::DFGCodeBlocks::mark):
337         * heap/ConservativeRoots.cpp:
338         (JSC::ConservativeRoots::add):
339         * heap/ConservativeRoots.h:
340         * heap/DFGCodeBlocks.cpp: Added.
341         (JSC::DFGCodeBlocks::DFGCodeBlocks):
342         (JSC::DFGCodeBlocks::~DFGCodeBlocks):
343         (JSC::DFGCodeBlocks::jettison):
344         (JSC::DFGCodeBlocks::clearMarks):
345         (JSC::DFGCodeBlocks::deleteUnmarkedJettisonedCodeBlocks):
346         (JSC::DFGCodeBlocks::traceMarkedCodeBlocks):
347         * heap/DFGCodeBlocks.h: Added.
348         * heap/Heap.cpp:
349         (JSC::Heap::jettisonDFGCodeBlock):
350         (JSC::Heap::markRoots):
351         (JSC::Heap::collect):
352         * heap/Heap.h:
353         * heap/JettisonedCodeBlocks.cpp: Removed.
354         * heap/JettisonedCodeBlocks.h: Removed.
355         * interpreter/RegisterFile.cpp:
356         (JSC::RegisterFile::gatherConservativeRoots):
357         * interpreter/RegisterFile.h:
358         * runtime/Executable.cpp:
359         (JSC::jettisonCodeBlock):
360
361 2011-11-16  Filip Pizlo  <fpizlo@apple.com>
362
363         Unreviewed, build fix for 32-bit.
364
365         * dfg/DFGSpeculativeJIT32_64.cpp:
366         (JSC::DFG::SpeculativeJIT::compile):
367
368 2011-11-16  Geoffrey Garen  <ggaren@apple.com>
369
370         Some CachedCall cleanup, in preparation for reversing argument order.
371
372         Reviewed by Gavin Barraclough.
373
374         * bytecode/CodeBlock.cpp:
375         (JSC::CodeBlock::stronglyVisitWeakReferences): A build fix for the interpreter,
376         so I can test it.
377
378         * interpreter/CachedCall.h:
379         (JSC::CachedCall::CachedCall): Renamed argCount to argumentCount because
380         we are not that desperate for character saving.
381
382         (JSC::CachedCall::setThis):
383         (JSC::CachedCall::setArgument): Adopted new 0-based argument indexing for
384         CallFrameClosure.
385
386         * interpreter/CallFrameClosure.h:
387         (JSC::CallFrameClosure::setThis):
388         (JSC::CallFrameClosure::setArgument):
389         (JSC::CallFrameClosure::resetCallFrame): Provide 0-based argument indexing,
390         with an explicit setter for 'this', since that's how most clients think.
391
392         * interpreter/Interpreter.cpp:
393         (JSC::Interpreter::prepareForRepeatCall):
394         * interpreter/Interpreter.h: Change argCount to argumentCountIncludingThis,
395         for clarity.
396
397 2011-11-16  Mark Hahnenberg  <mhahnenberg@apple.com>
398
399         De-virtualize ScriptExecutable::unlinkCalls
400         https://bugs.webkit.org/show_bug.cgi?id=72546
401
402         Reviewed by Geoffrey Garen.
403
404         * runtime/Executable.cpp:
405         (JSC::FunctionExecutable::~FunctionExecutable): Added an empty explicit virtual destructor to prevent a very odd compilation error
406         due to the fact that the compiler was trying to generate the implicit inline destructor in every translation unit, some of which 
407         didn't have complete type information on the things that needed to be destructed in the implicit destructor.
408         * runtime/Executable.h:
409         (JSC::EvalExecutable::createStructure): Used new type value from JSType
410         (JSC::ProgramExecutable::createStructure): Ditto
411         (JSC::FunctionExecutable::createStructure): Ditto
412         (JSC::ScriptExecutable::unlinkCalls): Condition upon the type value, cast and call the corresponding unlinkCalls implementation.
413         * runtime/JSType.h: Added new values for EvalExecutable, ProgramExecutable, and FunctionExecutable.  Remove explicit numbers, since 
414         that just adds noise to patches and they currently have no significance.
415
416 2011-11-16  Filip Pizlo  <fpizlo@apple.com>
417
418         JSC::CodeBlock should know which references generated by the DFG are weak
419         https://bugs.webkit.org/show_bug.cgi?id=72563
420
421         Reviewed by Geoff Garen.
422         
423         CodeBlock::m_dfgData now tracks weak references and weak reference transitions
424         (like ephemerons) generated by the DFG. The DFG makes sure to notify the
425         CodeBlock of all uses of weak references and weak reference transitions.
426         CodeBlock currently marks them strongly, since the weak marking logic is not
427         in place, yet.
428
429         * bytecode/CodeBlock.cpp:
430         (JSC::CodeBlock::visitAggregate):
431         (JSC::CodeBlock::stronglyVisitWeakReferences):
432         * bytecode/CodeBlock.h:
433         (JSC::CodeBlock::appendWeakReference):
434         (JSC::CodeBlock::shrinkWeakReferencesToFit):
435         (JSC::CodeBlock::appendWeakReferenceTransition):
436         (JSC::CodeBlock::shrinkWeakReferenceTransitionsToFit):
437         (JSC::CodeBlock::WeakReferenceTransition::WeakReferenceTransition):
438         * bytecode/CodeOrigin.h:
439         (JSC::CodeOrigin::codeOriginOwner):
440         * dfg/DFGByteCodeParser.cpp:
441         (JSC::DFG::ByteCodeParser::handleCall):
442         (JSC::DFG::ByteCodeParser::handleInlining):
443         (JSC::DFG::ByteCodeParser::parseBlock):
444         * dfg/DFGJITCompiler.cpp:
445         (JSC::DFG::JITCompiler::link):
446         * dfg/DFGJITCompiler.h:
447         (JSC::DFG::JITCompiler::addWeakReference):
448         (JSC::DFG::JITCompiler::addWeakReferenceTransition):
449         (JSC::DFG::JITCompiler::branchWeakPtr):
450         * dfg/DFGSpeculativeJIT.h:
451         * dfg/DFGSpeculativeJIT32_64.cpp:
452         (JSC::DFG::SpeculativeJIT::compile):
453         * dfg/DFGSpeculativeJIT64.cpp:
454         (JSC::DFG::SpeculativeJIT::fillJSValue):
455         (JSC::DFG::SpeculativeJIT::compile):
456
457 2011-11-16  Michael Saboff  <msaboff@apple.com>
458
459         LayoutTests for Debug Builds Crashes in JavaScriptCore/yarr/YarrInterpreter.cpp(185)
460         https://bugs.webkit.org/show_bug.cgi?id=72561
461
462         Removed #if USE(JSC) and therefore the ASSERT_NOT_REACHED().
463         Simplified the code in the process.
464
465         Reviewed by James Robinson.
466
467         * yarr/YarrInterpreter.cpp:
468         (JSC::Yarr::Interpreter::CharAccess::CharAccess):
469         (JSC::Yarr::Interpreter::CharAccess::~CharAccess):
470
471 2011-11-16  Geoffrey Garen  <ggaren@apple.com>
472
473         Interpreter build fixes.
474
475         * bytecode/CodeBlock.h:
476         * interpreter/Interpreter.cpp:
477         (JSC::Interpreter::privateExecute):
478
479 2011-11-16  Patrick Gansterer  <paroga@webkit.org>
480
481         Unreviewed. Build fix for !ENABLE(JIT) after r100363.
482
483         * bytecode/CodeBlock.h:
484
485 2011-11-16  Geoffrey Garen  <ggaren@apple.com>
486
487         Rolled back in r100375 and r100385 with 32-bit build fixed.
488
489         * dfg/DFGOperations.cpp:
490         * jit/JITStubs.cpp:
491         (JSC::DEFINE_STUB_FUNCTION):
492         * runtime/ArgList.cpp:
493         (JSC::ArgList::getSlice):
494         * runtime/ArgList.h:
495         * runtime/JSArray.cpp:
496         (JSC::JSArray::finishCreation):
497         * runtime/JSArray.h:
498         (JSC::JSArray::create):
499         * runtime/JSGlobalObject.h:
500         (JSC::constructArray):
501
502 2011-11-16  Filip Pizlo  <fpizlo@apple.com>
503
504         DFG global variable CSE mishandles the cross-global-object inlining corner case
505         https://bugs.webkit.org/show_bug.cgi?id=72542
506
507         Reviewed by Geoff Garen.
508         
509         Moved code to get the global object for a code origin into CodeBlock, so it is
510         more broadly accessible. Fixed CSE to compare both the variable number, and the
511         global object, before deciding to perform elimination.
512
513         * bytecode/CodeBlock.h:
514         (JSC::CodeBlock::globalObjectFor):
515         * dfg/DFGAssemblyHelpers.h:
516         (JSC::DFG::AssemblyHelpers::globalObjectFor):
517         * dfg/DFGPropagator.cpp:
518         (JSC::DFG::Propagator::globalVarLoadElimination):
519         (JSC::DFG::Propagator::performNodeCSE):
520
521 2011-11-16  Michael Saboff  <msaboff@apple.com>
522
523         Enable 8 Bit Strings in JavaScriptCore
524         https://bugs.webkit.org/show_bug.cgi?id=71337
525
526         This patch turns on 8 bit strings in StringImpl and enables
527         their use in JavaScriptCore. Some of the changes are to
528         turn on code that had been staged (Lexer.cpp, Identifier.cpp,
529         SmallStrings.cpp and some of StringImpl.{h,cpp}).
530         Other changes are minor fixes to make 8 bit strings work
531         (UString.h, StringImpl::getData16SlowCase()).
532         Changed StringBuffer to be a templated class based on character
533         type.  This change rippled into WebCore code as well.
534
535         Reviewed by Geoffrey Garen.
536
537         * JavaScriptCore.exp:
538         * parser/Lexer.cpp:
539         (JSC::::append8): Changed to use 8 bit buffers.
540         (JSC::::parseIdentifier): Changed to use 8 bit buffers.
541         (JSC::::parseString): Changed to use 8 bit buffers.
542         * runtime/Identifier.cpp:
543         (JSC::IdentifierCStringTranslator::translate): 8 bit version keeps data 8 bit
544         (JSC::Identifier::toUInt32FromCharacters): Templated helper.
545         (JSC::Identifier::toUInt32): Added 8 bit optimized path.
546         * runtime/SmallStrings.cpp:
547         (JSC::SmallStringsStorage::SmallStringsStorage): Changed to be 8 bit strings
548         * runtime/UString.h:
549         (JSC::UString::characters): Now calls StringImpl::characters()
550         * wtf/Forward.h:
551         * wtf/text/StringBuffer.h: Made StringBuffer a template base on character type.
552         (WTF::StringBuffer::StringBuffer):
553         (WTF::StringBuffer::characters):
554         (WTF::StringBuffer::release):
555         * wtf/text/StringImpl.cpp:
556         (WTF::StringImpl::create):
557         (WTF::StringImpl::getData16SlowCase): Fixed null terminated case.
558         (WTF::StringImpl::removeCharacters): Added 8 bit path.
559         (WTF::StringImpl::simplifyMatchedCharactersToSpace):
560         (WTF::StringImpl::simplifyWhiteSpace):
561         (WTF::equal): Removed bug from code copied from null terminated version.
562         (WTF::StringImpl::adopt): Added 8 bit path.
563         (WTF::StringImpl::createWithTerminatingNullCharacter): Fixed 8 bi flag propagation.
564         * wtf/text/StringImpl.h:
565         (WTF::StringImpl::StringImpl): Added new 8 bit constructor.
566         (WTF::StringImpl::characters8): Removed ASSERT_NOT_REACHED().
567         (WTF::getCharacters<LChar>): Added templated accessor for 8 bit strings.
568         (WTF::getCharacters<UChar>): Added templated accessor for 16 bit strings.
569         * wtf/text/WTFString.h:
570         (WTF::String::adopt): Changed to use StringBuffer template.
571
572 2011-11-16  Mark Hahnenberg  <mhahnenberg@apple.com>
573
574         De-virtualize ExecutableBase::clearCodeVirtual
575         https://bugs.webkit.org/show_bug.cgi?id=72337
576
577         Reviewed by Darin Adler.
578
579         Added static finalize functions to the subclasses of ExecutableBase that provide an implementation 
580         of clearCodeVirtual, changed all of the clearCodeVirtual methods to non-virtual clearCode method,
581         and had the finalize functions call the corresponding clearCode methods.
582
583         * runtime/Executable.cpp:
584         (JSC::ExecutableBase::clearCode):
585         (JSC::NativeExecutable::finalize):
586         (JSC::EvalExecutable::finalize):
587         (JSC::EvalExecutable::clearCode):
588         (JSC::ProgramExecutable::finalize):
589         (JSC::ProgramExecutable::clearCode):
590         (JSC::FunctionExecutable::discardCode):
591         (JSC::FunctionExecutable::finalize):
592         (JSC::FunctionExecutable::clearCode):
593         * runtime/Executable.h:
594         (JSC::ExecutableBase::finishCreation):
595         (JSC::NativeExecutable::create):
596         (JSC::EvalExecutable::create):
597         (JSC::ProgramExecutable::create):
598         (JSC::FunctionExecutable::create):
599
600 2011-11-16  Yusuke Suzuki  <utatane.tea@gmail.com>
601
602         String new RegExp('\n').toString() returns is invalid RegularExpressionLiteral
603         https://bugs.webkit.org/show_bug.cgi?id=71572
604
605         Reviewed by Gavin Barraclough and Darin Adler.
606
607         * runtime/RegExpObject.cpp:
608         (JSC::regExpObjectSource):
609
610 2011-11-16  Darin Adler  <darin@apple.com>
611
612         Specialize HashTraits for OwnPtr to use PassOwnPtr and raw pointer
613         https://bugs.webkit.org/show_bug.cgi?id=72475
614
615         Reviewed by Adam Roben.
616
617         * wtf/HashTraits.h: Specialize HashTraits for OwnPtr.
618         Do overloads so we can pass a nullptr and also be sure to get the
619         raw pointer type from the OwnPtr template so we handle both forms
620         of OwnPtr: OwnPtr<T> and OwnPtr<T*>.
621
622 2011-11-16  Simon Hausmann  <simon.hausmann@nokia.com>
623
624         [Qt] Centralize hide_symbols and ensure all libs are built with symbol visibility & bsymbolic_functions
625
626         Reviewed by Tor Arne Vestbø.
627
628         * Target.pri: Eliminate duplicated symbol stuff that lives now in default_post.prf.
629
630 2011-11-16  Simon Hausmann  <simon.hausmann@nokia.com>
631
632         Unreviewed, rolling out r100266.
633         http://trac.webkit.org/changeset/100266
634
635         Broke WTR.
636
637         * Target.pri:
638
639 2011-11-16  Darin Adler  <darin@apple.com>
640
641         Add a "pass type" and "peek type" concept to HashTraits
642         https://bugs.webkit.org/show_bug.cgi?id=72473
643
644         Reviewed by Filip Pizlo.
645
646         * wtf/HashTraits.h: Added the pass type and peek type.
647         For OwnPtr, the pass type will be PassOwnPtr and the peek
648         type will be a raw pointer.
649
650 2011-11-16  Darin Adler  <darin@apple.com>
651
652         Fix some hash traits that don't derive from the base hash traits
653         https://bugs.webkit.org/show_bug.cgi?id=72470
654
655         Reviewed by Filip Pizlo.
656
657         Hash traits structures need to derive from the base hash traits in
658         HashTraits.h, but some were not. This is needed for compatibility with
659         some additional traits we will be adding to make OwnPtr work with HashMap.
660
661         * runtime/Identifier.h: Make IdentifierMapIndexHashTraits derive from
662         HashTraits<int>. This enabled removal of all the members except for the
663         ones that control the empty value, because this is otherwise the same
664         as the standard int hash.
665
666         * runtime/SymbolTable.h: Changed SymbolTableIndexHashTraits to derive
667         from HashTraits<SymbolTableEntry> and removed redundant members.
668
669 2011-11-15  Sheriff Bot  <webkit.review.bot@gmail.com>
670
671         Unreviewed, rolling out r100375 and r100385.
672         http://trac.webkit.org/changeset/100375
673         http://trac.webkit.org/changeset/100385
674         https://bugs.webkit.org/show_bug.cgi?id=72465
675
676         They broke 32 bit builds on Qt (Requested by ossy on #webkit).
677
678         * dfg/DFGOperations.cpp:
679         * jit/JITStubs.cpp:
680         (JSC::DEFINE_STUB_FUNCTION):
681         * runtime/ArgList.cpp:
682         (JSC::ArgList::getSlice):
683         * runtime/ArgList.h:
684         (JSC::ArgList::ArgList):
685         * runtime/JSArray.cpp:
686         * runtime/JSArray.h:
687         * runtime/JSGlobalObject.h:
688
689 2011-11-15  George Staikos  <staikos@webkit.org>
690
691         Remove the guard page from the addressable stack region on QNX.
692         https://bugs.webkit.org/show_bug.cgi?id=72455
693
694         Reviewed by Daniel Bates.
695
696         * wtf/StackBounds.cpp:
697         (WTF::StackBounds::initialize):
698
699 2011-11-15  Michael Saboff  <msaboff@apple.com>
700
701         Towards 8 bit Strings - Update utf8() and ascii() methods for 8 bit strings
702         https://bugs.webkit.org/show_bug.cgi?id=72323
703
704         Added 8 bit optimized paths for String and UString ascii() and utf8() methods.
705
706         Added String::characters8(), characters16() and is8Bit() helper methods.
707
708         Added an new Unicode::convertLatin1ToUTF8() method that works on
709         LChar (8 bit) strings that is a stripped down version of convertUTF16ToUTF8().
710
711         Reviewed by Geoff Garen.
712
713         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
714         * runtime/UString.cpp:
715         (JSC::UString::utf8):
716         * wtf/text/WTFString.cpp:
717         (WTF::String::ascii):
718         (WTF::String::utf8):
719         * wtf/text/WTFString.h:
720         (WTF::String::characters8):
721         (WTF::String::characters16):
722         (WTF::String::is8Bit):
723         (WTF::LChar):
724         (WTF::UChar):
725         * wtf/unicode/UTF8.cpp:
726         (WTF::Unicode::convertLatin1ToUTF8):
727         * wtf/unicode/UTF8.h:
728         * wtf/unicode/Unicode.h:
729
730 2011-11-15  Darin Adler  <darin@apple.com>
731
732         REGRESSION (r98887): ParserArena and Keywords leaking
733         https://bugs.webkit.org/show_bug.cgi?id=72428
734
735         Reviewed by Sam Weinig.
736
737         * parser/Lexer.h: Made Keywords destructor public since OwnPtr and PassOwnPtr
738         need to be able to destroy it.
739
740         * parser/Parser.cpp:
741         (JSC::Parser::Parser): Use get now that parserArena is an OwnPtr.
742
743         * runtime/JSGlobalData.cpp:
744         (JSC::JSGlobalData::JSGlobalData): Use adoptPtr to initialize OwnPtr members.
745
746         * runtime/JSGlobalData.h: Make parserArena and keywords be OwnPtr.
747
748 2011-11-15  Geoffrey Garen  <ggaren@apple.com>
749
750         Removed another use of ArgList that baked in the assumption that arguments
751         are forward in the regiter file.
752
753         Reviewed by Sam Weinig.
754
755         * dfg/DFGOperations.cpp:
756         * jit/JITStubs.cpp:
757         (JSC::DEFINE_STUB_FUNCTION): Use our new array creation API, instead of
758         working through ArgList.
759
760         * runtime/ArgList.h: Removed!
761
762 2011-11-15  Geoffrey Garen  <ggaren@apple.com>
763
764         Removed a use of ArgList that baked in the assumption that arguments
765         are forward in the regiter file.
766
767         Reviewed by Sam Weinig.
768
769         * dfg/DFGOperations.cpp:
770         * jit/JITStubs.cpp:
771         (JSC::DEFINE_STUB_FUNCTION): Use new API.
772
773         * runtime/ArgList.cpp:
774         (JSC::ArgList::getSlice): No need to provide an arbitrary constructor --
775         getSlice can do the right thing by using its rights to private data.
776
777         * runtime/ArgList.h: Removed constructor that took a forward-contiguous
778         set of arguments.
779
780         * runtime/JSArray.cpp:
781         (JSC::JSArray::finishCreation):
782         * runtime/JSArray.h:
783         (JSC::JSArray::create):
784         * runtime/JSGlobalObject.h:
785         (JSC::constructArray): Added explicit support for creating an array from
786         a pre-allocated set of values, so we could stop relying on the ArgList
787         API we want to remove.
788
789 2011-11-15  Filip Pizlo  <fpizlo@apple.com>
790
791         Crash in JSC::DFG::OSRExitCompiler::compileExit(JSC::DFG::OSRExit const&, JSC::DFG::SpeculationRecovery*)
792         https://bugs.webkit.org/show_bug.cgi?id=72292
793
794         Reviewed by Geoff Garen.
795         
796         We need to be careful about how we look for the baseline CodeBlock if we're lazy-compiling
797         an OSR exit after our CodeBlock has been jettisoned. In short, use CodeBlock::baselineVersion()
798         instead of CodeBlock::alternative().
799         
800         No performance effect.
801         
802         No tests because all of our heuristics work very hard to make sure that this never happens in
803         the first place. OSR exits are rare by design, and jettisoning of CodeBlocks (i.e. recompilation)
804         is even rarer. Furthermore, OSR exits after a CodeBlock has been jettisoned is rarer still
805         because the whole point of jettisoning is to bring the probability of future OSR exits to as
806         close to zero as possible. But even that isn't enough to trigger this bug; it requires the OSR
807         exit after a jettison to be the first of its kind; our whole design tries to ensure that
808         CodeBlocks tend to OSR exit at a handful (i.e. 1 in most cases) of points, and since jettisoning
809         is triggered by OSR, in most sane cases the OSR exits after jettison will not require lazy OSR
810         compilation. So this is a truly evil case, and any test for it would be quite fragile.
811
812         * bytecode/CodeBlock.h:
813         (JSC::CodeBlock::specializationKind):
814         (JSC::CodeBlock::largeFailCountThreshold):
815         (JSC::CodeBlock::largeFailCountThresholdForLoop):
816         * dfg/DFGAssemblyHelpers.h:
817         (JSC::DFG::AssemblyHelpers::AssemblyHelpers):
818         (JSC::DFG::AssemblyHelpers::baselineCodeBlockFor):
819         (JSC::DFG::AssemblyHelpers::baselineCodeBlock):
820         * dfg/DFGDriver.cpp:
821         (JSC::DFG::compile):
822         * dfg/DFGOSRExitCompiler.cpp:
823         * dfg/DFGOSRExitCompiler64.cpp:
824         (JSC::DFG::OSRExitCompiler::compileExit):
825
826 2011-11-15  Geoffrey Garen  <ggaren@apple.com>
827
828         Use MarkedArgumentBuffer to avoid making assumptions about argument order
829         https://bugs.webkit.org/show_bug.cgi?id=72418
830
831         Reviewed by Sam Weinig.
832         
833         A step toward reversing the argument order.
834
835         * runtime/JSONObject.cpp:
836         (JSC::Stringifier::toJSON):
837         (JSC::Stringifier::appendStringifiedValue):
838         (JSC::Walker::callReviver): Don't assume that ArgList wants to point
839         at arguments in forward order. Instead, use MarkedArgumentBuffer, which
840         will make the decision for us.
841
842 2011-11-15  Filip Pizlo  <fpizlo@apple.com>
843
844         DFG should distinguish between constants in the constant pool and weak
845         constants added as artifacts of code generation
846         https://bugs.webkit.org/show_bug.cgi?id=72367
847
848         Reviewed by Geoff Garen.
849         
850         Added the notion of a WeakJSConstant, which is like a JSConstant except that
851         it can only refer to JSCell*. Currently all WeakJSConstants are also backed
852         by constants in the constant pool, since weak references originated from
853         machine code are not yet properly handled.
854         
855         Replaced CheckMethod, and MethodCheckData, with a combination of WeakJSConstant
856         and CheckStructure. This results in improved CSE, leading to a 1% win on V8.
857
858         * dfg/DFGAbstractState.cpp:
859         (JSC::DFG::AbstractState::execute):
860         * dfg/DFGByteCodeParser.cpp:
861         (JSC::DFG::ByteCodeParser::cellConstant):
862         (JSC::DFG::ByteCodeParser::prepareToParseBlock):
863         (JSC::DFG::ByteCodeParser::parseBlock):
864         * dfg/DFGGraph.cpp:
865         (JSC::DFG::Graph::dump):
866         * dfg/DFGGraph.h:
867         (JSC::DFG::Graph::getJSConstantPrediction):
868         (JSC::DFG::Graph::valueOfJSConstant):
869         (JSC::DFG::Graph::valueOfInt32Constant):
870         (JSC::DFG::Graph::valueOfNumberConstant):
871         (JSC::DFG::Graph::valueOfBooleanConstant):
872         * dfg/DFGNode.h:
873         (JSC::DFG::Node::isWeakConstant):
874         (JSC::DFG::Node::hasConstant):
875         (JSC::DFG::Node::weakConstant):
876         (JSC::DFG::Node::valueOfJSConstant):
877         (JSC::DFG::Node::isInt32Constant):
878         (JSC::DFG::Node::isDoubleConstant):
879         (JSC::DFG::Node::isNumberConstant):
880         (JSC::DFG::Node::isBooleanConstant):
881         (JSC::DFG::Node::hasIdentifier):
882         * dfg/DFGPropagator.cpp:
883         (JSC::DFG::Propagator::propagateNodePredictions):
884         (JSC::DFG::Propagator::performNodeCSE):
885         * dfg/DFGSpeculativeJIT32_64.cpp:
886         (JSC::DFG::SpeculativeJIT::compile):
887         * dfg/DFGSpeculativeJIT64.cpp:
888         (JSC::DFG::SpeculativeJIT::compile):
889
890 2011-11-15  Michael Saboff  <msaboff@apple.com>
891
892         Towards 8 bit Strings - Initial JS String Tuning
893         https://bugs.webkit.org/show_bug.cgi?id=72326
894
895         Added 8 bit optimized paths for the methods below.
896
897         Reviewed by Geoffrey Garen.
898
899         * runtime/JSString.h:
900         (JSC::jsSubstring8):
901         * runtime/StringPrototype.cpp:
902         (JSC::jsSpliceSubstrings):
903         (JSC::jsSpliceSubstringsWithSeparators):
904         (JSC::stringProtoFuncReplace):
905         (JSC::stringProtoFuncCharCodeAt):
906
907 2011-11-15  Gavin Barraclough  <barraclough@apple.com>
908
909         Result of Error.prototype.toString not ES5 conformant
910         https://bugs.webkit.org/show_bug.cgi?id=70889
911
912         Reviewed by Oliver Hunt.
913
914         * runtime/ErrorPrototype.cpp:
915         (JSC::errorProtoFuncToString):
916
917 2011-11-15  Simon Hausmann  <simon.hausmann@nokia.com>
918
919         [Qt] Centralize hide_symbols and ensure all libs are built with symbol visibility & bsymbolic_functions
920
921         Reviewed by Tor Arne Vestbø.
922
923         * Target.pri: Eliminate duplicated symbol stuff that lives now in default_post.prf.
924
925 2011-11-15  Yuqiang Xian  <yuqiang.xian@intel.com>
926
927         Remove DFGJITCompilerInlineMethods
928         https://bugs.webkit.org/show_bug.cgi?id=72366
929
930         Reviewed by Filip Pizlo.
931
932         Those methods are actually seldom used. Modify the few such places and
933         remove DFGJITCompilerInlineMethods stuffs totally.
934
935         * GNUmakefile.list.am:
936         * JavaScriptCore.xcodeproj/project.pbxproj:
937         * dfg/DFGJITCompiler.h:
938         (JSC::DFG::JITCompiler::addressOfDoubleConstant):
939         * dfg/DFGJITCompilerInlineMethods.h: Removed.
940         * dfg/DFGSpeculativeJIT.cpp:
941         * dfg/DFGSpeculativeJIT.h:
942         (JSC::DFG::SpeculativeJIT::silentFillFPR):
943         * dfg/DFGSpeculativeJIT32_64.cpp:
944         (JSC::DFG::SpeculativeJIT::fillJSValue):
945         (JSC::DFG::SpeculativeJIT::cachedGetMethod):
946
947 2011-11-14  Filip Pizlo  <fpizlo@apple.com>
948
949         DFG::SpeculativeJIT and DFG::JITCodeGenerator should be combined
950         https://bugs.webkit.org/show_bug.cgi?id=72348
951
952         Reviewed by Gavin Barraclough.
953         
954         Moved all of JITCodeGenerator into SpeculativeJIT.
955
956         * CMakeLists.txt:
957         * GNUmakefile.list.am:
958         * JavaScriptCore.xcodeproj/project.pbxproj:
959         * Target.pri:
960         * dfg/DFGJITCodeGenerator.cpp: Removed.
961         * dfg/DFGJITCodeGenerator.h: Removed.
962         * dfg/DFGJITCodeGenerator32_64.cpp: Removed.
963         * dfg/DFGJITCodeGenerator64.cpp: Removed.
964         * dfg/DFGJITCompiler.cpp:
965         * dfg/DFGRepatch.cpp:
966         (JSC::DFG::generateProtoChainAccessStub):
967         (JSC::DFG::tryCacheGetByID):
968         (JSC::DFG::tryCachePutByID):
969         * dfg/DFGSpeculativeJIT.cpp:
970         (JSC::DFG::SpeculativeJIT::clearGenerationInfo):
971         (JSC::DFG::SpeculativeJIT::fillStorage):
972         (JSC::DFG::SpeculativeJIT::useChildren):
973         (JSC::DFG::SpeculativeJIT::isStrictInt32):
974         (JSC::DFG::SpeculativeJIT::isKnownInteger):
975         (JSC::DFG::SpeculativeJIT::isKnownNumeric):
976         (JSC::DFG::SpeculativeJIT::isKnownCell):
977         (JSC::DFG::SpeculativeJIT::isKnownNotCell):
978         (JSC::DFG::SpeculativeJIT::isKnownNotInteger):
979         (JSC::DFG::SpeculativeJIT::isKnownNotNumber):
980         (JSC::DFG::SpeculativeJIT::isKnownBoolean):
981         (JSC::DFG::SpeculativeJIT::writeBarrier):
982         (JSC::DFG::SpeculativeJIT::markCellCard):
983         (JSC::DFG::SpeculativeJIT::nonSpeculativeCompare):
984         (JSC::DFG::SpeculativeJIT::nonSpeculativeStrictEq):
985         (JSC::DFG::dataFormatString):
986         (JSC::DFG::SpeculativeJIT::dump):
987         (JSC::DFG::SpeculativeJIT::checkConsistency):
988         (JSC::DFG::GPRTemporary::GPRTemporary):
989         (JSC::DFG::GPRTemporary::adopt):
990         (JSC::DFG::FPRTemporary::FPRTemporary):
991         * dfg/DFGSpeculativeJIT.h:
992         (JSC::DFG::SpeculativeJIT::at):
993         (JSC::DFG::SpeculativeJIT::lock):
994         (JSC::DFG::SpeculativeJIT::unlock):
995         (JSC::DFG::SpeculativeJIT::canReuse):
996         (JSC::DFG::SpeculativeJIT::reuse):
997         (JSC::DFG::SpeculativeJIT::allocate):
998         (JSC::DFG::SpeculativeJIT::tryAllocate):
999         (JSC::DFG::SpeculativeJIT::fprAllocate):
1000         (JSC::DFG::SpeculativeJIT::isFilled):
1001         (JSC::DFG::SpeculativeJIT::isFilledDouble):
1002         (JSC::DFG::SpeculativeJIT::use):
1003         (JSC::DFG::SpeculativeJIT::selectScratchGPR):
1004         (JSC::DFG::SpeculativeJIT::silentSpillGPR):
1005         (JSC::DFG::SpeculativeJIT::silentSpillFPR):
1006         (JSC::DFG::SpeculativeJIT::silentFillGPR):
1007         (JSC::DFG::SpeculativeJIT::silentFillFPR):
1008         (JSC::DFG::SpeculativeJIT::silentSpillAllRegisters):
1009         (JSC::DFG::SpeculativeJIT::silentFillAllRegisters):
1010         (JSC::DFG::SpeculativeJIT::boxDouble):
1011         (JSC::DFG::SpeculativeJIT::unboxDouble):
1012         (JSC::DFG::SpeculativeJIT::spill):
1013         (JSC::DFG::SpeculativeJIT::isConstant):
1014         (JSC::DFG::SpeculativeJIT::isJSConstant):
1015         (JSC::DFG::SpeculativeJIT::isInt32Constant):
1016         (JSC::DFG::SpeculativeJIT::isDoubleConstant):
1017         (JSC::DFG::SpeculativeJIT::isNumberConstant):
1018         (JSC::DFG::SpeculativeJIT::isBooleanConstant):
1019         (JSC::DFG::SpeculativeJIT::isFunctionConstant):
1020         (JSC::DFG::SpeculativeJIT::valueOfInt32Constant):
1021         (JSC::DFG::SpeculativeJIT::valueOfNumberConstant):
1022         (JSC::DFG::SpeculativeJIT::addressOfDoubleConstant):
1023         (JSC::DFG::SpeculativeJIT::valueOfJSConstant):
1024         (JSC::DFG::SpeculativeJIT::valueOfBooleanConstant):
1025         (JSC::DFG::SpeculativeJIT::valueOfFunctionConstant):
1026         (JSC::DFG::SpeculativeJIT::isNullConstant):
1027         (JSC::DFG::SpeculativeJIT::identifier):
1028         (JSC::DFG::SpeculativeJIT::flushRegisters):
1029         (JSC::DFG::SpeculativeJIT::isFlushed):
1030         (JSC::DFG::SpeculativeJIT::valueOfJSConstantAsImmPtr):
1031         (JSC::DFG::SpeculativeJIT::bitOp):
1032         (JSC::DFG::SpeculativeJIT::shiftOp):
1033         (JSC::DFG::SpeculativeJIT::detectPeepHoleBranch):
1034         (JSC::DFG::SpeculativeJIT::addressOfCallData):
1035         (JSC::DFG::SpeculativeJIT::tagOfCallData):
1036         (JSC::DFG::SpeculativeJIT::payloadOfCallData):
1037         (JSC::DFG::SpeculativeJIT::integerResult):
1038         (JSC::DFG::SpeculativeJIT::noResult):
1039         (JSC::DFG::SpeculativeJIT::cellResult):
1040         (JSC::DFG::SpeculativeJIT::booleanResult):
1041         (JSC::DFG::SpeculativeJIT::jsValueResult):
1042         (JSC::DFG::SpeculativeJIT::storageResult):
1043         (JSC::DFG::SpeculativeJIT::doubleResult):
1044         (JSC::DFG::SpeculativeJIT::initConstantInfo):
1045         (JSC::DFG::SpeculativeJIT::resetCallArguments):
1046         (JSC::DFG::SpeculativeJIT::addCallArgument):
1047         (JSC::DFG::SpeculativeJIT::setupArguments):
1048         (JSC::DFG::SpeculativeJIT::setupArgumentsExecState):
1049         (JSC::DFG::SpeculativeJIT::setupArgumentsWithExecState):
1050         (JSC::DFG::SpeculativeJIT::setupTwoStubArgs):
1051         (JSC::DFG::SpeculativeJIT::setupStubArguments):
1052         (JSC::DFG::SpeculativeJIT::callOperation):
1053         (JSC::DFG::SpeculativeJIT::appendCallWithExceptionCheck):
1054         (JSC::DFG::SpeculativeJIT::appendCallWithExceptionCheckSetResult):
1055         (JSC::DFG::SpeculativeJIT::setupResults):
1056         (JSC::DFG::SpeculativeJIT::appendCallSetResult):
1057         (JSC::DFG::SpeculativeJIT::addBranch):
1058         (JSC::DFG::SpeculativeJIT::linkBranches):
1059         (JSC::DFG::SpeculativeJIT::block):
1060         (JSC::DFG::SpeculativeJIT::checkConsistency):
1061         (JSC::DFG::SpeculativeJIT::BranchRecord::BranchRecord):
1062         (JSC::DFG::IntegerOperand::IntegerOperand):
1063         (JSC::DFG::IntegerOperand::~IntegerOperand):
1064         (JSC::DFG::IntegerOperand::index):
1065         (JSC::DFG::IntegerOperand::format):
1066         (JSC::DFG::IntegerOperand::gpr):
1067         (JSC::DFG::IntegerOperand::use):
1068         (JSC::DFG::DoubleOperand::DoubleOperand):
1069         (JSC::DFG::DoubleOperand::~DoubleOperand):
1070         (JSC::DFG::DoubleOperand::index):
1071         (JSC::DFG::DoubleOperand::fpr):
1072         (JSC::DFG::DoubleOperand::use):
1073         (JSC::DFG::JSValueOperand::JSValueOperand):
1074         (JSC::DFG::JSValueOperand::~JSValueOperand):
1075         (JSC::DFG::JSValueOperand::index):
1076         (JSC::DFG::JSValueOperand::gpr):
1077         (JSC::DFG::JSValueOperand::jsValueRegs):
1078         (JSC::DFG::JSValueOperand::isDouble):
1079         (JSC::DFG::JSValueOperand::fill):
1080         (JSC::DFG::JSValueOperand::tagGPR):
1081         (JSC::DFG::JSValueOperand::payloadGPR):
1082         (JSC::DFG::JSValueOperand::fpr):
1083         (JSC::DFG::JSValueOperand::use):
1084         (JSC::DFG::StorageOperand::StorageOperand):
1085         (JSC::DFG::StorageOperand::~StorageOperand):
1086         (JSC::DFG::StorageOperand::index):
1087         (JSC::DFG::StorageOperand::gpr):
1088         (JSC::DFG::StorageOperand::use):
1089         (JSC::DFG::GPRTemporary::~GPRTemporary):
1090         (JSC::DFG::GPRTemporary::gpr):
1091         (JSC::DFG::FPRTemporary::~FPRTemporary):
1092         (JSC::DFG::FPRTemporary::fpr):
1093         (JSC::DFG::FPRTemporary::FPRTemporary):
1094         (JSC::DFG::GPRResult::GPRResult):
1095         (JSC::DFG::GPRResult2::GPRResult2):
1096         (JSC::DFG::FPRResult::FPRResult):
1097         (JSC::DFG::FPRResult::lockedResult):
1098         (JSC::DFG::SpeculativeJIT::SpeculativeJIT):
1099         * dfg/DFGSpeculativeJIT32_64.cpp:
1100         (JSC::DFG::SpeculativeJIT::fillInteger):
1101         (JSC::DFG::SpeculativeJIT::fillDouble):
1102         (JSC::DFG::SpeculativeJIT::fillJSValue):
1103         (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToNumber):
1104         (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToInt32):
1105         (JSC::DFG::SpeculativeJIT::nonSpeculativeUInt32ToNumber):
1106         (JSC::DFG::SpeculativeJIT::nonSpeculativeKnownConstantArithOp):
1107         (JSC::DFG::SpeculativeJIT::nonSpeculativeBasicArithOp):
1108         (JSC::DFG::SpeculativeJIT::cachedGetById):
1109         (JSC::DFG::SpeculativeJIT::cachedPutById):
1110         (JSC::DFG::SpeculativeJIT::cachedGetMethod):
1111         (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
1112         (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
1113         (JSC::DFG::SpeculativeJIT::nonSpeculativeCompareNull):
1114         (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
1115         (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
1116         (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeStrictEq):
1117         (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq):
1118         (JSC::DFG::SpeculativeJIT::emitCall):
1119         * dfg/DFGSpeculativeJIT64.cpp:
1120         (JSC::DFG::SpeculativeJIT::fillInteger):
1121         (JSC::DFG::SpeculativeJIT::fillDouble):
1122         (JSC::DFG::SpeculativeJIT::fillJSValue):
1123         (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToNumber):
1124         (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToInt32):
1125         (JSC::DFG::SpeculativeJIT::nonSpeculativeUInt32ToNumber):
1126         (JSC::DFG::SpeculativeJIT::nonSpeculativeKnownConstantArithOp):
1127         (JSC::DFG::SpeculativeJIT::nonSpeculativeBasicArithOp):
1128         (JSC::DFG::SpeculativeJIT::cachedGetById):
1129         (JSC::DFG::SpeculativeJIT::cachedPutById):
1130         (JSC::DFG::SpeculativeJIT::cachedGetMethod):
1131         (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
1132         (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
1133         (JSC::DFG::SpeculativeJIT::nonSpeculativeCompareNull):
1134         (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
1135         (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
1136         (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeStrictEq):
1137         (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq):
1138         (JSC::DFG::SpeculativeJIT::emitCall):
1139         * runtime/JSFunction.h:
1140
1141 2011-11-14  Filip Pizlo  <fpizlo@apple.com>
1142
1143         Weak reference harvesters should run to fixpoint
1144         https://bugs.webkit.org/show_bug.cgi?id=72346
1145
1146         Reviewed by Oliver Hunt.
1147
1148         * heap/Heap.cpp:
1149         (JSC::Heap::markRoots):
1150         * heap/ListableHandler.h:
1151         (JSC::ListableHandler::next):
1152         (JSC::ListableHandler::List::head):
1153         (JSC::ListableHandler::List::removeNext):
1154         (JSC::ListableHandler::List::removeAll):
1155         * heap/MarkStack.cpp:
1156         (JSC::MarkStackThreadSharedData::reset):
1157         (JSC::SlotVisitor::harvestWeakReferences):
1158         * heap/MarkStack.h:
1159         (JSC::MarkStack::isEmpty):
1160
1161 2011-11-14  Oliver Hunt  <oliver@apple.com>
1162
1163         Start migrating typed array impl types to WTF
1164         https://bugs.webkit.org/show_bug.cgi?id=72336
1165
1166         Reviewed by Geoffrey Garen.
1167
1168         Add typed array impls to WTF forwarding header.
1169
1170         * wtf/Forward.h:
1171
1172 2011-11-14  Julien Chaffraix  <jchaffraix@webkit.org>
1173
1174         Add --css-grid-layout to build-webkit and the build systems
1175         https://bugs.webkit.org/show_bug.cgi?id=72320
1176
1177         Reviewed by Ojan Vafai.
1178
1179         * Configurations/FeatureDefines.xcconfig:
1180
1181 2011-11-14  Geoffrey Garen  <ggaren@apple.com>
1182
1183         A little bit of arguments / activation cleanup
1184         https://bugs.webkit.org/show_bug.cgi?id=72339
1185
1186         Reviewed by Gavin Barraclough.
1187         
1188         Renamed copyRegisters => tearOff to match bytecode and other terminology.
1189         
1190         Renamed setActivation => didTearOffActivation to indicate that this is a
1191         notification the object may choose to ignore. Moved "Should I ignore?"
1192         code into the arguments object to avoid duplication elsewhere.
1193
1194         * interpreter/Interpreter.cpp:
1195         (JSC::Interpreter::unwindCallFrame):
1196         (JSC::Interpreter::privateExecute):
1197         (JSC::Interpreter::retrieveArguments):
1198         * jit/JITStubs.cpp:
1199         (JSC::DEFINE_STUB_FUNCTION):
1200         * runtime/Arguments.h:
1201         (JSC::Arguments::createAndTearOff):
1202         (JSC::Arguments::didTearOffActivation):
1203         (JSC::Arguments::finishCreationButDontTearOff):
1204         (JSC::Arguments::finishCreation):
1205         (JSC::Arguments::finishCreationAndTearOff):
1206         (JSC::Arguments::tearOff):
1207
1208         * runtime/JSActivation.h:
1209         (JSC::JSActivation::tearOff): Moved Activation's code into its own header
1210         because that's where it belongs.
1211
1212 2011-11-14  Gavin Barraclough  <barraclough@apple.com>
1213
1214         Should sign the jsc binary
1215         https://bugs.webkit.org/show_bug.cgi?id=72332
1216
1217         Reviewed by David Kilzer.
1218
1219         * Configurations/JSC.xcconfig:
1220         * entitlements.plist: Added.
1221
1222 2011-11-14  Filip Pizlo  <fpizlo@apple.com>
1223
1224         DFG's inline references to objects should be tracked
1225         https://bugs.webkit.org/show_bug.cgi?id=72313
1226
1227         Reviewed by Gavin Barraclough.
1228         
1229         Added a pinCell() method in the parser that currently creates a
1230         dummy constant in CodeBlock. Added calls to pinCell() wherever the
1231         DFG would inline a constant reference that the original code would
1232         not have referred to.
1233         
1234         * dfg/DFGByteCodeParser.cpp:
1235         (JSC::DFG::ByteCodeParser::getCellConstantIndex):
1236         (JSC::DFG::ByteCodeParser::pinCell):
1237         (JSC::DFG::ByteCodeParser::cellConstant):
1238         (JSC::DFG::ByteCodeParser::handleCall):
1239         (JSC::DFG::ByteCodeParser::handleInlining):
1240         (JSC::DFG::ByteCodeParser::parseBlock):
1241
1242 2011-11-14  Filip Pizlo  <fpizlo@apple.com>
1243
1244         DFG put_by_id transition optimizations test the wrong structures
1245         https://bugs.webkit.org/show_bug.cgi?id=72324
1246
1247         Reviewed by Gavin Barraclough.
1248
1249         * dfg/DFGByteCodeParser.cpp:
1250         (JSC::DFG::ByteCodeParser::structureChainIsStillValid):
1251         (JSC::DFG::ByteCodeParser::parseBlock):
1252         * jit/JITPropertyAccess.cpp:
1253         (JSC::JIT::privateCompilePutByIdTransition):
1254
1255 2011-11-14  Michael Saboff  <msaboff@apple.com>
1256
1257         Further changes and cleanup to JSString.h and cpp.
1258
1259         Reviewed by Darin Adler.
1260
1261         * runtime/JSString.cpp:
1262         (JSC::JSString::resolveRope): Change PassRefPtr to RefPtr.  Eliminated exec in slow case calls.
1263         (JSC::JSString::resolveRopeSlowCase8): Darin and I agreed that this should have 8 in name.
1264         (JSC::JSString::resolveRopeSlowCase): Removed exec parameter.
1265         * runtime/JSString.h:
1266
1267 2011-11-14  Adam Barth  <abarth@webkit.org>
1268
1269         DateMath.cpp should not depend on JavaScriptCore
1270         https://bugs.webkit.org/show_bug.cgi?id=71747
1271
1272         Reviewed by Darin Adler.
1273
1274         This patch moves the JSC-specific parts of DateMath into JSDateMath in
1275         JavaScriptCore.  There shouldn't be any behavior change.
1276
1277         * CMakeLists.txt:
1278         * GNUmakefile.list.am:
1279         * JavaScriptCore.gypi:
1280         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1281         * JavaScriptCore.xcodeproj/project.pbxproj:
1282         * Target.pri:
1283         * runtime/DateConstructor.cpp:
1284         * runtime/DateConversion.cpp:
1285         * runtime/DateInstance.cpp:
1286         * runtime/DateInstanceCache.h:
1287         * runtime/DatePrototype.cpp:
1288         * runtime/InitializeThreading.cpp:
1289         * runtime/JSDateMath.cpp: Copied from Source/JavaScriptCore/wtf/DateMath.cpp.
1290         (JSC::timeToMS):
1291         (JSC::msToSeconds):
1292         * runtime/JSDateMath.h: Copied from Source/JavaScriptCore/wtf/DateMath.h.
1293         * wtf/DateMath.cpp:
1294         (WTF::isLeapYear):
1295         (WTF::msToDays):
1296         (WTF::msToMinutes):
1297         (WTF::msToHours):
1298         (WTF::parseDateFromNullTerminatedCharacters):
1299         (WTF::makeRFC2822DateString):
1300         * wtf/DateMath.h:
1301
1302 2011-11-14  Michael Saboff  <msaboff@apple.com>
1303
1304         Towards 8 bit strings - Add 8 bit handling to JSString Ropes
1305         https://bugs.webkit.org/show_bug.cgi?id=72317
1306
1307         Added bit to track that a rope is made up of all 8 bit fibers.
1308         Created an 8 bit path (fast and slow cases) to handle 8 bit 
1309         only ropes.
1310
1311         Reviewed by Oliver Hunt.
1312
1313         * runtime/JSString.cpp:
1314         (JSC::JSString::resolveRope):
1315         (JSC::JSString::resolveRopeSlowCase8):
1316         (JSC::JSString::resolveRopeSlowCase16):
1317         * runtime/JSString.h:
1318         (JSC::RopeBuilder::finishCreation):
1319         (JSC::RopeBuilder::is8Bit):
1320         (JSC::jsSubstring8):
1321
1322 2011-11-14  Geoffrey Garen  <ggaren@apple.com>
1323
1324         A little bit of function call cleanup
1325         https://bugs.webkit.org/show_bug.cgi?id=72314
1326
1327         Reviewed by Oliver Hunt.
1328
1329         * bytecompiler/BytecodeGenerator.cpp:
1330         (JSC::BytecodeGenerator::emitCall): Renamed callFrame to registerOffset
1331         because this value doesn't give you the offset of the callee's call frame.
1332
1333         (JSC::BytecodeGenerator::emitReturn): Tightened to use equality instead
1334         of greater-than. Removed comment since its reasoning was wrong.
1335         
1336         (JSC::BytecodeGenerator::emitConstruct): Updated for rename mentioned above.
1337
1338         (JSC::BytecodeGenerator::isArgumentNumber): Provided a more precise way
1339         to ask this question, giving the bytecode generator more freedom to change
1340         internal implementation details.
1341         
1342         * bytecompiler/BytecodeGenerator.h: Reduced default vector capacity because
1343         16 was overkill.
1344         (JSC::CallArguments::registerOffset): Updated for rename mentioned above.
1345
1346         * bytecompiler/NodesCodegen.cpp:
1347         (JSC::CallArguments::CallArguments):
1348         (JSC::CallArguments::newArgument): Factored out argument allocation into
1349         a helper function, so I can change it later.
1350
1351         (JSC::CallFunctionCallDotNode::emitBytecode):
1352         (JSC::FunctionBodyNode::emitBytecode): Use helper function mentioned above.
1353
1354 2011-11-14  Tony Chang  <tony@chromium.org>
1355
1356         Remove the CSS3_FLEXBOX compile time flag and enable on all ports
1357         https://bugs.webkit.org/show_bug.cgi?id=72196
1358
1359         Reviewed by Ojan Vafai.
1360
1361         * Configurations/FeatureDefines.xcconfig:
1362
1363 2011-11-14  Mark Rowe  <mrowe@apple.com>
1364
1365         <rdar://problem/10424154> testRegExp should not be installed as part of JavaScriptCore
1366
1367         testRegExp and testapi.js were being installed in the JavaScriptCore framework.
1368         As test-only tools they shouldn't be installed there by default, only when
1369         FORCE_TOOL_INSTALL is set to YES.
1370
1371         This patch incorprorates a few related changes:
1372         1) Make the jsc and testRegExp targets be configured via .xcconfig files.
1373         2) Sets up testRegExp so that SKIP_INSTALL is YES by default, and only NO when
1374            FORCE_TOOL_INSTALL is YES.
1375         3) Switches the testapi target to using a script build phase to install testapi.js
1376            so that the installation will be skipped when SKIP_INSTALL is YES. I'm not sure
1377            why this isn't the built-in behavior when a Copy Files build phase has "Copy only
1378            when installing" checked, but it doesn't seem to be.
1379         4) Other random cleanup such as removing a bogus group that refers to files that do
1380            not exist, moving testRegExp.cpp in to the tests group, etc.
1381
1382         Reviewed by Geoff Garen.
1383
1384         * Configurations/JSC.xcconfig: Added.
1385         * Configurations/TestRegExp.xcconfig: Added.
1386         * JavaScriptCore.xcodeproj/project.pbxproj:
1387
1388 2011-11-14  Michael Saboff  <msaboff@apple.com>
1389
1390         Towards 8 bit strings - Add 8 bit paths to StringImpl methods
1391         https://bugs.webkit.org/show_bug.cgi?id=72290
1392
1393         Added 8 bit patchs to StringImpl to number and find methods.
1394
1395         Reviewed by Oliver Hunt.
1396
1397         * wtf/text/StringImpl.cpp:
1398         (WTF::StringImpl::toIntStrict):
1399         (WTF::StringImpl::toUIntStrict):
1400         (WTF::StringImpl::toInt64Strict):
1401         (WTF::StringImpl::toUInt64Strict):
1402         (WTF::StringImpl::toIntPtrStrict):
1403         (WTF::StringImpl::toInt):
1404         (WTF::StringImpl::toUInt):
1405         (WTF::StringImpl::toInt64):
1406         (WTF::StringImpl::toUInt64):
1407         (WTF::StringImpl::toIntPtr):
1408         (WTF::StringImpl::toDouble):
1409         (WTF::StringImpl::toFloat):
1410         (WTF::StringImpl::find):
1411         (WTF::StringImpl::reverseFind):
1412         * wtf/text/WTFString.cpp:
1413         (WTF::toIntegralType):
1414         (WTF::lengthOfCharactersAsInteger):
1415         (WTF::charactersToIntStrict):
1416         (WTF::charactersToUIntStrict):
1417         (WTF::charactersToInt64Strict):
1418         (WTF::charactersToUInt64Strict):
1419         (WTF::charactersToIntPtrStrict):
1420         (WTF::charactersToInt):
1421         (WTF::charactersToUInt):
1422         (WTF::charactersToInt64):
1423         (WTF::charactersToUInt64):
1424         (WTF::charactersToIntPtr):
1425         (WTF::toDoubleType):
1426         (WTF::charactersToDouble):
1427         (WTF::charactersToFloat):
1428         * wtf/text/WTFString.h:
1429         (WTF::find):
1430         (WTF::reverseFind):
1431
1432 2011-11-14  Vincent Scheib  <scheib@chromium.org>
1433
1434         Mouse Lock: Renaming to 'Pointer Lock': ENABLE Flags
1435         https://bugs.webkit.org/show_bug.cgi?id=72286
1436
1437         Reviewed by Adam Barth.
1438
1439         * wtf/Platform.h:
1440
1441 2011-11-14  Gavin Barraclough  <barraclough@apple.com>
1442
1443         https://bugs.webkit.org/show_bug.cgi?id=72280
1444
1445         Rubber stamped by Geoff Garen.
1446
1447         Fix 32-bit Lion.
1448
1449         * JavaScriptCore.xcodeproj/project.pbxproj:
1450         * wtf/OSAllocatorPosix.cpp:
1451         (WTF::OSAllocator::reserveAndCommit):
1452
1453 2011-11-14  Geoffrey Garen  <ggaren@apple.com>
1454
1455         32-bit Build fix: declare virtual register indices to be int rather than
1456         unsigned, since they can be positive or negative.
1457         
1458         For better clarity, explicitly use ReturnPC instead of -1 as the "invalid"
1459         state, since we'll never load and operate on the ReturnPC as a JS value.
1460
1461         * jit/JIT.cpp:
1462         (JSC::JIT::JIT):
1463         * jit/JIT.h:
1464         * jit/JITInlineMethods.h:
1465         (JSC::JIT::emitLoadTag):
1466         (JSC::JIT::emitLoadPayload):
1467         (JSC::JIT::emitLoad):
1468         (JSC::JIT::emitLoad2):
1469         (JSC::JIT::emitLoadDouble):
1470         (JSC::JIT::emitLoadInt32ToDouble):
1471         (JSC::JIT::emitStore):
1472         (JSC::JIT::emitStoreInt32):
1473         (JSC::JIT::emitStoreAndMapInt32):
1474         (JSC::JIT::emitStoreCell):
1475         (JSC::JIT::emitStoreBool):
1476         (JSC::JIT::emitStoreDouble):
1477         (JSC::JIT::map):
1478         (JSC::JIT::unmap):
1479         (JSC::JIT::isMapped):
1480         (JSC::JIT::getMappedPayload):
1481         (JSC::JIT::getMappedTag):
1482         (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
1483
1484 2011-11-14  Michael Saboff  <msaboff@apple.com>
1485
1486         Remove unused m_data member from UStringSourceProvider
1487         https://bugs.webkit.org/show_bug.cgi?id=72289
1488
1489         Removed unused m_data member from UStringSourceProvider.
1490
1491         Reviewed by Oliver Hunt.
1492
1493         * parser/SourceProvider.h:
1494         (JSC::UStringSourceProvider::UStringSourceProvider):
1495
1496 2011-11-14  Michael Saboff  <msaboff@apple.com>
1497
1498         Towards 8 Bit Strings: Templatize YARR Parser
1499         https://bugs.webkit.org/show_bug.cgi?id=72288
1500
1501         Changed Yarr::Parser to be a template based on character type.
1502
1503         Reviewed by Oliver Hunt.
1504
1505         * yarr/YarrParser.h:
1506         (JSC::Yarr::Parser::Parser):
1507         (JSC::Yarr::parse):
1508
1509 2011-11-14  Geoffrey Garen  <ggaren@apple.com>
1510
1511         32-bit build fix: Removed unused declaration.
1512
1513         * dfg/DFGJITCodeGenerator32_64.cpp:
1514         (JSC::DFG::JITCodeGenerator::emitCall):
1515
1516 2011-11-12  Geoffrey Garen  <ggaren@apple.com>
1517
1518         Standardized the JS calling convention
1519         https://bugs.webkit.org/show_bug.cgi?id=72221
1520         
1521         Reviewed by Oliver Hunt.
1522
1523         This patch standardizes the calling convention so that the caller always
1524         sets up the callee's CallFrame. Adjustments for call type, callee type,
1525         argument count, etc. now always take place after that initial setup.
1526         
1527         This is a step toward reversing the argument order, but also has these
1528         immediate benefits (measured on x64):
1529         
1530         (1) 1% benchmark speedup across the board.
1531         
1532         (2) 50% code size reduction in baseline JIT function calls.
1533         
1534         (3) 1.5x speedup for single-dispatch .apply forwarding.
1535         
1536         (4) 1.1x speedup for multi-dispatch .apply forwarding.
1537
1538         This change affected the baseline JIT most, since the baseline JIT had
1539         lots of ad hoc calling conventions for different caller / callee types.
1540
1541         * assembler/MacroAssemblerX86_64.h:
1542         (JSC::MacroAssemblerX86_64::branchPtr):
1543         (JSC::MacroAssemblerX86_64::branchAddPtr): Optimize compare to 0 into
1544         a test, like other assemblers do. (I added some compares to 0, and didn't
1545         want them to be slow.)
1546
1547         * bytecode/CodeBlock.cpp:
1548         (JSC::CodeBlock::dump): Merged op_load_varargs into op_call_varargs so
1549         op_call_varargs could share code generation with other forms of op_call.
1550         This is also a small optimization, since op_*varargs no longer have to
1551         pass arguments to each other through the register file.
1552
1553         (JSC::CallLinkInfo::unlink):
1554         * bytecode/CodeBlock.h: Added a new call type: CallVarargs. This allows
1555         us to link functions called through .apply syntax. We need to distinguish
1556         CallVarargs from Call because CallVarargs changes its argument count
1557         on each inovcation, so we must always link to the argument count checking
1558         version of the callee.
1559
1560         * bytecode/Opcode.h:
1561         * bytecompiler/BytecodeGenerator.cpp:
1562         (JSC::BytecodeGenerator::emitCallVarargs):
1563         * bytecompiler/BytecodeGenerator.h: Merged op_load_varargs into op_call_varargs.
1564
1565         * bytecompiler/NodesCodegen.cpp:
1566         (JSC::ApplyFunctionCallDotNode::emitBytecode): Ditto. Also, simplified
1567         some of this bytecode generation to remove redundant copies.
1568
1569         * dfg/DFGJITCodeGenerator32_64.cpp:
1570         (JSC::DFG::JITCodeGenerator::emitCall):
1571         * dfg/DFGJITCodeGenerator64.cpp:
1572         (JSC::DFG::JITCodeGenerator::emitCall): Added a new call type: CallVarargs.
1573         DFG doesn't support this type, but its code needs to change slightly
1574         to accomodate a 3-state variable.
1575
1576         Stopped passing the argument count in regT1 because this is non-standard.
1577         (The argument count goes in the CallFrame. This trades speed on the slow
1578         path for speed and code size on the fast path, and simplicity on all paths.
1579         A good trade, in my opinion.)
1580
1581         * dfg/DFGJITCompiler.cpp:
1582         (JSC::DFG::JITCompiler::compileEntry):
1583         (JSC::DFG::JITCompiler::link):
1584         (JSC::DFG::JITCompiler::compile):
1585         (JSC::DFG::JITCompiler::compileFunction): Tweaked code to make CallFrame
1586         setup more obvious when single-stepping. Also, updated for argument count
1587         not being in regT1.
1588
1589         * dfg/DFGJITCompiler.h:
1590         (JSC::DFG::JITCompiler::addJSCall):
1591         (JSC::DFG::JITCompiler::JSCallRecord::JSCallRecord): Added a new call
1592         type: CallVarargs.
1593
1594         * dfg/DFGOperations.cpp: Do finish CallFrame setup in one place before
1595         doing anything else. Don't check for stack overflow because we have no callee
1596         registers, and our caller has already checked for its own registers.
1597
1598         * dfg/DFGRepatch.cpp:
1599         (JSC::DFG::dfgLinkFor): We can link to our callee even if our argument
1600         count doesn't match -- we just need to link to the argument count checking
1601         version.
1602
1603         * interpreter/CallFrameClosure.h:
1604         (JSC::CallFrameClosure::setArgument): BUG FIX: When supplying too many
1605         arguments from C++, we need to supply a full copy of the arguments prior
1606         to the subset copy that matches our callee's argument count. (That is what
1607         the standard calling convention would have produced in JS.) I would have
1608         split this into its own patch, but I couldn't find a way to get the JIT
1609         to fail a regression test in this area without my patch applied.
1610
1611         * interpreter/Interpreter.cpp: Let the true code bomb begin!
1612
1613         (JSC::eval): Fixed up this helper function to operate on eval()'s CallFrame,
1614         and not eval()'s caller frame. We no longer leave the CallFrame pointing
1615         to eval()'s caller during a call to eval(), since that is not standard.
1616
1617         (JSC::loadVarargs): Factored out a shared helper function for use by JIT
1618         and interpreter because half the code means one quarter the bugs -- in my
1619         programming, at least.
1620
1621         (JSC::Interpreter::execute): Removed a now-unused way to invoke eval.
1622         
1623         (JSC::Interpreter::privateExecute): Removed an invalid ASSERT following
1624         putDirect, because it got in the way of my testing. (When putting a
1625         function, the cached base of a PutPropertySlot can be 0 to signify "do
1626         not optimize".)
1627         
1628         op_call_eval: Updated for new, standard eval calling convention.
1629         
1630         op_load_varargs: Merged op_load_varargs into op_call_varargs.
1631
1632         op_call_varags: Updated for new, standard eval calling convention. Don't
1633         check for stack overflow because the loadVarargs helper function already
1634         checked.
1635
1636         * interpreter/Interpreter.h:
1637         (JSC::Interpreter::execute): Headers are fun and educational!
1638
1639         * interpreter/RegisterFile.cpp:
1640         (JSC::RegisterFile::growSlowCase):
1641         * interpreter/RegisterFile.h:
1642         (JSC::RegisterFile::grow): Factored out the slow case into a slow
1643         case because it was cramping the style of my fast case.
1644
1645         * jit/JIT.cpp:
1646         (JSC::JIT::privateCompile): Moved initialization of
1647         RegisterFile::CodeBlock to make it more obvious when debugging. Removed
1648         assumption that argument count is in regT1, as above. Removed call to
1649         restoreArgumentReference() because the JITStubCall abstraction does this for us.
1650
1651         (JSC::JIT::linkFor): Link even if we miss on argument count, as above.
1652
1653         * jit/JIT.h:
1654         * jit/JITCall32_64.cpp:
1655         (JSC::JIT::emitSlow_op_call):
1656         (JSC::JIT::emitSlow_op_call_eval):
1657         (JSC::JIT::emitSlow_op_call_varargs):
1658         (JSC::JIT::emitSlow_op_construct):
1659         (JSC::JIT::emit_op_call_eval):
1660         (JSC::JIT::emit_op_call_varargs): Share all function call code generation.
1661         Don't count call_eval when accounting for linkable function calls because
1662         eval doesn't link. (Its fast path is to perform the eval.)
1663
1664         (JSC::JIT::compileLoadVarargs): Ported this inline copying optimization
1665         to our new calling convention. The key to this optimization is the
1666         observation that, in a function that declares no arguments, if any
1667         arguments are passed, they all end up right behind 'this'.
1668
1669         (JSC::JIT::compileCallEval):
1670         (JSC::JIT::compileCallEvalSlowCase): Factored out eval for a little clarity.
1671
1672         (JSC::JIT::compileOpCall):
1673         (JSC::JIT::compileOpCallSlowCase): If you are still with me, dear reader,
1674         this is the whole point of my patch. The caller now unconditionally moves
1675         the CallFrame forward and fills in the data it knows before taking any
1676         branches to deal with weird caller/callee pairs.
1677         
1678         This also means that there is almost no slow path for calls -- it all
1679         gets folded into the shared virtual call stub. The only things remaining
1680         in the slow path are the rare case counter and a call to the stub.
1681
1682         * jit/JITOpcodes32_64.cpp:
1683         (JSC::JIT::privateCompileCTIMachineTrampolines):
1684         (JSC::JIT::privateCompileCTINativeCall): Updated for values being in
1685         different registers or in memory, based on our new standard calling
1686         convention.
1687         
1688         Added a shared path for calling out to CTI helper functions for non-JS
1689         calls.
1690
1691         * jit/JITPropertyAccess32_64.cpp:
1692         (JSC::JIT::emit_op_method_check): method_check emits its own code and
1693         the following get_by_id's code, so it needs to add both when informing
1694         result chaining of its result. This is important because the standard
1695         calling convention can now take advantage of this chaining.
1696
1697         * jit/JITCall.cpp:
1698         (JSC::JIT::compileLoadVarargs):
1699         (JSC::JIT::compileCallEval):
1700         (JSC::JIT::compileCallEvalSlowCase):
1701         (JSC::JIT::compileOpCall):
1702         (JSC::JIT::compileOpCallSlowCase):
1703         * jit/JITOpcodes.cpp:
1704         (JSC::JIT::privateCompileCTIMachineTrampolines):
1705         (JSC::JIT::emit_op_call_eval):
1706         (JSC::JIT::emit_op_call_varargs):
1707         (JSC::JIT::emitSlow_op_call):
1708         (JSC::JIT::emitSlow_op_call_eval):
1709         (JSC::JIT::emitSlow_op_call_varargs):
1710         (JSC::JIT::emitSlow_op_construct): Observe, as I write all of my code a
1711         second time, now with 64 bits.
1712
1713         * jit/JITStubs.cpp:
1714         (JSC::throwExceptionFromOpCall):
1715         (JSC::jitCompileFor):
1716         (JSC::arityCheckFor):
1717         (JSC::lazyLinkFor): A lot of mechanical changes here for one purpose:
1718         Exceptions thrown in the middle of a function call now use a shared helper
1719         function (throwExceptionFromOpCall). This function understands that the
1720         CallFrame currently points to the callEE, and the exception must be
1721         thrown by the callER. (The old calling convention would often still have
1722         the CallFrame pointing at the callER at the point of an exception. That
1723         is not the way of our new, standard calling convention.)
1724
1725         (JSC::op_call_eval): Finish standard CallFrame setup before calling 
1726         our eval helper function, which now depends on that setup.
1727
1728         * runtime/Arguments.h:
1729         (JSC::Arguments::length): Renamed numProvidedArguments() to length()
1730         because that's what other objects call it, and the difference made our
1731         new loadVarargs helper function hard to read.
1732
1733         * runtime/Executable.cpp:
1734         (JSC::FunctionExecutable::compileForCallInternal):
1735         (JSC::FunctionExecutable::compileForConstructInternal): Interpreter build
1736         fixes.
1737
1738         * runtime/FunctionPrototype.cpp:
1739         (JSC::functionProtoFuncApply): Honor Arguments::MaxArguments even when
1740         the .apply call_varargs optimization fails. (This bug appears on layout
1741         tests when you disable the optimization.)
1742
1743 2011-11-11  Jer Noble  <jer.noble@apple.com>
1744
1745         Implement MediaController.
1746         https://bugs.webkit.org/show_bug.cgi?id=71408
1747
1748         Reviewed by Eric Carlson.
1749
1750         Change the definition of WTF_USE_COREAUDIO to exclude Windows completely, as 
1751         CoreAudioClock.h is not available there.
1752
1753         * wtf/Platform.h:
1754
1755 2011-11-14  Patrick Gansterer  <paroga@webkit.org>
1756
1757         [WIN] Remove dependency on pthread from FastMalloc
1758         https://bugs.webkit.org/show_bug.cgi?id=72098
1759
1760         Reviewed by Adam Roben.
1761
1762         All pthread calls are already ported to native Windows calls.
1763         Use the native version for all OS(WINDOWS) to remove the
1764         runtime dependency on the pthread dll.
1765
1766         * wtf/FastMalloc.cpp:
1767
1768 2011-11-14  Simon Hausmann  <simon.hausmann@nokia.com>
1769
1770         [Qt] Replace use of QApplication with QGuiApplication.
1771
1772         Reviewed by Tor Arne Vestbø.
1773
1774         * wtf/qt/compat/qguiapplication.h:
1775         (QGuiApplication::styleHints): Introduce styleHints wrapper hack.
1776
1777 2011-11-14  Carlos Garcia Campos  <cgarcia@igalia.com>
1778
1779         Unreviewed. Fix make distcheck build.
1780
1781         * GNUmakefile.list.am: Add missing files.
1782
1783 2011-11-11  Yury Semikhatsky  <yurys@chromium.org>
1784
1785         Web Inspector: function remote objetct should provide access to function position in the script
1786         https://bugs.webkit.org/show_bug.cgi?id=71808
1787
1788         Exposed accessor for function source code.
1789
1790         Reviewed by Pavel Feldman.
1791
1792         * JavaScriptCore.exp:
1793         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1794         * runtime/JSFunction.cpp:
1795         (JSC::JSFunction::sourceCode):
1796         * runtime/JSFunction.h:
1797
1798 2011-11-13  Yuqiang Xian  <yuqiang.xian@intel.com>
1799
1800         Fix silent spilling/filling GPRs in DFG 32_64
1801         https://bugs.webkit.org/show_bug.cgi?id=72201
1802
1803         Reviewed by Gavin Barraclough.
1804
1805         Current silentSpillGPR/silentFillGPR may not work as expected for some
1806         cases in 32_64. If there's a JSValue which was retained by two GPRs,
1807         we may end up failing to spill/fill some GPRs or redundantly
1808         spilling/filling some GPRs. For example, if we tend to exclude "eax"
1809         from spilling while a JSValue is retained by both "eax" and "edx",
1810         then "edx" won't be spilled as well (wrong). And if another JSValue is
1811         retained by "ecx" and "ebx", both "ecx" and "ebx" will be spilled
1812         twice. The similar problem applies to silentFillGPR.
1813         The fix is to make silentSpillGPR/silentFillGPR more straightforward,
1814         i.e., spilling/filling based on the GPR instead of the virtual
1815         register. FPR spilling/filling is also modified accordingly to make it
1816         consistent with GPR spilling/filling.
1817
1818         * dfg/DFGJITCodeGenerator.h:
1819         (JSC::DFG::JITCodeGenerator::silentSpillGPR):
1820         (JSC::DFG::JITCodeGenerator::silentSpillFPR):
1821         (JSC::DFG::JITCodeGenerator::silentFillGPR):
1822         (JSC::DFG::JITCodeGenerator::silentFillFPR):
1823         (JSC::DFG::JITCodeGenerator::silentSpillAllRegisters):
1824         (JSC::DFG::JITCodeGenerator::silentFillAllRegisters):
1825
1826 2011-11-12  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1827
1828         [Qt][Symbian] Remove support for WINSCW compiler
1829         https://bugs.webkit.org/show_bug.cgi?id=70178
1830
1831         Reviewed by Chang Shu.
1832
1833         * API/JSStringRef.h:
1834         * create_hash_table: Revert r45553.
1835         * runtime/JSGlobalData.cpp: Revert r45553.
1836         * runtime/LiteralParser.cpp: Remove WINSCW comment.
1837         (JSC::LiteralParser::Lexer::lexString):
1838         * runtime/Lookup.h: Revert r45553.
1839         * runtime/Structure.h: Revert r48461.
1840         * wtf/Alignment.h:
1841         * wtf/Assertions.h: Revert r52337.
1842         * wtf/Compiler.h:
1843         * wtf/ListRefPtr.h: Revert r48988.
1844         (WTF::ListRefPtr::~ListRefPtr):
1845         * wtf/OwnArrayPtr.h: Revert r45911.
1846         (WTF::OwnArrayPtr::operator UnspecifiedBoolType):
1847         * wtf/PassOwnArrayPtr.h:
1848         (WTF::PassOwnArrayPtr::operator UnspecifiedBoolType):
1849         * wtf/PassRefPtr.h:
1850         * wtf/StaticConstructors.h:
1851         * wtf/unicode/qt4/UnicodeQt4.h:
1852
1853 2011-11-12  Patrick Gansterer  <paroga@webkit.org>
1854
1855         Unreviewed. Add ENABLE(DFG_JIT) around DFGCorrectableJumpPoint code.
1856
1857         * dfg/DFGCorrectableJumpPoint.cpp:
1858         * dfg/DFGCorrectableJumpPoint.h:
1859
1860 2011-11-12  Patrick Gansterer  <paroga@webkit.org>
1861
1862         [CMake] Move list of DFG source files into correct file
1863         https://bugs.webkit.org/show_bug.cgi?id=72212
1864
1865         Reviewed by Daniel Bates.
1866
1867         The DFG files are platform independent. So move them from
1868         the EFL specific file into the general CMakeLists.txt.
1869
1870         * CMakeLists.txt:
1871         * PlatformEfl.cmake:
1872
1873 2011-11-12  Patrick Gansterer  <paroga@webkit.org>
1874
1875         Fix "unused variable" warning in JSLock
1876         https://bugs.webkit.org/show_bug.cgi?id=72213
1877
1878         Reviewed by Anders Carlsson.
1879
1880         Use ASSERT_UNUSED() instead of ASSERT() to make sure
1881         that the variable is also used in the release build.
1882
1883         * runtime/JSLock.cpp:
1884         (JSC::JSLock::lock):
1885         (JSC::JSLock::unlock):
1886
1887 2011-11-11  Gavin Barraclough  <barraclough@apple.com>
1888
1889         Update iOS compiler version.
1890
1891         Reviewed by David Kilzer.
1892
1893         * Configurations/CompilerVersion.xcconfig:
1894             - Update compiler version.
1895
1896 2011-11-11  Gavin Barraclough  <barraclough@apple.com>
1897
1898         Update iOS port's configuration setting, particularly in Platform.h
1899         https://bugs.webkit.org/show_bug.cgi?id=72187
1900         
1901         Reviewed by David Kilzer.
1902
1903         * interpreter/Interpreter.h:
1904             - Lower the reentry depth.
1905         * runtime/DatePrototype.cpp:
1906             - iOS also uses CF.
1907         * wtf/FastMalloc.cpp:
1908         (WTF::TCMalloc_PageHeap::IncrementalScavenge):
1909             - Update fastmalloc configuration for iOS.
1910         * wtf/OSAllocatorPosix.cpp:
1911         (WTF::OSAllocator::reserveAndCommit):
1912             - Added flag.
1913         * wtf/Platform.h:
1914             - Update platform configuration for iOS.
1915
1916 2011-11-11  David Kilzer  <ddkilzer@apple.com>
1917
1918         Only define BUILDING_ON_* and TARGETING_* macros when building for Mac OS X
1919         <http://webkit.org/b/72175>
1920
1921         Reviewed by Joseph Pecoraro.
1922
1923         * wtf/Platform.h: Move the definition of the BUILDING_ON_* and
1924         TARGETING_* macros to where the WTF_OS_MAC_OS_X macro is defined
1925         so that they're only defined on Mac OS X builds.  Also include
1926         Availability.h, which is needed on iOS builds.
1927
1928 2011-11-11  Darin Adler  <darin@apple.com>
1929
1930         Remove all releaseRef implementations except for RetainPtr
1931         https://bugs.webkit.org/show_bug.cgi?id=71423
1932
1933         Reviewed by Julien Chaffraix.
1934
1935         * API/JSRetainPtr.h: Removed releaseRef.
1936         * wtf/PassRefPtr.h: Removed releaseRef.
1937
1938 2011-11-11  Darin Adler  <darin@apple.com>
1939
1940         * JavaScriptCore.xcodeproj/project.pbxproj: Let a newer Xcode update this file.
1941         If an older Xcode downgrades this file and we have a risk of some kind of
1942         oscillating commit situation, please contact me so I know not to do this again.
1943
1944 2011-11-11  Mark Hahnenberg  <mhahnenberg@apple.com>
1945
1946         Add jsCast to replace static_cast
1947         https://bugs.webkit.org/show_bug.cgi?id=72071
1948
1949         Reviewed by Geoffrey Garen.
1950
1951         Added new jsCast and changed all of the static_cast sites in functions that 
1952         are in the MethodTable to use jsCast instead.
1953
1954         * API/JSCallbackFunction.cpp:
1955         (JSC::JSCallbackFunction::toStringCallback):
1956         (JSC::JSCallbackFunction::valueOfCallback):
1957         * API/JSCallbackObject.h:
1958         (JSC::JSCallbackObject::visitChildren):
1959         * API/JSCallbackObjectFunctions.h:
1960         (JSC::::className):
1961         (JSC::::getOwnPropertySlot):
1962         (JSC::::getOwnPropertyDescriptor):
1963         (JSC::::put):
1964         (JSC::::deleteProperty):
1965         (JSC::::deletePropertyByIndex):
1966         (JSC::::getConstructData):
1967         (JSC::::hasInstance):
1968         (JSC::::getCallData):
1969         (JSC::::getOwnPropertyNames):
1970         * debugger/DebuggerActivation.cpp:
1971         (JSC::DebuggerActivation::visitChildren):
1972         (JSC::DebuggerActivation::className):
1973         (JSC::DebuggerActivation::getOwnPropertySlot):
1974         (JSC::DebuggerActivation::put):
1975         (JSC::DebuggerActivation::putWithAttributes):
1976         (JSC::DebuggerActivation::deleteProperty):
1977         (JSC::DebuggerActivation::getOwnPropertyNames):
1978         (JSC::DebuggerActivation::getOwnPropertyDescriptor):
1979         (JSC::DebuggerActivation::defineGetter):
1980         (JSC::DebuggerActivation::defineSetter):
1981         * runtime/Arguments.cpp:
1982         (JSC::Arguments::visitChildren):
1983         (JSC::Arguments::getOwnPropertySlotByIndex):
1984         (JSC::Arguments::getOwnPropertySlot):
1985         (JSC::Arguments::getOwnPropertyDescriptor):
1986         (JSC::Arguments::getOwnPropertyNames):
1987         (JSC::Arguments::putByIndex):
1988         (JSC::Arguments::put):
1989         (JSC::Arguments::deletePropertyByIndex):
1990         (JSC::Arguments::deleteProperty):
1991         * runtime/ArrayConstructor.cpp:
1992         (JSC::ArrayConstructor::getOwnPropertySlot):
1993         (JSC::ArrayConstructor::getOwnPropertyDescriptor):
1994         * runtime/ArrayPrototype.cpp:
1995         (JSC::ArrayPrototype::getOwnPropertySlot):
1996         (JSC::ArrayPrototype::getOwnPropertyDescriptor):
1997         * runtime/BooleanPrototype.cpp:
1998         (JSC::BooleanPrototype::getOwnPropertySlot):
1999         (JSC::BooleanPrototype::getOwnPropertyDescriptor):
2000         * runtime/DateConstructor.cpp:
2001         (JSC::DateConstructor::getOwnPropertySlot):
2002         (JSC::DateConstructor::getOwnPropertyDescriptor):
2003         * runtime/DatePrototype.cpp:
2004         (JSC::DatePrototype::getOwnPropertySlot):
2005         (JSC::DatePrototype::getOwnPropertyDescriptor):
2006         * runtime/ErrorPrototype.cpp:
2007         (JSC::ErrorPrototype::getOwnPropertySlot):
2008         (JSC::ErrorPrototype::getOwnPropertyDescriptor):
2009         * runtime/Executable.cpp:
2010         (JSC::ExecutableBase::clearCode):
2011         (JSC::EvalExecutable::visitChildren):
2012         (JSC::ProgramExecutable::visitChildren):
2013         (JSC::FunctionExecutable::visitChildren):
2014         * runtime/GetterSetter.cpp:
2015         (JSC::GetterSetter::visitChildren):
2016         * runtime/JSActivation.cpp:
2017         (JSC::JSActivation::visitChildren):
2018         (JSC::JSActivation::getOwnPropertyNames):
2019         (JSC::JSActivation::getOwnPropertySlot):
2020         (JSC::JSActivation::put):
2021         (JSC::JSActivation::putWithAttributes):
2022         * runtime/JSArray.cpp:
2023         (JSC::JSArray::getOwnPropertySlotByIndex):
2024         (JSC::JSArray::getOwnPropertySlot):
2025         (JSC::JSArray::getOwnPropertyDescriptor):
2026         (JSC::JSArray::put):
2027         (JSC::JSArray::putByIndex):
2028         (JSC::JSArray::deleteProperty):
2029         (JSC::JSArray::deletePropertyByIndex):
2030         (JSC::JSArray::getOwnPropertyNames):
2031         (JSC::JSArray::visitChildren):
2032         * runtime/JSBoundFunction.cpp:
2033         (JSC::JSBoundFunction::hasInstance):
2034         (JSC::JSBoundFunction::visitChildren):
2035         * runtime/JSByteArray.cpp:
2036         (JSC::JSByteArray::getOwnPropertySlot):
2037         (JSC::JSByteArray::getOwnPropertyDescriptor):
2038         (JSC::JSByteArray::getOwnPropertySlotByIndex):
2039         (JSC::JSByteArray::put):
2040         (JSC::JSByteArray::putByIndex):
2041         (JSC::JSByteArray::getOwnPropertyNames):
2042         * runtime/JSCell.h:
2043         (JSC::JSCell::visitChildren):
2044         (JSC::jsCast):
2045         * runtime/JSFunction.cpp:
2046         (JSC::JSFunction::visitChildren):
2047         (JSC::JSFunction::getCallData):
2048         (JSC::JSFunction::getOwnPropertySlot):
2049         (JSC::JSFunction::getOwnPropertyDescriptor):
2050         (JSC::JSFunction::getOwnPropertyNames):
2051         (JSC::JSFunction::put):
2052         (JSC::JSFunction::deleteProperty):
2053         (JSC::JSFunction::getConstructData):
2054         * runtime/JSGlobalData.cpp:
2055         (JSC::StackPreservingRecompiler::operator()):
2056         * runtime/JSGlobalObject.cpp:
2057         (JSC::JSGlobalObject::put):
2058         (JSC::JSGlobalObject::putWithAttributes):
2059         (JSC::JSGlobalObject::defineGetter):
2060         (JSC::JSGlobalObject::defineSetter):
2061         (JSC::JSGlobalObject::visitChildren):
2062         (JSC::JSGlobalObject::getOwnPropertySlot):
2063         (JSC::JSGlobalObject::getOwnPropertyDescriptor):
2064         (JSC::JSGlobalObject::clearRareData):
2065         * runtime/JSGlobalThis.cpp:
2066         (JSC::JSGlobalThis::visitChildren):
2067         * runtime/JSONObject.cpp:
2068         (JSC::JSONObject::getOwnPropertySlot):
2069         (JSC::JSONObject::getOwnPropertyDescriptor):
2070         * runtime/JSObject.cpp:
2071         (JSC::JSObject::finalize):
2072         (JSC::JSObject::visitChildren):
2073         (JSC::JSObject::getOwnPropertySlotByIndex):
2074         (JSC::JSObject::put):
2075         (JSC::JSObject::putByIndex):
2076         (JSC::JSObject::deleteProperty):
2077         (JSC::JSObject::deletePropertyByIndex):
2078         * runtime/JSObject.h:
2079         (JSC::JSObject::getOwnPropertySlot):
2080         * runtime/JSPropertyNameIterator.cpp:
2081         (JSC::JSPropertyNameIterator::visitChildren):
2082         * runtime/JSStaticScopeObject.cpp:
2083         (JSC::JSStaticScopeObject::visitChildren):
2084         (JSC::JSStaticScopeObject::put):
2085         (JSC::JSStaticScopeObject::putWithAttributes):
2086         (JSC::JSStaticScopeObject::getOwnPropertySlot):
2087         * runtime/JSString.cpp:
2088         (JSC::JSString::visitChildren):
2089         (JSC::JSString::toThisObject):
2090         (JSC::JSString::getOwnPropertySlot):
2091         (JSC::JSString::getOwnPropertySlotByIndex):
2092         * runtime/JSVariableObject.cpp:
2093         (JSC::JSVariableObject::deleteProperty):
2094         (JSC::JSVariableObject::getOwnPropertyNames):
2095         * runtime/JSWrapperObject.cpp:
2096         (JSC::JSWrapperObject::visitChildren):
2097         * runtime/MathObject.cpp:
2098         (JSC::MathObject::getOwnPropertySlot):
2099         (JSC::MathObject::getOwnPropertyDescriptor):
2100         * runtime/NativeErrorConstructor.cpp:
2101         (JSC::NativeErrorConstructor::visitChildren):
2102         * runtime/NumberConstructor.cpp:
2103         (JSC::NumberConstructor::getOwnPropertySlot):
2104         (JSC::NumberConstructor::getOwnPropertyDescriptor):
2105         * runtime/NumberPrototype.cpp:
2106         (JSC::NumberPrototype::getOwnPropertySlot):
2107         (JSC::NumberPrototype::getOwnPropertyDescriptor):
2108         * runtime/ObjectConstructor.cpp:
2109         (JSC::ObjectConstructor::getOwnPropertySlot):
2110         (JSC::ObjectConstructor::getOwnPropertyDescriptor):
2111         * runtime/ObjectPrototype.cpp:
2112         (JSC::ObjectPrototype::put):
2113         (JSC::ObjectPrototype::getOwnPropertySlotByIndex):
2114         (JSC::ObjectPrototype::getOwnPropertySlot):
2115         (JSC::ObjectPrototype::getOwnPropertyDescriptor):
2116         * runtime/RegExpConstructor.cpp:
2117         (JSC::RegExpConstructor::getOwnPropertySlot):
2118         (JSC::RegExpConstructor::getOwnPropertyDescriptor):
2119         (JSC::RegExpConstructor::put):
2120         * runtime/RegExpMatchesArray.h:
2121         (JSC::RegExpMatchesArray::getOwnPropertySlot):
2122         (JSC::RegExpMatchesArray::getOwnPropertySlotByIndex):
2123         (JSC::RegExpMatchesArray::getOwnPropertyDescriptor):
2124         (JSC::RegExpMatchesArray::put):
2125         (JSC::RegExpMatchesArray::putByIndex):
2126         (JSC::RegExpMatchesArray::deleteProperty):
2127         (JSC::RegExpMatchesArray::deletePropertyByIndex):
2128         (JSC::RegExpMatchesArray::getOwnPropertyNames):
2129         * runtime/RegExpObject.cpp:
2130         (JSC::RegExpObject::visitChildren):
2131         (JSC::RegExpObject::getOwnPropertySlot):
2132         (JSC::RegExpObject::getOwnPropertyDescriptor):
2133         (JSC::RegExpObject::put):
2134         * runtime/RegExpPrototype.cpp:
2135         (JSC::RegExpPrototype::getOwnPropertySlot):
2136         (JSC::RegExpPrototype::getOwnPropertyDescriptor):
2137         * runtime/ScopeChain.cpp:
2138         (JSC::ScopeChainNode::visitChildren):
2139         * runtime/StringConstructor.cpp:
2140         (JSC::StringConstructor::getOwnPropertySlot):
2141         (JSC::StringConstructor::getOwnPropertyDescriptor):
2142         * runtime/StringObject.cpp:
2143         (JSC::StringObject::getOwnPropertySlot):
2144         (JSC::StringObject::getOwnPropertySlotByIndex):
2145         (JSC::StringObject::getOwnPropertyDescriptor):
2146         (JSC::StringObject::deleteProperty):
2147         (JSC::StringObject::getOwnPropertyNames):
2148         * runtime/StringPrototype.cpp:
2149         (JSC::StringPrototype::getOwnPropertySlot):
2150         (JSC::StringPrototype::getOwnPropertyDescriptor):
2151         * runtime/Structure.cpp:
2152         (JSC::Structure::visitChildren):
2153         * runtime/StructureChain.cpp:
2154         (JSC::StructureChain::visitChildren):
2155
2156 2011-11-11  Gavin Barraclough  <barraclough@apple.com>
2157
2158         Enable DFG JIT for ARMv7/iOS.
2159
2160         Rubber stamped by Oliver Hunt.
2161
2162         * wtf/Platform.h:
2163             - enable DFG JIT for ARMv7/iOS.
2164
2165 2011-11-11  Mark Hahnenberg  <mhahnenberg@apple.com>
2166
2167         De-virtualize supportsProfiling, supportsRichSourceInfo, shouldInterruptScript in JSGlobalObject
2168         https://bugs.webkit.org/show_bug.cgi?id=72035
2169
2170         Reviewed by Geoffrey Garen.
2171
2172         De-virtualized the methods through the use of a new method table just for JSGlobalObject and subclasses.
2173
2174         * JavaScriptCore.exp:
2175         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2176         * bytecompiler/BytecodeGenerator.cpp: Changed call sites to use the new GlobalObjectMethodTable.
2177         (JSC::BytecodeGenerator::BytecodeGenerator):
2178         * interpreter/Interpreter.cpp: Ditto.
2179         (JSC::Interpreter::execute):
2180         * runtime/JSGlobalObject.cpp: Added a static const GlobalObjectMethodTable with the correct function pointers.
2181         * runtime/JSGlobalObject.h: Added a field in JSGlobalObject to keep track of the current method table.
2182         (JSC::JSGlobalObject::JSGlobalObject):
2183         (JSC::JSGlobalObject::globalObjectMethodTable): The new struct to contain the function pointers.
2184         (JSC::JSGlobalObject::supportsProfiling): Made static to put in the method table.
2185         (JSC::JSGlobalObject::supportsRichSourceInfo): Ditto.
2186         (JSC::JSGlobalObject::shouldInterruptScript): Ditto.
2187         * runtime/TimeoutChecker.cpp: Changed call sites to use the new GlobalObjectMethodTable for lookup.
2188         (JSC::TimeoutChecker::didTimeOut):
2189
2190 2011-11-11  Mark Hahnenberg  <mhahnenberg@apple.com>
2191
2192         De-virtualize JSGlobalObject::allowsAccessFrom
2193         https://bugs.webkit.org/show_bug.cgi?id=71969
2194
2195         Reviewed by Darin Adler.
2196
2197         * runtime/JSGlobalObject.h: Removed allowsAccessFrom from JSGlobalObject since it is exclusive to 
2198         JSDOMWindowBase and WebScriptObject.
2199
2200 2011-11-11  Sheriff Bot  <webkit.review.bot@gmail.com>
2201
2202         Unreviewed, rolling out r99950.
2203         http://trac.webkit.org/changeset/99950
2204         https://bugs.webkit.org/show_bug.cgi?id=72117
2205
2206         "Landed wrong patch by mistake" (Requested by yurys on
2207         #webkit).
2208
2209         * JavaScriptCore.exp:
2210         * runtime/JSFunction.cpp:
2211         * runtime/JSFunction.h:
2212
2213 2011-11-11  Patrick Gansterer  <paroga@webkit.org>
2214
2215         Unreviewed. Build fix for !ENABLE(JIT) after r99898.
2216
2217         * bytecode/CodeBlock.cpp:
2218         (JSC::CodeBlock::CodeBlock):
2219
2220 2011-11-10  Dan Bernstein  <mitz@apple.com>
2221
2222         Disabling assertions breaks the debug build
2223         https://bugs.webkit.org/show_bug.cgi?id=72091
2224
2225         Reviewed by Geoff Garen.
2226
2227         * dfg/DFGNode.h: Made hasIdentifier() available when assertions are
2228         disabled. It is used in Graph::dump().
2229         * runtime/JSObject.cpp:
2230         (JSC::JSObject::visitChildren): Update m_isCheckingForDefaultMarkViolation
2231         only if assertions are enabled.
2232         * wtf/Deque.h:
2233         (WTF::::checkIndexValidity): Changed ASSERT to ASSERT_UNUSED.
2234         * wtf/ThreadRestrictionVerifier.h:
2235         (WTF::ThreadRestrictionVerifier::setShared): Guarded the definition of
2236         a local variable that is only used in an assertion.
2237
2238 2011-11-10  Filip Pizlo  <fpizlo@apple.com>
2239
2240         JSString forgets to clear m_fibers when resolving ropes
2241         https://bugs.webkit.org/show_bug.cgi?id=72089
2242
2243         Reviewed by Geoff Garen.
2244
2245         * runtime/JSString.cpp:
2246         (JSC::JSString::resolveRopeSlowCase):
2247
2248 2011-11-09  Filip Pizlo  <fpizlo@apple.com>
2249
2250         DFG byte array support sometimes clamps values incorrectly
2251         https://bugs.webkit.org/show_bug.cgi?id=71975
2252
2253         Reviewed by Oliver Hunt.
2254
2255         * dfg/DFGSpeculativeJIT.cpp:
2256         (JSC::DFG::SpeculativeJIT::compilePutByValForByteArray):
2257
2258 2011-11-10  Filip Pizlo  <fpizlo@apple.com>
2259
2260         ValueProfile/PredictedType contains dead code, and doesn't recognize functions
2261         https://bugs.webkit.org/show_bug.cgi?id=72065
2262
2263         Reviewed by Gavin Barraclough and Geoff Garen.
2264         
2265         Added PredictFunction support, and did some cleaning up along the way.
2266         ValueProfile no longer has statistics machinery, because we never used
2267         it. Rearranged some bits in PredictedType to more easily make room for
2268         one more object type. Changed some debug code to use more consistent
2269         conventions (ByteArray becomes Bytearray so that if we ever have a
2270         "Byte" prediction we don't get confused between a prediction that is
2271         the union of Byte and Array and a prediction that indicates precisely
2272         a ByteArray).
2273
2274         * bytecode/PredictedType.cpp:
2275         (JSC::predictionToString):
2276         (JSC::predictionFromClassInfo):
2277         * bytecode/PredictedType.h:
2278         (JSC::isFunctionPrediction):
2279         * bytecode/ValueProfile.cpp:
2280         * bytecode/ValueProfile.h:
2281         (JSC::ValueProfile::dump):
2282         * dfg/DFGAbstractState.cpp:
2283         (JSC::DFG::AbstractState::execute):
2284         * dfg/DFGPropagator.cpp:
2285         (JSC::DFG::Propagator::propagateNodePredictions):
2286
2287 2011-11-10  David Kilzer  <ddkilzer@apple.com>
2288
2289         <http://webkit.org/b/72049> Specify testapi.js install path using JAVASCRIPTCORE_FRAMEWORKS_DIR
2290
2291         Reviewed by Joseph Pecoraro.
2292
2293         * JavaScriptCore.xcodeproj/project.pbxproj: The testapi.js
2294         script should use JAVASCRIPTCORE_FRAMEWORKS_DIR in its dstPath
2295         for installation.  Also removed "Versions/A/" from the path
2296         since this is unneeded due the default symlinks present in the
2297         framework.
2298
2299 2011-11-10  Gavin Barraclough  <barraclough@apple.com>
2300
2301         Add ARMv7 support to the DFG JIT
2302         https://bugs.webkit.org/show_bug.cgi?id=72061
2303
2304         Reviewed by Geoff Garen.
2305
2306         * dfg/DFGAssemblyHelpers.h:
2307         (JSC::DFG::AssemblyHelpers::preserveReturnAddressAfterCall):
2308         (JSC::DFG::AssemblyHelpers::restoreReturnAddressBeforeReturn):
2309         (JSC::DFG::AssemblyHelpers::emitPutImmediateToCallFrameHeader):
2310         (JSC::DFG::AssemblyHelpers::boxDouble):
2311         (JSC::DFG::AssemblyHelpers::unboxDouble):
2312             - Add CPU(ARM) copies of these functions.
2313         * dfg/DFGJITCodeGenerator.h:
2314         (JSC::DFG::JITCodeGenerator::spill):
2315             - Fix matching of '}' re #if blocks, makes some tools happy.
2316         (JSC::DFG::JITCodeGenerator::setupArguments):
2317         (JSC::DFG::JITCodeGenerator::setupArgumentsWithExecState):
2318         (JSC::DFG::JITCodeGenerator::appendCallWithExceptionCheckSetResult):
2319         (JSC::DFG::JITCodeGenerator::appendCallSetResult):
2320             - Add CPU(ARM) / 4 argument register copies of these functions.
2321         * dfg/DFGJITCodeGenerator32_64.cpp:
2322         (JSC::DFG::JITCodeGenerator::nonSpeculativeValueToInt32):
2323             - Should use callOperation to plant a call to a DFG_OPERATION.
2324         (JSC::DFG::JITCodeGenerator::cachedGetById):
2325         (JSC::DFG::JITCodeGenerator::cachedPutById):
2326             - These methods need to plant a relinkable jump; we currently do so
2327               using beginUninterruptedSequence() / endUninterruptedSequence().
2328         * dfg/DFGJITCodeGenerator64.cpp:
2329         (JSC::DFG::JITCodeGenerator::nonSpeculativeValueToInt32):
2330             - Should use callOperation to plant a call to a DFG_OPERATION.
2331         * dfg/DFGJITCompiler.cpp:
2332         (JSC::DFG::JITCompiler::linkOSRExits):
2333             - This method needs to plant a relinkable jump; we currently do so
2334               using beginUninterruptedSequence() / endUninterruptedSequence().
2335         (JSC::DFG::JITCompiler::compileBody):
2336             - Add abstraction to retrieve the pc after a call.
2337         * dfg/DFGOSRExitCompiler.cpp:
2338             - Fix a bug - CodeLocationLabel needs a data address rather than an
2339               executable one, but can just take a MacroAssemblerCodePtr instead!
2340         * dfg/DFGOperations.cpp:
2341         * dfg/DFGSpeculativeJIT.cpp:
2342         (JSC::DFG::compileClampDoubleToByte):
2343             - Add FIXME comment to come back to! - bug#72054.
2344         * dfg/DFGSpeculativeJIT.h:
2345         (JSC::DFG::SpeculativeJIT::speculationCheck):
2346             - Add missing method (ooops, required by bug#72047)
2347         * dfg/DFGSpeculativeJIT32_64.cpp:
2348             - Need to wrap fmod on ARMv7.
2349
2350
2351 2011-11-10  Filip Pizlo  <fpizlo@apple.com>
2352
2353         DFG should not reparse code that was just parsed
2354         https://bugs.webkit.org/show_bug.cgi?id=71977
2355
2356         Reviewed by Geoff Garen.
2357         
2358         The instruction stream of a code block is now kept around until
2359         the next GC. When doing either an optimizing compilation of an
2360         executable, or inlining of an executable, we now try to find the
2361         already preexisting bytecode. If we find it, we don't have to parse.
2362         If we don't find it, we parse as before. Inlining takes the extra
2363         step of caching code blocks, so if the same executable gets inlined
2364         multiple times into the same caller, then we parse it at most once
2365         even if prior to inlining that executable did not have any code
2366         blocks with an instruction stream.
2367         
2368         Also fixed a silly bug where the strict mode for various operations
2369         was being determined by looking at the machine code block rather
2370         than the inlinee.
2371
2372         To enable the delete-on-next-GC policy, I introduced the notion
2373         of an ultra weak finalizer, which anyone can register during
2374         tracing. This is thread-safe (for parallel GC) and
2375         stop-the-world-safe (so calls to free() are postponed until the
2376         world is resumed). This required reusing some facilities previously
2377         created for WeakReferenceHarvester, so I created a common utility
2378         class. I also retweaked the handling of WeakReferenceHarvesters,
2379         since they should be executed during stop-the-world since in the
2380         future we may want to allow them to call drain().
2381         
2382         2% win on SunSpider. 2% win on V8, when run in my harness. Neutral
2383         elsewhere.
2384
2385         * JavaScriptCore.xcodeproj/project.pbxproj:
2386         * bytecode/CodeBlock.cpp:
2387         (JSC::CodeBlock::CodeBlock):
2388         (JSC::CodeBlock::visitAggregate):
2389         (JSC::CodeBlock::copyPostParseDataFrom):
2390         (JSC::CodeBlock::copyPostParseDataFromAlternative):
2391         (JSC::CodeBlock::finalizeUnconditionally):
2392         * bytecode/CodeBlock.h:
2393         (JSC::CodeBlock::canProduceCopyWithBytecode):
2394         (JSC::CodeBlock::discardBytecodeLater):
2395         (JSC::CodeBlock::handleBytecodeDiscardingOpportunity):
2396         (JSC::GlobalCodeBlock::GlobalCodeBlock):
2397         (JSC::ProgramCodeBlock::ProgramCodeBlock):
2398         (JSC::EvalCodeBlock::EvalCodeBlock):
2399         (JSC::FunctionCodeBlock::FunctionCodeBlock):
2400         (JSC::BytecodeDestructionBlocker::BytecodeDestructionBlocker):
2401         (JSC::BytecodeDestructionBlocker::~BytecodeDestructionBlocker):
2402         * dfg/DFGAssemblyHelpers.h:
2403         (JSC::DFG::AssemblyHelpers::strictModeFor):
2404         * dfg/DFGByteCodeCache.h: Added.
2405         (JSC::DFG::CodeBlockKey::CodeBlockKey):
2406         (JSC::DFG::CodeBlockKey::operator==):
2407         (JSC::DFG::CodeBlockKey::hash):
2408         (JSC::DFG::CodeBlockKey::executable):
2409         (JSC::DFG::CodeBlockKey::kind):
2410         (JSC::DFG::CodeBlockKey::isHashTableDeletedValue):
2411         (JSC::DFG::CodeBlockKeyHash::hash):
2412         (JSC::DFG::CodeBlockKeyHash::equal):
2413         (JSC::DFG::ByteCodeCache::ByteCodeCache):
2414         (JSC::DFG::ByteCodeCache::~ByteCodeCache):
2415         (JSC::DFG::ByteCodeCache::get):
2416         * dfg/DFGByteCodeParser.cpp:
2417         (JSC::DFG::ByteCodeParser::handleInlining):
2418         * dfg/DFGJITCodeGenerator32_64.cpp:
2419         (JSC::DFG::JITCodeGenerator::cachedPutById):
2420         * dfg/DFGJITCodeGenerator64.cpp:
2421         (JSC::DFG::JITCodeGenerator::cachedPutById):
2422         * dfg/DFGSpeculativeJIT64.cpp:
2423         (JSC::DFG::SpeculativeJIT::compile):
2424         * heap/Heap.cpp:
2425         (JSC::Heap::finalizeUnconditionally):
2426         (JSC::Heap::markRoots):
2427         (JSC::Heap::collect):
2428         * heap/Heap.h:
2429         * heap/ListableHandler.h: Added.
2430         (JSC::ListableHandler::ListableHandler):
2431         (JSC::ListableHandler::~ListableHandler):
2432         (JSC::ListableHandler::List::List):
2433         (JSC::ListableHandler::List::addNotThreadSafe):
2434         (JSC::ListableHandler::List::addThreadSafe):
2435         (JSC::ListableHandler::List::hasNext):
2436         (JSC::ListableHandler::List::removeNext):
2437         * heap/MarkStack.cpp:
2438         (JSC::MarkStackThreadSharedData::MarkStackThreadSharedData):
2439         (JSC::SlotVisitor::harvestWeakReferences):
2440         (JSC::SlotVisitor::finalizeUnconditionally):
2441         * heap/MarkStack.h:
2442         (JSC::MarkStack::addWeakReferenceHarvester):
2443         (JSC::MarkStack::addUnconditionalFinalizer):
2444         * heap/SlotVisitor.h:
2445         * heap/UnconditionalFinalizer.h: Added.
2446         (JSC::UnconditionalFinalizer::~UnconditionalFinalizer):
2447         * heap/WeakReferenceHarvester.h:
2448         (JSC::WeakReferenceHarvester::WeakReferenceHarvester):
2449         (JSC::WeakReferenceHarvester::~WeakReferenceHarvester):
2450         * runtime/Executable.cpp:
2451         (JSC::EvalExecutable::compileInternal):
2452         (JSC::ProgramExecutable::compileInternal):
2453         (JSC::FunctionExecutable::baselineCodeBlockFor):
2454         (JSC::FunctionExecutable::codeBlockWithBytecodeFor):
2455         (JSC::FunctionExecutable::produceCodeBlockFor):
2456         (JSC::FunctionExecutable::compileForCallInternal):
2457         (JSC::FunctionExecutable::compileForConstructInternal):
2458         * runtime/Executable.h:
2459         (JSC::FunctionExecutable::profiledCodeBlockFor):
2460
2461 2011-11-10  Gavin Barraclough  <barraclough@apple.com>
2462
2463         Add ARMv7 register info for the DFG JIT
2464         https://bugs.webkit.org/show_bug.cgi?id=72050
2465
2466         Reviewed by Geoff Garen.
2467
2468         * dfg/DFGFPRInfo.h:
2469         (JSC::DFG::FPRInfo::toRegister):
2470         (JSC::DFG::FPRInfo::toIndex):
2471         (JSC::DFG::FPRInfo::debugName):
2472         * dfg/DFGGPRInfo.h:
2473         (JSC::DFG::GPRInfo::toRegister):
2474         (JSC::DFG::GPRInfo::toIndex):
2475         (JSC::DFG::GPRInfo::debugName):
2476
2477 2011-11-10  Gavin Barraclough  <barraclough@apple.com>
2478
2479         #ifdef CPU(X86) specific div/mod code in DFGSpeculativeJIT32_64
2480         https://bugs.webkit.org/show_bug.cgi?id=72047
2481
2482         Reviewed by Geoff Garen.
2483
2484         We currently don't attempt to abstract divide through the macro assembler,
2485         due to these instructions commonly having specific requirements. This means
2486         there is architecture specific code in the JIT - #ifdef it, and provide a
2487         common implementation.
2488
2489         * dfg/DFGSpeculativeJIT32_64.cpp:
2490         (JSC::DFG::fmodAsDFGOperation):
2491         (JSC::DFG::SpeculativeJIT::compile):
2492
2493 2011-11-10  Gavin Barraclough  <barraclough@apple.com>
2494
2495         Add ENABLE_VALUE_PROFILER support for ARMv7
2496         https://bugs.webkit.org/show_bug.cgi?id=72043
2497
2498         Reviewed by Geoff Garen.
2499
2500         This requires us to make a bucketCounterRegister available; to do so we'll need to spill more registers on entry to JIT code.
2501
2502         * jit/JITArithmetic32_64.cpp:
2503         (JSC::JIT::emitSlow_op_mod):
2504             - cleanup location of UNUSED_PARAM
2505         * jit/JITStubs.cpp:
2506         (JSC::ctiTrampoline):
2507         (JSC::ctiVMThrowTrampoline):
2508         (JSC::ctiOpThrowNotCaught):
2509         (JSC::JITThunks::JITThunks):
2510         * jit/JITStubs.h:
2511             - Update JITStackFrame structure & asm code to spill more registers.
2512         * jit/JSInterfaceJIT.h:
2513             - Assign a bucketCounterRegister.
2514
2515 2011-11-10  Gavin Barraclough  <barraclough@apple.com>
2516
2517         Fix sampling counters on ARMv7, move add64 functionality to macro assembler
2518         https://bugs.webkit.org/show_bug.cgi?id=72040
2519
2520         Reviewed by Geoff Garen.
2521
2522         The ability to add an integer to a uint64_t in memory is poorly copied in
2523         multiple places & ifdef'ed on architecture, addWithCarry32 is also a badly
2524         designed interface since add32 is not required to set flags (we have no
2525         concept of flags in the macro assembler interface).
2526
2527         * assembler/MacroAssemblerARMv7.h:
2528         (JSC::MacroAssemblerARMv7::add64):
2529         * assembler/MacroAssemblerX86.h:
2530         (JSC::MacroAssemblerX86::add64):
2531         * assembler/MacroAssemblerX86_64.h:
2532         (JSC::MacroAssemblerX86_64::add64):
2533         * dfg/DFGAssemblyHelpers.cpp:
2534         * dfg/DFGAssemblyHelpers.h:
2535         (JSC::DFG::AssemblyHelpers::emitCount):
2536         * dfg/DFGJITCodeGenerator.cpp:
2537         (JSC::DFG::JITCodeGenerator::writeBarrier):
2538         * jit/JIT.h:
2539         * jit/JITInlineMethods.h:
2540         (JSC::JIT::emitCount):
2541
2542 011-11-10  Ryuan Choi  <ryuan.choi@samsung.com>
2543
2544         [CMAKE] Refactoring CMakeLists${PORT}.txt to Platform${PORT}.cmake
2545         https://bugs.webkit.org/show_bug.cgi?id=56705
2546
2547         Reviewed by Adam Roben.
2548
2549         * CMakeLists.txt:
2550         * PlatformEfl.cmake: Renamed from Source/JavaScriptCore/CMakeListsEfl.txt.
2551         * PlatformWinCE.cmake: Renamed from Source/JavaScriptCore/CMakeListsWinCE.txt.
2552         * shell/CMakeLists.txt:
2553         * shell/PlatformEfl.cmake: Renamed from Source/JavaScriptCore/shell/CMakeListsEfl.txt.
2554         * shell/PlatformWinCE.cmake: Renamed from Source/JavaScriptCore/shell/CMakeListsWinCE.txt.
2555         * wtf/CMakeLists.txt:
2556         * wtf/PlatformEfl.cmake: Renamed from Source/JavaScriptCore/wtf/CMakeListsEfl.txt.
2557         * wtf/PlatformWinCE.cmake: Renamed from Source/JavaScriptCore/wtf/CMakeListsWinCE.txt.
2558
2559 2011-11-10  Carlos Garcia Campos  <cgarcia@igalia.com>
2560
2561         Unreviewed. Fix make distcheck build.
2562
2563         * GNUmakefile.list.am: Add missing files.
2564
2565 2011-11-09  Michael Saboff  <msaboff@apple.com>
2566
2567         Towards 8 Bit Strings: Templatize JSC::LiteralParser class by character type
2568         https://bugs.webkit.org/show_bug.cgi?id=71862
2569
2570         Changed LiteralParser to be templatized of character type.
2571
2572         Moved five enums out of class definition to work around a clang compiler defect.
2573
2574         Added lexIdentifier templated method to break out character specific versions.
2575         Added static setParserTokenString templated method to handle setting approriately
2576         sized string pointer.
2577
2578         To keep code in LiteralParser.cpp and keep LiteralParser.h small, the two
2579         flavors of LiteralParser are explicitly instantiated at the end of
2580         LiteralParser.cpp.
2581
2582         Reviewed by Oliver Hunt.
2583
2584         * API/JSValueRef.cpp:
2585         (JSValueMakeFromJSONString):
2586         * JavaScriptCore.exp:
2587         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2588         * interpreter/Interpreter.cpp:
2589         (JSC::Interpreter::callEval):
2590         (JSC::Interpreter::execute):
2591         * runtime/JSGlobalObjectFunctions.cpp:
2592         (JSC::globalFuncEval):
2593         * runtime/JSONObject.cpp:
2594         (JSC::JSONProtoFuncParse):
2595         * runtime/LiteralParser.cpp:
2596         (JSC::isJSONWhiteSpace):
2597         (JSC::::tryJSONPParse):
2598         (JSC::::makeIdentifier):
2599         (JSC::::Lexer::lex):
2600         (JSC::::Lexer::lexIdentifier):
2601         (JSC::::Lexer::next):
2602         (JSC::LChar):
2603         (JSC::UChar):
2604         (JSC::isSafeStringCharacter):
2605         (JSC::::Lexer::lexString):
2606         (JSC::::Lexer::lexNumber):
2607         (JSC::::parse):
2608         * runtime/LiteralParser.h:
2609         (JSC::LiteralParser::LiteralParser):
2610         (JSC::LiteralParser::getErrorMessage):
2611         (JSC::LiteralParser::tryLiteralParse):
2612         (JSC::LiteralParser::Lexer::Lexer):
2613         (JSC::LiteralParser::Lexer::currentToken):
2614         (JSC::LiteralParser::Lexer::getErrorMessage):
2615         * runtime/UString.h:
2616         (JSC::LChar):
2617         (JSC::UChar):
2618         * wtf/text/StringBuilder.cpp:
2619         (WTF::StringBuilder::append):
2620         * wtf/text/StringBuilder.h:
2621         (WTF::StringBuilder::append):
2622
2623 2011-11-09  Filip Pizlo  <fpizlo@apple.com>
2624
2625         Multiple CodeBlock should be able to share the same instruction
2626         stream without copying
2627         https://bugs.webkit.org/show_bug.cgi?id=71978
2628
2629         Reviewed by Oliver Hunt.
2630         
2631         This refactors CodeBlock::m_instructions to be a Vector boxed in a
2632         ref-counted object, but otherwise does not take advantage of this.
2633         
2634         This is performance neutral.
2635
2636         * bytecode/CodeBlock.cpp:
2637         (JSC::CodeBlock::printStructure):
2638         (JSC::CodeBlock::printStructures):
2639         (JSC::CodeBlock::dump):
2640         (JSC::CodeBlock::CodeBlock):
2641         (JSC::CodeBlock::visitAggregate):
2642         (JSC::CodeBlock::shrinkToFit):
2643         * bytecode/CodeBlock.h:
2644         (JSC::CodeBlock::hasInstructions):
2645         (JSC::CodeBlock::numberOfInstructions):
2646         (JSC::CodeBlock::instructions):
2647         * jit/JIT.cpp:
2648         (JSC::JIT::JIT):
2649
2650 2011-11-09  Gavin Barraclough  <barraclough@apple.com>
2651
2652         Renovate ARMv7 assembler/macro-assembler
2653         https://bugs.webkit.org/show_bug.cgi?id=71982
2654
2655         Reviewed by Geoff Garen.
2656
2657         ARMv7Assembler:
2658         * add support for strb (byte stores)
2659         * rename the VMOV_CtoS opcodes (there are currently backwards!)
2660         * add support for adc (add with carry)
2661         * add support for vsqrt, vabs
2662         * add support for vmov (between FPRs, and to/from GPR pairs).
2663         * remove '_F64' postfixes from instructions (these aren't helpful, functions can already be distinguished by their signatures).
2664         * rename vcvt_F64_S32  to vcvt_signedToFloatingPoint, the prior postfix was unhelpful in failing to distinguish the types (S32 indicates a single precision register, but the type could be float, int32, or uint32).
2665         * rename vcvtr_S32_F64 to vcvt_floatingPointToSigned, as for previous, also vcvtr was the incorrect name for the operation (the emitted instruction truncates).
2666
2667         MacroAssemblerARMv7:
2668         * add 3-operand versions of and32, lshift32, or32, rshift32, urshift32, sub32, xor32, 
2669         * add store8, and store32 imm to base-index.
2670         * fix load32WithCompactAddressOffsetPatch to work for all gprs (the fix is a little kludgy but functional; to do better we'll have to also fix the repatching code).
2671         * Update supportsFloating* flags (all features now supported).
2672         * add moveDouble, storeDouble to absolute address, addDouble to absolute address
2673         * add 3-operand double operations.
2674         * implement sqrtDouble/absDouble
2675         * add branchTruncateDoubleToInt32, implement truncateDoubleToInt32
2676         * move should do nothing if src == dest
2677         * branchTest8-on-memory can be implemented in terms of branchTest32-on-register (branchTest8-on-register has been removed).
2678         * add 3-operand branchAdd32, branchSub32, also branchAdd32 absolute address.
2679
2680 2011-11-09  Gavin Barraclough  <barraclough@apple.com>
2681
2682         https://bugs.webkit.org/show_bug.cgi?id=71873
2683
2684         Reviewed by Geoff Garen.
2685
2686         Incrementally re-landing these changes, trying to determine what went wrong.
2687         (The whole patch failed tests on the build bot but worked locally.
2688
2689         * dfg/DFGByteCodeParser.cpp:
2690         (JSC::DFG::ByteCodeParser::handleIntrinsic):
2691
2692 2011-11-09  Filip Pizlo  <fpizlo@apple.com>
2693
2694         DFG OSR exit code should be lazily generated
2695         https://bugs.webkit.org/show_bug.cgi?id=71744
2696
2697         Reviewed by Gavin Barraclough.
2698         
2699         The OSR exit code is now generated the first time it is executed,
2700         rather than right after speculative compilation. Because most OSR
2701         exits are never taken, this should greatly reduce both code size
2702         and compilation time.
2703         
2704         This is a 1% win on SunSpider, and a 1% win on V8 when running in
2705         my harness. No change in V8 in V8's harness (due to the long runs,
2706         so compile time is not an issue) and no change in Kraken (again,
2707         long runs of small code so compile time has no measurable effect).
2708
2709         * CMakeListsEfl.txt:
2710         * GNUmakefile.list.am:
2711         * JavaScriptCore.xcodeproj/project.pbxproj:
2712         * Target.pri:
2713         * assembler/AbstractMacroAssembler.h:
2714         * assembler/MacroAssemblerX86.h:
2715         (JSC::MacroAssemblerX86::jump):
2716         * assembler/MacroAssemblerX86_64.h:
2717         (JSC::MacroAssemblerX86_64::jump):
2718         * assembler/X86Assembler.h:
2719         (JSC::X86Assembler::jmp_m):
2720         * bytecode/CodeBlock.h:
2721         (JSC::CodeBlock::createDFGDataIfNecessary):
2722         (JSC::CodeBlock::appendDFGOSREntryData):
2723         (JSC::CodeBlock::numberOfDFGOSREntries):
2724         (JSC::CodeBlock::dfgOSREntryData):
2725         (JSC::CodeBlock::dfgOSREntryDataForBytecodeIndex):
2726         (JSC::CodeBlock::appendOSRExit):
2727         (JSC::CodeBlock::appendSpeculationRecovery):
2728         (JSC::CodeBlock::numberOfOSRExits):
2729         (JSC::CodeBlock::numberOfSpeculationRecoveries):
2730         (JSC::CodeBlock::osrExit):
2731         (JSC::CodeBlock::speculationRecovery):
2732         * dfg/DFGAssemblyHelpers.h:
2733         (JSC::DFG::AssemblyHelpers::debugCall):
2734         * dfg/DFGCorrectableJumpPoint.cpp: Added.
2735         (JSC::DFG::CorrectableJumpPoint::codeLocationForRepatch):
2736         * dfg/DFGCorrectableJumpPoint.h: Added.
2737         (JSC::DFG::CorrectableJumpPoint::CorrectableJumpPoint):
2738         (JSC::DFG::CorrectableJumpPoint::switchToLateJump):
2739         (JSC::DFG::CorrectableJumpPoint::correctInitialJump):
2740         (JSC::DFG::CorrectableJumpPoint::correctLateJump):
2741         (JSC::DFG::CorrectableJumpPoint::initialJump):
2742         (JSC::DFG::CorrectableJumpPoint::lateJump):
2743         (JSC::DFG::CorrectableJumpPoint::correctJump):
2744         (JSC::DFG::CorrectableJumpPoint::getJump):
2745         * dfg/DFGJITCompiler.cpp:
2746         (JSC::DFG::JITCompiler::linkOSRExits):
2747         (JSC::DFG::JITCompiler::compileBody):
2748         (JSC::DFG::JITCompiler::link):
2749         * dfg/DFGJITCompiler.h:
2750         * dfg/DFGOSRExit.cpp: Added.
2751         (JSC::DFG::OSRExit::OSRExit):
2752         (JSC::DFG::OSRExit::dump):
2753         * dfg/DFGOSRExit.h:
2754         * dfg/DFGOSRExitCompiler.cpp: Added.
2755         * dfg/DFGOSRExitCompiler.h:
2756         * dfg/DFGOSRExitCompiler32_64.cpp:
2757         (JSC::DFG::OSRExitCompiler::compileExit):
2758         * dfg/DFGOSRExitCompiler64.cpp:
2759         (JSC::DFG::OSRExitCompiler::compileExit):
2760         * dfg/DFGOperations.cpp:
2761         * dfg/DFGSpeculativeJIT.cpp:
2762         * dfg/DFGSpeculativeJIT.h:
2763         (JSC::DFG::SpeculativeJIT::speculationCheck):
2764         * dfg/DFGThunks.cpp: Added.
2765         (JSC::DFG::osrExitGenerationThunkGenerator):
2766         * dfg/DFGThunks.h: Added.
2767         * jit/JITCode.h:
2768         (JSC::JITCode::dataAddressAtOffset):
2769         * runtime/JSGlobalData.h:
2770
2771 2011-11-09  Mark Hahnenberg  <mhahnenberg@apple.com>
2772
2773         Fixing build breakage
2774
2775         Unreviewed build fix
2776
2777         * JavaScriptCore.exp:
2778         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2779
2780 2011-11-09  Mark Hahnenberg  <mhahnenberg@apple.com>
2781
2782         De-virtualize JSVariableObject::isDynamicScope
2783         https://bugs.webkit.org/show_bug.cgi?id=71933
2784
2785         Reviewed by Geoffrey Garen.
2786
2787         * runtime/JSActivation.cpp:
2788         * runtime/JSActivation.h: Inlined and de-virtualized isDynamicScope
2789         (JSC::JSActivation::isDynamicScope):
2790         * runtime/JSGlobalObject.cpp:
2791         * runtime/JSGlobalObject.h: Inlined and de-virtualized isDynamicScope
2792         (JSC::JSGlobalObject::isDynamicScope):
2793         * runtime/JSStaticScopeObject.cpp:
2794         * runtime/JSStaticScopeObject.h: Inlined and de-virtualized isDynamicScope
2795         (JSC::JSStaticScopeObject::createStructure): Changed createStructure to use new JSType
2796         (JSC::JSStaticScopeObject::isDynamicScope):
2797         * runtime/JSType.h: Added new type for JSStaticScopeObject
2798         * runtime/JSVariableObject.cpp: De-virtualized and added an implementation that checks the 
2799         object's type and calls the corresponding implementation.
2800         (JSC::JSVariableObject::isDynamicScope):
2801         * runtime/JSVariableObject.h:
2802
2803 2011-11-09  Mark Hahnenberg  <mhahnenberg@apple.com>
2804
2805         De-virtualize JSGlobalObject::hasOwnPropertyForWrite
2806         https://bugs.webkit.org/show_bug.cgi?id=71934
2807
2808         Reviewed by Geoffrey Garen.
2809
2810         * runtime/JSGlobalObject.h: Removed the virtual-ness of hasOwnPropertyForWrite since nobody overrides it.
2811
2812 2011-11-09  Gavin Barraclough  <barraclough@apple.com>
2813
2814         https://bugs.webkit.org/show_bug.cgi?id=71873
2815
2816         Reviewed by Geoff Garen.
2817
2818         Incrementally re-landing these changes, trying to determine what went wrong.
2819         (The whole patch failed tests on the build bot but worked locally.
2820
2821         * assembler/MacroAssemblerARM.h:
2822         (JSC::MacroAssemblerARM::absDouble):
2823         * assembler/MacroAssemblerARMv7.h:
2824         * assembler/MacroAssemblerMIPS.h:
2825         (JSC::MacroAssemblerMIPS::absDouble):
2826         * assembler/MacroAssemblerSH4.h:
2827         (JSC::MacroAssemblerSH4::absDouble):
2828         * assembler/MacroAssemblerX86.h:
2829         (JSC::MacroAssemblerX86::absDouble):
2830         * assembler/MacroAssemblerX86Common.h:
2831         * assembler/MacroAssemblerX86_64.h:
2832         (JSC::MacroAssemblerX86_64::absDouble):
2833         * dfg/DFGSpeculativeJIT32_64.cpp:
2834         (JSC::DFG::SpeculativeJIT::compile):
2835         * dfg/DFGSpeculativeJIT64.cpp:
2836         (JSC::DFG::SpeculativeJIT::compile):
2837         * jit/ThunkGenerators.cpp:
2838         (JSC::absThunkGenerator):
2839
2840 2011-11-09  Mark Hahnenberg  <mhahnenberg@apple.com>
2841
2842         De-virtualize JSObject::getOwnPropertyDescriptor
2843         https://bugs.webkit.org/show_bug.cgi?id=71523
2844
2845         Reviewed by Sam Weinig.
2846
2847         Added getOwnPropertyDescriptor to the MethodTable, changed all of the 
2848         virtual versions of getOwnPropertyDescriptor to static ones, and 
2849         changed all of the call sites to the corresponding lookup in the MethodTable.
2850
2851         * API/JSCallbackObject.h:
2852         * API/JSCallbackObjectFunctions.h:
2853         (JSC::::getOwnPropertyDescriptor):
2854         * JavaScriptCore.exp:
2855         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2856         * debugger/DebuggerActivation.cpp:
2857         (JSC::DebuggerActivation::getOwnPropertyDescriptor):
2858         * debugger/DebuggerActivation.h:
2859         * runtime/Arguments.cpp:
2860         (JSC::Arguments::getOwnPropertyDescriptor):
2861         * runtime/Arguments.h:
2862         * runtime/ArrayConstructor.cpp:
2863         (JSC::ArrayConstructor::getOwnPropertyDescriptor):
2864         * runtime/ArrayConstructor.h:
2865         * runtime/ArrayPrototype.cpp:
2866         (JSC::ArrayPrototype::getOwnPropertyDescriptor):
2867         * runtime/ArrayPrototype.h:
2868         * runtime/BooleanPrototype.cpp:
2869         (JSC::BooleanPrototype::getOwnPropertyDescriptor):
2870         * runtime/BooleanPrototype.h:
2871         * runtime/ClassInfo.h:
2872         * runtime/DateConstructor.cpp:
2873         (JSC::DateConstructor::getOwnPropertyDescriptor):
2874         * runtime/DateConstructor.h:
2875         * runtime/DatePrototype.cpp:
2876         (JSC::DatePrototype::getOwnPropertyDescriptor):
2877         * runtime/DatePrototype.h:
2878         * runtime/ErrorPrototype.cpp:
2879         (JSC::ErrorPrototype::getOwnPropertyDescriptor):
2880         * runtime/ErrorPrototype.h:
2881         * runtime/JSArray.cpp:
2882         (JSC::JSArray::getOwnPropertyDescriptor):
2883         * runtime/JSArray.h:
2884         * runtime/JSByteArray.cpp:
2885         (JSC::JSByteArray::getOwnPropertyDescriptor):
2886         * runtime/JSByteArray.h:
2887         * runtime/JSCell.cpp:
2888         (JSC::JSCell::getOwnPropertyDescriptor):
2889         * runtime/JSCell.h:
2890         * runtime/JSFunction.cpp:
2891         (JSC::JSFunction::getOwnPropertyDescriptor):
2892         * runtime/JSFunction.h:
2893         * runtime/JSGlobalObject.cpp:
2894         (JSC::JSGlobalObject::getOwnPropertyDescriptor):
2895         * runtime/JSGlobalObject.h:
2896         * runtime/JSNotAnObject.cpp:
2897         (JSC::JSNotAnObject::getOwnPropertyDescriptor):
2898         * runtime/JSNotAnObject.h:
2899         * runtime/JSONObject.cpp:
2900         (JSC::JSONObject::getOwnPropertyDescriptor):
2901         * runtime/JSONObject.h:
2902         * runtime/JSObject.cpp:
2903         (JSC::JSObject::vtableAnchor):
2904         (JSC::JSObject::propertyIsEnumerable):
2905         (JSC::JSObject::getOwnPropertyDescriptor):
2906         (JSC::JSObject::getPropertyDescriptor):
2907         (JSC::JSObject::defineOwnProperty):
2908         * runtime/JSObject.h:
2909         * runtime/JSString.cpp: Removed getOwnPropertyDescriptor, since this seems to be a relic from a 
2910         bygone era when getOwnPropertyDescriptor was rooted in JSCell rather than JSObject.  There were 
2911         no call sites for this version of getOwnPropertyDescriptor in the entire project.
2912         * runtime/JSString.h:
2913         * runtime/Lookup.h:
2914         (JSC::getStaticPropertyDescriptor):
2915         (JSC::getStaticFunctionDescriptor):
2916         (JSC::getStaticValueDescriptor):
2917         * runtime/MathObject.cpp:
2918         (JSC::MathObject::getOwnPropertyDescriptor):
2919         * runtime/MathObject.h:
2920         * runtime/NumberConstructor.cpp:
2921         (JSC::NumberConstructor::getOwnPropertyDescriptor):
2922         * runtime/NumberConstructor.h:
2923         * runtime/NumberPrototype.cpp:
2924         (JSC::NumberPrototype::getOwnPropertyDescriptor):
2925         * runtime/NumberPrototype.h:
2926         * runtime/ObjectConstructor.cpp:
2927         (JSC::ObjectConstructor::getOwnPropertyDescriptor):
2928         (JSC::objectConstructorGetOwnPropertyDescriptor):
2929         * runtime/ObjectConstructor.h:
2930         * runtime/ObjectPrototype.cpp:
2931         (JSC::ObjectPrototype::getOwnPropertyDescriptor):
2932         * runtime/ObjectPrototype.h:
2933         * runtime/RegExpConstructor.cpp:
2934         (JSC::RegExpConstructor::getOwnPropertyDescriptor):
2935         * runtime/RegExpConstructor.h:
2936         * runtime/RegExpMatchesArray.h:
2937         (JSC::RegExpMatchesArray::getOwnPropertyDescriptor):
2938         * runtime/RegExpObject.cpp:
2939         (JSC::RegExpObject::getOwnPropertyDescriptor):
2940         * runtime/RegExpObject.h:
2941         * runtime/RegExpPrototype.cpp:
2942         (JSC::RegExpPrototype::getOwnPropertyDescriptor):
2943         * runtime/RegExpPrototype.h:
2944         * runtime/StringConstructor.cpp:
2945         (JSC::StringConstructor::getOwnPropertyDescriptor):
2946         * runtime/StringConstructor.h:
2947         * runtime/StringObject.cpp:
2948         (JSC::StringObject::vtableAnchor): Added to prevent a weak vtable.
2949         (JSC::StringObject::getOwnPropertyDescriptor):
2950         * runtime/StringObject.h:
2951         * runtime/StringPrototype.cpp:
2952         (JSC::StringPrototype::getOwnPropertyDescriptor):
2953         * runtime/StringPrototype.h:
2954
2955 2011-11-09  Gavin Barraclough  <barraclough@apple.com>
2956
2957         https://bugs.webkit.org/show_bug.cgi?id=71873
2958
2959         Reviewed by Geoff Garen.
2960
2961         Incrementally re-landing these changes, trying to determine what went wrong.
2962         (The whole patch failed tests on the build bot but worked locally.
2963
2964         * assembler/MacroAssemblerARM.h:
2965         (JSC::MacroAssemblerARM::supportsFloatingPoint):
2966         (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
2967         (JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
2968         (JSC::MacroAssemblerARM::supportsFloatingPointAbs):
2969         * assembler/MacroAssemblerARMv7.h:
2970         (JSC::MacroAssemblerARMv7::supportsFloatingPoint):
2971         (JSC::MacroAssemblerARMv7::supportsFloatingPointTruncate):
2972         (JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt):
2973         (JSC::MacroAssemblerARMv7::supportsFloatingPointAbs):
2974         * assembler/MacroAssemblerMIPS.h:
2975         (JSC::MacroAssemblerMIPS::supportsFloatingPoint):
2976         (JSC::MacroAssemblerMIPS::supportsFloatingPointTruncate):
2977         (JSC::MacroAssemblerMIPS::supportsFloatingPointSqrt):
2978         (JSC::MacroAssemblerMIPS::supportsFloatingPointAbs):
2979         * assembler/MacroAssemblerSH4.h:
2980         (JSC::MacroAssemblerSH4::supportsFloatingPoint):
2981         (JSC::MacroAssemblerSH4::supportsFloatingPointTruncate):
2982         (JSC::MacroAssemblerSH4::supportsFloatingPointSqrt):
2983         (JSC::MacroAssemblerSH4::supportsFloatingPointAbs):
2984         * assembler/MacroAssemblerX86.h:
2985         (JSC::MacroAssemblerX86::supportsFloatingPoint):
2986         (JSC::MacroAssemblerX86::supportsFloatingPointTruncate):
2987         (JSC::MacroAssemblerX86::supportsFloatingPointSqrt):
2988         (JSC::MacroAssemblerX86::supportsFloatingPointAbs):
2989         * assembler/MacroAssemblerX86_64.h:
2990         (JSC::MacroAssemblerX86_64::supportsFloatingPoint):
2991         (JSC::MacroAssemblerX86_64::supportsFloatingPointTruncate):
2992         (JSC::MacroAssemblerX86_64::supportsFloatingPointSqrt):
2993         (JSC::MacroAssemblerX86_64::supportsFloatingPointAbs):
2994         * jit/ThunkGenerators.cpp:
2995         (JSC::absThunkGenerator):
2996
2997 2011-11-08  Darin Adler  <darin@apple.com>
2998
2999         Add code path in HashTable for emptyValueIsZero that does not require copying the empty value
3000         https://bugs.webkit.org/show_bug.cgi?id=71875
3001
3002         Reviewed by Anders Carlsson.
3003
3004         This is a step along the path of making OwnPtr work as HashMap value types.
3005
3006         * wtf/Alignment.h: Moved the AlignedBufferChar and AlignedBuffer types from Vector.h here.
3007         Also fixed include style. To include other WTF headers inside WTF, we use "" includes.
3008         I did not change the code to fix style checker complaints.
3009
3010         * wtf/HashTable.h: Added includes as needed and fixed include style.
3011         (WTF::doubleHash): Removed the uneeeded and inappropriate "static" in this function, which
3012         gave it internal linkage for no good reason.
3013         (WTF::HashTable::checkKey): Made this use AlignedBuffer for the deleted value check to avoid
3014         construction/destruction problems instead of doing the trick where we construct and destroy
3015         an empty value twice. It's cleaner and simpler and avoids copying the empty value.
3016         (WTF::HashTable::initializeBucket): Specialized initializeBucket to use memset when the
3017         empty value is zero rather than copying an empty value.
3018
3019         * wtf/Vector.h: Moved the AlignedBufferChar and AlignedBuffer types into Alignment.h.
3020
3021 2011-11-09  Gabor Rapcsanyi  <rgabor@webkit.org>
3022
3023         Buildfix for 32bit debug mode.
3024
3025         Reviewed by Csaba Osztrogonác.
3026
3027         * dfg/DFGAbstractState.cpp:
3028         (JSC::DFG::AbstractState::dump):
3029         * dfg/DFGGraph.cpp:
3030         (JSC::DFG::Graph::dump):
3031
3032 2011-11-09  Andy Wingo  <wingo@igalia.com>
3033
3034         Enable the DFG JIT on X86-64 Linux platforms
3035         https://bugs.webkit.org/show_bug.cgi?id=71373
3036
3037         Reviewed by Csaba Osztrogonác.
3038
3039         * wtf/Platform.h (ENABLE_DFG_JIT): Enable the DFG JIT on the
3040         x86-64 GNU/Linux platform.
3041         * CMakeListsEfl.txt: Add JSValue64 implementations to EFL build.
3042
3043 2011-11-09  Csaba Osztrogonác  <ossy@webkit.org>
3044
3045         Enable the DFG JIT on x86-64 Linux platforms
3046         https://bugs.webkit.org/show_bug.cgi?id=71373
3047
3048         Enable DFG JIT by default on X86 Linux and Mac platforms
3049         https://bugs.webkit.org/show_bug.cgi?id=71686
3050
3051         Buildfix for stricter compilers: -Werror=unused-but-set-variable
3052
3053         Reviewed by Zoltan Herczeg.
3054
3055         * dfg/DFGSpeculativeJIT.cpp:
3056         (JSC::DFG::SpeculativeJIT::compilePutByValForByteArray):
3057         * dfg/DFGSpeculativeJIT32_64.cpp:
3058         (JSC::DFG::SpeculativeJIT::compile):
3059         * dfg/DFGSpeculativeJIT64.cpp:
3060         (JSC::DFG::SpeculativeJIT::compile):
3061
3062 2011-11-09  Sheriff Bot  <webkit.review.bot@gmail.com>
3063
3064         Unreviewed, rolling out r99678.
3065         http://trac.webkit.org/changeset/99678
3066         https://bugs.webkit.org/show_bug.cgi?id=71882
3067
3068         broke the build with -Werror=unused-but-set-variable
3069         (Requested by tronical_ on #webkit).
3070
3071         * CMakeListsEfl.txt:
3072         * wtf/Platform.h:
3073
3074 2011-11-09  Andy Wingo  <wingo@igalia.com>
3075
3076         Enable the DFG JIT on X86-64 Linux platforms
3077         https://bugs.webkit.org/show_bug.cgi?id=71373
3078
3079         Reviewed by Filip Pizlo.
3080
3081         * wtf/Platform.h (ENABLE_DFG_JIT): Enable the DFG JIT on the
3082         x86-64 GNU/Linux platform.
3083         * CMakeListsEfl.txt: Add JSValue64 implementations to EFL build.
3084
3085 2011-11-09  Mark Hahnenberg  <mhahnenberg@apple.com>
3086
3087         De-virtualize JSObject::defineOwnProperty
3088         https://bugs.webkit.org/show_bug.cgi?id=71429
3089
3090         Reviewed by Geoffrey Garen.
3091
3092         Added defineOwnProperty to the MethodTable, changed all the virtual 
3093         implementations of defineOwnProperty to static ones, and replaced 
3094         all call sites with corresponding lookups in the MethodTable.
3095
3096         * JavaScriptCore.exp:
3097         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3098         * runtime/Arguments.cpp:
3099         (JSC::Arguments::createStrictModeCallerIfNecessary):
3100         (JSC::Arguments::createStrictModeCalleeIfNecessary):
3101         * runtime/ClassInfo.h:
3102         * runtime/JSCell.cpp:
3103         (JSC::JSCell::defineOwnProperty):
3104         * runtime/JSCell.h:
3105         * runtime/JSObject.cpp:
3106         (JSC::JSObject::defineOwnProperty):
3107         * runtime/JSObject.h:
3108         * runtime/ObjectConstructor.cpp:
3109         (JSC::objectConstructorDefineProperty):
3110         (JSC::defineProperties):
3111
3112 2011-11-09  Simon Hausmann  <simon.hausmann@nokia.com>
3113
3114         [Qt] Build system cleanup
3115         https://bugs.webkit.org/show_bug.cgi?id=71815
3116
3117         Reviewed by Kenneth Rohde Christiansen.
3118
3119         * wtf/wtf.pri: Moved the glib dependency to javascriptcore.prf.
3120
3121 2011-11-08  Simon Hausmann  <simon.hausmann@nokia.com>
3122
3123         [Qt] Replace use of QApplication with QGuiApplication
3124         https://bugs.webkit.org/show_bug.cgi?id=71794
3125
3126         Reviewed by Andreas Kling.
3127
3128         Add compat headers for use when building with Qt 4: QGuiApplication
3129         is typedef'ed to QApplication.
3130
3131         * wtf/qt/compat/QGuiApplication: Added.
3132         * wtf/qt/compat/qguiapplication.h: Added.
3133
3134 2011-11-08  Sheriff Bot  <webkit.review.bot@gmail.com>
3135
3136         Unreviewed, rolling out r99647.
3137         http://trac.webkit.org/changeset/99647
3138         https://bugs.webkit.org/show_bug.cgi?id=71876
3139
3140         It broke jsc and layout tests on all bot (Requested by
3141         Ossy_night on #webkit).
3142
3143         * assembler/MacroAssemblerARM.h:
3144         (JSC::MacroAssemblerARM::supportsFloatingPoint):
3145         (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
3146         (JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
3147         (JSC::MacroAssemblerARM::supportsDoubleBitops):
3148         (JSC::MacroAssemblerARM::andnotDouble):
3149         * assembler/MacroAssemblerARMv7.h:
3150         (JSC::MacroAssemblerARMv7::supportsFloatingPoint):
3151         (JSC::MacroAssemblerARMv7::supportsFloatingPointTruncate):
3152         (JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt):
3153         (JSC::MacroAssemblerARMv7::supportsDoubleBitops):
3154         * assembler/MacroAssemblerMIPS.h:
3155         (JSC::MacroAssemblerMIPS::andnotDouble):
3156         (JSC::MacroAssemblerMIPS::supportsFloatingPoint):
3157         (JSC::MacroAssemblerMIPS::supportsFloatingPointTruncate):
3158         (JSC::MacroAssemblerMIPS::supportsFloatingPointSqrt):
3159         (JSC::MacroAssemblerMIPS::supportsDoubleBitops):
3160         * assembler/MacroAssemblerSH4.h:
3161         (JSC::MacroAssemblerSH4::supportsFloatingPoint):
3162         (JSC::MacroAssemblerSH4::supportsFloatingPointTruncate):
3163         (JSC::MacroAssemblerSH4::supportsFloatingPointSqrt):
3164         (JSC::MacroAssemblerSH4::supportsDoubleBitops):
3165         (JSC::MacroAssemblerSH4::andnotDouble):
3166         * assembler/MacroAssemblerX86.h:
3167         (JSC::MacroAssemblerX86::MacroAssemblerX86):
3168         (JSC::MacroAssemblerX86::supportsFloatingPoint):
3169         (JSC::MacroAssemblerX86::supportsFloatingPointTruncate):
3170         (JSC::MacroAssemblerX86::supportsFloatingPointSqrt):
3171         (JSC::MacroAssemblerX86::supportsDoubleBitops):
3172         * assembler/MacroAssemblerX86Common.h:
3173         (JSC::MacroAssemblerX86Common::andnotDouble):
3174         * assembler/MacroAssemblerX86_64.h:
3175         (JSC::MacroAssemblerX86_64::supportsFloatingPoint):
3176         (JSC::MacroAssemblerX86_64::supportsFloatingPointTruncate):
3177         (JSC::MacroAssemblerX86_64::supportsFloatingPointSqrt):
3178         (JSC::MacroAssemblerX86_64::supportsDoubleBitops):
3179         * assembler/X86Assembler.h:
3180         * dfg/DFGByteCodeParser.cpp:
3181         (JSC::DFG::ByteCodeParser::handleIntrinsic):
3182         * dfg/DFGSpeculativeJIT32_64.cpp:
3183         (JSC::DFG::SpeculativeJIT::compile):
3184         * dfg/DFGSpeculativeJIT64.cpp:
3185         (JSC::DFG::SpeculativeJIT::compile):
3186         * jit/ThunkGenerators.cpp:
3187         (JSC::absThunkGenerator):
3188         * runtime/JSGlobalData.cpp:
3189
3190 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
3191
3192         Better abstract 'abs' operation through the MacroAssembler.
3193         https://bugs.webkit.org/show_bug.cgi?id=71873
3194
3195         Reviewed by Geoff Garen.
3196
3197         Currently the x86 specific instruction sequence to perform a double abs
3198         is duplicated throughout the JITs / thunk generators.
3199
3200         * assembler/MacroAssemblerARM.h:
3201         (JSC::MacroAssemblerARM::supportsFloatingPoint):
3202         (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
3203         (JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
3204         (JSC::MacroAssemblerARM::supportsFloatingPointAbs):
3205         (JSC::MacroAssemblerARM::absDouble):
3206             - Renamed supportsFloatingPointAbs, make these methods static so that
3207               we can check the JIT's capabilites before we begin compilation.
3208         * assembler/MacroAssemblerARMv7.h:
3209         (JSC::MacroAssemblerARMv7::supportsFloatingPoint):
3210         (JSC::MacroAssemblerARMv7::supportsFloatingPointTruncate):
3211         (JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt):
3212         (JSC::MacroAssemblerARMv7::supportsFloatingPointAbs):
3213             - Renamed supportsFloatingPointAbs, make these methods static so that
3214               we can check the JIT's capabilites before we begin compilation.
3215         * assembler/MacroAssemblerMIPS.h:
3216         (JSC::MacroAssemblerMIPS::absDouble):
3217         (JSC::MacroAssemblerMIPS::supportsFloatingPoint):
3218         (JSC::MacroAssemblerMIPS::supportsFloatingPointTruncate):
3219         (JSC::MacroAssemblerMIPS::supportsFloatingPointSqrt):
3220         (JSC::MacroAssemblerMIPS::supportsFloatingPointAbs):
3221             - Renamed supportsFloatingPointAbs, make these methods static so that
3222               we can check the JIT's capabilites before we begin compilation.
3223         * assembler/MacroAssemblerSH4.h:
3224         (JSC::MacroAssemblerSH4::supportsFloatingPoint):
3225         (JSC::MacroAssemblerSH4::supportsFloatingPointTruncate):
3226         (JSC::MacroAssemblerSH4::supportsFloatingPointSqrt):
3227         (JSC::MacroAssemblerSH4::supportsFloatingPointAbs):
3228         (JSC::MacroAssemblerSH4::absDouble):
3229             - Renamed supportsFloatingPointAbs, make these methods static so that
3230               we can check the JIT's capabilites before we begin compilation.
3231         * assembler/MacroAssemblerX86.h:
3232         (JSC::MacroAssemblerX86::absDouble):
3233         (JSC::MacroAssemblerX86::supportsFloatingPoint):
3234         (JSC::MacroAssemblerX86::supportsFloatingPointTruncate):
3235         (JSC::MacroAssemblerX86::supportsFloatingPointSqrt):
3236         (JSC::MacroAssemblerX86::supportsFloatingPointAbs):
3237             - Made supports* methods static so that we can check the JIT's
3238               capabilites before we begin compilation. Added absDouble.
3239         * assembler/MacroAssemblerX86Common.h:
3240             - Removed andnotDouble, added s_maskSignBit.
3241         * assembler/MacroAssemblerX86_64.h:
3242         (JSC::MacroAssemblerX86_64::absDouble):
3243         (JSC::MacroAssemblerX86_64::supportsFloatingPoint):
3244         (JSC::MacroAssemblerX86_64::supportsFloatingPointTruncate):
3245         (JSC::MacroAssemblerX86_64::supportsFloatingPointSqrt):
3246         (JSC::MacroAssemblerX86_64::supportsFloatingPointAbs):
3247             - Made supports* methods static so that we can check the JIT's
3248               capabilites before we begin compilation. Added absDouble.
3249         * assembler/X86Assembler.h:
3250         (JSC::X86Assembler::andpd_rr):
3251         (JSC::X86Assembler::andpd_mr):
3252             - Added support for andpd instruction.
3253         * dfg/DFGByteCodeParser.cpp:
3254         (JSC::DFG::ByteCodeParser::handleIntrinsic):
3255             - Added checks for supportsFloatingPointAbs, supportsFloatingPointSqrt.
3256         * dfg/DFGSpeculativeJIT32_64.cpp:
3257         (JSC::DFG::SpeculativeJIT::compile):
3258             - Switched to use doubleAbs, we can now also reuse the operand register for the result.
3259         * dfg/DFGSpeculativeJIT64.cpp:
3260         (JSC::DFG::SpeculativeJIT::compile):
3261             - Switched to use doubleAbs, we can now also reuse the operand register for the result.
3262         * jit/ThunkGenerators.cpp:
3263             - Switched to use doubleAbs.
3264         (JSC::absThunkGenerator):
3265         * runtime/JSGlobalData.cpp:
3266             - Declared MacroAssemblerX86Common::s_maskSignBit here.
3267               This is a little ugly, but it doesn't seem worth adding a whole extra .cpp
3268               to the compile for just one constant.
3269
3270 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
3271
3272         Move duplicates of SYMBOL_STRING* macros to the single location
3273         https://bugs.webkit.org/show_bug.cgi?id=71456
3274
3275         Reviewed by Sam Weinig.
3276
3277         * JavaScriptCore.xcodeproj/project.pbxproj:
3278         * dfg/DFGOperations.cpp:
3279         * jit/JITStubs.cpp:
3280         * wtf/InlineASM.h: Added.
3281             - Moved asm related macros.
3282
3283 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
3284
3285         Move code to handle 8bit regs from X86Assembler to MacroAssembler
3286         https://bugs.webkit.org/show_bug.cgi?id=71867
3287
3288         Reviewed by Oliver Hunt.
3289
3290         This code is fine, but is in the wrong place really. X86 assembler should
3291         basically just format up exactly the instruction you request - not expand
3292         out to a set of instructions (that is what the macro assembler layer is
3293         for!). For other 8-bit ops, on X86 we don't guard against clients accessing
3294         the XH registers.
3295
3296         * assembler/MacroAssemblerX86Common.h:
3297         (JSC::MacroAssemblerX86Common::store8):
3298         * assembler/X86Assembler.h:
3299         (JSC::X86Assembler::movb_rm):
3300             - moved some code.
3301
3302 2011-11-08  Filip Pizlo  <fpizlo@apple.com>
3303
3304         Unreviewed build fix for GTK.
3305
3306         * GNUmakefile.list.am:
3307
3308 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
3309
3310         Build fix.
3311
3312         * assembler/X86Assembler.h:
3313
3314 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
3315
3316         Errrk, failed to commit this in last change.
3317
3318         * assembler/X86Assembler.h:
3319
3320 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
3321
3322         Remove an unused method.
3323
3324         Rubber stamped by Geoff Garen.
3325
3326         * assembler/AbstractMacroAssembler.h:
3327         * assembler/AssemblerBuffer.h:
3328             - removed rewindToLabel.
3329
3330 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
3331
3332         Fix OSR entry points to calculate offsets correctly WRT to branch compaction.
3333         https://bugs.webkit.org/show_bug.cgi?id=71864
3334
3335         Reviewed by Filip Pizlo.
3336
3337         * assembler/LinkBuffer.h:
3338         (JSC::LinkBuffer::offsetOf):
3339             - We use this to return the offsets into the code of the entry points.
3340         * dfg/DFGJITCompiler.cpp:
3341         (JSC::DFG::JITCompiler::compileEntry):
3342         (JSC::DFG::JITCompiler::compileBody):
3343         (JSC::DFG::JITCompiler::compile):
3344         (JSC::DFG::JITCompiler::compileFunction):
3345             - Move the construction of the speculative JIT outside of
3346               compileBody, such that it is still available to link the
3347               OSR entry points at the point we are linking.
3348         * dfg/DFGJITCompiler.h:
3349         (JSC::DFG::JITCompiler::noticeOSREntry):
3350             - Pass the label of the block & linkbuffer into noticeOSREntry.
3351         * dfg/DFGSpeculativeJIT.cpp:
3352         (JSC::DFG::SpeculativeJIT::compile):
3353         (JSC::DFG::SpeculativeJIT::linkOSREntries):
3354             - Moved call to noticeOSREntry until we we linking.
3355         * dfg/DFGSpeculativeJIT.h:
3356         * jit/JIT.cpp:
3357         (JSC::JIT::privateCompileMainPass):
3358         (JSC::JIT::privateCompileSlowCases):
3359         (JSC::JIT::privateCompile):
3360             - Moved calculation of entries until we we linking.
3361         * jit/JIT.h:
3362             - Removed some members.
3363
3364 2011-11-08  Filip Pizlo  <fpizlo@apple.com>
3365
3366         DFG OSR exit code should be generated by a separate compiler, not
3367         related to DFG::JITCompiler
3368         https://bugs.webkit.org/show_bug.cgi?id=71787
3369
3370         Reviewed by Gavin Barraclough.
3371         
3372         Moves the exitSpeculativeWithOSR() method from JITCompiler to
3373         OSRExitCompiler::compileExit().
3374
3375         * CMakeListsEfl.txt:
3376         * JavaScriptCore.xcodeproj/project.pbxproj:
3377         * Target.pri:
3378         * dfg/DFGJITCompiler.cpp:
3379         (JSC::DFG::JITCompiler::linkOSRExits):
3380         * dfg/DFGJITCompiler32_64.cpp: Removed.
3381         * dfg/DFGOSRExitCompiler.h: Added.
3382         (JSC::DFG::OSRExitCompiler::OSRExitCompiler):
3383         * dfg/DFGOSRExitCompiler32_64.cpp: Added.
3384         (JSC::DFG::OSRExitCompiler::compileExit):
3385         * dfg/DFGOSRExitCompiler64.cpp: Added.
3386         (JSC::DFG::OSRExitCompiler::compileExit):
3387         * runtime/JSValue.h:
3388
3389 2011-11-08  Filip Pizlo  <fpizlo@apple.com>
3390
3391         Basic DFG definitions should be moved out of DFGNode.h
3392         https://bugs.webkit.org/show_bug.cgi?id=71861
3393
3394         Rubber-stamped by Gavin Barraclough.
3395
3396         * JavaScriptCore.xcodeproj/project.pbxproj:
3397         * dfg/DFGCommon.h: Added.
3398         (JSC::DFG::NodeIndexTraits::defaultValue):
3399         * dfg/DFGNode.h:
3400         * dfg/DFGOSRExit.h:
3401         * dfg/DFGRegisterBank.h:
3402
3403 2011-11-08  Michael Saboff  <msaboff@apple.com>
3404
3405         Towards 8 Bit Strings: Templatize JSC::Parser class by Lexer type
3406         https://bugs.webkit.org/show_bug.cgi?id=71761
3407
3408         Templatized Parser based on Lexer<T>. Moved two enums,
3409         SourceElementsMode and FunctionRequirements out of Parser definition
3410         to work around a clang compiler defect.
3411
3412         Cleaned up SourceCode data() to return StringImpl* and eliminated
3413         the recently added stringData() virtual method.
3414
3415         To keep code in Parser.cpp and keep Parser.h small, the two flavors
3416         of Parser are explicitly instantiated at the end of Parser.cpp.
3417
3418         Reviewed by Gavin Barraclough.
3419
3420         * interpreter/Interpreter.cpp:
3421         (JSC::appendSourceToError):
3422         * parser/Lexer.cpp:
3423         (JSC::::setCode):
3424         (JSC::::sourceCode):
3425         * parser/Parser.cpp:
3426         (JSC::::Parser):
3427         (JSC::::~Parser):
3428         (JSC::::parseInner):
3429         (JSC::::didFinishParsing):
3430         (JSC::::allowAutomaticSemicolon):
3431         (JSC::::parseSourceElements):
3432         (JSC::::parseVarDeclaration):
3433         (JSC::::parseConstDeclaration):
3434         (JSC::::parseDoWhileStatement):
3435         (JSC::::parseWhileStatement):
3436         (JSC::::parseVarDeclarationList):
3437         (JSC::::parseConstDeclarationList):
3438         (JSC::::parseForStatement):
3439         (JSC::::parseBreakStatement):
3440         (JSC::::parseContinueStatement):
3441         (JSC::::parseReturnStatement):
3442         (JSC::::parseThrowStatement):
3443         (JSC::::parseWithStatement):
3444         (JSC::::parseSwitchStatement):
3445         (JSC::::parseSwitchClauses):
3446         (JSC::::parseSwitchDefaultClause):
3447         (JSC::::parseTryStatement):
3448         (JSC::::parseDebuggerStatement):
3449         (JSC::::parseBlockStatement):
3450         (JSC::::parseStatement):
3451         (JSC::::parseFormalParameters):
3452         (JSC::::parseFunctionBody):
3453         (JSC::::parseFunctionInfo):
3454         (JSC::::parseFunctionDeclaration):
3455         (JSC::::parseExpressionOrLabelStatement):
3456         (JSC::::parseExpressionStatement):
3457         (JSC::::parseIfStatement):
3458         (JSC::::parseExpression):
3459         (JSC::::parseAssignmentExpression):
3460         (JSC::::parseConditionalExpression):
3461         (JSC::::isBinaryOperator):
3462         (JSC::::parseBinaryExpression):
3463         (JSC::::parseProperty):
3464         (JSC::::parseObjectLiteral):
3465         (JSC::::parseStrictObjectLiteral):
3466         (JSC::::parseArrayLiteral):
3467         (JSC::::parsePrimaryExpression):
3468         (JSC::::parseArguments):
3469         (JSC::::parseMemberExpression):
3470         (JSC::::parseUnaryExpression):
3471         * parser/Parser.h:
3472         (JSC::::parse):
3473         (JSC::parse):
3474         * parser/SourceCode.h:
3475         (JSC::SourceCode::data):
3476         (JSC::SourceCode::subExpression):
3477         * parser/SourceProvider.h:
3478         (JSC::UStringSourceProvider::data):
3479
3480 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
3481
3482         Fix PropertyAccessRecords in DFG JIT to take account of branch compaction.
3483         https://bugs.webkit.org/show_bug.cgi?id=71855
3484
3485         Reviewed by Filip Pizlo.
3486
3487         The DFG JIT presently calculates a set of offsets early, before branches have been compacted.
3488         This won't work on ARMv7.
3489
3490         * assembler/AbstractMacroAssembler.h:
3491         (JSC::AbstractMacroAssembler::differenceBetweenCodePtr):
3492         * assembler/LinkBuffer.h:
3493         (JSC::LinkBuffer::locationOf):
3494         * dfg/DFGJITCodeGenerator32_64.cpp:
3495         (JSC::DFG::JITCodeGenerator::cachedGetById):
3496         (JSC::DFG::JITCodeGenerator::cachedPutById):
3497         * dfg/DFGJITCodeGenerator64.cpp:
3498         (JSC::DFG::JITCodeGenerator::cachedGetById):
3499         (JSC::DFG::JITCodeGenerator::cachedPutById):
3500         * dfg/DFGJITCompiler.cpp:
3501         (JSC::DFG::JITCompiler::link):
3502         * dfg/DFGJITCompiler.h:
3503         (JSC::DFG::PropertyAccessRecord::PropertyAccessRecord):
3504         (JSC::DFG::JITCompiler::addPropertyAccess):
3505
3506 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
3507
3508         DFG JIT calculation of OSR entry points is not THUMB2 safe
3509         https://bugs.webkit.org/show_bug.cgi?id=71852
3510
3511         Reviewed by Oliver Hunt.
3512
3513         Executable addresses are tagged with a low bit set to distinguish
3514         between THUMB2 and traditional ARM.
3515
3516         * dfg/DFGJITCompiler.cpp:
3517         (JSC::DFG::JITCompiler::exitSpeculativeWithOSR):
3518         * dfg/DFGJITCompiler32_64.cpp:
3519         (JSC::DFG::JITCompiler::exitSpeculativeWithOSR):
3520         * dfg/DFGOSREntry.cpp:
3521         (JSC::DFG::prepareOSREntry):
3522         * jit/JITCode.h:
3523         (JSC::JITCode::executableAddressAtOffset):
3524         (JSC::JITCode::start):
3525         (JSC::JITCode::size):
3526
3527 2011-11-08  Michael Saboff  <msaboff@apple.com>
3528
3529         JSC::Parser::Parser leaks Lexer member
3530         https://bugs.webkit.org/show_bug.cgi?id=71847
3531
3532         Changed m_lexer member of Parser to be OwnPtr to fix a memory leak.
3533
3534         Reviewed by Oliver Hunt.
3535
3536         * parser/Parser.cpp:
3537         (JSC::Parser::Parser):
3538         (JSC::Parser::parseFunctionBody):
3539         * parser/Parser.h:
3540
3541 2011-11-08  Yuqiang Xian  <yuqiang.xian@intel.com>
3542
3543         Enable DFG JIT by default on X86 Linux and Mac platforms
3544         https://bugs.webkit.org/show_bug.cgi?id=71686
3545
3546         Reviewed by Filip Pizlo.
3547
3548         We can get 9% on SunSpider, 89% on Kraken and 37% on V8, on Linux X86.
3549
3550         * wtf/Platform.h:
3551
3552 2011-11-08  Yuqiang Xian  <yuqiang.xian@intel.com>
3553
3554         DFG 32_64 - update make lists for efl, gtk, and Qt ports with DFG change r99519
3555         https://bugs.webkit.org/show_bug.cgi?id=71768
3556
3557         Reviewed by Geoffrey Garen.
3558
3559         Also includes a fix to make the newly introduced AssemblyHelpers
3560         friend of JSValue as we need the Tag definitions.
3561
3562         * CMakeListsEfl.txt:
3563         * GNUmakefile.list.am:
3564         * Target.pri:
3565         * runtime/JSValue.h:
3566
3567 2011-11-07  Yuqiang Xian  <yuqiang.xian@intel.com>
3568
3569         Fix gcc 4.4 compilation warnings in DFG 32_64
3570         https://bugs.webkit.org/show_bug.cgi?id=71762
3571
3572         Reviewed by Filip Pizlo.
3573
3574         * dfg/DFGJITCodeGenerator.h:
3575         (JSC::DFG::JITCodeGenerator::registersMatched):
3576
3577 2011-11-07  Filip Pizlo  <fpizlo@apple.com>
3578
3579         DFG code base should allow for classes not related to DFG::JITCompiler
3580         to use DFG idioms
3581         https://bugs.webkit.org/show_bug.cgi?id=71746
3582
3583         Reviewed by Gavin Barraclough.
3584
3585         * JavaScriptCore.xcodeproj/project.pbxproj:
3586         * dfg/DFGAssemblyHelpers.cpp: Added.
3587         (JSC::DFG::AssemblyHelpers::decodedCodeMapFor):
3588         (JSC::DFG::AssemblyHelpers::emitCount):
3589         (JSC::DFG::AssemblyHelpers::setSamplingFlag):
3590         (JSC::DFG::AssemblyHelpers::clearSamplingFlag):
3591         (JSC::DFG::AssemblyHelpers::jitAssertIsInt32):
3592         (JSC::DFG::AssemblyHelpers::jitAssertIsJSInt32):
3593         (JSC::DFG::AssemblyHelpers::jitAssertIsJSNumber):
3594         (JSC::DFG::AssemblyHelpers::jitAssertIsJSDouble):
3595         (JSC::DFG::AssemblyHelpers::jitAssertIsCell):
3596         * dfg/DFGAssemblyHelpers.h: Added.
3597         * dfg/DFGJITCompiler.cpp:
3598         * dfg/DFGJITCompiler.h:
3599         (JSC::DFG::JITCompiler::JITCompiler):
3600         (JSC::DFG::JITCompiler::graph):
3601         * dfg/DFGJITCompiler32_64.cpp:
3602         * dfg/DFGOSRExit.h: Added.
3603         (JSC::DFG::SpeculationRecovery::SpeculationRecovery):
3604         (JSC::DFG::SpeculationRecovery::type):
3605         (JSC::DFG::SpeculationRecovery::dest):
3606         (JSC::DFG::SpeculationRecovery::src):
3607         (JSC::DFG::OSRExit::numberOfRecoveries):
3608         (JSC::DFG::OSRExit::valueRecovery):
3609         (JSC::DFG::OSRExit::isArgument):
3610         (JSC::DFG::OSRExit::isVariable):
3611         (JSC::DFG::OSRExit::argumentForIndex):
3612         (JSC::DFG::OSRExit::variableForIndex):
3613         (JSC::DFG::OSRExit::operandForArgument):
3614         (JSC::DFG::OSRExit::operandForIndex):
3615         * dfg/DFGSpeculativeJIT.h:
3616
3617 2011-11-07  Filip Pizlo  <fpizlo@apple.com>
3618
3619         Switch back to 1+1 value profiling buckets, since it didn't help on arewefastyet,
3620         but it appears to help on other benchmarks.
3621
3622         Rubber stamped by Oliver Hunt.
3623
3624         * bytecode/ValueProfile.h:
3625
3626 2011-11-07  Ariya Hidayat  <ariya@sencha.com>
3627
3628         "use strict" can not contain escape sequences or line continuation
3629         https://bugs.webkit.org/show_bug.cgi?id=71532
3630
3631         Reviewed by Darin Adler.
3632
3633         Store the actual literal length (before the escapes and line
3634         continuation are encoded) while parsing the directive and use it
3635         for the directive comparison.
3636
3637         * parser/Parser.cpp:
3638         (JSC::Parser::parseSourceElements):
3639         (JSC::Parser::parseStatement):
3640         * parser/Parser.h:
3641
3642 2011-11-06  Filip Pizlo  <fpizlo@apple.com>
3643
3644         DFG operationCreateThis slow path may get the wrong callee in case of inlining
3645         https://bugs.webkit.org/show_bug.cgi?id=71647
3646
3647         Reviewed by Oliver Hunt.
3648         
3649         No new tests because I only saw this manifest itself when I had other bugs
3650         leading to spurious slow path executions.
3651
3652         * dfg/DFGJITCodeGenerator.h:
3653         (JSC::DFG::callOperation):
3654         * dfg/DFGOperations.cpp:
3655         * dfg/DFGOperations.h:
3656         * dfg/DFGSpeculativeJIT32_64.cpp:
3657         (JSC::DFG::SpeculativeJIT::compile):
3658         * dfg/DFGSpeculativeJIT64.cpp:
3659         (JSC::DFG::SpeculativeJIT::compile):
3660
3661 2011-11-07  Mark Hahnenberg  <mhahnenberg@apple.com>
3662
3663         De-virtualize JSObject::putWithAttributes
3664         https://bugs.webkit.org/show_bug.cgi?id=71716
3665
3666         Reviewed by Darin Adler.
3667
3668         Added putWithAttributes to the MethodTable, changed all the virtual 
3669         implementations of putWithAttributes to static ones, and replaced 
3670         all call sites with corresponding lookups in the MethodTable.
3671
3672         * API/JSObjectRef.cpp:
3673         (JSObjectSetProperty):
3674         * JavaScriptCore.exp:
3675         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3676         * debugger/DebuggerActivation.cpp:
3677         (JSC::DebuggerActivation::putWithAttributes):
3678         * debugger/DebuggerActivation.h:
3679         * interpreter/Interpreter.cpp:
3680         (JSC::Interpreter::execute):
3681         * runtime/ClassInfo.h:
3682         * runtime/JSActivation.cpp:
3683         (JSC::JSActivation::putWithAttributes):
3684         * runtime/JSActivation.h:
3685         * runtime/JSCell.cpp:
3686         (JSC::JSCell::putWithAttributes):
3687         * runtime/JSCell.h:
3688         * runtime/JSGlobalObject.cpp:
3689         (JSC::JSGlobalObject::putWithAttributes):
3690         * runtime/JSGlobalObject.h:
3691         * runtime/JSObject.cpp:
3692         (JSC::JSObject::putWithAttributes):
3693         (JSC::putDescriptor):
3694         * runtime/JSObject.h:
3695         * runtime/JSStaticScopeObject.cpp:
3696         (JSC::JSStaticScopeObject::putWithAttributes):
3697         * runtime/JSStaticScopeObject.h:
3698         * runtime/JSVariableObject.cpp:
3699         (JSC::JSVariableObject::putWithAttributes):
3700         * runtime/JSVariableObject.h:
3701
3702 2011-11-07  Dmitry Lomov  <dslomov@google.com>
3703
3704         Unreviewed. Release build fix.
3705
3706         * parser/Lexer.cpp:
3707         (JSC::assertCharIsIn8BitRange):
3708
3709 2011-11-07  Filip Pizlo  <fpizlo@apple.com>
3710
3711         Switch the value profiler back to 8 buckets, because we suspect that while this
3712         is more expensive it's also more stable.
3713
3714         Rubber stamped by Geoff Garen.
3715
3716         * bytecode/ValueProfile.h:
3717
3718 2011-11-07  Andrew Wason  <rectalogic@rectalogic.com>
3719
3720         Uninitialized Heap member var
3721         https://bugs.webkit.org/show_bug.cgi?id=71722
3722
3723         Reviewed by Filip Pizlo.
3724
3725         * heap/Heap.cpp:
3726         (JSC::Heap::Heap): Initialize m_blockFreeingThreadShouldQuit
3727
3728 2011-11-07  Yuqiang Xian  <yuqiang.xian@intel.com>
3729
3730         DFG 32_64 - registers cannot be reused arbitrarily if speculation failures are possible
3731         https://bugs.webkit.org/show_bug.cgi?id=71684
3732
3733         Reviewed by Filip Pizlo.
3734
3735         Currently in DFG JIT, we try to reuse the physical register of an
3736         operand for temporary usage if the current use of the operand is the
3737         last use. But sometimes this can be wrong, for example if there are
3738         possible speculation failures and we need to fallback to baseline JIT,
3739         the value of the operand which is supposed to be hold in the physical
3740         register can be modified by register reusing. The fixes the last
3741         inspector failures in layout test on Mac 32-bit if switching on DFG.
3742
3743         * dfg/DFGSpeculativeJIT32_64.cpp:
3744         (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
3745         (JSC::DFG::SpeculativeJIT::compile):
3746
3747 2011-11-07  Ryosuke Niwa  <rniwa@webkit.org>
3748
3749         REGRESSION(r99436): Broke Snow Leopard debug build
3750         https://bugs.webkit.org/show_bug.cgi?id=71713
3751
3752         Reviewed by Darin Adler.
3753
3754         Put the assertion in a template and use template specialization
3755         to avoid warning when instantiated with UChar or LChar.
3756
3757         In the long term, we should have traits for unsigned integral types
3758         and use that to specialize template instead of specializing it for UChar and LChar.
3759
3760         * parser/Lexer.cpp:
3761         (JSC::assertCharIsIn8BitRange):
3762         (JSC::::append8):
3763
3764 2011-11-07  ChangSeok Oh  <shivamidow@gmail.com>
3765
3766         [EFL] Support requestAnimationFrame API
3767         https://bugs.webkit.org/show_bug.cgi?id=67112
3768
3769         Reviewed by Andreas Kling.
3770
3771         Let EFL port use REQUEST_ANIMATION_FRAME_TIMER.
3772
3773         * wtf/Platform.h:
3774
3775 2011-11-07  Michael Saboff  <msaboff@apple.com>
3776
3777         Towards 8 Bit Strings: Templatize JSC::Lexer class by character type
3778         https://bugs.webkit.org/show_bug.cgi?id=71331
3779
3780         Change the Lexer class to be a template class based on the character
3781         type of the source.  In the process updated the parseIdentifier()
3782         and parseString() methods to create 8 bit strings where possible.
3783         Also added some helper methods for accumulating temporary string
3784         data in the 8 and 16 bit vectors.
3785
3786         Changed the SourceProvider::data() virtual method to return a
3787         StringImpl* instead of a UChar*.
3788
3789         Updated the KeywordLookup generator to create code to match keywords
3790         for both 8 and 16 bit source strings.
3791
3792         Due to a compiler bug (<rdar://problem/10194295>) moved enum
3793         definition outside of Lexer class declaration.  Remove second enum
3794         no longer needed.
3795
3796         Reviewed by Darin Adler.
3797
3798         * KeywordLookupGenerator.py:
3799         * interpreter/Interpreter.cpp:
3800         (JSC::Interpreter::callEval):
3801         * parser/Lexer.cpp:
3802         (JSC::::Lexer):
3803         (JSC::::~Lexer):
3804         (JSC::::getInvalidCharMessage):
3805         (JSC::::currentCharacter):
3806         (JSC::::setCode):
3807         (JSC::::internalShift):
3808         (JSC::::shift):
3809         (JSC::::peek):
3810         (JSC::::getUnicodeCharacter):
3811         (JSC::::shiftLineTerminator):
3812         (JSC::::lastTokenWasRestrKeyword):
3813         (JSC::::record8):
3814         (JSC::::append8):
3815         (JSC::::append16):
3816         (JSC::::record16):
3817         (JSC::::parseIdentifier):
3818         (JSC::::parseIdentifierSlowCase):
3819         (JSC::::parseString):
3820         (JSC::::parseStringSlowCase):
3821         (JSC::::parseHex):
3822         (JSC::::parseOctal):
3823         (JSC::::parseDecimal):
3824         (JSC::::parseNumberAfterDecimalPoint):
3825         (JSC::::parseNumberAfterExponentIndicator):
3826         (JSC::::parseMultilineComment):
3827         (JSC::::nextTokenIsColon):
3828         (JSC::::lex):
3829         (JSC::::scanRegExp):
3830         (JSC::::skipRegExp):
3831         (JSC::::clear):
3832         (JSC::::sourceCode):
3833         * parser/Lexer.h:
3834         (JSC::Lexer::append16):
3835         (JSC::Lexer::currentOffset):
3836         (JSC::Lexer::setOffsetFromCharOffset):
3837         (JSC::::isWhiteSpace):
3838         (JSC::::isLineTerminator):
3839         (JSC::::convertHex):
3840         (JSC::::convertUnicode):
3841         (JSC::::makeIdentifier):
3842         (JSC::::setCodeStart):
3843         (JSC::::makeIdentifierLCharFromUChar):
3844         (JSC::::lexExpectIdentifier):
3845         * parser/Parser.cpp:
3846         (JSC::Parser::Parser):
3847         (JSC::Parser::parseProperty):
3848         (JSC::Parser::parseMemberExpression):
3849         * parser/Parser.h:
3850         (JSC::Parser::next):
3851         (JSC::Parser::nextExpectIdentifier):
3852         * parser/ParserArena.h:
3853         (JSC::IdentifierArena::makeIdentifier):
3854         (JSC::IdentifierArena::makeIdentifierLCharFromUChar):
3855         * parser/SourceCode.h:
3856         (JSC::SourceCode::subExpression):
3857         * parser/SourceProvider.h:
3858         (JSC::UStringSourceProvider::stringData):
3859         * parser/SourceProviderCache.h:
3860         * parser/SyntaxChecker.h:
3861         * runtime/FunctionPrototype.cpp:
3862         (JSC::insertSemicolonIfNeeded):
3863         * runtime/Identifier.cpp:
3864         (JSC::IdentifierTable::add):
3865         (JSC::IdentifierLCharFromUCharTranslator::hash):
3866         (JSC::IdentifierLCharFromUCharTranslator::equal):
3867         (JSC::IdentifierLCharFromUCharTranslator::translate):
3868         (JSC::Identifier::add8):
3869         * runtime/Identifier.h:
3870         (JSC::Identifier::Identifier):
3871         (JSC::Identifier::createLCharFromUChar):
3872         (JSC::Identifier::canUseSingleCharacterString):
3873         (JSC::IdentifierCharBufferTranslator::hash):
3874         (JSC::IdentifierCharBufferTranslator::equal):
3875         (JSC::IdentifierCharBufferTranslator::translate):
3876         (JSC::Identifier::add):
3877         (JSC::Identifier::equal):
3878         (JSC::IdentifierTable::add):
3879         * runtime/JSGlobalObjectFunctions.cpp:
3880         (JSC::decode):
3881         (JSC::parseIntOverflow):
3882         (JSC::globalFuncUnescape):
3883         * runtime/JSGlobalObjectFunctions.h:
3884         (JSC::parseIntOverflow):
3885         * runtime/LiteralParser.cpp:
3886         (JSC::LiteralParser::tryJSONPParse):
3887         (JSC::LiteralParser::Lexer::lexString):
3888         * wtf/text/StringImpl.h:
3889
3890 2011-11-07  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
3891
3892         [Qt] Put the jsc binary in 'bin' instead of leaving it deep in the build tree
3893
3894         Allows us to not package up the whole Source/JavaScriptCore directory for the
3895         buildbots.
3896
3897         Reviewed-by Simon Hausmann.
3898
3899         * jsc.pro:
3900
3901 2011-11-06  Filip Pizlo  <fpizlo@apple.com>
3902
3903         REGRESSION(r99374): GTK+ build of the jsc binary doesn't like the call
3904         to initializeMainThread, and crashes
3905         https://bugs.webkit.org/show_bug.cgi?id=71643
3906
3907         Reviewed by Sam Weinig.
3908
3909         * jsc.cpp:
3910         (main):
3911
3912 2011-11-06  Sam Weinig  <sam@webkit.org>
3913
3914         Add space missing from some class declarations
3915         https://bugs.webkit.org/show_bug.cgi?id=71632
3916
3917         Reviewed by Anders Carlsson.
3918
3919         * assembler/AssemblerBufferWithConstantPool.h:
3920         * bytecode/CodeBlock.h:
3921         * dfg/DFGVariableAccessData.h:
3922         * heap/VTableSpectrum.h:
3923         * jit/ExecutableAllocator.cpp:
3924         * jit/ExecutableAllocatorFixedVMPool.cpp:
3925         * wtf/MetaAllocatorHandle.h:
3926         * wtf/UnionFind.h:
3927
3928 2011-11-06  Sam Weinig  <sam@webkit.org>
3929
3930         Allow use of FINAL in JavaScriptCore
3931         https://bugs.webkit.org/show_bug.cgi?id=71630
3932
3933         Reviewed by Anders Carlsson.
3934
3935         * Configurations/Base.xcconfig:
3936         Don't warn about C++11 extensions used in C++98 mode.
3937
3938 2011-11-05  Filip Pizlo  <fpizlo@apple.com>
3939
3940         Value profiling should just use two buckets
3941         https://bugs.webkit.org/show_bug.cgi?id=71619
3942
3943         Reviewed by Gavin Barraclough.
3944         
3945         Added one more configuration options (like Heuristics::minimumOptimizationDelay),
3946         improved debugging in JIT optimization support, changed the number of buckets
3947         in the value profile from 9 to 2, and wrote a more optimal value profiling path
3948         in the old JIT to take advantage of this. It's still possible to play around with
3949         larger numbers of buckets, and we should probably keep this for a little while
3950         until we convince ourselves that using just two buckets is the right call.
3951
3952         * bytecode/CodeBlock.cpp:
3953         (JSC::CodeBlock::shouldOptimizeNow):
3954         * bytecode/ValueProfile.h:
3955         * jit/JITInlineMethods.h:
3956         (JSC::JIT::emitValueProfilingSite):
3957         * jit/JITStubs.cpp:
3958         (JSC::DEFINE_STUB_FUNCTION):
3959         * runtime/Heuristics.cpp:
3960         (JSC::Heuristics::initializeHeuristics):
3961         * runtime/Heuristics.h:
3962
3963 2011-11-03  Filip Pizlo  <fpizlo@apple.com>
3964
3965         JSC should be able to sample itself in a more flexible way than just sampling flags
3966         https://bugs.webkit.org/show_bug.cgi?id=71522
3967
3968         Reviewed by Gavin Barraclough.
3969         
3970         Added a construct that looks like SamplingRegion samplingRegion("name").
3971
3972         * JavaScriptCore.exp:
3973         * JavaScriptCore.xcodeproj/project.pbxproj:
3974         * bytecode/SamplingTool.cpp:
3975         (JSC::SamplingRegion::Locker::Locker):
3976         (JSC::SamplingRegion::Locker::~Locker):
3977         (JSC::SamplingRegion::sample):
3978         (JSC::SamplingRegion::dump):
3979         (JSC::SamplingRegion::dumpInternal):
3980         (JSC::SamplingThread::threadStartFunc):
3981         * bytecode/SamplingTool.h:
3982         (JSC::SamplingRegion::SamplingRegion):
3983         (JSC::SamplingRegion::~SamplingRegion):
3984         (JSC::SamplingRegion::exchangeCurrent):
3985         * bytecompiler/BytecodeGenerator.cpp:
3986         (JSC::BytecodeGenerator::generate):
3987         * dfg/DFGDriver.cpp:
3988         (JSC::DFG::compile):
3989         * heap/Heap.cpp:
3990         (JSC::Heap::markRoots):
3991         (JSC::Heap::collect):